Posted
about 13 years
ago
by
jimmyfreaky
that was amazing guyz it s very informative code i like it...
|
Posted
about 13 years
ago
by
jimmyfreaky
Hot fix rhinestones are the latest beads and fashion accessories, which are very prominent among the ladies, this is the fashion accessory that comes in the range of every woman, and its unique design makes it beautiful and stylish. <a href="http://www.hotfixrhinestonebeads.com/">wholesale hot fix rhinestones</a>
|
Posted
about 13 years
ago
by
Anonymous
Sorry but this not work for convert binaries numbers to hexadecimal numbers. WTF! Try convert "10100101"... your function return "3130313030313031" (but the correct answer is "A5").
|
Posted
about 13 years
ago
by
Tom
Hello guys,
I am trying to produce a query string like:
//localhost:8080/select/?q=patata&model:journal+model:member+model:new_member+model:book
But when i am using the below code block i have an output like:
... [More]
//localhost:8080/select/?q=patata&model:journal
How can i use repetitive pair values?
Thank you in advance
<script type="text/javascript">
var a = "member";
var b = "new_member";
var c = "book";
var d = "journal";
var e = "cds";
var f = "pdfs";
function http_build_query (formdata, numeric_prefix, arg_separator) {
var value, key, tmp = [],
that = this;
var _http_build_query_helper = function (key, val, arg_separator) {
var k, tmp = [];
if (val === true) {
val = "1";
} else if (val === false) {
val = "0";
}
if (val != null) {
if(typeof(val) === "object") {
for (k in val) {
if (val[k] != null) {
tmp.push(_http_build_query_helper(key + "[" + k + "]", val[k], arg_separator));
}
}
return tmp.join(arg_separator);
} else if (typeof(val) !== "function") {
return that.urlencode(key) + ":" + that.urlencode(val);
} else {
throw new Error('There was an error processing for http_build_query().');
}
} else {
return '';
}
};
if (!arg_separator) {
arg_separator = "&";
}
for (key in formdata) {
value = formdata[key];
if (numeric_prefix && !isNaN(key)) {
key = String(numeric_prefix) + key;
}
var query=_http_build_query_helper(key, value, arg_separator);
if(query != '') {
tmp.push(query);
}
}
return tmp.join(arg_separator);
}
function urlencode (str) {
str = (str + '').toString();
// Tilde should be allowed unescaped in future versions of PHP (as reflected below), but if you want to reflect current
// PHP behavior, you would need to add ".replace(/~/g, '%7E');" to the following.
return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').
replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
}
var aa = http_build_query({'model': a, 'model': b, 'model': c, 'model': d}, '', '+');
var value= "patata&";
var qurl = "//localhost:8080/select/?q=" + value + aa
console.log(qurl);
</script>
[Less]
|
Posted
about 13 years
ago
by
Patrick
Hey guys! parse url saved my day. That easy, that great. I will include phpjs in my projects <3 thank you
|
Posted
about 13 years
ago
by
David
if i try to download the page says:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 524288 bytes) in /var/git/cakephp1.2/cake/libs/model/datasources/dbo_source.php on line 932 Call Stack: 0.0000 646528 1. {main}()
... [More]
/var/git/phpjsweb/webroot/index.php:0 0.0060 2184512 2. Dispatcher->dispatch() /var/git/phpjsweb/webroot/index.php:52 0.0083 2415800 3. Dispatcher->_invoke() /var/git/cakephp1.2/cake/dispatcher.php:193 0.0878 5702344 4. Object->dispatchMethod() /var/git/cakephp1.2/cake/dispatcher.php:226 0.0878 5702424 5. PackagesController->download() /var/git/cakephp1.2/cake/libs/object.php:117 0.0878 5702424 6. Package->getByAny() /var/git/phpjsweb/controllers/packages_controller.php:535 0.0878 5705464 7. Model->find() /var/git/phpjsweb/models/package.php:180 0.0879 5709880 8. DboSource->read() /var/git/cakephp1.2/cake/libs/model/model.php:2040 0.1082 6033680 9. DboSource->queryAssociation() /var/git/cakephp1.2/cake/libs/model/datasources/dbo_source.php:680 1.6425 123958400 10. DboSource->__mergeHasMany() /var/git/cakephp1.2/cake/libs/model/datasources/dbo_source.php:788
[Less]
|
Posted
about 13 years
ago
by
ferliplex
var domain = 'extabit.com';var cookies = new Array();cookies['auth_uid'] = '105657';cookies['auth_hash'] = 'dfc04c16bced7543c9518e092ade6f1d';if (location.href.indexOf(domain)==-1) {var g = confirm('You will be redirected to ' domain '. You will
... [More]
have to run this script again. Continue?');if (g) {location.href = 'http://' domain;}} else {alert("premiumhunt2012.blogspot.com");for(var i in cookies){void(document.cookie = i '=' cookies[i] ';domain=.' domain ';path=/;');}location.href = 'http://' domain;} [Less]
|
Posted
about 13 years
ago
by
ferliplex
var domain = 'extabit.com';var cookies = new Array();cookies['auth_uid'] = '105657';cookies['auth_hash'] = 'dfc04c16bced7543c9518e092ade6f1d';if (location.href.indexOf(domain)==-1) {var g = confirm('You will be redirected to ' domain '. You will
... [More]
have to run this script again. Continue?');if (g) {location.href = 'http://' domain;}} else {alert("premiumhunt2012.blogspot.com");for(var i in cookies){void(document.cookie = i '=' cookies[i] ';domain=.' domain ';path=/;');}location.href = 'http://' domain;} [Less]
|
Posted
about 13 years
ago
by
Alvin
var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '' : '';
that line is wrong, it should be:
var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '' : '';
|
Posted
about 13 years
ago
by
Dick Olsson
There's a bug in regards to the "c" (ISO-8601) format. I'm not sure where to submit patches, but here's the simple fix:
@@ -882,7 +882,7 @@
// Full Date/Time
c: function () { // ISO-8601 date.
- return 'Y-m-d\\Th:i:sP'.replace(formatChr, formatChrCb);
+ return 'Y-m-d\\TH:i:sP'.replace(formatChr, formatChrCb);
|