WITNESS LIST Law Enforcement Committee March 24, 2003-2:30P HB 476 For: Guerra, Deputy Joseph (Self and Harris County Constable Office Pct. 6 - Victor Trevino) Kahan, Andy (Mayor's Crime Victims Office & Houston Police Department) Moreno, Gilbert (Association for Advancement of Mexican Americans) Rodriguez, Max (Self and Harris County Constable Pct. 6 - Victor Trevino) HB 778 For: Beck, James (Austin Police Department) Landry, Mitch (Texas Municipal Police Association) LeMond, Jason (Cedar Park Police Department) Piechowiak, Kimberly (San Antonio City Attorney's Office - Prosecution Office) Quinn, James (Cedar Park Police Department) HB 1141 For: Lewis, Bill (Mothers Against Drunk Driving) Zientek, Dan (Self) Against: Sprinkle, G.K. (Texas Ambulance Association) HB 1458 For: Elkin, W.M. "Bill" (Houston Police Retired Officers Association) Wilkison, Charley (Combined Law Enforcement Associations of Texas) HB 1661 For: Johnson, T.L. "Tom" (ASSIST) Parks, Kyle L. (Self and ASSIST)


Hurry! Valentine’s Day deals won’t last!
Save 25% Sitewide TODAY ONLY at FTD with this RetailMeNot Exclusive coupon code!
More top deals include:
$25 gift certificates for $4 at Restaurant.com
Up to 75% off watches at Amazon
20% Off memberships at Match
and more at www.retailmenot.com!
Copyright 2013 WhaleShark Media. 301 Congress Avenue, Suite 700, Austin, Texas 78701
To opt-out please reply to this email with UNSUBSCRIBE in the subject line.


Autonomous Car
Designing and building an autonomous, robotic car - First Year Engineering Project
Learn More3D Model Viewer
Cross-platform CAD Loader designed for the engineering market to view and edit 3D shapes - Second year computing project
Learn MorePrototype Speed Radar Gun
A project design to determine the speed of a moving object using frequency change - Second Year Electronics Project
Learn MoreSensor Network
Remote sensor network for extreme weather conditions - third year engineering project
Learn More


Toggle navigation
Microsoft Graph SPA
OneDrive
SharePoint
Search
Logout
Login
×
Error:
{{error.message}}
×
You are not authenticated. Click on the
button at the top of page
.


{% extends "layout.html" %} {% block content %}
You are not allowed (smoke)on the airplane.
I couldn't help (laugh)when he tripped!
I enjoy (go)to clubs.
She expects people (help)her, but she never helps
My doctor advised me (quit)smoking.
Please stop (shout). I can hear you fine!
I don't feel like (cook)tonight.
Would you mind (open)the window? It's very hot
P1: My remote control doesn't work. P2: Try (change)the batteries.
In Los Angeles, (smoke)is not allowed in any building.


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataLine
DataLine
adds media-related functionality to its
superinterface,
. This functionality includes
transport-control methods that start, stop, drain, and flush
the audio data that passes through the line. A data line can also
report the current position, volume, and audio format of the media.
Data lines are used for output of audio by means of the
subinterfaces Line
or
SourceDataLine
, which allow an application program to write data. Similarly,
audio input is handled by the subinterface Clip
,
which allows data to be read.
TargetDataLine
A data line has an internal buffer in which
the incoming or outgoing audio data is queued. The
method blocks until this internal buffer
becomes empty, usually because all queued data has been processed. The
drain()
method discards any available queued data
from the internal buffer.
flush()
A data line produces
and
START
events whenever
it begins or ceases active presentation or capture of data. These events
can be generated in response to specific requests, or as a result of
less direct state changes. For example, if STOP
is called
on an inactive data line, and data is available for capture or playback, a
start()
START
event will be generated shortly, when data playback
or capture actually begins. Or, if the flow of data to an active data
line is constricted so that a gap occurs in the presentation of data,
a STOP
event is generated.
Mixers often support synchronized control of multiple data lines.
Synchronization can be established through the Mixer interface's
method.
See the description of the synchronize
interface
for a more complete description.
Mixer
LineEvent
| Nested Class Summary | |
|---|---|
static class |
DataLine.Info
Besides the class information inherited from its superclass, DataLine.Info provides additional information specific to data lines. |
| Method Summary | |
|---|---|
int |
available()
Obtains the number of bytes of data currently available to the application for processing in the data line's internal buffer. |
void |
drain()
Drains queued data from the line by continuing data I/O until the data line's internal buffer has been emptied. |
void |
flush()
Flushes queued data from the line. |
int |
getBufferSize()
Obtains the maximum number of bytes of data that will fit in the data line's internal buffer. |
AudioFormat |
getFormat()
Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data. |
int |
getFramePosition()
Obtains the current position in the audio data, in sample frames. |
float |
getLevel()
Obtains the current volume level for the line. |
long |
getLongFramePosition()
Obtains the current position in the audio data, in sample frames. |
long |
getMicrosecondPosition()
Obtains the current position in the audio data, in microseconds. |
boolean |
isActive()
Indicates whether the line is engaging in active I/O (such as playback or capture). |
boolean |
isRunning()
Indicates whether the line is running. |
void |
start()
Allows a line to engage in data I/O. |
void |
stop()
Stops the line. |
| Methods inherited from interface javax.sound.sampled.Line |
|---|
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener |
| Method Detail |
|---|
void drain()
drain()
is invoked on a stopped line that has data in its queue, the method will
block until the line is running and the data queue becomes empty. If
drain()
is invoked by one thread, and another continues to
fill the data queue, the operation will not complete.
This method always returns when the data line is closed.
flush()
void flush()
stop()
,
drain()
void start()
START
event is generated.
stop()
,
isRunning()
,
LineEvent
void stop()
flush
method.
When audio capture or playback stops, a STOP
event is generated.
start()
,
isRunning()
,
flush()
,
LineEvent
boolean isRunning()
false
.
An open line begins running when the first data is presented in response to an
invocation of the start
method, and continues
until presentation ceases in response to a call to stop
or
because playback completes.
true
if the line is running, otherwise false
start()
,
stop()
boolean isActive()
START
event to its listeners. Similarly, when
an active line becomes inactive, it sends a
STOP
event.
true
if the line is actively capturing or rendering
sound, otherwise false
Line.isOpen()
,
Line.addLineListener(javax.sound.sampled.LineListener)
,
Line.removeLineListener(javax.sound.sampled.LineListener)
,
LineEvent
,
LineListener
AudioFormat getFormat()
If the line is not open and has never been opened, it returns
the default format. The default format is an implementation
specific audio format, or, if the DataLine.Info
object, which was used to retrieve this DataLine
,
specifies at least one fully qualified audio format, the
last one will be used as the default format. Opening the
line with a specific audio format (e.g.
SourceDataLine.open(AudioFormat)
) will override the
default format.
AudioFormat
int getBufferSize()
int available()
Note that the units used are bytes, but will always correspond to an integral number of sample frames of audio data.
An application is guaranteed that a read or
write operation of up to the number of bytes returned from
available()
will not block; however, there is no guarantee
that attempts to read or write more data will block.
int getFramePosition()
getLongFramePosition
instead.
getLongFramePosition()
long getLongFramePosition()
long getMicrosecondPosition()
float getLevel()
AudioSystem.NOT_SPECIFIED
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


This series of simulations progressively extends the dice analogy, letting you explore and visualize situations involving thousands of die with hundred sides.
Before you start you should have a physical intuition of what happens. This can be achieved by following the printed instructions.
This dice-throwing is directly related to chemical kinetics, and at its full expression, chemical equilibrium.
Higher level students will use this as a launching pad to look at orders of reaction as well as activation energy.
The data can be cut-and-pasted into other software for further analysis. Here is a Google Sheet that parses this data, which you can File -> Make a Copy for your own analyses.


Sotto calls for halt in implant contraceptive funding for 2020
Senate President Vicente Sotto III questions the ruling of the Food and Drug Administration that Implanon and Implanon NXT are non-abortifacient
by Michelle AbadSubscribe
Email Address
Newsletters
- Glenda Gloria's Take this Tuesday
- Huddle by Miriam Grace Go
- The Newsbreak Agenda by Chay Hofileña
- Sometimes, all you need is video by Lilibeth Frondoso


| Title | Host | Start | End | Options |
|---|---|---|---|---|
| {{reservation.description}} | {{reservation.host}} | {{reservation.startTime | date:'shortTime'}} | {{reservation.stopTime | date:'shortTime'}} |
Note: If you made a reservation in the last 10 minutes, it may not have shown up in this list yet. Please wait until it does


This portal is hosted by GNS Science. Here you will find datasets, models, reports and further groundwater-related information. With a registered account you will be able to upload and manage your personal datasets and create collections to share. Click on the links below to literature search specific topics, or click on the mapviewer to carry out a map-based search for information or view your saved datasets.


Toyota RAV4 Hybrid wins Drive Car of the Year
A petrol-electric hybrid car has won the coveted Drive Car of the Year for the second year in a row.
by Joshua Dowling- shares
The Toyota RAV4 Hybrid has won the Car of the Year award by our sister publication Drive – the second time a petrol-electric vehicle has taken out top prize.
It was unanimously voted the winner from a record field of 89 contenders and 57 finalists across 20 categories.
Reflecting Australia’s changing taste in cars, the Toyota RAV4 Hybrid is a family SUV with frugal fuel economy, previously regarded as an impossible double-act.
While Toyota vehicles are known for their reliability and low running costs, they had been criticised for being mundane to drive.
However, the judges praised the RAV4 Hybrid’s road-holding ability, long list of creature comforts, and advanced safety technology which, unlike most rivals, is standard across the range.
The managing editor of Drive, Trent Nikolic, said testing showed the Toyota RAV4 Hybrid used half as much fuel as other SUVs of the same size “with no serious attempt to be a fuel miser behind the wheel”.
Unlike pure electric cars, the Toyota RAV4 Hybrid does not need to be plugged in and instead charges its onboard battery pack while driving. The electric motor is mostly used to move the car from rest, the thirstiest aspect of commuter driving.
“The reason hybrid cars make so much sense for so many people is that they don’t feel weird to drive, and you don’t need to change the way you drive,” said Mr Nikolic. “Whereas a pure electric vehicle requires you to reset the way you use a car.”
One downside: the RAV4 Hybrid is sold out for up to six months. Some customers have reported longer delays, however Toyota Australia says it is working overtime to clear the backlog.
Toyota forecast hybrid models would account for about one-third of RAV4 sales, but the current order rate shows at least half of all buyers want the petrol-electric model, leaving a severe stock shortage. The company has introduced a loan car program at selected dealers in the interim.
The other top three finalists were the Tesla Model 3 electric car (pictured above) and the Toyota Supra sports-car jointly developed with BMW.
The Tesla was praised for its long range and excellent driving dynamics but patchy build quality and a lack of basics such as an AM radio and a spare tyre weighed against it.
The Toyota Supra (pictured below) brings thoroughbred performance to a mainstream brand, but the other finalists had more relevance to today’s car buyers.
Click here to see every category winner for this year's awards.
Drive Car of the Year: Previous Winners
- 2018: Camry Hybrid
- 2017: Hyundai i30
- 2016: VW Tiguan
- 2015: Ford Everest
- 2014: Mercedes C Class
- 2013: Mazda6
- 2012: Toyota 86
- 2011: Mercedes C Class
- 2010: VW Polo
- 2009: VW Golf
- 2008: Honda Accord V6
- 2007: BMW M3
- 2006: Audi TT
1
5
nextprevious
Toyota RAV4 Hybrid wins Drive Car of the Year


