Post

HihghScore CSH 3

 Index @model List<HighScore3.Models.ScoreViewModel> <h1> Lista Punteggi </h1> @{     Model.Sort((e1, e2) => e2.Score.CompareTo(e1.Score)); } @if(Model.Count==0){         <h4>la lista punteggi è vuota, <a href="/Punteggio/Create">aggiungi</a> un giocatore ed il suo score</h4> } @for (int i =0; i< Model.Count; i++) {     <li class="bg-info">@Model[i].Score pt --- @Model[i].Name</li> } ---------------------------------------------------------------------------- PUNTEGGIO CONTROLLER using Microsoft.AspNetCore.Mvc; using HighScore3.Models; namespace HighScore3.Controllers {     public class PunteggioController : Controller     {         public static List<ScoreViewModel> punteggi = new List<ScoreViewModel>();         public IActionResult Index()         {             return View(punteggi);         }         public IActionResult Create()         {             var Score = new ScoreViewModel();      

Resistor Sharp 2

 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace ResistorT {     /// <summary>     /// Interaction logic for MainWindow.xaml     /// </summary>     public partial class MainWindow : Window     {         public MainWindow()         {             InitializeComponent();             foreach (var item in Enum.GetValues(typeof(Resistor)))             {                 Scelta.Items.Add(item);             }                     }         enum Resistor         {             Nero,             Marrone,             Rosso,             Giallo,             Arancione,             Verde,             Blu,             Viola,             Grigio,            

StrainSforz Sharp 1

MAIN WINDOW.xaml  using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Runtime.ConstrainedExecution; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Sforzo {     /// <summary>     /// Interaction logic for MainWindow.xaml     /// </summary>     public partial class MainWindow : Window     {         private static List <int> numberList = new List<int>();         public MainWindow()         {             InitializeComponent();         }         private void insertButton_Click(object sender, RoutedEventArgs e)         {             string textbox1Content = TexBox1.Text;             if (int.TryParse(textbox1Content, out int number))          

Swingato J 3

 package it.cefi; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JTextField; public class Applicazione extends JFrame { private static final long serialVersionUID = 1L; private JPanel panel1; private JLabel label1; private JLabel label2; private JTextArea area1; private JTextField field1; private JButton bottone; private JButton parolaChiaveButton; private List<String> parole = new ArrayList<>(); private List<String> anagrammi = new ArrayList<>(); private String parolaUtente = new String(); private JButton bottone2; private boolean controllo(String stringa, String parolaUtente) { char [] s1 = stringa.toCharArray()

RICERCABIn J 2

 INDEX <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>BinarySearch</title> </head> <body> <form action="Prova" method="get"> <div align="center"> <label >Ricerca Binaria</label> <input type="number" name="numeri" min ="0" required> <input type="submit" name="Verifica" value="Verifica"> </div> <div align="center"> </div> </form> <% if(request.getAttribute("risposta")!=null)   {%> <p><%= request.getAttribute("risposta") %> <% } %> </body> </html> ---------------------------------------------------------------------------------------- CLASSE MODEL package it.cefi.models; import java.util.ArrayList; import java.util.Collection; import java.u

Isogram J 1

 INDEX ----------------------------------------------------- <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Isogramma</title> </head> <body> <form action="prova" method="post"> <div align="center"> <h1>Verifica Isogramma</h1> <label >Inserisci la frase</label> <input type="text" name="frase" style="width:400px"> <input type="submit" name="Verifica" value="Verifica"> </div> <div align="center"> <% if(request.getAttribute("risposta")!=null)   {%> <p><%= request.getAttribute("risposta") %> <% } %> </div> </form> </body> </html> -----------------------------------------------------------------------------------------------

ChanceCase/inverseCap c+ 3

 #include <iostream> #include <string> int main() { std::string stringa; std::getline(std::cin, stringa); for (size_t i { }; i < stringa.length(); i++) { if (islower(stringa.at(i))) { stringa.at(i)=toupper(stringa.at(i)); }else{ stringa.at(i)=tolower(stringa.at(i)); } } std::cout<<stringa; return 0; }