text:
<?php
/**
 * Created by PhpStorm.
 * User: dauduadetokunbo
 * Date: 25/07/2016
 * Time: 19:28
 */

/*
 *

id
    long - the id of the post
content
    string - post content in plain text
htmlContent
    string - post content in HTML
htmlFragment
    string - additional embedded HTML content if applicable (eg: embedded videos)
insight
    string - the insight of the curator
htmlInsight
    string - the html version of the insight
title
    string - the post title
thanksCount
    int - the number of times this post was thanked
reactionsCount
    int - the number reactions on this post
source
    source - the source of the post
twitterAuthor
    string - if source is a twitter search, the twitter user who wrote the original tweet
url
    string - original url of the post
scoopUrl
    string - url of the post on the scoop platform
scoopShortUrl
    string - shortened url of the post on the scoop platform
smallImageUrl
    string - url of the image chosen by the curator, referred below as "post image" (max width: 100px)
mediumImageUrl
    string - url of the image chosen by the curator, referred below as "post image" (max width: 200px)
imageUrl
    string - url of the image chosen by the curator, referred below as "post image" (max width: 400px)
largeImageUrl
    string - url of the image chosen by the curator, referred below as "post image" (max width: 1024px)
imageWidth
    int - width in pixel of the original post image
imageHeight
    int - height in pixel of the original post image
imageSize
    int - size of the post image in the topic view
imagePosition
    string - position of the post image in the topic view: "left" | "center" | "right"
imageUrls
    string[] - array of urls of image selector in curation mode
tags
    topic_tag[] - array of tags
commentsCount
    int - the number of comments for this post
isUserSuggestion
    boolean - true if the post is a user suggestion
suggestedBy
    user - the user that suggested this post (not present if the post is not a user suggestion)
pageViews
    long - number of time this post has been viewed
pageClicks
    long - number of time this post has been clicked
edited
    boolean - true if the description of this post has been manually edited by the curator
author
    user - the author of the post
publicationDate
    timestamp - the publication date of the original article
curationDate
    timestamp - the curation date of the post (aka the publication date on Scoop.it)
comments
    post_comment[] - the list of comments
thanked *
    boolean - true if the user has already thanked this post
topicId
    long - the id of the topic this post is belonging to
topic **
    topic - the topic this post is belonging to
scheduledDate **
    timestamp - the scheduled date of the article

 *
 */

/*
 *

text
    A simple text comment. The text field will hold the text typed by the user
share
    The post has been shared. The sharerId will hold the id of the sharer used to share the post (typically: twitter, facebook, linkedin...)
thank
    The post has been thanked
rescoop
    The post has been rescooped to another topic. The rescoopedPostId holds the id of the rescooped post

type
    enum - the type a the comment one of "text", "share", "thank", "rescoop" (see above)
text
    string - the comment text if applicable
sharerId
    string - the sharer id if applicable
rescoopedPostId
    long - id of the rescooped post if applicable
date
    timestamp - the comment date
author
    user - the comment author

 */
namespace Scoopit\Entities;

class Post
{
	public $id;
	// long - the id of the post (Integer & Unique / mandatory)
	public $publicationDate;
	//timestamp - the publication date of the original article (Date / mandatory)
	public $url;
	// string - original url of the post (String / mandatory)
	public $title;
	// string - the post title
	public $summary;
	// string - post summary in plain text
	public $state;
	// Could be published or scheduled
	public $image;
	// The image of the Scoop.it Post - ideally uploaded on the Drupal blog when content is created on SCD side
	public $tags;
	// topic_tag[] - array of tags
	public $scoopit_type = "Post";
	// string - the scoop it type to identify the remote object
	public $local_type;
	// string - the local drupal type to identify the local object to target
	public $local_object_id = 0;
	//long - for identifying local object
	public $content;
	// string - post content in plain text
	public $author;
	// string - post content in plain text
}


text:
from flask import abort
from flask_admin import BaseView
from flask_admin.contrib.sqla import ModelView
from flask_security import current_user

class SecuredView(BaseView):
    extra_css = ["/admin/static/css/custom-admin.css"]

    def is_accessible(self):
        return (
            current_user.is_active
            and current_user.is_authenticated
            and current_user.has_role("admin")
        )

    def _handle_view(self, name, **kwargs):
        if not self.is_accessible():
            if current_user.is_authenticated:
                abort(403)
            else:
                # Abort with 404 so that unauthenticated requests can't see the page exists.
                abort(404)

class SecuredModelView(SecuredView, ModelView):
    column_exclude_list = ["created_on", "updated_on"]

redpajama_set_name: RedPajamaGithub


text:
/* istanbul ignore file */

abstract class JoynrObject {
    protected constructor() {
        /// do nothing
    }
}
export = JoynrObject;


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycosystema 23(1): 20 (2004)

#### Original name
Drechslera avenicola B.D. Sun & T.Y. Zhang

### Remarks
null


text:
namespace Google.Cloud.ResourceSettings.V1.Snippets
{
    // [START resourcesettings_v1_generated_ResourceSettingsService_GetSetting_async_flattened_resourceNames]
    using Google.Cloud.ResourceSettings.V1;
    using System.Threading.Tasks;

