Skip to content

Instantly share code, notes, and snippets.

function primeSum(n, k) {
if( k === 1 ){
return isPrime(n);
}
var aListPrime = getListPrime(n);
log('aListPrime', aListPrime);
//log('aTable', aTable);
var aListNumber = aListPrime;
<pre>
<style type="text/css">pre.xh_debug{border: 1px solid #ccc;padding: 3px;margin: 3px;}pre.xh_debug>h4{border-bottom: 1px solid #bbb;margin-top: 5px;margin-bottom: 5px;background-color: #ccc;color: #000;}pre.xh_debug>h4>span{ cursor: pointer;}</style><script>function xh_pre(oEle){ if( oEle.parentNode.parentNode.children[1] == undefined || oEle.parentNode.parentNode.children[1].tagName.toLowerCase() != 'div' ){return ;} var display = oEle.parentNode.parentNode.children[1].style.display =='none'? 'block':'none'; oEle.parentNode.parentNode.children[1].style.display = display; oEle.innerHTML = display=='none' ? '[ + ]':'[ - ]'; }</script>
<pre class="xh_debug">
<h4> <span onclick='xh_pre(this)'>[ - ]</span> $js </h4>
<div>/*!
* Less - Leaner CSS v2.7.1
* http://lesscss.org
*
* Copyright (c) 2009-2016, Alexis Sellier <self@cloudhead.net>
* Licensed under the Apache-2.0 License.
var string_less = "@color: red;a{color: @color;}";
var DtyReturnVal = {
"error": "",
"css": string_less
};
try {
DtyLess.render(string_less, function (error, result) {
if( error )
throw error;
/*!
* Less - Leaner CSS v2.7.1
* http://lesscss.org
*
* Copyright (c) 2009-2016, Alexis Sellier <self@cloudhead.net>
* Licensed under the Apache-2.0 License.
*
*/
/** * @license Apache-2.0
@hugdx
hugdx / fs.js
Created February 3, 2015 09:40
Add open_basedir to lessjs when run with nodejs
var fs;
try
{
fs = require("graceful-fs");
}
catch(e)
{
fs = require("fs");
}
/**
@hugdx
hugdx / gist:dd2a3f11c24f701952d3
Created January 23, 2015 01:07
[abrt] a crash has been detected
From DoNotReply@xxxxxxxxxxxxxxxxxxxxxxxxx Thu Jan 22 19:27:45 2015
Return-Path: <DoNotReply@xxxxxxxxxxxxxxxxxxxxxxxxx>
X-Original-To: root@localhost
Delivered-To: root@localhost.ahh
Received: by xxxxxxxxxxxxxxxxxxxxxxxxx (Postfix, from userid 0)
id 5F7DE20888; Thu, 22 Jan 2015 19:27:45 +0700 (ICT)
Date: Thu, 22 Jan 2015 19:27:45 +0700
From: ABRT Daemon <DoNotReply@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: root@localhost.ahh
Subject: [abrt] a crash has been detected again
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test Php::Value object #2 [php/phpt/variables/010-value-object2.phpt]
Test Php::Value casting operators (64bit OS only) [php/phpt/variables/011-value-casting-operators.phpt]
Test Php::Value casting operators (double) [php/phpt/variables/012-value-casting-operators-double.phpt]
calling-php-functions from userspace [php/phpt/variables/013-calling-php-functions.phpt]
calling-php-Callback-functions [php/phpt/variables/014-calling-php-functions.phpt]
calling-php-Callback-functions (lambda) [php/phpt/variables/015-calling-php-functions.phpt]
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test Php::Value object #2 [php/phpt/variables/010-value-object2.phpt]
Test Php::Value casting operators (64bit OS only) [php/phpt/variables/011-value-casting-operators.phpt]
Test Php::Value casting operators (double) [php/phpt/variables/012-value-casting-operators-double.phpt]
calling-php-functions from userspace [php/phpt/variables/013-calling-php-functions.phpt]
calling-php-Callback-functions [php/phpt/variables/014-calling-php-functions.phpt]
calling-php-Callback-functions (lambda) [php/phpt/variables/015-calling-php-functions.phpt]