#!/usr/bin/env python
# -*- coding: utf-8 -*
"""
.. NOTE::
Guannan back-ported threadpool from twisted.python.
if any concern, feel free to contact Guannan<EMAIL_ADDRESS>.. NOTE::
Mit License applied for twisted:
http://www.opensource.org/licenses/mit-license.php
Permission is hereby granted, free of charge,
to any person obtaining a copy of this software and associated
documentation files (the "Software"),
to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
from __future__ import print_function
try:
import Queue as queue
except ImportError:
# pylint: disable=F0401
import queue
import copy
import time
import traceback
import contextlib
import threading
from cup import log
from cup.util import context
from cup import thread
_CONTEXT_TRACKER = context.ContextTracker4Thread()
# pylint: disable=R0902
[docs]class ThreadPool(object):
"""
Threadpool class
"""
_THREAD_FACTORY = thread.CupThread
_CURRENT_THREAD = staticmethod(threading.current_thread)
_WORKER_STOP_SIGN = object()
def __init__(
self, minthreads=5, maxthreads=20, name=None, daemon_threads=False):
"""
create a threadpool
:param minthreads:
minimum threads num
:param maxthreads:
maximum threads num
:param daemon_threads:
daemon threads or not.
Notice if daemon_threads is True, threadpool will exit as soon
as the main thread exits. Otherwise, all worker threads will exit
after you explicitly call the class method (or try_stop)
"""
assert minthreads > 0, 'minimum must be >= 0 '
assert minthreads <= maxthreads, 'minimum is greater than maximum'
self._min = 5
self._max = 20
self._joined = False
self._started = False
self._workers = 0
self._name = None
self._daemon_thread = daemon_threads
# Queue is a thread-safe queue
self._jobqueue = queue.Queue(0)
self._min = minthreads
self._max = maxthreads
self._name = name
self._waiters = []
self._threads = []
self._working = []
[docs] def start(self):
"""
call start before you use the threadpool
"""
self._joined = False
self._started = True
# Start some threads.
self.adjust_poolsize()
[docs] def start1worker(self):
"""
add a thread for worker threads in the pool
"""
self._workers += 1
name = "PoolThread-%s-%s" % (self._name or id(self), self._workers)
new_thd = self._THREAD_FACTORY(target=self._worker, name=name)
if self._daemon_thread:
new_thd.daemon = True
self._threads.append(new_thd)
new_thd.start()
[docs] def stop1worker(self):
"""
decrease one thread for the worker threads
"""
self._jobqueue.put(self._WORKER_STOP_SIGN)
self._workers -= 1
def __setstate__(self, state):
"""
For pickling an instance from a serilized string
"""
# pylint: disable=W0201
# set up state for it
self.__dict__ = state
self.__class__.__init__(self, self._min, self._max)
def __getstate__(self):
state = {}
state['min'] = self._min
state['max'] = self._max
return state
def _start_decent_workers(self):
""" start decent/proper number of thread workers"""
need_size = self._jobqueue.qsize() + len(self._working)
# Create enough, but not too many
while self._workers < min(self._max, need_size):
self.start1worker()
[docs] def add_1job(self, func, *args, **kwargs):
"""
Add one job that you want the pool to schedule.
.. CAUTION::
Notice if you need to handle data after finishing [func], plz use
[add_1job_with_callback] which supports a [callback] option.
:param func:
function that will be scheduled by the thread pool
:param \*args:
args that the [func] needs
:param \*\*kw:
kwargs that [func] needs
"""
self.add_1job_with_callback(None, func, *args, **kwargs)
[docs] def add_1job_with_callback(self, result_callback, func, *args, **kwargs):
"""
:param result_callback:
.. IMPORTANT::
plz notice whether succeed or fail, the result_callback
function will be called after [func] is called.
function result_callback needs to accept two parameters:
(ret_in_bool, result). (True, result) will be passed to the
[func] on success. (False, result) will be passed otherwise.
if [func] raise any Exception, result_callback will get
(False, failure_info) as well.
:param func:
same to func for add_1job
:param \*args:
args for [func]
:param \*\*kwargs:
kwargs for [func]
"""
if self._joined:
return
# pylint: disable=W0621
context = _CONTEXT_TRACKER.current_context().contexts[-1]
job = (context, func, args, kwargs, result_callback)
self._jobqueue.put(job)
if self._started:
self._start_decent_workers()
@contextlib.contextmanager
def _worker_state(self, state_list, worker_thread):
"""
worker state
"""
state_list.append(worker_thread)
try:
yield
finally:
state_list.remove(worker_thread)
def _log_err_context(self, context):
"""
context error, log warning msg
"""
log.warn(
'Seems a call with context failed. See the context info'
)
log.warn(str(context))
def _worker(self):
"""
worker func to handle jobs
"""
current_thd = self._CURRENT_THREAD()
with self._worker_state(self._waiters, current_thd):
job = self._jobqueue.get()
while job is not self._WORKER_STOP_SIGN:
with self._worker_state(self._working, current_thd):
# pylint: disable=W0621
context, function, args, kwargs, result_callback = job
del job
try:
# pylint: disable=W0142
result = _CONTEXT_TRACKER.call_with_context(
context, function, *args, **kwargs
)
success = True
except Exception as error:
success = False
log.warn(
'Func failed, func:{0}, error_msg: {1}'.format(
function, error)
)
if result_callback is None:
log.warn('This func does not have callback.')
_CONTEXT_TRACKER.call_with_context(
context, self._log_err_context, context
)
result = None
else:
result = error
del function, args, kwargs
# when out of "with scope",
# the self._working will remove the thread from
# its self._working list
if result_callback is not None:
try:
_CONTEXT_TRACKER.call_with_context(
context, result_callback, success, result
)
except Exception as e:
log.warn(
'result_callback func failed, callback func:%s,'
'err_msg:%s' % (str(result_callback), str(e))
)
_CONTEXT_TRACKER.call_with_context(
context, self._log_err_context, context
)
del context, result_callback, result
with self._worker_state(self._waiters, current_thd):
job = self._jobqueue.get()
# after with statements, self._waiters will remove current_thd
# remove this thread from the list
self._threads.remove(current_thd)
[docs] def stop(self, force_stop=False):
"""
stop the thread pool. Notice calling this method will wait there util
all worker threads exit.
:param force_stop:
if force_stop is True, try to stop the threads in the pool
immediately (and this may do DAMAGE to your code logic)
"""
if not force_stop:
self._joined = True
threads = copy.copy(self._threads)
while self._workers:
self._jobqueue.put(self._WORKER_STOP_SIGN)
self._workers -= 1
for thd in threads:
thd.join()
else:
for thd in self._threads:
thd.terminate()
retry = False
times = 0
while not retry and (times <= 100):
for thd in self._threads:
if thd.isAlive():
thd.terminate()
retry = True
time.sleep(0.1)
times += 1
[docs] def try_stop(self, check_interval=0.1):
"""
try to stop the threadpool.
If it cannot stop the pool RIGHT NOW, will NOT block.
"""
self._joined = True
threads = copy.copy(self._threads)
while self._workers:
self._jobqueue.put(self._WORKER_STOP_SIGN)
self._workers -= 1
for thd in threads:
thd.join(check_interval)
for thd in threads:
if thd.isAlive():
return False
return True
[docs] def adjust_poolsize(self, minthreads=None, maxthreads=None):
"""
adjust pool size
"""
if minthreads is None:
minthreads = self._min
if maxthreads is None:
maxthreads = self._max
assert minthreads >= 0, 'minimum is negative'
assert minthreads <= maxthreads, 'minimum is greater than maximum'
self._min = minthreads
self._max = maxthreads
if not self._started:
return
# Kill of some threads if we have too many.
while self._workers > self._max:
self.stop1worker()
# Start some threads if we have too few.
while self._workers < self._min:
self.start1worker()
# Start some threads if there is a need.
self._start_decent_workers()
[docs] def get_stats(self):
"""
get threadpool running stats
waiters_num is pending thread num
working_num is working thread num
thread_num is the total size of threads
::
stat = {}
stat['queue_len'] = self._jobqueue.qsize()
stat['waiters_num'] = len(self._waiters)
stat['working_num'] = len(self._working)
stat['thread_num'] = len(self._threads)
"""
stat = {}
stat['queue_len'] = self._jobqueue.qsize()
stat['waiters_num'] = len(self._waiters)
stat['working_num'] = len(self._working)
stat['thread_num'] = len(self._threads)
return stat
[docs] def dump_stats(self, print_stdout=False):
"""
Dump the threadpool stat to log or stdout. Info is from class method
[get_stats]
"""
stat = self.get_stats()
if print_stdout:
print(stat)
log.info('ThreadPool Stat %s: %s' % (self._name, stat))
log.debug('queue: %s' % self._jobqueue.queue)
log.debug('waiters: %s' % self._waiters)
log.debug('workers: %s' % self._working)
log.debug('total: %s' % self._threads)
return stat


All of our resources are currently on Github
For some helpful links, we recommend taking a look at our cheatsheets
This will be a one-day workshop to introduce you to building servers with the popular Express framework.


@Controller
@RequestMapping(value="/")
public class SubmissionController
extends java.lang.Object
Handles mappings of $PASTAUrl$/...
Both students and teaching staff can access this url.
| Modifier and Type | Field and Description |
|---|---|
private AssessmentManager |
assessmentManager |
private java.util.Map<java.lang.String,java.lang.String> |
codeStyle |
private HandMarkingManager |
handMarkingManager |
protected org.apache.commons.logging.Log |
logger |
private SubmissionManager |
manager |
private UserManager |
userManager |
| Constructor and Description |
|---|
SubmissionController()
Initializes the codeStyle tag mapping of file endings to
javascript tag requirements for syntax highlighting.
|
| Modifier and Type | Method and Description |
|---|---|
void |
downloadAssessment(java.lang.String username,
java.lang.String assessmentName,
java.lang.String assessmentDate,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
$PASTAUrl$/download/{username}/{assessmentName}/{assessmentDate}/
|
void |
downloadFile(java.lang.String fileName,
javax.servlet.http.HttpServletResponse response)
$PASTAUrl$/downloadFile
|
private java.lang.String |
generateJSON(PASTAUser[] allUsers)
Generate the JSON
|
void |
getFile(java.lang.String fileName,
javax.servlet.http.HttpServletResponse response)
$PASTAUrl$/viewFile/loadFile - GET
|
PASTAUser |
getOrCreateUser()
Get or create the currently logged in user.
|
PASTAUser |
getOrCreateUser(java.lang.String username)
Get or create the user given a username
|
PASTAUser |
getUser()
Get the currently logged in user.
|
PASTAUser |
getUser(java.lang.String username)
Get the user given a username
|
java.lang.String |
giveExtension(java.lang.String username,
java.lang.String assessmentName,
java.lang.String extension,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletRequest request)
$PASTAUrl$/student/{username}/extension/{assessmentName}/{extension}/
|
java.lang.String |
goBack(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpSession session)
$PASTAUrl$/mirror/
|
java.lang.String |
handMarkAssessment(java.lang.String username,
java.lang.String assessmentName,
java.lang.String assessmentDate,
org.springframework.ui.Model model)
$PASTAUrl$/mark/{username}/{assessmentName}/{assessmentDate}/
|
java.lang.String |
handMarkAssessmentBatch(java.lang.String studentIndex,
java.lang.String assessmentName,
java.lang.String student,
AssessmentResult form,
javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model)
$PASTAUrl$/mark/{assessmentName}/{studentIndex}/ - POST and GET
|
java.lang.String |
home(org.springframework.ui.Model model,
javax.servlet.http.HttpSession session)
$PASTAUrl$/home/
|
AssessmentResult |
returnAssessmentResultModel() |
Competition |
returnCompetitionModel() |
NewCompetition |
returnNewCompetitionModel() |
NewUnitTest |
returnNewUnitTestModel() |
Submission |
returnSubmissionModel() |
java.lang.String |
runAssessment(java.lang.String username,
java.lang.String assessmentName,
java.lang.String assessmentDate,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletRequest request)
$PASTAUrl$/runAssessment/{username}/{assessmentName}/{assessmentDate}/
|
java.lang.String |
saveHandMarkAssessment(java.lang.String username,
java.lang.String assessmentName,
java.lang.String assessmentDate,
AssessmentResult form,
org.springframework.validation.BindingResult result,
org.springframework.ui.Model model)
$PASTAUrl$/mark/{username}/{assessmentName}/{assessmentDate}/ - POST
|
void |
setMyService(AssessmentManager myService) |
void |
setMyService(HandMarkingManager myService) |
void |
setMyService(SubmissionManager myService) |
void |
setMyService(UserManager myService) |
java.lang.String |
submitAssessment(java.lang.String username,
Submission form,
org.springframework.validation.BindingResult result,
org.springframework.ui.Model model,
javax.servlet.http.HttpSession session)
$PASTAUrl$/student/{username}/home/
|
java.lang.String |
submitAssessment(Submission form,
org.springframework.validation.BindingResult result,
org.springframework.ui.Model model,
javax.servlet.http.HttpSession session)
$PSATAUrl/home/ - POST
|
java.lang.String |
updateComment(java.lang.String newComment,
java.lang.String assessmentDate,
java.lang.String username,
java.lang.String assessmentName,
org.springframework.ui.Model model)
$PASTAUrl$/student/{username}/info/{assessmentName}/updateComment/ - POST
|
java.lang.String |
viewAssessmentInfo(java.lang.String assessmentName,
org.springframework.ui.Model model)
$PASTAUrl$/info/{assessmentName}/
|
java.lang.String |
viewAssessmentInfo(java.lang.String username,
java.lang.String assessmentName,
org.springframework.ui.Model model)
$PASTAUrl$/student/{username}/info/{assessmentName}/
|
org.springframework.web.servlet.ModelAndView |
viewAutoExcel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
$PASTAUrl$/downloadAutoMarks/
|
java.lang.String |
viewClass(java.lang.String className,
org.springframework.ui.Model model)
$PASTAUrl$/tutorial/{className}/
|
org.springframework.web.servlet.ModelAndView |
viewExcel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
$PASTAUrl$/downloadMarks/
|
java.lang.String |
viewFile(java.lang.String location,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
$PASTAUrl$/viewFile/loadFile - GET
|
java.lang.String |
viewGradeCentre2(org.springframework.ui.Model model)
$PASTAUrl$/gradeCentre/
|
java.lang.String |
viewGradeCentreData()
$PASTAUrl$/gradeCentre/DATA/
|
java.lang.String |
viewMyTutorialData()
$PASTAUrl$/myTutorial/DATA/
|
java.lang.String |
viewMyTutorials(org.springframework.ui.Model model)
$PASTAUrl$/myTutorials/
|
java.lang.String |
viewStream(java.lang.String streamName,
org.springframework.ui.Model model)
$PASTAUrl$/stream/{streamName}/
|
java.lang.String |
viewStreamData(java.lang.String streamName)
$PASTAUrl$/stream/{streamName}/DATA/
|
java.lang.String |
viewStudent(java.lang.String username,
org.springframework.ui.Model model)
$PASTAUrl$/student/{username}/home/
|
java.lang.String |
viewTutorialData(java.lang.String className)
$PASTAUrl$/tutorial/{className}/DATA/
|
protected final org.apache.commons.logging.Log logger
private SubmissionManager manager
private UserManager userManager
private AssessmentManager assessmentManager
private HandMarkingManager handMarkingManager
private java.util.Map<java.lang.String,java.lang.String> codeStyle
public SubmissionController()
public void setMyService(SubmissionManager myService)
public void setMyService(UserManager myService)
public void setMyService(AssessmentManager myService)
public void setMyService(HandMarkingManager myService)
@ModelAttribute(value="newUnitTestModel") public NewUnitTest returnNewUnitTestModel()
@ModelAttribute(value="newCompetitionModel") public NewCompetition returnNewCompetitionModel()
@ModelAttribute(value="submission") public Submission returnSubmissionModel()
@ModelAttribute(value="competition") public Competition returnCompetitionModel()
@ModelAttribute(value="assessmentResult") public AssessmentResult returnAssessmentResultModel()
public PASTAUser getOrCreateUser()
public PASTAUser getOrCreateUser(java.lang.String username)
username
- the username of the userpublic PASTAUser getUser()
public PASTAUser getUser(java.lang.String username)
username
- the username of the user@RequestMapping(value="mirror/") public java.lang.String goBack(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)
Redirect back to the referrer. This is mainly used to get rid of the resubmitting a form when refreshing a page.
request
- the http request used for redirectionsession
- the http session that is never used here directly, but is passed
to other methods to ensure that the binding result information is kept when using
the mirror to stop the refreshing may re-submit form.@RequestMapping(value="home/") public java.lang.String home(org.springframework.ui.Model model, javax.servlet.http.HttpSession session)
The home screen. If the user has not authenticated: redirect to login. ATTRIBTUES:
| unikey | the user object for the currently logged in user |
| assessments | map of all assessments by category (key of category: String, value of list of
Assessment |
| results | The results as a map (key of short name of assessment: String, value
of AssessmentResult |
model
- the model being usedsession
- the http session that may hold the binding result information.@RequestMapping(value="home/", method=POST) public java.lang.String submitAssessment(@ModelAttribute(value="submission") Submission form, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, javax.servlet.http.HttpSession session)
Submit an assessment. If the user has not authenticated: redirect to login. FAIL CONDITIONS:
| Submission.NoFile | The form doesn't contain a file |
| Submission.NotZip | The file is not a zip file (extension of .zip) |
| Submission.AfterClosingDate | The submission is past the due date |
| Submission.NoAttempts | There are no attempts left to this user |
SubmissionManager.submit(String, Submission)
Then it's redirected to $PASTAUrl$/mirror/ to clear the form submission buffer such
that pressing reload has no chance of resubmitting your form.form
- the submission form holding the coderesult
- the binding result used for feedbackmodel
- the model being usedsession
- the http session used for allowing passing the binding result
along while using $PASTAUrl$/mirror/ to redirect and such that you will not
resubmit the form if you refresh the page@RequestMapping(value="info/{assessmentName}/") public java.lang.String viewAssessmentInfo(@PathVariable(value="assessmentName") java.lang.String assessmentName, org.springframework.ui.Model model)
View the details and history for an assessment. If the user has not authenticated: redirect to login. ATTRIBUTES:
| unikey | PASTAUser of the user logged in |
| assessment | Assessment the assessment |
| history | Collection of AssessmentResult for all of the submissions |
| nodeList | Map of FileTreeNode with the key as the date of the
submission and the value being the root node of the code that was submitted. |
assessmentName
- the short name (no whitespace) of the assessmentmodel
- the model being used@RequestMapping(value="downloadMarks/") public org.springframework.web.servlet.ModelAndView viewExcel(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Download the marks as an excel sheet. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home.
request
- the http request that is kinda not used.response
- also not really usedExcelMarkView
)@RequestMapping(value="downloadAutoMarks/") public org.springframework.web.servlet.ModelAndView viewAutoExcel(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Download the only the automated marks (all but hand marking) as an excel sheet. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home.
request
- the http request that is kinda not used.response
- also not really usedExcelMarkView
)@RequestMapping(value="student/{username}/info/{assessmentName}/updateComment/", method=POST) public java.lang.String updateComment(@RequestParam(value="newComment") java.lang.String newComment, @RequestParam(value="assessmentDate") java.lang.String assessmentDate, @PathVariable(value="username") java.lang.String username, @PathVariable(value="assessmentName") java.lang.String assessmentName, org.springframework.ui.Model model)
Update the comment for a given user for a given assessment for a
given submission using
HandMarkingManager.saveComment(String, String, String, String)
newComment
- the new commentassessmentDate
- the assessment date (format: yyyy-MM-dd'T'HH-mm-ss)username
- the name of the userassessmentName
- the short name (no shitespace) of the assessmentmodel
- the model being used@RequestMapping(value="viewFile/loadFile", method=GET) public void getFile(@RequestParam(value="file_name") java.lang.String fileName, javax.servlet.http.HttpServletResponse response)
View a file. If the user has authenticated and is a tutor, serve up the document, otherwise do nothing. Not sure if it's actually being used
fileName
- the path to the file.response
- the http response being used to serve the content@RequestMapping(value="downloadFile", method=GET) public void downloadFile(@RequestParam(value="file_name") java.lang.String fileName, javax.servlet.http.HttpServletResponse response)
Download a file If the user has authenticated and is a tutor, serve up the document, otherwise do nothing.
fileName
- the path to the file.response
- the http response being used to serve the content@RequestMapping(value="viewFile/", method=POST) public java.lang.String viewFile(@RequestParam(value="location") java.lang.String location, org.springframework.ui.Model model, javax.servlet.http.HttpServletResponse response)
View a file. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home. ATTRIBUTES:
| unikey | PASTAUser of the currently logged in user |
| location | The location of the disk of the file |
| codeStyle | The map of coding styles. Map |
| fileEnding | The file ending of the file you're viewing |
| fileContents | The contents of the file, with the > and < escaped |
location
- the path to the file locationmodel
- the model being usedresponse
- the response that's not really being used@RequestMapping(value="student/{username}/home/") public java.lang.String viewStudent(@PathVariable(value="username") java.lang.String username, org.springframework.ui.Model model)
View the home page for a given user. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home. ATTRIBUTES:
| unikey | PASTAUser for the currently logged in user |
| viewedUser | PASTAUser for the viewed user |
| assessments | map of all assessments by category (key of category: String, value of list of
Assessment |
| results | The results as a map (key of short name of assessment: String, value
of AssessmentResult |
username
- the name of the user you are looking atmodel
- the model being used@RequestMapping(value="student/{username}/home/", method=POST) public java.lang.String submitAssessment(@PathVariable(value="username") java.lang.String username, @ModelAttribute(value="submission") Submission form, org.springframework.validation.BindingResult result, org.springframework.ui.Model model, javax.servlet.http.HttpSession session)
Submit an assessment for another user. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home. FAIL CONDITIONS:
| Submission.NoFile | The form doesn't contain a file |
| Submission.NotZip | The file is not a zip file (extension of .zip) |
SubmissionManager.submit(String, Submission)
Then it's redirected to $PASTAUrl$/mirror/ to clear the form submission buffer such
that pressing reload has no chance of resubmitting your form.form
- the submission form holding the coderesult
- the binding result used for feedbackmodel
- the model being usedsession
- the http session used for allowing passing the binding result
along while using $PASTAUrl$/mirror/ to redirect and such that you will not
resubmit the form if you refresh the page@RequestMapping(value="student/{username}/info/{assessmentName}/") public java.lang.String viewAssessmentInfo(@PathVariable(value="username") java.lang.String username, @PathVariable(value="assessmentName") java.lang.String assessmentName, org.springframework.ui.Model model)
View the details and history for an assessment. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home. ATTRIBUTES:
| unikey | PASTAUser of the user logged in |
| viewedUser | PASTAUser of the user being viewed |
| assessment | Assessment the assessment |
| history | Collection of AssessmentResult for all of the submissions |
| nodeList | Map of FileTreeNode with the key as the date of the
submission and the value being the root node of the code that was submitted. |
username
- the username for the user you are viewingassessmentName
- the short name (no whitespace) of the assessmentmodel
- the model being used@RequestMapping(value="download/{username}/{assessmentName}/{assessmentDate}/") public void downloadAssessment(@PathVariable(value="username") java.lang.String username, @PathVariable(value="assessmentName") java.lang.String assessmentName, @PathVariable(value="assessmentDate") java.lang.String assessmentDate, org.springframework.ui.Model model, javax.servlet.http.HttpServletResponse response)
Serve the zip file that contains the submission for the username for a given assessment at a given time. If the user has not authenticated or is not a tutor: do nothing Otherwise create the zip file and serve the zip file. The file name is $username$-$assessmentName$-$assessmentDate$.zip
username
- the user which you want to download the submission forassessmentName
- the short name (no whitespace) of the assessmentassessmentDate
- the date (format: yyyy-MM-dd'T'HH-mm-ss)model
- the model being usedresponse
- the http response being used to serve the zip file.@RequestMapping(value="runAssessment/{username}/{assessmentName}/{assessmentDate}/") public java.lang.String runAssessment(@PathVariable(value="username") java.lang.String username, @PathVariable(value="assessmentName") java.lang.String assessmentName, @PathVariable(value="assessmentDate") java.lang.String assessmentDate, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request)
Run an assessment again.
If the user has not authenticated: redirect to login.
If the user is not a tutor: redirect to home.
Otherwise: run assessment using
SubmissionManager.runAssessment(String, String, String)
username
- the user which you want to download the submission forassessmentName
- the short name (no whitespace) of the assessmentassessmentDate
- the date (format: yyyy-MM-dd'T'HH-mm-ss)model
- the model being usedrequest
- the http request being used for redirecting.@RequestMapping(value="student/{username}/extension/{assessmentName}/{extension}/") public java.lang.String giveExtension(@PathVariable(value="username") java.lang.String username, @PathVariable(value="assessmentName") java.lang.String assessmentName, @PathVariable(value="extension") java.lang.String extension, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request)
Give an extension to a user for an assessment.
If the user has not authenticated: redirect to login.
If the user is not a tutor: redirect to home.
If the user is an instructor: give the extension using
UserManager.giveExtension(String, String, Date)
then redirect to the referrer page.
username
- the user which you want to download the submission forassessmentName
- the short name (no whitespace) of the assessmentextension
- the date (format: yyyy-MM-dd'T'HH-mm-ss)model
- the model being usedrequest
- the request begin used to redirect back to the referer.@RequestMapping(value="mark/{username}/{assessmentName}/{assessmentDate}/") public java.lang.String handMarkAssessment(@PathVariable(value="username") java.lang.String username, @PathVariable(value="assessmentName") java.lang.String assessmentName, @PathVariable(value="assessmentDate") java.lang.String assessmentDate, org.springframework.ui.Model model)
Mark the submission for a student. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home. ATTRIBUTES:
| unikey | PASTAUser the user logged in |
| student | PASTAUser the user being viewed |
| assessmentName | the short name(no whitespace) of the assessment |
| node | The root FileTreeNode for the root of the submitted code |
| assessmentResult | The AssessmentResult for this assessment |
| handMarkingList | The list of WeightedHandMarking |
username
- the user which you want to download the submission forassessmentName
- the short name (no whitespace) of the assessmentassessmentDate
- the date (format: yyyy-MM-dd'T'HH-mm-ss)model
- the model being used@RequestMapping(value="mark/{username}/{assessmentName}/{assessmentDate}/", method=POST) public java.lang.String saveHandMarkAssessment(@PathVariable(value="username") java.lang.String username, @PathVariable(value="assessmentName") java.lang.String assessmentName, @PathVariable(value="assessmentDate") java.lang.String assessmentDate, @ModelAttribute(value="assessmentResult") AssessmentResult form, org.springframework.validation.BindingResult result, org.springframework.ui.Model model)
Save the hand marking for a submission for a student
If the user has not authenticated: redirect to login.
If the user is not a tutor: redirect to home.
Otherwise: update the hand marking results and comments using
HandMarkingManager.saveHandMarkingResults(String, String, String, List)
and
HandMarkingManager.saveComment(String, String, String, String)
username
- the user which you want to download the submission forassessmentName
- the short name (no whitespace) of the assessmentassessmentDate
- the date (format: yyyy-MM-dd'T'HH-mm-ss)form
- the assessment result objectresult
- the binding result used for feedbackmodel
- the model being used@RequestMapping(value="mark/{assessmentName}/{studentIndex}/", method={POST,GET}) public java.lang.String handMarkAssessmentBatch(@PathVariable(value="studentIndex") java.lang.String studentIndex, @PathVariable(value="assessmentName") java.lang.String assessmentName, @RequestParam(value="student",required=false) java.lang.String student, @ModelAttribute(value="assessmentResult") AssessmentResult form, javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model)
Used for the batch marking of the students in your class(es).
If the user has not authenticated: redirect to login.
If the user is not a tutor: redirect to home.
POST: Save the AssessmentResult
form for the
last user you marked using
HandMarkingManager.saveHandMarkingResults(String, String, String, List)
and HandMarkingManager.saveComment(String, String, String, String)
GET: Takes you to the hand marking template(s) to the user.
If the studentIndex is pointing to a student that has no submissions,
go to the next one.
If the index is past the end of the array, go back to home.
ATTRIBUTES:
| unikey | PASTAUser of the user logged in |
| assessmentName | the short name (no whitespace) of the assessment |
| student | PASTAUser of the student being viewed |
| node | The root FileTreeNode of the submitted files |
| assessmentResult | The AssessmentResult for this assessment |
| handMarkingList | The list of WeightedHandMarking |
| savingStudentIndex | A string representation of the index of the student you are saving |
| hasSubmission | Flag to say whether the current student has a submission |
| completedMarking | Flag to say whether the marking is complete for this student |
| myStudents | The list of PASTAUser of the users that belong in your class(es) |
studentIndex
- the index of the student being viewedassessmentName
- the short name (no whitespace) of the assessmentstudent
- the student that you have just marked and is getting savedform
- the assessment result form to be savedrequest
- the http request that's not being usedmodel
- the model being used@RequestMapping(value="gradeCentre/DATA/") @ResponseBody public java.lang.String viewGradeCentreData()
Serves up the JSON data container for the grade center.
If the user has not authenticated or is not a tutor: return nothing.
Otherwise use generateJSON(PASTAUser[])
for all users.
@RequestMapping(value="stream/{streamName}/DATA/") @ResponseBody public java.lang.String viewStreamData(@PathVariable(value="streamName") java.lang.String streamName)
Serves up the JSON data container for the grade center for a stream.
If the user has not authenticated or is not a tutor: return nothing.
Otherwise use generateJSON(PASTAUser[])
for all users in the given stream. Return nothing if the stream
doesn't exist.
@RequestMapping(value="tutorial/{className}/DATA/") @ResponseBody public java.lang.String viewTutorialData(@PathVariable(value="className") java.lang.String className)
Serves up the JSON data container for the grade center for a tutorial class.
If the user has not authenticated or is not a tutor: return nothing.
Otherwise use generateJSON(PASTAUser[])
for all users in the given tutorial class. Return nothing if the tutorial
class doesn't exist.
@RequestMapping(value="myTutorials/DATA/") @ResponseBody public java.lang.String viewMyTutorialData()
Serves up the JSON data container for the grade center for the user's
tutorial class.
If the user has not authenticated or is not a tutor: return nothing.
Otherwise use generateJSON(PASTAUser[])
for all users in the user's tutorial class.
private java.lang.String generateJSON(PASTAUser[] allUsers)
format:
{
"data":
[
{
"name": "$username$",
"stream": "$stream$",
"class": "$class$",
"$assessmentName$": {
"mark": "######.###",
"percentage": "double",
"assessmentname": "$assessmentName$"
},
...
"$assessmentName$": {
"mark": "######.###",
"percentage": "double",
"assessmentname": "$assessmentName$"
}
},
...
{
"name": "$username$",
"stream": "$stream$",
"class": "$class$",
"$assessmentName$": {
"mark": "######.###",
"percentage": "double",
"assessmentname": "$assessmentName$"
},
...
"$assessmentName$": {
"mark": "######.###",
"percentage": "double",
"assessmentname": "$assessmentName$"
}
}
]
}
If there is no submission, mark and percentage will be "".
Percentage is [1.0,0.0]. Mark is displayed to 3 decimal places.allUsers
- the users for which to generate the JSON@RequestMapping(value="gradeCentre/") public java.lang.String viewGradeCentre2(org.springframework.ui.Model model)
Display the grade center. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home. ATTRIBUTES:
| unikey | The PASTAUser of the currently logged in user |
| assessmentList | The list of all Assessment on the system |
model
- the model being used@RequestMapping(value="tutorial/{className}/") public java.lang.String viewClass(@PathVariable(value="className") java.lang.String className, org.springframework.ui.Model model)
Display the grade center for a given class. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home. ATTRIBUTES:
| unikey | The PASTAUser of the currently logged in user |
| assessmentList | The list of all Assessment on the system |
model
- the model being used@RequestMapping(value="stream/{streamName}/") public java.lang.String viewStream(@PathVariable(value="streamName") java.lang.String streamName, org.springframework.ui.Model model)
Display the grade center for a given stream. If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home. ATTRIBUTES:
| unikey | The PASTAUser of the currently logged in user |
| assessmentList | The list of all Assessment on the system |
model
- the model being used@RequestMapping(value="myTutorials/") public java.lang.String viewMyTutorials(org.springframework.ui.Model model)
Display the grade center for the user's tutorial(s). If the user has not authenticated: redirect to login. If the user is not a tutor: redirect to home. ATTRIBUTES:
| unikey | The PASTAUser of the currently logged in user |
| assessmentList | The list of all Assessment on the system |
model
- the model being used


--- layout: post esbma_id: 3029 title: Announcing zBase date: 2013-07-19 14:00:00 ---
We are not accepting new zBase signups at this time.
Available now for iPad and iPhone in the App Store: zBase, The Mobile Database App with Multi-User Sync
zBase is a mobile database app. You can use it to keep track of all kinds of information.
If you have a group of people who need to use mobile devices to keep track of a list of something, then zBase is probably a great fit for you.
Issues, tasks, deadlines, to-do lists, inventory, expenses, contacts, customers, shopping lists ...
No. If you can perform basic operations with a spreadsheet, you can use zBase.
I hope that zBase is flexible and affordable enough to be used by a wide variety of users, everything from corporate teams to families.
But many of the features of zBase were designed with small businesses in mind.
Suppose you are a company that installs fences, located in a town of around 100,000 people.
Weather permitting, at any given time, you have multiple crews around town, each working on a fencing project.
You have lists. Lots of lists. Lists which are related to other lists. For example, you have a list of customers. If a customer is a company, you have a list of people at that company. You have a list of projects, each one associated with a customer. Some of your customers have worked with you on more than one project. You have a list of tasks associated with each project. You might have a list of photos for each project, or photos for a task, clearly indicating a problem to be fixed. You have lists of vendors, fence types, equipment, tools, inventory, vehicles, invoices, employees, and so on.
And because of the nature of your company, you and your people are all over the place. It would be incredibly helpful if you could have all those lists on your mobile device, with you, everywhere you go, even in places with no Wi-Fi or cellular data.
If you were a company of 50,000 employees, you might consider hiring a firm to build a custom mobile app just for your needs. But actually you are a company of 50 employees, so that kind of expense is unthinkable.
Eventually, some vertical software vendor will create a mobile app specifically for fencing companies. But when they do, it'll be expensive, and it'll be focused primarily on the specific needs of the fencing company that sponsored it, which may be sufficiently different from yours to render the app frustrating or even useless.
You have one person in your company who is kind of a geek. She knows that your problem just isn't that complicated. She is not a programmer, but she has used things like Excel and Access. She knows how to set things up the way you need. She started trying to use one of the other mobile database apps, and quickly realized that it was designed only for personal use, and wasn't going to work at all for a group of people who all need read/write access to the same data. So she concluded that the mobile bandwagon currently doesn't have room for small businesses like yours.
This is the kind of situation where zBase shines. (One of the samples in the zBase app is similar to this story.)
The basic unit of data is a record within a table. You can think of a table like a spreadsheet, where each record is a row, and each field is a column. You define the fields to suit your needs.
You can have multiple tables in a single database file. And you can have multiple database files in your zBase account.
text, web, email, phone, choice, user, checkmark, integer, real, date, datetime, image
Primarily, zBase could be compared to products like Bento, Tap Forms, and HanDBase, all of which I admire.
zBase supports multi-user sync.
Other mobile database apps are focused on situations involving only one person. The data exists on the mobile device. There is no easy way to allow multiple users to access and work with the data.
zBase is designed to be used by a group of people. The data on each user's mobile device is synchronized with another instance of the data, stored in the cloud. Changes from multiple users are automatically integrated together.
No. zBase is built on the Zumero Database Platform, so it only needs a network connection for the purpose of synchronizing with the server. All regular database operations (including adding, deleting, updating, filtering and viewing records) work when the mobile device is "offline" (at the beach, in the middle of a cornfield, in a basement, etc).
No. iCloud has no support for multi-user sync or for non-Apple devices.
The zBase app itself is free. Using zBase with the cloud-hosted multi-user sync service requires a subscription, priced at $1 per user per month.
The zBase app has a "demo mode" which allows you to try out all the database features without signing up for a zBase account.
If you like. zBase in demo mode is basically similar to other iOS database apps. None of the sync or multi-user features are available in demo mode.
Currently, no.
All data on your mobile device is encrypted such that if you lose your device and you have signed out of the zBase app, it will be difficult or impossible for someone to access your data.
zBase accounts are protected with user names and passwords. Make sure the members of your group choose good passwords.
The sync communication between the zBase app and the cloud is secured with SSL encryption.
For your most sensitive data, you can use an encrypted field, which means the data will be encrypted in the cloud as well.
zBase supports import of CSV files, which can be exported from most spreadsheets, databases, or similar apps.
zBase can export CSV files as well. If you decide that zBase will not meet your needs, you can move your data into something else.
Yes. You can use one-to-many relationaships between tables to link your data in powerful ways.
Yes. zBase has "regular users" and "admin users". Admin users can use all zBase features, including the ability to setup tables and fields and other users. Regular users can mostly just add/delete/update records.
Yes. As of version 1.0.1, zBase is a universal app with support for both iPad and iPhone.
Yes. zBase for Android phones and tablets is under development now.
Zumero is a mobile database sync platform built on SQLite, the standard database software installed on over a billion mobile devices.
zBase is just one example of a mobile app built on Zumero. You can use Zumero in your mobile app as well. On the client side, Zumero supports iOS, Android, and WinRT, plus PhoneGap/Cordova and Xamarin. The Zumero server can be licensed either on-premises or hosted by Zumero in the cloud.
For more information, see the zumero.com website, or the blog post I wrote when we first announced it.
zBase is written in C# using the Xamarin tools.
It is both. In order to be a great showcase app for Zumero, zBase needs to be a real product, ready to serve real users. And it is.


JSON2HTML is an online app which helps in converting complex-to-complex JSON into human friendly tabular format.
Non-technical people and even sometimes geeks get confused understanding a complex JSON structure which involve deep nesting. This app boil downs the complexity by simply displaying it a tabular format, a format which is widely common for different tasks and purposes.
It has been said that 80% of what people learn is VISUAL.
Allen Klein
This app is developed using Open-Source technologies, mainly over a micro web-framework for python -
FLASK.
The overall design is done using
Twitter-Bootstrap and
Font-awesome icon library.


返回主页
第八节: 质量
第八节: 质量
QUALITY
8.1 质量方针 Quality Policy
捷普的目标是提供满足或超出客户期望的质量解决方案.目标的达成有赖于管理层的领导,满足质量要求,投资于先进的制程及接受挑战性的商业目标。
捷普授权全体员工事事尽善尽美,以利于全球的客户,股东和员工。
核心程序的标准化和精益制造原则使得捷普可以提前识别,了解并快速改善质量和运作问题. 通过对人员,过程和技术的投入,捷普持续保持稳定的质量, 由此确保向客户按时交付价格有竞争力的合格产品。
The goal of Jabil is to provide quality solutions that meet or exceed our customer's expectations. This is achieved through management leadership, compliance to quality requirements, investment in cutting-edge processes, and accepting challenging business objectives.
Jabil team members are empowered to drive continual improvement in everything they do. This engagement benefits customers, shareholders and employees worldwide.
Standardization of core processes and lean principles allows Jabil to proactively identify, understand, and rapidly resolve quality and operational issues. Jabil continues to “build in” quality through investment in our people, processes and technology. This ensures competitive cost, quality products, and on-time delivery performance to our customers.
8.2 个人静电防护规则
Basic Personal ESD Rules
生产车间、来料检查区、货仓和实验室为静电防护区域，必须采取基本ESD 防护措施。 静电防护区域可分为非静电操作区域和静电操作区域，静电操作区域又可分为0 级(静电控制less than 50V)、I 级(静电控制less than100V)、II 级(静电控制less than 2000V)三个级别，不同级别的静电操作区域须相应采取额外ESD 防护措施。
Basic ESD protection practices must observed in ESD protection area including workshop, IQC, Store & Lab. EPA divided into non-EHA and EHA(ESDS handling area), EHA have 3 classification: 0(target less than 50V), I(target less than100V), II(target less than2000V), different EHA area has corresponding additional ESD protection requirement .
元器件与裝配件除非已确认为报废或为屏蔽包装，不可以放置于非静电操作区，严禁拿到静电防护区外。
Component & PCBA can not be placed in non-EHA area, and are also prohibited to be taken out of ESD protection area with the exception of approval scraps or shielding packages.
直接生产员工进入静电防护区域时必须穿著工衣直接生产员工进入静电防护区域时必须穿著工衣、帽子和防静电工鞋，以之作为基本ESD 防
护措施。
Direct production operator must wear full gears (Smock & Cap, ESD shoes) as basic ESD protection when enter EPA area.
非直接生产人员或访客进入静电防护区域时，如头发长过6 英寸(15cm),除穿著ESD 工衣、工鞋/脚跟带外，需另著ESD 帽子并将头发扎起塞进帽子里。
Non direct staff with hair length than 6'' (15cm), need to wear ESD cap ,tied up hair and tack inside the cap when they enable the EPA while wearing a smock and shoes /heel strip.
在进入静电防护区域时，只有经理(著白色工衣)、客人(著黄色工衣)、供应商(著深蓝色工衣)可以使用ESD 脚跟带，捷普（广州）的其他员
工应穿ESD 工鞋而不是脚跟带。
Only managers (wearing smock in white), client (in yellow), vendor (in dark blue) can wear ESD heel strips when enter EPA area, Jabil (Guangzhou) other employees should wear ESD shoes instead of ESD heel strip.
所有人员必须正确通过ESD 自动测试系统进入生产车间，不允许如跳入闸系统、没有测试跟随前面的人员进入、侧身从旁边通道处进入，钻过十字转门等形式进入车间。
Personnel must pass ESD auto check systems correctly before entering workshop, please do not jump over ESD auto gate, following the person in front without checking ESD, bypass ESD gate, go under the turnstile etc.
防静电服装的清洗管理由人力资源部负责，ESD 工衣由专业洗衣公司每月至少清洗一次，严禁私自用普通的清洗方法清洗。ESD 工鞋由个人自行清洗，建议每月至少清洗一次。
ESD gears cleanliness is managed by the HR dept. ESD smock should be cleaned once per month by a professional laundry company; it is forbidden to be cleaned by the employee through general method. ESD shoes may be cleaned by owner; it is recommended they are cleaned at least once per month.
防静电工衣和工鞋不能穿出换鞋区，静电防护区，办公区和饭厅，更不允许穿到吸烟房和厂房外(紧急情况除外)。
No ESD smock and shoes are allowed outside the shoes cabinet area, EPA area， office area and Canteen area, they are forbidden to the Smock Room and out of the building (exceptional in emergencies).
当需要进入静电防护区域时,访客陪同接待人员应向访客传达此ESD 防护守则。
If need to enter EPA area, visitor's receptionist should convey this personal ESD rules to respective visitor.
所有人员包括访客必须遵循此个人静电防护守则。
All personnel, including visitor, need to follow the personal ESD rules.
返回页首
返回主页
version:1.0<EMAIL_ADDRESS>© retter2012.com


@PathOfExileBot is a Telegram Bot aimed at Path of Exile players. It's intended to be a helper and provide common functionalities to save time or work as a tool for player's Telegram groups. The code is up on Github, if you wanna check it out.
Commands
/about - Information about the bot
/greetings - Replies with one of the masters' greetings
/help - Shows a list of commands
/lab <difficulty> - Retrieves last lab layout for given <difficulty> from Poelab
/ladder <league> - Shows a list of top 10 players for given <league>
/onsale - Shows a list of items on sale
/resources - Shows a list of helpful links
/safelevels - Level range with no experience penalty for <level>
/unique <name> - Retrieves information and wiki link of unique item <name>
/wiki <term> - Returns closest matching wiki link for given <term>
/wisdom - One of Izaro's many, many quotes


codeable_models.CAssociation¶
-
class
codeable_models.
CAssociation
(source, target, descriptor=None, **kwargs)¶ CAssociation
is used for representing associations. Usually associations are created using theassociation
method ofCClassifier
which calls the constructor ofCAssociation
to actually create the association (i.e.,CAssociation
could also be used directly).Superclasses:
CClassifier
- Parameters
source (
CClassifier
) – The source classifier of the association.target (
CClassifier
) – The target classifier of the association.descriptor – An optional descriptor making it easier to define associations with a simple string. The descriptor syntax is described below.
**kwargs –
Pass in any kwargs acceptable to superclasses. In addition,
CAssociation
accepts:multiplicity
,role_name
,source_multiplicity
,source_role_name
,aggregation
,composition
,stereotypes
.multiplicity
:Used to provide the target multiplicity of the association. Defaults to
*
. See documentation of the propertymultiplicity
for the accepted syntax.
role_name
:Takes a string specifying the target role name and stores it in the same-named attribute. Defaults to
None
.
source_multiplicity
:Used to provide the source multiplicity of the association. Defaults to
1
. See documentation of the propertymultiplicity
for the accepted syntax.
source_role_name
:Takes a string specifying the source role name and stores it in the same-named attribute. Defaults to
None
.
aggregation
:Takes a boolean argument. If set to
True
, this association is set to be an aggregation, else it is not. Also, if set toTrue
, it sets the propertycomposition
toFalse
.
composition
:Takes a boolean argument. If set to
True
, this association is set to be a composition, else it is not. Also, if set toTrue
, it sets the propertyaggregation
toFalse
.
stereotypes
:Takes a single or a list of
CStereotype
objects which extend this association. Extension is only possible, if this association is an association between meta-classes.
-
role_name
¶ A string specifying the target role name.
-
source_role_name
¶ A string specifying the source role name.
Please note that the
name
property derived fromCNamedElement
is interpreted as the label of the association.Descriptor Syntax:
The
descriptor
has the following syntax:?<label>:? \ ?[<source_role_name>]? <source_multiplicity> ->|<>-|<*>- \ ?[<target_role_name>]? <target_multiplicity>
With it, first the label of the association can be optionally specified. Source and target multiplicity strings, in the same form as accepted by the
multiplicity
property, must be specified, too. They are divided by an arrow determining the type of association:->
for ordinary associations,<>-
for aggregations, and<*>-
for compositions. Optionally in square brackets the source and target role names can be specified right before the multiplicities.Please note that first the keyword arguments are evaluated and then the descriptor. So the descriptor would override settings made in the keyword arguments.
Examples:
The following specifies a
0..1
to*
association from a classcart
to a classitem
labelledin cart
with source role namecart
and target role nameitem in cart
:cart.association(item, "in cart: [cart] 0..1 -> [item in cart] *")
The same can be specified more verbosely with kwargs:
cart.association(item, name="in cart", role_name="item in cart", multiplicity="*", source_role_name="cart", source_multiplicity="0..1")
Main Relations:
The main relations of
CAssociation
are shown in the figure below.A
CAssociation
is need in order to deriveCLink
objects, which link objects in an object model. TheCAssociation
is the classifier of theCLink
.As can be seen, a
CAssociation
can be extended by stereotypes. ACLink
can have stereotype instances of anyCStereotype
defined on the link’s association.The
CClassifier
can be introspected for itsassociations
. The association stores itssource
andtarget
classifiers.-
property
aggregation
¶ Takes a boolean argument. If set to
True
, this association is set to be an aggregation, else it is not. Also, if set toTrue
, it sets the propertycomposition
toFalse
.- Type
bool
-
property
attributes
¶ Overridden method from
CClassifier
. Attributes on associations are not supported.
-
property
composition
¶ Takes a boolean argument. If set to
True
, this association is set to be a composition, else it is not. Also, if set toTrue
, it sets the propertyaggregation
toFalse
.- Type
bool
-
delete
()¶ Deletes this association. Removes the association from all classifiers, links, and derived associations. Removes it from all stereotypes, too. Removes it from associations it is derived from. Calls
delete()
on superclass.- Returns
None.
-
delete_tagged_value
(name, stereotype=None)¶ Delete tagged value of a stereotype attribute with the given
name
. Optionally the stereotype to consider can be specified. This is needed, if one or more attributes of the same name are defined on the inheritance hierarchy. Then a shadowed attribute can be accessed by specifying its stereotype.- Parameters
name – The name of the attribute.
stereotype – The optional stereotype on which the attribute is defined.
- Returns
Value of the attribute.
- Return type
Supported Attribute Types
-
property
derived_associations
¶ Getter for the list of associations this association is derived from.
- Type
list[CAssociation]
-
property
derived_from
¶ Getter to get and setter to set a metaclass association this class-level association is derived from.
Please note that parameter has to be a metaclass association, and this association needs to be a class-level association. An association can be derived from a metaclass association, if the association is of the same type as the metaclass association, i.e., both are either
association
,composition
, oraggregation
.Both for source and target multiplicities,the lower multiplicity must be equal or higher than the metaclass association’s lower multiplicity, and the upper multiplicity must be equal or lower than the metaclass association’s upper multiplicity.
For the upper multiplicities (source and target), we need to consider other derived associations of the same kind (i.e., same classes or their superclasses are used, derived from the same metaclass association), as well. For example, an consider a meta-class association:
a = m1.association(m2, "a: [m1] * -> [m2] 1")
If we would derive two associations from it:
c1.association(c2, "a1: [c1] * -> [c2] 1", derived_from=a) c1.association(c2, "a1: [c1] * -> [c2] 1", derived_from=a)
without adding up the multiplicities of all those associations, an upper (target) multiplicity of 2 could be reached, violating the meta-class target upper multiplicity of 1.
The stereotype instances must be stereotypes extending an association that this association is derived from.
The setter takes a CAssociation as argument. Can be
None
(the default value) to remove thederived_from
relation. The getter always returns a CAssociation orNone
.- Type
-
get_opposite_classifier
(classifier)¶ Given a classifier, this method returns the opposite in the association, i.e. the source if
classifier
is the target, and vice versa. Raises an exception ifclassifier
is neither source nor target.- Parameters
classifier – The classifier from which we want to get the opposite in the association.
- Returns
The opposite classifier.
- Return type
-
get_tagged_value
(name, stereotype=None)¶ Get the tagged value of a stereotype attribute with the given
name
. Optionally the stereotype to consider can be specified. This is needed, if one or more attributes of the same name are defined on the inheritance hierarchy. Then a shadowed attribute can be accessed by specifying its stereotype.- Parameters
name – The name of the attribute.
stereotype – The optional stereotype on which the attribute is defined.
- Returns
Value of the attribute.
- Return type
Supported Attribute Types
-
property
multiplicity
¶ Getter and setter for the target multiplicity of the association. The multiplicity string has the following syntax:
<lower_multiplicity>..<higher_multiplicity>|<single_multiplicity>
.The multiplicity is either specified as a range or using a
<single_multiplicity>
. Accepted<single_multiplicity>
values are any positive number, zero, or*
.*
denotes unbounded multiplicity.For multiplicity ranges,
<lower_multiplicity>
is zero or any positive number specifying the lower end of the accepted multiplicity range.<higher_multiplicity>
is a number specifying the higher end of the accepted multiplicity range. It must be higher than<lower_multiplicity>
. It can also be*
meaning unbounded higher multiplicity.*
multiplicity is equal to the range0..*
.- Type
str
-
set_tagged_value
(name, value, stereotype=None)¶ Set the tagged value of a stereotype attribute with the given
name
tovalue
. Optionally the stereotype to consider can be specified. This is needed, if one or more attributes of the same name are defined on the inheritance hierarchy. Then a shadowed attribute can be accessed by specifying its stereotype.- Parameters
name – The name of the attribute.
value – The new value.
stereotype – The optional stereotype on which the attribute is defined.
- Returns
None
-
property
source_multiplicity
¶ Getter and setter for the source multiplicity of the association. Syntax is equal to the syntax defined in the documentation of the
multiplicity
property.- Type
str
-
property
stereotype_instances
¶ Getter to get and setter to set the stereotype instances of this association.
The stereotype instances must be stereotypes extending an association that this association is derived from.
The setter takes a list of stereotype instances or a single stereotype instance as argument. The getter always returns a list.
- Type
list[CStereotype]|CStereotype
-
property
stereotypes
¶ The setter takes a single or a list of
CStereotype
objects which extend this association. Extension is only possible, if this association is an association between meta-classes. The getter returns the stereotypes that extend this association.- Type
CStereotype|list[CStereotype]
-
property
tagged_values
¶ Getter for getting all tagged values of the association using a dict, and setter of setting all tagged values of the association based on a dict. The dict uses key/value pairs. The value types must conform to the types defined for the attributes.
- Type
dict[str, value]


XODE is an XML based scene format for ODE. This package is a sample implementation of an XODE parser. The classes XODEBody, XODEObject etc corrilate to elements in the file format. As the format has additional data which is not stored in ODE (such as groups) - this is stored in a tree using these objects. Those that have ODE representations such as Body - will have a Body object with that data so it isn't duplicated.
The sample implementation uses a DOM parser which may not be the most suitable for every use. Adding SAX support shouln't be too hard - probably the easiest way would be to add an overloaded constructor to the XODE* objects to take the relevent SAX objects (as they currently do the DOM ones.


The SWaM certification program (Small, Women-owned, and Minority-owned Business) is a state program of the Commonwealth of Virginia. The purpose is to enhance procurement opportunities for SWaM businesses participating in state-funded projects. When applying for this certification, it is required to specify which designation you wish to apply.


Geddit, a response-system app will be turning off its servers on June 30th, 2015. I heard about this software about a year ago when I sat down next to one of the co-founders at CUE. I was really excited about the platform because they not only allowed for students to respond to questions in the live lesson, but they also gave confidence scores f... Read more 17 Mar 2015 - 2 minute read
Featured image is creative commons licensed ( BY ) flickr photo shared by Raed Mansour The community is suffering. Students are frustrated and they’re looking to me to solve the problem. I’m faced with deciding whether or not my commitment to an individual students takes precedence over my commitment to the class as a whole. creative commo... Read more 04 Mar 2015 - 3 minute read
Last year, I took some time to write a small blog theme for Anchor CMS using some PHP and a lot of CSS. Too much, if you ask me. If I had the time, I’d go back and clean a lot of it up. Maybe during a rainy day. I haven’t logged into GitHub in a while. Teaching has been all consuming lately and I’ve not really had time to mess around with some ... Read more 02 Mar 2015 - 1 minute read
A post caught my attention the other day and I’m usually not one to write response pieces, but I can’t stop thinking about this. This post is about why I quit teaching nearly two years ago, and why that was a good decision. My Story I was teaching in a charter school two years ago. My wife and I moved back to South Bend after living in Evan... Read more 10 Feb 2015 - 4 minute read
Every other month, we give students an argumentative writing prompt which is then scored against a standard rubric. One of our school goals is to improve the quality of writing from our students, so we teach them not only the content, but how to make a good argument. Using things like facts along with application and persuasive writing technique... Read more 05 Feb 2015 - 2 minute read
This weekend, our local over-the-air movie stations had a marathon of classic monster/science fiction movies. I watched a bit of King Kong (1976) with my daughter because you really can’t start too soon. I immediately regret this decision. Later, I swung back through and caught the beginning of The Island of Dr. Moreau (1977)... Read more 02 Feb 2015 - 2 minute read
I nearly lost my temper this morning. One class in particular has some…big personalities. I want to be able to do hands on, interactive work with the group, but they test my limits pretty regularly. They don’t test me with silly questions or with using equipment incorrectly. No…it’s much more nefarious. They use the NBA. For whatever reason... Read more 30 Jan 2015 - 2 minute read
How much money do we spend to go to conferences? A few hundred, easily. How much money do we spend on tools, apps, programs, and resources to use in our classroom? Or better yet, how many people show up for sessions which talk about programs you can buy to use with your kids in the classroom? It’s strange that we put so much out there to trav... Read more 24 Jan 2015 - less than 1 minute read
I get asked abou my grading a lot because it’s pretty different than a typical classroom. I’ve refined it slowly over the years, and I’m by no means totally happy with it, but I’m happy with how it’s changed the way I (and my students, eventually) think about grades. I tend to struggle and wrestle with what grading communicates, even if it’s no... Read more 20 Jan 2015 - 2 minute read
I’m a big believer in letting students make their own decisions as much as they can. In high school, they’re dictated to. A lot. I figure picking somewhere to sit is one way to give a little bit of agency and ownership to the classroom space. I’m back in the classroom for the first time in nearly two years. I’m the fourth teacher this particula... Read more 12 Jan 2015 - 1 minute read


The application is located in the menu bar to give you a quick access everywhere. The images are exported in a PSD file which can be opened with the most used graphic softwares such as Photoshop, Pixelmator and Acorn.
Keep only what you want.
An alternative interface is provided to capture only what you need. You can select a single component and export only this one. Moreover, you can also choose to disable advanced settings as the shadow or the framing.
Get ScreenToLayers right now!
You'll get started in no time and discover how ScreenToLayers will make your life easier.
ScreenToLayers for Mac
Designed for latest versions of macOS. Required OS X 10.10 or later.


hammingdists.Rd
Returns a distance matrix giving all pairwise Hamming distances between the
rows of its argument meanings
, which can be a matrix, data frame or
vector. Vectors are treated as matrices with a single column, so the
distances in its return value can only be 0 or 1.
hammingdists(meanings)
| meanings | a matrix with the different dimensions encoded along
columns, and all combinations of meanings specified along rows. The data
type of the cells does not matter since distance is simply based on
equality (with the exception of |
|---|
A distance matrix of type dist
with n*(n-1)/2
rows/columns, where n is the number of rows in meanings
.
This function behaves differently from calling
dist(meanings, method="manhattan")
in how NA
values are treated: specifying a meaning component as NA
allows you
to ignore that dimension for the given row/meaning combinations,
(instead of counting a difference between NA
and another value as a
distance of 1).
# a 2x2 design using strings print(strings <- matrix(c("a1", "b1", "a1", "b2", "a2", "b1", "a2", "b2"), ncol=2, byrow=TRUE))#> [,1] [,2] #> [1,] "a1" "b1" #> [2,] "a1" "b2" #> [3,] "a2" "b1" #> [4,] "a2" "b2"hammingdists(strings)#> 1 2 3 #> 2 1 #> 3 1 2 #> 4 2 1 1# a 2x3 design using integers print(integers <- matrix(c(0, 0, 0, 1, 0, 2, 1, 0, 1, 1, 1, 2), ncol=2, byrow=TRUE))#> [,1] [,2] #> [1,] 0 0 #> [2,] 0 1 #> [3,] 0 2 #> [4,] 1 0 #> [5,] 1 1 #> [6,] 1 2hammingdists(integers)#> 1 2 3 4 5 #> 2 1 #> 3 1 1 #> 4 1 2 2 #> 5 2 1 2 1 #> 6 2 2 1 1 1# a 3x2 design using factors (ncol is always the number of dimensions) print(factors <- data.frame(colour=c("red", "red", "green", "blue"), animal=c("dog", "cat", "dog", "cat")))#> colour animal #> 1 red dog #> 2 red cat #> 3 green dog #> 4 blue cathammingdists(factors)#> 1 2 3 #> 2 1 #> 3 1 2 #> 4 2 1 2# if some meaning dimension is not relevant for some combinations of # meanings (e.g. optional arguments), specifying them as NA in the matrix # will make them not be counted towards the hamming distance! in this # example the value of the second dimension does not matter (and does not # count towards the distance) when the the first dimension has value '1' print(ignoredimension <- matrix(c(0, 0, 0, 1, 1, NA), ncol=2, byrow=TRUE))#> [,1] [,2] #> [1,] 0 0 #> [2,] 0 1 #> [3,] 1 NAhammingdists(ignoredimension)#> 1 2 #> 2 1 #> 3 1 1# trivial case of a vector: first and last two elements are identical, # otherwise a difference of one hammingdists(c(0, 0, 1, 1))#> 1 2 3 #> 2 0 #> 3 1 1 #> 4 1 1 0


COVID-19 Statment
Last Updated: May 20, 2020 8:39 PM MDT
As an essential service provider, Revolution Technology Solutions remains open to assist companies during these challenging times.
We are following CDC and DOH guidelines and taking the following precautions to ensure the safety of our contractors, clients, and partners:
- All operations personnel are receiving regular training on coronavirus-prevention protocols. The entire company is being updated as CDC and DOH guidelines evolve, and are sent a weekly digest of updates and procedures. Signage outlining these protective measures has been posted throughout our facilities.
- Revolution Technology Solutions utilizes a work readiness checklist based on CDC and state recommendations for checking COVID-19 symptoms and to ensure employees are properly equipped to mitigate spread. The checklist includes a list of questions regarding commonly associated COVID-19 symptoms and a thermal temperature check. Managers perform this check daily with each employee coming to Revolution Technology Solutions facilities or work sites.
- Employees are required to use gloves and masks on job sites in all of Revolution Technology Solutions' local markets. All team members are required to wash hands with soap multiple times a day.
- Sanitation products; including latex gloves, soap, sanitizer, masks and disinfectant have been distributed at our facilities. Operations managers are meeting regularly to review and update the PPE stock, and we are doing everything we can to source supplies and resources.
- We have increased the contractor cleaning frequency at each location to sanitize work spaces and equipment. This includes daily cleaning of truck interiors. We are wiping down door handles, common areas restrooms and other frequently used areas regularly throughout the day.
- We have asked all staff to refrain from shaking hands and to maintain social distancing (6+ ft.) with clients and each other.
- We are requiring all non-operational staff to work remotely and limiting and rotating the number of operational employees inside our facilities. No-one except Revolution Technology Solutions' employees are allowed inside our offices or warehouses. Drivers, partners, and clients must perform pick-ups, deliveries, and storage accesses outside our facilities.
- All employees are required to stay home if they are, in any way, feeling unwell. Any employee that exhibits signs of illness is immediately sent home and cannot return to work until the criteria to discontinue home isolation are met, in consultation with healthcare providers and state and local healthcare departments. Any employee with a sick household member is required to notify their manager immediately.
- In lieu of on-site pre-move surveys, we are conducting surveys via online video survey tools and video chat where possible.
We are also asking our clients to consider the health and well-being of our moving professionals by:
- Making soap available to the crew in bathrooms and, as available, hand sanitizers.
- Rescheduling services if any member of the household/organization is feeling unwell.
- Refraining from shaking hands with the crew and maintaining appropriate social distance from crew members (6 ft.).
- Limiting the number of household members on site. Only 1 to 2 on-site contacts should meet with the crew and limit themselves from being in the same room with the crew after the walk through.
- Washing hands throughout the day and wearing their own gloves and masks as available.
- If they wish, they may offer additional PPE materials for the crew to use.
- Sanitizing door knobs and surfaces prior to the crew’s arrival and after their departure.
Although various states have begun re-opening stages, Revolution Technology Solutions continues to adhere to the above preventative policies. Revoution Technology Solutions maintains the same precautions across the entire company, and is in compliance or more cautious than all our locations’ local regulations and guidelines. Our priority is to protect the well-being of our team and the communities that we serve. Like all Americans, we are carefully monitoring this dynamic situation. Additional precautions may be taken as necessitated, and we will continue to revise our policies as required.
If you have additional questions or concerns, please
contact us.


ReactiveTicketBooking is an online ticketing demo application that demonstrates how you can transform a traditional EE-application into a reactive akka based application with a wink. It is based on the jboss-developer Ticket-Monster showcase.
ReactiveTicketBookings's architecture uses a subset of the rich feature set offered by Akka including streams, persistence, cluster sharding and distributed data.
A deployment of ReactiveTicketBooking runs continuously in the cloud on the OpenShift platform. Learn how easy it is to write Java EE applications that can deploy both locally and in the cloud.
TicketMonster is available on GitHub. Within a click, you can get the source code, build it and run it!
ReactiveTicketBooking is accompanied by a tutorial that walks your through the application architecture. Read it to learn how the application is built. Or even build it yourself following our instructions.
ReactiveTicketBooking an example that you can follow, but you can also use the predefined application structure to implement your own use cases.


"OUR VISION"
At Italiano, we, a group of 4 independent women, wish to offer our personal rendition of Italian cuisine with an innovative gastronomic take on traditional cooking methods, fine Italian produce and the legacy of our shared food heritage. Moreover, we regard it as a personal challenge to help bring about a revival of Italian cuisine and let its distinctive flavours and particular regional character brighten up the world.
"OUR MISSION"
Everything we do is about you. From chefs who create exciting new flavors, to crew members who know exactly how you want your drink – we prioritize what you need to get you on your way. We strive to keep you at your best, and we remain loyal to you, your tastes and your time. Our mission is to give our customers a place to celebrate life’s special moments by offering the best food, service, and ambiance.


GUI Layout Toolbox documentationVersion: 2.2.1GUI Layout Toolbox is a set of MATLAB graphics containers that can be used to create graphical user interfaces that resize gracefully. The containers can be used in combination to produce virtually any user interface layout.
This toolbox was developed by David Sampson and Ben Tordoff from the Consulting Services group at MathWorks. Contents:
|
© 2016 The MathWorks Ltd Terms of Use Patents Trademarks


This site will suggest the best programming language based on your answers!
What is your favorite season?
If you were in Avatar: The Last Airbender, which nation would you choose?
Are you left handed or right handed?


--- layout: post title: ! 'INTERACTIVE: 2012 Michigan GOP primary results by county' date: 2012-02-29 09:44:39.000000000 +05:30 categories: - Data Visualization Thoughts tags: [] status: publish type: post published: true meta: _edit_last: '1' _thumbnail_id: '1945' image: '' quote-author: Unknown quote-url: http:// quote-copy: Unknown audio: http:// link-url: http:// seo_follow: 'false' seo_noindex: 'false' tmac_last_id: '229660838376652800' pvc_views: '463' _jetpack_related_posts_cache: a:1:{s:32:"8f6677c9d6b0f903e98ad32ec61f8deb";a:2:{s:7:"expires";i:1430167727;s:7:"payload";a:3:{i:0;a:1:{s:2:"id";i:1199;}i:1;a:1:{s:2:"id";i:1205;}i:2;a:1:{s:2:"id";i:2548;}}}} author: login: cvlewis email<EMAIL_ADDRESS>display_name: Carl V. Lewis first_name: Carl V. last_name: Lewis excerpt: !ruby/object:Hpricot::Doc options: {} ---
This map displays the results from Tuesday night's Michigan GOP primary by county. The darker shade blue represents a higher percentage of voters for Mitt Romney, who narrowly won the race despite Michigan being his native state. Click on each county to see a breakdown of how Michigan Republicans cast their ballots.
SOURCE: Michigan Dept. of State, Feb. 28, 2011, 11:34 E.S.T.


I am a Web Developer. I don't invent the Ideas but I try to convert ideas into technology.
When I'm not a Developer, I'm probably hanging out with my friends. playing computer games, watching movies, listening to music and chatting with friends.
Tart tiramisu ice cream cotton candy pudding. Sweet topping chocolate bar tootsie roll cotton candy brownie oat cake gummi bears.
Tart tiramisu ice cream cotton candy pudding. Sweet topping chocolate bar tootsie roll cotton candy brownie oat cake gummi bears.
Tart tiramisu ice cream cotton candy pudding. Sweet topping chocolate bar tootsie roll cotton candy brownie oat cake gummi bears.
Tart tiramisu ice cream cotton candy pudding. Sweet topping chocolate bar tootsie roll cotton candy brownie oat cake gummi bears.
Tart tiramisu ice cream cotton candy pudding. Sweet topping chocolate bar tootsie roll cotton candy brownie oat cake gummi bears.
Tart tiramisu ice cream cotton candy pudding. Sweet topping chocolate bar tootsie roll cotton candy brownie oat cake gummi bears.
Email<EMAIL_ADDRESS>Phone: +1-xxx-xxx-xxxx


This is the HTML response for this REST resource. The JSON shown here is formatted to be human readable and may contain comments and some integers may be displayed as hex. Neither comments nor hex literals are allowed in valid JSON.
To retrieve just the following as fully valid JSON specify
Accept: application/json
as one of the headers when requesting this resource.
[CONTENT]


--- layout: post title: How to programmatically add an IP address to a Shoutcast Reserved IP list in PHP description: If you have a private Shoutcast server you need to add IP addresses to the Reserved IP List (RIP). Find out how to do this automatically in PHP. date: 2012-04-07 12:00:00 headerImage: img/post-bg-04.jpg tags: ["tech", "php"] ---
Pretty semantic title, huh? But that's basically what this is all about.
{{< img src="/img/blog/2012/shoutcast.gif" desc="Shoutcast logo" >}}
If you have a Shoutcast host that is set to private, only people whose IP address in the RIP list (Reserved IP) can access your stream.
A lot of free Shoutcast server providers do this, to make it a bit less profitable to free ride their services.
Let's have a quick look at the code and then analyze it to understand what it's doing.
{{< highlight php >}} array( 'method' => 'GET', 'user_agent' => $_SERVER['HTTP_USER_AGENT'], 'header' => array( 'Authorization: Basic ' . base64_encode("$username:$password"), 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' ) ) )); // A poor mans CURL request file_get_contents($url, false, $context); ?> {{< /highlight >}}
First we get the IP address of the visitor, we explode() it on the dots to get 4 separate numbers, together forming a valid IP address.
Then we set up a URL that will look like this: https://myshoutcastserver.com:8080/admin.cgi?mode=ripip&ip1=127&ip2=0&ip3=0&ip4=1
This URL will submit (GET) a form that adds the IP to the RIP list. See why we had to separate the IP on the dots? 'Why' you ask, well because this is somewhat of a hack. We fill the form through GET parameters.
Of course the admin.cgi page is behind a password protected bit. This is however a simple Basic Authorization, so we create a stream context and add Basic Authorization.
Shoutcast Servers aren't completely dumb, only a little. But they're smart enough to notice 'robots'. So we also add some headers to make it believe we are a real browser and that we would like to accept normal HTML back. We don't really need anything back at all, so that's why you don't have to do anything with the data you get back from file_get_contents.
Just running the command, with the context stream and the pimped out URL is enough to add an IP to the Reserved IP List in Shoutcast. You're done!


Hi,hello my name is vishwah i'am a tech enthusiast, I play lot of video games ,now recently i'am learning web development so that's why i created this blog for learning purpose ,so just go and enjoy the contents i try to post tech content every week ,thank you.


Watch out for these risky intersections in {{cty.capitalize()}}
Go to the markers for safe places to drive, and avoid the red areas on the heatmap
Search again


Despite their wealth, life for the Tates has not always been smooth sailing.
Radley is a now-sober alcoholic, while Carla (Juliette Lewis), their youngest child, has just returned home after eight years at a "special school." She's decided she wants to further her education and get her own apartment, ideas that jolt her mother, who does her best to quickly squelch any talk of Carla leaving home again. Elizabeth would rather see Carla take origami and calligraphy classes.
The stage is set for a major throwdown, but if "The Other Sister" sounds like it might develop into a message movie about the rights of the mentally challenged, be forewarned that the film comes from director Garry Marshall ("Pretty Woman," "Frankie and Johnny").
So instead of frank talk about real issues, "Sister" stubbornly accentuates the positive, offering up gorgeous houses, chic San Francisco apartments, frighteningly green lawns and a sweeping pop soundtrack instead of any sort of insight into the problems a woman in Carla's situation might face. Even the story's major complication, a crisis involving Carla's new boyfriend Daniel(Giovanni Ribisi), feels wholly manufactured and unconvincing.
In the midst of all this artifice though, stands Keaton, who couldn't be synthetic even if she tried. Elizabeth says things like "it would behoove us to suppress the minutia," but Keaton undercuts the woman's high-handedness with a few quirks - reading magazines backwards, for instance - that bring surprising warmth to a character many actresses would have written off as simply another chilly mom.
Lewis and Ribisi are also fine, if a bit studied. Marshall regular Hector Elizondo makes a token appearance as Daniel's understanding landlord, and fans of 1960s TV may be amused to see Juliet Mills of "Nanny and the Professor" fame in the role of the Tates' trouble-shooting housekeeper.
Though slightly long at almost two anda half hours, "Sister" is pleasant enough and occasionally even tickles the funnybone. But there's no real heart to the story, no emotional core. Marshall has whipped up a glittery, lighter-than-air confection that sends you home feeling like you missed dinner.
James Sanford
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Diagrams
Use Case Diagram
Actor
Association
Activity Diagram
Activity
Start
End
Row
Synchronization
Class Diagram
Relationships
Instance Level Relationships
Association
Class Level Relationships
Generalization
General Relationships
Mutiplicity
0..1
No instances, or one instance
1
Exactly one instance
0..*
Zero or more instances
1..*
One or more instances
Dependency
Members
Visibility
+
#
~
-
Sequence Diagram
Actor
LifeLine
Activation
Message
Object


|
Hurricane Track and Intensity |
.......... |
|
..... |
|
.... |
| Atlantic Storms | Arlene | Bret | Cindy | Don | Emily | Franklin | Gert | Harvey | Irene | Jose | Katia | Lee | Maria | Nate | Ophelia | Philippe | Rina | Sean |
| mean track | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
| mean intensity | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
| East Pacific Storms | Adrian | Beatriz | Calvin | Dora | Eugene | Fernanda | Greg | Hilary | Irwin | Jova | Kenneth | Lidia | Max | Norma | Otis | Pilar | Ramon | Selma | Todd | Veronica | Wiley | Xina | York | Zelda |
| track | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
| intensity | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |


nips nips2002 nips2002-162 nips2002-162-reference knowledge-graph by maker-knowledge-mining
Source: pdf
Author: Naonori Ueda, Kazumi Saito
Abstract: We propose probabilistic generative models, called parametric mixture models (PMMs), for multiclass, multi-labeled text categorization problem. Conventionally, the binary classiﬁcation approach has been employed, in which whether or not text belongs to a category is judged by the binary classiﬁer for every category. In contrast, our approach can simultaneously detect multiple categories of text using PMMs. We derive eﬃcient learning and prediction algorithms for PMMs. We also empirically show that our method could signiﬁcantly outperform the conventional binary methods when applied to multi-labeled text categorization using real World Wide Web pages. 1
[1] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. to appear Advances in Neural Information Processing Systems 14. MIT Press.
[2] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society B, 39:1-38. 1977.
[3] S. T. Dumais, J. Platt, D. Heckerman, & M. Sahami. Inductive learning algorithms and representations for text categorization. In Proc. of ACM-CIKM’98, 1998.
[4] T. Joachims. Text categorization with support vector machines: Learning with many relevant features. In Proc. of the European Conference on Machine Learning, 137-142, Berlin, 1998.
[5] D. Lewis & M. Ringuette. A comparison of two learning algorithms for text categorization. In Third Anual Symposium on Document Analysis and Information Retrieval, 81-93. 1994.
[6] K. Morik, P. Brockhausen, and T. Joachims. Combining statistical learning with knowledge-based approach. A case study in intensive care monitoring. In Proc. of International Conference on Machine Learning (ICML’99), 1999.
[7] K. Nigam, A. K. McCallum, S. Thrun, & T. Mitchell. Text classiﬁcation from labeled and unlabeled documents using EM. Machine Learning, 39:103-134, 2000.
[8] Y. Yang & J. Pederson. A comparative study on feature selection in text categorization. In Proc of International Conference on Machine Learning, 412-420, 1997.
[9] V. N. Vapnik. Statistical learning theory. John Wiley & Sons, Inc., New York. 1998.


Properties
Private colors
colors: string[] = ['#b3d9ff', '#66b3ff']
Private defaultEventDuration
defaultEventDuration: MusicTime = MusicTime.fromString('0.0.1')
Private element
element: HTMLElement
Private pixelsPerSecond
pixelsPerSecond: number = 40
Private playHead
playHead: HTMLElement
Private seqLabelheight
seqLabelheight: number = 15
Private sequenceHeight
sequenceHeight: number = 70
Private songEnd
songEnd: HTMLElement
Private timeLineContext
timeLineContext: CanvasRenderingContext2D
Private timelineHeight
timelineHeight: number = 30
Private timelineSpacing
timelineSpacing: number = 20
Private updateFrame
update
Frame: AnimationFrame = new AnimationFrame(this.onUpdate.bind(this))


| View source on GitHub |
Train and evaluate the estimator
.
tf.compat.v1.estimator.train_and_evaluate
tf.compat.v2.estimator.train_and_evaluate
tf.estimator.train_and_evaluate( estimator, train_spec, eval_spec )
This utility function trains, evaluates, and (optionally) exports the model by
using the given estimator
. All training related specification is held in
train_spec
, including training input_fn
and training max steps, etc. All
evaluation and export related specification is held in eval_spec
, including
evaluation input_fn
, steps, etc.
This utility function provides consistent behavior for both local (non-distributed) and distributed configurations. The default distribution configuration is parameter server-based between-graph replication. For other types of distribution configurations such as all-reduce training, please use DistributionStrategies.
Overfitting: In order to avoid overfitting, it is recommended to set up the
training input_fn
to shuffle the training data properly.
Stop condition: In order to support both distributed and non-distributed
configuration reliably, the only supported stop condition for model
training is train_spec.max_steps
. If train_spec.max_steps
is None
, the
model is trained forever. Use with care if model stop condition is
different. For example, assume that the model is expected to be trained with
one epoch of training data, and the training input_fn
is configured to throw
OutOfRangeError
after going through one epoch, which stops the
Estimator.train
. For a three-training-worker distributed configuration, each
training worker is likely to go through the whole epoch independently. So, the
model will be trained with three epochs of training data instead of one epoch.
Example of local (non-distributed) training:
# Set up feature columns. categorial_feature_a = categorial_column_with_hash_bucket(...) categorial_feature_a_emb = embedding_column( categorical_column=categorial_feature_a, ...) ... # other feature columns estimator = DNNClassifier( feature_columns=[categorial_feature_a_emb, ...], hidden_units=[1024, 512, 256]) # Or set up the model directory # estimator = DNNClassifier( # config=tf.estimator.RunConfig( # model_dir='/my_model', save_summary_steps=100), # feature_columns=[categorial_feature_a_emb, ...], # hidden_units=[1024, 512, 256]) # Input pipeline for train and evaluate. def train_input_fn(): # returns x, y # please shuffle the data. pass def eval_input_fn(): # returns x, y pass train_spec = tf.estimator.TrainSpec(input_fn=train_input_fn, max_steps=1000) eval_spec = tf.estimator.EvalSpec(input_fn=eval_input_fn) tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)
Note that in current implementation estimator.evaluate
will be called
multiple times. This means that evaluation graph (including eval_input_fn)
will be re-created for each evaluate
call. estimator.train
will be called
only once.
Example of distributed training:
Regarding the example of distributed training, the code above can be used
without a change (Please do make sure that the RunConfig.model_dir
for all
workers is set to the same directory, i.e., a shared file system all workers
can read and write). The only extra work to do is setting the environment
variable TF_CONFIG
properly for each worker correspondingly.
Also see Distributed TensorFlow.
Setting environment variable depends on the platform. For example, on Linux,
it can be done as follows ($
is the shell prompt):
$ TF_CONFIG='<replace_with_real_content>' python train_model.py
For the content in TF_CONFIG
, assume that the training cluster spec looks
like:
cluster = {"chief": ["host0:2222"], "worker": ["host1:2222", "host2:2222", "host3:2222"], "ps": ["host4:2222", "host5:2222"]}
Example of TF_CONFIG
for chief training worker (must have one and only one):
# This should be a JSON string, which is set as environment variable. Usually # the cluster manager handles that. TF_CONFIG='{ "cluster": { "chief": ["host0:2222"], "worker": ["host1:2222", "host2:2222", "host3:2222"], "ps": ["host4:2222", "host5:2222"] }, "task": {"type": "chief", "index": 0} }'
Note that the chief worker also does the model training job, similar to other non-chief training workers (see next paragraph). In addition to the model training, it manages some extra work, e.g., checkpoint saving and restoring, writing summaries, etc.
Example of TF_CONFIG
for non-chief training worker (optional, could be
multiple):
# This should be a JSON string, which is set as environment variable. Usually # the cluster manager handles that. TF_CONFIG='{ "cluster": { "chief": ["host0:2222"], "worker": ["host1:2222", "host2:2222", "host3:2222"], "ps": ["host4:2222", "host5:2222"] }, "task": {"type": "worker", "index": 0} }'
where the task.index
should be set as 0, 1, 2, in this example, respectively
for non-chief training workers.
Example of TF_CONFIG
for parameter server, aka ps (could be multiple):
# This should be a JSON string, which is set as environment variable. Usually # the cluster manager handles that. TF_CONFIG='{ "cluster": { "chief": ["host0:2222"], "worker": ["host1:2222", "host2:2222", "host3:2222"], "ps": ["host4:2222", "host5:2222"] }, "task": {"type": "ps", "index": 0} }'
where the task.index
should be set as 0 and 1, in this example, respectively
for parameter servers.
Example of TF_CONFIG
for evaluator task. Evaluator is a special task that is
not part of the training cluster. There could be only one. It is used for
model evaluation.
# This should be a JSON string, which is set as environment variable. Usually # the cluster manager handles that. TF_CONFIG='{ "cluster": { "chief": ["host0:2222"], "worker": ["host1:2222", "host2:2222", "host3:2222"], "ps": ["host4:2222", "host5:2222"] }, "task": {"type": "evaluator", "index": 0} }'
When distribute
or experimental_distribute.train_distribute
and
experimental_distribute.remote_cluster
is set, this method will start a
client running on the current host which connects to the remote_cluster
for
training and evaluation.
estimator
: An Estimator
instance to train and evaluate.train_spec
: A TrainSpec
instance to specify the training specification.eval_spec
: A EvalSpec
instance to specify the evaluation and export
specification.A tuple of the result of the evaluate
call to the Estimator
and the
export results using the specified ExportStrategy
.
Currently, the return value is undefined for distributed training mode.
ValueError
: if environment variable TF_CONFIG
is incorrectly set.


kswitch - switch primary ticket cache
\$1 \n[an-margin] level \n[rst2man-indent-level] level margin: \n[rst2man-indent\n[rst2man-indent-level]] - \n[rst2man-indent0] \n[rst2man-indent1] \n[rst2man-indent2]
kswitch {-c cachename|-p principal}
kswitch makes the specified credential cache the primary cache for the collection, if a cache collection is available.
\fB-c cachename Directly specifies the credential cache to be made primary.
\fB-p principal Causes the cache collection to be searched for a cache containing credentials for principal. If one is found, that collection is made primary.
kswitch uses the following environment variables:
\fBKRB5CCNAME Location of the default Kerberos 5 credentials (ticket) cache, in the form type:residual. If no type prefix is present, the FILE type is assumed. The type of the default cache may determine the availability of a cache collection; for instance, a default cache of type DIR causes caches within the directory to be present in the collection.
\fBFILE:/tmp/krb5cc_%{uid} Default location of Kerberos 5 credentials cache
kinit(1), kdestroy(1), klist(1)), kerberos(1)
1985-2013, MIT


PHPStan finds bugs in your code without writing tests. Read more about it here or try it right now in the editor:


fishbase.ropensci.org/sealifease is a RESTful Application Programming Interface (API) to the Sealifebase database.
Sealifebase database and web portal are completely separate entities from this API. Sealifebase is kind enough to give us a copy of their database, from which we provide some of it through this API.
Source code for this API: https://github.com/ropensci/fishbaseapi
find the docs at https://ropensci.github.io/fishbaseapidocs/


Prerequisites
Before we get started, let’s make sure you meet these following requirements:
-
Web
-
A working MySQL/MariaDB database
-
PHP Version >= 5.6 (and PHP Version < 7.4 for SB++ 1.6.3 release)
- GMP extension (for A2S queries)
-
-
Game
-
Sourcemod >= 1.7
-
Metamod: Source
If you’re using Cloudflare, Rocket Loader must be disabled otherwise SourceBans++ will become unresponsive.
-
Uploading
-
Download the latest release from the release page
-
Upload everything that’s within
web
folder to either the root of your web server or a folder that you wish to allocate -
Upload everything that’s within
game
to the game mod directory (tf
,cs
,dod
, etc)
Write Permission (Make sure the files is under the web server user)
-
config.php
file is writable (Linux:sudo chmod 644 config.php
) -
/demos
folder is writable (Linux:sudo chmod -R 644 demos
) -
/themes_c
folder is writable (Linux:sudo chmod -R 774 themes_c
) -
/images/games
folder is writable (Linux:sudo chmod -R 644 /images/games
) -
/images/maps
folder is writable (Linux:sudo chmod -R 644 /images/maps
)
Web Installation
For demonstration purposes, I am going to be using example.com for the rest of the example, you will need to replace it with your own, and it may vary depending if you placed it
within a directory other than the root directory (Ex: example.com/sb/
)
Navigate to your Sourcebans++ installer (example.com/install
) to begin installation
-
Read over the license agreement, check
I have read, and accept the license
and clickOk
when you are done reading -
Fill out the information
-
Server Hostname - Database host, use
localhost
if it’s on the same machine, otherwise use the IP or any resolvable records -
Server Port - Database port, by default it runs on
3306
, you will need to change it if the port is difference -
Username - Database username, the user to sign in with
-
Password - Database password, the password for the corresponding user
-
Database - Database to use, you should create a database if have not already
-
Table Prefix - The prefix you want the SourceBans++ tables to use, useful if there are name collisions, otherwise, leave it at default
-
Steam API Key - Your Steam API key, which can be obtained here
-
SourceBans URL - Your SourceBans site with protocol included! (Ex:
https://example.com
), the http:// or https:// is required -
SourceBans EMail - The email address to send password reset and/or ban submissions from, leave empty if you don’t have one to use and don’t plan to use it
-
-
System check, look over everything and make sure everything is green before continuing
-
Table creation, click
Ok
when a success notification pops up -
Fill out the information for your personal account, and hit
Ok
when done (Note: Steam ID is your SteamID2 ID)
Plugin Setup
Navigate to your addons/sourcemod/configs/
directory and edit databases.cfg file
Append and edit the following
"sourcebans"
{
"driver" "default"
"host" "EDITME_DATABASE_HOST_EDITME"
"database" "EDITME_DATABASE_EDITME"
"user" "EDITME_USERNAME_EDITME"
"pass" "EDITME_PASSWORD_EDITME"
"port" "3306" // EDIT IF NEEDED
}
Note: Whilst the webpanel will do its best to generate the above section for you, you should not rely on this being correct. Especially if your webserver (and database server) is on a different host to your game server. Also keep in mind that if your game server has to connect remotely, you may need to allow this with your database configuration. If you have problems here you would usually need to seek help from your webhost, not the SB++ support team.
Save this file and upload the changes as required.
You next need to add the server in the web portal and take note of the ServerID from the SB++ Web Panel. Then navigate to your addons/sourcemod/configs/sourcebans/
directory and edit sourcebans.cfg and update the “ServerID” parameter near the bottom of the file. Refer to the Adding Server docs page for more info.
Final Note
Please take a look at our other docs if you are having difficulty installing


Demo Reel
Art
Illustration
Visdev
3D Modeling
Piano Covers
Code
Contact Me
Name:
E-mail:
Subject:
Message:


Resume
Project Description:This is Project Description paragran. This is Project Description paragran. This is Project Description paragran. This is Project Description paragran.