This file contains hidden or 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
Laravel crud naujienu pridejimas | |
— pries tai padaryti reikia — | |
sukurti NewsControlleri, su php artisan komanda | |
php artisan make:controller newsController | |
sukurti News Modeli, su php artisan komanda | |
php artisan make:model NewsItem |
This file contains hidden or 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
{{-- Neverciamas stringas blade faile --}} | |
<h2>Rasyti komentara</h2> | |
{{-- Verciamas stringas blade faile --}} | |
<h2>{{ __("Rasyti komentara") }}</h2> |
This file contains hidden or 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
<div class="input-group mb-3"> | |
<form method="POST" action="{{route('show.student', $student->id)}}"> | |
<select name="student_id" class="custom-select"> | |
<option selected disabled>Pasirinkite vardą</option> | |
@foreach($students as $student) | |
<option value="{{ $student->id }}">{{$student->name . " " . "$student->surname"}}</option> | |
@endforeach | |
</select> | |
<input type="submit" value="Rodyti"> | |
</form> |
This file contains hidden or 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
// Galime naudoti ir paprasta css sintakse | |
.slick-relative { | |
position: relative; | |
} | |
.slick-slide { | |
height: 150px; | |
} | |
.slider-wrapper { |
This file contains hidden or 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
// You should include jQuery for this to work | |
$(document).ready(function () { | |
$('.first-slider').slick({ | |
slidesToShow: 3, | |
slidesToScroll: 1, | |
autoplay: true, | |
autoplaySpeed: 2000, | |
dots: true |
This file contains hidden or 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
// Sugeneruojama nuoroda | |
// Failas: src/app/app-routing.module.ts | |
const routes: Routes = [ | |
{ path: '', component: ProductsListComponent}, | |
{ path: 'products/:id', component: ProductPageComponent}, // Kaip Perduoti informaciją į šį route :id parametras | |
]; | |
// Naudojame html template [routerLink] direktyva perduodant informacijos masyva. | |
// 1 parametras url pavadinimas, 2 parametras, produkto ID kintamasis |
This file contains hidden or 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
// Globalus kintamasis | |
var objektas = { | |
info: "informacija" | |
}; | |
// Funkcijos aprasymo pavyzdys | |
function test() { | |
objektas.test = "kazkas"; | |
} |
This file contains hidden or 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
1. Parasyti programa kuri konsoleje ispausdintu didziausia skaiciu is pateikto mastyvo: | |
let data = [1, 20, 5, -1, 0, 10, 25, 33]; | |
+ *Padaryti, kad surastume maziausia skaiciu, kartu su didziausiu skaiciumi | |
2. Parasyti programa, kuri atspausdintu tik lyginius skaicius: | |
let data = [5, 10, 20, 30,11, 12, 13, 15]; | |
3. Parasyti programa, kuri suskaiciuoti pateiktu skaiciu vidurki: | |
let data = [5,1,3,4,5,6,7]; |
This file contains hidden or 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
<!-- Rodoma: Jei uzduoties completed kintamasis yra true --> | |
<!-- ngClass panaudojimo pavyzdiai: https://stackoverflow.com/questions/35269179/angular-conditional-class-with-ngclass --> | |
<i class="bi-alarm " | |
[class.text-success]="task.completed" | |
[ngClass]="{'text-success': task.completed, 'text-danger': !task.completed }" | |
*ngIf="task.completed" | |
></i> | |
<!-- Rodoma: Jei uzduoties completed kintamasis yra false --> | |
<i class="bi-alarm text-danger" *ngIf="!task.completed"></i> |
This file contains hidden or 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
<select name="priority" [(ngModel)]="task.priority"> | |
<!-- Perduodame su ngValue string reiksme --> | |
<option value="high" ngValue="high">High</option> | |
<!-- Perduodame su [ngValue] string reiksme kaip kintamaji --> | |
<option value="low" [ngValue]="priority">Low</option> | |
</select> |