This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Piwik - free/libre analytics platform | |
* | |
* @link http://piwik.org | |
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | |
* | |
*/ | |
(function () { | |
angular.module('piwikApp').controller('ImportSchedulerController', ImportSchedulerController); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Piwik - free/libre analytics platform | |
* | |
* @link https://matomo.org | |
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | |
*/ | |
namespace Piwik\Plugins\GoogleAnalyticsImporter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Piwik - free/libre analytics platform | |
* | |
* @link http://piwik.org | |
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | |
* | |
*/ | |
namespace Piwik\Plugins\CoreAdminHome\Commands; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Declare the subroutines | |
sub trim($); | |
sub ltrim($); | |
sub rtrim($); | |
# Perl trim function to remove whitespace from the start and end of the string | |
sub trim($) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import MySQLdb | |
rows_at_a_time = 100000 | |
conn = # ... | |
cursor = conn.cursor() | |
while True: | |
cursor.execute("DELETE FROM mytable WHERE id < 2000000 LIMIT %d" % rows_at_a_time) | |
if cursor.rowcount < rows_at_a_time: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.util.Random | |
import com.scalaiteration.router.Router | |
import com.scalaiteration.poker.game._ | |
import com.scalaiteration.poker.players._ | |
/** Testing singleton. */ | |
object Test extends App { | |
val router = new Router(3) | |
val system = new PokerSystem(router) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <node-bind/node-bind.hpp> | |
struct MyType | |
{ | |
MyType(int first_, int second_) | |
: first(first_) | |
, second(second_) | |
{} | |
std::string toString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var books = ...; // do some ajax mumbo-jumbo | |
var booksTemplate = | |
'<div id="book_container">\ | |
<% for (var k in books) { var bk = books[k]; %>\ | |
<div id="id">\ | |
<img src=\"<%= bk.pic %>\"/>\ | |
</div>\ | |
<div id="details">\ | |
<span id="desc"><%= bk.desc %></span>\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a small GUI using mythos, the library iris will | |
// be a rewrite of | |
using namespace mythos; | |
namespace myapp | |
{ | |
nyx::window mainframe; | |
std::string mloc_str(\"(MAX,MAX)\"); | |
iris::event_handler extra; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <boost/foreach.hpp> | |
#include <charmed/charmed.hpp> | |
// the attribute | |
struct operation_attribute | |
{ | |
operation_attribute(std::string const& name_, std::string const& help_) | |
: name(name_), help(help_) |
NewerOlder