Tutorial by Examples: c

If you have PHP installed locally and you would like to use PHP's built-in development server to serve your application, you may use the serve Artisan command. This command will start a development server at http://localhost:8000: php artisan serve Of course, more robust local development option...
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 ...
Open routes file. Paste the following code in: Route::get('helloworld', function () { return '<h1>Hello World</h1>'; }); after going to route http://localhost/helloworld it displays Hello World. The routes file is located /routes/web.php
Accessing pages and outputting data is fairly easy in Laravel. All of the page routes are located in app/routes.php. There are usually a few examples to get you started, but we're going to create a new route. Open your app/routes.php, and paste in the following code: Route::get('helloworld', functi...
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...
Backreferences "Backreferences" are references in a search regex to capture groups in the same search regex. The "search regex" is the regex used in the "Find" field of the Find/Replace dialog box. Here is the most common backreference syntax: Absolute: (group one)...
A regex in Notepad++ may have as many capture groups as desired. (one)(two)(three)...(nine)(more than nine groups!)... Anonymous capture groups use the standard syntax: (group) Named capture groups may use either of following syntax formats: (?<name>group) (?'name'group) Anonymo...
Typically we represent an anary tree (one with potentially unlimited children per node) as a binary tree, (one with exactly two children per node). The "next" child is regarded as a sibling. Note that if a tree is binary, this representation creates extra nodes. We then iterate over the s...
The color schemes changes the colors of the code. They can change, for example, with which color the keywords are highlighted, with which color the line the caret is on is highlighted (needs highlight_line to be set to true in the preferences (not part of the cojor scheme)), what is the color of the...
A package is a folder that can contain anything that is listed in these examples (and other thing that can have nothing to do with Sublime Text 3, such as a gulpfile.js if you're automating some tasks). You can install any package using the create Package Control. A .sublime-package ? Maybe you'v...
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...
In order to keep track of your projects' file structure, Atom, like many text editors and IDEs, uses a file tree model. These trees show the locations and names of your files and directory. To toggle the tree between visible and hidden, the keys Ctrl+\ may be used (⌘+\ for Mac OS). This tree also in...
The primary reason to use interfaces to achieve polymorphism and provide developers to implement on their own way in future by implementing interface's methods. Suppose we have an interface and three classes: interface Connector{ doConnect(): boolean; } This is connector interface. Now we...
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...
const { remote } = require("electron"); // <- The Node.js require() function is // added to JavaScript by electron function fullscreen(f) { // p = false or true const currentWindow = remote.getCurrentWindow(); currentWindow.maximize(); } ...
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...
Switch to the new opened tab. Close the current windows(In this case the new Tab). Switch back to first window. PROTRACTOR: browser.getAllWindowHandles().then(function (handles) { browser.driver.switchTo().window(handles[1]); browser.driver.close(); browser.driver.switchTo().window(...
Asterisk is an open source framework for building communications applications. You can use it for any of the following: IP PBX systems VoIP gateways ISDN/ 3G IVVR Here is a brief instruction for step by step installation of asterisk 1.8(or you can do for latest versions) on Redhat/centos (fo...
GTM simplifies the whole process of managing tags.In GTM terminology We put a GTM javascript snippet on the concerned page,in portal_normal.vm in custom theme in liferay, containing the GTM id and a data layer structure(if needed) to map values from page to variables Corresponding to data layer ...
To use standard location services while the application is in the background you need first turn on Background Modes in the Capabilities tab of the Target settings, and select Location updates. Or, add it directly to the Info.plist. <key>NSLocationAlwaysUsageDescription</key> <st...

Page 681 of 826