Jump to content

dalecosp

Members
  • Posts

    471
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by dalecosp

  1. Typically the question is answerable by something like, "how much traffic do you receive". Keep in mind that CTR --- "Click Through Ratio" is often given on a per thousand impression basis. And that CTR's are typically pretty low.....
  2. If you are doing this for payment, beware of "feeping creaturism" ... (feature creep) ... try and get all expectations written down and "signed off" on ... even with a signature (I do realize you said this is your father ... I would assume if it's a personal favor for him, the signature wouldn't be necessary ... but even then it's not the MOST terrible idea ). Hear here! I'd also add that once you have some requirements, you might look at "OOB" solutions ... could this be done with Wordpress ...? Drupal? PHP Nuke? A framework, like Laravel/Symfony?
  3. What is in $locale ? //debug print_r($locale);exit; if $locale['mon_decimal_point'] is set correctly, then $value must be null ... that's a bigger problem than a simple implode() call....
  4. What he said ... I find PHP much easier than JS as well. But JS appears to be moving to the forefront of web tech ... almost every company needs UI/JS people, whereas the backend may be PHP, Ruby, Python, C/C#/.NET ... sheesh, I even saw an ad for a CF developer inside a fairly large company lately... Welcome to the board
  5. It is indeed, as ginerjm says, a JS error. It's caused by this line: if (embeds[embedid].indexOf("rapidplayer")== iframe_ad)Fairly simple observation; you have a JS function that doesn't define *anything* prior to starting its work. What to do about it? That's more difficult, and, again, this forum is about PHP (although I'd suggest doing something like defining "embeds" in your function ...)
  6. I'm not sure about JS slider, but in working with sliders and images in general I've found Joe Lencioni's SLIR to be quite helpful: https://github.com/lencioni/SLIR I use to source the JPG's for our carousels prior to them getting hold of the image; as the image widths are all constrained by SLIR, the carousels tend to play nicer with various sized images. Hope this helps,
  7. The best people to ask would be, not surprisingly, the Bootstrap developers ;-) I would suggest that it could be for backwards compatibility, as you note, or a sort of "laziness". Keep in mind that time equals money in business, at least ... it's not uncommon at all to see working software ship with "antiquated" code
  8. echo "<img src='000000-001000".$row['I_ID'].".".$row['I_TYPE']."' />";??
  9. Don't know your Windows version, but something like this should do the trick. Run a "Command Prompt" as Administrator. (If you can find a shortcut to the Command Prompt, RIGHT-click and choose "Run as Administrator"). The Administrator Command Prompt should put you in the system32 directory, and the prompt should look like this: c:\windows\system32> At the prompt, type "notepad drivers/etc/hosts", and add the line noted in the S.O. post to your HOSTS file. Save the file, and then try the command "ping localhost" at the prompt.
  10. Well, I had an idea and then realized it was pretty stupid, so I erased that. At this point, I'd have to suspect per-user memory limits? Could be PAM config, ulimit from shell settings, limits.conf for some distros ....
  11. Oh, but I do, because I've no idea how many rules the operators will want to add (so I guess "complexer" than this is something of a given). The point is that I'm writing generic PHP to handle as many rules as they want to create. Since the system will have to remember these rules, a DB seems better than a text file, no? I'm making some progress. I'll update you if I discover anything remarkable. Thanks again for your help!
  12. Thank you, Ignace. I want the rules to be introduced into the system via the UI. An example rule might be: IF product_make = "Ford" and seller_id = 12345 THEN MODIFY product_category TO 'Truck' OR IF product_make = "Google" and product_model = "Glass" THEN UNSET product_color I'm getting a handle on what I *think* I need to do; I'm just not sure if I'm doing it The Best Way. The reading I've done this morning has been helpful, at least, in terms of inspiration, if not actually learning anything (didn't sleep *too* well last evening, alas)....
  13. Welcome, indeed! It's nice to have you here TrickyInt, your English is *very* good; there are plenty of people (well, in the USA anyway), who probably don't type it as well as you do. I only see three things that are worth mentioning: "kept", not "keept" (but it was understandable, nonetheless... "keept" does have a Scandanavian sound to it ... ) "grammar", not "gramma" (although some people do have grandmothers who make mistakes ) I think you mean "I'm hoping the questions I will ask are not too stupid." And they aren't. The dumbest questions are the ones you don't ask. Thanks you. But is it really young to start programming, at the age of 15? I don't think so; just don't let it take over your entire life ;-)
  14. Thank you very much for your reply. I suppose you have me. I don't *know* that this system would have to learn on its own (other parts of the system that are currently in existence I tend to view that way, though). Essentially what I have is this: The system is in production and mostly automated, but the "Verify" stage combines human intervention and automation. Obviously we'd like to decrease the amount of human intervention required. What is desired is for the humans to be able to put "rules" into the system without knowledge of code, and have the system process the data flow using said rules without further human interaction. So, the system would have to store these rules (DB, no issues there), but I'm not too sure about the overall design and implementation of this idea. What would you call this? I'm not sure what to study ;-)
  15. I'm wanting to do is some lightly dynamic rules processing; an engine receives a widget, examines the widget properties, scans its own ruleset and changes widget properties according to the logic in the rule statement. Does this sound like an inference engine? Does anyone have experience with, suggested reading, or other tidbits to share about such things in PHP?
  16. You'll need a flag in the GET string. In product_listings.php, check for the existence of the flag and the proper value; if it's set properly, use $totalresult in the while clause instead of $result.....
  17. Possibly some light on this here: http://stackoverflow.com/questions/8445965 What about z-indexing?
  18. I'm fighting with this right now also; I'd really like to avoid keyup() ... Wondering if setting a timer after keyup() is the solution... have you tried to make "onchange" work instead?
  19. Assuming a couple of things here: 1. No important data is in the session prior to login that cannot be "re-created" afterwards, and: 2. The "SSL server" is the same physical machine as the non-SSL server and uses the same storage mechanism for $_SESSION data. If both of these are true, you can start a new session on the HTTPS login page and then pass the session ID to the non-SSL pages via GET: session_start(); //start a session // do ... whatever your login stuff is .. $authorized = my_auth_function($user,$pass); if ($authorized == 1) { $sid = session_id(); header("location: http://mysite.com/index.php?s=$sid"); }
  20. I've had good luck with the PHPExcel package for this sort of thing. Brief example: include "includes/PHPExcel.php"; $template_file="includes/Load_Form.xlt"; $objPHPExcel = PHPExcel_IOFactory::load($template_file); $dater=date("m/d/Y"); $objPHPExcel->getProperties() ->setCreator("Foo.com") ->setLastModifiedBy("Foo.com/excel.php") ->setTitle("Foo.com Sample Inventory") ->setSubject("Products for Sale") ->setDescription("This is all data on products on FOO.com"); $objPHPExcel->setActiveSheetIndex(0); // first sheet in the active sheet $objPHPExcel->getActiveSheet()->getPageSetup()->setFitToHeight(1); $objPHPExcel->getActiveSheet()->getPageSetup()->setFitToWidth(1); /* Looping structure for data dump */ $sheetrow=6; // Set header cell rows $objValidatin = $objPHPExcel->getActiveSheet()->getCell('A6')->getDataValidation(); $objValidatin->setType( PHPExcel_Cell_DataValidation::TYPE_LIST ); $objValidatin->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION ); $objValidatin->setAllowBlank(false); //blah, blah ..... //some kind of loop around this $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $sheetrow, "Products for Sale"); $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $sheetrow, $category); $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $sheetrow, $brandname); $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $sheetrow, str_replace($bad_char_list,$repl_char_list,$title)); $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $sheetrow, str_replace("\n",'',nl2br(str_replace($bad_char_list,$repl_char_list,$description)))); $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(5, $sheetrow, $price); $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(6, $sheetrow, urldecode($postcurrency)); $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(7, $sheetrow, urldecode($condition)); $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(8, $sheetrow, urldecode($product_type)); Made life pretty easy where "Excel" is concerned.
  21. The do-while version: $rolled = false; do { $roll = rand(0,6); if ($roll == 6) { echo 'You rolled a six! You Win!'; $rolled=true; } else { echo "You Lose! You rolled a $roll"; } } while ($rolled==false);
  22. Set a flag. $rolled = false; while (!$rolled) { $roll = rand(0,6); if ($roll == 6) { echo 'You rolled a six! You Win!'; $rolled=true; } else { echo "You Lose! You rolled a $roll"; } }
  23. Possibly the simplest thing to do would be add a line like: require_once("FrontControllerPRESTO.php"); to the file "FrontControllerORG.PHP". Of course, that might not work; it depends on the contents of the files. But it does accomplish a "merge", more or less, in general terms.
×
×
  • Create New...

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.