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
$(".js-data-example-ajax").select2({ | |
width:"off", | |
placeholder: '{% trans from "content" %}content.select.placeholder{% endtrans %}', | |
language: "{{ app.request.getLocale() }}", | |
templateResult: function (data) { | |
if (!data.element) { | |
return data.text; | |
} |
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
$qb = $em->createQueryBuilder(); | |
$qb->update('CoreCorporateBundle:ClassroomMember', 'crm'); | |
$qb->set('crm.classroom','null'); | |
$qb->where('crm.classroom =:classroom'); | |
$qb->setParameter('classroom', $classroom); | |
$qb->getQuery()->execute(); |
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
$students = $em->createQueryBuilder() | |
->select("concat(pr.name,' ',pr.surname as student_name")///THİS IS CONCAT | |
->from('CoreCorporateBundle:Classroom','cr') | |
->innerJoin('cr.classroom_members','crm') | |
->innerJoin('crm.profile','pr') | |
->where('cr.uuid =:uuid') | |
->andwhere('crm.type =:type') | |
->setParameter('uuid',$classroom_uuid) | |
->setParameter('type','ogrenci') | |
->getQuery() |
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
var num1 = 5; | |
var num2 = 6; | |
var sum = num1 + +num2; | |
or | |
var sum = eval(num1 + num2); | |
console.log(sum) |
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
var fotograflar = []; | |
$("img.bekleyen-foto").each(function() { | |
fotograflar.push(this.src); | |
console.log(fotograflar); | |
}); |
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
we will use SUBSTRING function | |
$monht = 12; or 11 or 01 your choice | |
$variable = $em->createQueryBuilder() | |
->select('sd') | |
->from('YourEntitypath','sd') | |
->where('SUBSTRING(sd.fulltime,6,2) =:month') 6,2 important | |
->andWhere('sd.otherwhere =:other') | |
->setParameter('month',$monht) | |
->setParameter('other',$var) |
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
wget -c http://www.yoursite.com/your_route/ &> /dev/null | |
//&> /dev/null yazarsanız e-mail ile bildirim atmaz | |
//&> /dev/null if you write this part it dosent send email notification |
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
var id = "ctl03_Tabs1"; | |
var lastFive = id.substr(id.length - 5); // => "Tabs1" | |
var lastChar = id.substr(id.length - 1); // => "1" |
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
$('.chosen-select').val(); //chosen-select is your class. you must use class | |
//chosen-select sizin class ınız. class kullanak zorundasınız |
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
/*document+ ifadesi string yapar. Yoksa split fonksiyonu çalışmıyor*/ | |
/* docunment+ makes string. unless document+ split function dont work */ | |
var id = document+$('.chosen-select').val(); | |
var hepsi = id.split('_') |