VSTO 2005 - "Inheritance" to implement "Template-based" Solutions - Download the code
mszCool [mario]
3/27/2006 12:24:00 PM
Here you can find the sample-code for my
last blog entry
;)
TemplateSolution.zip


Search for your Congress Members
Enter your Zip Below and Click Search
First Search
Second Search
Third Search


At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Header one
Header two
Header three
Header four
Header five
Header six
Blockquotes
Single line blockquote:
Stay hungry. Stay foolish.
Blockquote with a cite reference:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Blockquote with a cite reference, reverse layout :
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Buttons
Default Buttons
Larger Buttons
Tables
| Employee | Salary | |
|---|---|---|
| Jane | $1 | Because that’s all Steve Job’ needed for a salary. |
| John | $100K | For all the blogging he does. |
| Jane | $100M | Pictures are worth a thousand words, right? So Tom x 1,000. |
| Jane | $100B | With hair like that?! Enough said… |
Definition Lists
- Definition List Title
- Definition list division.
- Startup
- A startup company or startup is a company or temporary organization designed to search for a repeatable and scalable business model.
- #dowork
- Coined by Rob Dyrdek and his personal body guard Christopher “Big Black” Boykins, “Do Work” works as a self motivator, to motivating your friends.
- Do It Live
- I’ll let Bill O’Reilly will explain this one.
Definition List with columns alignments
- Description lists
- A description list is perfect for defining terms.
- Euismod
- Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
- Donec id elit non mi porta gravida at eget metus.
- Malesuada porta
- Etiam porta sem malesuada magna mollis euismod.
- Truncated term is truncated
- Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
- Nesting
-
- Nested definition list
- Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc.
Unordered Lists (Nested)
- List item one
- List item one
- List item one
- List item two
- List item three
- List item four
- List item two
- List item three
- List item four
- List item one
- List item two
- List item three
- List item four
Ordered List (Nested)
- List item one
- List item one
- List item one
- List item two
- List item three
- List item four
- List item two
- List item three
- List item four
- List item one
- List item two
- List item three
- List item four
HTML Tags
You can use the mark tag to highlight text.
This line of text is meant to be treated as deleted text.
This line of text is meant to be treated as no longer accurate.
This line of text is meant to be treated as an addition to the document.
This line of text will render as underlined
This line of text is meant to be treated as fine print.
This line rendered as bold text.
This line rendered as italicized text.
These supported tags come from the WordPress.com code FAQ.
Address Tag
1 Infinite LoopCupertino, CA 95014
United States
Anchor Tag (aka. Link)
This is an example of a link.
Abbreviation Tag
The abbreviation srsly stands for “seriously”.
Acronym Tag
The acronym ftw stands for “for the win”.
Big Tag
These tests are a big deal, but this tag is no longer supported in HTML5.
Cite Tag
“Code is poetry.” —Automattic
Code Tag
You will learn later on in these tests that word-wrap: break-word;
will be your best friend.
Keyboard Tag
This scarcely known tag emulates keyboard text, which is usually styled like the
tag.
Preformatted Tag
This tag styles large blocks of code.
.post-title { margin: 0 0 5px; font-weight: bold; font-size: 38px; line-height: 1.2; }
Quote Tag
Developers, developers, developers…
–Steve Ballmer
Strong Tag
This tag shows bold text.
Subscript Tag
Getting our science styling on with H2O, which should push the “2” down.
Superscript Tag
Still sticking with science and Isaac Newton’s E = MC2, which should lift the 2 up.
Teletype Tag
This rarely used tag emulates teletype text, which is usually styled like the
tag.
Variable Tag
This allows you to denote variables.
Images
Fluid image
Image thumbnails and alignments
Image horizontal centered
figure with caption
Caption right alignment
media element
Media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.Right aligment


Very good question! They're cookies made into the shape of a salmon, and actually made with salmon (though the fish is ground up so fine that you can't even taste it!) They are the ideal match for a steaming cup of coffee on a gray Seattle morning. Or gray Seattle afternoon... whatever.