    public sealed partial class GeneratedResourceSettingsServiceClientSnippets
    {
        /// <summary>Snippet for GetSettingAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated and should be regarded as a code template only.
        /// It will require modifications to work:
        /// - It may require correct/in-range values for request initialization.
        /// - It may require specifying regional endpoints when creating the service client as shown in
        ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
        /// </remarks>
        public async Task GetSettingResourceNamesAsync()
        {
            // Create client
            ResourceSettingsServiceClient resourceSettingsServiceClient = await ResourceSettingsServiceClient.CreateAsync();
            // Initialize request argument(s)
            SettingName name = SettingName.FromProjectNumberSettingName("[PROJECT_NUMBER]", "[SETTING_NAME]");
            // Make the request
            Setting response = await resourceSettingsServiceClient.GetSettingAsync(name);
        }
    }
    // [END resourcesettings_v1_generated_ResourceSettingsService_GetSetting_async_flattened_resourceNames]
}


text:
<?php

	include_once('class.database.php');

	class ManageSurvey {

		protected $link;

		function __construct(){
			$db_conn = new ManageDatabase;
			$this->link = $db_conn.connect();

			return $this->link;
		}

		function addSurvey($username, $inspected, $issues, $comments,$ip_address, $date, $time) {
			$query = $this->link->prepare("INSERT INTO survey (username, inspected, issues, comments, ip_address, date, time) VALUES (?,?,?,?,?,?,?)");
			$values = array($username, $inspected, $issues, $comments,$ip_address, $date, $time);
			$query->execute($values);
			$rowCount= $query->rowCount();

			return $rowCount;
		}

		function listSurvey($param = null){
			if(isset($param)){
				foreach ($param as $key => $value) {
					$query = $this->link->prepare("SELECT * FROM survey WHERE $key = '$value' ORDER BY id DESC");
				}

			}else{
				$query = $this->link->prepare("SELECT * FROM survey ORDER BY id DESC");
			}

			$rowCount= $query->rowCount();
			if($rowCount >= 1){

				$result = $query->fetchAll();
			}else{
				$result = 0;
			}

			return $result;
		}

		function editSurvey($survey_id, $param){
			foreach ($param as $key => $value) {
				$query = $this->link->query("UPDATE survey SET $key = '$value' WHERE id = '$survey_id' LIMIT 1");
			}

			$rowCount  = $query->rowCount();
			return rowCount;
		}

		unction deleteSurvey($survey_id){
			$query = $this->link->query("DELETE FROM users WHERE id = '$survey_id' LIMIT 1");

			$rowCount  = $query->rowCount();
			return rowCount;
		}

	}

?>


text:
class TestChromeWebUIControllerFactory : public ChromeWebUIControllerFactory {
 public:
  // Interface to create a new WebUI object.
  class WebUIProvider {
   public:
    // Create and return a new WebUI object for the |web_contents| based on the
    // |url|.
    virtual std::unique_ptr<content::WebUIController> NewWebUI(
        content::WebUI* web_ui,
        const GURL& url) = 0;

   protected:
    virtual ~WebUIProvider();
  };

  using FactoryOverridesMap = std::map<std::string, WebUIProvider*>;

  TestChromeWebUIControllerFactory();
  ~TestChromeWebUIControllerFactory() override;

  // Sets the Web UI host.
  void set_webui_host(const std::string& webui_host);

  // Override the creation for urls having |host| with |provider|.
  void AddFactoryOverride(const std::string& host, WebUIProvider* provider);

  // Remove the override for urls having |host|.
  void RemoveFactoryOverride(const std::string& host);

  // ChromeWebUIFactory overrides.
  content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
                                      const GURL& url) override;
  std::unique_ptr<content::WebUIController> CreateWebUIControllerForURL(
      content::WebUI* web_ui,
      const GURL& url) override;

 private:
  // Return the WebUIProvider for the |url|'s host if it exists, otherwise NULL.
  WebUIProvider* GetWebUIProvider(Profile* profile, const GURL& url) const;

  // Replace |url|'s host with the Web UI host if |url| is a test URL served
  // from the TestDataSource. This ensures the factory always creates the
  // appropriate Web UI controller when these URLs are encountered instead of
  // failing.
  GURL TestURLToWebUIURL(const GURL& url) const;

  // Stores the mapping of host to WebUIProvider.
  FactoryOverridesMap factory_overrides_;

  // Stores the Web UI host to create the correct Web UI controller for
  // chrome://test URL requests.
  std::string webui_host_;

  DISALLOW_COPY_AND_ASSIGN(TestChromeWebUIControllerFactory);
};

#endif  // CHROME_TEST_BASE_TEST_CHROME_WEB_UI_CONTROLLER_FACTORY_H_


text:
<?php
session_start();
?>
<!DOCTYPE html>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="public/images/temp2.png" rel="shortcut icon">
    <title>MAT</title>
<link rel="stylesheet" href="public/css/bootstrap.min.css">
<link rel="stylesheet" href="public/css/ladda.min.css">

<link rel="stylesheet" href="public/fonts/glyphicons-halflings-regular.eot">
<link rel="stylesheet" href="public/fonts/glyphicons-halflings-regular.woff">
<link rel="stylesheet" href="public/fonts/glyphicons-halflings-regular.woff2">
<link rel="stylesheet" href="public/fonts/glyphicons-halflings-regular.ttf">
<link rel="stylesheet" href="public/fonts/glyphicons-halflings-regular.svg">

      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
      Toggle navigation

      </button>

        Home

MAT

Motivation

Documentation

Downloads

Publication

About Us

Links

<?php

$session = session_id();

$file = "inputfile.pdb";

mkdir('uploads/'.$session, 0777, true);

$dir_path = 'uploads/'.$session.'/'.$file;

if ( $_FILES['file']['name'])
{
move_uploaded_file($_FILES['file']['tmp_name'], $dir_path);
}

