Tutorial by Examples: and

The basic example Open routes/web.php file and paste the following code in file: Route::get('helloworld', function () { return '<h1>Hello World</h1>'; }); here 'helloworld' will act as page name you want to access, and if you don't want to create blade file and still want to ...
Bullet This one particularly blew my mind. The bullet gem helps you kill all the N+1 queries, as well as unnecessarily eager loaded relations. Once you install it and start visiting various routes in development, alert boxes with warnings indicating database queries that need to be optimized will p...
Along with other more advanced text editors, Atom allows developers to open a single file or a directory. Opening Files To open files with Atom, either use File > Open File... in the menu as show below: or use the faster keyboard shortcut: Ctrl+O (For Mac OS: ⌘+O). This will open a file expl...
TypeScript supports interfaces, but the compiler outputs JavaScript, which doesn't. Therefore, interfaces are effectively lost in the compile step. This is why type checking on interfaces relies on the shape of the object - meaning whether the object supports the fields and functions on the interfac...
Query to search last executed sp's in db SELECT execquery.last_execution_time AS [Date Time], execsql.text AS [Script] FROM sys.dm_exec_query_stats AS execquery CROSS APPLY sys.dm_exec_sql_text(execquery.sql_handle) AS execsql ORDER BY execquery.last_execution_time DESC Query to search thro...
//Using statement for ExcelTable and TableStyles using OfficeOpenXml.Table; //Defining the tables parameters int firstRow =1; int lastRow = worksheet.Dimension.End.Row; int firstColumn = 1; int lastColumn = worksheet.Dimension.End.Column; ExcelRange rg = worksheet.Cells[firstRow, firstCol...
[DscResource()] class Ticket { [DscProperty(Key)] [string] $TicketId [DscProperty(Mandatory)] [string] $Subject } When building a DSC Resource, you'll often find that not every single property should be mandatory. However, there are some core properties that you'll want to ensure ...
Typically, some files from the Web Application should not be overwritten when performing the deployment (e.g. web.config). This can be accomplished by: 1) Excluding from output - which means setting Build action to None. This is the easiest way, but it might not work for some particular files or fo...
The find and replace feature in Atom works in two ways, one operates locally only on the file you are in, and the other on a set of files or directories. To open the find and replace tool for a single file, press Ctrl+F (For Mac OS use ⌘+F). Enter in the first blank the string you are searching for...
Let's say there is a file we would like to execute, a bash script named add.sh, for example. Typing ./add.sh however, yields a permission error. Getting the permissions is a simple process. To determine the permissions a file has, type: ls -l filename, or, in our case, ls -l ./add.sh This prints ...
Occasionally we see StackOverflow Java questions (and C or C++ questions) that ask what something like this: i += a[i++] + b[i--]; evaluates to ... for some known initial states of i, a and b. Generally speaking: for Java the answer is always specified1, but non-obvious, and often difficult ...
from nltk.tokenize import sent_tokenize, word_tokenize example_text = input("Enter the text: ") print("Sentence Tokens:") print(sent_tokenize(example_text)) print("Word Tokens:") print(word_tokenize(example_text))
//Hide column "A" worksheet.Column(1).Hidden = true; //Hide row 1 worksheet.Row(1).Hidden = true;
//Set the row "A" height to 15 double rowHeight = 15; worksheet.Row(1).Height = rowHeight; //Set the column 1 width to 50 double columnWidth = 50; worksheet.Column(1).Width = columnWidth; When Bestfit is set to true, the column will grow wider when a user inputs numbers in a ce...
Environment Setup: Download android sdk of API level 17 or more Node.js (https://nodejs.org/) Appium software (http://appium.io/) Selenium jars (http://www.seleniumhq.org/download/) Appium jar (https://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.appium%20a%3Ajava-client) .apk file of the appl...
First, you need to prepare the environment by creating the SQL Server table and the CSV file. Run the script below in SQL Server to create the SQL table either on a new database or an existing one. For this example, I used my ‘TrainingDB’ database. /* Creates table for Students.csv */ CREATE TABL...
' How To Seek Past VBA's 2GB File Limit ' Source: https://support.microsoft.com/en-us/kb/189981 (Archived) ' This must be in a Class Module Option Explicit Public Enum W32F_Errors W32F_UNKNOWN_ERROR = 45600 W32F_FILE_ALREADY_OPEN W32F_PROBLEM_OPENING_FILE W32F_FILE_ALREAD...
Private Const HashTypeMD5 As String = "MD5" ' https://msdn.microsoft.com/en-us/library/system.security.cryptography.md5cryptoserviceprovider(v=vs.110).aspx Private Const HashTypeSHA1 As String = "SHA1" ' https://msdn.microsoft.com/en-us/library/system.security.cryptography.sha1c...
We can create Singleton class in such a way that developers are forced to used the shared instance (singleton object) instead of creating their own instances. @implementation MySingletonClass + (instancetype)sharedInstance { static MySingletonClass *_sharedInstance = nil; static dispa...
CloudCannon offers hosting and a CMS for Jekyll applications. Here are the steps in hosting your Jekyll application on CloudCannon (http://cloudcannon.com). Without version control: Create your blog locally using some local files and jekyll serve Create a CloudCannon account and create a new si...

Page 123 of 153