256 Kilobytes

Answers

Type AnswersAsk and answer questions, if that is something that you want to do. Category All Tag All

Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply There are a number of javascript libraries that do this, take a look at this one: https://github.com/canvg/canvg Hash Brown,

There are a number of jav...

Tue, 04 Dec 2018 22:43:32 -0800 1 year ago
🗨
1
🐏
0
👁
153
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply Super simple! In pure Javascript: <script type="text/javascript"> function theKeyPress(e){ var keynum; if(window.event) {... Hash Brown,

Super simple!

Tue, 04 Dec 2018 22:24:29 -0800 1 year ago
🗨
1
🐏
0
👁
218
Profile Photo - Some Guy

Can the "HTML Purifier" library be integrated into Laravel?

Answers in Frameworks | By Some Guy

Published 1 year agoTue, 04 Dec 2018 17:41:12 -0800

Profile Photo - Hash Brown

Last Reply Yes! They do a version of HTML Purifier specifically for Laravel Read more here: https://github.com/mewebstudio/Purifier Hash Brown,

Yes!

Tue, 04 Dec 2018 22:08:03 -0800 1 year ago
🗨
1
🐏
0
👁
110
Profile Photo - Some Guy

[Laravel] Best way to determine an IP address' location?

Answers in Frameworks | By Some Guy

Published 1 year agoTue, 04 Dec 2018 17:42:03 -0800

Profile Photo - Hash Brown

Last Reply You have a couple of possible options. You can use an API like GeoIP. There are people who have kindly coded laravel packages for this, her... Hash Brown,

You have a couple of poss...

Tue, 04 Dec 2018 22:07:18 -0800 1 year ago
🗨
1
🐏
0
👁
111
Profile Photo - Some Guy

Best way to get a user's HTTP referer value within a Laravel project?

Answers in Frameworks | By Some Guy

Published 1 year agoTue, 04 Dec 2018 17:42:28 -0800

Profile Photo - Hash Brown

Last Reply Here you go: Request::server('HTTP_REFERER'). You should check the value is set before doing anything with it, not all requests have a referer... Hash Brown,

Here you go:

Tue, 04 Dec 2018 22:01:23 -0800 1 year ago
🗨
1
🐏
0
👁
94
Profile Photo - Some Guy

Is Xenforo open source?

Answers in Web Development | By Some Guy

Published 1 year agoTue, 04 Dec 2018 17:47:42 -0800

Profile Photo - Hash Brown

Last Reply Hello, No, XenForo is a commercial software, you need to buy licenses and renew that license every year. If you're looking for open source f... Hash Brown,

Hello,

Tue, 04 Dec 2018 21:59:11 -0800 1 year ago
🗨
1
🐏
0
👁
138
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply Yes! in_array() accepts 3 arguments, they are: The string you're looking for. The array you're searching. "strict", whi... Hash Brown,

Yes!

Tue, 04 Dec 2018 21:53:21 -0800 1 year ago
🗨
1
🐏
0
👁
175
Profile Photo - Some Guy

[PHP] How to print array values separated by commas?

Answers in Server-Side | By Some Guy

Published 1 year agoTue, 04 Dec 2018 17:43:17 -0800

Profile Photo - August R. Garcia

Last Reply <?php implode(", ", $arr) More Information: http://php.net/manual/en/function.implode.php August R. Garcia,

Tue, 04 Dec 2018 18:00:47 -0800 1 year ago
🗨
1
🐏
0
👁
96
Profile Photo - Some Guy

[Laravel] How to get the largest ID for a table?

Answers in Frameworks | By Some Guy

Published 1 year agoTue, 04 Dec 2018 17:43:57 -0800

Profile Photo - August R. Garcia

Last Reply <?php // Get max $draft->draft_id = Post::max('id'); // Get the next after the max $draft->draft_id = Post::max('id') + 1; August R. Garcia,

Tue, 04 Dec 2018 18:00:03 -0800 1 year ago
🗨
1
🐏
0
👁
104
Profile Photo - Some Guy

[Google Sheets] How to get the largest number in a range?

Answers in Spreadsheets | By Some Guy

Published 1 year agoTue, 04 Dec 2018 17:44:15 -0800

Profile Photo - August R. Garcia

Last Reply See the MAX function: https://support.google.com/docs/answer/3094013?hl=en August R. Garcia,

See the MAX function:

Tue, 04 Dec 2018 17:59:42 -0800 1 year ago
🗨
1
🐏
0
👁
105
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply The trim() function in PHP takes an optional second parameter: http://php.net/manual/en/function.trim.php This function should do what you... August R. Garcia,

The trim() function in PH...

Tue, 04 Dec 2018 17:59:19 -0800 1 year ago
🗨
1
🐏
0
👁
111
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply Something like this should work: <style> iframe#some_iframe { width: 100%; height: 400px; background-size: 100% 100%;... August R. Garcia,

Something like this shoul...

Tue, 04 Dec 2018 17:58:07 -0800 1 year ago
🗨
1
🐏
0
👁
98
Profile Photo - Some Guy

How to exit Vim? Not sure how to save and quit Vim...

Answers in Scripting and Automation | By Some Guy

Published 1 year agoTue, 04 Dec 2018 17:47:07 -0800

Profile Photo - August R. Garcia

Last Reply Press ESC to make sure you are in command mode (also known as normal mode) Type a colon to open start writing a command (which will show up at th... August R. Garcia,

Tue, 04 Dec 2018 17:56:31 -0800 1 year ago
🗨
1
🐏
0
👁
122
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply Change "overflow: scroll;" to "overflow-y: auto;overflow-x: auto;" August R. Garcia,

Change "overflow: sc...

Tue, 04 Dec 2018 17:54:41 -0800 1 year ago
🗨
1
🐏
0
👁
106
Profile Photo - Some Guy

Can you have a number in a MySQL DB name?

Answers in Databases | By Some Guy

Published 1 year agoTue, 04 Dec 2018 17:39:56 -0800

Profile Photo - August R. Garcia

Last Reply Yes, numbers in MySQL/MariaDB database names work fine. The 256 Kilobytes database, for example, is callled 420_smoke_weed. August R. Garcia,

Yes, numbers in MySQL/Mar...

Tue, 04 Dec 2018 17:54:20 -0800 1 year ago
🗨
1
🐏
0
👁
141
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply Replace APP_NAME with whichever field you're editing: Instead of: APP_NAME=Some Name Use: APP_NAME="Some Name"... August R. Garcia,

Replace APP_NAME with whi...

Tue, 04 Dec 2018 17:53:45 -0800 1 year ago
🗨
1
🐏
0
👁
314
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply The function eregi_replace() has been replaced by preg_replace(). "Warning: This function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7... August R. Garcia,

The function eregi_replac...

Tue, 04 Dec 2018 17:52:48 -0800 1 year ago
🗨
1
🐏
0
👁
138
Profile Photo - Some Guy

Is using hyphens in a URL to separate words good practice?

Answers in Search Engine Optimization | By Some Guy

Published 1 year agoMon, 03 Dec 2018 22:10:02 -0800 | Last update 1 year agoTue, 04 Dec 2018 13:54:29 -0800

Profile Photo - August R. Garcia

Last Reply Hyphens are generally the optimal approach for separating words. They: Make your URLs easier to parse, which helps bots understand the content o... August R. Garcia,

Hyphens are generally the...

Mon, 03 Dec 2018 23:15:53 -0800 1 year ago
🗨
1
🐏
0
👁
126
Profile Photo - Some Guy

404 vs 410 - what should I use when trying to remove URLs?

Answers in Search Engine Optimization | By Some Guy

Published 1 year agoMon, 03 Dec 2018 22:34:32 -0800 | Last update 1 year agoTue, 04 Dec 2018 13:54:09 -0800

Profile Photo - August R. Garcia

Last Reply 410 -- It indicates a permanent, deliberate removal. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410 Also, if the URL removal... August R. Garcia,

410 -- It indicates a per...

Mon, 03 Dec 2018 22:40:26 -0800 1 year ago
🗨
1
🐏
0
👁
156
Profile Photo - Some Guy

How can I check if row a exists with Laravel?

Answers in Frameworks | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:45:39 -0800 | Last update 1 year agoMon, 03 Dec 2018 14:56:02 -0800

Profile Photo - Hash Brown

Last Reply It depends on what you want to do with the data. If you just want to check if it exists: if (User::where('username', '=', Input::get('username... Hash Brown,

It depends on what you wa...

Mon, 03 Dec 2018 14:58:11 -0800 1 year ago
🗨
1
🐏
0
👁
121
Profile Photo - Some Guy

How to determine IP location without using an API?

Answers in Server-Side | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:45:21 -0800 | Last update 1 year agoMon, 03 Dec 2018 06:16:36 -0800

Profile Photo - Hash Brown

Last Reply For scalability you're probably better off asking for users permission and using HTML Geolocation and using the API as a fall back for those that... Hash Brown,

For scalability you'r...

Mon, 03 Dec 2018 14:45:33 -0800 1 year ago
🗨
1
🐏
0
👁
124
Profile Photo - Some Guy

[CSS squiggle/squiggly selector] Tilde in CSS?

Answers in Style and Layout | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:45:32 -0800

Profile Photo - Hash Brown

Last Reply This is called a "general sibling combinator". The general sibling combinator selector is very similar to the adjacent sibling combinator... Hash Brown,

This is called a "ge...

Mon, 03 Dec 2018 14:34:39 -0800 1 year ago
🗨
1
🐏
0
👁
196
Profile Photo - Some Guy

Best way to import JSON to Google Sheets?

Answers in Spreadsheets | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:42:13 -0800 | Last update 1 year agoMon, 03 Dec 2018 06:18:01 -0800

Profile Photo - Hash Brown

Last Reply Another option would be to convert the JSON to CSV using an online tool like this: https://json-csv.com/ Hash Brown,

Another option would be t...

Mon, 03 Dec 2018 14:00:23 -0800 1 year ago
🗨
2
🐏
0
👁
228
Profile Photo - Some Guy

Google Sheets Gantt Chart Template

Answers in Spreadsheets | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:44:54 -0800 | Last update 1 year agoMon, 03 Dec 2018 16:04:14 -0800

Profile Photo - Hash Brown

Last Reply Super useful, thank you! Hash Brown,

Super useful, thank you!

Mon, 03 Dec 2018 13:54:58 -0800 1 year ago
🗨
1
🐏
0
👁
129
Profile Photo - Some Guy

What are Hamming and Levenshtein distance?

Answers in Scripting and Automation | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:43:22 -0800

Profile Photo - Hash Brown

Last Reply Sure, let me help you at a basic level. Both terms come from information theory, they are a string metric to evaluate two values and basically meas... Hash Brown,

Sure, let me help you at...

Mon, 03 Dec 2018 13:31:34 -0800 1 year ago
🗨
1
🐏
0
👁
118
Profile Photo - Some Guy

Why is VLookup supposedly so useful in Google Sheets?

Answers in Spreadsheets | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:45:22 -0800 | Last update 1 year agoMon, 03 Dec 2018 06:30:34 -0800

Profile Photo - Hash Brown

Last Reply It depends what you are trying to do in Google Sheets, if you don't need the function and never use it then I guess it's just another function... Hash Brown,

It depends what you are t...

Mon, 03 Dec 2018 13:05:04 -0800 1 year ago
🗨
1
🐏
0
👁
132
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply There is a function called scandir. <?php $directory = '/path/to/directory'; scandir($directory); ?> This will output your directory... Hash Brown,

There is a function calle...

Mon, 03 Dec 2018 12:54:16 -0800 1 year ago
🗨
1
🐏
0
👁
126
Profile Photo - Some Guy

How to implement an algorithm to calculate Levenshtein distance in JavaScript?

Answers in Scripting and Automation | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:45:26 -0800 | Last update 1 year agoSun, 02 Dec 2018 12:28:46 -0800

Profile Photo - Hash Brown

Last Reply Here you go: function levenshteinDistance (str1, str2) { if (!str1.length) return str2.length; if (!str2.length) return str1.length;... Hash Brown,

Here you go:

Mon, 03 Dec 2018 12:48:11 -0800 1 year ago
🗨
1
🐏
0
👁
98
Profile Photo - Some Guy

[Laravel] How to make a custom 404 page?

Answers in Frameworks | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:45:38 -0800

Profile Photo - August R. Garcia

Last Reply The easiest way is to create a file at: /resources/views/errors/404.blade.php Replace 404 with the HTTP code that you want to make a custom... August R. Garcia,

The easiest way is to cre...

Mon, 03 Dec 2018 07:07:11 -0800 1 year ago
🗨
1
🐏
0
👁
142
Profile Photo - Some Guy

CKEditor replace by class

Answers in Client-Side | By Some Guy

Published 1 year agoSun, 02 Dec 2018 03:45:51 -0800

Profile Photo - August R. Garcia

Last Reply Yes, it can be done. Something along these lines works. Can remove the try/catch statement at your discretion. try { // Intialize CKEditor Ins... August R. Garcia,

Yes, it can be done. Some...

Mon, 03 Dec 2018 06:23:50 -0800 1 year ago
🗨
1
🐏
0
👁
246