Skip to content

Instantly share code, notes, and snippets.

$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()
$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();
$(".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;
}
select2.on('select2:select',function() {
var id = $(this).find('option:selected').text().replace(/\s/g,'_');
$(this).closest('td').siblings('td').find('select.select2').children('option[id="' + id + '"]').attr('disabled', true);
var selected_option = $(this).find('option:selected');
var selected_all_options = $(this).closest('td').siblings('td').find('select.select2').children('option:selected')
selected_all_options.push(selected_option)
npm config set prefix /usr/local
full : http://blog.webbb.be/command-not-found-node-npm/
//Videoları telefonun video oynatıcısında oynatma (play all video with native phone videoplayer )
cordova plugin add https://github.com/raulduran/VideoPlayer.git
https://github.com/raulduran/VideoPlayer
bu plugin ileri geri durdur başlat özelliğğ var alaltakinden daha iyi.( start ,stop feature) this is best
//Videoları telefonun video oynatıcısında oynatma (play all video with native phone videoplayer )
https://github.com/moust/cordova-plugin-videoplayer
No option
//This line is orjinal line.
//self.closeButton => close button (Done button)
//flexibleSpaceButton => space between two buttons
//self.backButton => back button left arrow
//fixedSpaceButton => mini space
//self.forwardButton => forward button right arrow
[self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]];
//For example if you change this line below,toolbar look like | ◄ ► |. Done button removed.
[self.toolbar setItems:@[fixedSpaceButton, self.backButton, flexibleSpaceButton, self.forwardButton , fixedSpaceButton]];
@e-vural
e-vural / deleteDirectory.php
Created November 24, 2017 14:53
Delete All Directory And Files In a Directory
public function deleteDirectory($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != '.' && $object != '..') {
(filetype($dir . '/' . $object) == 'dir') ? $this->deleteDirectory($dir . '/' . $object) : unlink($dir . '/' . $object);
}
}
reset($objects);
return rmdir($dir) ? true : false;
$request->isXmlHttpRequest();
### Profile entity
class Profile{
... (your entity codes)
//ONE TO MANY RELATİONSHİP
/**
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Graduate",mappedBy="profile",cascade={"all"})
*/
private $graduates;