Tutorial by Examples: amp

It's quite simple to install wordpress in MAMP. You have to follow a few simple steps: 1 - Download MAMP from here, it's free and you probably don't need the pro version. 2 - Install on your PC or Mac. 3 - Run the program -> you will see a little window open, from there you can set MAMP. At t...
var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var app = express(); app.use(favicon(__dirname + '/public/img/favicon.ico')); app.use(express.static(path.join(__dirname, 'public'))); app.listen(3000, function() { console.log("...
Here is an example of usage with a database. On the page where the CAPTCHA will be shown you'll have something like this: $this->load->helper('captcha'); $vals = array( 'img_path' => './captcha/', 'img_url' => 'http://example.com/captcha/' ); $cap = create_captc...
Intercepted method: public class ExampleService implements Example { @MyAnnotation public doHomework() { System.out.println("working"); } } Annotation: @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface MyAnnotation {} ...
Import libraries (language dependency: python 2.7) import tensorflow as tf import numpy as np from sklearn.datasets import fetch_mldata from sklearn.model_selection import train_test_split load data, prepare data mnist = fetch_mldata('MNIST original', data_home='./') print "MNIST data,...
Go to Explorer, Open iris.arff data, then go to CPython Scripting, Copy and Paste the following lines of codes into Python Scripts: hi = "Hello, CPython of Weka!" hello = hi.upper() iris = py_data info = iris.describe() To see output, go to Python Variables, select hi, for exa...
Redis has a Windows port provided by 'Microsoft Open Technologies'. You can use the msi installer found on: https://github.com/MSOpenTech/redis/releases After installation completes you can see 'Redis' is a Windows service (and it's status should be "Started") To write an 'Hello world'...
Install apache: sudo apt-get install apache2 Install MySql: sudo apt-get install mysql-server Install PHP: sudo apt-get install php5 libapache2-mod-php5 Restart system: sudo systemctl restart apache2 Check PHP installation: php -r 'echo "\n\nYour PHP installation is working fi...
The example above can also be implemented with fences and relaxed atomic operations: int x, y; std::atomic<bool> ready{false}; void init() { x = 2; y = 3; atomic_thread_fence(std::memory_order_release); ready.store(true, std::memory_order_relaxed); } void use() { if (re...
You can configure Mail by just adding/changing these lines in the app's .ENV file with your email provider login details, for example for using it with gmail you can use: MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 [email protected] MAIL_PASSWORD=yourPassword MAIL_E...
This is an example of a web-socket client in javascript. It: Connects to a live demo server. Sends a message. Receives message(s). Disconnects after an interval. var mySocket = null; var serverUrl = 'wss://echo.websocket.org'; // wss: is ws: but using SSL. var oWebSocket = window...
this is our index.html file <!DOCTYPE html> <html manifest="index.appcache"> <body> <p>Content</p> </body> </html> then we will create index.appcache file with below codes CACHE MANIFEST index.html write those files that you want ...
GridView definition on ASPX page As shown below, first column of grid is defined as a checkbox column, which is conditionally cleared as shown in further examples below (the header checkbox is only for selecting/un-selecting all rows on current page, but same can be extended for all on grid easily)...
class UserUnsubscribeJob < ApplicationJob queue_as :default def perform(user) # this will happen later user.unsubscribe end end
simpleCLI go to simpleCLI, enter the following code java weka.classifiers.rules.ZeroR -t path/to/a-file-of-dataset Jython Example codes from Advanced Weka MOOC course lesson 5.1 # imports import weka.core.converters.ConverterUtils.DataSource as DS import weka.filters.Filter as Filter impor...
<ul> <li *ngFor="let item of items">{{item.name}}</li> </ul>
<div *ngFor="let item of items"> <p>{{item.name}}</p> <p>{{item.price}}</p> <p>{{item.description}}</p> </div>
<div *ngFor="let item of items; let i = index"> <p>Item number: {{i}}</p> </div> In this case, i will take the value of index, which is the current loop iteration.
create table tgt ( id, val ) as select 1, 'a' from dual union all select 2, 'b' from dual ; Table TGT created. create table src ( id, val ) as select 1, 'x' from dual union all select 2, 'y' from dual ; Table SRC created. update ( select t.val as t_val, s.val as s_val ...

Page 29 of 46