Skip to content

Instantly share code, notes, and snippets.

View riccardopirani's full-sized avatar

riccardop riccardopirani

View GitHub Profile
@riccardopirani
riccardopirani / Cantiere.dart
Last active March 3, 2020 11:02
Ui generation with Future Flutter error
import 'dart:async';
import 'package:MyApp/Controller/Cantiere.dart';
import 'package:MyApp/Model/Cliente.dart';
import 'Utente.dart';
//Classe che rappresenta il cantiere
class Cantiere {
//Variabili del cantiere
@riccardopirani
riccardopirani / filename
Last active March 2, 2020 13:31
output of apt-get update
> Hit:1 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease
Ign:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Hit:4 http://ppa.launchpad.net/landscape/17.03/ubuntu xenial InRelease
Hit:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release
Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:7 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:9 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Get:10 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release.gpg [801 B]
Ign:11 http://pkg.jenkins.io/debian-stable binar
@riccardopirani
riccardopirani / Error
Last active February 28, 2020 09:02
error during running a code to generate a view flutter
Failed assertion: line 1651 pos 12: '!_debugDoingThisLayout': is not true. flutter: Another exception was thrown: NoSuchMethodError: The getter 'length' was called on null. flutter: Another exception was thrown: Each child must be laid out exactly once. flutter: Another exception was thrown: NoSuchMethodError: The getter 'length' was called on null. flutter: Another exception was thrown: Each child must be laid out exactly once. [VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Cannot hit test a render box that has never been laid out. The hitTest() method was called on this RenderBox: RenderStack#8e720 NEEDS-LAYOUT NEEDS-PAINT: creator: Stack ← FutureBuilder ← _BodyBuilder ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ← CustomMultiChildLayout ← AnimatedBuilder ← DefaultTextStyle ← AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#19263 ink renderer] ← NotificationListener ← PhysicalModel ← ⋯ parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body constraints: MISSING size: MISSING alignment: Alignm
@riccardopirani
riccardopirani / Model.cs
Created February 25, 2020 14:39
Sql Timeouit
/*
System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.RunExecute
@riccardopirani
riccardopirani / View.dart
Created February 20, 2020 08:04
unsupported operation infinity or nan toint
import 'package:flutter_map/flutter_map.dart';
import 'package:Myapp/View/Cantieri/mediterranesn_diet_view.dart'
show MediterranesnDietView;
import 'package:Myapp/View/Cantieri/title_view.dart' show TitleView;
import 'package:Myapp/View/Home_theme.dart';
import 'package:Myapp/View/MarcaTempo/meals_list_view.dart' show MealsListView;
import 'package:flutter/material.dart';
import 'package:latlong/latlong.dart';
class MyDiaryScreen extends StatefulWidget {
@riccardopirani
riccardopirani / print.cs
Created January 31, 2020 13:28
Code Crash Report C# RDLC
private void StampaPreventivoCompleto_Load(object sender, EventArgs e)
{
lock (LockMonitor)
{
if (ModalitaCalcoloUtile == "Unica percetuale")
{
try
{
Preventivi p = new Preventivi(int.Parse(IdPreventivo));
string Query = "SELECT (select Firma from Utente where IdUtente='" + u.IdUtente + "') as Firma,(select FilialeCliente.Citta from Preventivo inner join FilialeCliente on FilialeCliente.IdFilialeCliente=Preventivo.IdFiliale where IdPreventivo='" + IdPreventivo + "') as Filiale,Preventivo.VostroRiferimento,Preventivo.Oggetto,Preventivo.PrezzoRiservato,Preventivo.IdPreventivo,Azienda.Logo as LogoAzienda,convert(VARCHAR(10),Preventivo.DataInserimento,105) as DataInserimento,Preventivo.RiferimentoInterno,Preventivo.Testata,Preventivo.Chiusura,Cliente.Titolo,Cliente.RagioneSociale,Cliente.Indirizzo,Cliente.Cap,Cliente.Citta,Cliente.Provincia FROM Preventivo inner
@riccardopirani
riccardopirani / Activity.java
Created October 30, 2019 10:36
The code below shows a spinner in an activity my problem is that the dropdown does not work, only the 1 element of the array is displayed
public class CreazioneCantiereActivity extends AppCompatActivity {
private EditText txtNomeCantiere;
private String TipologiaCantiereSelezionato="Consuntivo";
private Button btnCreaCantiere, btnSelezionacliente;
private ClienteController c;
private Spinner spinnerTipologie;
@Override
@riccardopirani
riccardopirani / Articolo.php
Last active September 10, 2019 13:25
Load value into table with laravle
<?php
namespace App\Http\Controllers;
use DB;
use App\Quotation;
use Illuminate\Http\Request;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
@riccardopirani
riccardopirani / Articolo.php
Last active August 26, 2019 15:59
Display select values with Laravel
//this is model
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Articolo extends Model
{
@riccardopirani
riccardopirani / home.blade.php
Created July 15, 2019 07:06
Home.Blade.php
<?php
//Verifico che la sessione sia aperta, nel caso in cui sia chiusa la apro
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if (isset($_POST['Name'])) {
$_POST['Name']="prova";
}