Jump to content

requinix

Administrators
  • Content Count

    11,068
  • Joined

  • Last visited

  • Days Won

    209

Everything posted by requinix

  1. Your post is missing the part where you explain what you're talking about.
  2. requinix

    Need help deconstructing objects

    "Object"? So you've already decoded the JSON? Well, your code is the one making the decision about which method to call, right? So... your code knows what format the data will come back in. So... the code that calls getSummoner() knows it only has the name to work with, and the code that calls getSummonerByName() knows it has additional information. So... I guess I don't see where the problem is?
  3. requinix

    regex &,

    What have you tried so far?
  4. requinix

    json_encode() function problem

    $data = json_encode(array($rows2));Or construct $rows2 differently, like $rows2 = array(); // add stuff with $rows2[] = ... $data = json_encode($rows2);
  5. No experience at all. It's just that reading code is easier than writing it. You may be able to get away with putting the . In general the placement shouldn't matter.
  6. requinix

    Summation of array

    You're executing a query to get those numbers, right? What's the query? I bet we could change it a bit to return exactly the results you want.
  7. So I found the player and had it decompiled. The part where it deals with the config XML looks like if (_root.xml != undefined) { _xml.load(_root.xml); } else { _xml.load("config.xml"); } _xml.onload = function (success) { var _local3 = 0; while (_local3 < this.firstchild.childnodes.length) { if (this.firstchild.childnodes[_local3].nodetype == 1) { if (this.firstchild.childnodes[_local3].nodename != "play_list") { o[this.firstchild.childnodes[_local3].nodename] = this.firstchild.childnodes[_local3].firstchild.nodevalue; } else { o[this.firstchild.childnodes[_local3].nodename] = new array(); var _local4 = 0; while (_local4 < this.firstchild.childnodes[_local3].childnodes.length) { if (this.firstchild.childnodes[_local3].childnodes[_local4].nodetype == 1) { o[this.firstchild.childnodes[_local3].nodename].push(this.firstchild.childnodes[_local3].childnodes[_local4].firstchild.nodevalue); } _local4++; } } } _local3++; }The part where it deals with "this.firstchild" is where it fails: by inserting the processing block, the first child is no longer the and the code starts to fall apart. tl;dr: the player reads the XML poorly.
  8. Then it seems like the player doesn't like the I'd say leave it out. Really, what's the harm in people looking at the XML? It's not like you can hide it from them anyways, and neither are you linking to it for a person to check...
  9. Looking at your other thread, this XML is going to a Flash player right? So what "page" is going blank? Is it the page where you try to load this XML in your browser directly? Do you, in fact, have a /player.xsl that will transform the XML into something readable?
  10. requinix

    Summation of array

    Why are the 16/07/14 values being merged into 17/07/14's? Why choose 17's date as the final key and not 16's?
  11. Again: two separate queries. Which means two separate calls to your Paginator function. Then when someone moves to the next page of one set of results, you don't even have to bother with the other query. And with the space you save you could actually fit twice the results.
  12. requinix

    Threaded forum algorithm

    If you don't mind I'm moving this to the MySQL forum as you're asking more about database design than coding. Yes, there will be a lot of rows, but databases are designed for this sort of thing. As long as you're using good normalization practices and proper indexes, everything will perform smoothly.
  13. requinix

    Threaded forum algorithm

    Database: learn about adjacency list (requires a parent->child relationship) versus nested sets (requires... something more complex). They have complementary advantages and disadvantages - meaning one's strength is the other's weakness. Post rating: require a login and track every user's rating so you'll know if they've voted before.
  14. requinix

    php code for apptitude test based website

    That's just a basic quiz. There's tons of code out there for that kind of thing. Unless you're looking to hire somebody?
  15. requinix

    PHP Print to Email attachment

    Focus on giving the user a PDF. If they want to print it then they can. Three basic options: a) Generate the HTML and then turn that into a PDF - you'll need some sort of HTML->PDF converter, b) Construct the PDF manually in code - you'll need some sort of PHP PDF library, or c) If it makes sense, use FPDF to fill in a PDF "template" - you'll need some sort of PHP FPDF library
  16. You can't do a UNION when the columns mismatch. Do two separate queries and get two separate counts. You can sum the counts and display the results all together if you want, but IMO it would make more sense to show the two resultsets separately: one set of news results, one set of page results.
  17. Looks custom - no branding that I can see. Even if it was some commercial solution then I wouldn't recommend it based on the HTML source of the pages: it's horrible. I can't imagine the backend being any nicer.
  18. requinix

    Parse a json with arrays inside it

    You don't have to do any parsing. It's done for you. If you're looking to get the Contig2 value, that'd be .iterations[0].
  19. requinix

    Include code works on one page but not another

    It's fine to be offended... if I'm wrong. function banner() { } ; b = new banner() ; n = 0 b[n++]= "<A target='_blank' HREF='http://flowernursery.co.uk'><IMG SRC='random-ads/flower-nursery-banner-01.png' border='0' title='Flower Nursery' >" b[n++]= "<A target='_blank' HREF='http://greatviewlandscapes.com'><IMG SRC='random-ads/greatviewlandscapes-banner.png' border='0' title='Great View Landscapes' >" b[n++]= "<A target='_blank' HREF='http://egatemarket.com'><IMG SRC='random-ads/egm-ad-728x90-banner.png' border='0' title='eGate Market' >" b[n++]= "<A target='_blank' HREF='http://divinegardensandlandscapes.com'><IMG SRC='random-ads/divine-banner-01.png' border='0' title='Divine Gardens & Landscapes' >" b[n++]= "<A target='_blank' HREF='http://minecraftconsolecrafting.comxa.com'><IMG SRC='random-ads/mcc-banner-01.png' border='0' title='MCC Crafting Minecraft PS3 Edition' >" <img border="0" src="random-ads/egm-ad-160x600-video-games.png" alt="Buy & Sell New & Used Video Games For FREE!" title="Buy & Sell New & Used Video Games For FREE!" vspace="5" width="160" height="600">What's this? I was right? Slashes. Add them. function banner() { } ; b = new banner() ; n = 0 b[n++]= "<A target='_blank' HREF='http://flowernursery.co.uk'><IMG SRC='/random-ads/flower-nursery-banner-01.png' border='0' title='Flower Nursery' >" b[n++]= "<A target='_blank' HREF='http://greatviewlandscapes.com'><IMG SRC='/random-ads/greatviewlandscapes-banner.png' border='0' title='Great View Landscapes' >" b[n++]= "<A target='_blank' HREF='http://egatemarket.com'><IMG SRC='/random-ads/egm-ad-728x90-banner.png' border='0' title='eGate Market' >" b[n++]= "<A target='_blank' HREF='http://divinegardensandlandscapes.com'><IMG SRC='/random-ads/divine-banner-01.png' border='0' title='Divine Gardens & Landscapes' >" b[n++]= "<A target='_blank' HREF='http://minecraftconsolecrafting.comxa.com'><IMG SRC='/random-ads/mcc-banner-01.png' border='0' title='MCC Crafting Minecraft PS3 Edition' >" <img border="0" src="/random-ads/egm-ad-160x600-video-games.png" alt="Buy & Sell New & Used Video Games For FREE!" title="Buy & Sell New & Used Video Games For FREE!" vspace="5" width="160" height="600"> [edit] Oh, and spoiler: I lied. I did check first. But somehow I don't think that's the point here. So don't go getting all offended that someone didn't spend a lot of time on your problem and then ignore what they say, because if they turn out to be right, they're not going to be the one looking bad for it.
  20. You're not going to spam us, right? Then links are fine.
  21. requinix

    Include code works on one page but not another

    If you don't mind, I'm going to not look at those pages and instead make a guess. The URLs to those images. Are you using relative paths? Paths that don't start with a slash like "topic/289806-include-code-works-on-one-page-but-not-another/". They're relative to the current "directory" of the page. With the second and third URLs the browser will go looking for "/sections/path/to/image" when it should have gone looking for "/path/to/image". Put a slash at the beginning of the URLs.
  22. requinix

    PHP Syntax Error - Need help to understand

    Yeah. See how "$movie_title" is messed up? I'd make an educated guess that the next character after the "$i" was a less-than - you know, the symbol that marks the beginning of an HTML tag? The blog and/or author and/or code plugin whatever is stupid with HTML to the point of leaving some HTML markup unescaped and "sanitizing" other. Looks like it should read for ($i = 0; $i < count($trs_we_want); $i++) { // everything from the < $the_tds = $trs_we_want[$i]->getElementsByTagName('td'); // to the next > was removed
  23. requinix

    jquery $.ajax Data URI scheme

    That's right: Java. Java and Javascript are two completely different things. Inline content sucks. Can't you just use a time-limited URL? 1. JS: Do the POST but now you only get a temporary token 2. Java: Store that token in the database along with a reference to the PDF - this is a good opportunity to log views too 3. JS: Construct a specific URL containing that token ("/path/to/service?token=123abc") and embed it 4. Java: Take that token, check that it's still valid, and if so output the PDF
  24. requinix

    Parse a json with arrays inside it

    When you did the AJAX stuff you had the option to specify the type of data to return. Tell jQuery to use JSON. Then you'll get an object in your callback function with .status and .job_status and such.
  25. requinix

    key value pairing from string

    Again: is this in Javascript? The most straightforward method would be to enumerate all the properties of window before and after that code is executed, then determine what got added.
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.