text:
// Copyright 2017 The casbin 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 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.

package main

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"strconv"

	"github.com/fatih/color"
	"github.com/gin-gonic/gin"
)

// user, act, owner, role, platform, work_period, status, duration, distance, app
type SecurityContext struct {
	UserID      string
	Action      string
	OwnerID     string
	Role        string
	Platform    string
	Work_period string
	Status      string
	Duration    string
	Distance    string
	AppID       string
}

var logger *log.Logger

func handleRequest(c *gin.Context) {
	r := c.Request

	body, err := ioutil.ReadAll(r.Body)
	if err != nil {
		panic(err)
	}

	var sc SecurityContext
	err = json.Unmarshal(body, &sc)
	if err != nil {
		panic(err)
	}

	res := enforce(sc)
	fmt.Print("From:", sc.UserID, " To:", sc.OwnerID, " <", sc.Action, "> ---> ")
	if res == true {
		color.HiGreen("Allow")
	} else {
		color.HiRed("Deny")
	}
	logger.Print("Request: ", sc, " ---> ", res)

	res_str := strconv.FormatBool(res)
	c.JSON(200, gin.H{
		"decision": res_str,
	})
}

func handleAdd(c *gin.Context) {
	r := c.Request

	body, err := ioutil.ReadAll(r.Body)
	if err != nil {
		panic(err)
	}

	var sc SecurityContext
	err = json.Unmarshal(body, &sc)
	if err != nil {
		panic(err)
	}

	res := addP(sc)
	fmt.Print("Policy")
	if res == true {
		color.HiBlue("Added")
	}
	logger.Print("policy: ", sc, " ---> ", res)

	res_str := strconv.FormatBool(res)
	c.JSON(200, gin.H{
		"success": res_str,
	})
}

