Skip to content

Instantly share code, notes, and snippets.

View DrMabuse23's full-sized avatar
🏠
Working from home

Pascal Brewing DrMabuse23

🏠
Working from home
View GitHub Profile
XMLHttpRequest cannot load https://hrzg.iriscouch.com/starrag-db/?_nonce=PnJl86PNFt39ihGM. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. (index):1
message incoming {"message":{},"type":"error error"} DBConnection.js:68
'use strict';
/**
* @ngdoc function
* @name appApp.controller:DbadminCtrl
* @description
* # DbadminCtrl
* Controller of the app
*/
angular.module('app')
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
{
"LANGUAGE": {
"value": "LANGUAGE",
"files": [
"app/views/widgets/language_menu.html"
]
},
"lang.lang": {
"value": "lang.lang",
"files": [
locales: {
options: {
locales: ['en_US', 'de_DE']
,
localePlaceholder:'translate',
localizeMethodIdentifiers:'translate'
},
update: {
src: [
'<%= yeoman.app %>/views/**/*.html'
SELECT
`t`.`id` AS `t0_c0`,
`t`.`page_id` AS `t0_c1`,
`t`.`publish_date` AS `t0_c2`,
`t`.`box_type` AS `t0_c3`,
`t`.`color_id` AS `t0_c4`,
`t`.`title` AS `t0_c5`,
`t`.`sub_headline` AS `t0_c6`,
`t`.`text_color` AS `t0_c7`,
`t`.`description` AS `t0_c8`,
<?php
use backend\assets\AppAsset;
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
/**
* @var \yii\web\View $this
* @var string $content
'use strict';
angular.module('app')
.controller('FilemanagerCtrl', function ($scope) {
var rootPath = null;
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
function onFileSystemSuccess(fileSystem) {
console.log('fileSystem.name : '+ fileSystem.name);
console.log('fileSystem.root.name : '+ fileSystem.root.name);
'use strict';
angular.module('app')
.controller('FilemanagerCtrl', function ($scope) {
var rootPath = null;
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
function onFileSystemSuccess(fileSystem) {
console.log(fileSystem.name);
console.log(fileSystem.root.name);
public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true) {
if ($considerHtml) {
// if the plain text is shorter than the maximum length, return the whole text
if (strlen(preg_replace('/<.*?>/', '', $text)) <= $length) {
return $text;
}
// splits all html-tags to scanable lines
preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
$total_length = strlen($ending);
$open_tags = array();