This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Vuex from 'vuex' | |
Vue.use(Vuex) | |
const state = { | |
isLogged: !!localStorage.getItem('token') | |
} | |
const mutations = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<!-- Form Bootstrap 4 e clic su Login --> | |
</template> | |
<script> | |
import router from '@/router' | |
import store from '@/store' | |
export default { | |
name: 'login', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- Includo il transpiler in-browser --> | |
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> | |
<!-- Imposto il type in "text/babel" --> | |
<script type="text/babel"> | |
// === Dichiaro una funzione con inizializzazione dei parametri |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gcastro.primaapplicazione; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Create The Application | |
|-------------------------------------------------------------------------- | |
| | |
| The first thing we will do is create a new Laravel application instance | |
| which serves as the "glue" for all the components of Laravel, and is | |
| the IoC container for the system binding all of the various parts. | |
| | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* @ngdoc function | |
* @name lezione6App.controller:RegistranuovoutenteCtrl | |
* @description | |
* # RegistranuovoutenteCtrl | |
* Controller of the lezione6App | |
* Path: app/scripts/controllers/registranuovoutente.js | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sommatoria(arNumeri) | |
{ | |
var totale = 0; | |
for(var i=0; i<arNumeri.length; i++) | |
{ | |
totale += arNumeri[i]; | |
} | |
return totale; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by gcastro on 02/11/16. | |
*/ | |
var Persona = function() | |
{ | |
// --- Elenco delle proprieta | |
this.Nome = ''; | |
this.Cognome = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// === Creazione del tag link | |
var css_tag=document.createElement("link"); | |
css_tag.setAttribute("rel", "stylesheet"); | |
css_tag.setAttribute("type", "text/css"); c | |
ss_tag.setAttribute("href", filename); | |
// === Inserimento nel DOM | |
(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(css_tag); | |
// ------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// === Creo il tag script e aggiungo il file da scaricare | |
var script_tag = document.createElement('script'); | |
script_tag.setAttribute("type","text/javascript"); | |
script_tag.setAttribute("src", "/js/javascript-code.js"); | |
// === Configurazione funzione di callback di caricamento avvenuto | |
if (script_tag.readyState) { | |
script_tag.onreadystatechange = function () { | |
// For old versions of IE | |
if (this.readyState == 'complete' || this.readyState == 'loaded') { |