97 Topics

Member Avatar for Aeonix

$stmt = $dbconn->prepare("SELECT * FROM `members` WHERE username=? AND password=?"); $stmt->bind_param("ss", $username, $password); Is what I have. Database is connected etc. How can I set variable called `$dbresult` with array of SQL result? I don't want to set individual variables. I really need an entire array as answer. There's couple …

Member Avatar for jkon
0
3K
Member Avatar for Aeonix

`<hat type="tin-foil" mode="on">` What does Google have from serving us with Google Fonts? Typical Google could start sending up custom JavaScript from JavaScript repository. But what about fonts? What does Google get from it? You can't tell me they just have well-doing spree and are sharing to help. Corporations are …

Member Avatar for cereal
0
474
Member Avatar for Aeonix

Time for a real challenge. https://jsfiddle.net/u6n3dq9m/4/ Is what I've got. I'd like the red portition to spread over the div, and fill entire height, while You can't/Tried but failed: - Use `overflow: hidden`, because it doesn't work (I thought it will render some overflow and stuff, I don't know). - …

Member Avatar for Aeonix
1
441
Member Avatar for Aeonix

So I and rproffitt both [downvoted a bot](https://www.daniweb.com/programming/web-development/threads/506750/content-of-child-escapes-parent-even-in-overflow-none#post2212494). I went over to [it's profile](https://www.daniweb.com/members/1128626/lam-bang), we have apparently total power of 7 in reputation decrease. I expected `-7` in reputation, instead it has `7` reputation. That minus is pretty important. It also says `Lam Bang (7)` instead of `Lam Bang (-7)`. …

Member Avatar for Dani
1
466
Member Avatar for Aeonix

I deleted my recently made post in: https://www.daniweb.com/hardware-and-software/information-security/threads/506745/why-does-google-offer-free-fonts-to-use-online Now when I'm in "Articles I'm Watching", it says about it: "0 votes; 0 replies; 25 views", despite thread having 7 replies. Edit 1: Also title got encoded and not decoded: `After deleting of a recent post, &quot;Articles I'm Watching&quot; shows 0 …

Member Avatar for Dani
0
357
Member Avatar for Aeonix

https://jsfiddle.net/n0260s1L/3/ Is what I have. Text of `div.summary` goes outside of it's planned content. Even when told not to. The only solution to this is `overflow: none;` in "super-parent" `div.mail`. But it ignores: `text-overflow: ellipsis;`. How can I limit content of this div (`div.summary`) **and** have `text-overflow: ellipsis` working at …

Member Avatar for Aeonix
0
652
Member Avatar for Aeonix

I've been Googling this one, and I've come across solutions, but they don't seem to work for me. The code is as follows: <?php $name1 = "Jack Random"; // true $name2 = "JackRandom"; // true $name3 = "Jack;Random"; // false $name4 = "JackRand;om"; // false // Accept only A-Z, a-z, …

Member Avatar for pritaeas
0
391
Member Avatar for Aeonix

Each years our computers are getting faster, games more demanding, which fuels better computers. We develop more memory in lesser spaces. We develop processors that calculate more than super-computers 20 years back. We had 56k modems, 1M, 2M, 5M networking, just recently there is possibility to get 1.5G at your …

Member Avatar for rubberman
0
347
Member Avatar for Aeonix

https://jsfiddle.net/rw2894fe/2/ I don't need to explain the issue, it's visible the second you look at it. Red anchors seem to have "unexplained" padding on bottom and right side. Removing it with "padding: 0; margin: 0;" doesn't affect it. Could someone tell me how to remove that unwanted padding and make …

Member Avatar for Aeonix
0
285
Member Avatar for Aeonix

Let's assume couple things. I created a nice website based on compiled program language (Node.js, ASP, Java, C#, whatever). It works nicely. But I'd like to get an estimate on how much hardware I'd need. So I could run 1 hosting, and it would result in "this" amount of impact …

Member Avatar for AssertNull
0
416
Member Avatar for Aeonix

I have two items that look like this span.left { float: left; display: inline-block; /* Take space neccessary */ } span.middle { /* Take free space only, do not push unless allowed */ /* Contains couple lines of text */ text-overflow: ellipsis; overflow-x: hidden; white-space: nowrap; } span.right { /* …

Member Avatar for rproffitt
0
344
Member Avatar for Aeonix

https://jsfiddle.net/c9jmjcy0/3/ The reason that it doesn't work is because for some reason `<a>` denies wrapping `<div>`. Probably specification. The only solution is to wrap it around other item. Do we have any other item that would say "it's a link/dropdown". There's also `<button>`. But it doesn't wrap it either, it …

Member Avatar for Aeonix
0
302
Member Avatar for Aeonix

I already tried couple solution from Google, but some of them didn't work (at all), others resulted in weird bug, where HTML page was loaded, but assets (CSS and images) didn't. Other times there were too many redirects and page freaked out. I have account on Cloud Flare, but both …

Member Avatar for Dani
0
497
Member Avatar for Aeonix

Imagine a mailbox. You're about to write to a friend. From staff perspective, someone wants to email Dani, her mail is dani@daniweb.com, but has her in contacts list. You type in "Da", and little tool-tip informs you that it knows this mail, tooltip shows her full name "Dani" and her …

Member Avatar for Dani
0
328
Member Avatar for Aeonix

<?php if (!defined("include")) { header ($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404); die; } I want to include this file, as if it's not included, it should send browser `404 Not Found` and end executing script (without true and 404 doesn't work either). While Opera fools itself, Firefox doesn't. It shows …

Member Avatar for Aeonix
0
346
Member Avatar for Aeonix

At the end of the day, I end up in: `menu div#memberArea div#dropdown-trigger div#dropdown-content div#form div#authSubmitButtons input#authRegisterButton`. And now many people recommend shortening it down, sure! But as soon as I drop out elements I don't feel like the code explains itself as good. This very long nasty string, as …

Member Avatar for diafol
0
308
Member Avatar for Aeonix

https://jsfiddle.net/mvuy7q60/ Using JavaScript (and jQuery). How can I assure that there's only one line shown (instead of entire content of item), and if it's longer than one line, end first line on "..."? Something like this: https://jsfiddle.net/tt9psxz3/

Member Avatar for Dani
0
292
Member Avatar for Aeonix

No jQuery! This is script that I got from [Chris Buttery](http://www.chrisbuttery.com/articles/fade-in-fade-out-with-javascript/) website. Or at least part of it: function fadeOut(el){ el.style.opacity = 1; (function fade() { if ((el.style.opacity -= .05) < 0) { el.style.display = "none"; } else { requestAnimationFrame(fade); } })(); } The problem is that when I run …

Member Avatar for ryantroop
0
496
Member Avatar for Aeonix

Mike's been a power-force and recent no-show. But I just looked up his profile, he hasn't posted since June 2015... did something happen? Or do people disappear on DaniWeb everyday? https://www.daniweb.com/members/787121/mike-2000-17 I know we're not his parents, he's strong independant viking but do you just forget people like that?

Member Avatar for Reverend Jim
0
527
Member Avatar for Aeonix

I hate sharing my code, but I don't have any other option. I tried everything to prevent it, but I need to find out what's wrong about it. http://pastebin.com/zMjne7P0 User focusses out input field (line 83)(I tried inputting ";" for tests, which should return error, as it's invalid name). And …

Member Avatar for diafol
0
598
Member Avatar for Aeonix

$(document).ready(function () { var a, b, c d = new RegExp("/^[a-z0-9]*$/"), e = true, f = [ "g": false, "h": false, "i": false, "j": false, "k": false ], I changed names of variables for reasons. *Uncaught SyntaxError: Unexpected token :* Line 7. Which is `"g": false,`. Am I missing something?

Member Avatar for diafol
0
1K
Member Avatar for Aeonix

`exampleArray.push("this is an item");` I a thing. But there are also 10 other items within. So I never truly know where that item is (which enumeration). Is there a way of saying `exampleArray.delete("this is an item");` where it will remove item with "that" content? (JavaScript question)

Member Avatar for diafol
0
228
Member Avatar for Aeonix

I don't know if I'm even posting in the right section. When I open a new tab (after closing all other tabs) and I input address of project site. Elements pops out of parent element (it's 50% of bottom is visible, while rest is through the top of the window). …

Member Avatar for diafol
0
262
Member Avatar for Aeonix

`<input id="aaa" onclick="scrollTo('registerBox'); return false;" formaction="register.php" type="submit" value="Register" />` If JavaScript is enabled (which it is, and it's working on other functions and triggers). Shouldn't it execute `scrollTo("registerBox");` and don't do anything (`return false;`). Am I missing something? I don't want it to `formaction` if JavaScript is enabled.

Member Avatar for gentlemedia
0
373
Member Avatar for Aeonix

I'm on latest Kubuntu. Here I am with English US keyboard input. But I'd like to install say Norwegian, Polish, Japanese, whatever. I decide the easiest step. Which is to search "input". "Input Method" sounds promising. I run it. Then I get window. That says: Current configuration for the input …

Member Avatar for Aeonix
0
2K
Member Avatar for Aeonix

<?php $not_an_int = "sa';';';'sd12340asd"; $actual_int = "12341234"; var_dump(is_int((int)$not_an_int)); echo "<br />"; var_dump(is_int((int)$actual_int)); echo "<br />"; echo "<br />"; var_dump(is_int($not_an_int)); echo "<br />"; var_dump(is_int($actual_int)); ?> Returns: true true false false Without casting, real integer is seen as false. With casting, a non-integer is seen as true. What would be a real …

Member Avatar for diafol
0
328
Member Avatar for Aeonix

Couple statements, couple answers. I don't understand everything. If I'm wrong, correct me, but don't be mean about it. You weren't senior in your first steps either. Some of these are guarranteed wrong, because I want to taunt out the correct answer. Statements: **S1. Assembly works 1 on 1 with …

Member Avatar for Reverend Jim
0
389
Member Avatar for Aeonix

Typical code works like this: `$(...).hover(function () {});`. But it also needs to go away when it's loses it's hover. Is there a shorter way to do that than: `$("#x").hover(function () { troll(); });` `$("#x").mouseout(function () { untroll(); });` I just feel that smart people over at jQuery have thought …

Member Avatar for Aeonix
0
211
Member Avatar for Aeonix

User gives me a `$_POST`, I want to check whether keys (not the values) are there. `$_POST` keys need to be `newemail`, `firstPassword` and `secondPassword`. What I have tried: `if (in_array(array_keys($_POST), array("newemail", "firstPassword", "secondPassword"))) echo "Everything in order".`. How to make it actually work?

Member Avatar for Aeonix
0
242
Member Avatar for Aeonix

I have a machine, I have a hosting with FTP. On my venture I found out about `lftp`. And the instructions are here: http://www.dangibbs.co.uk/journal/ftp-sync-usin-linux Snippet is this: open ftp://username:password@website.com mirror -v --only-newer /home/local/path/ /website.com/public_html/ Do these things still work? Also, how do I loop it? I don't want to spam …

Member Avatar for cereal
0
2K
Member Avatar for Aeonix

(short version of the story) I'm using Kubuntu in BIOS Legacy State as this was the only way I could see USB option in Boot Menu (F12). And it was the only way I could install Kubuntu from USB, from boot. I "burned" USB using OEM Windows 10 and told …

Member Avatar for Aeonix
0
564
Member Avatar for Aeonix

*There's lots of ground ("gaps") missing in-between the background. Beware.* There's that point in time where I'd like to get myself a good trusty hosting. Attempt to start any kind of project, get any community moving. Whatever. Long story short: I'm seeking for a good hosting (VPS/Dedicated, Website+SSL) for "rest …

Member Avatar for ctrls
0
679
Member Avatar for Aeonix

SELECT [SNAP!] FROM topics INNER JOIN members ON topics.author = members.id WHERE topics.parent = [variable from PHP] ORDER BY topics.id DESC LIMIT [variable from PHP], 10 Is what I have in pocket. I'd like to slam `SELECT * FROM forums WHERE id = topics.parent`. While keeping the functionality it already …

Member Avatar for Aeonix
0
238
Member Avatar for Aeonix

SELECT blabla FROM a INNER JOIN b ON a.a = b.b Is what I have. However I'd like to sort the results DESC by ID. I'd like to select last [`variable` x 10] of items sorted by ID DESC. Variable provided by PHP (I'll sort things out, I just need …

Member Avatar for hielo
0
317
Member Avatar for Aeonix

`Unknown column 'topics.id' in 'field list'` `SELECT topics.id topicId,` [...] `topics.id` DOES exist.

Member Avatar for cereal
0
4K
Member Avatar for Aeonix

I don't think it's code-bound, but here's the code: http://pastebin.com/yWJ5qpwN What happens is... I input 2 different passwords, line 22 is for some reason entirely skipped. The script passes every verification, the SQL record is added, and further execution of code happens. User gets logged in and moved to `index.php` …

Member Avatar for cereal
0
253
Member Avatar for Aeonix

I need to create about 1000 users, with random (but normal looking names not "293dsaf81s234" but "Blue Air" (can be random dictionary words)). And I need to generate topics and posts, and many others things. Does anybody know a good way on how to generate dummy content in PHP? What …

Member Avatar for Aeonix
0
167
Member Avatar for Aeonix

$city = "Amersfoort"; if ($stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) { $stmt->bind_param("s", $city); $stmt->execute(); $stmt->bind_result($district); $stmt->fetch(); printf("%s is in district %s\n", $city, $district); $stmt->close(); } This brings many questions: - What is `s` on the line 4? Do I need to bother with that? - What if I …

Member Avatar for diafol
0
239
Member Avatar for Aeonix

`INSERT INTO 'members' ('username', 'password', 'email') VALUES ('axe', 'axe', 'weql')` - `#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''members' ('username', 'password', 'email') VALUES ('axe', 'axe', 'weql')' at line 1`

Member Avatar for cereal
0
161
Member Avatar for Aeonix

I think this is called "foreign key" and "local key" ? I have a table `users`, these users have `rank`. It's an `int`. There is a table named `rank`, this table has field where hexadecimal string is placed `FF0000`. Is there a way to `SELECT * FROM users` and `SELECT …

Member Avatar for Aeonix
0
453
Member Avatar for Aeonix

I'm trying to do something, but it doesn't work out, the primary suspect is incorrect query, but I don't know whether it's correct or not. I could try running it in phpMyAdmin, but then I don't know how these are escaped. The result is: `array(5) { ["current_field"]=> NULL ["field_count"]=> NULL …

Member Avatar for RudyM
0
249
Member Avatar for Aeonix

Link is: `/example.php?id=1`, no space after `1`. if (isset($_GET["id"])) { $id = $_GET["id"]; echo !is_int($_GET["id"]); // yields "1" (true) !!! } Ask me whatever you need. I check to make sure that my system didn't go crazy `!is_int(1)` yields false. So... I don't know... Maybe `$_GET` passes `"1"` instead of …

Member Avatar for cereal
0
275
Member Avatar for Aeonix

Connection is successful. No typo's were made (look below). If read it from top to bottom, some of the tests that I show you will seem stupid. Until you look at the end (still keep reading from top to bottom) and find out that it's one of the indicators. SQL …

Member Avatar for makaijohn9
0
442
Member Avatar for Aeonix

This is element that I'm trying to achieve: http://i.imgur.com/9XmGXkt.png This is "template" of what I have to work with: https://jsfiddle.net/hcgpyutj/ I tried floating, staticing, absoluting, relativizing, tables, transform. I changed file about 10 times and of each situation something went wrong one way or another. I cannot use flexbox. I …

Member Avatar for diafol
0
194
Member Avatar for Aeonix

CSS file: http://pastebin.com/tBvGjhTX HTML file: http://pastebin.com/r5YUTHgp I have a div with following rules: { width: 75%; margin: 5% auto; } Obviously works everywhere except Microsoft Internet Explorer 0.5 to Edge. While in every normal browser, box takes 75% of width and is centered horizontally. But Microsoft be like "screw that", …

Member Avatar for gentlemedia
0
353
Member Avatar for Aeonix

<!-- example --> <html> <head></head> <body> /* Lots of contents, header, etc. <?php if (isset($_GET["id"])) { echo $anexample[$_GET["id"]]["test"]; } ?> </body> </html> There would be links that would say `example.php?id=1` and `id=5` and `id=9`. However I'd like page to rerender just that particular place. Nothing else in page will change. …

Member Avatar for invisal
0
279
Member Avatar for Aeonix

If user issues a query, I would like AJAX to download the result of query into browser so that JavaScript can do the parsing. The results could be around 1MB-5MB (at most, doubt it would get anywhere near 0.1MB), and I would send it from PHP to front-end using JSON, …

Member Avatar for ryantroop
0
304
Member Avatar for Aeonix

Example. I have parent div of 1000px width. I have 4 children divs that each have been told to have "some size" (for example 300px). I would like to put 3 children in first row and then put the fourth in the second row below the 1st child. Something like …

Member Avatar for mblan180131
0
209
Member Avatar for Aeonix

My first problem was. "I have this box, I need this box to be 230px, and I have second box, that needs to take entire space remaining". My solution to this was, `float`. So I floated both boxes, `float: left;` and `float: right`. That looked nice, until I noticed that …

Member Avatar for Aeonix
0
175
Member Avatar for Aeonix

Is there a way to prepare 80GB HDD (SATA) in such way, that it boots from ISO on itself? I'm delivering this to an old grandpa who doesn't know a lot about software (he's electrical genius though). I will create steps on how to get through installation. But I need …

Member Avatar for Itsdigger
0
357

The End.