- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 56
- Posts with Upvotes
- 45
- Upvoting Members
- 26
- Downvotes Received
- 8
- Posts with Downvotes
- 7
- Downvoting Members
- 6
182 Posted Topics
Re: Nice necropost there Mrigank. But if it's already up to see the sun. We use use `int` before `main() {}` because program that malfunctions returns error code other than 0. A program that is successful (a.k.a. ended it's job), `return 0;`, rather than returning string that is overly compilcated, or … | |
$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 … | |
`<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 … | |
Re: I would stream characters one by one into an array, and if letter appears, add 1 next to it, so that array ends up (for `potato`): "p" => 1, "o" => 2, "t" => 1, "a" => 1, "t" => 1 Then look up if there are any values `> … | |
Re: To start things off, it was implemented without my knowing, not that you need to report me to it, it's your site, not mine, but it would be nice if you gave some beforehand warning. And if you did, I didn't notice, so it's my fault then, but then again, … | |
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). - … | |
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)`. … | |
Re: Did he really just link to the assignment and be like "Do this", **seriously**?! Not happening dude, you have to cry nicely. Take a look at my questions for example: - List your attempts - Format your post well - Show them code in readible form - Tell 'em what … | |
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, "Articles I'm Watching" shows 0 … | |
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 … | |
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, … | |
Re: Call me an antagonist. But it's rather suspicious that 6 absolutely new accounts respond to this thread after one another. As these new users have between 1 to 5 posts and aren't really popular. | |
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 … | |
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 … | |
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 … | |
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 { /* … | |
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 … | |
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 … | |
![]() | |
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 … | |
<?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 … | |
Re: <rant> Knowing Google, their spying and fact that they want to put spybox in your network. I'm pretty happy that you can't see the "Pre-Order" button. </rant> As when it comes to the topic, designers are paid to make website beautiful not visible for everybody. When I'm looking at faraway … | |
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 … ![]() | |
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/ | |
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 … | |
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? | |
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 … ![]() | |
$(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? ![]() | |
`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) ![]() | |
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). … ![]() | |
`<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. | |
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 … | |
<?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 … ![]() | |
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 … | |
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 … | |
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? | |
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 … | |
(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 … | |
*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 … | |
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 … | |
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 … | |
`Unknown column 'topics.id' in 'field list'` `SELECT topics.id topicId,` [...] `topics.id` DOES exist. | |
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` … | |
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 … | |
$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 … ![]() | |
`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` | |
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 … | |
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 … ![]() | |
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 … | |
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 … |
The End.