Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - MultiformeIngegno
196
Off-topic / jQuery(document).ready function issue
« on May 14th, 2013, 12:25 AM »
Code: [Select]
jQuery(document).ready(function() {
jQuery(".fancybox").fancybox({
  helpers : {
   title : { type : 'float' }
  },
      beforeShow: function(){
       this.title = '<div>'+jQuery(this.element).next('div').html()+'</div>';
      }
});


jQuery("a.fancybox").fancybox({
tpl: {
  next: '<a title="Avanti" class="fancybox-nav fancybox-next"><span></span></a>',
  prev: '<a title="Indietro" class="fancybox-nav fancybox-prev"><span></span></a>'
}
});



});

The first part (.fancybox) is "ignored", the second (a.fancybox) is taken into account. If I remove the second, the first is taken into account. -_-
197
Off-topic / Re: json_decode transforms dot in comma
« on May 12th, 2013, 10:21 PM »
Quote from Arantor on May 12th, 2013, 10:18 PM
I'd suggest setlocale(LC_NUMERIC, 'en_US.UTF-8');

Be careful with the trailing definition of charset, .utf8 is often suggested in preference to .UTF-8 and you can specify multiple types.
Worked. :)
I remember I choose .UTF-8 because I checked and I had that exact string as installed-language.
Posted: May 12th, 2013, 10:20 PM

EDIT: I used setlocale(LC_TIME, 'it_IT.UTF-8'); and with this I don't need the NUMERIC directive. :)
198
Off-topic / Re: json_decode transforms dot in comma
« on May 12th, 2013, 10:01 PM »
Uh! Right! I added a setlocale(LC_ALL, 'it_IT.UTF-8'); at the beginning of the file because I have other code that requires the locale setting.. How can I "overwrite" the locale just for these $value->location->latitude / $value->location->longitude.. ?
199
Off-topic / json_decode transforms dot in comma
« on May 12th, 2013, 04:10 PM »
Here's the JSON input: http://pastebin.com/xGWtWb5P

I do a json_decode
Code: [Select]
<?php <a target="_blank" style="color:darkgrey" rel="nofollow" href="http://maps.google.com/maps?q='.htmlentities($value->location->latitude).',+'.htmlentities($value->location->longitude).'">mappa</a?>

But instead of dots for GPS coords it outputs commas... O_O
Original: LAT 41.917866942 LONG 12.873182618
json_decode: LAT 41,917866942 LONG 12,873182618

It's not htmlentities fault, I tried disabling it and it still outputs commas.
200
Off-topic / Re: for(i=1;i<j;i++)
« on May 10th, 2013, 01:30 AM »
Quote from Nao on May 10th, 2013, 12:53 AM
IE10 doesn't remove any markers, BTW ;)
True! WTF? :o
201
Off-topic / Re: Just Hanging Out
« on May 8th, 2013, 03:53 PM »
Weird, I can see it
202
Off-topic / Re: Shiny awesomeness
« on May 7th, 2013, 03:14 AM »
I'm taking pop corns! :D
203
Off-topic / Re: for(i=1;i<j;i++)
« on May 6th, 2013, 07:07 PM »
I made some trials and this worked :P

Code: [Select]
for (var i = 0, j = mkArray.length - 0; i < j; i++)
  mkArray[i].setMap(null);
http://ffio.it/test_nao.html
204
Off-topic / Re: for(i=1;i<j;i++)
« on May 6th, 2013, 04:23 PM »
I'm looking for code that removes all markers except the 2 that get created when route is calculated (start and end points). :)
205
Archived fixes / Re: Funny bug...
« on May 6th, 2013, 03:23 PM »
Ahahah, it's not a bug. It's a feature: SEO porn positioning
206
Off-topic / Re: for(i=1;i<j;i++)
« on May 5th, 2013, 06:09 PM »
Uhm. I tried your code but no marker is removed.. :(

Original code: http://ffio.it/test2.html
Your code: http://ffio.it/test_nao.html

If you calc the route (typing for example "Ostia") with the first example you can see it removes (only) the first marker. Yours keeps all markers.. :(

EDIT: SInce the first example (at least) removes one marker this should mean it could execute the function while loading. :)
207
Off-topic / for(i=1;i<j;i++)
« on May 5th, 2013, 03:36 PM »
What does this mean?

Code: [Select]
var i, j=mkArray.length-1;
// Keeping the first and last one
for(i=1;i<j;i++) {
  mk=mkArray[i];
  mk.setMap(null);

I have a map with 3 markers set at loadtime. Then I have a function to calculate a route (so in the map 2 new markers are set, with a total of 5). I'm trying to remove the first 3 markers to leave just the route markers when route is calculated. I first pushed markers in an array with mkArray.push(marker);. Then the code above should remove the 3 initial markers.

The code does something, you can see it here (to test you can enter "Ostia" in input box). As you can see  it removes the first marker when route is calculated. It's a starting point but I need to remove all markers except the 2 related to the route. :D
208
The Pub / Re: I asked my people to take a look at Wedge
« on May 3rd, 2013, 03:05 AM »
Quote from Arantor on May 3rd, 2013, 03:03 AM
Given that wiki markup is a poor imitation of the power of bbcode...?
In this case a converter would be just fine! :)
209
The Pub / Re: I asked my people to take a look at Wedge
« on May 3rd, 2013, 03:02 AM »
Ehrm.... wiki markup (& converter).... whistles... :P
210
public_html folder is something related to shared hostings. You have to install php(5-fpm) (if you're using php pages), apache / nginx as web servers. Then you configure virtual hosts and choose the folder.