filename
stringlengths
4
51
language
stringclasses
51 values
vulnerable_code
stringlengths
6
3.06M
fixed_code
stringlengths
6
3.06M
commit_id
stringlengths
40
40
repository_url
stringlengths
26
73
Index.php
php
<?php namespace Frontend\Modules\Search\Actions; /* * This file is part of Fork CMS. * * For the full copyright and license information, please view the license * file that was distributed with this source code. */ use Symfony\Component\Filesystem\Filesystem; use Frontend\Core\Engine\Base\Block as FrontendBase...
<?php namespace Frontend\Modules\Search\Actions; /* * This file is part of Fork CMS. * * For the full copyright and license information, please view the license * file that was distributed with this source code. */ use Symfony\Component\Filesystem\Filesystem; use Frontend\Core\Engine\Base\Block as FrontendBase...
4a7814762adf4f56f932d95146c7e4126d872114
https://github.com/forkcms/forkcms
login.php
php
<?php header('Content-Type: text/html; charset=utf-8'); date_default_timezone_set('Europe/Berlin'); // Load config (for MySQL db) include('config.php'); // Connect to MySQL database $err_level = error_reporting(0); $my = new mysqli($my_host, $my_user, $my_pass); error_reporting($err_level); if($my->connect_error) die(...
<?php header('Content-Type: text/html; charset=utf-8'); date_default_timezone_set('Europe/Berlin'); // Load config (for MySQL db) include('config.php'); // Connect to MySQL database $err_level = error_reporting(0); $my = new mysqli($my_host, $my_user, $my_pass); error_reporting($err_level); if($my->connect_error) die(...
fa0d9bcf81c711a88172ad0d37a842f029ac3782
https://github.com/opencyclecompass/server-php
addStickyExcerpt.js
javascript
import { extend } from 'flarum/extend'; import DiscussionListState from 'flarum/states/DiscussionListState'; import DiscussionListItem from 'flarum/components/DiscussionListItem'; import DiscussionPage from 'flarum/components/DiscussionPage'; import IndexPage from 'flarum/components/IndexPage'; import { truncate } from...
import { extend } from 'flarum/extend'; import DiscussionListState from 'flarum/states/DiscussionListState'; import DiscussionListItem from 'flarum/components/DiscussionListItem'; import DiscussionPage from 'flarum/components/DiscussionPage'; import IndexPage from 'flarum/components/IndexPage'; import { truncate } from...
7ebd30462bd405c4c0570b93a6d48710e6c3db19
https://github.com/flarum/sticky
UpdateProductRequest.php
php
<?php namespace App\Shop\Products\Requests; use App\Shop\Base\BaseFormRequest; use Illuminate\Validation\Rule; class UpdateProductRequest extends BaseFormRequest { /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [...
<?php namespace App\Shop\Products\Requests; use App\Shop\Base\BaseFormRequest; use Illuminate\Validation\Rule; class UpdateProductRequest extends BaseFormRequest { /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [...
256026193ce994dc4c1365e02f414d8a0cd77ae8
https://github.com/jsdecena/laracom
Api.php
php
<?php defined('BASEPATH') or exit('No direct script access allowed'); /* ---------------------------------------------------------------------------- * Easy!Appointments - Online Appointment Scheduler * * @package EasyAppointments * @author A.Tselegidis <alextselegidis@gmail.com> * @copyright Copyright...
<?php defined('BASEPATH') or exit('No direct script access allowed'); /* ---------------------------------------------------------------------------- * Easy!Appointments - Online Appointment Scheduler * * @package EasyAppointments * @author A.Tselegidis <alextselegidis@gmail.com> * @copyright Copyright...
63dbb51decfcc1631c398ecd6d30e3a337845526
https://github.com/alextselegidis/easyappointments
to_tf_record_op.cc
c++
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
e0b6e58c328059829c3eb968136f17aa72b6c876
https://github.com/tensorflow/tensorflow
bee_ft.c
c
/********************************************************************\ * BitlBee -- An IRC to other IM-networks gateway * * * * Copyright 2010 Wilmer van der Gaast <wilmer@gaast.net> * \***********************************...
/********************************************************************\ * BitlBee -- An IRC to other IM-networks gateway * * * * Copyright 2010 Wilmer van der Gaast <wilmer@gaast.net> * \***********************************...
701ab8129ba9ea64f569daedca9a8603abad740f
https://github.com/bitlbee/bitlbee
filters.php
php
<?php /* |-------------------------------------------------------------------------- | Application & Route Filters |-------------------------------------------------------------------------- | | Below you will find the "before" and "after" events for the application | which may be used to do any work before or after a...
<?php /* |-------------------------------------------------------------------------- | Application & Route Filters |-------------------------------------------------------------------------- | | Below you will find the "before" and "after" events for the application | which may be used to do any work before or after a...
6b2813696ccb88d0576dfb305122ee880eb36197
https://github.com/mrobit/robitailletheknot
FakeInfectionReportWorker.kt
kotlin
/* * Copyright (c) 2020 Gobierno de España * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * SPDX-License-Identifier: MPL-2.0 */ package es.gob.radarcovid....
/* * Copyright (c) 2020 Gobierno de España * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * SPDX-License-Identifier: MPL-2.0 */ package es.gob.radarcovid....
9627f4d69705bca68e550eefd3df1b9abe90b215
https://github.com/radarcovid/radar-covid-android
m_capab.c
c
/* * ircd-ratbox: A slightly useful ircd. * m_capab.c: Negotiates capabilities with a remote server. * * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center * Copyright (C) 1996-2002 Hybrid Development Team * Copyright (C) 2002-2005 ircd-ratbox development team * * This program is free s...
/* * ircd-ratbox: A slightly useful ircd. * m_capab.c: Negotiates capabilities with a remote server. * * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center * Copyright (C) 1996-2002 Hybrid Development Team * Copyright (C) 2002-2005 ircd-ratbox development team * * This program is free s...
ac0707aa61d9c20e9b09062294701567c9f41595
https://github.com/atheme/charybdis
FakeInfectionReportWorker.kt
kotlin
/* * Copyright (c) 2020 Gobierno de España * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * SPDX-License-Identifier: MPL-2.0 */ package es.gob.radarcovid....
/* * Copyright (c) 2020 Gobierno de España * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * SPDX-License-Identifier: MPL-2.0 */ package es.gob.radarcovid....
09d00e5ede801ca400d45c7feda5a99c34e4176c
https://github.com/radarcovid/radar-covid-android
gopher_parsedir.js
javascript
module.exports = function gopher_parsedir (dirent) { // eslint-disable-line camelcase // discuss at: https://locutus.io/php/gopher_parsedir/ // original by: Brett Zamir (https://brett-zamir.me) // example 1: var entry = gopher_parsedir('0All about my gopher site.\t/allabout.txt\tgopher.example.com\t70\u000d\u0...
module.exports = function gopher_parsedir (dirent) { // eslint-disable-line camelcase // discuss at: https://locutus.io/php/gopher_parsedir/ // original by: Brett Zamir (https://brett-zamir.me) // example 1: var entry = gopher_parsedir('0All about my gopher site.\t/allabout.txt\tgopher.example.com\t70\u000d\u0...
eb863321990e7e5514aa14f68b8d9978ece9e65e
https://github.com/locutusjs/locutus
FakeInfectionReportWorker.kt
kotlin
/* * Copyright (c) 2020 Gobierno de España * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * SPDX-License-Identifier: MPL-2.0 */ package es.gob.radarcovid....
/* * Copyright (c) 2020 Gobierno de España * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * SPDX-License-Identifier: MPL-2.0 */ package es.gob.radarcovid....
ea0c4cc837f72f58e2b5df1ecf0899743ec3cdf8
https://github.com/radarcovid/radar-covid-android
AcceptRoutingHandler-inl.h
objective-c
/* * Copyright 2017-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
/* * Copyright 2017-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
3b17ba10a82c71e7808760e027ac6af687e06074
https://github.com/facebook/wangle
agenda_list.php
php
<?php /* For licensing terms, see /license.txt */ require_once __DIR__.'/../inc/global.inc.php'; $action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'calendar_list'; $logInfo = [ 'tool' => TOOL_CALENDAR_EVENT, 'action' => $action, ]; Event::registerLog($logInfo); $type = isset($_REQU...
<?php /* For licensing terms, see /license.txt */ require_once __DIR__.'/../inc/global.inc.php'; $action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'calendar_list'; $logInfo = [ 'tool' => TOOL_CALENDAR_EVENT, 'action' => $action, ]; Event::registerLog($logInfo); $typeList = ['person...
d939402d83bf68af5377b629883d8e5437d843ec
https://github.com/chamilo/chamilo-lms
decoder_allocators.hpp
c++
/* Copyright (c) 2007-2016 Contributors as noted in the AUTHORS file This file is part of libzmq, the ZeroMQ core engine in C++. libzmq is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Found...
/* Copyright (c) 2007-2016 Contributors as noted in the AUTHORS file This file is part of libzmq, the ZeroMQ core engine in C++. libzmq is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Found...
397ac80850bf8d010fae23dd215db0ee2c677306
https://github.com/zeromq/libzmq
chef.py
python
# -*- coding: utf-8 -*- ''' Execute chef in server or solo mode ''' # Import Python libs import logging import os import tempfile # Import Salt libs import salt.utils import salt.utils.decorators as decorators log = logging.getLogger(__name__) def __virtual__(): ''' Only load if chef is installed ''' ...
# -*- coding: utf-8 -*- ''' Execute chef in server or solo mode ''' # Import Python libs import logging import os import tempfile # Import Salt libs import salt.utils import salt.utils.decorators as decorators log = logging.getLogger(__name__) def __virtual__(): ''' Only load if chef is installed ''' ...
22d2f7a1ec93300c34e8c42d14ec39d51e610b5c
https://github.com/saltstack/salt
forgotpassword.php
php
<?php /** * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. * @version //autogentag// * @package kernel */ $tpl = eZTemplate::factory(); $tpl->setVariable( 'generated', false ); $tpl->setVariabl...
<?php /** * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. * @version //autogentag// * @package kernel */ $tpl = eZTemplate::factory(); $tpl->setVariable( 'generated', false ); $tpl->setVariabl...
5908d5ee65fec61ce0e321d586530461a210bf2a
https://github.com/gitter-badger/ezpublish-modern-legacy
xfs_linux.h
objective-c
/* * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be ...
/* * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be ...
b31ff3cdf540110da4572e3e29bd172087af65cc
https://github.com/torvalds/linux
AbstractSignatureReader.php
php
<?php /* * This file is part of the LightSAML-Core package. * * (c) Milos Tomic <tmilos@lightsaml.com> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace LightSaml\Model\XmlDSig; use LightSaml\Credential\CredentialInterface; use LightSa...
<?php /* * This file is part of the LightSAML-Core package. * * (c) Milos Tomic <tmilos@lightsaml.com> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace LightSaml\Model\XmlDSig; use LightSaml\Credential\CredentialInterface; use LightSa...
47cef07bb09779df15620799f3763d1b8d32307a
https://github.com/lightsaml/lightsaml
login_filter.rb
ruby
module Sns::LoginFilter extend ActiveSupport::Concern included do protect_from_forgery except: :remote_login skip_before_action :verify_authenticity_token unless SS.config.env.protect_csrf prepend_view_path "app/views/sns/login" layout "ss/login" navi_view nil end private def remote_log...
module Sns::LoginFilter extend ActiveSupport::Concern included do protect_from_forgery except: :remote_login skip_before_action :verify_authenticity_token unless SS.config.env.protect_csrf prepend_view_path "app/views/sns/login" layout "ss/login" navi_view nil end private def remote_log...
6016948ea535e51b16535888af13df064a1a15d3
https://github.com/shirasagi/shirasagi
string_api.php
php
<?php # MantisBT - a php based bugtracking system # MantisBT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # MantisBT is distribut...
<?php # MantisBT - a php based bugtracking system # MantisBT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # MantisBT is distribut...
d95f070db852614fa18ccca6a4f12f4bffede1fd
https://github.com/mantisbt/mantisbt
login.php
php
<?php namespace MediaWiki\Extension\ScratchOAuth2\Common; require_once __DIR__ . "/consts.php"; require_once __DIR__ . "/db.php"; class SOA2Login { /** * Generate the Scratch verification code. * @param string $username the username to generate the code for */ public static function gen_code( $session ) { ...
<?php namespace MediaWiki\Extension\ScratchOAuth2\Common; require_once __DIR__ . "/consts.php"; require_once __DIR__ . "/db.php"; class SOA2Login { /** * Generate the Scratch verification code. * @param string $username the username to generate the code for */ public static function gen_code( $session ) { ...
a91879bd58fa83b09283c0708a1864cdf067c64a
https://github.com/scratchverifier/scratchoauth2
string_api.php
php
<?php # MantisBT - A PHP based bugtracking system # MantisBT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # MantisBT is distribut...
<?php # MantisBT - A PHP based bugtracking system # MantisBT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # MantisBT is distribut...
e7e2b5503580e42db9d91e0d599d61d3ff03c27e
https://github.com/mantisbt/mantisbt
tag_schema.go
go
package schema import ( "strings" "github.com/answerdev/answer/internal/base/reason" "github.com/answerdev/answer/internal/base/validator" "github.com/answerdev/answer/pkg/converter" "github.com/segmentfault/pacman/errors" ) // SearchTagLikeReq get tag list all request type SearchTagLikeReq struct { // tag Ta...
package schema import ( "strings" "github.com/answerdev/answer/internal/base/reason" "github.com/answerdev/answer/internal/base/validator" "github.com/answerdev/answer/pkg/converter" "github.com/segmentfault/pacman/errors" ) // SearchTagLikeReq get tag list all request type SearchTagLikeReq struct { // tag Ta...
90bfa0dcc7b49482f1d1e31aee3ab073f3c13dd9
https://github.com/answerdev/answer
config.py
python
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Config Utils. """ import yaml from collections import namedtuple WorldConfig = namedtuple( "WorldConfig", [...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Config Utils. """ import yaml from collections import namedtuple WorldConfig = namedtuple( "WorldConfig", [...
507d066ef432ea27d3e201da08009872a2f37725
https://github.com/facebookresearch/parlai
TokenBasedRememberMeServices.php
php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Http\RememberMe; use Symfony\Component\HttpF...
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Http\RememberMe; use Symfony\Component\HttpF...
a29ce2817cf43bb1850cf6af114004ac26c7a081
https://github.com/symfony/symfony
ImageRepo.php
php
<?php namespace BookStack\Uploads; use BookStack\Auth\Permissions\PermissionService; use BookStack\Entities\Models\Page; use BookStack\Exceptions\ImageUploadException; use Exception; use Illuminate\Database\Eloquent\Builder; use Symfony\Component\HttpFoundation\File\UploadedFile; class ImageRepo { protected $ima...
<?php namespace BookStack\Uploads; use BookStack\Auth\Permissions\PermissionService; use BookStack\Entities\Models\Page; use BookStack\Exceptions\ImageUploadException; use Exception; use Illuminate\Database\Eloquent\Builder; use Symfony\Component\HttpFoundation\File\UploadedFile; class ImageRepo { protected $ima...
64937ab826b56d086af9ecea532510d37520ebc8
https://github.com/bookstackapp/bookstack
admin.uploader.php
php
<?php /** * uploader control panel * * Type: * Name: * Date: * Purpose: * Input: * * @author NoWhereMan <real_nowhereman at users dot sf dot com> * */ class admin_uploader extends AdminPanel { var $panelname = 'uploader'; var $actions = array( 'default' => true ); } class admin_uploader_def...
<?php /** * uploader control panel * * Type: * Name: * Date: * Purpose: * Input: * * @author NoWhereMan <real_nowhereman at users dot sf dot com> * */ class admin_uploader extends AdminPanel { var $panelname = 'uploader'; var $actions = array( 'default' => true ); } class admin_uploader_def...
742f8b04f233e3cc52bed11f79fcc9911faee776
https://github.com/flatpressblog/flatpress
admin.uploader.php
php
<?php /** * uploader control panel * * Type: * Name: * Date: * Purpose: * Input: * * @author NoWhereMan <real_nowhereman at users dot sf dot com> * */ class admin_uploader extends AdminPanel { var $panelname = 'uploader'; var $actions = array( 'default' => true ); } class admin_uploader_def...
<?php /** * uploader control panel * * Type: * Name: * Date: * Purpose: * Input: * * @author NoWhereMan <real_nowhereman at users dot sf dot com> * */ class admin_uploader extends AdminPanel { var $panelname = 'uploader'; var $actions = array( 'default' => true ); } class admin_uploader_def...
f6394eac7a0e001d2b1ac638d3313e531d19ea93
https://github.com/flatpressblog/flatpress
admin.uploader.php
php
<?php /** * uploader control panel * * Type: * Name: * Date: * Purpose: * Input: * * @author NoWhereMan <real_nowhereman at users dot sf dot com> * */ class admin_uploader extends AdminPanel { var $panelname = 'uploader'; var $actions = array( 'default' => true ); } class admin_uploader_def...
<?php /** * uploader control panel * * Type: * Name: * Date: * Purpose: * Input: * * @author NoWhereMan <real_nowhereman at users dot sf dot com> * */ class admin_uploader extends AdminPanel { var $panelname = 'uploader'; var $actions = array( 'default' => true ); } class admin_uploader_def...
3cc223dec5260e533a84b5cf5780d3a4fbf21241
https://github.com/flatpressblog/flatpress
inc_version.php
php
<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2019 * * ...
<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2019 * * ...
824d17f424bf77d17af89c18c3dc807a3199567e
https://github.com/spip/spip
SImExporter.php
php
<?php /** * This file is part of the Froxlor project. * Copyright (c) 2010 the Froxlor Team (see authors). * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the Lic...
<?php /** * This file is part of the Froxlor project. * Copyright (c) 2010 the Froxlor Team (see authors). * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the Lic...
983d9294603925018225d672795bd8b4a526f41e
https://github.com/froxlor/froxlor
NagVisHoverUrl.php
php
<?php /***************************************************************************** * * NagVisHoverUrl.php - Class for handling the hover urls * * Copyright (c) 2004-2016 NagVis Project (Contact: info@nagvis.org) * * License: * * This program is free software; you can redistribute it and/or modify * it under ...
<?php /***************************************************************************** * * NagVisHoverUrl.php - Class for handling the hover urls * * Copyright (c) 2004-2016 NagVis Project (Contact: info@nagvis.org) * * License: * * This program is free software; you can redistribute it and/or modify * it under ...
71aba7f46f79d846e1df037f165d206a2cd1d22a
https://github.com/nagvis/nagvis
login.inc.php
php
<?php // This fill will perform HTTP digest authentication. This is not the most secure form of authentication so be carefull when using this. function authHttpDigest() { global $config; $realm = 'phpRedisAdmin'; // Using the md5 of the user agent and IP should make it a bit harder to intercept and reuse...
<?php // This fill will perform HTTP digest authentication. This is not the most secure form of authentication so be carefull when using this. function authHttpDigest() { global $config; $realm = 'phpRedisAdmin'; // Using the md5 of the user agent and IP should make it a bit harder to intercept and reuse...
31aa7661e6db6f4dffbf9a635817832a0a11c7d9
https://github.com/erikdubbelboer/phpredisadmin
misc.py
python
# -*- coding: utf-8 -*- import random import socket import string import js2py from .check import is_mapping def random_string(length): seq = string.ascii_letters + string.digits + string.punctuation return "".join(random.choice(seq) for _ in range(length)) def is_plural(value): try: n = abs(...
# -*- coding: utf-8 -*- import random import string import js2py js2py.disable_pyimport() def random_string(length): seq = string.ascii_letters + string.digits + string.punctuation return "".join(random.choice(seq) for _ in range(length)) def is_plural(value): try: n = abs(float(value)) ...
7d73ba7919e594d783b3411d7ddb87885aea782d
https://github.com/pyload/pyload
embed.js
javascript
(function() { 'use strict'; var ready = function(loaded) { if (['interactive', 'complete'].indexOf(document.readyState) !== -1) { loaded(); } else { document.addEventListener('DOMContentLoaded', loaded); } }; ready(function() { var iframes = []; window.addEventListener('messag...
(function() { 'use strict'; var ready = function(loaded) { if (['interactive', 'complete'].indexOf(document.readyState) !== -1) { loaded(); } else { document.addEventListener('DOMContentLoaded', loaded); } }; ready(function() { var iframes = []; window.addEventListener('messag...
4d6d4b43c6186a13e67b92eaf70fe1b70ea24a09
https://github.com/mastodon/mastodon
nf_nat_redirect.c
c
/* * (C) 1999-2001 Paul `Rusty' Russell * (C) 2002-2006 Netfilter Core Team <coreteam@netfilter.org> * Copyright (c) 2011 Patrick McHardy <kaber@trash.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by t...
/* * (C) 1999-2001 Paul `Rusty' Russell * (C) 2002-2006 Netfilter Core Team <coreteam@netfilter.org> * Copyright (c) 2011 Patrick McHardy <kaber@trash.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by t...
94f9cd81436c85d8c3a318ba92e236ede73752fc
https://github.com/torvalds/linux
full_type_util.cc
c++
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
0657c83d08845cc434175934c642299de2c0f042
https://github.com/tensorflow/tensorflow
article_save.php
php
<?php /** * article save and update * @package EMLOG * @link https://www.emlog.net */ /** * @var string $action * @var object $CACHE */ require_once 'globals.php'; $Log_Model = new Log_Model(); $Tag_Model = new Tag_Model(); $title = isset($_POST['title']) ? addslashes(trim($_POST['title'])) : ''; $postDate =...
<?php /** * article save and update * @package EMLOG * @link https://www.emlog.net */ /** * @var string $action * @var object $CACHE */ require_once 'globals.php'; $Log_Model = new Log_Model(); $Tag_Model = new Tag_Model(); $title = isset($_POST['title']) ? addslashes(trim($_POST['title'])) : ''; $postDate =...
5bf7a79826e0ea09bcc8a21f69a0c74107761a02
https://github.com/emlog/emlog
resource_ops.cc
c++
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
5ecec9c6fbdbc6be03295685190a45e7eee726ab
https://github.com/tensorflow/tensorflow
FileController.php
php
<?php /** * SEOmatic plugin for Craft CMS 3.x * * A turnkey SEO implementation for Craft CMS that is comprehensive, powerful, * and flexible * * @link https://nystudio107.com * @copyright Copyright (c) 2017 nystudio107 */ namespace nystudio107\seomatic\controllers; use nystudio107\seomatic\helpers\UrlHel...
<?php /** * SEOmatic plugin for Craft CMS 3.x * * A turnkey SEO implementation for Craft CMS that is comprehensive, powerful, * and flexible * * @link https://nystudio107.com * @copyright Copyright (c) 2017 nystudio107 */ namespace nystudio107\seomatic\controllers; use nystudio107\seomatic\helpers\UrlHel...
4e46b792ce973ac0c652fb330055f41aca1981c8
https://github.com/nystudio107/craft-seomatic
v1api.go
go
package v1 import ( "encoding/json" "net/http" "github.com/KubeOperator/KubeOperator/pkg/controller" "github.com/KubeOperator/KubeOperator/pkg/errorf" "github.com/KubeOperator/KubeOperator/pkg/middleware" "github.com/jinzhu/gorm" "github.com/kataras/iris/v12" "github.com/kataras/iris/v12/context" "github.com...
package v1 import ( "encoding/json" "net/http" "github.com/KubeOperator/KubeOperator/pkg/controller" "github.com/KubeOperator/KubeOperator/pkg/errorf" "github.com/KubeOperator/KubeOperator/pkg/middleware" "github.com/jinzhu/gorm" "github.com/kataras/iris/v12" "github.com/kataras/iris/v12/context" "github.com...
7ef42bf1c16900d13e6376f8be5ecdbfdfb44aaf
https://github.com/kubeoperator/kubeoperator
mobile_detection.rb
ruby
# frozen_string_literal: true module MobileDetection def self.mobile_device?(user_agent) user_agent =~ /Mobile/ && !(user_agent =~ /iPad/) end # we need this as a reusable chunk that is called from the cache def self.resolve_mobile_view!(user_agent, params, session) return false unless SiteSetting.ena...
# frozen_string_literal: true module MobileDetection def self.mobile_device?(user_agent) user_agent =~ /Mobile/ && !(user_agent =~ /iPad/) end # we need this as a reusable chunk that is called from the cache def self.resolve_mobile_view!(user_agent, params, session) return false unless SiteSetting.ena...
6d92c3cbdac431db99a450f360a3048bb3aaf458
https://github.com/discourse/discourse
FeedProxy.aspx.cs
smalltalk
using Umbraco.Core.Logging; using Umbraco.Web; namespace dashboardUtilities { using System; using System.Linq; using System.Net; using System.Net.Mime; using umbraco; using umbraco.BasePages; using umbraco.BusinessLogic; using Umbraco.Core.IO; public partial class Fe...
using Umbraco.Core.Logging; using Umbraco.Web; namespace dashboardUtilities { using System; using System.Linq; using System.Net; using System.Net.Mime; using umbraco; using umbraco.BasePages; using umbraco.BusinessLogic; using Umbraco.Core.IO; public partial class Fe...
924a016ffe7ae7ea6d516c07a7852f0095eddbce
https://github.com/umbraco/umbraco-cms
userscript.js
javascript
export default async function ({ addon, console }) { await addon.tab.loadScript("https://cdn.jsdelivr.net/npm/linkifyjs@2.1.9/dist/linkify.min.js"); await addon.tab.loadScript("https://cdn.jsdelivr.net/npm/linkifyjs@2.1.9/dist/linkify-element.min.js"); const pageType = document.location.pathname.substr(1).split(...
export default async function ({ addon, console }) { await addon.tab.loadScript("https://cdn.jsdelivr.net/npm/linkifyjs@2.1.9/dist/linkify.min.js"); await addon.tab.loadScript("https://cdn.jsdelivr.net/npm/linkifyjs@2.1.9/dist/linkify-element.min.js"); const pageType = document.location.pathname.substr(1).split(...
b9a52d6532c8514254c7cc1d8e18710dbedc41ff
https://github.com/scratchaddons/scratchaddons
_editAttribute.php
php
<div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title" id="participant_edit_modal"><?php if ($editType == 'new') : eT('Add attribute'); else: eT('Edit attribute'); endif; ?></h4> </div> <div ...
<div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title" id="participant_edit_modal"><?php if ($editType == 'new') : eT('Add attribute'); else: eT('Edit attribute'); endif; ?></h4> </div> <div ...
38e1ab069b538de7cb5f3a04939aba8e835640cb
https://github.com/limesurvey/limesurvey
uaccess.h
objective-c
#ifndef _ASM_X86_UACCESS_H #define _ASM_X86_UACCESS_H /* * User space memory access functions */ #include <linux/errno.h> #include <linux/compiler.h> #include <linux/kasan-checks.h> #include <linux/thread_info.h> #include <linux/string.h> #include <asm/asm.h> #include <asm/page.h> #include <asm/smap.h> #define VERIF...
#ifndef _ASM_X86_UACCESS_H #define _ASM_X86_UACCESS_H /* * User space memory access functions */ #include <linux/errno.h> #include <linux/compiler.h> #include <linux/kasan-checks.h> #include <linux/thread_info.h> #include <linux/string.h> #include <asm/asm.h> #include <asm/page.h> #include <asm/smap.h> #define VERIF...
1c109fabbd51863475cd12ac206bdd249aee35af
https://github.com/torvalds/linux
full_type_util.cc
c++
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
8a513cec4bec15961fbfdedcaa5376522980455c
https://github.com/tensorflow/tensorflow
opj_mj2_extract.c
c
/* * The copyright in this software is being made available under the 2-clauses * BSD License, included below. This software may be subject to other third * party and contributor rights, including patent rights, and no such rights * are granted under this license. * * Copyright (c) 2002-2014, Universite catholiqu...
/* * The copyright in this software is being made available under the 2-clauses * BSD License, included below. This software may be subject to other third * party and contributor rights, including patent rights, and no such rights * are granted under this license. * * Copyright (c) 2002-2014, Universite catholiqu...
cc3824767bde397fedb8a1ae4786a222ba860c8d
https://github.com/uclouvain/openjpeg
RegisteredHeaders.cc
c++
/* * Copyright (C) 1996-2020 The Squid Software Foundation and contributors * * Squid software is distributed under GPLv2+ license and includes * contributions from numerous individuals and organizations. * Please see the COPYING and CONTRIBUTORS files for details. */ #include "squid.h" #include "RegisteredHeade...
/* * Copyright (C) 1996-2020 The Squid Software Foundation and contributors * * Squid software is distributed under GPLv2+ license and includes * contributions from numerous individuals and organizations. * Please see the COPYING and CONTRIBUTORS files for details. */ #include "squid.h" #include "RegisteredHeade...
051824924c709bd6162a378f746fb859454c674e
https://github.com/squid-cache/squid
DefaultCustomerView.php
php
<?php /** * Pimcore * * This source file is available under two different licenses: * - GNU General Public License version 3 (GPLv3) * - Pimcore Commercial License (PCL) * Full copyright and license information is available in * LICENSE.md which is distributed with this source code. * * @copyright Copyright...
<?php /** * Pimcore * * This source file is available under two different licenses: * - GNU General Public License version 3 (GPLv3) * - Pimcore Commercial License (PCL) * Full copyright and license information is available in * LICENSE.md which is distributed with this source code. * * @copyright Copyright...
d1d58c10313f080737dc1e71fab3beb12488a1e6
https://github.com/pimcore/customer-data-framework
index.php
php
<?php /** * This code is part of GOsa (http://www.gosa-project.org) * Copyright (C) 2003-2008 GONICUS GmbH * * ID: $$Id$$ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either versio...
<?php /** * This code is part of GOsa (http://www.gosa-project.org) * Copyright (C) 2003-2008 GONICUS GmbH * * ID: $$Id$$ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either versio...
e35b990464a2c2cf64d6833a217ed944876e7732
https://github.com/gosa-project/gosa-core
index.js
javascript
var Promise = require('es6-promise').Promise; var async = require('async'); var cp = require('child_process'); var notEmpty = function(x) {return x}; module.exports = function killport(port) { return (new Promise(function(resolve, reject) { var cmd = 'lsof -i:' + port; cp.exec(cmd, function(err, stdout, std...
var Promise = require('es6-promise').Promise; var async = require('async'); var cp = require('child_process'); var notEmpty = function(x) {return x}; module.exports = function killport(port) { return (new Promise(function(resolve, reject) { if (!/^\d+$/.test(port)) throw new Error('port must be a number.'); ...
bec8e371f170a12e11cd222ffc7a6e1ae9942638
https://github.com/ssnau/killport
udp_offload.c
c
/* * IPV6 GSO/GRO offload support * Linux INET6 implementation * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any ...
/* * IPV6 GSO/GRO offload support * Linux INET6 implementation * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any ...
0e033e04c2678dbbe74a46b23fffb7bb918c288e
https://github.com/torvalds/linux
install_req.go
go
package install import ( "fmt" "net/url" "strings" "github.com/answerdev/answer/internal/base/reason" "github.com/answerdev/answer/internal/base/validator" "github.com/answerdev/answer/pkg/checker" "github.com/segmentfault/pacman/errors" "xorm.io/xorm/schemas" ) // CheckConfigFileResp check config file if ex...
package install import ( "fmt" "net/url" "strings" "github.com/answerdev/answer/internal/base/reason" "github.com/answerdev/answer/internal/base/validator" "github.com/answerdev/answer/pkg/checker" "github.com/segmentfault/pacman/errors" "xorm.io/xorm/schemas" ) // CheckConfigFileResp check config file if ex...
9870ed87fb24ed468aaf1e169c2d028e0f375106
https://github.com/answerdev/answer
Definitions.php
php
<?php namespace October\Rain\Filesystem; use Config; use Exception; /** * File definitions helper. * Contains file extensions for common use cases. * * @package october\filesystem * @author Alexey Bobkov, Samuel Georges */ class Definitions { /** * Entry point to request a definition set. * @para...
<?php namespace October\Rain\Filesystem; use Config; use Exception; /** * File definitions helper. * Contains file extensions for common use cases. * * @package october\filesystem * @author Alexey Bobkov, Samuel Georges */ class Definitions { /** * Entry point to request a definition set. * @para...
3bbbbf3da469f457881b5af902eb0b89b95189a2
https://github.com/octobercms/library
FileOutputStream.java
java
/* Copyright (c) 2008-2015, Avian Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. There is NO WARRANTY for this software. See l...
/* Copyright (c) 2008-2015, Avian Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. There is NO WARRANTY for this software. See l...
0871979b298add320ca63f65060acb7532c8a0dd
https://github.com/readytalk/avian
PcxDecode.c
c
/* * The Python Imaging Library. * $Id$ * * decoder for PCX image data. * * history: * 95-09-14 fl Created * * Copyright (c) Fredrik Lundh 1995. * Copyright (c) Secret Labs AB 1997. * * See the README file for information on usage and redistribution. */ #include "Imaging.h" int ImagingPcxDecode(Imaging ...
/* * The Python Imaging Library. * $Id$ * * decoder for PCX image data. * * history: * 95-09-14 fl Created * * Copyright (c) Fredrik Lundh 1995. * Copyright (c) Secret Labs AB 1997. * * See the README file for information on usage and redistribution. */ #include "Imaging.h" int ImagingPcxDecode(Imaging ...
6a83e4324738bb0452fbe8074a995b1c73f08de7
https://github.com/python-pillow/pillow
routing.py
python
import socketio import traceback from ajenti.http import HttpHandler from ajenti.api import BasePlugin, plugin, persistent, rootcontext from ajenti.api.http import HttpPlugin, SocketPlugin from ajenti.plugins import manager from ajenti.profiler import * class SocketIORouteHandler (HttpHandler): def __init__(self...
import cgi import socketio import traceback from ajenti.http import HttpHandler from ajenti.api import BasePlugin, plugin, persistent, rootcontext from ajenti.api.http import HttpPlugin, SocketPlugin from ajenti.plugins import manager from ajenti.profiler import * class SocketIORouteHandler (HttpHandler): def __...
d3fc5eb142ff16d55d158afb050af18d5ff09120
https://github.com/eugeny/ajenti
BackupConfigControllerV1.java
java
/* * Copyright 2021 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
/* * Copyright 2021 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
7d0baab0d361c377af84994f95ba76c280048548
https://github.com/gocd/gocd
markdown.go
go
package converter import ( "bytes" "github.com/asaskevich/govalidator" "github.com/microcosm-cc/bluemonday" "github.com/segmentfault/pacman/log" "github.com/yuin/goldmark" "github.com/yuin/goldmark/ast" "github.com/yuin/goldmark/extension" "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/renderer"...
package converter import ( "bytes" "github.com/asaskevich/govalidator" "github.com/microcosm-cc/bluemonday" "github.com/segmentfault/pacman/log" "github.com/yuin/goldmark" "github.com/yuin/goldmark/ast" "github.com/yuin/goldmark/extension" "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/renderer"...
c3743bad4f2a69f69f8f1e1e5b4b6524fc03da25
https://github.com/answerdev/answer
regex.py
python
# -*- coding: utf-8 -*- # # This file is part of Radicale Server - Calendar Server # Copyright © 2008 Nicolas Kandel # Copyright © 2008 Pascal Halter # Copyright © 2008-2013 Guillaume Ayoub # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
# -*- coding: utf-8 -*- # # This file is part of Radicale Server - Calendar Server # Copyright © 2008 Nicolas Kandel # Copyright © 2008 Pascal Halter # Copyright © 2008-2013 Guillaume Ayoub # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
4bfe7c9f7991d534c8b9fbe153af9d341f925f98
https://github.com/unrud/radicale
SpotPage_login.php
php
<?php class SpotPage_login extends SpotPage_Abs { private $_loginForm; private $_params; public function __construct(Dao_Factory $daoFactory, Services_Settings_Container $settings, array $currentSession, array $params) { parent::__construct($daoFactory, $settings, $currentSession); $t...
<?php class SpotPage_login extends SpotPage_Abs { private $_loginForm; private $_params; public function __construct(Dao_Factory $daoFactory, Services_Settings_Container $settings, array $currentSession, array $params) { parent::__construct($daoFactory, $settings, $currentSession); $t...
2bfa001689aae96009688a193c64478647ba45a1
https://github.com/spotweb/spotweb
slide.js
javascript
/* eslint-env browser, jquery */ /* global serverurl, Reveal, RevealMarkdown */ import { preventXSS } from './render' import { md, updateLastChange, removeDOMEvents, finishView } from './extra' require('../css/extra.css') require('../css/site.css') const body = preventXSS($('.slides').text()) window.createtime = wi...
/* eslint-env browser, jquery */ /* global serverurl, Reveal, RevealMarkdown */ import { preventXSS } from './render' import { md, updateLastChange, removeDOMEvents, finishView } from './extra' require('../css/extra.css') require('../css/site.css') const body = preventXSS($('.slides').text()) window.createtime = wi...
35b0d39a12aa35f27fba8c1f50b1886706e7efef
https://github.com/hedgedoc/hedgedoc
004-message_bus.rb
ruby
# frozen_string_literal: true if GlobalSetting.skip_redis? MessageBus.configure(backend: :memory) return end MessageBus.site_id_lookup do |env = nil| if env setup_message_bus_env(env) env["__mb"][:site_id] else RailsMultisite::ConnectionManagement.current_db end end def setup_message_bus_env(en...
# frozen_string_literal: true if GlobalSetting.skip_redis? MessageBus.configure(backend: :memory) return end MessageBus.site_id_lookup do |env = nil| if env setup_message_bus_env(env) env["__mb"][:site_id] else RailsMultisite::ConnectionManagement.current_db end end def setup_message_bus_env(en...
7a8ec129fb54f188b2da6588c9d24d3a36eb0d39
https://github.com/discourse/discourse
web.php
php
<?php use Crater\Http\Controllers\V1\Admin\Auth\LoginController; use Crater\Http\Controllers\V1\Admin\Expense\ShowReceiptController; use Crater\Http\Controllers\V1\Admin\Report\CustomerSalesReportController; use Crater\Http\Controllers\V1\Admin\Report\ExpensesReportController; use Crater\Http\Controllers\V1\Admin\Repo...
<?php use Crater\Http\Controllers\V1\Admin\Auth\LoginController; use Crater\Http\Controllers\V1\Admin\Expense\ShowReceiptController; use Crater\Http\Controllers\V1\Admin\Report\CustomerSalesReportController; use Crater\Http\Controllers\V1\Admin\Report\ExpensesReportController; use Crater\Http\Controllers\V1\Admin\Repo...
2b7028b7c83fd6e8897f244a2e6723baa20479e5
https://github.com/crater-invoice/crater
server.rs
rust
use nix::unistd; use std::io::prelude::*; use std::os::unix::net::UnixListener; use std::{ env, fs, path::Path, process::{exit, id, Command, Stdio}, }; use sysinfo::{ProcessExt, System, SystemExt}; fn main() -> std::io::Result<()> { env::set_var("RUST_LOG", "swhks=trace"); env_logger::init(); ...
use nix::unistd; use std::io::prelude::*; use std::os::unix::net::UnixListener; use std::{ env, fs, path::Path, process::{exit, id, Command, Stdio}, }; use sysinfo::{ProcessExt, System, SystemExt}; fn main() -> std::io::Result<()> { env::set_var("RUST_LOG", "swhks=trace"); env_logger::init(); ...
0b620a09605afb815c6d8d8953bbb7a10a8c0575
https://github.com/waycrate/swhkd
class.ilImportExportFactory.php
php
<?php /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */ /** * Factory for importer/exporter implementers * * @author Stefan Meyer <smeyer.ilias@gmx.de> * $Id$ */ class ilImportExportFactory { const PLUGINS_DIR = "Plugins"; public static function getExporterClass($a_type) ...
<?php /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */ /** * Factory for importer/exporter implementers * * @author Stefan Meyer <smeyer.ilias@gmx.de> * $Id$ */ class ilImportExportFactory { const PLUGINS_DIR = "Plugins"; public static function getExporterClass($a_type) ...
6717c4ecc6d076154ce185f1ea052f07f37e3537
https://github.com/ilias-elearning/ilias
api.php
php
<?php /** * Created by PhpStorm. * User: Bojidar * Date: 10/7/2020 * Time: 5:50 PM */ use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Route; Route::get('api/users/export_my_data', function (\Illuminate\Http\Request $request) { if (!is_logged()) { return array('error' => 'You must be l...
<?php /** * Created by PhpStorm. * User: Bojidar * Date: 10/7/2020 * Time: 5:50 PM */ use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Route; Route::get('api/users/export_my_data', function (\Illuminate\Http\Request $request) { if (!is_logged()) { return array('error' => 'You must be l...
f43d5b767ad5814fc5f84bbaf0b77996262f3a4b
https://github.com/microweber/microweber
expand_dims.cc
c++
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
d94ffe08a65400f898241c0374e9edc6fa8ed257
https://github.com/tensorflow/tensorflow
Model.php
php
<?php namespace Backend\Modules\FormBuilder\Engine; use Backend\Core\Language\Language as BL; use Backend\Core\Engine\Model as BackendModel; use Common\ModuleExtraType; use Frontend\Core\Language\Language as FL; use Symfony\Component\Finder\Finder; /** * In this file we store all generic functions that we will be u...
<?php namespace Backend\Modules\FormBuilder\Engine; use Backend\Core\Language\Language as BL; use Backend\Core\Engine\Model as BackendModel; use Common\ModuleExtraType; use Frontend\Core\Language\Language as FL; use Symfony\Component\Finder\Finder; /** * In this file we store all generic functions that we will be u...
7a12046a67ae5d8cf04face3ee75e55f03a1a608
https://github.com/forkcms/forkcms
slip.c
c
// SPDX-License-Identifier: GPL-2.0-only /* * slip.c This module implements the SLIP protocol for kernel-based * devices like TTY. It interfaces between a raw TTY, and the * kernel's INET protocol layers. * * Version: @(#)slip.c 0.8.3 12/24/94 * * Authors: Laurence Culhane, <loz@holmes.demon.co.uk> * Fred N...
// SPDX-License-Identifier: GPL-2.0-only /* * slip.c This module implements the SLIP protocol for kernel-based * devices like TTY. It interfaces between a raw TTY, and the * kernel's INET protocol layers. * * Version: @(#)slip.c 0.8.3 12/24/94 * * Authors: Laurence Culhane, <loz@holmes.demon.co.uk> * Fred N...
ec4eb8a86ade4d22633e1da2a7d85a846b7d1798
https://github.com/torvalds/linux
tool_msgs.c
c
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
d530e92f59ae9bb2d47066c3c460b25d2ffeb211
https://github.com/curl/curl
secure.c
c
/* ---------------------------------------------------------------------------- * ATMEL Microcontroller Software Support * ---------------------------------------------------------------------------- * Copyright (c) 2015, Atmel Corporation * * All rights reserved. * * Redistribution and use in source and...
/* ---------------------------------------------------------------------------- * ATMEL Microcontroller Software Support * ---------------------------------------------------------------------------- * Copyright (c) 2015, Atmel Corporation * * All rights reserved. * * Redistribution and use in source and...
7753914c9a622c245f3a3cf2af5e24b6a9904213
https://github.com/linux4sam/at91bootstrap
HostnameActions.php
php
<?php /* * This file is part of the hyn/multi-tenant package. * * (c) Daniël Klabbers <daniel@klabbers.email> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @see https://tenancy.dev * @see https://github.com/hyn/multi-tenant ...
<?php /* * This file is part of the hyn/multi-tenant package. * * (c) Daniël Klabbers <daniel@klabbers.email> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @see https://tenancy.dev * @see https://github.com/hyn/multi-tenant ...
9c837a21bccce9bcaeb90033ef200d84f0d9e164
https://github.com/tenancy/multi-tenant
index.js
javascript
/*! * merge-deep <https://github.com/jonschlinkert/merge-deep> * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; var utils = require('./utils'); module.exports = function mergeDeep(orig, objects) { if (!utils.isObject(orig) && !Array.isArray(orig)) { orig = {}...
/*! * merge-deep <https://github.com/jonschlinkert/merge-deep> * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; var utils = require('./utils'); module.exports = function mergeDeep(orig, objects) { if (!utils.isObject(orig) && !Array.isArray(orig)) { orig = {}...
2c33634da7129a5aefcc262d2fec2e72224404e5
https://github.com/jonschlinkert/merge-deep
hrtimer.c
c
/* * ALSA timer back-end using hrtimer * Copyright (C) 2008 Takashi Iwai * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) a...
/* * ALSA timer back-end using hrtimer * Copyright (C) 2008 Takashi Iwai * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) a...
2ba1fe7a06d3624f9a7586d672b55f08f7c670f3
https://github.com/torvalds/linux
i18n-node-routes.js
javascript
/** * Copyright (C) 2014, Oliver Salzburg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, p...
/** * Copyright (C) 2014, Oliver Salzburg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, p...
877720d2d9bb90dc8233706e81ffa03f99fc9dc8
https://github.com/oliversalzburg/i18n-node-angular
views.py
python
from django.shortcuts import render from django.views.generic import TemplateView, View from haystack.query import SearchQuerySet from haystack.utils.geo import Point from django.http import HttpResponse from django.contrib.gis.measure import D from django.contrib.gis.geos import GEOSGeometry from django.db import conn...
from django.shortcuts import render from django.views.generic import TemplateView, View from haystack.query import SearchQuerySet from haystack.utils.geo import Point from django.http import HttpResponse from django.contrib.gis.measure import D from django.contrib.gis.geos import GEOSGeometry from django.db import conn...
829a027aca7c17f5a7ec1addca8dd5d5542f86ac
https://github.com/mnbikeways/database
JBPMBpmn2ResourceImpl.java
java
package org.jbpm.designer.bpmn2.resource; import bpsim.impl.BpsimPackageImpl; import org.eclipse.bpmn2.*; import org.eclipse.bpmn2.util.Bpmn2ResourceImpl; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.common.util.WrappedException; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.ESt...
package org.jbpm.designer.bpmn2.resource; import bpsim.impl.BpsimPackageImpl; import org.eclipse.bpmn2.*; import org.eclipse.bpmn2.util.Bpmn2ResourceImpl; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.common.util.WrappedException; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.ESt...
69d8f6b7a099594bd0536f88d528753875857088
https://github.com/droolsjbpm/jbpm-designer
hashtable_lookup.cc
c++
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
5117e0851348065ed59c991562c0ec80d9193db2
https://github.com/tensorflow/tensorflow
plupload.php
php
<?php header('Content-Type: application/json'); $files_utils = new \MicroweberPackages\Utils\System\Files(); $dangerous = $files_utils->get_dangerous_files_extentions(); if (!mw()->user_manager->session_id() or (mw()->user_manager->session_all() == false)) { // //session_start(); } $validate_token = false; if...
<?php header('Content-Type: application/json'); $files_utils = new \MicroweberPackages\Utils\System\Files(); $dangerous = $files_utils->get_dangerous_files_extentions(); if (!mw()->user_manager->session_id() or (mw()->user_manager->session_all() == false)) { // //session_start(); } $validate_token = false; if...
0a7e5f1d81de884861ca677ee1aaac31f188d632
https://github.com/microweber/microweber
JBPMBpmn2ResourceImpl.java
java
package org.jbpm.designer.bpmn2.resource; import bpsim.impl.BpsimPackageImpl; import org.eclipse.bpmn2.*; import org.eclipse.bpmn2.util.Bpmn2ResourceImpl; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.common.util.WrappedException; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.ESt...
package org.jbpm.designer.bpmn2.resource; import bpsim.impl.BpsimPackageImpl; import org.eclipse.bpmn2.*; import org.eclipse.bpmn2.util.Bpmn2ResourceImpl; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.common.util.WrappedException; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.ESt...
be3968d51299f6de0011324be60223ede49ecb1c
https://github.com/droolsjbpm/jbpm-designer
index.js
javascript
/* * . .o8 oooo * .o8 "888 `888 * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo * 888 `888""8P `888 `888 d88' `888 d88' `88b d88( "8 888 .8P' * 888 888 888 888 8...
/* * . .o8 oooo * .o8 "888 `888 * .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo * 888 `888""8P `888 `888 d88' `888 d88' `88b d88( "8 888 .8P' * 888 888 888 888 8...
6ea9db7a5cf300e3cbf0eab7e1d6da1155a2f7f8
https://github.com/polonel/trudesk
CapturedFormSubmission.php
php
<?php namespace Bigfork\SilverstripeFormCapture\Model; use SilverStripe\Forms\FieldList; use SilverStripe\Forms\TextField; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\HasManyList; use SilverStripe\Security\PermissionProvider; use SilverStripe\Security\Permission; use SilverStripe\Forms\GridField\GridField; ...
<?php namespace Bigfork\SilverstripeFormCapture\Model; use SilverStripe\Forms\FieldList; use SilverStripe\Forms\TextField; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\HasManyList; use SilverStripe\Security\PermissionProvider; use SilverStripe\Security\Permission; use SilverStripe\Forms\GridField\GridField; ...
5b3aa39dd1eef042f173167b0fa4d3f717971772
https://github.com/bigfork/silverstripe-form-capture
class.authormanager.php
php
<?php /** * @package toolkit */ /** * The `AuthorManager` class is responsible for managing all Author objects * in Symphony. Unlike other Manager objects, Authors are stored in the * database in `tbl_authors` and not on the file system. CRUD methods are * implemented to allow Authors to be created (add),...
<?php /** * @package toolkit */ /** * The `AuthorManager` class is responsible for managing all Author objects * in Symphony. Unlike other Manager objects, Authors are stored in the * database in `tbl_authors` and not on the file system. CRUD methods are * implemented to allow Authors to be created (add),...
6c8aa4e9c810994f7632837487426867ce50f468
https://github.com/symphonycms/symphony-2
seq_buf.c
c
// SPDX-License-Identifier: GPL-2.0 /* * seq_buf.c * * Copyright (C) 2014 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> * * The seq_buf is a handy tool that allows you to pass a descriptor around * to a buffer that other functions can write to. It is similar to the * seq_file functionality but has some diffe...
// SPDX-License-Identifier: GPL-2.0 /* * seq_buf.c * * Copyright (C) 2014 Red Hat Inc, Steven Rostedt <srostedt@redhat.com> * * The seq_buf is a handy tool that allows you to pass a descriptor around * to a buffer that other functions can write to. It is similar to the * seq_file functionality but has some diffe...
d3b16034a24a112bb83aeb669ac5b9b01f744bb7
https://github.com/torvalds/linux
ecalls.cc
c++
/* * * Copyright 2017 Asylo authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
/* * * Copyright 2017 Asylo authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
382da2b8b09cbf928668a2445efb778f76bd9c8a
https://github.com/google/asylo
RequestScopedCache.java
java
/* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat, Inc., and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this fi...
/* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat, Inc., and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this fi...
6808b11cd6d97c71a2eed754ed4f955acd789086
https://github.com/weld/core
ColumnMappingFieldValueDao.class.php
php
<?php /** * Copyright (c) Enalean, 2012. All Rights Reserved. * * This file is a part of Tuleap. * * Tuleap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at you...
<?php /** * Copyright (c) Enalean, 2012-Present. All Rights Reserved. * * This file is a part of Tuleap. * * Tuleap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *...
d6b2f8b8c5098938bc094726a4826479ddbee941
https://github.com/enalean/tuleap
input_missing.go
go
package input import ( "context" "errors" "fmt" "sync" "time" fedapi "github.com/matrix-org/dendrite/federationapi/api" "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/state" "github.com/matrix-org/dendrite/roomserver/stora...
package input import ( "context" "errors" "fmt" "sync" "time" fedapi "github.com/matrix-org/dendrite/federationapi/api" "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/state" "github.com/matrix-org/dendrite/roomserver/stora...
2792d0490f3771488bad346981b8c26479a872c3
https://github.com/matrix-org/dendrite
plupload.php
php
<?php header('Content-Type: application/json'); $files_utils = new \MicroweberPackages\Utils\System\Files(); $dangerous = $files_utils->get_dangerous_files_extentions(); if (!mw()->user_manager->session_id() or (mw()->user_manager->session_all() == false)) { // //session_start(); } $validate_token = false; if...
<?php header('Content-Type: application/json'); $files_utils = new \MicroweberPackages\Utils\System\Files(); $dangerous = $files_utils->get_dangerous_files_extentions(); if (!mw()->user_manager->session_id() or (mw()->user_manager->session_all() == false)) { // //session_start(); } $validate_token = false; if...
9ebbb4dd35da74025ab6965f722829a7f8f86566
https://github.com/microweber/microweber
git.js
javascript
var contra = require("contra"), path = require("path"), fUtils = require("./files"), cp = require("child_process"); var gitApp = "git", gitExtra = { env: process.env }; var escapeQuotes = function (str) { if (typeof str === "string") { return '"' + str.replace(/(["'$`\\])/g, "\\$1") + '"'; } else { ...
var contra = require("contra"), path = require("path"), fUtils = require("./files"), cp = require("child_process"); var gitApp = "git", gitExtra = { env: process.env }; var escapeQuotes = function (str) { if (typeof str === "string") { return '"' + str.replace(/(["'$`\\])/g, "\\$1") + '"'; } else { ...
b7a8b32600e60759a7ad3921ec4a2750bf173482
https://github.com/mikaelbr/mversion
file-handlers.ts
typescript
// express is set like: app.engine('html', require('squirrelly').renderFile) import SqrlErr from './err' import compile from './compile' import { getConfig } from './config' import { getPath, readFile, loadFile } from './file-utils' import { promiseImpl, copyProps } from './utils' /* TYPES */ import { SqrlConfig, Pa...
// express is set like: app.engine('html', require('squirrelly').renderFile) import SqrlErr from './err' import compile from './compile' import { getConfig } from './config' import { getPath, readFile, loadFile } from './file-utils' import { promiseImpl } from './utils' /* TYPES */ import { SqrlConfig, PartialConfig...
dca7a1e7ee91d8a6ffffb655f3f15647486db9da
https://github.com/squirrellyjs/squirrelly
rule-details.lua
lua
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2010-2012 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local sys = require "luci.sys" local utl = require "luci.util" local dsp = require "luci.dispatcher" local nxo = require "nixio" local ft = require "luci...
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2010-2012 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local sys = require "luci.sys" local utl = require "luci.util" local dsp = require "luci.dispatcher" local nxo = require "nixio" local ft = require "luci...
3961268597abba4c2b231790cb4aa7936e73cdf8
https://github.com/openwrt/luci
ZipUtil.java
java
package utils.common; import org.apache.commons.io.FileUtils; import javax.inject.Singleton; import java.io.*; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Enumeration; import java.util.List; import java.util.zip.ZipEntry; im...
package utils.common; import org.apache.commons.io.FileUtils; import javax.inject.Singleton; import java.io.*; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Enumeration; import java.util.List; import java.util.zip.ZipEntry; im...
2b42519f309d8164e8811392770ce604cdabb5da
https://github.com/jatos/jatos
printer.js
javascript
var printer_helper = {} , fs = require("fs") , child_process = require("child_process") , os = require("os") , path = require("path"); if(process.platform=="win32"){ printer_helper = require('../build/Release/node_printer.node'); } module.exports.printDirect = printDirect /* print raw data. This ...
var printer_helper = {} , fs = require("fs") , child_process = require("child_process") , os = require("os") , path = require("path"); if(process.platform=="win32"){ printer_helper = require('../build/Release/node_printer.node'); } module.exports.printDirect = printDirect /* print raw data. This ...
e001e38738c17219a1d9dd8c31f7d82b9c0013c7
https://github.com/tojocky/node-printer
Crypt.php
php
<?php /** * This file is part of the Froxlor project. * Copyright (c) 2010 the Froxlor Team (see authors). * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the Lic...
<?php /** * This file is part of the Froxlor project. * Copyright (c) 2010 the Froxlor Team (see authors). * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the Lic...
6777fbf229200f4fd566022e186548391219ab23
https://github.com/froxlor/froxlor
mmap.c
c
/* * Flexible mmap layout support * * Based on code by Ingo Molnar and Andi Kleen, copyrighted * as follows: * * Copyright 2003-2009 Red Hat Inc. * All Rights Reserved. * Copyright 2005 Andi Kleen, SUSE Labs. * Copyright 2007 Jiri Kosina, SUSE Labs. * * This program is free software; you can redistribute it ...
/* * Flexible mmap layout support * * Based on code by Ingo Molnar and Andi Kleen, copyrighted * as follows: * * Copyright 2003-2009 Red Hat Inc. * All Rights Reserved. * Copyright 2005 Andi Kleen, SUSE Labs. * Copyright 2007 Jiri Kosina, SUSE Labs. * * This program is free software; you can redistribute it ...
8b8addf891de8a00e4d39fc32f93f7c5eb8feceb
https://github.com/torvalds/linux