func main() {
	logfile, err := os.OpenFile("decision.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
	if err != nil {
		fmt.Printf("%s\n", err.Error())
		os.Exit(-1)
	}
	defer logfile.Close()

	logger = log.New(logfile, "", log.Ldate|log.Ltime)
	logger.Print("Start logging..")

	r := gin.New()
	r.POST("/decision", handleRequest)
	r.POST("/add", handleAdd)
	r.Run(":9111") // listen and serve on 0.0.0.0:8080

}


text:
package cache

import (
	"context"
	"fmt"
	"time"

	"github.com/go-redis/redis/v8"

	feature "github.com/rubberyconf/language/lib"
	config "github.com/rubberyconf/rubberyconf/lib/core/configuration"
	"github.com/rubberyconf/rubberyconf/lib/core/logs"
	"github.com/rubberyconf/rubberyconf/lib/core/ports/output"
)

const (
	DEFAULTDB int = 0
)

type RedisCache struct {
}

func NewDataStorageRedis() *RedisCache {

	redisClnt := new(RedisCache)
	return redisClnt
}

func (aux *RedisCache) connect() *redis.Client {
	conf := config.GetConfiguration()
	rbd := redis.NewClient(&redis.Options{
		Addr:     conf.Redis.Url,
		Password: conf.Redis.Password,
		DB:       DEFAULTDB,
	})
	return rbd
}
func (aux *RedisCache) disconnect(client *redis.Client) {
	err := client.Close()
	if err != nil {
		logs.GetLogs().WriteMessage(logs.ERROR, "error closing redis client", err)
	}

}
func (aux *RedisCache) timeOut() time.Duration {
	timeout, err := time.ParseDuration(config.GetConfiguration().Redis.TimeOut)
	if err != nil {
		timeout = 1 * time.Second
	}
	return timeout
}
func (aux *RedisCache) GetValue(ctx context.Context, key string) (*feature.FeatureDefinition, bool, error) {

	rbd := aux.connect()
	defer aux.disconnect(rbd)
	ctxRedis, cancel := context.WithTimeout(ctx, aux.timeOut())
	val, err := rbd.Get(ctxRedis, key).Result()
	cancel()
	if err == redis.Nil {
		return nil, false, nil
	}
	if err != nil {
		logs.GetLogs().WriteMessage(logs.ERROR, fmt.Sprintf("error geting value from redis key: %s", key), err)
		return nil, false, err
	}
	var feat *feature.FeatureDefinition
	feat = new(feature.FeatureDefinition)
	err = feat.LoadFromString(val)
	if err != nil {
		return nil, false, err
	}
	return feat, true, nil

}

func (aux *RedisCache) SetValue(ctx context.Context, feature output.FeatureKeyValue, expiration time.Duration) (bool, error) {

	svalue, err := feature.Value.ToString()
	if err != nil {
		return false, err
	}
	rbd := aux.connect()
	defer aux.disconnect(rbd)
	ctxRedis, cancel := context.WithTimeout(ctx, aux.timeOut())
	err = rbd.Set(ctxRedis, feature.Key, svalue, expiration).Err()
	cancel()
	if err != nil {
		logs.GetLogs().WriteMessage(logs.ERROR, fmt.Sprintf("error seting value to redis key: %s", feature.Key), err)
		return false, err
	} else {
		return true, nil
	}
}

func (aux *RedisCache) DeleteValue(ctx context.Context, key string) (bool, error) {

	rbd := aux.connect()
	defer aux.disconnect(rbd)
	ctxRedis, cancel := context.WithTimeout(ctx, aux.timeOut())
	err := rbd.Del(ctxRedis, key).Err()
	cancel()
	if err != nil {
		logs.GetLogs().WriteMessage(logs.ERROR, fmt.Sprintf("error seting value to redis key: %s", key), err)
		return false, err
	} else {
		return true, nil
	}
}

repository: rubberyconf/rubberyconf

license_type: permissive

repo_name: rubberyconf/rubberyconf

branch_name: refs/heads/main

extension: go


text:
// This package provides an example application built using the goey package
// that shows a sidebar an array of buttons.  This is meant to be an example
// of a corporate portal.
package main

import (
	"fmt"
	"image"
	"image/color"
	_ "image/png"
	"os"

	"bitbucket.org/rj/goey"
	"bitbucket.org/rj/goey/base"
	"bitbucket.org/rj/goey/loop"
)

var (
	gopher image.Image
	window *goey.Window
)

func loadImage(filename string) (image.Image, error) {
	file, err := os.Open(filename)
	if err != nil {
		return nil, err
	}
	defer file.Close()

	img, _, err := image.Decode(file)
	return img, err
}

func main() {
	img, err := loadImage("gopher.png")
	if err != nil {
		fmt.Println("Error:", err)
		return
	}
	gopher = img

	err = loop.Run(createWindow)
	if err != nil {
		fmt.Println("Error: ", err)
	}
}

func createWindow() error {
	w, err := goey.NewWindow("Menu", renderWindow())
	if err != nil {
		return err
	}
	window = w
	return nil
}

func updateWindow() {
	window.SetChild(renderWindow())
}

func renderSidebar() base.Widget {
	return &goey.Decoration{
		Fill: color.RGBA{128, 255, 128, 255},
		Child: &goey.Padding{
			Insets: goey.DefaultInsets(),
			Child: &goey.VBox{goey.MainCenter, goey.CrossCenter, []base.Widget{
				&goey.Label{Text: "Example Menu"},
				&goey.Img{Image: gopher},
			},
			},
		}}
}

func renderMainbar() base.Widget {
	return &goey.Expand{Child: &goey.Padding{
		Insets: goey.DefaultInsets(),
		Child: &goey.VBox{goey.MainCenter, goey.Stretch, []base.Widget{
			&Column{[]base.Widget{
				&goey.Button{Text: "A1"}, &goey.Button{Text: "A2"}, &goey.Button{Text: "A3"}, &goey.Button{Text: "A4"},
				&goey.Button{Text: "B1"}, &goey.Button{Text: "B2"}, &goey.Button{Text: "B3"}, &goey.Button{Text: "B4"},
				&goey.Button{Text: "C1"}, &goey.Button{Text: "C2"}, &goey.Button{Text: "C3"}, &goey.Button{Text: "C4"},
				&goey.Button{Text: "D1"}, &goey.Button{Text: "D2"}, &goey.Button{Text: "D3"}, &goey.Button{Text: "D4"},
			}},
			&goey.HR{},
			&goey.Button{Text: "Help"},
		}},
	}}
}

func renderWindow() base.Widget {
	ret := &goey.HBox{
		Children: []base.Widget{
			renderSidebar(),
			renderMainbar(),
		},
	}

	return ret
}

repository: mewbak/goey

repo_name: mewbak/goey

branch_name: refs/heads/master


text:
@inproceedings{ ISI:000458816000005,
	Author = {Zavalyshyn, Igor and Duarte, Nuno O. and Santos, Nuno},
	Book-Group-Author = {{IEEE}},
	Title = {{HomePad: A Privacy-aware Smart Hub for Home Environments}},
	Booktitle = {{2018 THIRD IEEE/ACM SYMPOSIUM ON EDGE COMPUTING (SEC)}},
	Year = {{2018}},
	Pages = {{58-73}},
	Note = {{3rd IEEE/ACM Symposium on Edge Computing (SEC), Bellevue, WA, OCT 25-27, 2018}},
	Organization = {{IEEE; ACM; IEEE Comp Soc; NSF; Microsoft; Akamai; EdgeComputingConsortium; Huawei; IBM; AMD; Baidu; DENSO; TOYOTA InfoTech; VMWare}},
	DOI = {{10.1109/SEC.2018.00012}},
	ISBN = {{978-1-5386-9445-9}},
	Unique-ID = {{ISI:000458816000005}},
}

license: MIT

repository: RaresCroicia/my-bibtex-publications

repo_name: RaresCroicia/my-bibtex-publications

extension: bib


text:
DESCRIPTION = "Simple tool for input event debugging."
HOMEPAGE = "http://people.freedesktop.org/~whot/evtest/"
AUTHOR = "Vojtech Pavlik <vojtech@suse.cz>"
SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"

DEPENDS = "libxml2"

SRC_URI = "http://cgit.freedesktop.org/~whot/evtest/snapshot/evtest-${PV}.tar.bz2;name=archive"
SRC_URI[archive.md5sum] = "770d6af03affe976bdbe3ad1a922c973"
SRC_URI[archive.sha256sum] = "3d34123c68014dae6f7c19144ef79ea2915fa7a2f89ea35ca375a9cf9e191473"

inherit autotools

repository: ExorEmbedded/exor-workspace

repo_name: ExorEmbedded/exor-workspace

gha_language: Python

extension: bb


text:
@inproceedings{10.1145/587078.587080,
author = {Handel, Mark and Herbsleb, James D.},
title = {What is Chat Doing in the Workplace?},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587080},
doi = {10.1145/587078.587080},
abstract = {We report an empirical study of a synchronous messaging application with group-oriented functionality designed to support teams in the workplace. In particular, the tool supports group chat windows that allow members of a group to communicate with text that persists for about a day. We describe the experience of 6 globally-distributed work groups who used the tool over a period of 17 months. An analysis of use shows that the group functionality was used primarily for bursts of synchronous conversations and occasional asynchronous exchanges. The content was primarily focused on work tasks, and negotiating availability, with a smattering of non-work topics and humor. Nearly all groups were remarkably similar in the content of their group chat, although the research group chatted far more frequently than the others. We conclude with suggestions for future research, and a discussion of the place of team-oriented synchronous messaging tools in the workplace.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {1–10},
numpages = {10},
keywords = {chat, awareness, teams, MUD, instant messaging, presence, groupware},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587081,
author = {Isaacs, Ellen and Walendowski, Alan and Whittaker, Steve and Schiano, Diane J. and Kamm, Candace},
title = {The Character, Functions, and Styles of Instant Messaging in the Workplace},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587081},
doi = {10.1145/587078.587081},
abstract = {Current perceptions of Instant Messaging (IM) use are based primarily on self-report studies. We logged thousands of (mostly) workplace IM conversations and evaluated their conversational characteristics and functions. Contrary to prior research, we found that the primary use of workplace IM was for complex work discussions. Only 28% of conversations were simple, single-purpose interactions and only 31% were about scheduling or coordination. Moreover, people rarely switched from IM to another medium when the conversation got complex. We found evidence of two distinct styles of use. Heavy IM users and frequent IM partners mainly used it to work together: to discuss a broad range of topics via many fast-paced interactions per day, each with many short turns and much threading and multitasking. Light users and infrequent pairs mainly used IM to coordinate: for scheduling, via fewer conversations per day that were shorter, slower-paced with less threading and multitasking.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {11–20},
numpages = {10},
keywords = {media switching, informal communication, multitasking, instant messaging, workplace collaboration},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587082,
author = {Grinter, Rebecca E. and Palen, Leysia},
title = {Instant Messaging in Teen Life},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587082},
doi = {10.1145/587078.587082},
abstract = {Instant Messaging (IM) is being widely adopted by teenagers. In a study of 16 teenage IM users, we explore IM as an emerging feature of teen life, focusing our questions on its support of interpersonal communication and its role and salience in everyday life. We qualitatively describe the teens' IM use interpersonally, as well as its place in the domestic ecology. We also identify technology adoption conditions and discuss behaviors around privacy management. In this initial investigation, we found differences in the nature of use between high school and college teens, differences we propose are accounted for by teens' degree of autonomy as a function of domestic and scholastic obligations, the development of independent work practices, Internet connectivity access, and even transportation access. Moreover, while teen IM use is in part characterized as an optimizing choice between multiple communications media, practice is also tied to concerns around peer pressure, peer group membership and creating additional opportunities to socialize.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {21–30},
numpages = {10},
keywords = {CSCW, communications, chat, domestic information technology, instant messaging, teenagers, qualitative user study, HCI},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587084,
author = {Kraut, Robert E. and Gergle, Darren and Fussell, Susan R.},
title = {The Use of Visual Information in Shared Visual Spaces: Informing the Development of Virtual Co-Presence},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587084},
doi = {10.1145/587078.587084},
abstract = {A shared visual workspace is one where multiple people can see the same objects at roughly the same time. We present findings from an experiment investigating the effects of shared visual space on a collaborative puzzle task. We show that having the shared visual space helps collaborators understand the current state of their task and enables them to communicate and ground their conversations efficiently. These processes are associated with faster and better task performance. Delaying the visual update in the space reduces benefits and degrades performance. The shared visual space is more useful when tasks are visually complex or when actors have no simple vocabulary for describing their world. We find evidence for the ways in which participants adapt their discourse processes to their level of shared visual information.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {31–40},
numpages = {10},
keywords = {shared visual space, language and communication, empirical studies, conversational analysis, computer-supported collaborative work},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587085,
author = {Vertegaal, Roel and Ding, Yaping},
title = {Explaining Effects of Eye Gaze on Mediated Group Conversations: Amount or Synchronization?},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587085},
doi = {10.1145/587078.587085},
abstract = {We present an experiment examining effects of gaze on speech during three-person conversations. Understanding such effects is crucial for the design of teleconferencing systems and Collaborative Virtual Environments (CVEs). Previous findings suggest subjects take more turns when they experience more gaze. We evaluated whether this is because more gaze allowed them to better observe whether they were being addressed. We compared speaking behavior between two conditions: (1) in which subjects experienced gaze synchronized with conversational attention, and (2) in which subjects experienced random gaze. The amount of gaze experienced by subjects was a covariate. Results show subjects were 22% more likely to speak when gaze behavior was synchronized with conversational attention. However, covariance analysis showed these results were due to differences in amount of gaze rather than synchronization of gaze, with correlations of .62 between amount of gaze and amount of subject speech. Task performance was 46% higher when gaze was synchronized. We conclude it is commendable to use synchronized gaze models when designing CVEs, but depending on task situation, random models generating sufficient amounts of gaze may suffice.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {41–48},
numpages = {8},
keywords = {gaze, avatars, attentive interfaces, eye tracking, agents, multiparty mediated communication},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587086,
author = {Gutwin, Carl and Penner, Reagan},
title = {Improving Interpretation of Remote Gestures with Telepointer Traces},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587086},
doi = {10.1145/587078.587086},
abstract = {Gestural communication is an important part of shared work, both in face-to-face settings and distributed environments. However, gestures in groupware are often difficult to see and interpret because of disruptions to their motion caused by network jitter. One way to improve the visibility of remote gestures is by using traces-visualizations of the last few moments' of a remote pointer's motion. We carried out an experiment to test the effectiveness of traces in helping people interpret gestures. We found that telepointer traces dramatically improved people's accuracy and confidence in their decisions as jitter delays grew larger. Our results suggest that telepointer traces and other visualizations of interaction history can be used to enrich communication among remote collaborators.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {49–57},
numpages = {9},
keywords = {network delay, consequential communication, telepointer traces, jitter, groupware usability, gesture},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587088,
author = {Davis, Aguido Horatio and Sun, Chengzheng and Lu, Junwei},
title = {Generalizing Operational Transformation to the Standard General Markup Language},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587088},
doi = {10.1145/587078.587088},
abstract = {In this paper we extend operational transformation to support synchronous collaborative editing of documents written in dialects of SGML (Standard General Markup Language) such as XML and HTML, based on SGML's abstract data model, the grove. We argue that concurrent updates to a shared grove must be transformed before being applied to each replica to ensure consistency. We express grove operations as property changes on positionally-addressed nodes, define a set of transformation functions, and show how to apply an existing generic operational transformation algorithm to achieve this. This result makes synchronous group editing applicable to the modern Web.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {58–67},
numpages = {10},
keywords = {groves, computer supported cooperative work, synchronous collaborative editing, XML, operational transformation, SGML},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587089,
author = {Wang, Xueyi and Bu, Jiajun and Chen, Chun},
title = {Achieving Undo in Bitmap-Based Collaborative Graphics Editing Systems},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587089},
doi = {10.1145/587078.587089},
abstract = {Bitmap-based collaborative graphics editing systems are a special class of real-time collaborative editing systems. Undo is an important and difficult problem in these systems. Existing solutions show low efficiency because additional space cost should be added to achieve the function of undo. In this paper, we propose a new solution to resolve the undo problem. The basic idea is to reduce space cost through exploring relations among operations. The algorithm given in the paper can undo any operation at any time, and can greatly reduce the space cost while increasing a few time cost. The issues about undo scope and undo mode are also discussed in the paper.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {68–76},
numpages = {9},
keywords = {bitmap-based collaborative graphics editing systems, undo, CSCW},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587090,
author = {Shen, Haifeng and Sun, Chengzheng},
title = {Flexible Notification for Collaborative Systems},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587090},
doi = {10.1145/587078.587090},
abstract = {Notification is an essential feature in collaborative systems, which determines a system's capability and flexibility in supporting different kinds of collaborative work. In the past years, various notification strategies have been designed for different systems. However, the design of notification components has been ad hoc, and the techniques used for supporting notification have been application-dependent. In this paper, we contribute a flexible notification framework that can be used to describe and compare a range of notification strategies used in existing collaborative systems, and to guide the design of notification components for new collaborative systems. The framework has been applied to the design of a notification component for a group editor, which uses a single notification mechanism to support various notification policies for meeting both real-time and non-real-time collaboration needs. In addition, a new operational transformation control algorithm has been devised in combination with the notification component, which is significantly simpler and more efficient than existing algorithms.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {77–86},
numpages = {10},
keywords = {notification, operational transformation, collaborative system, concurrency control, group editor},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587092,
author = {Palen, Leysia and Salzman, Marilyn},
title = {Voice-Mail Diary Studies for Naturalistic Data Capture under Mobile Conditions},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587092},
doi = {10.1145/587078.587092},
abstract = {Mobile technology requires new methods for studying its use under realistic conditions "in the field." Reflexively, mobile technology also creates new opportunities for data collection while participants are remotely located. We report on our experiences with a variation on the paper-based diary study technique, which we extend by using voice-mail paired with mobile and landline telephony to more easily collect data in natural situations. We discuss lessons learned from experiences with voice-mail diary studies in two investigations of different scope. We also present suggestions for tailoring the technique to different research objectives, garnering high subject participation, and configuring the voice-mail system for data collection.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {87–95},
numpages = {9},
keywords = {CSCW, mobile computing, mobility, naturalistic study, HCI, voice-mail, diary study, phones, usability},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587093,
author = {Baker, Kevin and Greenberg, Saul and Gutwin, Carl},
title = {Empirical Development of a Heuristic Evaluation Methodology for Shared Workspace Groupware},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587093},
doi = {10.1145/587078.587093},
abstract = {Good real time groupware products are hard to develop, in part because evaluating their support for basic teamwork activities is difficult and costly. To address this problem, we are developing discount evaluation methods that look for groupware-specific usability problems. In a previous paper, we detailed a new set of usability heuristics that evaluators can use to inspect shared workspace groupware to see how they support teamwork. We wanted to determine whether the new heuristics could be integrated into a low-cost methodology that parallels Nielsen's traditional heuristic evaluation (HE). To this end, we examined 27 evaluations of two shared workspace groupware systems and analysed the inspectors' relative performance and variability. Similar to Nielsen's findings for traditional HE, individual inspectors discovered about a fifth of the total known teamwork problems, and that there was only modest overlap in the problems they found. Groups of three to five inspectors would report about 40-60% of the total known teamwork problems. These results suggest that heuristic evaluation using our groupware heuristics can be an effective and efficient method for identifying teamwork problems in shared workspace groupware systems.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {96–105},
numpages = {10},
keywords = {heuristic evaluation, groupware usability},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587094,
author = {Prante, Thorsten and Magerkurth, Carsten and Streitz, Norbert},
title = {Developing CSCW Tools for Idea Finding -: Empirical Results and Implications for Design},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587094},
doi = {10.1145/587078.587094},
abstract = {In this paper, we first describe a formative empirical study to inform the design of CSCW tools to support idea finding in co-located groups. Groups of students worked on creative problems with mapping and whiteboard tools in different work modes. Concluding from the results of the study, requirements are derived. A suite of tools that are informed by these requirements is presented along with typical scenarios of their usage. The suite consists of three software components covering a Mind-Mapping system (BeachMap), a novel interaction technique for successive bottom-up structuring of ideas (MagNets), and a PDA tool for asynchronous idea generation "on the road" (PalmBeach).},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {106–115},
numpages = {10},
keywords = {idea finding, production blocking, formative evaluation, computer-supported cooperative work, human-computer interaction, mind-mapping, tool-suite, personal digital assistants, creativity, large displays, co-located groups},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587096,
author = {McNee, Sean M. and Albert, Istvan and Cosley, Dan and Gopalkrishnan, Prateep and Lam, Shyong K. and Rashid, Al Mamunur and Konstan, Joseph A. and Riedl, John},
title = {On the Recommending of Citations for Research Papers},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587096},
doi = {10.1145/587078.587096},
abstract = {Collaborative filtering has proven to be valuable for recommending items in many different domains. In this paper, we explore the use of collaborative filtering to recommend research papers, using the citation web between papers to create the ratings matrix. Specifically, we tested the ability of collaborative filtering to recommend citations that would be suitable additional references for a target research paper. We investigated six algorithms for selecting citations, evaluating them through offline experiments against a database of over 186,000 research papers contained in ResearchIndex. We also performed an online experiment with over 120 users to gauge user opinion of the effectiveness of the algorithms and of the utility of such recommendations for common research tasks. We found large differences in the accuracy of the algorithms in the offline experiment, especially when balanced for coverage. In the online experiment, users felt they received quality recommendations, and were enthusiastic about the idea of receiving recommendations in this domain.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {116–125},
numpages = {10},
keywords = {social networks, citation graphs, collaborative filtering, ResearchIndex, digital libraries, recommender systems},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587097,
author = {Ribak, Amnon and Jacovi, Michal and Soroka, Vladimir},
title = {"Ask before You Search": Peer Support and Community Building with Reachout},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587097},
doi = {10.1145/587078.587097},
abstract = {This paper presents ReachOut, a chat-based tool for peer support, collaboration, and community building. We describe the philosophy behind the tool and explain how posting questions in the open directly benefits the creation, distribution, and use of organizational knowledge, in addition to enhancing the cohesion of the community involved. ReachOut proposes new methods of handling problems that include locating, selecting, and approaching the right set of potential advisers. We discuss the advantages of public discussions over private, one-on-one sessions, and how this is enhanced by our unique combination of synchronous and asynchronous communication. We present and analyze results from a pilot of ReachOut and conclude with plans for future research and development.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {126–135},
numpages = {10},
keywords = {peer support, organizational knowledge, instant messaging, expertise location, community building},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587098,
author = {Girgensohn, Andreas and Lee, Alison},
title = {Making Web Sites Be Places for Social Interaction},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587098},
doi = {10.1145/587078.587098},
abstract = {Technology can play an important role in enabling people to interact with each other. The Web is one such technology with the affordances for sharing information and for connecting people to people. In this paper, we describe the design of two social interaction Web sites for two different social groups. We review several related efforts to provide principles for creating social interaction environments and describe the specific principles that guided our design. To examine the effectiveness of the two sites, we analyze the usage data. Finally, we discuss approaches for encouraging participation and lessons learned.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {136–145},
numpages = {10},
keywords = {practice and experience, communication, cooperation, usability, common ground, web-based collaboration, participation, social interaction, awareness, usage data},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587100,
author = {Grinter, Rebecca E. and Aoki, Paul M. and Szymanski, Margaret H. and Thornton, James D. and Woodruff, Allison and Hurst, Amy},
title = {Revisiting the Visit: Understanding How Technology Can Shape the Museum Visit},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587100},
doi = {10.1145/587078.587100},
abstract = {This paper reports findings from a study of how a guidebook was used by pairs of visitors touring a historic house. We describe how the guidebook was incorporated into their visit in four ways: shared listening, independent use, following one another, and checking in on each other. We discuss how individual and groupware features were adopted in support of different visiting experiences, and illustrate how that adoption was influenced by social relationships, the nature of the current visit, and any museum visiting strategies that the couples had. Finally, we describe how the guidebook facilitated awareness between couples, and how awareness of non-guidebook users (strangers) influenced use.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {146–155},
numpages = {10},
keywords = {visitor behavior, electronic guidebook, museum},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587101,
author = {Hindmarsh, Jon and Heath, Christian and vom Lehn, Dirk and Cleverly, Jason},
title = {Creating Assemblies: Aboard the Ghost Ship},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587101},
doi = {10.1145/587078.587101},
abstract = {This paper examines the use of an interactive artwork that was designed by members of the research team and exhibited at the Sculpture, Objects and Functional Art (SOFA) Exposition in Chicago, USA. The paper uses audio-visual recordings of interaction with and around the work to consider how people encounter and make sense of an assembly of traditional objects and video technologies. The analysis of action and interaction is used to develop a series of 'design sensitivities' to inform the development of technological assemblies to engender informal interaction and sociability in museums and galleries.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {156–165},
numpages = {10},
keywords = {museums, interaction, video, ethnography},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587102,
author = {Frohlich, David and Kuchinsky, Allan and Pering, Celine and Don, Abbe and Ariss, Steven},
title = {Requirements for Photoware},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587102},
doi = {10.1145/587078.587102},
abstract = {Eleven PC-owning families were interviewed at home about their use of conventional and digital photos. They also completed photo diaries and recorded photo-sharing conversations that occurred spontaneously over a three month period after the in-home interviews. From an analysis of the resulting materials we illustrate the strengths and weaknesses of past and present technology for photo sharing. These allow us to prioritise user requirements for a range of future photo-sharing technologies or 'photoware'.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {166–175},
numpages = {10},
keywords = {photoware, photo sharing, cameras, storytelling, communication, user requirements, digital photography},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587104,
author = {Bossen, Claus},
title = {The Parameters of Common Information Spaces: The Heterogeneity of Cooperative Work at a Hospital Ward},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587104},
doi = {10.1145/587078.587104},
abstract = {The paper proposes a refinement of the concept of 'Common Information Spaces' (CIS), which has been proposed as a conceptual framework for the CWCW field in order to provide analyses of cooperative work. The refinement is developed through an introductory discussion of previous analyses of CIS and on the basis of a thorough description of the CIS of a hospital ward based on ethnographic fieldwork. The initially definition is refined by the introduction of 7 parameters: (i) the degree of distribution of work; (ii) the multiplicity of webs of significance; (iii) the level of required articulation work; (iv) multiplicity and intensity of means of communication; (v) the web of artefacts; (vi) immaterial mechanisms of interaction; (vii) the need for precision and promptness of interpretation. These parameters provide a more detailed conceptual framework and can be applied to characterize the particularity of a given CIS.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {176–185},
numpages = {10},
keywords = {hospital ward, artefacts, articulation work, common information spaces, coordination mechanisms, health care},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587105,
author = {Tuikka, Tuomo},
title = {Remote Concept Design from an Activity Theory Perspective},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587105},
doi = {10.1145/587078.587105},
abstract = {This paper presents product concept design situations that occurred in computer aided concept design workshops. These situations were analysed using the concepts of activity theory to show how designers convey their understanding across distance. From this analysis, hypothetical user activity can be identified as an instrument of collaborative construction during design action. It is a common design object and mediates between the designers along with the future artifact. In order to support designers, future computer systems should therefore bridge the gap between physical and virtual design spaces. The concept of hypothetical user activity can be a means to organize such a system.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {186–195},
numpages = {10},
keywords = {activity theory, instrument, concept design, virtual prototype, remote collaboration},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587106,
author = {Stevens, Gunnar and Wulf, Volker},
title = {A New Dimension in Access Control: Studying Maintenance Engineering across Organizational Boundaries},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587106},
doi = {10.1145/587078.587106},
abstract = {Inter-organizational cooperation has specific requirements for access control. The paper presents the results from a field study which looks at the cooperation between two engineering offices and a steel mill. Based on these findings we have developed new mechanisms for access control in groupware. These mechanisms allow to restrict operations on shared data while or even after they take place. The new access mechanisms can be decomposed and implemented into a component-based framework. We show how this framework can be extended to realize additional mechanisms for access control with little efforts.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {196–205},
numpages = {10},
keywords = {case study, inter-organizational cooperation, tailorability, access control},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587108,
author = {Kraut, Robert E. and Morris, James and Telang, Rahul and Filer, Darrin and Cronin, Matt and Sunder, Shyam},
title = {Markets for Attention: Will Postage for Email Help?},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587108},
doi = {10.1145/587078.587108},
abstract = {Balancing the needs of information distributors and their audiences has grown harder in the age of the Internet. While the demand for attention continues to increase rapidly with the volume of information and communication, the supply of human attention is relatively fixed. Markets are a social institution for efficiently balancing supply and demand of scarce resources. Charging a price for sending messages may help discipline senders from demanding more attention than they are willing to pay for. Price may also help recipients estimate the value of a message before reading it. We report the results of two laboratory experiments to explore the consequences of a pricing system for electronic mail. Charging postage for email causes senders to be more selective and send fewer messages. However, recipients did not use the postage paid by senders as a signal of importance. These studies suggest markets for attention have potential, but their design needs more work.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {206–215},
numpages = {10},
keywords = {electronic mail, economics, social impact, spam, empirical studies, computer mediated communication, markets},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587109,
author = {Whittaker, Steve and Jones, Quentin and Terveen, Loren},
title = {Contact Management: Identifying Contacts to Support Long-Term Communication},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587109},
doi = {10.1145/587078.587109},
abstract = {Much of our daily communication activity involves managing interpersonal communications and relationships. Despite its importance, this activity of contact management is poorly understood. We report on field and lab studies that begin to illuminate it.A field study of business professionals confirmed the importance of contact management and revealed a major difficulty: selecting important contacts from the large set of people with whom one communicates. These interviews also showed that communication history is a key resource for this task. Informants identified several history-based criteria that they considered useful.We conducted a lab study to test how well these criteria predict contact importance. Subjects identified important contacts from their email archives. We then analyzed their email to extract features for all contacts. Reciprocity, recency and longevity of email interaction proved to be strong predictors of contact importance. The experiment also identified another contact management problem: removing 'stale' contacts from long term archives. We discuss the design and theoretical implications of these results.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {216–225},
numpages = {10},
keywords = {address books, communication history, PDAs, contact management, asynchronous communication},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587110,
author = {Bradner, Erin and Mark, Gloria},
title = {Why Distance Matters: Effects on Cooperation, Persuasion and Deception},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587110},
doi = {10.1145/587078.587110},
abstract = {In this study, we examine how geographic distance affects collaboration using computer-mediated communication technology. We investigated experimentally the effects of cooperating partners being in the same or distant city on three behaviors: cooperation, persuasion, and deception using video conferencing and instant messaging (IM). Our results indicate that subjects are more likely to deceive, be less persuaded by, and initially cooperate less, with someone they believe is in a distant city, as opposed to in the same city as them. Although people initially cooperate less with someone they believe is far away, their willingness to cooperate increases quickly with interaction. Since the same media were used in both the far and near city conditions, these effects cannot be attributed to the media, but rather to social differences. This study confirms how CSCW needs to be concerned with developing technologies for bridging social distance, as well as geographic distance.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {226–235},
numpages = {10},
keywords = {instant messaging, deception, CSCW, distance collaboration, video, cooperation, empirical study},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587112,
author = {Laurillau, Yann and Nigay, Laurence},
title = {Clover Architecture for Groupware},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587112},
doi = {10.1145/587078.587112},
abstract = {In this paper we present the Clover architectural model, a new conceptual architectural model for groupware. Our model results from the combination of the layer approach of Dewan's generic architecture with the functional decomposition of the Clover design model. The Clover design model defines three classes of services that a groupware application may support, namely, production, communication and coordination services. The three classes of services can be found in each functional layer of our model. Our model is illustrated with a working system, the CoVitesse system, its software being organized according to our Clover architectural model.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {236–245},
numpages = {10},
keywords = {clover design model, conceptual software architecture},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587113,
author = {Li, Du and Li, Rui},
title = {Transparent Sharing and Interoperation of Heterogeneous Single-User Applications},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587113},
doi = {10.1145/587078.587113},
abstract = {Multi-user applications generally lag behind in features or compatibility with single-user applications. As a result, users are often not motivated to abandon their favorite single-user applications for groupware features that are less frequently used. A well-accepted approach, collaboration transparency, is able to convert off-the-shelf single-user applications into groupware without modifying the source code. However, existing systems have been largely striving to develop generic application-sharing mechanisms and undesirably force users to share the same application in cooperative work. In this paper we analyze this problem and present a novel approach (called intelligent collaboration transparency) to addressing this problem. Our approach allows for heterogeneous application sharing by considering the particular semantics of the applications and the collaboration task in question.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {246–255},
numpages = {10},
keywords = {heterogeneity, application sharing, interoperation, collaboration transparency, group editing},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587114,
author = {Edwards, W. Keith and Newman, Mark W. and Sedivy, Jana Z. and Smith, Trevor F. and Balfanz, Dirk and Smetters, D. K. and Wong, H. Chi and Izadi, Shahram},
title = {Using Speakeasy for Ad Hoc Peer-to-Peer Collaboration},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587114},
doi = {10.1145/587078.587114},
abstract = {Peer-to-peer systems appear promising in terms of their ability to support ad hoc, spontaneous collaboration. However, current peer-to-peer systems suffer from several deficiencies that diminish their ability to support this domain, such as inflexibility in terms of discovery protocols, network usage, and data transports. We have developed the Speakeasy framework, which addresses these issues, and supports these types of applications. We show how Speakeasy addresses the shortcomings of current peer-to-peer systems, and describe a demonstration application, called Casca, that supports ad hoc peer-to-peer collaboration by taking advantages of the mechanisms provided by Speakeasy.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {256–265},
numpages = {10},
keywords = {peer-to-peer, speakeasy, ad-hoc collaboration, casca},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587116,
author = {Lutters, Wayne G. and Ackerman, Mark S.},
title = {Achieving Safety: A Field Study of Boundary Objects in Aircraft Technical Support},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587116},
doi = {10.1145/587078.587116},
abstract = {Boundary objects are a critical, but understudied, theoretical construct in CSCW. Through a field study of aircraft technical support, we examined the role of boundary objects in the "achievement of safety" by service engineers. The resolution process of repair requests was captured in two compound boundary objects. These crystallizations did not manifest a static interpretation, but instead were continually re-interpreted in light of meta-negotiations. This suggests design implications for organizational memory systems which can more fluidly represent the meta-negotiations surrounding boundary objects.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {266–275},
numpages = {10},
keywords = {hotlines, safety, boundary objects, organizational memory, service engineering, collaborative work, technical support, information reuse, high reliability organizations},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587117,
author = {Painter, Bert},
title = {The Electronic Claim File: A Case Study of Impacts of Information Technology in Knowledge Work},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587117},
doi = {10.1145/587078.587117},
abstract = {This is a case study of a public insurance company's conversion of long-standing paper-based work processes to an electronic document management system, "E-File", with imaging, data integration, and automated workflow. As a transformational change, the E-File experience illuminates a range of effects of information technology. Many effects were well-enough managed, through participatory design and labor-management consultation, to yield an outcome where over 90% of the highly skilled employees surveyed in the 1200 white-collar user population regard E-File as a substantially positive change. What remain are some enduring challenges. Most notable are computerization effects unique to knowledge work, combined with the constant changes associated with information technology.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {276–285},
numpages = {10},
keywords = {case study, participatory design, information technology, knowledge work, technological change, labor-management consultation},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587118,
author = {Pettersson, M\r{a}rten and Randall, Dave and Helgeson, Bo},
title = {Ambiguities, Awareness and Economy: A Study of Emergency Service Work},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587118},
doi = {10.1145/587078.587118},
abstract = {This paper derives from a study undertaken at an emergency service centre in Sweden. The studies have focused on features of work familiar to the CSCW community, including the documenting and analysing current work practices, understanding the properties of the technology in question, and perhaps most importantly how the technology functions in and through use. Our focus in this paper exemplifies these themes through the analysis of two cases. In the first, the issue in question is the way in which an emergency is identified and dealt with, it being the case that a typical problem to be dealt with by operators, and more commonly in the days of mobile telephony, is that of multiple reporting of a single case. Of particular interest here is listening-in, which is a function in the Computer Aided Dispatch (CAD) system and by contrast that of 'overhearing', which is not. The second case focus on the relevance of wall maps, given the existence of computerized maps in these centres. Based on two cases from emergency service centres, we will show that the concept of awareness needs careful unpacking if we are to understand associated design issues.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {286–295},
numpages = {10},
keywords = {centers of coordination, coordination, computer aided dispatch, workplace study, time-critical work, awareness, control rooms, command and control, ethnography},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587120,
author = {Grasso, Antonietta and Meunier, Jean-Luc},
title = {Who Can Claim Complete Abstinence from Peeking at Print Jobs?},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587120},
doi = {10.1145/587078.587120},
abstract = {While systems supporting communities of practice in work organizations have been shown to be desirable many, if not all, are decoupled from daily work practices and tools. This hinders a wide collection of data about their activities, because of the additional effort that is required from the users. Therefore a pre-requisite for a system aiming at making visible the community activity is the non-intrusive collection of data about the activities that are carried on in a workplace. We present a range of personal document management services that support the construction of a collective memory of user print activities. We have internally tested the system and verified that it successfully provided personal benefit, thereby ensuring that the system receives sufficient usage for the shared memory to be useful. The system also successfully addressed privacy concerns and effectively provided large data sets about document related activities. Finally it provided information able to trigger new or to reinforce existing informal exchanges in communities of practice at a convenient moment; the print action.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {296–305},
numpages = {10},
keywords = {community awareness, memory support, knowledge sharing, document management, paper user interface},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587121,
author = {Millen, David R. and Patterson, John F.},
title = {Stimulating Social Engagement in a Community Network},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587121},
doi = {10.1145/587078.587121},
abstract = {One of the most challenging problems facing builders and facilitators of community networks is to create and sustain social engagement among members. In this paper, we investigate the drivers of social engagement in a community network through the analysis of three data sources: activity logs, a member survey, and the content analysis of the conversation archives. We describe three important ways to encourage and support social engagement in online communities: through system design elements such as conversation channeling and event notification, by various selection criteria for community members, and through facilitation of specific kinds of discussion topics.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {306–313},
numpages = {8},
keywords = {social engagement, social awareness, empirical studies, community-support systems, community networks},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587122,
author = {Cadiz, J. J. and Venolia, Gina and Jancke, Gavin and Gupta, Anoop},
title = {Designing and Deploying an Information Awareness Interface},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587122},
doi = {10.1145/587078.587122},
abstract = {The concept of awareness has received increasing attention over the past several CSCW conferences. Although many awareness interfaces have been designed and studied, most have been limited deployments of research prototypes. In this paper we describe Sideshow, a peripheral awareness interface that was rapidly adopted by thousands of people in our company. Sideshow provides regularly updated peripheral awareness of a broad range of information from virtually any accessible web site or database. We discuss Sideshow's design and the experience of refining and redesigning the interface based on feedback from a rapidly expanding user community.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {314–323},
numpages = {10},
keywords = {situational awareness, computer mediated communication, awareness, peripheral awareness, information overload},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587124,
author = {Shen, Chia and Lesh, Neal B. and Vernier, Frederic and Forlines, Clifton and Frost, Jeana},
title = {Sharing and Building Digital Group Histories},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587124},
doi = {10.1145/587078.587124},
abstract = {Organizations, families, institutions evolve a shared culture and history. In this work, we describe a system to facilitate conversation and storytelling about this collective past. Users explore digital archives of shared materials such as photographs, video, and text documents on a tabletop interface. Both the software and the interface encourage natural conversation and reflection. This work is an application of our ongoing research on systems for multiple, co-present users to explore digital collections. In this paper, we present a case study of our own group history along with the software extensions developed for this scenario. These extensions include methods for easily branching off from and returning to previous threads of the exploration, incorporating background contexts that support a variety of view points and flexible story sharing, and supporting the active and passive discovery of relevant information.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {324–333},
numpages = {10},
keywords = {single-display groupware, group history, digital story sharing},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587125,
author = {Begole, James "Bo" and Tang, John C. and Smith, Randall B. and Yankelovich, Nicole},
title = {Work Rhythms: Analyzing Visualizations of Awareness Histories of Distributed Groups},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587125},
doi = {10.1145/587078.587125},
abstract = {We examined records of minute-by-minute computer activity coupled with information about the location of the activity, online calendar appointments, and e-mail activity. We present a number of visualizations of the data that exhibit meaningful patterns in users' activities. We demonstrate how the patterns vary between individuals and within individuals according to time of day, location, and day of the week. Some patterns augment the schedule information found in people's online calendars. We discuss applications for group coordination (especially across time zones) plus opportunities for future research. In light of the popularity of instant messaging, this research identifies some of the benefits and privacy risks associated with the uses of online presence and awareness information.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {334–343},
numpages = {10},
keywords = {group calendaring, awareness, work rhythms, sociology of time, presence, CSCW, instant messaging (IM)},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587126,
author = {Reddy, Madhu and Dourish, Paul},
title = {A Finger on the Pulse: Temporal Rhythms and Information Seeking in Medical Work},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587126},
doi = {10.1145/587078.587126},
abstract = {Most cooperative work takes place in information-rich environments. However, studies of "information work" tend to focus on the decontextualized access and retrieval problems faced by individual information seekers. Our work is directed towards understanding how information management is seamlessly integrated into the course of everyday activities. Drawing on an ethnographic study of medical work, we explore the relationship between information and temporal coordination and discuss the role of temporal patterns or "rhythms" in providing individuals with the means to coordinate information and work.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {344–353},
numpages = {10},
keywords = {rhythms, medical work, information seeking},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587128,
author = {Jouppi, Norman P.},
title = {First Steps towards Mutually-Immersive Mobile Telepresence},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587128},
doi = {10.1145/587078.587128},
abstract = {Mutually-Immersive Mobile Telepresence uses a teleoperated robotic surrogate to visit remote locations as a substitute for physical travel. Our goal is to recreate to the greatest extent possible, both for the user and the people at the remote location, the sensory experience relevant for business interactions of the user actually being in the remote location. The system includes multi-channel bidirectional video and audio on a mobile platform as well as haptic feedback. This paper describes our first system prototypes and initial experiences using them.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {354–363},
numpages = {10},
keywords = {multi-channel audio, multi-user networked applications, robotics, user interface hardware, multimedia, video conferencing, audio conferencing, human visual perception, haptics},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587129,
author = {Prince, Simon and Cheok, Adrian David and Farbiz, Farzam and Williamson, Todd and Johnson, Nik and Billinghurst, Mark and Kato, Hirokazu},
title = {3-D Live: Real Time Interaction for Mixed Reality},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587129},
doi = {10.1145/587078.587129},
abstract = {We describe a real-time 3-D augmented reality video- conferencing system. With this technology, an observer sees the real world from his viewpoint, but modified so that the image of a remote collaborator is rendered into the scene. We register the image of the collaborator with the world by estimating the 3-D transformation between the camera and a fiducial marker. We describe a novel shape- from-silhouette algorithm, which generates the appropriate view of the collaborator and the associated depth map at 30 fps. When this view is superimposed upon the real world, it gives the strong impression that the collaborator is a real part of the scene. We also demonstrate interaction in virtual environments with a "live" fully 3-D collaborator. Finally, we consider interaction between users in the real world and collaborators in a virtual space, using a "tangible" AR interface.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {364–371},
numpages = {8},
keywords = {video-conferencing, shape from silhouette, interaction, image based rendering, augmented reality},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

@inproceedings{10.1145/587078.587130,
author = {Jones, Hank and Hinds, Pamela},
title = {Extreme Work Teams: Using SWAT Teams as a Model for Coordinating Distributed Robots},
year = {2002},
isbn = {1581135602},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/587078.587130},
doi = {10.1145/587078.587130},
abstract = {We present a field study of police SWAT teams for the purpose of enabling grounded design of a system to coordinate distributed field robots. The mission-oriented, spatially distributed SWAT environment provides a rich resource for robotics designers that mirrors field robot deployments in key ways. We highlight the processes with which SWAT team leaders create and maintain common ground among team members and coordinate action in these tightly-coupled, distributed teams. We present a system for coordinating distributed robots that we designed based on our SWAT team observations.},
booktitle = {Proceedings of the 2002 ACM Conference on Computer Supported Cooperative Work},
pages = {372–381},
numpages = {10},
keywords = {field robotics, human-robot interaction, leadership, distributed teams, distributed work, extreme work teams},
location = {New Orleans, Louisiana, USA},
series = {CSCW '02}
}

license: Unlicense

repository: goyalkaraniit/acm-cr

repo_name: goyalkaraniit/acm-cr


text:
// This file is subject to a 1-clause BSD license.
// Its contents can be found in the enclosed LICENSE file.

package cmd

import (
	"regexp"
	"strconv"
	"strings"
)

// ParamList defines a list of command parameters.
type ParamList []Param

func (p ParamList) Len() int            { return len(p) }
func (p ParamList) String(n int) string { return p[n].String() }
func (p ParamList) Int(n int) int64     { return p[n].Int() }
func (p ParamList) Uint(n int) uint64   { return p[n].Uint() }
func (p ParamList) Float(n int) float64 { return p[n].Float() }
func (p ParamList) Bool(n int) bool     { return p[n].Bool() }

// Join returns all parameter values, concatenated into a single string.
// Each entry is separated by a blank space.
func (p ParamList) Join() string {
	out := make([]string, len(p))

	for i := range p {
		out[i] = p[i].Value
	}

	return strings.Join(out, " ")
}

// Param defines a parameter for a command.
type Param struct {
	Name        string         // Parameter name -- used in help listing.
	Description string         // Parameter description -- used in help listing.
	Value       string         // Parameter value.
	Pattern     *regexp.Regexp // Pattern defining the type of accepted value.
	Required    bool           // Parameter is required or not?
}

// validate returns true if the given value matches the param pattern.
func (p *Param) validate(v string) bool { return p.Pattern.MatchString(v) }

func (p *Param) String() string { return p.Value }

func (p *Param) Int() int64 {
	n, _ := strconv.ParseInt(p.Value, 0, 64)
	return n
}

func (p *Param) Uint() uint64 {
	n, _ := strconv.ParseUint(p.Value, 0, 64)
	return n
}

func (p *Param) Float() float64 {
	n, _ := strconv.ParseFloat(p.Value, 64)
	return n
}

// Bool returns the boolean value represented by the parameter.
// True is represented by the values: "1", "t", "true", "y", "yes", "on"
// Any other value returns false.
func (p *Param) Bool() bool {
	switch strings.ToLower(p.Value) {
	case "1", "t", "true", "y", "yes", "on":
		return true
	default:
		return false
	}
}

repository: monkeybird/autimaat

repo_name: monkeybird/autimaat

gha_language: Go


text:
package leetcode

import (
	"testing"
)

func TestMaxArea(t *testing.T) {
	var ret int
	var nums []int

	nums = []int{1, 8, 6, 2, 5, 4, 8, 3, 7}
	ret = 49
	if ret != maxArea(nums) {
		t.Fatalf("case fails %v\n", ret)
	}
}

repository: lomy/leetcode

repo_name: lomy/leetcode


text:
package keeper

import (
	"testing"

	sdk "github.com/cosmos/cosmos-sdk/types"
	"github.com/okex/exchain/x/farm/types"
	"github.com/stretchr/testify/require"
)

func TestCalculateAmountYieldedBetween(t *testing.T) {
	ctx, keeper := GetKeeper(t)
	poolName := "poolName"
	type testCase struct {
		curRewards     types.PoolCurrentRewards
		endBlockHeight int64
		yieldedInfos   types.YieldedTokenInfos
		expectedFunc   func(testCase, func() (types.FarmPool, sdk.SysCoins))
	}

	expectSuccess := func(test testCase, testFunc func() (types.FarmPool, sdk.SysCoins)) {
		pool, yieldedTokens := testFunc()
		oldRemaining := test.yieldedInfos[0].RemainingAmount
		newRemaining := pool.YieldedTokenInfos[0].RemainingAmount
		require.Equal(t, yieldedTokens, sdk.SysCoins{oldRemaining.Sub(newRemaining)})
	}

	expectNotYield := func(test testCase, testFunc func() (types.FarmPool, sdk.SysCoins)) {
		pool, yieldedTokens := testFunc()
		require.True(t, yieldedTokens.IsZero())
		require.Equal(t, test.yieldedInfos, pool.YieldedTokenInfos)
	}

	tests := []testCase{
		{
			curRewards:     types.NewPoolCurrentRewards(100, 1, sdk.SysCoins{}),
			endBlockHeight: 120,
			yieldedInfos: types.YieldedTokenInfos{
				types.NewYieldedTokenInfo(
					sdk.NewDecCoin("xxb", sdk.ZeroInt()),
					0,
					sdk.NewDec(0),
				),
			},
			expectedFunc: expectNotYield,
		},
		{
			curRewards:     types.NewPoolCurrentRewards(60, 1, sdk.SysCoins{}),
			endBlockHeight: 100,
			yieldedInfos: types.YieldedTokenInfos{
				types.NewYieldedTokenInfo(
					sdk.NewDecCoin("xxb", sdk.NewInt(1000)),
					100,
					sdk.NewDec(10),
				),
			},
			expectedFunc: expectNotYield,
		},
		{
			curRewards:     types.NewPoolCurrentRewards(120, 1, sdk.SysCoins{}),
			endBlockHeight: 100,
			yieldedInfos: types.YieldedTokenInfos{
				types.NewYieldedTokenInfo(
					sdk.NewDecCoin("xxb", sdk.NewInt(1000)),
					70,
					sdk.NewDec(10),
				),
			},
			expectedFunc: expectNotYield,
		},
		{
			curRewards:     types.NewPoolCurrentRewards(60, 1, sdk.SysCoins{}),
			endBlockHeight: 100,
			yieldedInfos: types.YieldedTokenInfos{
				types.NewYieldedTokenInfo(
					sdk.NewDecCoin("xxb", sdk.NewInt(1000)),
					70,
					sdk.NewDec(10),
				),
			},
			expectedFunc: expectSuccess,
		},
		{
			curRewards:     types.NewPoolCurrentRewards(70, 1, sdk.SysCoins{}),
			endBlockHeight: 100,
			yieldedInfos: types.YieldedTokenInfos{
				types.NewYieldedTokenInfo(
					sdk.NewDecCoin("xxb", sdk.NewInt(100)),
					60,
					sdk.NewDec(10),
				),
			},
			expectedFunc: expectSuccess,
		},
	}

	for _, test := range tests {
		ctx = ctx.WithBlockHeight(test.endBlockHeight)
		keeper.SetPoolCurrentRewards(ctx, poolName, test.curRewards)
		pool := types.FarmPool{
			Name:              poolName,
			YieldedTokenInfos: types.YieldedTokenInfos{test.yieldedInfos[0]},
		}
		wrappedTestFunc := func() (types.FarmPool, sdk.SysCoins) {
			return keeper.CalculateAmountYieldedBetween(ctx, pool)
		}
		test.expectedFunc(test, wrappedTestFunc)
	}
}

func TestIncrementReferenceCount(t *testing.T) {
	ctx, keeper := GetKeeper(t)
	poolName := "poolName"

	expectSuccess := func(testFunc func()) {
		testFunc()
	}

	expectPanic := func(testFunc func()) {
		require.Panics(t, testFunc)
	}

	tests := []struct {
		period         uint64
		referenceCount uint16
		expectedFunc   func(func())
	}{
		{0, 0, expectSuccess},
		{1, 1, expectSuccess},
		{2, 2, expectSuccess},
		{0, 3, expectPanic},
	}

	for _, test := range tests {
		his := types.NewPoolHistoricalRewards(sdk.SysCoins{}, test.referenceCount)
		keeper.SetPoolHistoricalRewards(ctx, poolName, test.period, his)
		wrappedTestFunc := func() {
			keeper.incrementReferenceCount(ctx, poolName, test.period)
			newHis := keeper.GetPoolHistoricalRewards(ctx, poolName, test.period)
			require.Equal(t, test.referenceCount+1, newHis.ReferenceCount)
		}
		test.expectedFunc(wrappedTestFunc)
	}
}

func TestDecrementReferenceCount(t *testing.T) {
	ctx, keeper := GetKeeper(t)
	poolName := "poolName"

	type testCase struct {
		period         uint64
		referenceCount uint16
		expectedFunc   func(testCase, func())
	}

	expectDeleted := func(test testCase, testFunc func()) {
		testFunc()
		require.Panics(t, func() {
			keeper.GetPoolHistoricalRewards(ctx, poolName, test.period)
		})
	}

	expectSuccess := func(test testCase, testFunc func()) {
		testFunc()
		newHis := keeper.GetPoolHistoricalRewards(ctx, poolName, test.period)
		require.Equal(t, test.referenceCount-1, newHis.ReferenceCount)
	}

	expectPanic := func(test testCase, testFunc func()) {
		require.Panics(t, testFunc)
	}

	tests := []testCase{
		{0, 0, expectPanic},
		{1, 1, expectDeleted},
		{2, 2, expectSuccess},
		{0, 3, expectSuccess},
	}

	for _, test := range tests {
		his := types.NewPoolHistoricalRewards(sdk.SysCoins{}, test.referenceCount)
		keeper.SetPoolHistoricalRewards(ctx, poolName, test.period, his)
		wrappedTestFunc := func() {
			keeper.decrementReferenceCount(ctx, poolName, test.period)
		}
		test.expectedFunc(test, wrappedTestFunc)
	}
}

func TestCalculateLockRewardsBetween(t *testing.T) {
	ctx, keeper := GetKeeper(t)
	poolName := "poolName"

	type testCase struct {
		startPeriod  uint64
		startRatio   sdk.SysCoins
		endPeriod    uint64
		endRatio     sdk.SysCoins
		amount       sdk.SysCoin
		expectedFunc func(testCase, func() sdk.SysCoins)
	}

	expectSuccess := func(test testCase, testFunc func() sdk.SysCoins) {
		rewards := testFunc()
		require.Equal(t, rewards, test.endRatio.Sub(test.startRatio).MulDecTruncate(test.amount.Amount))
	}

	expectPanic := func(test testCase, testFunc func() sdk.SysCoins) {
		require.Panics(t, func() {
			testFunc()
		})
	}

	tests := []testCase{
		{
			startPeriod: 0,
			startRatio: sdk.SysCoins{
				sdk.NewDecCoin("wwb", sdk.NewInt(10)),
				sdk.NewDecCoin("okt", sdk.NewInt(10)),
			},
			endPeriod: 1,
			endRatio: sdk.SysCoins{
				sdk.NewDecCoin("wwb", sdk.NewInt(10)),
				sdk.NewDecCoin("okt", sdk.NewInt(100)),
			},
			amount:       sdk.NewDecCoin("xxb", sdk.NewInt(10)),
			expectedFunc: expectSuccess,
		},
		{
			startPeriod: 0,
			startRatio: sdk.SysCoins{
				sdk.NewDecCoin("wwb", sdk.NewInt(10)),
				sdk.NewDecCoin("okt", sdk.NewInt(10)),
			},
			endPeriod: 1,
			endRatio: sdk.SysCoins{
				sdk.NewDecCoin("wwb", sdk.NewInt(10)),
				sdk.NewDecCoin("okt", sdk.NewInt(7)),
			},
			amount:       sdk.NewDecCoin("xxb", sdk.NewInt(10)),
			expectedFunc: expectPanic,
		},
		{
			startPeriod: 0,
			startRatio: sdk.SysCoins{
				sdk.NewDecCoin("wwb", sdk.NewInt(10)),
				sdk.NewDecCoin("okt", sdk.NewInt(10)),
			},
			endPeriod: 1,
			endRatio: sdk.SysCoins{
				sdk.NewDecCoin("wwb", sdk.NewInt(10)),
				sdk.NewDecCoin("okt", sdk.NewInt(100)),
			},
			amount:       sdk.SysCoin{"xxb", sdk.NewDec(-1)},
			expectedFunc: expectPanic,
		},
		{
			startPeriod: 1,
			startRatio: sdk.SysCoins{
				sdk.NewDecCoin("wwb", sdk.NewInt(10)),
				sdk.NewDecCoin("okt", sdk.NewInt(10)),
			},
			endPeriod: 0,
			endRatio: sdk.SysCoins{
				sdk.NewDecCoin("wwb", sdk.NewInt(10)),
				sdk.NewDecCoin("okt", sdk.NewInt(100)),
			},
			amount:       sdk.NewDecCoin("xxb", sdk.NewInt(10)),
			expectedFunc: expectPanic,
		},
	}

	for _, test := range tests {
		startHis := types.NewPoolHistoricalRewards(test.startRatio, 1)
		keeper.SetPoolHistoricalRewards(ctx, poolName, test.startPeriod, startHis)
		endHis := types.NewPoolHistoricalRewards(test.endRatio, 1)
		keeper.SetPoolHistoricalRewards(ctx, poolName, test.endPeriod, endHis)

		wrappedTestFunc := func() sdk.SysCoins {
			return keeper.calculateLockRewardsBetween(ctx, poolName, test.startPeriod, test.endPeriod, test.amount)
		}
		test.expectedFunc(test, wrappedTestFunc)
	}
}

func TestIncrementPoolPeriod(t *testing.T) {
	ctx, keeper := GetKeeper(t)
	poolName := "poolName"

	type testCase struct {
		curRewards    types.PoolCurrentRewards
		preHisRewards types.PoolHistoricalRewards
		valueLocked   sdk.SysCoin
		yieldedTokens sdk.SysCoins
		expectedFunc  func(testCase, func() uint64)
	}

	expectSuccess := func(test testCase, testFunc func() uint64) {
		period := testFunc()
		// previous historical rewards is deleted
		require.Panics(t, func() {
			keeper.GetPoolHistoricalRewards(ctx, poolName, test.curRewards.Period-1)
		})
		// return the current period ended just now
		require.Equal(t, test.curRewards.Period, period)

		var currentRatio sdk.SysCoins
		if test.valueLocked.IsZero() {
			currentRatio = sdk.SysCoins{}
		} else {
			currentRatio = test.curRewards.Rewards.Add2(test.yieldedTokens).QuoDecTruncate(test.valueLocked.Amount)
		}

		// create new current period rewards
		newHis := keeper.GetPoolHistoricalRewards(ctx, poolName, test.curRewards.Period)
		require.Equal(t, test.preHisRewards.CumulativeRewardRatio.Add2(currentRatio),
			newHis.CumulativeRewardRatio,
		)

		newCurr := keeper.GetPoolCurrentRewards(ctx, poolName)
		require.Equal(
			t,
			test.curRewards.Period+1,
			newCurr.Period,
		)
	}

	tests := []testCase{
		{
			curRewards: types.NewPoolCurrentRewards(100, 1, sdk.SysCoins{}),
			preHisRewards: types.NewPoolHistoricalRewards(
				sdk.SysCoins{sdk.NewDecCoinFromDec("xxb", sdk.NewDec(10))}, 1,
			),
			valueLocked:   sdk.NewDecCoinFromDec("wwb", sdk.NewDec(100)),
			yieldedTokens: sdk.SysCoins{sdk.NewDecCoin("yyb", sdk.NewInt(100))},
			expectedFunc:  expectSuccess,
		},
		{
			curRewards: types.NewPoolCurrentRewards(100, 1, sdk.SysCoins{}),
			preHisRewards: types.NewPoolHistoricalRewards(
				sdk.SysCoins{sdk.NewDecCoinFromDec("xxb", sdk.NewDec(10))}, 1,
			),
			valueLocked:   sdk.NewDecCoinFromDec("wwb", sdk.NewDec(0)),
			yieldedTokens: sdk.SysCoins{sdk.NewDecCoin("yyb", sdk.NewInt(100))},
			expectedFunc:  expectSuccess,
		},
	}

	for _, test := range tests {
		keeper.SetPoolHistoricalRewards(ctx, poolName, test.curRewards.Period-1, test.preHisRewards)
		keeper.SetPoolCurrentRewards(ctx, poolName, test.curRewards)

		wrappedTestFunc := func() uint64 {
			return keeper.IncrementPoolPeriod(ctx, poolName, test.valueLocked, test.yieldedTokens)
		}
		test.expectedFunc(test, wrappedTestFunc)
	}
}

func TestUpdateLockInfo(t *testing.T) {
	ctx, keeper := GetKeeper(t)
	poolName := "poolName"

	type testCase struct {
		lockInfo      types.LockInfo
		changeAmount  sdk.Dec
		isSetLockInfo bool
		expectedFunc  func(testCase, func())
	}

	expectPanic := func(test testCase, testFunc func()) {
		require.Panics(t, func() {
			testFunc()
		})
	}

	expectDelete := func(test testCase, testFunc func()) {
		testFunc()
		found := keeper.HasLockInfo(ctx, test.lockInfo.Owner, poolName)
		require.False(t, found)
		found = keeper.HasAddressInFarmPool(ctx, poolName, test.lockInfo.Owner)
		require.False(t, found)
	}

	expectUpdate := func(test testCase, testFunc func()) {
		testFunc()
		lockInfo, found := keeper.GetLockInfo(ctx, test.lockInfo.Owner, poolName)
		require.True(t, found)
		require.Equal(t, lockInfo.Amount.Amount, test.lockInfo.Amount.Amount.Add(test.changeAmount))
	}

	tests := []testCase{
		{
			lockInfo: types.NewLockInfo(
				Addrs[0], poolName, sdk.NewDecCoinFromDec("xxb", sdk.NewDec(10)),
				100, 1,
			),
			changeAmount:  sdk.NewDec(0),
			isSetLockInfo: false,
			expectedFunc:  expectPanic,
		},
		{
			lockInfo: types.NewLockInfo(
				Addrs[0], poolName, sdk.NewDecCoinFromDec("xxb", sdk.NewDec(10)),
				100, 1,
			),
			changeAmount:  sdk.NewDec(-10),
			isSetLockInfo: true,
			expectedFunc:  expectDelete,
		},
		{
			lockInfo: types.NewLockInfo(
				Addrs[0], poolName, sdk.NewDecCoinFromDec("xxb", sdk.NewDec(10)),
				100, 1,
			),
			changeAmount:  sdk.NewDec(5),
			isSetLockInfo: true,
			expectedFunc:  expectUpdate,
		},
	}

	for _, test := range tests {
		keeper.SetPoolHistoricalRewards(
			ctx, poolName, 1,
			types.NewPoolHistoricalRewards(sdk.SysCoins{}, 1),
		)
		keeper.SetPoolCurrentRewards(
			ctx, poolName, types.NewPoolCurrentRewards(ctx.BlockHeight(), 2, sdk.SysCoins{}),
		)
		if test.isSetLockInfo {
			keeper.SetLockInfo(ctx, test.lockInfo)
		}
		wrappedTestFunc := func() {
			keeper.UpdateLockInfo(ctx, test.lockInfo.Owner, poolName, test.changeAmount)
		}
		test.expectedFunc(test, wrappedTestFunc)
	}
}

func TestWithdrawRewards(t *testing.T) {
	ctx, keeper := GetKeeper(t)
	poolName := "poolName"

	type testCase struct {
		lockInfo       types.LockInfo
		totalLocked    sdk.SysCoin
		yieldedAmount  sdk.SysCoins
		isSetLockInfo  bool
		isSetModuleAcc bool
		expectedFunc   func(testCase, func() (sdk.SysCoins, sdk.Error))
	}

	expectError := func(test testCase, testFunc func() (sdk.SysCoins, sdk.Error)) {
		rewards, err := testFunc()
		require.Equal(t, sdk.SysCoins(nil), rewards)
		require.NotNil(t, err)
	}

	expectSuccess := func(test testCase, testFunc func() (sdk.SysCoins, sdk.Error)) {
		rewards, err := testFunc()
		require.Equal(
			t,
			test.yieldedAmount.QuoDecTruncate(test.totalLocked.Amount).MulDecTruncate(test.lockInfo.Amount.Amount),
			rewards,
		)
		require.Nil(t, err)
		require.Panics(t, func() {
			keeper.GetPoolHistoricalRewards(ctx, poolName, test.lockInfo.ReferencePeriod)
		})
	}

	expectNoRewards := func(test testCase, testFunc func() (sdk.SysCoins, sdk.Error)) {
		rewards, err := testFunc()
		require.Equal(t, sdk.SysCoins(nil), rewards)
		require.Nil(t, err)
		require.Panics(t, func() {
			keeper.GetPoolHistoricalRewards(ctx, poolName, test.lockInfo.ReferencePeriod)
		})
	}

	tests := []testCase{
		{
			lockInfo: types.NewLockInfo(
				Addrs[0], poolName, sdk.NewDecCoinFromDec("xxb", sdk.NewDec(10)),
				100, 1,
			),
			totalLocked:    sdk.NewDecCoinFromDec("xxb", sdk.NewDec(100)),
			yieldedAmount:  sdk.NewDecCoinsFromDec("wwb", sdk.NewDec(100)),
			isSetLockInfo:  false,
			isSetModuleAcc: false,
			expectedFunc:   expectError,
		},
		{
			lockInfo: types.NewLockInfo(
				Addrs[0], poolName, sdk.NewDecCoinFromDec("xxb", sdk.NewDec(10)),
				100, 1,
			),
			totalLocked:    sdk.NewDecCoinFromDec("xxb", sdk.NewDec(100)),
			yieldedAmount:  sdk.NewDecCoinsFromDec("wwb", sdk.NewDec(100)),
			isSetLockInfo:  true,
			isSetModuleAcc: false,
			expectedFunc:   expectError,
		},
		{
			lockInfo: types.NewLockInfo(
				Addrs[0], poolName, sdk.NewDecCoinFromDec("xxb", sdk.NewDec(10)),
				100, 1,
			),
			totalLocked:    sdk.NewDecCoinFromDec("xxb", sdk.NewDec(100)),
			yieldedAmount:  sdk.NewDecCoinsFromDec("wwb", sdk.NewDec(100)),
			isSetLockInfo:  true,
			isSetModuleAcc: true,
			expectedFunc:   expectSuccess,
		},
		{
			lockInfo: types.NewLockInfo(
				Addrs[0], poolName, sdk.NewDecCoinFromDec("xxb", sdk.NewDec(10)),
				120, 1,
			),
			totalLocked:    sdk.NewDecCoinFromDec("xxb", sdk.NewDec(100)),
			yieldedAmount:  sdk.NewDecCoinsFromDec("wwb", sdk.NewDec(100)),
			isSetLockInfo:  true,
			isSetModuleAcc: true,
			expectedFunc:   expectNoRewards,
		},
	}

	for _, test := range tests {
		ctx = ctx.WithBlockHeight(120)
		keeper.SetPoolHistoricalRewards(
			ctx, poolName, 1,
			types.NewPoolHistoricalRewards(sdk.SysCoins{}, 2),
		)
		keeper.SetPoolCurrentRewards(
			ctx, poolName, types.NewPoolCurrentRewards(ctx.BlockHeight(), 2, sdk.SysCoins{}),
		)
		if test.isSetLockInfo {
			keeper.SetLockInfo(ctx, test.lockInfo)
		}
		if test.isSetModuleAcc {
			yieldModuleAcc := keeper.supplyKeeper.GetModuleAccount(ctx, types.YieldFarmingAccount)
			err := yieldModuleAcc.SetCoins(
				test.yieldedAmount.MulDecTruncate(test.totalLocked.Amount).MulDecTruncate(test.lockInfo.Amount.Amount),
			)
			require.Nil(t, err)
			keeper.supplyKeeper.SetModuleAccount(ctx, yieldModuleAcc)
		}
		wrappedTestFunc := func() (sdk.SysCoins, sdk.Error) {
			return keeper.WithdrawRewards(ctx, poolName, test.totalLocked, test.yieldedAmount, test.lockInfo.Owner)
		}
		test.expectedFunc(test, wrappedTestFunc)
	}
}

repository: hashfabric/exchain

repo_name: hashfabric/exchain

branch_name: refs/heads/dev

gha_license_id: NOASSERTION


text:
SUMMARY = "A karma launcher for virtualbox VMs"
SECTION = "utils"
HOMEPAGE = "https://nodei.co/npm/karma-virtualbox-launcher"

SRC_URI = "npm://registry.npmjs.org;name=${PN};version=${PV}"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cadc725ce709ac546b1f2caaa13c6272"

NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json"
NPM_LOCKDOWN := "${THISDIR}/${PN}/lockdown.json"

inherit npm

repository: arfoll/meta-brendan-nodepkgs

repo_name: arfoll/meta-brendan-nodepkgs


text:
#
# base recipe: https://github.com/openembedded/openembedded/tree/\
#              master/recipes/iscsi-target
# base branch: master
#

SUMMARY = "iSCSI Enterprise Target userland tools"
DESCRIPTION = "\
iSCSI Enterprise Target is for building an iSCSI storage system on \
Linux. It is aimed at developing an iSCSI target satisfying enterprise \
requirements. \
"
HOMEPAGE = "http://iscsitarget.sourceforge.net/"
PR = "r0"
inherit debian-package

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "\
	file://COPYING;md5=6e233eda45c807aa29aeaa6d94bc48a2"

inherit module
DEPENDS += "dpkg-native"

SRC_URI += "file://use-kernel-makefile-to-get-kernel-version.patch \
            file://fix-errors-observed-with-linux-3.19-and-greater.patch \
            file://access-sk_v6_daddr-iff-IPV6-defined.patch"

# Drop patches, applied upstream (follow debian/changlog)
do_debian_patch[noexec] = "1"
do_configure[noexec] = "1"

do_compile() {
	#Clear LDFLAGS to avoid error: unrecognized option '-Wl,-O1' on PPC target
	if [ "${TARGET_ARCH}" = "powerpc" ]; then
		unset LDFLAGS
	fi
	oe_runmake KSRC=${STAGING_KERNEL_DIR} LDFLAGS="$LDFLAGS"
}
do_install() {
	# Userspace utilities
	install -d ${D}${sbindir}
	install -m 0755 ${S}/usr/ietd ${D}${sbindir}/ietd
	install -m 0755 ${S}/usr/ietadm ${D}${sbindir}/ietadm

	# Config files, init scripts
	mkdir -p ${D}${sysconfdir}/iet
	install -m 0644 ${S}/etc/ietd.conf ${D}/${sysconfdir}/iet/ietd.conf
	install -m 0644 ${S}/etc/initiators.allow \
		${D}${sysconfdir}/iet/initiators.allow
	install -m 0644 ${S}/etc/targets.allow ${D}${sysconfdir}/iet/targets.allow
	install -D -m 0644 ${S}/debian/iscsitarget.default \
		${D}${sysconfdir}/default/iscsitarget
	install -D -m 0644 ${S}/debian/iscsitarget.init \
		${D}${sysconfdir}/init.d/iscsitarget

	DEB_UPSTREAM_VERSION=`dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p'`
	install -d ${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/kernel/ \
		${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/include/ \
		${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/patches/ \
		${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/debian

	# Copy only the driver source to the proper location
	cp ${S}/kernel/*.c ${S}/kernel/*.h ${S}/kernel/Makefile \
		${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/kernel/
	cp ${S}/include/* ${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/include/
	cp ${S}/patches/* ${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/patches/

	cp ${S}/debian/control.modules.in \
		${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/debian/control.in

	# install debian/ files
	cd ${S}/debian
	cp changelog control compat *.modules.in rules copyright \
		*-module-* ${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/debian

	# create toplevel module Makefile
	echo "obj-m = kernel/" > ${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/Makefile

	# Prepare dkms.conf from the dkms.conf.in template
	sed "s/__VERSION__/$DEB_UPSTREAM_VERSION/g" ${S}/debian/dkms.conf.in > \
		${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/dkms.conf

	grep ^PATCH ${S}/dkms.conf >> ${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/dkms.conf

	rm ${D}${prefix}/src/${PN}-$DEB_UPSTREAM_VERSION/kernel/iscsi_trgt.mod.c
}
PACKAGES =+ "${PN}-dkms"
FILES_${PN}-dkms = "${prefix}/src/*"
FILES_${PN} += "${sysconfdir} ${sbindir}"

RDEPENDS_${PN} += "procps lsb-base"

repository: nghiaht-tsdv/meta-debian

repo_name: nghiaht-tsdv/meta-debian

branch_name: refs/heads/jethro

gha_language: BitBake