- Assuming that you have already installed php and apache
- Install xDebug php extension
# Arch Linux , Manjaro
sudo pacman -Sy xdebug
# Ubuntu 16.04,18.04
#include <stdio.h> | |
#include <pthread.h> | |
#include <semaphore.h> | |
#include <unistd.h> | |
typedef struct { | |
sem_t wait_sem; | |
sem_t signal_sem; | |
int value; | |
} cond_var_t; |
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/syscall.h> | |
// same as calling sbrk(0) | |
void *get_brk (void) | |
{ | |
return (void *) syscall (SYS_brk, 0); | |
} |
server { | |
listen 80; | |
listen [::]:80; | |
#listen 443 ssl http2; | |
server_name localhost .localhost; | |
charset utf-8; | |
root "/srv/www/nginx/"; | |
index index.php index.html index.htm; | |
gzip off; |
<?php | |
function renderView($filePath, $variables = array(), $print = true) | |
{ | |
$output = NULL; | |
if(file_exists($filePath)){ | |
// Start output buffering | |
ob_start(); |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> |
# Arch Linux , Manjaro
sudo pacman -Sy xdebug
# Ubuntu 16.04,18.04
Translations: Korean (by Yongwoo Lee)
Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.
I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).
jQuery(document).ready(function ($) { | |
$("#printme").click(function () { | |
var bodyContent = ''; | |
$('body').find('.printable').each(function (index, object) { | |
bodyContent += $(object).html(); | |
}); | |
var headStyles = ''; | |
$('head').find('link[rel="stylesheet"]').each(function (index, object) { | |
headStyles += '<link href="' + $(object).attr('href') + '" rel="stylesheet"/>'; |
package com.nodano.memo.utils.AppUtils; | |
import androidx.annotation.NonNull; | |
import androidx.coordinatorlayout.widget.CoordinatorLayout; | |
import androidx.recyclerview.widget.GridLayoutManager; | |
import androidx.recyclerview.widget.LinearLayoutManager; | |
import androidx.recyclerview.widget.RecyclerView; | |
import androidx.recyclerview.widget.StaggeredGridLayoutManager; | |
import android.content.res.Resources; |