*ObjIdx
- Holds an
idx
tree of objects
created by obj
.
*Once
- Holds an
idx
tree of already
load
ed source locations (as returned
by file
) See also once
.
: *Once
-> (("lib/" "misc.l" . 11) (("lib/" "http.l" . 9) (("lib/" "form.l" . 11))))
*OS
- A global constant holding the name of the operating system. Possible values
include
"Linux"
, "Android"
, "FreeBSD"
,
"OpenBSD"
, "SunOS"
, "Darwin"
or
"Cygwin"
. See also *CPU
and version
.
: *OS
-> "Linux"
(obj (typ sym [hook] val ..) [var1 val1 ..]) -> obj
(obj typ any [var1 val1 ..]) -> obj
- Finds or creates a database object, and initializes additional properties
using the
varN
and valN
arguments. In the first form,
a request
for (typ sym [hook]
val ..)
is called, while the second form uses cache
to maintain objects without unique
+Key
s by indexing *ObjIdx
with the any
argument.
: (obj ((+Item) nr 2) nm "Spare Part" sup `(db 'nr '+CuSu 2) inv 100 pr 1250)
-> {3-2}
(object 'sym 'any ['sym2 'any2 ..]) -> obj
- Defines
sym
to be an object with the value (or type)
any
. The property list is initialized with all optionally supplied
key-value pairs. See also OO Concepts, new
, type
and isa
.
: (object 'Obj '(+A +B +C) 'a 1 'b 2 'c 3)
-> Obj
: (show 'Obj)
Obj (+A +B +C)
c 3
b 2
a 1
-> Obj
(oct 'num ['num]) -> sym
(oct 'sym) -> num
- Converts a number
num
to an octal string, or an octal string
sym
to a number. In the first case, if the second argument is
given, the result is separated by spaces into groups of such many digits. See
also bin
, hex
, fmt64
, hax
and format
.
: (oct 73)
-> "111"
: (oct "111")
-> 73
: (oct 1234567 3)
-> "4 553 207"
(off var ..) -> NIL
- Stores
NIL
in all var
arguments. See also on
, onOff
, zero
and one
.
: (off A B)
-> NIL
: A
-> NIL
: B
-> NIL
(offset 'lst1 'lst2) -> cnt | NIL
- Returns the
cnt
position of the tail list lst1
in
lst2
, or NIL
if it is not found. See also index
, sub?
and tail
.
: (offset '(c d e f) '(a b c d e f))
-> 3
: (offset '(c d e) '(a b c d e f))
-> NIL
(on var ..) -> T
- Stores
T
in all var
arguments. See also off
, onOff
, zero
and one
.
: (on A B)
-> T
: A
-> T
: B
-> T
(once . prg) -> any
- Executes
prg
once, when the current file is load
ed the first time. Subsequent loads at a
later time will not execute prg
, and once
returns
NIL
. See also *Once
.
(once
(zero *Cnt1 *Cnt2) # Init counters
(load "file1.l" "file2.l") ) # Load other files
`(once T) # Ignore next time the rest of this file
(one var ..) -> 1
- Stores
1
in all var
arguments. See also zero
, on
, off
and onOff
.
: (one A B)
-> 1
: A
-> 1
: B
-> 1
(onOff var ..) -> flg
- Logically negates the values of all
var
arguments. Returns the
new value of the last symbol. See also on
, off
,
zero
and one
.
: (onOff A B)
-> T
: A
-> T
: B
-> T
: (onOff A B)
-> NIL
: A
-> NIL
: B
-> NIL
(open 'any ['flg]) -> cnt | NIL
- Opens the file with the name
any
in read/write mode (or
read-only if flg
is non-NIL
), and returns a file
descriptor cnt
(or NIL
on error). A leading
"@
" character in any
is substituted with the
PicoLisp Home Directory, as it was remembered during interpreter startup.
If flg
is NIL
and the file does not exist, it is
created. The file descriptor can be used in subsequent calls to in
and out
. See also close
and poll
.
: (open "x")
-> 3
(opid) -> pid | NIL
- Returns the corresponding process ID when the current output channel is
writing to a pipe, otherwise
NIL
. See also ipid
and out
.
: (out '(cat) (call 'ps "-p" (opid)))
PID TTY TIME CMD
7127 pts/3 00:00:00 cat
-> T
(opt) -> sym
- Return the next command line argument ("option", as would be processed by
load
) as a string, and remove it from
the remaining command line arguments. See also Invocation and argv
.
$ pil -"de f () (println 'opt (opt))" -f abc -bye
opt "abc"
(or 'any ..) -> any
- Logical OR. The expressions
any
are evaluated from left to
right. If a non-NIL
value is encountered, it is returned
immediately. Else the result of the last expression is returned. See also
nor
, and
and unless
.
: (or (= 3 3) (read))
-> T
: (or (= 3 4) (read))
abc
-> abc
or/2
- Pilog predicate that takes an arbitrary number
of clauses, and succeeds if one of them can be proven. See also
not/1
.
: (?
(or
((equal 3 @X) (equal @X 4))
((equal 7 @X) (equal @X 7)) ) )
@X=7
-> NIL
(out 'any . prg) -> any
- Opens
any
as output channel during the execution of
prg
. The current output channel will be saved and restored
appropriately. If the argument is NIL
, standard output is used. If
the argument is a symbol, it is used as a file name (opened in "append" mode if
the first character is "+
"). If it is a positive number, it is used
as the descriptor of an open file. If it is a negative number, the saved output
channel such many levels above the current one is used. Otherwise (if it is a
list), it is taken as a command with arguments, and a pipe is opened for output.
The (system dependent) exit status code of the child process is stored in the
global variable @@
. In all cases,
flush
is called when prg
is done. See also opid
, call
, in
, err
, ctl
, pipe
, poll
, close
and load
.
: (out "a" (println 123 '(a b c) 'def)) # Write one line to file "a"
-> def
: (out '(lpr) (prinl "Hello")) # Send line to line printer
-> "Hello"


mlpack is a community-led effort, and so the code is not possible without the community. Since mlpack is an open-source project, anyone is welcome to become a part of the community and contribute. There is no need to be a machine learning expert to participate—often, there are many tasks to be done that don't require in-depth knowledge.
Over the past several years, mlpack has participated in Google Summer of Code. For more information, see this page →.
All mlpack development is done on GitHub. In addition to that, there are a few channels of communication:
Everyone is welcome to contribute to mlpack. But before becoming a contributor, it's often useful to understand mlpack as a user. So, a good place to start is to download mlpack and use the Python bindings, Julia bindings or the command-line programs to perform machine learning tasks. You can also write C++ programs to perform machine learning tasks with mlpack; the examples repository has many examples.
Once you have an idea of what's included in mlpack and how a user might use it, then a good next step would be to set up a development environment. Once you have that set up, you can build mlpack from source and explore the codebase to see how it's organized. It may even be useful to try and make small changes to the code, then rebuild the command-line programs and see what your changes did.
Now you're set up to contribute! There are lots of ways you can contribute. Here are a couple ideas:
• Help others figure out their mlpack issues and questions. Here is a list of Github issues tagged question. Helping others figure out their problems is really one of the best ways to learn about the library.
• Read through the vision document to learn about the development goals of the mlpack community and see the high-level tasks that need to be done to accomplish that vision.
• Find an issue that needs implementation help; here is a list of Github issues tagged help wanted ; and here is a list of Github issues tagged good first issue . Once you open a PR that passes all the continuous integration tests, the community will review it and get it merged into the codebase.
• Find an abandoned pull request; here is a list of pull requests that were closed for inactivity. Often these have comments that need to be addressed, but the original author didn't have time to finish the work. So, you can pick up where they left off!
• Implement a new machine learning algorithm that mlpack doesn't currently have.
• Take a look at the ideas on the Google Summer of Code Ideas List and see if you find any of them interesting or exciting. Even if you're not planning to do Summer of Code, it's okay to take these ideas and implement them separately.
• Do some timing on an existing machine learning algorithm implemented by mlpack, and try to make it faster.
• If you find a bug or have a problem, open an issue for it—issue templates are provided to make reporting easier.
Two mailing lists are used for mlpack discussion and development:
• For email discussion and announcements: mlpack mailing list →
• Which sends emails for all mlpack-related activity: mlpack-git mailing list →
The mlpack community stays in touch in real-time via several chat services that are all linked together thanks to the Matrix project. You can choose any of the services below and will be able to communicate with anyone who is using any of the other services (assuming that the inter-service bridges are correctly operating).
IRC via libera.chat: #mlpack; you can use webchat (the link) and specify the channel #mlpack, or set up an account on libera.chat and use a client of your choice.
Matrix: #mlpack:matrix.org; you will need to set up a matrix.org account and use a client such as Riot or others.
mlpack.slack.com; in order to create an account, you'll need to use the auto-inviter to send yourself an invite: slack-inviter.mlpack.org:4000.
Discussions in the chat channel are logged using whitequark's graciously provided irc logger.
On the first and third Friday of every month, at 1700 UTC on Fridays, we have casual video meetups with no particular agenda. Feel free to join up! We often talk about code changes that we are working on, issues people are having with mlpack, general design direction, and whatever else might be on our mind. We use this Zoom room. For security, we use a password for the meeting to keep malicious bots out; the password is simple---it's just the name of the library (in all lowercase).
Blog for mlpack development and updates and blog posts. Read More →
Organizations that have supported mlpack's development or currently support it.
mlpack is fiscally sponsored by NumFOCUS.
Over the past several years, mlpack has participated in Google Summer of Code.
Originally, mlpack was produced by the FASTLab at Georgia Tech.
Developer Ryan Curtin received partial support to work on mlpack at Symantec.
Developer Ryan Curtin received partial support to work on mlpack in 2015 from the US National Science Foundation (NSF) under Award 1339745 (SI2-SSI: The XScala Project).
Developer Marcus Edel received partial support to work on mlpack at Free University of Berlin.
Below is a list of contributors to mlpack. Without their hard work, this software would not be possible.
Dongryeol Lee
James Cline
Neil Slagle
Noah Kauffman
Patrick Mason
Michael Fox
Saheb Motiani
Vahab Akbarzadeh
QiaoAn Chen
Pavel Zhigulin
Ivari Horm
Palash Ahuja
Mikhail Lozhnikov
Nilay Jain
Ivan Georgiev
Dinesh Raj
Lakshya Agrawal
Abhinav Moudgil
Nishanth Hegde
Franciszek Stokowacki
Kartik Nighania
Dirk Eddelbuettel
Haritha Sreedharan Nair
Nikhil Goel
Atharva Khandait
Prabhat Sharma
Manthan-R-Sheth
Thanasis Mattas
German Lancioni
Tommi Laivamaa
Toshal Agrawal
Bishwa Karki
Heet Sankesara
Khizir Siddiqui
Ziyang Jiang
Kartik Dutt
Saraansh Tandon
Bisakh Mondal
Aakash Kaushik
Rishabh Garg
Gaurav Ghati
Mark Fischinger
Suvarsha Chennareddy
Zhuojin Liu
Manoranjan Kumar Bharti ( Nakul Bharti )
Saraansh Tandon
Gaurav Singh
Lakshya Ojha
Bisakh Mondal
Gaurav Ghati
Anmolpreet Singh
Anjishnu Mukherjee
Shubham Agrawal
James Joseph Balamuta
Sri Madhan M
Sterling Peet
Ajinkya Kale
Rajendran Mohan
Mudit Raj Gupta
Yash Vadalia
Andrew Wells
Hritik Jain
Janzen Brewer
Grzegorz Krajewski
Andy Fang
Dhawal Arora
Yannis Mentekidis
Marcos Pividori
Peter Lehner
Shikhar Bhardwaj
Sudhanshu Ranjan
Vivek Pal
Praveen Ch
Thyrix Yang
Parminder Singh
Samikshya Chand
Eugene Freyman
Sourabh Varshney
Shikhar Jaiswal
Wenhao Huang
Tan Jun An
Namrata Mukhija
Shashank Shekhar
Arash Abghari
Kim SangYeon
Dan Timson
Mehul Kumar Nirala
Jeffin Sam
Tejasvi Tomar
Sriram S K
Gaurav Singh
Benson Muite
Anush Kini
Sudhakar Brar
Anmolpreet Singh
Muhammad Fawwaz Mayda
Shubham Agrawal
Ziyang Jiang
Suryoday Basak
Sriram S K
Benson Muite
Sarthak Bhardwaj
Aakash Kaushik
Anush Kini
Omar Shrit
Tru Hoang
Mark Fischinger
Zhuojin Liu
Richèl Bilderbeek
Bill March
Matthew Amidon
Trironk Kiatkungwanglai
Sumedh Ghaisas
Siddharth Agrawal
Abhishek Laddha
Zhihao Lou
Jaskaran Singh
Vladimir Glazachev
Trung Dinh
Joseph Mariadassou
Barak Pearlmutter
Alexander Leinoff
Ranjan Mondal
Anuraj Kanodia
Yashu Seth
Piyush Jaiswal
Prasanna Patil
Kirill Mishchenko
Sagar B Hathwar
N Rajiv Vaidyanathan
Manish Kumar
Projyal Dev
B Kartheek Reddy
Moksh Jain
Yasmine Dumouchel
Ayush Chamoli
Niteya Shah
Miguel Canteras
Yashwant Singh Parihar
Vikas S Shetty
Jai Agarwal
Aditya Viki
Manoranjan Kumar Bharti
Lakshya Ojha
Sarthak Bhardwaj
Nippun Sharma
Alex Nguyen
Tru Hoang
Roshan Nrusing Swain
Sri Madhan M
Rohit Kartik
Aditya Viki
Kartik Dutt
Nippun Sharma
Rishabh Garg
Sudhakar Brar
Alex Nguyen
Muhammad Fawwaz Mayda
Roshan Nrusing Swain
Suvarsha Chennareddy
Chetan Pandey
© 2007 - 2022 mlpack developers (BSD License).
Home • Quick Start • Documentation • Community • FAQ • GitHub


I had done drugs before, but they were cocaine and speed. Total opposite of what I was about to do. A 'friend' offered to get me loaded to repay a favor that I did for him. Well, I had heard so much about this stuff that I just couldn't refuse. So, I said I'd do it, and I also signed away some of my future. Although I didn't realize it at the time, this experience changed something in me.
Herion, when you cook it in preperation to shoot it, smells aweful. It reminds me rotten vinegar.   Really good herion will be almost black and non-transparent in the syringe.
After smelling it and looking at this disgusting stuff, I was a little tempted to back out of this deal. I so wish I still could back out. Anyway, I decided to not be a wussy, and just do it. Watching that brown ugly liquid flow in to my vein was one thing I'll never forget.
 It made me want to puke the first time. After awhile of doing it, my stomach will get used to that, and it didn't bother me so much.
After the initial rush, I got kind of warm. and really itchy.  Sometimes, if I get really loaded, or mix heroin with presrciption drugs like valium, I'll nod. It's like being narcoleptic. I just couldn't help falling asleep all over the place. I'm really glad I didn't try and drive anywhere that night.
Other than that, all I remember is I felt at peace with everything. I hadn't felt like that in so long, that I kept getting high on junk, and feeding that worm, even though I hated having to puke every other time I did it.
The worm is addiction, and no I didn't get addicted the first time I did it, but I began to build a foundation for it that never goes away. Herion withdrawls are the worst thing in the world, they are what make herion like oxygen or food to a junkie.

Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


USD/JPY trades in red below 108.50 as 10-year US T-bond yield erases more than 2%
by Eren Sengezer- Dismal market mood helps JPY find demand on Wednesday.
- 10-year US Treasury bond yield erases more than 2%.
- US Dollar Index recovers to 98 area ahead of FOMC minutes.
The USD/JPY pair came under renewed bearish pressure on Wednesday with the JPY attracting investors as a safe-haven amid the ongoing uncertainty surrounding the United States (US)-China trade dispute. As of writing, the pair was trading at 108.42, down 0.1% on a daily basis.
Risk-off flows keep the pair under pressure
The US Senate has approved the Hong Kong human rights bill on Tuesday to escalate the political tension with China as sides are trying to come to terms on the trade agreement. Additionally, a Reuters report earlier on Wednesday suggested that US President Donald Trump was asking for deep concessions from China in order to agree to tariff rollbacks. Moreover, Trump reiterated his willingness to raise tariffs if they fail to reach a deal.
The 10-year US Treasury bond yield on Tuesday closed 1.9% lower and extended its slide on Wednesday to reflect the sour sentiment. As of writing, the yield was losing 2.35% on a daily basis and Wall Street's main indexes' futures were in the negative territory to point to a weak start to the day.
On the other hand, the US Dollar Index staged a technical correction to the 98 region to keep the pair's losses limited for the time being. Later in the session, the Federal Open Market Committee's (FOMC) October meeting minutes will be looked upon for fresh impetus.
Technical levels to consider
USD/JPY
| Overview | |
|---|---|
| Today last price | 108.44 |
| Today Daily Change | -0.11 |
| Today Daily Change % | -0.10 |
| Today daily open | 108.55 |
| Trends | |
|---|---|
| Daily SMA20 | 108.77 |
| Daily SMA50 | 108.26 |
| Daily SMA100 | 107.7 |
| Daily SMA200 | 108.99 |
| Levels | |
|---|---|
| Previous Daily High | 108.84 |
| Previous Daily Low | 108.45 |
| Previous Weekly High | 109.3 |
| Previous Weekly Low | 108.23 |
| Previous Monthly High | 109.29 |
| Previous Monthly Low | 106.48 |
| Daily Fibonacci 38.2% | 108.6 |
| Daily Fibonacci 61.8% | 108.69 |
| Daily Pivot Point S1 | 108.39 |
| Daily Pivot Point S2 | 108.22 |
| Daily Pivot Point S3 | 108 |
| Daily Pivot Point R1 | 108.78 |
| Daily Pivot Point R2 | 109 |
| Daily Pivot Point R3 | 109.17 |


atm¶
Adding a classifier¶
The classifier must be a python class that has the following functions:
fit
: given training data and labels, learns the modelpredict
: given data sample(s), predicts the label(s)
In atm/mapping.py
, enter the function in the LEARNER_CODE_CLASS_MAP
variable and the classifier enumerator (see below) in the ENUMERATOR_CODE_CLASS_MAP
variable.
Decide a code for the classifier (e.g., classify_knn) and enter this in the __init__.py
file in atm/enumeration/classification
.
Create an Enumerator for the classifier in the atm/enumeration/classification
folder.
In this file:
- define the ranges of the parameters in a variable called
DEFAULT_RANGES
- define the parameter types (int, float, etc.) in a variable called
DEFAULT_KEYS
- define the Conditional Parameter Tree (CPT) in a function called
create_cpt
from atm.cpt import Choice, Combination
from atm.enumeration import Enumerator
from atm.enumeration.classification import ClassifierEnumerator
from atm.key import Key, KeyStruct
import numpy as np
class EnumeratorExample(ClassifierEnumerator):
DEFAULT_RANGES = {
"param_int" : (a, b),
"param_categorical" : ('category1', 'category2'),
"param_float" : (c, d),
}
DEFAULT_KEYS = {
# KeyStruct(range, key_type, is_categorical)
"param_int" : KeyStruct(DEFAULT_RANGES["param_int"], Key.TYPE_INT, False),
"param_categorical" : KeyStruct(DEFAULT_RANGES["param_categorical"], Key.TYPE_STRING, True),
"param_float" : KeyStruct(DEFAULT_RANGES["param_float"], Key.TYPE_FLOAT, False),
}
def __init__(self, ranges=None, keys=None):
super(EnumeratorExample, self).__init__(
ranges or EnumeratorExample.DEFAULT_RANGES, keys or EnumeratorExample.DEFAULT_KEYS)
self.code = ClassifierEnumerator.Example
self.create_cpt()
def create_cpt(self):
param_int = Choice("param_int", self.ranges["param_int"])
param_categorical = Choice("param_categorical", self.ranges["param_categorical"])
param_float = Choice("param_float", self.ranges["param_float"])
# if param_categorical==A, then param_float is active
param_categorical.add_condition('A', [param_float])
example = Combination([param_int, param_categorical])
exampleroot = Choice("function", ["classify_code"])
exampleroot.add_condition("classify_code", [example])
self.root = exampleroot
Since sklearn uses consistent framework across classifiers (fit, predict, etc.), atm creates a pipeline with the classifier and uses the sklearn standard framework to learn the classifier and make predictions.
Adding a Parameter Selector¶
A parameter selector can be created by creating a class which inherits the SamplesSelector
class.
The class must have a select
function which returns the chose parameters.
A few examples which use a Gaussian Process to choose parameters is shown below.
from __future__ import division
from atm.selection.samples import *
from atm.utilities import *
from atm.database import *
from sklearn.gaussian_process import GaussianProcess
import numpy as np
import time, traceback
from atm.selection.acquisition import expected_improvement
from atm.selection.samples.uniform import UniformSampler
class GPEi(SamplesSelector):
def __init__(self, **kwargs):
"""
Needs:
frozen_set, learners, metric, best_y
"""
super(GPEi, self).__init__(**kwargs)
def select(self):
"""
Takes in learner objects from database that
have been completed.
"""
past_params = []
learners = GetLearnersInFrozen(self.frozen_set.id)
learners = [x for x in learners if x.completed]
for learner in learners:
y = float(getattr(learner, self.metric))
past_params.append((learner.params, y))
return self.do_selection(past_params)
def do_selection(self, past_params):
"""
Based on past parameterizations and their performances,
select a best candidate for evaluation by randomly generating
many examples and seeing which has the highest average expected
regression value.
Example format:
past_params = [
({...}, y1),
({...}, y2),
...
]
"""
# etract parameters and performances
params = [x[0] for x in past_params]
y = np.array([x[1] for x in past_params])
X = ParamsToVectors(params, self.frozen_set.optimizables)
# train a GP
gp = GaussianProcess(theta0=1e-2, thetaL=1e-4, thetaU=1e-1, nugget=np.finfo(np.double).eps * 1000)
gp.fit(X, y)
# randomly generate many vectors
candidates = GenerateRandomVectors(1000, self.frozen_set.optimizables)
ys, stdevs = gp.predict(candidates, eval_MSE=True)
predictions = zip(ys, stdevs)
predictions = [expected_improvement(y, self.best_y, stdev) for (y, stdev) in predictions]
#print "PREDICTIONS", np.unique(predictions)
# choose one with highest average, convert, and return
chosen = candidates[np.argmax(predictions)]
return VectorBackToParams(chosen, self.frozen_set.optimizables, self.frozen_set.frozens, self.frozen_set.constants)
class GPEiTime(SamplesSelector):
def __init__(self, **kwargs):
"""
Needs:
frozen_set, metric, best_y
"""
super(GPEiTime, self).__init__(**kwargs)
def select(self):
"""
Takes in learner objects from database that
have been completed.
"""
past_params = []
learners = GetLearnersInFrozen(self.frozen_set.id)
learners = [x for x in learners if x.completed]
for learner in learners:
y = float(getattr(learner, self.metric))
elapsed = (learner.completed - learner.started).total_seconds()
if elapsed <= 0:
elapsed = 1.0
past_params.append((learner.params, y / elapsed))
return self.do_selection(past_params)
def do_selection(self, past_params):
"""
Based on past parameterizations and their performances,
select a best candidate for evaluation by randomly generating
many examples and seeing which has the highest average expected
regression value.
The value to train on is EI divided by time for expected improvement
per unit time.
Example format:
past_params = [
({...}, y1),
({...}, y2),
...
]
"""
# etract parameters and performances
params = [x[0] for x in past_params]
y = np.array([x[1] for x in past_params])
X = ParamsToVectors(params, self.frozen_set.optimizables)
# train a GP
gp = GaussianProcess(theta0=1e-2, thetaL=1e-4, thetaU=1e-1, nugget=np.finfo(np.double).eps * 1000)
gp.fit(X, y)
# randomly generate many vectors
candidates = GenerateRandomVectors(1000, self.frozen_set.optimizables)
ys, stdevs = gp.predict(candidates, eval_MSE=True)
predictions = zip(ys, stdevs)
predictions = [expected_improvement(y, self.best_y, stdev) for (y, stdev) in predictions]
# choose one with highest average, convert, and return
chosen = candidates[np.argmax(predictions)]
return VectorBackToParams(chosen, self.frozen_set.optimizables, self.frozen_set.frozens, self.frozen_set.constants)
class GPEiVelocity(SamplesSelector):
MULTIPLIER = -100
LIMIT = 5
def __init__(self, **kwargs):
"""
Needs:
frozen_set, learners, metric, best_y, velocity
"""
super(GPEiVelocity, self).__init__(**kwargs)
def select(self):
"""
Takes in learner objects from database that
have been completed.
"""
# calculate average velocity over the k window
session = None
probability_of_random = 0.1
try:
session = Session()
learners = session.query(Learner).\
filter(Learner.frozen_set_id == self.frozen_set.id).\
order_by(Learner.cv.desc()).\
limit(GPEiVelocity.LIMIT).all()
learners = learners[::-1]
################## hardcoded CV avg acc ##############!!!!!
scores = [float(x.cv) for x in learners]
print "GpEI scores in order increasing: %s" % scores
vels = []
for i in range(1, len(scores), 1):
vels.append(scores[i] - scores[i - 1])
print "Velocities", vels
if vels:
probability_of_random = np.exp(GPEiVelocity.MULTIPLIER * np.mean(vels))
except Exception as e:
print traceback.format_exc()
finally:
session.close()
print "Probability of random: %f" % probability_of_random
# now select a sample
sampler = None
if np.random.random() < probability_of_random:
# our forward progress in this frozen set has stalled, let's
# introduce some randomness
print "Choosing random so as to not stagnate!"
sampler = UniformSampler(frozen_set=self.frozen_set)
# otherwise continue with ei + time as intended
else:
sampler = GPEi(frozen_set=self.frozen_set,
metric=self.metric, best_y=self.best_y)
return sampler.select()
Changing the Acquisition Function¶
The Gaussian Process Expected Improvement selection scheme makes use of an acquisition function to decide which parameter set will offer the best performance improvement.
The current acquisition function (seen below) makes use of the predicted performance and the confidence of the performance to create a new metric for deciding which parameter set will likely offer the best performance.
This metric can be altered depending on the needs of a particular problem in the acquisition.py
file in the atm/selection
folder.
from __future__ import division
import numpy as np
from scipy.stats import norm
standard_normal = norm()
def expected_improvement(y_est, y_best, stddev):
"""
Expected improvement criterion:
http://people.seas.harvard.edu/~jsnoek/nips2013transfer.pdf
y_est = what the GP estimates the value of y will be
y_best = single best y seen
stddev = uncertainty of the GP's prediction
"""
z_score = (y_best - y_est) / stddev
ei = stddev * (z_score * standard_normal.cdf(z_score) + standard_normal.pdf(z_score))
return ei
Adding a Frozens (Hyperpartition) Selector¶
A parameter selector can be created by creating a class which inherits the FrozenSelector
class.
The class must have a select
function which returns the chose parameters.
An example which uses the UCB1 algorithm to choose the hyperpartition is shown below.
from atm.selection.frozens import FrozenSelector
from atm.selection.bandit import UCB1Bandit, FrozenArm
import math, random
class UCB1(FrozenSelector):
def __init__(self, **kwargs):
"""
Needs:
frozen_sets
"""
super(UCB1, self).__init__(**kwargs)
def select(self):
"""
Selects the arm which has the highest score
as determined by UCB1 bandit algorithm.
majority is the percentage of the dataset that is
the minority, representing the baseline.
"""
arms = []
total_count = 0
total_rewards = 0.0
for fset in self.frozen_sets:
count = fset.trained
rewards = float(fset.rewards)
total_rewards += rewards
total_count += fset.trained
arm = FrozenArm(count, rewards, fset.id)
arms.append(arm)
random.shuffle(arms) # so arms are not picked in ordinal ID order
bandit = UCB1Bandit(arms, total_count, total_rewards)
return bandit.score_arms()


All Files (94.63% covered at 2.21 hits/line)
53 files in total.
671 relevant lines.
635 lines covered and
36 lines missed
- 3
class ApplicationController < ActionController::Base
- 3
protect_from_forgery
end
- 3
class DatauploadsController < ApplicationController
- 3
before_filter :verify_ownership
- 3
def destroy
- 1
@upload = Upload.find(params[:dataupload_id])
- 1
@record =<EMAIL_ADDRESS>- 1
@upload.destroy
- 1
redirect_to<EMAIL_ADDRESS>end
- 3
def verify_ownership
- 2
@user = User.find_by_id(session[:user_id])
- 2
@record = Record.find_by_id(params[:id])
- 2
if<EMAIL_ADDRESS>&&<EMAIL_ADDRESS>- 2
if @record.user_id != @user.id
- 1
redirect_to "/records"
end
end
end
end
- 3
class LoginController < ApplicationController
- 3
def login
- 22
user = User.find_by_external_id(request.headers[DATASHARE_CONFIG['external_identifier']])
- 22
if user.nil?
- 1
user = User.new
- 1
user.external_id = request.headers[DATASHARE_CONFIG['external_identifier']]
- 1
user.save
end
- 22
session[:user_id] = user.id
- 22
redirect_to "/records"
end
- 3
def logout
- 1
reset_session
- 1
redirect_to DATASHARE_CONFIG['logout_path']
end
# login and logout pages aren't used in prod
# shib will protect the directory
# these methods are available for runnign theapp
# in dev without shib or another authentication system
- 3
def login_page
end
- 3
def logout_page
- 1
render :layout => false
end
end
- 3
class RecordsController < ApplicationController
- 3
before_filter :verify_ownership
- 3
def index
- 30
@user = User.find_by_id(session[:user_id])
- 30
@records = Record.find_all_by_user_id(session[:user_id])
end
- 3
def record
- 18
@user = User.find(session[:user_id])
- 18
if(params[:id])
- 9
@record = Record.find(params[:id])
else
- 9
@record = Record.new
- 9
@record.user_id = session[:user_id]
- 9
@record.set_local_id
- 9
@record.save
- 9
@record.create_record_directory
end
end
- 3
def update_record
- 6
@record = Record.find(params[:id])
- 6
@record.title = params[:title]
- 6
@record.publisher = params[:publisher]
- 6
@record.publicationyear = params[:publicationyear]
- 6
@record.resourcetype = params[:resourcetype]
- 6
@record.rights = params[:rights]
- 6
@record.abstract = params[:abstract]
- 6
@record.methods = params[:methods]
- 6
@record.save
- 6
if !params[:creator_name].empty?
- 2
creator = Creator.new
- 2
creator.creatorName = params[:creator_name]
- 2
creator.record_id = @record.id
- 2
creator.save
end
- 6
if !params[:contributor_name].empty?
# no duplicate contributor names
- 6
if !@record.contributors.pluck(:contributorName).include? params[:contributor_name]
- 6
contributor = Contributor.new
- 6
contributor.contributorName = params[:contributor_name]
- 6
contributor.contributorType = params[:contributor_type]
- 6
contributor.record_id = @record.id
- 6
contributor.save
end
end
- 6
if !params[:subject_name].empty?
- 3
subjects = params[:subject_name].split(",")
- 3
subjects.each do |s|
- 5
subject = Subject.new
- 5
subject.subjectName = s
#scheme is optional and open, not currently used
#subject.subjectScheme = params[:subject_scheme]
- 5
subject.record_id = @record.id
- 5
subject.save
end
end
- 6
if !params[:citation].empty?
- 2
description = Description.new
- 2
description.descriptionText = params[:citation]
#scheme is optional and open, not currently used
#subject.subjectScheme = params[:subject_scheme]
- 2
description.record_id = @record.id
- 2
description.save
end
- 6
if params[:add_data] == "add_data"
render :js => "window.location =<EMAIL_ADDRESS>else
- 6
redirect_to :action => "record", :id=> @record.id
end
end
- 3
def delete
- 1
@record = Record.find(params[:id])
# because we don't have separate controllers, we have to
# do this manually rather than rely on cascade approaches
# in the model
- 1
Creator.delete_all(:record_id => @record.id)
- 1
Contributor.delete_all(:record_id => @record.id)
- 1
Subject.delete_all(:record_id => @record.id)
- 1
Upload.delete_all(:record_id => @record.id)
- 1
Description.delete_all(:record_id => @record.id)
- 1
SubmissionLog.delete_all(:record_id => @record.id)
- 1
file_path =<EMAIL_ADDRESS>- 1
if File.exists?("#{file_path}")
FileUtils.rm_rf("#{file_path}")
end
- 1
@record.delete
- 1
redirect_to "/records"
end
- 3
def delete_creator
- 1
@creator = Creator.find(params[:creator_id])
- 1
@record = @creator.record
- 1
@creator.delete
- 1
redirect_to :action => "record", :id=> @record.id, :anchor => "creator"
end
# currently this is hard wired into the app, only one contributor per record
# no need for 1:n delete, but leaving the code in if we make this change later
#def delete_contributor
# contributor = Contributor.find(params[:contributor_id])
# @record = contributor.record
# contributor.delete
# redirect_to :action => "record", :id=> @record.id, :anchor => "contributor"
#end
- 3
def delete_description
- 1
description = Description.find(params[:description_id])
- 1
@record = description.record
- 1
description.delete
- 1
redirect_to :action => "record", :id=> @record.id, :anchor => "description"
end
- 3
def delete_subject
- 1
subject = Subject.find(params[:subject_id])
- 1
@record = subject.record
- 1
subject.delete
- 1
redirect_to :action => "record", :id=> @record.id, :anchor => "subject"
end
- 3
def review
- 1
@record = Record.find(params[:id])
- 1
@xmlout = @record.review
- 1
render :review, :layout => false
end
- 3
def send_archive_to_merritt
- 1
@record = Record.find(params[:id])
- 1
if<EMAIL_ADDRESS>redirect_to :action => "review", :id => @record.id
else
- 1
@merritt_response = "PROCESSING"
# processing of large files can take a long time
# so we will handle this in a separate thread
- 1
Thread.new do
- 1
@record.generate_merritt_zip
- 1
@merritt_request = @record.send_archive_to_merritt
- 1
@merritt_response = `#{@merritt_request}`
- 1
submissionLog = SubmissionLog.new
- 1
submissionLog.archiveresponse = @merritt_response
- 1
submissionLog.record = @record
- 1
submissionLog.save
# if the submission was successful, remove the files from local
# storage and add logging information
if !(submissionLog.filtered_response == "Failed")
@record.purge_files(submissionLog.id)
end
ActiveRecord::Base.connection.close
end
- 1
sleep(5)
- 1
submissionLog = SubmissionLog.new
# if it has taken more than 5 seconds to process, we will create an intermediary
# entry to inform the user that the upload is still processing
# this message will appear when the user is forwarded to the submission log page
- 1
if @merritt_response == "PROCESSING"
submissionLog.archiveresponse = @merritt_response
submissionLog.record = @record
submissionLog.save
end
- 1
redirect_to :action => "submission_log", :id=> @record.id
end
end
- 3
def verify_ownership
- 63
@user = User.find_by_id(session[:user_id])
- 63
@record = Record.find_by_id(params[:id])
- 63
if<EMAIL_ADDRESS>&&<EMAIL_ADDRESS>- 24
if @record.user_id != @user.id
- 1
redirect_to "/records"
end
end
end
- 3
def submission_log
- 2
@record = Record.find_by_id(params[:id])
end
- 3
def terms_of_use
end
- 3
def prepare_to_submit
end
- 3
def upload_faq_page
end
- 3
def metadata_basics
end
- 3
def steps_to_publish
end
- 3
def data_use_agreement
end
end
- 3
class UploadsController < ApplicationController
- 3
def index
#@uploads = Upload.all
- 5
@uploads = Upload.find_all_by_record_id(params[:record_id])
- 5
@record_id = params[:record_id]
- 5
@user = User.find_by_id(session[:user_id])
- 5
@record = Record.find_by_id(params[:record_id])
- 5
if @record.nil?
- 1
redirect_to "/records"
- 4
elsif @record.user_id != @user.id
- 1
redirect_to "/records"
else
- 3
if @record_id == nil
raise ActionController::RoutingError.new('Not Found')
else
- 3
respond_to do |format|
- 3
format.html # index.html.erb
- 3
format.json { render json: @uploads.map{|upload| upload.to_jq_upload } }
end
end
end
end
# POST /uploads
# POST /uploads.json
- 3
def create
- 1
@temp_upload = Upload.new(params[:upload])
- 1
if @temp_upload.record.nil?
- 1
@temp_upload.record = Record.find(params[:record_id])
end
- 1
@upload = Upload.where(:record_id => @temp_upload.record_id, :upload_file_name => @temp_upload.upload_file_name).first
- 1
if @upload.nil?
@upload = Upload.create(params[:upload])
else
- 1
if @upload.upload_file_size.nil?
- 1
@upload.upload_file_size = @temp_upload.upload_file_size
else
@upload.upload_file_size += @temp_upload.upload_file_size
end
end
- 1
p = params[:upload]
- 1
name = p[:upload].original_filename
- 1
directory = "#{DATASHARE_CONFIG['uploads_dir']}/" + Record.find(@upload.record_id).local_id
- 1
path = File.join(directory, "temp_" + name.gsub(" ","_"))
- 2
File.open(path, "ab") { |f| f.write(p[:upload].read) }
# delete jquery, switch to temp
- 1
respond_to do |format|
- 1
if @upload.save
- 1
format.html {
render :json =><EMAIL_ADDRESS>:content_type => 'text/html',
- 1
:layout => false
}
- 1
format.json { render json: {files<EMAIL_ADDRESS>status: :created, location: @upload }
else
format.html { render action: "new" }
format.json { render json: @upload.errors, status: :unprocessable_entity }
end
end
end
# DELETE /uploads/1
# DELETE /uploads/1.json
# note - this is needed for javascript delete
# delete for existing server files is in datauploads_controller
- 3
def destroy
- 1
@upload = Upload.find(params[:id])
- 1
@upload.destroy
- 1
@user = User.find_by_id(session[:user_id])
- 1
@record = @upload.record
- 1
if @record.nil?
redirect_to "/records"
- 1
elsif @record.user_id != @user.id
redirect_to "/records"
else
- 1
respond_to do |format|
- 2
format.html { redirect_to uploads_url }
- 1
format.json { head :no_content }
end
end
end
end
- 3
module ApplicationHelper
end
- 3
module CreatorsHelper
end
- 3
module LoginHelper
end
- 3
module RecordHelper
end
- 3
module UploadsHelper
end
- 3
class AlternateIdentifier < ActiveRecord::Base
- 3
belongs_to :record
- 3
attr_accessible :alternateIdentifierName, :record_id, :AlternateIdentifierType
end
- 3
class Contributor < ActiveRecord::Base
- 3
belongs_to :record
- 3
attr_accessible :contributorName, :contributorType, :record_id
end
- 3
class Creator < ActiveRecord::Base
- 3
belongs_to :record
- 3
attr_accessible :creatorName
end
- 3
class Dataupload < ActiveRecord::Base
- 3
attr_accessible :image, :name, :record_id
- 3
mount_uploader :image, ImageUploader
- 3
before_create :default_name
- 3
belongs_to :record
- 3
def default_name
# if this is coming through the js version, we will need the name from the image.filename
if !image.filename.nil?
self.name ||= image.filename
end
end
end
- 3
class Description < ActiveRecord::Base
- 3
belongs_to :record
- 3
attr_accessible :descriptionText, :descriptionType, :record_id
end
- 3
require 'rubygems'
- 3
require 'zip/zip'
- 3
class Record < ActiveRecord::Base
- 3
has_many :creators
- 3
has_many :contributors
- 3
has_many :descriptions
- 3
has_many :subjects
- 3
has_many :alternateIdentifiers
- 3
has_many :datauploads
- 3
has_many :relations
- 3
has_many :submissionLogs
- 3
has_many :uploads
- 3
belongs_to :user
- 3
attr_accessible :identifier, :identifierType, :publicationyear, :publisher, :resourcetype, :rights, :title, :local_id
- 3
def set_local_id
- 99
self.local_id = (0...10).map{ ('a'..'z').to_a[rand(26)] }.join
end
- 3
def create_record_directory
- 9
FileUtils.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/#{self.local_id}")
end
- 3
def review
# can we define the character encoding at UTF without a byte recorder marker
# ANSI encoding right now
# note - for now, removing the tags to contain multiple XML entries. This produces invalid XML.
# however, it appears to be necessary for the XTF index to work properly.
- 3
f = File.new("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/#{self.local_id}/datacite.xml", "w:ASCII-8BIT")
- 3
f.puts "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
- 3
f.puts "<resource xmlns=\"http://datacite.org/schema/kernel-3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd\">"
# identifier - datacite: single, mandatory
# left empty because it will be set by EZID on the merritt side
- 3
f.puts "<identifier identifierType=\"DOI\"></identifier>"
# creators - datacite: multiple, mandatory
- 3
f.puts "<creators>"
- 9
self.creators.each { |a| f.puts "<creator><creatorName>#{a.creatorName.gsub(/\r/,"")}</creatorName></creator>"}
- 3
f.puts "</creators>"
# should we allow multiple titles? datacite does...
# we're only allowing one title per record
# titles - datacite: multiple, mandatory
# datacite - title has an option type attribute that we are not using
- 3
f.puts "<titles>"
- 3
f.puts "<title>#{self.title}</title>"
- 3
f.puts "</titles>"
# publisher - datacite: single, mandatory
- 3
f.puts "<publisher>#{self.publisher}</publisher>"
# publication year - datacite: single, mandatory
- 3
f.puts "<publicationYear>#{self.publicationyear}</publicationYear>"
# subjects - datacite: multiple, optional
- 3
f.puts "<subjects>"
# subject scheme is optional and open
#self.subjects.each { |a| f.puts "<subject subjectScheme=\"#{a.subjectScheme.gsub(/\r/,"")}\">#{a.subjectName.gsub(/\r/,"")}</subject>"}
# for now, just use the subject without a scheme
- 9
self.subjects.each { |a| f.puts "<subject>#{a.subjectName.gsub(/\r/,"")}</subject>"}
- 3
f.puts "</subjects>"
#contributors - datacite: multiple, optional, mandatory contributorType attribute
# do we have a default value for contributorType?
# is this something we plan to use?
- 3
f.puts "<contributors>"
#self.contributors.each { |a| f.puts "<contributor contributorType=\"#{a.contributorType}\"><contributorName>#{a.contributorName.gsub(/\r/,"")}</contributorName></contributor>"}
- 9
self.contributors.each { |a| f.puts "<contributor contributorType=\"ResearchGroup\"><contributorName>#{a.contributorName.gsub(/\r/,"")}</contributorName></contributor>"}
- 3
f.puts "</contributors>"
# resourceType - datacite: optional
# should have a resourceTypeGeneral and a resourceType, may need to modify this
#f.puts "<resourceType resourceTypeGeneral=\"#{self.resourcetype}\">#{self.resourcetype}</resourceType>"
- 3
f.puts "<resourceType resourceTypeGeneral=\"Dataset\">Dataset</resourceType>"
# alternate Identifiers - datacite: optional
# this will be the localID
#f.puts "<alternateIdentifiers>"
#self.alternateIdentifiers.each { |a| f.puts "<alternateIdentifier alternateIdentifierType=\"#{a.alternateIdentifierType}\">#{a.alternateIdentifierName}</alternateIdentifier>"}
#f.puts "</alternateIdentifiers>"
# relatedIdentifiers - datacite: optional, multiple
# going to use this for citations
# and then relations doesn't exist in the datacite schema
# is this valid without the relatedIdentifiersType?
# should I be using a different description for this? N
# not sure if this is a valid mapping...
#f.puts "<relatedIdentifiers>"
#self.relations.each { |a| f.puts "<relatedIdentifier>#{a.relationText.gsub(/\r/,"")}</relatedIdentifier>"}
#f.puts "</relatedIdentifiers>"
#<sizes>... this will be exported from merritt, but do we need it in the metadata?
# formats ?
# version?
#rights
#not required
#f.puts "<rights>#{self.rights}</rights>"
#descriptions
- 3
f.puts "<descriptions>"
# abstract
- 3
if !self.abstract.nil?
f.puts "<description descriptionType=\"Abstract\">#{CGI::escapeHTML(self.abstract.gsub(/\r/,""))}</description>"
end
#methods
- 3
if !self.methods.nil?
f.puts "<description descriptionType=\"Methods\">#{CGI::escapeHTML(self.methods.gsub(/\r/,""))}</description>"
end
# citation
- 9
self.descriptions.each { |a| f.puts "<description descriptionType=\"SeriesInformation\">#{CGI::escapeHTML(a.descriptionText.gsub(/\r/,""))}</description>" }
- 3
f.puts "</descriptions>"
- 3
f.puts "</resource>"
- 3
f.close
#return contents of file as string
- 3
File.open("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/#{self.local_id}/datacite.xml", "rb").read
end
- 3
def generate_merritt_zip
- 1
file_path = "#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/#{self.local_id}"
- 1
if File.exists?("#{file_path}/#{self.local_id}.zip")
File.delete("#{file_path}/#{self.local_id}.zip")
end
- 1
zipfile_name = "#{file_path}/#{self.local_id}.zip"
# target link and doi are generated by merritt
# they are included here only for testing
# uncomment if you need them in the archive (ie, if your repository does not supply these)
- 1
f = File.new("#{file_path}/target_link", "w")
- 1
f.puts "http://localhost:3000/download_merritt_file/#{self.local_id}.zip"
- 1
f.close
- 1
f = File.new("#{file_path}/doi", "w")
- 1
f.puts "doi:10.7272/Q6057CV6"
- 1
f.close
- 1
f = File.new("#{file_path}/mrt-datacite.xml", "wb")
- 1
f.puts self.review
- 1
f.close
- 1
Zip::ZipFile.open(zipfile_name, Zip::ZipFile::CREATE) do |zipfile|
- 1
zipfile.add("mrt-datacite.xml", "#{file_path}/mrt-datacite.xml")
- 1
self.uploads.each do |d|
# a temporary terrible hack to avoid the file corruption problem
# on chunked uploads
- 1
if File.exist?(file_path + "/temp_" + d.upload_file_name)
File.delete(file_path + "/" + d.upload_file_name)
File.rename(file_path + "/temp_" + d.upload_file_name, file_path + "/" + d.upload_file_name)
end
- 1
zipfile.add("#{d.upload_file_name}", "#{file_path}/#{d.upload_file_name}")
end
end
# clean up all temp files (again, required because of the glitch in chunked file uploads)
- 1
FileUtils.rm Dir[file_path + "/temp_*"]
end
# keep metadata records, but get rid of files that are no longer needed for local storate
# (storage is intended only until records are uploaded to merritt)
- 3
def purge_files(submission_log_id)
- 1
uploads = Upload.find_all_by_record_id(self.id)
# archive the file information for submission logs
- 1
uploads.each do |u|
- 1
upload_archive = UploadArchive.new
- 1
upload_archive.submission_log_id = submission_log_id
- 1
upload_archive.upload_file_name = u.upload_file_name
- 1
upload_archive.upload_file_size = u.upload_file_size
- 1
upload_archive.upload_content_type = u.upload_content_type
- 1
upload_archive.save
end
- 1
Upload.delete_all(:record_id => self.id)
- 1
file_path = "#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/#{self.local_id}"
# delete the files from local storage now that they have been submitted to merritt
- 1
if File.exists?("#{file_path}")
- 1
FileUtils.rm_rf Dir.glob("#{file_path}/*")
end
end
- 3
def send_archive_to_merritt
# tics will execute, for now, just print to screen
# note that the 2>&1 is to redirect sterr to stout
- 1
sys_output = "curl --insecure --verbose -u #{MERRITT_CONFIG['merritt_username']}:#{MERRITT_CONFIG['merritt_password']} -F<EMAIL_ADDRESS>-F \"type=container\" -F \"submitter=#{self.user.external_id}\" -F \"responseForm=xml\" -F \"profile=#{MERRITT_CONFIG['merritt_profile']}\" -F \"localIdentifier=#{self.local_id}\" #{MERRITT_CONFIG['merritt_endpoint']} 2>&1"
- 1
return sys_output
end
- 3
def required_fields
- 8
required_fields = Array.new
- 8
if self.creators.nil? || self.creators.empty?
- 5
required_fields << "Record must specify at least one creator"
end
# should we allow multiple titles? datacite does...
# we're only allowing one title per record
- 8
if self.title.nil? || self.title.blank?
- 5
required_fields << "Record must have a title"
end
# publisher - datacite: single, mandatory
- 8
if self.publisher.nil? || self.publisher.blank?
- 5
required_fields << "Record must have a publisher"
end
# publication year - datacite: single, mandatory
- 8
if self.publicationyear.nil?
- 5
required_fields << "Record must have a publication year"
end
#contributors - datacite: multiple, optional, mandatory contributorType attribute
# we will require contributors for datashare
- 8
if self.contributors.nil? || self.contributors.empty?
- 5
required_fields << "Record must specify at least one contributor"
end
- 8
return required_fields
end
- 3
def recommended_fields
- 2
recommended_fields = Array.new
# subjects - datacite: multiple, optional
- 2
if self.subjects.nil? || self.subjects.empty?
- 1
recommended_fields << "Subject data is strongly recommended. Your record may be ommitted from search and browse results withough a subject"
end
#descriptions
- 2
if self.abstract == "" || self.methods == ""
recommended_fields << "While not required, an abstract and technical description are strongly recommended."
end
- 2
return recommended_fields
end
end
- 3
class Relation < ActiveRecord::Base
- 3
belongs_to :record
- 3
attr_accessible :relationText
end
- 3
class Subject < ActiveRecord::Base
- 3
belongs_to :record
- 3
attr_accessible :subjectName, :subjectScheme
end
- 3
class SubmissionLog < ActiveRecord::Base
- 3
belongs_to :record
- 3
has_many :uploadArchives
- 3
attr_accessible :archiveresponse
- 3
def filtered_response
- 4
if !self.archiveresponse.nil?
- 4
if self.archiveresponse.include?("QUEUED") || self.archiveresponse.include?("PENDING")
return "Success: Record Uploaded to Datashare"
- 4
elsif self.archiveresponse.include?("PROCESSING")
return "Sending To Merritt (Processing)"
else
- 4
return "Failed"# + self.archiveresponse
end
end
end
end
- 3
class Upload < ActiveRecord::Base
- 3
belongs_to :record
- 3
before_create :default_name
- 3
attr_accessible :upload, :upload_file_size, :upload_content_type, :upload_file_name, :record_id
- 3
has_attached_file :upload, :path => :set_default_url_on_record_id
- 3
do_not_validate_attachment_file_type :upload
- 3
include Rails.application.routes.url_helpers
- 3
def to_jq_upload
{
"name" => read_attribute(:upload_file_name),
"size" => read_attribute(:upload_file_size),
"url" => upload.url(:original),
"delete_url" => upload_path(self),
"delete_type" => "DELETE"
- 1
}
end
- 3
def set_default_url_on_record_id
- 4
record = Record.find_by_id(self.record_id)
- 4
":rails_root/#{DATASHARE_CONFIG['uploads_dir']}/#{record.local_id}/#{self.upload_file_name}"
end
- 3
def default_name
# allow duplicate names, but append a timestamp to the names
# otherwise, the zip utility will throw an error on duplicate names
- 1
if self.record.uploads.pluck(:upload_file_name).include?(self.upload_file_name)
self.upload_file_name = self.upload_file_name + "_" + Time.now.utc.iso8601.gsub('-', '').gsub(':', '')
end
end
# delete all files more than a week old? (?)
# not currently used
- 3
def self.purge_old_files
puts "purging files"
uploads = Upload.where('created_at < ?', 1.week.ago)
# delete each uploads corresponding file, then delete the upload metadata from the db
uploads.each do |u|
file_path = "#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/#{u.record.local_id}"
if File.exists?("#{file_path}")
FileUtils.rm_rf Dir.glob("#{file_path}/*")
end
u.delete
end
redirect_to "/records"
end
end
- 3
class UploadArchive < ActiveRecord::Base
- 3
belongs_to :submissionLog
- 3
attr_accessible :submission_log_id, :upload_file_size, :upload_file_name, :upload_content_type
end
- 3
class User < ActiveRecord::Base
- 3
has_many :records
- 3
attr_accessible :external_id
end
# encoding: utf-8
- 3
class ImageUploader < CarrierWave::Uploader::Base
# Include the Sprockets helpers for Rails 3.1+ asset pipeline compatibility:
- 3
include Sprockets::Helpers::RailsHelper
- 3
include Sprockets::Helpers::IsolatedHelper
- 3
storage :file
- 3
def store_dir
"#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/#{model.record.local_id}"
end
#all are currently allowed
#def extension_white_list
# %w(jpg jpeg gif png tiff tif)
#end
end
- 3
require File.expand_path('../boot', __FILE__)
- 3
require 'rails/all'
- 3
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
- 3
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
- 3
module DataIngest
- 3
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Configure the default encoding used in templates for Ruby 1.9.
- 3
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
- 3
config.filter_parameters += [:password]
# Enable escaping HTML in JSON.
- 3
config.active_support.escape_html_entities_in_json = true
# Use SQL instead of Active Record's schema dumper when creating the database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Enforce whitelist mode for mass assignment.
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
- 3
config.active_record.whitelist_attributes = true
# Enable the asset pipeline
- 3
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
- 3
config.assets.version = '1.0'
end
end
- 3
require 'rubygems'
# Set up gems listed in the Gemfile.
- 3
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
- 3
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
# Load the rails application
- 3
require File.expand_path('../application', __FILE__)
# Initialize the rails application
- 3
DataIngest::Application.initialize!
- 3
MERRITT_CONFIG = YAML.load_file("#{Rails.root}/config/merritt.yml")[Rails.env]
- 3
DATASHARE_CONFIG = YAML.load_file("#{Rails.root}/config/datashare.yml")[Rails.env]
- 3
DataIngest::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
- 3
config.cache_classes = true
# Configure static asset server for tests with Cache-Control for performance
- 3
config.serve_static_assets = true
- 3
config.static_cache_control = "public, max-age=3600"
# Log error messages when you accidentally call methods on nil
- 3
config.whiny_nils = true
# Show full error reports and disable caching
- 3
config.consider_all_requests_local = true
- 3
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates
- 3
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment
- 3
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
- 3
config.action_mailer.delivery_method = :test
# Raise exception on mass assignment protection for Active Record models
# allow this to unit test file upload in test only
#config.active_record.mass_assignment_sanitizer = :strict
# Print deprecation notices to the stderr
- 3
config.active_support.deprecation = :stderr
end
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
#
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.acronym 'RESTful'
# end
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
- 3
DataIngest::Application.config.secret_token = '53799ea9a3d06ff292dc489c308943155ef18f4a6aaab7176c4b8fcfc123294e3ff69df9327c65d0c0021efe3feb8b57ce8c233802916f76ee13737fda04983c'
# Be sure to restart your server when you modify this file.
- 3
DataIngest::Application.config.session_store :cookie_store, key: '_jquery-fileupload-rails-example_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration")
# DataIngest::Application.config.session_store :active_record_store
# Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
- 3
ActiveSupport.on_load(:action_controller) do
- 3
wrap_parameters format: [:json]
end
# Disable root element in JSON by default.
- 3
ActiveSupport.on_load(:active_record) do
- 3
self.include_root_in_json = false
end
- 3
DataIngest::Application.routes.draw do
- 3
resources :uploads
- 3
root :to => 'login#login'
- 3
match 'record/:record_id/uploads', :to => "uploads#index"
- 3
match 'record/:record_id/uploads/new', :to => "uploads#new"
- 3
match 'update_dataupload/:id', :to => "datauploads#update_dataupload"
- 3
match 'record/:id/datauploads/:dataupload_id/delete', :to => "datauploads#destroy"
- 3
match 'records', :to => "records#index"
- 3
match 'record/:id', :to => "records#record"
- 3
match 'record/', :to => "records#record"
- 3
match 'record/:id/review', :to => "records#review"
- 3
match 'record/:id/delete', :to => "records#delete"
- 3
match 'record/:id/send_archive_to_merritt', :to => "records#send_archive_to_merritt"
- 3
match 'record/:id/logs', :to => "records#submission_log"
- 3
match 'update_record/:id', :to => "records#update_record"
- 3
match 'delete_creator/:id/:creator_id', :to => "records#delete_creator"
- 3
match 'delete_contributor/:id/:contributor_id', :to => "records#delete_contributor"
- 3
match 'delete_description/:id/:description_id', :to => "records#delete_description"
- 3
match 'delete_subject/:id/:subject_id', :to => "records#delete_subject"
- 3
match 'delete_relation/:id/:relation_id', :to => "records#delete_relation"
- 3
match 'delete_alternateIdentifier/:id/:alternateIdentifier_id', :to => "records#delete_alternateIdentifier"
- 3
match 'login', :to => "login#login"
- 3
match 'login_page', :to => "login#login_page"
- 3
match 'logout_page', :to => "login#logout_page"
- 3
match 'logout', :to => "login#logout"
- 3
match 'export', :to => "records#parse_feed"
- 3
match 'terms_of_use', :to => "records#terms_of_use"
- 3
match 'prepare_to_submit', :to => "records#prepare_to_submit"
- 3
match 'metadata_basics', :to => "records#metadata_basics"
- 3
match 'steps_to_publish', :to => "records#steps_to_publish"
- 3
match 'upload_faq', :to => "records#upload_faq_page"
- 3
match 'data_use_agreement', :to => "records#data_use_agreement"
end
- 1
require 'test_helper'
- 1
class LoginControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class RecordsControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class UploadsControllerTest < ActionController::TestCase
- 1
setup do
- 2
@request.session["user_id"] = 1
- 2
FileUtils.rm_rf(Dir.glob("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}"))
- 2
Dir.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}")
- 2
Dir.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/1234567890")
- 2
FileUtils.touch("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/1234567890/datacite.xml")
end
- 1
test "create and purge file upload" do
- 1
test_image = "#{Rails.root}/test/fixtures/files/datacite.xml"
- 1
file = Rack::Test::UploadedFile.new(test_image)
- 1
post "create", :record_id => 1, :upload => {:upload => file}
- 1
assert_equal Record.find(1).uploads.count, 1
- 1
Record.find(1).purge_files(1)
- 1
assert_equal Record.find(1).uploads.count, 0
end
- 1
test "delete file upload" do
- 1
put "destroy", :id => uploads(:one).id
end
end
- 1
require 'test_helper'
- 1
require "capybara/rails"
- 1
class Records_integration_Test < ActiveSupport::TestCase
- 1
include Capybara::DSL
- 1
setup do
- 14
FileUtils.rm_rf(Dir.glob("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}"))
- 14
Dir.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}")
- 14
Dir.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/1234567890")
- 14
FileUtils.touch("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/1234567890/datacite.xml")
- 14
Capybara.current_session.driver.header 'eppn', 'abc123'
- 14
visit '/login'
end
- 1
teardown do
- 14
FileUtils.rm_rf(Dir.glob("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}"))
end
- 1
test "display all records" do
- 1
visit '/records'
- 1
assert page.has_content?("Study1")
- 1
assert page.has_content?("UCSF")
end
- 1
test 'display new record page' do
- 1
visit '/record'
- 1
assert page.has_content?("Describe your dataset")
end
- 1
test "create new record" do
- 1
visit '/record'
- 1
fill_in 'title', :with => 'Title1'
- 1
select('UCSF', :from => 'publisher')
- 1
fill_in 'resourcetype', :with => 'data'
- 1
fill_in 'creator_name', :with => 'creator name'
- 1
fill_in 'subject_name', :with => 'subject name'
- 1
fill_in 'abstract', :with => 'Data from healthy and cognitively impaired elderly, enriched for cerebrovascular disease.
Background and Purpose: To investigate whether the Framingham Cardiovascular Risk Profile (FCRP) and carotid artery intima-media
thickness (CIMT) are associated with cortical volume and thickness. Results: 152 subjects (82 men) were aged 78 (+-7) years old, 94
had a CDR of 0, 58 had a clinical dementia rating (CDR) of 0.5 and the mean mini-mental status examination (MMSE) was 28 +-2. FCRP
score was inversely associated with total gray matter (GM) volume, parietal and temporal GM volume (adjusted p<0.04). FCRP was
inversely associated with parietal and total cerebral GM thickness (adjusted p<0.03). CIMT was inversely associated with thickness
of parietal GM only (adjusted p=0.04). Including history of myocardial infarction or stroke and radiologic evidence of brain
infarction, or apoE genotype did not alter relationships with FCRP or CIMT. Conclusions: Increased cardiovascular risk was
associated with reduced GM volume and thickness in regions also affected by Alzheimer\'s disease (AD), independent of infarcts
and apoE genotype. These results suggest a "double hit" toward developing dementia when someone with incipient AD also has
high cardiovascular risk. Subjects: Consecutive subjects were identified from an ongoing, longitudinal, multi-institutional
Aging Brain program project that recruits subjects with normal cognition to mild cognitive impairment, representing a spectrum
of low to high vascular risk14. Most participants were acquired through community-based recruitment using a protocol designed
to obtain a demographically diverse cohort, or through sources such as stroke clinics and support groups attended by people
with high vascular risk factors. All participants gave written informed consent in accordance with the policies of each
institutional review board. Inclusion criteria include age 60 or older, with cognitive function in the normal to mild cognitive
impairment range (Clinical Dementia Rating [CDR] score of 0 or 0.5) 15. Persons with history of multiple vascular risk factors,
coronary or carotid disease, myocardial infarction, or ischemic stroke were targeted for inclusion, although patients with very
large strokes that interfered with estimation of cortical volume and thickness were excluded. Exclusion criteria included evidence
of alcohol or substance abuse, head trauma with loss of consciousness lasting longer than 15 minutes, factors contraindicating MRI,
and severe medical illness, neurologic or psychiatric disorders unrelated to AD or vascular dementia that could significantly affect
brain structure (e.g., schizophrenia and other psychotic disorders, bipolar disorder, current major depression, post-traumatic
stress disorder, obsessive-compulsive disorder, liver disease, multiple sclerosis, amyotrophic lateral sclerosis). Participant
demographics by CDR are shown in Table 1. Measures of cardiovascular risk and carotid atherosclerosis: The FCRP uses empirically-derived
age- and gender-adjusted weighting of categorical variables to predict the 10-year risk of coronary heart disease and is a weighted sum of:
age, gender, active smoking, diabetes, systolic blood pressure (and/or use of hypertensive medications) and total cholesterol and
high-density lipoprotein cholesterol levels13. Higher scores indicate '
- 1
fill_in 'methods', :with => 'Consecutive subjects participating in a prospective cohort study of aging and mild cognitive impairment
enriched for vascular risk factors for atherosclerosis underwent structural MRI scans at 3T and 4T MRI at three sites. Freesurfer (v5.1)
was used to obtain regional measures of neocortical volumes (mm3) and thickness (mm). Multiple linear regression was used to determine
the association of FCRP and CIMT with cortical volume and thickness. MRI: acquisition: Structural T1-weighted MRI scans for participants
were collected on 3T and 4T MRI systems. Forty-three participants were scanned at the University of Southern California using a 3T General
Electric Signal HDx system with an 8-channel head coil. Acquired images included a T1-weighted volumetric SPGR (TR = 7 ms, TE = 2.9 ms,
TI= 650 ms, 1 mm3 isotropic resolution). Fifty-four participants were scanned at the University of California, Davis research center.
Nine participants were scanned using a 3T Siemens Magnetom Trio Syngo System with an 8-channel head coil. Forty-five were scanned using
a 3T Siemens Magnetom TrioTim system with an 8-channel head coil. Acquired images for all 54 participants included a T1-weighted volumetric
MP-RAGE (TR = 2500, TE = 2.98, TI = 1100, 1 mm3 isotropic resolution). Thirty-three participants were scanned at the San Francisco Veterans
Administration Medical Center using a 4T Siemens MedSpec Syngo System with an 8-channel head coil. A T1-weighted volumetric MP-RAGE scan
(TR = 2300, TE = 2.84, TI = 950, 1 mm3 isotropic '
- 1
fill_in 'citation', :with => 'e.g., Patterns of age-related water diffusion changes in human brain by concordance and discordance analysis.
Zhang Y, Du AT, Hayasaka S, Jahng GH, Hlavin J, Zhan W, Weiner MW, Schuff N. Neurobiol Aging. 2010 Nov;31(11):1991-2001.
doi: 10.1016/j.neurobiolaging.2008.10.009. Epub 2008 Nov 25. PMID: 19036473'
- 1
click_button 'Save'
- 1
assert find_field('title').value == 'Title1'
- 1
assert find_field('resourcetype').value == 'data'
- 1
assert page.has_content?('creator name')
- 1
assert page.has_content?('subject name')
- 1
assert page.has_content?('high-density lipoprotein cholesterol levels13')
- 1
assert page.has_content?(' (TR = 2300, TE = 2.84, TI = 950, 1 mm3 isotropic')
- 1
assert page.has_content?('PMID: 19036473')
end
- 1
test "update record" do
- 1
visit "/record"
- 1
fill_in 'title', :with => 'updatetitle123'
- 1
click_button 'Save'
- 1
assert find_field('title').value == 'updatetitle123'
end
- 1
test "new record" do
- 1
visit "/record"
- 1
assert page.has_content?("Title")
end
- 1
test "add_and_delete_creator" do
- 1
visit "/record"
- 1
fill_in "creator_name", :with => "creator1"
- 1
click_button "Add Creator"
- 1
assert page.has_content?("creator1")
- 1
first(:link, 'delete').click
- 1
assert !page.has_content?("creator1")
end
- 1
test "add_and_delete_subject" do
- 1
visit "/record"
- 1
fill_in "subject_name", :with => "subject name 1"
- 1
click_button "Add Subject"
- 1
assert page.has_content?("subject name 1"), "subject name created"
- 1
first(:link, 'delete').click
- 1
assert !page.has_content?("subject name 1"), "subject name deleted"
end
- 1
test "add_multiple_subjects_through_comma_delimited_line" do
- 1
visit "/record"
- 1
fill_in "subject_name", :with => "subject1, subject2, subject3"
- 1
click_button "Add Subject"
- 1
assert !page.has_content?("subject1, subject2, subject3")
- 1
assert page.has_content?("subject3"), "subject name deleted"
end
- 1
test "add_and_delete_citation" do
- 1
visit "/record"
- 1
fill_in "citation", :with => "fill_in 'citation', :with => 'e.g., Patterns of age-related water diffusion changes in human brain by concordance and discordance analysis.
Zhang Y, Du AT, Hayasaka S, Jahng GH, Hlavin J, Zhan W, Weiner MW, Schuff N. Neurobiol Aging. 2010 Nov;31(11):1991-2001.
doi: 10.1016/j.neurobiolaging.2008.10.009. Epub 2008 Nov 25. PMID: 19036473'"
- 1
click_button "Add Citation"
- 1
assert page.has_content?("Epub 2008 Nov 25. PMID: 19036473")
- 1
first(:link, 'delete').click
- 1
assert !page.has_content?("Epub 2008 Nov 25. PMID: 19036473")
end
- 1
test "require record ownership for edit" do
- 1
id = records(:two).id
- 1
visit "/record/#{id}"
#no ownership, redirected to index page
- 1
assert page.has_content?("My Datasets")
end
- 1
test "create_review_page" do
- 1
id = records(:one).id
- 1
visit "/record/#{id}/review"
- 1
assert page.has_content?("Review before submitting to DataShare")
end
# this won't really do it, the config for test
# is set with dummy data, no need to clutter up
# merritt like this
# so this will give the error message, not success
# message
- 1
test "send_archive_to_merritt" do
- 1
id = records(:one).id
- 1
prev_upload_count = Upload.find_all_by_record_id(id).size()
- 1
visit "/record/#{id}/send_archive_to_merritt"
- 1
assert page.has_content?("Submission Logs")
#in test, this step will always fail. You'd need to have test configured
#to successfully submit to merritt for this test to work
#assert_not_equal prev_upload_count, Upload.find_all_by_record_id(id).size()
end
- 1
test "view submission logs" do
- 1
id = records(:one).id
- 1
visit "/record/#{id}/logs"
- 1
assert page.has_content?("Failed")
end
- 1
test "delete record" do
- 1
visit "/records"
- 1
assert page.has_content?("Study1")
- 1
first(:link, 'Delete').click
- 1
assert !page.has_content?("Study1")
end
end
- 1
require 'test_helper'
- 1
require "capybara/rails"
- 1
class Uploads_integration_Test < ActiveSupport::TestCase
- 1
include Capybara::DSL
- 1
setup do
- 7
FileUtils.rm_rf(Dir.glob("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}"))
- 7
Dir.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}")
- 7
Dir.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/1234567890")
- 7
FileUtils.touch("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/1234567890/datacite.xml")
- 7
Capybara.current_session.driver.header 'eppn', 'abc123'
- 7
visit '/login'
end
- 1
teardown do
- 7
FileUtils.rm_rf(Dir.glob("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}"))
end
- 1
test "navigate to upload page" do
- 1
visit "/record"
- 1
assert page.has_content?('My Datasets')
end
# visit the page and validate text
# file upload functionality is covered in the upload functional test
- 1
test "file upload page" do
- 1
id = records(:one).id
- 1
visit "/record/#{id}/uploads"
- 1
assert page.has_content?("My Datasets")
end
# visit upload page for no record
- 1
test "no record redirects to my datasets page" do
- 1
visit "/record/100/uploads"
- 1
assert page.has_content?("My Datasets")
end
# visit record not owned by current user
- 1
test "no ownership of record redirects to my datasets page" do
- 1
id = records(:two).id
- 1
visit "/record/#{id}/uploads"
- 1
assert page.has_content?("My Datasets")
end
# attempt to destroy non existent record
- 1
test "require ownership of related record to destroy upload" do
- 1
id = records(:two).id
- 1
upload_id = uploads(:two).id
- 1
visit "/record/#{id}/datauploads/#{upload_id}/delete"
- 1
assert page.has_content?("My Datasets")
end
- 1
test "delete upload" do
- 1
id = records(:three).id
- 1
visit "/record/#{id}/uploads"
- 1
Dir.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/234567891")
- 1
FileUtils.touch("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/234567891/datacite.xml")
- 1
assert page.has_content?("datacite.xml")
- 1
first(:link, 'delete').click
- 1
assert !page.has_content?("datacite.xml")
end
- 1
test "purge files" do
- 1
visit "/records"
- 1
prev_count = Upload.all.count
end
end
- 1
require 'test_helper'
- 1
class ContributorTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class CreatorTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class DescriptionTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class CreatorsHelperTest < ActionView::TestCase
end
- 1
require 'test_helper'
- 1
class LoginHelperTest < ActionView::TestCase
end
- 1
require 'test_helper'
- 1
class RecordHelperTest < ActionView::TestCase
end
- 1
require 'test_helper'
- 1
class UploadsHelperTest < ActionView::TestCase
end
- 1
require 'test_helper'
- 1
class RecordTest < ActiveSupport::TestCase
- 1
setup do
- 4
FileUtils.rm_rf(Dir.glob("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}"))
- 4
Dir.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}")
- 4
Dir.mkdir("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/1234567890")
- 4
FileUtils.touch("#{Rails.root}/#{DATASHARE_CONFIG['uploads_dir']}/1234567890/datacite.xml")
end
- 1
test "can build and populate the record model" do
- 1
record = Record.new
- 1
record.identifier = 'abc'
- 1
record.identifierType = 'ROI'
- 1
record.publisher = 'Cambridge Press'
- 1
record.publicationyear = '1997'
- 1
record.resourcetype = 'data'
- 1
record.rights = 'copyright ucsf'
- 1
record.local_id = "1234567890"
- 1
assert_equal record.identifier, 'abc'
end
- 1
test "creates valid datacite xml" do
- 1
record = records(:one)
- 1
xmlout = record.review
end
- 1
test "required and recommended fields" do
- 1
record = Record.new
- 1
assert_equal record.required_fields[0], "Record must specify at least one creator"
- 1
assert_equal record.required_fields[1], "Record must have a title"
- 1
assert_equal record.required_fields[2], "Record must have a publisher"
- 1
assert_equal record.required_fields[3], "Record must have a publication year"
- 1
assert_equal record.required_fields[4], "Record must specify at least one contributor"
- 1
assert_equal record.recommended_fields[0], "Subject data is strongly recommended. Your record may be ommitted from search and browse results withough a subject"
#assert_equal record.recommended_fields[1], "While not required, an abstract and technical description are strongly recommended."
end
- 1
test "purges files" do
- 1
record = Record.new
- 1
record.save
- 1
upload = Upload.new
- 1
upload.record_id = record.id
- 1
upload.save
- 1
assert_equal record.uploads.count, 1
#record.purge_files
end
end
- 1
require 'test_helper'
- 1
class RelationTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class SubjectTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class SubmissionLogTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class UploadArchiveTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class UploadTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
- 1
require 'test_helper'
- 1
class UserTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end


|
VirtualSCADA
1.0
VirtualSCADA Senior Design Project
|
Additional Inherited Members | |
| Protected Attributes inherited from ObjectBehavior | |
| $object | |
Definition at line 13 of file IOSpec.php.
| it_defaults_the_block_width | ( | ) |
Definition at line 157 of file IOSpec.php.
| it_has_io_interface | ( | ) |
Definition at line 27 of file IOSpec.php.
| it_is_code_generation_ready_if_no_input_config_says_otherwise | ( | ) |
Definition at line 32 of file IOSpec.php.
| it_is_not_code_generation_ready_if_command_line_option_is_set | ( | $input | ) |
Definition at line 44 of file IOSpec.php.
| it_is_not_code_generation_ready_if_config_option_is_set | ( | $config | ) |
Definition at line 51 of file IOSpec.php.
| it_is_not_code_generation_ready_if_input_is_not_interactive | ( | $input | ) |
Definition at line 37 of file IOSpec.php.
| it_sets_the_block_width_to_narrower_than_the_terminal_width_when_terminal_is_in_range | ( | ) |
Definition at line 176 of file IOSpec.php.
| it_sets_the_block_width_to_the_maximum_when_terminal_is_very_wide | ( | ) |
Definition at line 169 of file IOSpec.php.
| it_sets_the_block_width_to_the_minimum_when_terminal_is_narrow | ( | ) |
Definition at line 162 of file IOSpec.php.
| it_will_disable_faking_if_command_line_option_and_config_flag_are_not_set | ( | $input, | |
| $config | |||
| ) |
Definition at line 101 of file IOSpec.php.
| it_will_disable_rerunning_if_command_line_option_is_set | ( | $input, | |
| $config | |||
| ) |
Definition at line 85 of file IOSpec.php.
| it_will_disable_rerunning_if_config_option_is_set | ( | $input, | |
| $config | |||
| ) |
Definition at line 93 of file IOSpec.php.
| it_will_enable_faking_if_command_line_option_is_set | ( | $input, | |
| $config | |||
| ) |
Definition at line 109 of file IOSpec.php.
| it_will_enable_faking_if_config_flag_is_set | ( | $input, | |
| $config | |||
| ) |
Definition at line 117 of file IOSpec.php.
| it_will_enable_rerunning_if_command_line_option_is_not_set_and_config_doesnt_disallow | ( | $input, | |
| $config | |||
| ) |
Definition at line 77 of file IOSpec.php.
| it_will_not_stop_on_failure_if_no_input_config_says_otherwise | ( | ) |
Definition at line 58 of file IOSpec.php.
| it_will_report_bootstrap_path_from_cli_when_different_paths_are_specified_in_config_and_cli | ( | $input, | |
| $config | |||
| ) |
Definition at line 149 of file IOSpec.php.
| it_will_report_bootstrap_path_when_one_is_in_the_config_file | ( | $input, | |
| $config | |||
| ) |
Definition at line 133 of file IOSpec.php.
| it_will_report_bootstrap_path_when_one_is_specified_at_the_command_line | ( | $input, | |
| $config | |||
| ) |
Definition at line 141 of file IOSpec.php.
| it_will_report_no_bootstrap_when_there_is_none | ( | $input, | |
| $config | |||
| ) |
Definition at line 125 of file IOSpec.php.
| it_will_stop_on_failure_if_command_line_option_is_set | ( | $input | ) |
Definition at line 63 of file IOSpec.php.
| it_will_stop_on_failure_if_config_option_is_set | ( | $config | ) |
Definition at line 70 of file IOSpec.php.
| let | ( | InputInterface | $input, |
| OutputInterface | $output, | ||
| DialogHelper | $dialogHelper, | ||
| OptionsConfig | $config | ||
| ) |
Definition at line 15 of file IOSpec.php.