# Search:

Type: Posts; User: paulnic

Page 1 of 4 1

1. ## Thread: Imitate PHP Round Function in JS

by paulnic
Replies
27
Views
2,021

### After some research i believe this is a...

After some research i believe this is a fundamental computing problem with floating point numbers.

Does anyone have a fix/solution to this...?
2. ## Thread: Imitate PHP Round Function in JS

by paulnic
Replies
27
Views
2,021

### round(152.77499999999998,2) Any ideas how to...

round(152.77499999999998,2)

Any ideas how to produce the correct answer 152.77 and make it scalebale with all numbers not just this example?
3. ## Thread: Imitate PHP Round Function in JS

by paulnic
Replies
27
Views
2,021

### Yes this is a major pain in the a\$\$! ...

Yes this is a major pain in the a\$\$!

Javascript rounds it to 152.77 (correct) and PHP doesnt and i need them to both be the same... agghhh!!
4. ## Thread: PHP Round function

by paulnic
Replies
3
Views
1,250

### PHP Round function

Hi,

I'm a little bit confused - can someone explain this to me:

If i say round(22.044960000000003,2) the answer becomes 22.04 (expected)
If i say round(152.77499999999998,2) the answer becomes...
5. ## Thread: Imitate PHP Round Function in JS

by paulnic
Replies
27
Views
2,021

### In PHP if you say round(152.77499999999998,2) the...

In PHP if you say round(152.77499999999998,2) the result is 152.78
6. ## Thread: Imitate PHP Round Function in JS

by paulnic
Replies
27
Views
2,021

### thanks but that doesnt work. ...

thanks but that doesnt work.

152.77499999999998 becomes 152.77 not 152.78
7. ## Thread: Imitate PHP Round Function in JS

by paulnic
Replies
27
Views
2,021

### Imitate PHP Round Function in JS

Hi

When rounding these 2 numbers in PHP and JS i get the following results:

22.044960000000003

PHP = 22.04
JS = 22.05

152.77499999999998
8. ## Thread: PHP Mail - MIME Composition help

by paulnic
Replies
3
Views
1,896

### Thanks hastx but that space isnt actually there -...

Thanks hastx but that space isnt actually there - i must have added it by mistake when pasting it into here. Have tried your suggestions (7 bit and quoted) but no change... When i remove the 1st 2...
9. ## Thread: PHP Mail - MIME Composition help

by paulnic
Replies
3
Views
1,896

### PHP Mail - MIME Composition help

Hi,

I have written some code which generates and sends an email with attachment. It works fine when viewing in hotmail but in Outlook the html portion is messed up. It also seems to be adding the...

by paulnic
Replies
3
Views
2,516

### Website load speed best image format?

Hi,

To increase load time on my website what is the best image format jpeg or png? I always assumed jpeg as they are smaller but have heard from some that png's are better??
11. ## Thread: HTTP POST Not working (408 Error)

by paulnic
Replies
2
Views
2,049

### yes - trimmed down for this post - thanks anyway

yes - trimmed down for this post - thanks anyway
12. ## Thread: HTTP POST Not working (408 Error)

by paulnic
Replies
2
Views
2,049

### HTTP POST Not working (408 Error)

Hi,

I am having some problems trying to get a post request to work from a payment provider (WorldPay) to my host server. Basically WorldPay does a callback to a script on my website if/when a...
13. ## Thread: Submit form on Meta Refresh?

by paulnic
Replies
1
Views
1,739

### Submit form on Meta Refresh?

Is it possible to submit a form and post some data on a meta refresh??

i have some html which i want to submit after 5 seconds but i dont want the user to have to click a submit button - is this...
14. ## Thread: MySQL "NOT IN" Performance Problem

by paulnic
Replies
6
Views
3,806

### i've confused myself now... To get that all i...

i've confused myself now...

To get that all i would have to say is:

c.county, c.postcode FROM...
15. ## Thread: MySQL "NOT IN" Performance Problem

by paulnic
Replies
6
Views
3,806

### Table contractor has every contractor in it. ...

Table contractor has every contractor in it.

Table works has works in it and each works is related to a contractor, however not all contractors are in this table.

So my not in is saying give...
16. ## Thread: MySQL "NOT IN" Performance Problem

by paulnic
Replies
6
Views
3,806

### MySQL "NOT IN" Performance Problem

Hi,

I am using a NOT IN on a subquery in MySql and the performance is really bad... Is there another way of doing what i am doing below w\o using NOT IN?

Thanks

SELECT c.contractorId,...
17. ## Thread: How to get the height (in Pixels) that is taken up by the address bar etc

by paulnic
Replies
0
Views
508

### How to get the height (in Pixels) that is taken up by the address bar etc

Hi,

as title says i need to calculate the height in pixels that is taken up by the address bar, file menu and any other toolbars that are present.

Any ideas?
18. ## Thread: .htaccess - redirect index.php and non www

by paulnic
Replies
4
Views
5,168

Could you demonstrate how to redirect mysite.com/index.php to www.mysite.com?

thanks

paul
19. ## Thread: .htaccess - redirect index.php and non www

by paulnic
Replies
4
Views
5,168

### .htaccess - redirect index.php and non www

Hi,

I would like my .htaccess file to redirect the following urls to:

http://www.mysite.com/

The urls to redirect are:

http://www.mysite.com/index.php
http://mysite.com
20. ## Thread: 404 Page for .php files?

by paulnic
Replies
1
Views
1,088

### 404 Page for .php files?

Hi,

I have set up a custom 404 page for my website and it works fine except for files with the extension .php. For example if i put http://www.mysite.com/blahblablah.php into the browser it wont...

by paulnic
Replies
0
Views
666

### dijit.layout.ContentPane question

Hi,

Is it possible to set the content property of a dijit.layout.ContentPane to a js object? e.g.

this.Container = new dijit.layout.ContentPane({
title: "Test",
...
22. ## Thread: Javascript not executing when used in innerHTML div

by paulnic
Replies
1
Views
1,033

### Javascript not executing when used in innerHTML div

Hi,

I am inserting html into a div which calls various js functions, it works fine when not inside the div but now inside the div none of the onclicks are working.

e.g code:

<div...
23. ## Thread: MySql create calendar table

by paulnic
Replies
1
Views
3,316

### MySql create calendar table

Hi,

You would have thought there would have been many scripts out there that create calendar tables but i cant seem to find a simple one that does what i want...
Basically all i want is to create...
24. ## Thread: Show\Hide select box values with checkbox filter

by paulnic
Replies
6
Views
1,970

### Hi, thanks but that is what i have got atm. That...

Hi, thanks but that is what i have got atm. That means i need an if statement or a case for every possible variation of boxes checked. This means i need about 20 if statements which i dont like...
25. ## Thread: Show\Hide select box values with checkbox filter

by paulnic
Replies
6
Views
1,970

### This may help a bit: here are some example...

This may help a bit:

here are some example tables (options in my select)

Type1_LookupProduct
Type1_User
Type2_LookupCountry