$my_file = 'inputfile.txt';
$handle = fopen($my_file, 'w') or die('Cannot open file:  '.$my_file);
if ( $_FILES['file']['name'])
{
$data = $_FILES['file']['name'];
} else {
    $data = $_POST['pdb_id'].'.pdb';
}
fwrite($handle, $data);

// We need to get the filename to open it in Pymol
//$_FILES['file']['name'];

chmod('uploads/'.$session.'/', 0777);

//The set of these three lines copy required stuff and make them usable.
$cpath = 'uploads/'.$session.'/pdb_std';
copy("pdb_std", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/as1_main.py';
copy("as1_main.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/as1_temp_script.py';
copy("as1_temp_script.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/as2_main.py';
copy("as2_main.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/as2_temp_script.py';
copy("as2_temp_script.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/as3_main.py';
copy("as3_main.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/as3_temp_script.py';
copy("as3_temp_script.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/dsb_main.py';
copy("dsb_main.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/dsb_temp_glmol.py';
copy("dsb_temp_glmol.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/dsb_temp_script.py';
copy("dsb_temp_script.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/hbb_main.py';
copy("hbb_main.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/hbb_temp_script.py';
copy("hbb_temp_script.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/export_to_gl.py';
copy("export_to_gl.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/sb_main.py';
copy("sb_main.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/sb_temp_glmol.py';
copy("sb_temp_glmol.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/sb_temp_script.py';
copy("sb_temp_script.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/tem_plot.py';
copy("tem_plot.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/contour.R';
copy("contour.R", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/sb_temp_script.py';
copy("sb_temp_script.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/GLmol37.js';
copy("GLmol37.js", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/jquery-1.7.min.js';
copy("jquery-1.7.min.js", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/Three45.js';
copy("Three45.js", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/imported.html';
copy("imported.html", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/pymol_glmol.py';
copy("pymol_glmol.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/pymol_script_run.py';
copy("pymol_script_run.py", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/inputfile.txt';
copy("inputfile.txt", $cpath);
chmod($cpath, 0777);

$cpath = 'uploads/'.$session.'/fool_php.pl';
copy("fool_php.pl", $cpath);
chmod($cpath, 0777);

$outpath = 'uploads/'.$session ;
#$nwpath= '/home/hazralab/Documents/_shared/uploads/'.$session;
chdir($outpath);
if ($_FILES['file']['name']) {
passthru("./pdb_std -i inputfile.pdb -A");
passthru("./pdb_std -i inputfile.pdb -C");
passthru("./pdb_std -i inputfile.pdb -D");
passthru("./pdb_std -i inputfile.pdb -E");
passthru("./pdb_std -i inputfile.pdb -F");
passthru("./pdb_std -i inputfile.pdb -G");
passthru("./pdb_std -i inputfile.pdb -H");
passthru("./pdb_std -i inputfile.pdb -I");

} else {

$pppid = $_POST['pdb_id'];
passthru("./pdb_std -p $pppid -A");
passthru("./pdb_std -p $pppid -B");
passthru("./pdb_std -p $pppid -C");
passthru("./pdb_std -p $pppid -D");
passthru("./pdb_std -p $pppid -E");
passthru("./pdb_std -p $pppid -F");
passthru("./pdb_std -p $pppid -G");
passthru("./pdb_std -p $pppid -H");
passthru("./pdb_std -p $pppid -I");

//passthru("./pdb_std -p $_POST['pdb_id'] -A -B -C -D -E -F -G -H");
}

?>

 <link rel="stylesheet" href="public/css/panel.css">

                            Display sequence

                                        ONE Letter Format <a href="uploads/<?php echo $session; ?>/display_seq_1" download> <button>Download</button>

                                        THREE Letter Format <a href="uploads/<?php echo $session; ?>/display_seq_2" download> <button>Download</button>

                            Detect Salt Bridges

                                        Stabilizing<a href="uploads/<?php echo $session; ?>/detect_saltbridge_1" download> <button>Download</button>

                                        De-Stabilizing <a href="uploads/<?php echo $session; ?>/detect_saltbridge_2" download> <button>Download</button>

                            Detect Active Site

                                        Ligands List <a href="uploads/<?php echo $session; ?>/Active_site1" download> <button>Download</button>

                                        Active Site Residues <a href="uploads/<?php echo $session; ?>/Active_site2" download> <button>Download</button>

                                        Active Site Residues' Visuals

                                        Table of Interactions <a href="uploads/<?php echo $session; ?>/Active_site3" download> <button>Download</button>

                                        Interactions' Visuals

                            Calculate Biochemical Prop.

                                        Molecular Weight<a href="uploads/<?php echo $session; ?>/biochem_prop_1" download> <button>Download</button>

                                        Total Number of Amino Acids<a href="uploads/<?php echo $session; ?>/biochem_prop_2" download> <button>Download</button>

                            Temperature Factors

                                        Display<a href="uploads/<?php echo $session; ?>/Temp_plot2" download> <button>Download</button>

Plot  <a href="uploads/<?php echo $session; ?>/Temp_plot2.png" download> <button>Download</button>

                            Remove

                                        Solvent<a href="uploads/<?php echo $session; ?>/remove_1" download> <button>Download</button>

                                        Water <a href="uploads/<?php echo $session; ?>/remove_2" download> <button>Download</button>

                                        Hydrogen<a href="uploads/<?php echo $session; ?>/remove_3" download> <button>Download</button>

                                            HETATM<a href="uploads/<?php echo $session; ?>/remove_4" download> <button>Download</button>

                            Calculate Bounding Box

                                        Min and Max coordinates

                            Ramachandran Plot

                                        Phi/Psi Data  <a href="uploads/<?php echo $session; ?>/r_plot1"  download><button>Download</button>

                                        Plot  <a href="uploads/<?php echo $session; ?>/r_plot1.pdf" download> <button>Download</button>

                            Occupancy

                                        Show Occupancy

                                        Keep only highest Occupancy

                            METAL

                                        Identify<a href="uploads/<?php echo $session; ?>/metal_1" download> <button>Download</button>

                                        Interactions <a href="uploads/<?php echo $session; ?>/metal_2" download> <button>Download</button>

                            HBonds

                                        Identify<a href="uploads/<?php echo $session; ?>/HBonds_BB" download> <button>Download</button>
                                        <a href="uploads/<?php echo $session; ?>/placed_h.pdb" download> <button>Download modified pdb</button>

                            Completeness Analysis

                                        Missing Atoms

                                        Missing Residues

                                        Conflicting sequence and structure

Feature Name

Result Display with related file links and visuals

                    Visuals

Please wait until images are generated.Click on picture to view in glmol

                     <button>Download PyMol Script</button>

            <?php
    $output = "Active_site1";
    $output_file = fopen(getcwd()."/".$output,"r");
    $content = fread($output_file, filesize(getcwd()."/".$output));
    $lines = explode("\n", $content);
    fclose($output_file);
    $i=0;$j=0;
        foreach ( $lines as $line ) {
          $i++;$j=$i-2;
        if($i==1){ continue;}
if($line==""){continue;}
echo ("

 $line

Please wait until images are generated.Click on picture to view in glmol
<button>Download PyMol Script</button>

");
echo ("

 $line

Please wait until images are generated.Click on picture to view in glmol
<button>Download PyMol Script</button>

");
}
 ?>

©  Copyright 2015-2017, The MAT Project, Hazra Lab.


text:
<!DOCTYPE html>
<!--
Copyright 2017 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<html>
<head>
<script src="initiated.js"></script>
<title>Initiated Test</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5">
</head>
<body>
</body>
</html>


text:
package com.example.ec.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.easycode.event.HttpEvent;
import com.easycode.util.L;
import com.example.ec.R;
import com.example.ec.newapi.DataBindActivity;
import com.example.ec.newapi.RecyclerViewActivity;
import com.example.ec.newapi.ToolBarActivity;

import org.greenrobot.eventbus.Subscribe;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class NewMenuActivity extends AppCompatActivity {

    @BindView(R.id.button8)
    Button button8;
    @BindView(R.id.button9)
    Button button9;
    @BindView(R.id.button10)
    Button button10;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_new_menu);
        ButterKnife.bind(this);

    }
    @Subscribe
    public void onHttpResult(HttpEvent event) {
        L.v("测试evnet", event.getResult());
    }
    @OnClick({R.id.button8, R.id.button9, R.id.button10})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.button8:
                startActivity(new Intent(this, ToolBarActivity.class));
                break;
            case R.id.button9:
                startActivity(new Intent(this, RecyclerViewActivity.class));
                break;
            case R.id.button10:
                startActivity(new Intent(this, DataBindActivity.class));
                break;
        }
    }
}


text:
MEX = mex #Using matlab
#MEX = mkoctfile --mex#Using octave
#Change the path below to match your matlab path
MEXINCLUDE = -I/usr/local/MATLAB/R2014b/extern/include/

#LIBS = -lcudart -lcublas

all: NaiveSparseCliqueReduction
#SlowSparseEdgeList GreedyKCenter NaiveGreedyKCenter

NaiveSparseCliqueReduction: NaiveSparseCliqueReduction.cpp
	$(MEX) -g NaiveSparseCliqueReduction.cpp $(MEXINCLUDE)

SparseEdgeList: SparseEdgeList.cpp
	$(MEX) -g SparseEdgeList.cpp $(MEXINCLUDE)

SlowSparseEdgeList: SlowSparseEdgeList.cpp
	$(MEX) -g SlowSparseEdgeList.cpp $(MEXINCLUDE)

GreedyKCenter: GreedyKCenter.cpp
	$(MEX) -g GreedyKCenter.cpp $(MEXINCLUDE)

NaiveGreedyKCenter: NaiveGreedyKCenter.cpp
	$(MEX) -g NaiveGreedyKCenter.cpp

clean:
	rm -f *.mexa64


text:
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/bitops.h>
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/pagemap.h>
#include <linux/gfp.h>

#include <asm/bugs.h>
#include <asm/cacheflush.h>
#include <asm/cachetype.h>
#include <asm/pgtable.h>
#include <asm/tlbflush.h>

#include "mm.h"

static pteval_t shared_pte_mask = L_PTE_MT_BUFFERABLE;

#if __LINUX_ARM_ARCH__ < 6
/*
 * We take the easy way out of this problem - we make the
 * PTE uncacheable.  However, we leave the write buffer on.
 *
 * Note that the pte lock held when calling update_mmu_cache must also
 * guard the pte (somewhere else in the same mm) that we modify here.
 * Therefore those configurations which might call adjust_pte (those
 * without CONFIG_CPU_CACHE_VIPT) cannot support split page_table_lock.
 */
static int do_adjust_pte(struct vm_area_struct *vma, unsigned long address,
	unsigned long pfn, pte_t *ptep)
{
	pte_t entry = *ptep;
	int ret;

	/*
	 * If this page is present, it's actually being shared.
	 */
	ret = pte_present(entry);

	/*
	 * If this page isn't present, or is already setup to
	 * fault (ie, is old), we can safely ignore any issues.
	 */
	if (ret && (pte_val(entry) & L_PTE_MT_MASK) != shared_pte_mask) {
		flush_cache_page(vma, address, pfn);
		outer_flush_range((pfn << PAGE_SHIFT),
				  (pfn << PAGE_SHIFT) + PAGE_SIZE);
		pte_val(entry) &= ~L_PTE_MT_MASK;
		pte_val(entry) |= shared_pte_mask;
		set_pte_at(vma->vm_mm, address, ptep, entry);
		flush_tlb_page(vma, address);
	}

	return ret;
}

#if USE_SPLIT_PTLOCKS
/*
 * If we are using split PTE locks, then we need to take the page
 * lock here.  Otherwise we are using shared mm->page_table_lock
 * which is already locked, thus cannot take it.
 */
static inline void do_pte_lock(spinlock_t *ptl)
{
	/*
	 * Use nested version here to indicate that we are already
	 * holding one similar spinlock.
	 */
	spin_lock_nested(ptl, SINGLE_DEPTH_NESTING);
}

static inline void do_pte_unlock(spinlock_t *ptl)
{
	spin_unlock(ptl);
}
#else /* !USE_SPLIT_PTLOCKS */
static inline void do_pte_lock(spinlock_t *ptl) {}
static inline void do_pte_unlock(spinlock_t *ptl) {}
#endif /* USE_SPLIT_PTLOCKS */

static int adjust_pte(struct vm_area_struct *vma, unsigned long address,
	unsigned long pfn)
{
	spinlock_t *ptl;
	pgd_t *pgd;
	pud_t *pud;
	pmd_t *pmd;
	pte_t *pte;
	int ret;

	pgd = pgd_offset(vma->vm_mm, address);
	if (pgd_none_or_clear_bad(pgd))
		return 0;

	pud = pud_offset(pgd, address);
	if (pud_none_or_clear_bad(pud))
		return 0;

	pmd = pmd_offset(pud, address);
	if (pmd_none_or_clear_bad(pmd))
		return 0;

	/*
	 * This is called while another page table is mapped, so we
	 * must use the nested version.  This also means we need to
	 * open-code the spin-locking.
	 */
	ptl = pte_lockptr(vma->vm_mm, pmd);
	pte = pte_offset_map(pmd, address);
	do_pte_lock(ptl);

	ret = do_adjust_pte(vma, address, pfn, pte);

	do_pte_unlock(ptl);
	pte_unmap(pte);

	return ret;
}

static void
make_coherent(struct address_space *mapping, struct vm_area_struct *vma,
	unsigned long addr, pte_t *ptep, unsigned long pfn)
{
	struct mm_struct *mm = vma->vm_mm;
	struct vm_area_struct *mpnt;
	unsigned long offset;
	pgoff_t pgoff;
	int aliases = 0;

	pgoff = vma->vm_pgoff + ((addr - vma->vm_start) >> PAGE_SHIFT);

	/*
	 * If we have any shared mappings that are in the same mm
	 * space, then we need to handle them specially to maintain
	 * cache coherency.
	 */
	flush_dcache_mmap_lock(mapping);
	vma_interval_tree_foreach(mpnt, &mapping->i_mmap, pgoff, pgoff) {
		/*
		 * If this VMA is not in our MM, we can ignore it.
		 * Note that we intentionally mask out the VMA
		 * that we are fixing up.
		 */
		if (mpnt->vm_mm != mm || mpnt == vma)
			continue;
		if (!(mpnt->vm_flags & VM_MAYSHARE))
			continue;
		offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT;
		aliases += adjust_pte(mpnt, mpnt->vm_start + offset, pfn);
	}
	flush_dcache_mmap_unlock(mapping);
	if (aliases)
		do_adjust_pte(vma, addr, pfn, ptep);
}

/*
 * Take care of architecture specific things when placing a new PTE into
 * a page table, or changing an existing PTE.  Basically, there are two
 * things that we need to take care of:
 *
 *  1. If PG_dcache_clean is not set for the page, we need to ensure
 *     that any cache entries for the kernels virtual memory
 *     range are written back to the page.
 *  2. If we have multiple shared mappings of the same space in
 *     an object, we need to deal with the cache aliasing issues.
 *
 * Note that the pte lock will be held.
 */
void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr,
	pte_t *ptep)
{
	unsigned long pfn = pte_pfn(*ptep);
	struct address_space *mapping;
	struct page *page;

	if (!pfn_valid(pfn))
		return;

	/*
	 * The zero page is never written to, so never has any dirty
	 * cache lines, and therefore never needs to be flushed.
	 */
	page = pfn_to_page(pfn);
	if (page == ZERO_PAGE(0))
		return;

	mapping = page_mapping(page);
	if (!test_and_set_bit(PG_dcache_clean, &page->flags))
		__flush_dcache_page(mapping, page);
	if (mapping) {
		if (cache_is_vivt())
			make_coherent(mapping, vma, addr, ptep, pfn);
		else if (vma->vm_flags & VM_EXEC)
			__flush_icache_all();
	}
}
#endif	/* __LINUX_ARM_ARCH__ < 6 */

/*
 * Check whether the write buffer has physical address aliasing
 * issues.  If it has, we need to avoid them for the case where
 * we have several shared mappings of the same object in user
 * space.
 */
static int __init check_writebuffer(unsigned long *p1, unsigned long *p2)
{
	register unsigned long zero = 0, one = 1, val;

	local_irq_disable();
	mb();
	*p1 = one;
	mb();
	*p2 = zero;
	mb();
	val = *p1;
	mb();
	local_irq_enable();
	return val != zero;
}

void __init check_writebuffer_bugs(void)
{
	struct page *page;
	const char *reason;
	unsigned long v = 1;

	printk(KERN_INFO "CPU: Testing write buffer coherency: ");

	page = alloc_page(GFP_KERNEL);
	if (page) {
		unsigned long *p1, *p2;
		pgprot_t prot = __pgprot_modify(PAGE_KERNEL,
					L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE);

		p1 = vmap(&page, 1, VM_IOREMAP, prot);
		p2 = vmap(&page, 1, VM_IOREMAP, prot);

		if (p1 && p2) {
			v = check_writebuffer(p1, p2);
			reason = "enabling work-around";
		} else {
			reason = "unable to map memory\n";
		}

		vunmap(p1);
		vunmap(p2);
		put_page(page);
	} else {
		reason = "unable to grab page\n";
	}

	if (v) {
		printk("failed, %s\n", reason);
		shared_pte_mask = L_PTE_MT_UNCACHED;
	} else {
		printk("ok\n");
	}
}


text:
// Copyright (c) 2013-present, febit.org. All Rights Reserved.
package org.febit.wit.core.ast.expressions;

import org.febit.wit.core.ast.Expression;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zqq90
 */
public class TemplateStringExpressionPart {

    private final int line;
    private final int column;

    private final List<Expression> exprs = new ArrayList<>();

    public TemplateStringExpressionPart(int line, int column) {
        this.line = line;
        this.column = column;
    }

    public TemplateStringExpressionPart add(final Expression expr) {
        if (expr instanceof DirectValue) {
            Object innerValue = ((DirectValue) expr).value;
            if (innerValue == null) {
                return this;
            }
            if (!(innerValue instanceof String)) {
                return add(new DirectValue(String.valueOf(innerValue), expr.line, expr.column));
            }
        }
        exprs.add(expr);
        return this;
    }

    public TemplateStringExpression pop() {
        return new TemplateStringExpression(exprs.toArray(new Expression[exprs.size()]), line, column);
    }
}


text:
using UnityEngine;
using System.Collections;

public class SpawnPoint : MonoBehaviour {

    public bool isSomethingCollidingWithMe;

    void OnTriggerEnter2D( Collider2D other )
    {
        isSomethingCollidingWithMe = true;
    }

    void OnTriggerExit2D( Collider2D other )
    {
        isSomethingCollidingWithMe = false;
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <title>Initialization & Cleanup - Jing Chen</title>

    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <meta name="description" content="">

    <meta name="twitter:card" content="summary">
    <meta name="twitter:title" content="Initialization & Cleanup">
    <meta name="twitter:description" content="">

    <meta property="og:type" content="article">
    <meta property="og:title" content="Initialization & Cleanup">
    <meta property="og:description" content="">

    <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon">
    <link href="/apple-touch-icon-precomposed.png" rel="apple-touch-icon">

    <link rel="stylesheet" type="text/css" href="//milantracy.github.io/themes/uno/assets/css/uno.css?v=1.0.0" />

    <link rel="canonical" href="https://milantracy.github.io/2015/09/22/Initialization-and-Cleanup.html" />

    <meta property="og:site_name" content="Jing Chen" />
    <meta property="og:type" content="article" />
    <meta property="og:title" content="Initialization & Cleanup" />
    <meta property="og:description" content="As the computer revolution progresses, "unsafe" programming has become one of the major culprits that makes programming expensive. Two of these safety issues are initialization and cleanup. Cleanup is a special problem because it's easy to forget about an..." />
    <meta property="og:url" content="https://milantracy.github.io/2015/09/22/Initialization-and-Cleanup.html" />
    <meta property="article:published_time" content="2015-09-22T07:00:00.000Z" />
    <meta property="article:modified_time" content="2015-11-15T09:19:25.528Z" />
    <meta property="article:tag" content="Java" />
    <meta property="article:tag" content="Thinking in Java" />

    <meta name="twitter:card" content="summary" />
    <meta name="twitter:title" content="Initialization & Cleanup" />
    <meta name="twitter:description" content="As the computer revolution progresses, "unsafe" programming has become one of the major culprits that makes programming expensive. Two of these safety issues are initialization and cleanup. Cleanup is a special problem because it's easy to forget about an..." />
    <meta name="twitter:url" content="https://milantracy.github.io/2015/09/22/Initialization-and-Cleanup.html" />

    <meta name="generator" content="Ghost ?" />
    <link rel="alternate" type="application/rss+xml" title="Jing Chen" href="https://milantracy.github.io/rss" />
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css">

Jing Chen

Software Developer

Blog

                      Facebook

                      Twitter

                      Github

                      LinkedIn

                      Email

        <time datetime="22 Sep 2015" class="post-meta__date date">22 Sep 2015</time> • on Java,  Thinking in Java
         by Jing Chen

Initialization & Cleanup

As the computer revolution progresses, "unsafe" programming has become one of the major culprits that makes programming expensive.

Two of these safety issues are initialization and cleanup.

Cleanup is a special problem because it's easy to forget about an element when you're done with it, since it no longer concerns you. Thus, the resources used by that element are retained and you can easily end up running out of resources (most notably, memory).

Guaranteed initialization with the constructor

In Java, the class designer can guarantee initialization of every object by providing a constructor. If a class has a constructor, Java automatically calls that constructor when an object is created, before users can even get their hands on it. So initialization is guaranteed.

The name of the constructor is the same as the name of the class. It makes sense that such a method will be called automatically during initialization.

Note that the coding style of making the first letter of all methods lowercase does not apply to constructors, since the name of the constructor must match the name of the class exactly.

The constructor is an unusual type of method because it has no return value. This is distinctly different from a void return value, in which the method returns nothing

class Rock {
      Rock() { // This is the constructor
        System.out.print("Rock ");
      }
}

public class SimpleConstructor{
     public static void main(String[] args) {
    	for(int i = 0; i < 10; i++)
        	new Rock();
     }
} /*

Output:

Rock Rock Rock Rock Rock Rock Rock Rock Rock Rock

Method overloading

Method overloading is essential to allow the same method name to be used with different method signiture.

Each overloaded method must take a unique list of argument types. Even differences in the ordering of arguments are sufficient to distinguish two methods, although you don't normally want to take this approach because it produces difficult-to-maintain code

The JVM doesn't consider return type when differentiating two method, the method signature is the only issue.

Overloading with primitives

A primitive can be automatically promoted from a smaller type to a larger one, and this can be slightly confusing in combination with overloading.

If an overloaded method is available that takes an int, it is used.

In all other cases, if you have a data type that is smaller than the argument in the method, that data type is promoted.

If it doesn't find an exact char match, it is promoted to int.

Default constructors

A default constructor (a.k.a. a "no-arg" constructor) is one without arguments that is used to create a "default object." If you create a class that has no constructors, the compiler will automatically create a default constructor for you.

The this keyword

The this keyword, which can be used only inside a non-static method—produces the reference to the object that the method has been called for.

The this keyword is used only for those special cases in which you need to explicitly use the reference to the current object. For example, it's often used in return statements when you want to return the reference to the current object.

The this keyword is also useful for passing the current object to another method.

Calling constructors from constructors

When you write several constructors for a class, there are times when you'd like to call one constructor from another to avoid duplicating code. You can make such a call by using the this keyword.

Hiding data field

In the constructor, if the argument of the constructor hide the data field, you may use this to explicitly refer to the data field of the current object.

The meaning of static

You cannot call non-static methods from inside static methods2 (although the reverse is possible), and you can call a static method for the class itself, without any object.

It's as if you're creating the equivalent of a global method. However, global methods are not permitted in Java, and putting the static method inside a class allows it access to other static methods and to static fields.

All objects of the class would share only one single copy of the class’s static field and static method.

Cleanup: finalization and garbage collection

Of course, Java has the garbage collector to reclaim the memory of objects that are no longer used.

Now consider an unusual case: Suppose your object allocates "special" memory without using new. The garbage collector only knows how to release memory allocated with new, so it won't know how to release the object's "special" memory. To handle this case, Java provides a method called finalize( ) that you can define for your class.

When the garbage collector is ready to release the storage used for your object, it will first call finalize( ), and only on the next garbage-collection pass will it reclaim the object's memory.

Garbage colletion is different from destructor in C++.

In C++, objects always get destroyed (in a bug-free program), whereas in Java, objects do not always get garbage collected.

Your objects might not get garbage collected.

Garbage collection is not destruction.

If there is some activity that must be performed before you no longer need an object, you must perform that activity yourself.

for example, if you draw something on screer, if you do nothing, it never gets clean up, if you put some erasing function inside finalize(), it may be cleaned up when the program needs a garbage collection.

Garbage collection would happen when it nears the point of running out of the memory, if it nevers reach that point, the resource would be returned to the OS as long as the program exits. It is a good thing because garbage collection requires overhead.

Garbage colletion is only about memory

The garbage collector takes care of the release of all object memory regardless of how the object is created.

It would seem that finalize( ) is in place because of the possibility that you'll do something Clike by allocating memory using a mechanism other than the normal one in Java. This can happen primarily through native methods, which are a way to call non-Java code from Java.

If you want some kind of cleanup performed other than storage release, you must still explicitly call an appropriate method in Java, which is the equivalent of a C++ destructor without the convenience.

You won't use finalize( ) much

If you want some kind of cleanup performed other than storage release, you must still explicitly call an appropriate method in Java, which is the equivalent of a C++ destructor without the convenience.

Remember that neither garbage collection nor finalization is guaranteed. If the JVM isn't close to running out of memory, then it might not waste time recovering memory through garbage collection.

How a garbage collector works

Reference Counting

Each object contains a reference count, every time a reference is attached to the object, increase the reference count, every time the reference goes out of scope or set to be null, decrese the refernece count.

Small and constant overhead, but it happens throughout the lifetime of the program.

Can’t deal with circularly referenced objects.

Stop and copy

This means that—for reasons that will become apparent—the program is first stopped Then, each live object is copied from one heap to another, leaving behind all the garbage. In addition, as the objects are copied into the new heap, they are packed end-to-end, thus compacting the new heap

requires two heaps

when there is no need to do garbege collection, stop and copy would still waste time and resource switching back and forth

Swap and age

JIT

A JIT compiler partially or fully converts a program into native machine code so that it doesn't need to be interpreted by the JVM and thus runs much faster.

JIT takes a little more time

JIT increases the size of the executable which might cause page, which makes programs slow down.

An alternative approach is lazy evaluation, which means that the code is not JIT compiled until necessary.

Member initialization

local variables are guaranted to be initialized by throwing error when compiled for uninitialization

data fields are guaranteed to have an initial value.

Order of initialization

Within a class, the order of initialization is determined by the order that the variables are defined within the class.

The variables are initialized before any methods can be called—even the constructor.

static data initialization

There's only a single piece of storage for a static, regardless of how many objects are created.

static initialization occurs only if it's necessary.

when the first static access occurs, static objects would be initialized

The order of initialization is statics first, if they haven't already been initialized by a previous object creation, and then the non-static objects

initialization summary

As a class is loaded(creating a Class object,all of its static initializers are run. Thus, static initialization takes place only once, as the Class object is loaded for the first time.

When it calls a static method or access a static field, the class would also be loaded which initializes static field first.

Any initializations that occur at the point of field definition are executed.

Constructors are executed.

explicit static initialization

Java allows you to group other static initializations inside a special "static clause"(sometimes called a static block) in a class. It looks like this:

//: initialization/Spoon.java
    public class Spoon {
      static int i;
      static {
i = 47; }
} ///:~

It's just the static keyword followed by a block of code. This code, like other static initializations, is executed only once: the first time you make an object of that class or the first time you access a static member of that class.

There is also non-static block to initialize non-static field, that is helpful in inner class.

                © 2015. All rights reserved.
                Uno theme by Dale-Anthony
                Proudly published with Hubpress


text:
package org.apache.causeway.testdomain.model.interaction;

import javax.inject.Named;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.apache.causeway.applib.annotation.DomainObject;
import org.apache.causeway.applib.annotation.Editing;
import org.apache.causeway.applib.annotation.Nature;

/**
 * NPM ... New Parameter Model (a Programming Model introduced in v2)
 *
 */
@XmlRootElement(name = "InteractionNpmDemo")
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
@Named("regressiontests.InteractionNpmDemo")
@DomainObject(nature=Nature.VIEW_MODEL, editing=Editing.ENABLED)
public class InteractionNpmDemo {

}


text:
<!--
FILE NAME: changePassword.html

DESCRIPTION:

REFERENCE:

DATE            BY            CHANGE REF            DESCRIPTION
=====         =======         ==========            ===========
4/05/2017     Simonne                               fixed format and centered button

-->
<ion-header>
  <ion-navbar color="danger">
    <ion-title>Account Settings</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>
      <ion-list>
          <ion-item>
              <ion-label floating>Current Password</ion-label>
              <ion-input type="password" [value]="oldPassword" (input)="oldPassword = $event.target.value"></ion-input>
          </ion-item>
          <ion-item>
              <ion-label floating>New Password</ion-label>
              <ion-input type="password" [value]="newPassword" (input)="newPassword = $event.target.value"></ion-input>
          </ion-item>
          <ion-item>
              <ion-label floating>Confirm New Password</ion-label>
              <ion-input type="password" [value]="confirmNewPassword" (input)="confirmNewPassword = $event.target.value"></ion-input>
          </ion-item>

<div class=center-text>
          <button ion-button (click)="changePassword()" color="success">Change Password</button>
</div>
      </ion-list>
</ion-content>


text:
<?php

class Estados extends CI_Model{

    function __construct(){
        parent::__construct();
    }

    public function obtener_todos(){
        $this->db->select('id,estado');
        $this->db->from('estados');
        $this->db->order_by('estado', 'asc');
        $consulta = $this->db->get();
        $resultado = $consulta->result();
        return $resultado;
    }
}


text:
package org.apache.pinot.core.segment.index.readers;

import java.io.Closeable;

/**
 * Interface for the context of the forward index reader.
 * <p>The forward index reader itself is always stateless because it needs to be accessed by multiple threads. The
 * context can be passed when reading the values from the forward index reader so that reader can store some states
 * inside the context in order to accelerate the following reads.
 */
public interface ForwardIndexReaderContext extends Closeable {
}


text:
<?php
declare(strict_types=1);

namespace stubbles\helper\response\mimetypes;
/**
 * Helper class for the test.
 */
class AsArray
{
    public function asArray(): array
    {
        return ['column1' => 'foo', 'column2' => 'bar'];
    }
}


text:
<?php

namespace Tests\Backend\User;

use App\Models\Auth\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

/**
 * Class ClearSessionTest.
 */
class ClearSessionTest extends TestCase
{
    use RefreshDatabase;

    /** @test- */
    public function an_admin_can_clear_a_user_session()
    {
        $this->loginAsAdmin();

        $user = factory(User::class)->create();

        $this->assertDatabaseHas('users', ['id' => $user->getKey(), 'to_be_logged_out' => false]);

        $response = $this->get("/admin/auth/user/{$user->id}/clear-session");

        $response->assertSessionHas(['flash_success' => __('alerts.backend.access.users.session_cleared')]);

        $this->assertDatabaseHas('users', ['id' => $user->getKey(), 'to_be_logged_out' => true]);
    }
}


text:
<?xml version="1.0"?>
<!--

    Copyright (C) 2015 The SmartenIT consortium (http://www.smartenit.eu)

    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 agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>eu.smartenit.unada.interfaces</groupId>
		<artifactId>interfaces</artifactId>
		<version>3.2</version>
	</parent>
	<groupId>eu.smartenit.unada.interfaces.enduser</groupId>
	<artifactId>unada-enduser</artifactId>
	<packaging>jar</packaging>

	<name>uNaDa-End User Interface</name>
	<url>http://maven.apache.org</url>

	<dependencies>
		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-json-jackson</artifactId>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty.orbit</groupId>
			<artifactId>javax.servlet</artifactId>
		</dependency>

		<dependency>
			<groupId>eu.smartenit.unada.db.dto</groupId>
			<artifactId>dto</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>eu.smartenit.unada.db.dao</groupId>
			<artifactId>dao</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>eu.smartenit.unada.ctm.cache</groupId>
			<artifactId>cache</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>eu.smartenit.unada.commons</groupId>
			<artifactId>commons</artifactId>
			<version>${project.version}</version>
		</dependency>

		 <dependency>
			<groupId>org.glassfish.jersey.test-framework.providers</groupId>
			<artifactId>jersey-test-framework-provider-jetty</artifactId>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
	      	<groupId>org.mockito</groupId>
	      	<artifactId>mockito-core</artifactId>
	    </dependency>
	</dependencies>
</project>