Skip to content

Instantly share code, notes, and snippets.

var loc = location.pathname.replace(/\/([^.]+)\//g,'');
var current = $nav.find('a[href="'+loc+'"]');
if(current.parent().parent().is('#nav')){
current.addClass('active');
}else{
current.parent().parent().parent().find('a').eq(0).addClass('active').next().show();
current.addClass('active');
}
Loading composer repositories with package information
Installing dependencies from lock file
Warning: Your lock file is in a deprecated format. It will most likely take a *long* time for composer to install dependencies, and may cause dependency solving issues.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- symfony/monolog-bundle 2.1.x-dev requires monolog/monolog >=1.0,<1.3-dev -> satisfiable by monolog/monolog 1.0.0, monolog/monolog 1.0.1, monolog/monolog 1.0.2, monolog/monolog 1.1.0, monolog/monolog 1.2.0, monolog/monolog 1.2.1.
- symfony/monolog-bundle 2.1.x-dev requires monolog/monolog >=1.0,<1.3-dev -> satisfiable by monolog/monolog 1.0.0, monolog/monolog 1.0.1, monolog/monolog 1.0.2, monolog/monolog 1.1.0, monolog/monolog 1.2.0, monolog/monolog 1.2.1.
- Can only install one of: monolog/monolog 1.0.
@jblac
jblac / composer.lock
Last active December 11, 2015 23:28
[RuntimeException]
Could not load package ztec/security-active_directory in http://packagist.org: [UnexpectedValueException] Could not parse version constraint v4.0-stable
{
"hash": "814f8948fa759aad6359a64fb416a9fb",
"packages": [
{
"package": "doctrine/common",
"version": "2.3.x-dev",
"source-reference": "605b1b8b5a7bc8daf9111fb35483e5708e30de35",
@jblac
jblac / test.php
Last active December 11, 2015 16:49
<?php
$sql = "SELECT o.name AS objects_name, o.desc AS objects_desc FROM objects AS o WHERE MATCH(o.name, o.desc) AGAINST ('tak')
UNION ALL(SELECT c.name AS communes_about, c.about AS communes_about WHERE MATCH (c.name, c.about) AGAINST ('tak'))
UNION ALL(SELECT d.name AS district_name, d.about AS district_about FROM district AS d WHERE MATCH (d.name, d.about) AGAINST ('tak'))";
<?php
function get_catalog_new($column=1, $storeID=0, $parentID=0, $isFront=0) {
if ($isFront != 0) {
// information is being pulled from the new front end.
$newJoin = "LEFT JOIN ic_product_stores as st ON $storeID = st.storeID AND prod.productID = st.productID";
$extsql = " AND st.oos = 0";
} else {
// information is being pulled from the administration panel.
$newJoin = '';
$extsql = '';
<!--[if IE]>
<style type="text/css">
html { display: none; }
</style>
<![endif]-->
function include(script) {
$.ajax({
url: script,
dataType: "script",
async: false,
success: function() {
// everything works fine
},
error: function() {
throw new Error("Could not load script " + script);
<?php
/**
* Created by JetBrains PhpStorm.
* User: bonk
* Date: 1/6/13
* Time: 1:55 PM
* To change this template use File | Settings | File Templates.
*/
class users extends BM_Controller {
<?php
class BM_Controller extends CI_Controller {
function __construct() {
parent::__construct();
$logged = $this->check_login();
$cArray = array('login', 'logout');
$this->load->helper('url');
$('form').on("submit", function(e) {
$.ajax({
type: "POST",
url: $(this).attr('action'),
data: $(this).serialize(),
success: function(resp) {
var obj = $.parseJSON(resp);
if (obj.resp == 0) {
$(this).removeAlertBoxes();
$(this).alertBox(obj.err, { type: 'error'});