2,113 Posted Topics
Re: Just to support rproffitt's, on Ubuntu 16.04 it redirects to 127::1: ยป ping -c 3 0.0.0.0 PING 0.0.0.0 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.055 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.029 ms 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.048 ms --- 0.0.0.0 ping … | |
Re: Hi, you can use a `for()` loop and the assignment operator `*=`, for example: <?php function _sum($start_balance = 0, $stop = 1, $roi = 1) { for($i = 0, $sum = $start_balance * $roi; $i < $stop - 1; $sum *= $roi, $i++) { } return $sum; } print _sum(2, … ![]() | |
![]() | Re: Hi all! In addition: the aim is to be able to chain the methods while setting? ![]() |
Re: Also try Meld, it should work also on Windows: http://meldmerge.org/ | |
Re: Hi, usually you define which column (or columns) mark a row as a duplicate and set a unique key index, so you have to alter your table schema. Once this is done add `IGNORE` to your insert query: INSERT IGNORE into excel(excel_name, excel_email) values('name', 'email@address'); Then use: $affected = mysqli_affected_rows($connect); … | |
Re: Hi, in practice, your goal is to dynamically alter the crontab file? Or you're talking about something else? | |
Re: **@UI** Something *similar* and probably more sane exists, see https://bountify.co/ There you can see each solution, unless the parts decide to use private messages. It works like this: * the requester sets a bounty, the range goes from 1 to 100 USD (before it allowed up to 500 USD) and … | |
Re: Hi, you can create DOM nodes, see: * https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement As example: <button id="button">Add</button> <div id="box"></div> <script type="text/javascript"> var btn = document.getElementById('button'); var box = document.getElementById('box'); btn.addEventListener('click', function(event) { event.preventDefault(); // create elements let child_img = document.createElement('img'); let div1 = document.createElement('div'); let div1_text = document.createTextNode('$87.03'); let div2 = document.createElement('div'); let div2_text … | |
Re: I would say there are many drawbacks with shared hostings. What do you need it for? Personally I try to avoid them. Once I was asked to find why a specific website at a specific hour stopped working, after some research I saw that MySQL had `max_user_connections` & `max_connections` set … ![]() | |
Re: Just a note: if you are trying to use [InstagramCrawler](https://github.com/iammrhelo/InstagramCrawler) then the errors says it does not find the [`geckodriver`](https://github.com/mozilla/geckodriver) which is included in one of the two required packages installed throught the [`pip` command](https://pip.pypa.io/en/stable/) at the bottom of the GitHub page: pip install -r requirements.txt Which in practice are: … | |
Re: Hi, your question is very vague. Can you clarify the exact issue? | |
![]() | Re: **@Kurk** Hi, you could compare proxy servers with VPN, but this thread topic is about web servers so, if you want to explain better your issue, you should create a new thread. Regarding the second question, the answer is no, or probably: unrelated. |
Re: Hi, you are trying to iterate the same result set two times: on line 28 and 106. On line 28 you get the first row, so if the query returns only one, you don't get anything when you call `mysqli_fetch_assoc()` again on line 106. You can use `$User` otherwise, if … | |
Re: Hi, it can depend on the path of the files, for example: $xls = "Sealing Report/{$date}/sealing_production.xls"; $xls1 = "Sealing Report/{$date}/sealing_assembly.xls"; the path is relative to the script position, so if the files are in the same directory of the main index.php, then change them to: $xls = FCPATH . "Sealing … | |
Re: Hi, if your target is worldwide, then provide an English version of the site: not only of the contents, but also of the links. See this for example: http://iraniantranslate.com/%D8%AF%D8%B1%D8%A8%D8%A7%D8%B1%D9%87-%D9%85%D8%A7/ which on the browser bar displays `http://iraniantranslate.com/ุฏุฑุจุงุฑู-ู ุง/`, but if I use the browser option *Copy link address* then I get the … | |
Re: > I found your Facebook in #1 position with web design jakarta. advance web studio I also found Daniweb in 4th position with those keywords :D > What other things that I missed ? When using Google, keep in mind the [bubble](https://en.wikipedia.org/wiki/Filter_bubble) | |
Re: Hi, you can use plain javascript: // variables var buttons = document.getElementsByClassName('btn_colors'); var numbers = document.querySelectorAll('.column > div'); var current_color = document.getElementById('green').getAttribute('data-color'); // listener for button clicks for (let i = 0, c = buttons.length; i < c; i++) buttons[i].addEventListener('click', set_color, { passive: false }); // listener for number cells … | |
Re: Hi, I see this happens on Linux Chromium too, here's a demo: https://jsfiddle.net/tzd1gyjf/ Looking at the bug list it seems to be an intended behaviour: * https://bugs.chromium.org/p/chromium/issues/detail?id=442128&can=1&q=component%3AUI%3ENotifications%20rtl&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified But it still does not explain how the FB notification looks so different. | |
Re: Hi, if you expect only one single row from the query, then instead of: $result = $this -> global_model -> query($query) -> result(); Use `row()`: $result = $this -> global_model -> query($query) -> row(); So you can do: echo $result->idmsul; Otherwise use a loop. See the documentation at: * https://codeigniter.com/user_guide/database/results.html#result-rows | |
Re: Hi, if you don't want to allow duplicates then set a [unique constraint to the brand column,](https://dev.mysql.com/doc/refman/5.7/en/constraint-primary-key.html) and then use `INSERT IGNORE ...`, `INSERT ... ON DUPLICATE KEY UPDATE ...` or a regular update query. An example: create table `brands` ( `id` int unsigned auto_increment primary key, `brand` varchar(100) unique … | |
Re: > Seen that message many times, never seen a solution. Seen that message many times, never seen a solution. ![]() | |
Re: Hi, the AJAX request seems fine and the server side too. It could be a mistype, I see in the form you set `tittle` with two Ts, are you sure it's the same in the database table? $article->tittle = $tittle; If that's okay, see if Laravel error log helps. | |
Re: As example: -- table definition CREATE TABLE `numbers` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `b1` tinyint(3) unsigned DEFAULT NULL, `b2` tinyint(3) unsigned DEFAULT NULL, `b3` tinyint(3) unsigned DEFAULT NULL, `b4` tinyint(3) unsigned DEFAULT NULL, `b5` tinyint(3) unsigned DEFAULT NULL, `b6` tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB … | |
Re: **@Gi** What do you mean by *multiple texts line per line?* Can you share an example? Also, it would be a lot better if you start your own new thread. | |
Re: As far as I know, years ago it was allowed and then removed. So that's great, now I can annoy people with bold statements! :D | |
Re: You can also try by email https://www.daniweb.com/welcome/contact just keep in mind timezones. | |
Re: Keep in mind also that a lack of vitamin B favors insomnia. As thyroid issues like hyperthyroidism. | |
Re: I remember it was used to reduce overheating issues. I cannot find the article anymore but search for *Dynamic Thermal Management techniques.* | |
Re: Hi, here you can see the database schema: * http://doc.prestashop.com/display/PS14/Fundamentals And you can also download the MySQL Workbench file. Maybe you can try something like this: SELECT customer.id_customer, customer.firstname, customer.lastname, orders.id_order, order_history.date_add FROM customer, orders, order_history WHERE customer.id_customer = ? AND customer.id_customer = orders.id_customer AND orders.id_order = order_history.id_order ORDER BY … | |
Re: Hi, that's a [JSONP](https://en.wikipedia.org/wiki/JSONP) response, so in order to process this through PHP you need to remove the callback function that wraps the JSON data, for example: callback({JSON DATA}); At this point you can remove it from the string: <?php $jsonp = 'callback({"name": "micheal"});'; $callb = 'callback'; // to remove … | |
Re: Embedded contens like YouTube and Vimeo are served by them directly to the client, your page just sends the resource link, then the client opens a connection to the resource. You can see this through the developer console in Chrome: select the Network tab, hit reload for your page and … | |
Re: Hmm, what kind of input do you expect in `$_POST['image']`? Because `imagecreatefromjpeg()` expects a string to be used like a file name. You are submitting `$_POST['image']` instead, which it appears to be a base64 encoded string, and from the previous PHP code, it seems it should be a list of … | |
Re: **@Mohd_9** Hi, it could be the power supply or a RAM module. Do you hear any beeps when turning on? And if yes, how many? Each BIOS has is own codes and can give an idea of what is wrong, for example Intel's: * https://www.intel.com/content/www/us/en/support/boards-and-kits/000005473.html Also, are the fans spinning? … | |
Re: IMHO it's best printing the name on the usb case and let the client reuse the drive. Otherwise you have to change the firmware of the usb to act like a CD, see if this helps: https://superuser.com/a/822578 | |
Re: Hi, which Windows version are you using? Version 7 and previous, for example, miss this procedure. | |
Re: Just a note! > I was just curious to learn why anyone would bother using the long version if the short version can do the same job. file_get_contents() using a URL is not guaranteed to work in all situations, as it depends on a configuration setting to allow it to … ![]() | |
Re: > Have you guys ever thought of building it ? It would sell well. Hmm, that would infringe YouTube [terms of services (ToS)](https://www.youtube.com/t/terms) I suggest you to not try to monetize it, however, if you want to investigate it look at **youtube-dl** project on GitHub: * http://rg3.github.io/youtube-dl/ I use it … | |
Re: > Can you change excel sheet and make it importable into mysql tables? Yes, it can be done. You can convert it to CSV and the use `fgetcsv()` and prepared statements. Search for PHPExcel or similar. If you use MariaDB, a MySQL fork, then you can use the ODBC connect … | |
Re: It can, in order to work the service should return status code [307](https://httpstatuses.com/307) or [308](https://httpstatuses.com/308), as example: <?php header('HTTP/1.1 307 TEMPORARY REDIRECT'); header('Location: http://destination.tld/post.php'); exit; | |
Re: Hello, maybe you want to use something like this: #!/usr/bin/env ruby h = [{"gate_pass_type_id"=>2, "tag"=>0, "total"=>2000}, {"gate_pass_type_id"=>125, "tag"=>0, "total"=>300}, {"gate_pass_type_id"=>661, "tag"=>0, "total"=>750}, {"gate_pass_type_id"=>661, "tag"=>2, "total"=>100}] n = Hash.new h.each do |k| gate = k.values[0] tag = k.values[1] total = k.values[2] if(n.has_key?(gate) == true) n[gate] = n[gate].merge({ tag => total }) … | |
Re: I see you can get data also as xml or as json, this last seems to be malformed, so here's an example based on xml output: <?php $url = 'http://chartapi.finance.yahoo.com/instrument/1.0/GOOG/chartdata;type=quote;range=5d/xml/'; $f = file_get_contents($url); $xml = simplexml_load_string($f); # print everything print_r($xml); Since you get an object array you can print a … | |
Re: Mostly running, for few hours, 4 times per week, it's my break from everything. About plants, I don't have a garden anymore, but I have a small room with a French window exposed to south, I use it as a small greenhouse, with some plants... last year I grew up … | |
Re: Hi! Are you using PHP-FPM? In such cases the PHP engine can be located into another server and accessed through an IP address. The address is configured in the web server config files and the php.ini file is in the remote server. You can probably use `ini_set()` by including a … | |
Re: Hi davy, the .htaccess seems to be fine, so I have some questions for you: * which web server are you using? * Are you using a virtual host config? * Which is the document root? * What do you expect to get instead of http://localhost/dashboard ? | |
Re: Very wide. Depends on the role and the permissions connected to these credentials. What can be done with them: can you connect, for example, to the internal network through a VPN? It can go from social engineering, requering more access through the stolen account to accessing the network, gathering data, … | |
Re: Just an addition. To test the queries you can try mysqlslap: https://dev.mysql.com/doc/refman/5.7/en/mysqlslap.html | |
Re: It is [smarty.net](http://www.smarty.net/), a template engine. ![]() |
The End.