|
Boost Statechart 库
Future & History 未来与历史
|
Contents 目录
- To-do list 待办事项列表
- Change history 变更历史
The library is mostly complete. However, there is some work
left (red = added as a
result of the formal review):
本库已基本完成。不过，还有一些工作要做(红色
= 作为正式审查的结果被添加)
- Implement a choice-point-like class, as discussed in this
thread
实现类似于选择点的类，正如在 这
个帖子中 所讨论
- Optimize state-entry and state-exit for speed and
code-size
优化状态进入和状态退出的速度和代码大小
- Reimplement
fifo_scheduler<>::processor_handle
so that fifo_scheduler<>::create_processor<>()
and fifo_scheduler<>::destroy_processor()
no longer make (indirect) calls to global operator new()
and operator delete()
重新实现 fifo_scheduler<>::processor_handle
，
以使得 fifo_scheduler<>::create_processor<>()
和 fifo_scheduler<>::destroy_processor()
不再(间拉)调用全局的 operator new()
和 operator
delete()
- Ensure that everything is compileable with C++ RTTI support
turned off (this requires currently lacking support in Boost.Config and
probably a patch for
shared_ptr
)
确保所有东西兼容于 C++
RTTI 被关闭的情况(当前这一要求缺乏 Boost.Config 的支持，并可能需要 shared_ptr
的一个补丁)
- Issue an error if
BOOST_STATECHART_USE_NATIVE_RTTI
is defined when C++ RTTI is turned off
当 C++ RTTI 被关闭时，如果定义了 BOOST_STATECHART_USE_NATIVE_RTTI
则产生一个错误
- The current requirement to pass an
mpl::list<>
to specify inner initial states and reactions is too strict. Check the
requirements on the sequences and document them accordingly (David
Abrahams)
当前要求传递一个 mpl::list<>
来指定内层初始状态和反应，这有点过于严格。检查对该序列的相关要求，并把它们形成文档(David
Abrahams)
- Make compilation performance measurements with mpl::vector
and mpl::deque instead of mpl::list to find out which is fastest.
Document a recommendation for the fastest container and change all
examples accordingly (David Abrahams)
以 mpl::vector 和 mpl::deque 替代
mpl::list 并进行编译性能的测量，确定哪一个更快。把最快的容器作为推荐写进文档，并据此修改所有的例子(David Abrahams)
- Investigate how a state machine could be serialized. A
first glance at the serialization library revealed that there currently
(1.33) is no support for types that overload
operator new
(suitable code is already present in the serialization library but it
is currently commented out due to incompatibilities with certain
compilers). Such support would be essential for Boost.Statechart
serialization
研究如何对状态机进行序列化。对 serialization 库的初步研究表明，当前版本(1.33)不支持重载了 operator
new
的类型(适当的代码在 serialization 库已经可用，但由于与某些编译器的不兼容，所以这些代码被注释掉了)。这个特性的支持对于
Boost.Statechart
的序列化是最基本的
- Implement a switch-like
reaction (Simon Gittins, Darryl Green)
实现一个类似于 switch
的反应(Simon Gittins, Darryl Green)
- Link incomplete code-snippets in the tutorial to complete
example code where available
将"指南"中的不完整代码片断合并为可用的完整代码
- Where appropriate, link the reference documentation to
examples
在适当的地方，将引用的文档链接到例子中
- Add a description of the
implementation and better explain performance trade-offs (Jonathan
Turkanis)
为本实现增加说明，更好地解释性
能上的妥协(Jonathan
Turkanis)
- Add links to
descriptions of alternate implementations and discuss performance
trade-offs (Jonathan Turkanis)
为
其它实现的说明增加链接，讨论它们的性能妥协(Jonathan Turkanis)
- Add a list of
applications that use Boost.Statechart (Paul A. Bristow)
增加一个使用 Boost.Statechart
的应用程序的列表(Paul A. Bristow)
- Refactor the
state_machine
class
template to reduce code size in applications with many different state
machines
重构 state_machine
类模板，以减少带有多个不同状态机的应用程序的代码大小
- Add a diagram that helps to understand what an unstable
state machine is
增加一个图，帮助理解什么是不稳定状态机
- Comment MPL-heavy code
注释掉过度使用MPL的代码
- Add examples of often made mistakes
增加一些通常会出错的例子
- Implement
priority_scheduler<>
实
现 priority_scheduler<>
- Eliminate code-duplication in
fifo_scheduler
with PP code submitted by Pavel Vozenilek
消除 fifo_scheduler
和 Pavel Vozenilek 提交的 PP 代码之间的重复代码
- Add number and label to all diagrams in docs
为文档中的图增加编码和标题
- Add
#pragma once
to all headers
(speeds up compilation with MS-compatible compilers)
为所有头文件增加 #pragma
once
(可以提高在MS兼容的编译器中的编译速度)
- Investigate whether and how
fifo_worker<>
should accept a policy parameter defining how to lock and wait
研究 fifo_worker<>
是否应该以及如何接受一个策略参数来定义如何进行锁定和等待
(red = points
raised during formal review)
(红色
= 在正式审查过程中发现的点)
1.43.0
- Generalized the context() functions so that they can also return a reference
to any public base type of a context. This also makes transition<> &
in_state_reaction<> more general, reported by Igor R
泛化 context() 函数，令它们也可返回一个指向某个上下文的任意公有基类的引用。这样也可令 transition<> &
in_state_reaction<> 更为通用，由 Igor R 报告
- Added triggering_event()
新增 triggering_event()
- Fixed Bug #3329 (shadow variable warnings), reported by Grant Erickson
修复缺陷 #3329 (影子变量警告)，由 Grant Erickson 报告
- Fixed Bug #3963 (state_machine<>::post_event() should be protected),
reported by Arne Babnik
修复缺陷 #3963 (state_machine<>::post_event() 应为保护成员)，由 Arne Babnik 报告
1.40.0
- Fixed a bug that prevented the use of boost::ref() with
fifo_scheduler<>::create_processor<>, reported by Steve Hawkes
修正了 boost::ref() 无法与
fifo_scheduler<>::create_processor<> 共用的缺陷，由 Steve Hawkes 报告
- Fixed bug #3092 (regression test failures in VC10 beta 1), reported by
Richard Webb
修正缺陷 #3092 (在 VC10 beta 1 中回归测试失败)，由 Richard Webb 报告
1.38.0
- Fixed gcc-4.3 warning in state_machine.hpp (ticket #2389), reported by Bryan
Silverthorn
修正 gcc-4.3 在 state_machine.hpp 中的告警(ticket #2389)，由 Bryan Silverthorn 报告
1.36.0
- Removed all permanent warning suppressions from library headers and avoided
the resulting warnings with other means (suggested by Steven Watanabe; thanks to
Peter Dimov and Yuval Ronen for insight into when C4511 & C4512 are issued)
从库的头文件中删除所有永久性警告禁止，以其它方式避免得到警告(由 Steven Watanabe 建议；感谢
Peter Dimov 和 Yuval Ronen 发现 C4511 & C4512 的问题)
- Added the FAQ item Why do I get
an assert when I access the state machine from a state destructor? (due to
feedback from Jiang Miao)
增加 FAQ 项 为什么从 state 的析构函数中访问状态机会得到一个断言? (来自 Jiang Miao 的回应)
- Added defaults for the last two template parameters of in_state_reaction<>
(due to feedback from Sean Kelly)
为 in_state_reaction<>
的后两个模板参数增加缺省值(来自 Sean Kelly 的回应)
- Adapted fifo_scheduler<> to the changed allocator interface of
boost::function
让 fifo_scheduler<> 适合于已改变的
boost::function 的分配器接口
- Changed the PingPong example to demonstrate how the inner workings of an
asynchronous_state_machine<> subclass can be hidden
修改例子 PingPong，以示范一个
asynchronous_state_machine<> 子类的内部工作如何被隐藏
1.35.0
- Added placement new overload to
event<>
为 event<>
增加定位 new 的重载
- Made
event<>
copy-assignabley
使得 event<>
成为可复制赋值
1.34.0
- Fixed a bug that prevented compilation of
exception_translator.hpp (reported by Oliver Kowalke) and adapted
TransitionTest.cpp to also test the exception_translator class
修正
exception_translator.hpp 不能编译的 bug (由 Oliver Kowalke 报告)，并个性
TransitionTest.cpp 以增加对 exception_translator 类的测试
- Fixed an allocator-related bug that led to compiler errors
in many tests on GCC >= 4.0
修正一个分配器相关的 bug，该 bug 在 GCC >=
4.0 中导致多个测试编译失败
- Fixed a number of issues that led to compile-time failures
on Intel 9.0 and Code Warrior
修正了多个在 Intel 9.0 和 Code Warrior 上导致编译期错误的问题
- Added compile-link tests for all examples
为所有例子增加编译-链接测试
- Documented
state_machine<>::post_event
and added a const event_base &
overload
为 state_machine<>::post_event
提供文档并增加一个 const event_base &
重载
- example/Jamfile.v2 now also stages the dlls necessary to
launch the multithreaded PingPong examples
例子/Jamfile.v2 现在也适用于执行多线程
PingPong 例子时对 dlls 的需要
- Added a FAQ item regarding UML2.0
conformance
增加一个FAQ项，关于对UML2.0的符合性
- Made the documentation of
unconsumed_event
more visible
让 unconsumed_event
的文档更可读
- Declared
state_base::~state_base virtual
for GCC. This makes state exit slightly slower but does away with loads
of "has virtual functions but non-virtual destructor" warnings
对GCC声明了 state_base::~state_base
virtual
。这使得状态退出稍微慢了一点，但不会出现"has virtual functions but
non-virtual destructor"的告警
- Made transitions to history UML2.0 compliant, see here for more
information
让转换符合 UML2.0，更多信息请见 这里
- Tidied all html files & validated them with http://validator.w3.org/
整
理所有html文件，并用 http://validator.w3.org/
确认它们
- Fixed broken links
修复破坏的链接
- Fixed a few conformance problems that led to errors on HP
compilers
修正了在HP编译器上导致错误的一些符合性问题
- Corrected documentation regarding allocation of states and
events
修改了有关状态和事件分配的文档
17 December, 2005
- Added detailed performance data to the performance
document
为性能文档增加详细的性能数据
- Added the Performance "example" and the associated
Performance.xls, which were used to perform the more detailed
measurements and draw the associated charts that can now be found in
the performance document
增加 Performance 例子以及相关的
Performance.xls，用于执行更为详细的测量以及画出相关图表，这些图表可以在性能文档中找到
- Simplified the BitMachine example (the performance
measurement functions are no longer needed)
简化 BitMachine
例子(不再需要其中的性能测量函数)
- Removed the to-do item
"Investigate how constant-time dispatch for non-orthogonal state
machines can be implemented" suggested by David Abrahams, Jonathan
Turkanis, Rob Steward and Dave Gomboc. The more detailed performance
measurements have shown that the time spent for event dispatch is
almost always small compared to the time spent for state-entry and
state-exit. See Speed
versus scalability tradeoffs in the performance document for
more information
删除待办事项"研
究如何实现非正交状态机的常量时间分派"，该建议由 David Abrahams, Jonathan
Turkanis, Rob Steward 和 Dave Gomboc
提出。更为详细的性能测量显示，花在事件分派上的时间总是远小于花在状态进入和状态退出上的时间。更多的信息请见"性能"文档中的 速度与可扩
展性的折衷
- Fixed an order of declaration bug which caused a
compile-time error in event_base.hpp when compiled with GCC3.4.2 on
HP-UX (the error neither showed up on GCC3.4.2 on MinGW nor on
MSVC7.1)
修正了一类声明的 bug，这个 bug 引起在 GCC3.4.2 和 HP-UX 上编译 event_base.hpp
会出现编译期错误(这个错误不会出现在 MinGW 的 GCC3.4.2 以及 MSVC7.1 上)
- Tested with 1.33.1 version of the boost distribution
与
1.33.1 版本的 boost 发布版进行测试
14 August, 2005
- This release will only work with the 1.33.0
version of the boost distribution
这个发布版只能与 1.33.0 版本的 boost 发行版共同使用
- Breaking change: Added
simple_state<>::operator
new
& simple_state<>::operator
delete
forwarding to the allocator passed to state_machine
(Peter Petrov). This considerably simplifies memory management
customization. A user now only needs to pass his own allocator to state_machine<>
and no longer has to separately overload operator new
/delete
for his state classes. Existing state classes for which memory
management is not customized will thus automatically use the allocator
passed to state_machine<>
.
Existing state classes for which operator new
/delete
is overloaded directly will continue to work as
before. The only case where existing code will refuse to compile is
when a state class inherits from an additional base with overloaded operator
new
/delete
(leading to ambiguous
call errors). Forwarding functions need to be added to such state
classes (see BitMachine for an example)
破坏性的变更：增
加的 simple_state<>::operator
new
& simple_state<>::operator
delete
前转至传给 state_machine
的分配器(Peter Petrov)。这样简化了内存管理的定制。用户现在只需将他自己的分配器传递给 state_machine<>
就可以了，无需为他的状态类分别重载 operator new
/delete
。
已有的未定制内存管理的状态类将自动使用传给 state_machine<>
的分配器。而已有的重载了 operator new
/delete
的状态类则直接继续如前使
用。已有代码不能编译的唯一可能的情形是，状态类派生自另一个重载了 operator
new
/delete
的基类(导致不明确调用的错误)。需要为这些状态类增加前转函数(举例请见 BitMachine)
- Breaking change: Added an Allocator
parameter to the
event
class template and
added event<>::operator new
/delete
.
This makes customizing memory management easier but could also break
existing code (see previous point)
破坏性的变更：增加一个
Allocator
参数到 event
类模板，并增加 event<>::operator
new
/delete
.
这样定制内存管理更为容易，但也会破坏已有的代码(请见前一点)
- Added Jamfile.v2 files
增加 Jamfile.v2 文件
- Added
event_base
specializations
to all reactions and updated the reference accordingly. This allows to
implement reactions triggered by an event of any type
增加 event_base
特化到所有反应中，并更新相关的引用。这样可以实现由任意类型的事件触发反应
- Added a facility allowing to specially handle events that
did not trigger a reaction. See point 10 of process_event()
effects for more information. Updated tests and docs accordingly
增加一个方法允许
对不触发反应的事件进行特殊处理。更多信息请见 process_event()
的第10点。更新相关的测试和文档
- Added a FAQ item
explaining how to trouble-shoot compile-time errors (John Spalding)
增加一个FAQ项，解释如何检查编译期错误(John
Spalding)
- Added a FAQ item that
presents code for a StopWatch variant that does not use state-local
storage and explains the drawbacks of that approach (Jeff Garland, Rob
Steward)
增加一个FAQ项，给出
StopWatch 的一个变体代码，不使用状态局部存储，并解释这种方法的缺点(Jeff Garland, Rob
Steward)
- Added a FAQ item explaining the pitfalls of dynamically
linked state-machines. Also added associated tests to find out whether
and how FSMs can be put into DLLs
增加一个FAQ项，解释动态链接的状态机的缺陷。同时增加相关的测试以找出FSM是
否可以和如何放入DLL中
- Removed the to-do item
"Eliminate the need to wrap a single templated inner initial state into
an
mpl::list<>
" suggested by
Jonathan Turkanis because I don't currently see how this can be
implemented without big ugly workarounds. A description of the problem
can be found here: http://thread.gmane.org/gmane.comp.lib.boost.devel/128741
删
除待办事项"去掉将单个模板化内层状态放入 mpl::list<>
的需要"，由
Jonathan Turkanis 建议，因为当前我还看不到如何用不那么难看的方法实现它。有关这个问题的说明请见这里：http://thread.gmane.org/gmane.comp.lib.boost.devel/128741
- Put all remarks about
code as comments inside the code (Pavel Vozenilek, Augustus Saunders)
将所有关于代码的说明以注释方式放入代码中(Pavel
Vozenilek,
Augustus Saunders)
- On suitable platforms the library should now be compileable
with exception support turned off (untested due to lacking access to
such a platform)
在合适的平台上，本库现在可以以关闭异常支持的方式进行编译(由于没有这个的平台，所以未进行测试)
- Added allocator support for broken std libs. Thanks to
Joaquín M López Muñoz for adding his
allocator workarounds to boost/detail
为有问题的 std 库增加分配器支持。感谢
Joaquín M López Muñoz 增加他的分配器到
boost/detail
19 June, 2005
- Updated the documentation for the new reaction
specification interface
为新的反应规范接口更新文档
- Invalid calls to
reaction functions now always lead to a failing runtime assert
(Jonathan Turkanis). In debug mode the
result
type is a class with destructive copy semantics, enabling the detection
of a wider range of reaction function abuses. Added appropriate tests
and updated the documentation
对
反应函数的无效调用现在总是引起失败的运行期断言(Jonathan Turkanis)。在调试模式中，result
类型是一个具有破坏性复制语义的类，可以检测到更广范围的反应函数滥用。增加相应的测试以及更新文档
- Separated
performance-related docs from the rationale into a page of its own
(Pavel Vozenilek)
将与性能相关的文档从"原理"中分离到它自己的页面中(Pavel
Vozenilek)
- Added clone
functionality to events so that stack-allocated events can now be
deferred and posted. Updated the documentation and tests accordingly
(Jonathan Turkanis)
为事件增加
克隆功能，使得栈分配的事件现在可以延迟和发送。更新相关的文档和测试(Jonathan Turkanis)
- Clarified the definition
of context (John Spalding)
澄
清上下文的定义(John Spalding)
- Implemented
in_state_reaction<>
.
Updated the documentation and tests accordingly (Darryl Green)
实现 in_state_reaction<>
.
更新相关文档和测试(Darryl Green)
12 May, 2005
- Breaking change:
Changed the library namespace from
fsm
to statechart
(Alexander Nasonov, David Abrahams)
破坏性的变更：将
本库的名字空间由 fsm
改为 statechart
(Alexander Nasonov, David Abrahams)
- Breaking change:
Changed the library name from boost::fsm to Boost.Statechart (Alexander
Nasonov, David Abrahams)
破坏性的变更：将
本库的名字由 boost::fsm 改为
Boost.Statechart
(Alexander Nasonov, David Abrahams)
- Breaking change:
Reactions are now specified with a
reactions
member typedef in a state class declaration instead of a template
parameter (Alexander Nasonov), not yet documented.
破坏性的变更：现
在反应是以 state 类声明中的一个 reactions
成员 typedef 来指定的，取替了原来的模板参数 (Alexander Nasonov)，但尚未写入文档
03 May, 2005
- Removed the to-do item for the
std::type_info
replacement. Thanks to Jody Hagins for taking care of that!
删除有关替代 std::type_info
的待办事项。感谢 Jody Hagins
对此的关心
- Added to-do items for the issues uncovered during the review
增加了一些待办事项，有关在审查时未涉及的问题
- Fixed documentation bugs in the effects descriptions for
state_machine::initiate()
,
state_machine::terminate()
and state_machine::process_event()
修正文档中的缺陷，关于对 state_machine::initiate()
, state_machine::terminate()
和 state_machine::process_event()
的作用的说明
- Moved "Getting started"
and "Audience" into index.html (Augustus Saunders)
将 "入门"
和 "读者" 移至 index.html (Augustus Saunders)
- Added Basic topics and
Intermediate topics headings and shortened the "How to read this
tutorial" section (Augustus Saunders)
增加"基本议题"和"中级议题"两个标题，以及"如
何阅读本指南"一节 (Augustus Saunders)
21 February, 2005
- Corrected the review period length mentioned above
(absolutely no changes to code and documentation)
修正了以上提及的审查期长度(对代码和文档完全不作修改)
20 February, 2005
- Breaking change: Incorporated a part of
exception_translator::operator()
code into the state_machine
class template.
This simplifies custom exception translators and makes implementing
them less error-prone
破坏性的变更：将 exception_translator::operator()
的一部分代码合并到 state_machine
类模板中。以简化对异常转换器的定制，以及减少实现时的错误
- Breaking change: A request to defer an
exception event is no longer honored and ultimately results in the
exception being rethrown. This change is the result of the rule that
during the processing of an exception no non-user code must be called
that could itself propagate an exception and thus mask the original
exception (for event deferral
operator new
must be called, which could throw). Exception event deferral has always
been a strange concept anyway
破坏性的变更：有关延迟异常事件的请求不再被接受，最终结果是重抛出该异常。这一变化是以下规则的结果，
在处理异常期间，不要求必须调用非用户代码，有可能抛出其它异常而覆盖原来的异常(要对事件进行延迟，必须调用 operator
new
，所以有可能抛出)。无论如何异常事件延迟都是一个奇怪的概念
- Various code brush-ups
多处代码的梳理
09 February, 2005
- Added exception testing to TransitionTest
为 TransitionTest 增加异常测试
- Fixed a bug that led to an access violation when orthogonal
region 0 of a state was terminated before exiting the state (either
through another termination or a transition)
修正以下缺陷，当一个状态的正交区域0在退出该状态之前被终止，会导致非法访问(通过另一个终止动作或转换动作)
- Various minor changes
多处不重要的修改
07 February, 2005
- Added FifoSchedulerTest, TerminationTest,
CustomReactionTest, StateIterationTest, TypeInfoTest, StateCastTest,
HistoryTest and tests for inconsistent uses of history, unsupported
types of deep history and invalid statecharts
增加了 FifoSchedulerTest, TerminationTest,
CustomReactionTest, StateIterationTest, TypeInfoTest, StateCastTest,
HistoryTest 以及对历史的不一致使用、不支持的深历史类型和无效状态图的测试
- Fixed a bug that led to a compile-time error when
state_downcast
was instantiated with a reference target
修正以下缺陷，当 state_downcast
被以一个引用目标进行实例化时，会导致编译期错误
- Fixed a bug that led to a null function pointer dereference
when history was cleared before making a transition to history
修正以下缺陷，当在转换到一个历史之前该历史被清除，将导致一个空的函数指针提领
- Updated the "Speed versus scalability tradeoffs" section
更新"速度与可扩展性的折衷"一节
- Fixed previously failing builds of single-threaded variants
of the PingPong example
修正了之前构建 PingPong 例子的单线程变体失败的错误
- Moved the "Incompatible compilers" section to index.html
将"不兼容的编译器"一节移动至 index.html
- Added explanation for the BitMachine & Handcrafted
examples
为 BitMachine & Handcrafted 例子增加解释
- Various minor changes
多处不重要的修改
25 November, 2004
- Adapted to the changes in the 1.32.0 distribution (mainly
MPL changes). The library no longer works with 1.31.0
适配在 1.32.0 发布版中的变化(主要是MPL方面的改变)。本库不再与 1.31.0 版本一起使用
- Fixed a bug that led to a failing runtime assert during
state machine destruction
修正了以下缺陷，在状态机析构期间会引发运行期断言
- Fixed a bug that led to events deferred in a composite
state not being released when that state was left
修正以下缺陷，当一个组合状态被保持而未被释放时，会导致事件的延迟
- Added TransitionTest and DeferralTest
增加了 TransitionTest 和 DeferralTest
19 October, 2004
- Breaking change: Out of the box, a state
machine no longer uses
exception_translator<>
to translate exceptions propagated into the framework. Instead, null_exception_translator
is now used, which does not catch or translate any exceptions. Updated
docs accordingly
破坏性的变更：缺省情况下，状态机不再使用 exception_translator<>
来转换传入到框架中的异常。现在使用的是 null_exception_translator
,
它不进行捕获也不转换异常。更新相关文档
- Implemented two
stage exit and updated docs accordingly
实现 两阶段退出
并更新相关文档
- Implemented an experimental feature that allows a
transition action to be a member of the transition source or any of its
direct or indirect contexts, see BOOST_STATECHART_RELAX_TRANSITION_CONTEXT
实现一个试验特性，允许转换动作可以是转换源或其直接或间接上下文的成员，请见 BOOST_STATECHART_RELAX_TRANSITION_CONTEXT
- Various small code and documentation improvements
多处小的代码和文档的改进
22 May, 2004
- Integrated the Intel 7.0 workarounds provided by Pavel
Vozenilek (most are std library workarounds)
由 Pavel
Vozenilek 提供的对 Intel 7.0 变通方法的集成(主要是标准库的变通方法)
- Added the Intel 7.0 section to the configuration page
为配置页增加 Intel 7.0 节
- Updated copyright notices
更新了版权说明
12 May, 2004
- Fixed a bug that could have led to an
exception_thrown
event being sent to a state that is not the
outermost unstable state in an unstable state machine (as documented in
the reference). Instead, the event was sent to the state where the
entry action of a direct inner state threw an exception, which is only
correct for state machines without orthogonal regions. Also updated the
Exception
handling section in the tutorial, which now explains this
behavior in detail
修正了以下缺陷，即在不稳定状态机中有可能导致一个 exception_thrown
事件被发送给不是最外层不稳定状态的一个状态(如"参考"文档中所写)。相反，该事件是发送给那个其直接内层状态的进入动作抛出异常的状态的。这对于不带
正交区域的状态机而言是唯一的正确选择。还更新了"指南"中的 异常处理
一节，更详尽地解释了这一行为
- Fixed bug that, under extremely rare circumstances, would
have prevented the correct handling of out of memory situations
修正了以下缺陷，在极罕见的情况下，不能正确处理内存不足的情形
- Fixed an inconsistency in the state entry sequence when a
state in an orthogonal region is the target of a transition originating
outside its direct outer state. Now the states are always entered
according to the number of their orthogonal region, i.e. orthogonal
region 0 first, then orthogonal region 1 and so on. Since the
documentation did not define the sequence (it does now) users should
not notice any difference
修正了以下缺陷，当一个正交区域中的某个状态是一个从其直接外层状态之外产生的转换动作的目标时，状态进入的顺序会有矛盾。现在已可以总是按照正交区域的
号码顺序来执行状态进入，即首先是正交区域0，然后是正交区域1，等等。由于文档中没有定义这个顺序(现在有了)，用户应该不会注意到什么不同
- Changed the implementation of
state_machine::terminate()
so that orthogonal regions are now exited strictly from highest to
lowest number instead of arbitrarily as before. Updated docs accordingly
修改了 state_machine::terminate()
的实现，使得现在可以严格按照正交区域的号码从高到低执行状态的退出，而不是象以前那样按任意顺序执行。更新相关的文档
22 April, 2004
- Removed the previously added BCC 5.6.4 fixes (the BCC port
was postponed due to lack of knowledge how to work around certain bugs)
删除之前增加的 BCC 5.6.4 修正(由于不知道如何解决一些确定的缺陷，所以延后了对BCC的移植)
- Replaced all uses of
BOOST_STATIC_CONSTANT
with their mpl counterparts (bool_
, integral_c
).
As a result, ports to buggy compilers should become easier
将所有 BOOST_STATIC_CONSTANT
的使用替换为 mpl 的实现(bool_
,
integral_c
)。这样更易于移植到有问题的编译器上
- Clarified some bits in the tutorial and added
StopWatch2.cpp, which details an alternative way of retrieving state
machine state
在"指南"中澄清了一些东西，增加了 StopWatch2.cpp，详细说明了读取状态机状态的另一个方法
10 April, 2004
- Added two BCC 5.6.4 fixes contributed by Pavel Vozenilek;
Boost.Statechart does not yet work on BCC though
增加两个 BCC 5.6.4 修正，由 Pavel Vozenilek 贡献；虽然
Boost.Statechart 还不能用于 BCC
- Implemented a few of the documentation and code
improvements suggested by Pavel Vozenilek, including the new "UML to
Boost.Statechart mapping summary" document
由 Pavel Vozenilek 建议实现了一些文档和代码的改进，包括新的"UML到Boost.Statechart的映射概要"文档
26 March, 2004
- Fixed a small Intel 8.0 bug in the BitMachine example
修正了在 BitMachine 例子中的 Intel 8.0 的一个小缺陷
25 March, 2004
- Now everything compiles warning-free on Intel 8.0
现在在 Intel 8.0 上编译没有任何告警了
21 March, 2004
16 March, 2004
- Breaking change: Added the
FifoWorker
template parameter to fifo_scheduler<>
and updated documentation and examples accordingly
破坏性的变更：为
fifo_scheduler<>
增加 FifoWorker
模板参数，更新相应的文档和例子
13 March, 2004
- Breaking change: Renamed
worker<>
to fifo_scheduler<>
and updated
documentation and examples accordingly
破坏性的变更：将 worker<>
更名为 fifo_scheduler<>
，更新相应的文档和例子
- Changed the
fifo_scheduler<>
implementation so that a custom worker implementation needs to
duplicate less code
修改 fifo_scheduler<>
的实现，使得定制工作者实现只需重复少量代码
- Various other small code and doc changes
多处代码和文档的小改动
03 March, 2004
- Breaking change: Redesigned the
worker<>
and asynchronous_state_machine<>
class templates and updated documentation accordingly. Event processors
can now be added and removed while a worker is running. Moreover, the
new design allows for custom workers with non-FIFO queueing schemes
破坏性的变更：重新设计 worker<>
和 asynchronous_state_machine<>
类模板，更新相关文档。事件处理器现在可以在工作者运行中进行增加和删除。此外，新的设计允许以非FIF0队列的策略来定制工作者
- The StopWatch example now uses
std::time()
instead of std::clock()
StopWatch 例子现在使用 std::time()
而不是 std::clock()
09 February, 2004
- Integrated the standard conformance fixes contributed by
Peter Petrov. The library now also works on GCC 3.2 and should be much
easier to port to other highly conforming compilers
集成由
Peter Petrov 贡献的标准符合性修正。本库现在可用于 GCC 3.2，并更容易移植到具有高符合度的编译器
- Added the state type information facility to
simple_state
为 simple_state
增加状态类型信息工具
- Added the function templates
simple_state::clear_shallow_history()
and simple_state::clear_deep_history()
增加函数模板 simple_state::clear_shallow_history()
和 simple_state::clear_deep_history()
11 January, 2004
- Finished reference documentation
完成"参考"文档
- Updated Copyright notices
更新版权说明
12 December, 2003
- Thanks to Mitsuo Fukasawa the tutorial is now also
available in Japanese!!!
感谢 Mitsuo Fukasawa，现在"指南"有了日文版!!!
- Added a state type information facility
增加状态类型信息工具
- Added reference (unfinished) and configuration
documentation and updated other documents
增加"参考"(未完成)和"配置"文档，更新其它文档
- Various code brush-ups (no breaking changes)
多处代码梳理(非破坏性的变更)
12 October, 2003
- Breaking change: Removed
rtti_policy<>
from the interface. By default, the library now uses its own (often
faster) RTTI implementation. Users can demand the use of native C++
RTTI by defining BOOST_STATECHART_USE_NATIVE_RTTI
.
This change only affects users who customized state_machine<>
,
asynchronous_state_machine<>
or worker<>
破坏性的变更：从接
口中删除 rtti_policy<>
。缺省情况下，现在本库使用自
己(也更快)的RTTI实现。用户可以通过定义 BOOST_STATECHART_USE_NATIVE_RTTI
指定使用原生的 C++ RTTI。这一修改只影响定制了 state_machine<>
,
asynchronous_state_machine<>
或 worker<>
的用户
- Breaking change: Reordered template
arguments of
state_machine<>
and asynchronous_state_machine<>
.
This change only affects users who customized state_machine<>
or asynchronous_state_machine<>
破坏性的变更：重新
安排 state_machine<>
和 asynchronous_state_machine<>
的模板参数顺序。这一修改只影响定制了 state_machine<>
或 asynchronous_state_machine<>
的用户
- Added shallow/deep history support and updated
documentation accordingly
增加浅历史/深历史的支持，更新相关文档
- Added various compile-time sanity checks
增加了几处编译器完整性检查
- Added 1 FAQ (asked by Mitsuo Fukasawa)
增加了1个FAQ(由 Mitsuo Fukasawa 提问)
16 August, 2003
- Added
asynchronous_state_machine<>
and worker<>
and updated
documentation accordingly
增加了 asynchronous_state_machine<>
和 worker<>
，更新相关文档
- Various minor bug fixes and code improvements (no breaking
interface changes)
多处小缺陷的修正和代码改进(非破坏性变更)
- Added Keyboard and PingPong examples
增加了 Keyboard 和 PingPong 例子
- Added .pdf documentation
增加了 .pdf 文档
08 June, 2003
- Added 3 FAQs (asked by Bohdan) & 1 definition
增加了3个FAQ(由 Bohdan 提问)和1个定义
- Removed the superfluous public derivation specifiers in the
tutorial and the examples as suggested by Aleksey Gurtovoy
删除"指南"和例子中的多余的公有派生说明，由 Aleksey Gurtovoy 建议
- Various code improvements (no interface changes)
多处代码改进(未改变接口)
- Various html improvements
多处 html 改进
Revised 04 April, 2010
Copyright © 2003-2010 Andreas Huber Dönni
Distributed under the Boost Software License, Version
1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://www.boost.org/LICENSE_1_0.txt)


{% extends "global/Page.html" %} {% load otree static %} {% block title %} Final Results {% endblock %} {% block content %}
Please click the next button to continue to Part 2.
{% comment %}Your Subject ID number is {{ SubjectID }}. When we call your number, please come to the podium for payment. Please wait patiently.
{% endcomment %} {% next_button %} {% endblock %} {% block styles %} {% endblock %}


{% trans %}Cookies are files saved on your phone, tablet or computer when you visit a website.{% endtrans %}
{% trans %}We use cookies to store information about how you use ‘Check if you can get legal aid’, such as the pages you visit.{% endtrans %}


Delivering high quality mobile experiences
Facebook
Instagram
<EMAIL_ADDRESS>Home
Services
Apps
Support
Merchandise
Apps
Home
Apps
Countdowns - Free
iOS/macOS/watchOS
Countdowns is designed to help you count down to those important moments in life. Countdowns is perfect for birthdays, holidays, weddings, anniversaries, vacations, retirement, and other special events!
Progress - Free
iOS/macOS
Progress is designed to help keep track of progress towards goals. Progress is perfect for tracking almost anything - distance, money, time, weight, and more! Stay on target with history charts showing your recent trends!
Recurrence - Free
iOS/macOS
Recurrence is designed to help you track all the repeating tasks in your life. Perfect for tracking chores, bill payment, renewals, and so much more! Recurrence puts tracking history at the forefront, allowing you to see when something was last done & any notes you jotted down at the time.


An in-depth exploration of various books, information about an Asian country, and more. It's a work in progress; expect it to be finished by the end of March 2017.
Below you can find my "fractured fairy tale", where I took a fairy tale and adapted it to Vietnamese cultural elements.
It is loosely based on Cinderella, but is quite different in most regards. Enjoy!
Abused by her stepmother, Huang Chung, a small girl born to Vietnamese parents, walked the long and winding, creaking, cracked staircase to the dusty attic. She was very small for being 14, but even with her limited weight, the stairs moaned under the pressure. Huang sat in the corner, crying, “What have I done to deserve this?”
Her mother died when she was only two, for reasons unknown to the family, but they all consider her an outlier, being the only member of the family who was directly related to her father, who was never around. Huang Chung continued to cry, pitying herself more than ever this August afternoon.
Her stepsister, Huang Thi, had succeeded in winning the most handsome young man in the village, Ling Roma. They would stroll, pretending they were the only people in the village, past the river and down to the pond, not caring for anyone or anything but themselves.
One day, the stepsister and her lover came home together to meet Huang Chung’s stepmother. Upon seeing Huang Chung, who was much more beautiful than her stepsister, the lover demanded to see her at once. Of course, Huang Thi, considering herself far superior to Huang Chung, yelled at her to go back upstairs before the lover could see her very well, but she was too late.
“Why do you hate her?”, he asked.

Huang Thi was furious. She stomped her feet on the ground and screamed. The lover ran up the stairs to see Huang Chung, and the stairs almost broke under his increased weight.
Huang Chung looked fearfully through her dark hair, which was covering her face. When she saw the smile on the young man’s face, however, she opened up. He lifted her into the air in a graceful dance. Huang Thi ran up the stairs, now completely irate.
Ling Roma said, “Now you know how your step sister has felt for all of these years”.
Huang Thi couldn’t stand it any longer. She sulked down the stairs and walked to the river. Knowing she could not fight the current, she jumped in, and was swept away. She was never heard from again.
Huang Chung and Ling Roma left the attic and ran over the pond together. They found the adirondack chairs on the bridge and sat and talked. Ling Roma put his arm over Huang Chung’s shoulders, and they discussed all of their hardships.
The new lovers were happy unto their death fifty years later.


All Files (85.12% covered at 4.2 hits/line)
48 files in total.
410 relevant lines.
349 lines covered and
61 lines missed
- 1
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
- 1
protect_from_forgery with: :exception
end
- 1
class CommentsController < ApplicationController
- 1
before_filter :authenticate_user!
- 1
def create
- 2
@post = Post.find(params[:post_id])
- 2
@comment = @post.comments.create!(comment_params)
- 2
@anonymous = params[:anonymous]
- 2
if @anonymous
- 1
@comment.username = "Anonymous"
else
- 1
@comment.username = current_user.username
end
- 2
@comment.save
- 2
redirect_to post_comments_path(@post)
end
- 1
def index
- 4
@post = Post.find(params[:post_id])
- 4
@comments = @post.comments.order('created_at DESC')
end
- 1
def destroy
end
- 1
private
- 1
def comment_params
- 2
params.require(:comment).permit(:body)
end
end
- 1
class PostsController < ApplicationController
- 1
before_filter :authenticate_user!
- 1
def post_params
- 1
params.require(:post).permit(:user_id, :content, :public)
end
- 1
def index
- 33
@posts = Post.where('public = ? OR user_id = ?', true, current_user.id).order('created_at DESC')
end
- 1
def create
- 1
@user = current_user
- 1
@post = @user.posts.create!(post_params)
- 1
flash[:notice] = "Post successfully saved!"
- 1
redirect_to posts_path
end
- 1
def edit
@post = Post.find(params[:id])
end
- 1
def update
@post = Post.find(params[:id])
@post.update(post_params)
flash[:notice] = "Post successfully edited!"
redirect_to posts_path
end
- 1
def destroy
@post = Post.find(params[:id])
@comments = @post.comments
@comments.each do |comment|
comment.destroy!
end
@likes = @post.likes
@likes.each do |like|
like.destroy!
end
@post.destroy!
flash[:notice] = "Post successfully deleted!"
redirect_to posts_path
end
- 1
def like
- 2
if params[:id]!=nil
- 2
@post = Post.find(params[:id])
- 2
if current_user.liked?(@post)
- 1
@like = Like.find_by(:post_id => @post.id, :user_id => current_user.id)
- 1
@like.destroy
- 1
flash[:notice] = "You unliked the post!"
else
- 1
@like = @post.likes.create(@post_id)
- 1
current_user.likes << @like
- 1
flash[:notice] = "You liked the post!"
end
- 2
@post.save
end
- 2
redirect_to posts_path
end
end
- 1
class ProfilesController < ApplicationController
- 1
respond_to :html, :xml, :json
- 1
def profile_params
params.require(:profile).permit(:info, :motivations, :priorities)
end
- 1
def show
- 3
@viewed_user = User.find(params[:id])
- 3
@profile = @viewed_user.profile
- 3
@owned = @profile == current_user.profile
- 3
if @owned == false
- 1
@profile.info == "Click on text to edit user info." ? @info = " " : @info = @viewed_profile.info
- 1
@profile.motivations == "Click on text to edit user motivations." ? @motivations = " " : @motivations = @viewed_profile.motivations
- 1
@profile.priorities == "Click on text to edit user priorities." ? @priorities = " " : @priorities = @viewed_profile.priorities
end
end
- 1
def update
@profile = current_user.profile
@profile.update(profile_params)
@profile.check_params
@profile.save!
respond_with @profile
end
end
- 1
class RegistrationsController < Devise::RegistrationsController
- 1
after_filter :build_profile, only: :create
- 1
private
- 1
def sign_up_params
- 22
params.require(:user).permit(:username, :name, :email, :password, :password_confirmation, :provider, :uid, :avatar)
end
- 1
def account_update_params
params.require(:user).permit(:username, :name, :email, :password, :password_confirmation, :current_password, :avatar)
end
- 1
def build_profile
- 22
@user = current_user
- 22
@profile = Profile.create({:user_id => @user.id})
- 22
@user.profile = @profile
end
end
- 1
class TaggedPostsController < ApplicationController
- 1
before_filter :authenticate_user!
- 1
def tagged_post_params
- 4
params.require(:tagged_post).permit(:user_id, :content, :tag, :category, :public)
end
- 1
def index
- 25
@taggedposts = TaggedPost.where('public = ? OR user_id = ?', true, current_user.id).order('created_at DESC')
- 25
if params[:sort_tag]
- 2
@taggedposts = @taggedposts.where('tag = ?', params[:sort_tag]).order('created_at DESC')
end
- 25
if params[:sort_category]
- 1
@taggedposts = @taggedposts.where('category = ?', params[:sort_category]).order('created_at DESC')
end
end
- 1
def new
@all_categories = TaggedPost.all_categories
@all_un_goals = TaggedPost.all_un_goals
end
- 1
def create
- 4
@user = current_user
- 4
@tagged = @user.tagged_posts.create!(tagged_post_params)
- 4
flash[:notice] = "Post successfully saved!"
- 4
redirect_to tagged_posts_path
end
- 1
def edit
@post = TaggedPost.find(params[:id])
end
- 1
def update
@post = TaggedPost.find(params[:id])
@post.update(tagged_post_params)
flash[:notice] = "Tagged post successfully edited!"
redirect_to tagged_posts_path
end
- 1
def destroy
@post = TaggedPost.find(params[:id])
@comments = @post.taggedcomments
@comments.each do |comment|
comment.destroy!
end
@likes = @post.likes
@likes.each do |like|
like.destroy!
end
@post.destroy!
flash[:notice] = "Tagged post successfully deleted!"
redirect_to tagged_posts_path
end
- 1
def like
- 2
if params[:id]!=nil
- 2
@post = TaggedPost.find(params[:id])
- 2
if current_user.liked?(@post)
- 1
@like = Like.find_by(:tagged_post_id => @post.id, :user_id => current_user.id)
- 1
@like.destroy
- 1
flash[:notice] = "You unliked the post!"
else
- 1
@like = @post.likes.create
- 1
current_user.likes << @like
- 1
flash[:notice] = "You liked the post!"
end
- 2
@post.save
end
- 2
redirect_to tagged_posts_path
end
end
- 1
class TaggedcommentsController < ApplicationController
- 1
before_filter :authenticate_user!
- 1
def create
- 2
@taggedpost = TaggedPost.find(params[:tagged_post_id])
- 2
@taggedcomment = @taggedpost.taggedcomments.create!(comment_params)
- 2
@anonymous = params[:anonymous]
- 2
if @anonymous
- 1
@taggedcomment.username = "Anonymous"
else
- 1
@taggedcomment.username = current_user.username
end
- 2
@taggedcomment.save
- 2
redirect_to tagged_post_taggedcomments_path(@taggedpost)
end
- 1
def index
- 4
@taggedpost = TaggedPost.find(params[:tagged_post_id])
- 4
@taggedcomments = @taggedpost.taggedcomments.order('created_at DESC')
end
- 1
def destroy
end
- 1
private
- 1
def comment_params
- 2
params.require(:taggedcomment).permit(:body)
end
end
- 1
class WelcomeController < ApplicationController
- 1
def index
- 56
if user_signed_in?
- 29
redirect_to posts_path
end
end
end
- 1
module ApplicationHelper
end
- 1
module CommentsHelper
end
- 1
module LikesHelper
- 1
def toggle_like_button(post, user)
- 33
if user.liked?(post)
- 1
link_to image_tag('like.png', size:"15", alt: "unlike"), like_post_path(post), remote: true
else
- 32
link_to image_tag('unlike.png', size:"15",alt: "like"), like_post_path(post), remote: true
end
end
- 1
def toggle_like_tag_button(post, user)
- 55
if user.liked?(post)
- 1
link_to image_tag('like.png', size:"15",alt: "unlike"), like_tagged_post_path(post), remote: true
else
- 54
link_to image_tag('unlike.png', size:"15",alt: "like"), like_tagged_post_path(post), remote: true
end
end
end
- 1
module PostHelper
end
- 1
module ProfilesHelper
end
- 1
module RegistrationHelper
end
- 1
module TaggedcommentsHelper
end
- 1
module WelcomeHelper
end
- 1
class Comment < ActiveRecord::Base
- 1
belongs_to :post
- 1
belongs_to :user
end
- 1
class Like < ActiveRecord::Base
- 1
belongs_to :post
- 1
belongs_to :tagged_post
- 1
belongs_to :user
end
# Be sure to restart your server when you modify this file.
#
# +grant_on+ accepts:
# * Nothing (always grants)
# * A block which evaluates to boolean (recieves the object as parameter)
# * A block with a hash composed of methods to run on the target object with
# expected values (+votes: 5+ for instance).
#
# +grant_on+ can have a +:to+ method name, which called over the target object
# should retrieve the object to badge (could be +:user+, +:self+, +:follower+,
# etc). If it's not defined merit will apply the badge to the user who
# triggered the action (:action_user by default). If it's :itself, it badges
# the created object (new user for instance).
#
# The :temporary option indicates that if the condition doesn't hold but the
# badge is granted, then it's removed. It's false by default (badges are kept
# forever).
- 1
module Merit
- 1
class BadgeRules
- 1
include Merit::BadgeRulesMethods
- 1
def initialize
# If it creates user, grant badge
# Should be "current_user" after registration for badge to be granted.
# Find badge by badge_id, badge_id takes presidence over badge
# grant_on 'users#create', badge_id: 7, badge: 'just-registered', to: :itself
# If it has 10 comments, grant commenter-10 badge
# grant_on 'comments#create', badge: 'commenter', level: 10 do |comment|
# comment.user.comments.count == 10
# end
# If it has 5 votes, grant relevant-commenter badge
# grant_on 'comments#vote', badge: 'relevant-commenter',
# to: :user do |comment|
#
# comment.votes.count == 5
# end
# Changes his name by one wider than 4 chars (arbitrary ruby code case)
# grant_on 'registrations#update', badge: 'autobiographer',
# temporary: true, model_name: 'User' do |user|
#
# user.name.length > 4
# end
end
end
end
# Be sure to restart your server when you modify this file.
#
# Points are a simple integer value which are given to "meritable" resources
# according to rules in +app/models/merit/point_rules.rb+. They are given on
# actions-triggered, either to the action user or to the method (or array of
# methods) defined in the +:to+ option.
#
# 'score' method may accept a block which evaluates to boolean
# (recieves the object as parameter)
- 1
module Merit
- 1
class PointRules
- 1
include Merit::PointRulesMethods
- 1
def initialize
# score 10, :on => 'users#create' do |user|
# user.bio.present?
# end
#
# score 15, :on => 'reviews#create', :to => [:reviewer, :reviewed]
#
# score 20, :on => [
# 'comments#create',
# 'photos#create'
# ]
#
# score -10, :on => 'comments#destroy'
end
end
end
- 1
class Post < ActiveRecord::Base
- 1
belongs_to :user
- 1
has_many :comments
- 1
has_many :points
- 1
has_many :likes
- 1
has_many :liking_users, :through => :likes, :source => :user
- 1
validates :content, :presence => true
- 1
def classname
- 35
'post'
end
- 1
def find_username
- 66
User.find(self.user_id).username
end
end
- 1
class Profile < ActiveRecord::Base
- 1
belongs_to :user
- 1
def check_params
self.info = "Click on text to edit user info." if self.info.blank?
self.motivations = "Click on text to edit user motivations." if self.motivations.blank?
self.priorities = "Click on text to edit user priorities." if self.priorities.blank?
end
end
- 1
class TaggedPost < ActiveRecord::Base
#has_merit
- 1
belongs_to :user
- 1
has_many :taggedcomments
- 1
has_many :points
- 1
has_many :likes
- 1
has_many :liking_users, :through => :likes, :source => :user
- 1
validates :content, :presence => true
- 1
validates :tag, :presence => true
- 1
validates :category, :presence => true
- 1
def self.all_categories
- 25
%w(Observation Challenge Innovation)
end
- 1
def classname
- 57
'taggedpost'
end
- 1
def find_username
- 110
User.find(self.user_id).username
end
- 1
def self.all_un_goals
- 25
['No Poverty', 'Zero Hunger', 'Good Health And Well-being', 'Quality Education', 'Gender Equality',
'Clean Water And Sanitation', 'Affordable And Clean Energy', 'Decent Work And Ecnomic Growth',
'Industry, Innovation And Infrastructure', 'Reduced Inqualities', 'Sustainale Cities And Communities',
'Responsible Consumption And Production', 'Climate Action', 'Life Below Water', 'Life On Land',
'Peace, Justice and Strong Institutions', 'Partnerships For The Goals']
end
end
- 1
class Taggedcomment < ActiveRecord::Base
- 1
belongs_to :taggedpost
- 1
belongs_to :user
end
- 1
class User < ActiveRecord::Base
#has_merit
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
- 1
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_providers => [:facebook, :google_oauth2],
:authentication_keys => [:email]
- 1
has_many :points
- 1
has_many :posts
- 1
has_many :tagged_posts
- 1
has_many :comments
- 1
has_many :taggedcomments
- 1
has_many :likes, :source => :posts
- 1
has_one :profile, :dependent => :destroy
- 1
validates_presence_of :username
- 1
validates :username, uniqueness: true
- 1
has_attached_file :avatar, styles: { :medium => "300x300>", :thumb =>"100x100>" }, :default_url => "/assets/images/:style/missing.png"
- 1
validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\z/
- 1
def self.from_omniauth(auth)
where(provider: auth.provider, uid: auth.uid).first_or_create do |user|
user.email = auth.info.email
user.username = auth.info.email
user.password = Devise.friendly_token[0,20]
user.name = auth.info.name
if (auth.provider == "facebook")
user.avatar = process_facebook_image(auth.uid, "large")
end
end
end
- 1
def liked?(post)
- 92
if post.classname == 'post'
- 35
Like.find_by(:post_id => post.id, :user_id => self.id)
else
- 57
Like.find_by(:tagged_post_id => post.id, :user_id => self.id)
end
end
- 1
private
- 1
def self.process_facebook_image(uid, type)
"https://graph.facebook.com/#{uid}/picture?type=#{type}"
end
end
- 1
require File.expand_path('../boot', __FILE__)
- 1
require "rails"
# Pick the frameworks you want:
- 1
require "active_model/railtie"
- 1
require "active_job/railtie"
- 1
require "active_record/railtie"
- 1
require "action_controller/railtie"
- 1
require "action_mailer/railtie"
- 1
require "action_view/railtie"
- 1
require "sprockets/railtie"
# require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
- 1
Bundler.require(*Rails.groups)
- 1
module VisionariaApp
- 1
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.
# 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
# Do not swallow errors in after_commit/after_rollback callbacks.
- 1
config.active_record.raise_in_transactional_callbacks = true
end
end
- 1
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
- 1
require 'bundler/setup' # Set up gems listed in the Gemfile.
# Load the Rails application.
- 1
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
- 1
Rails.application.initialize!
- 1
Rails.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!
- 1
config.cache_classes = true
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
- 1
config.eager_load = false
# Configure static file server for tests with Cache-Control for performance.
- 1
config.serve_static_files = true
- 1
config.static_cache_control = 'public, max-age=3600'
# Show full error reports and disable caching.
- 1
config.consider_all_requests_local = true
- 1
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates.
- 1
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment.
- 1
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.
- 1
config.action_mailer.delivery_method = :test
# Randomize the order test cases are executed.
- 1
config.active_support.test_order = :random
# Print deprecation notices to the stderr.
- 1
config.active_support.deprecation = :stderr
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
- 1
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )
# 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.
- 1
Rails.application.config.action_dispatch.cookies_serializer = :json
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
- 1
Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
# Devise will use the `secret_key_base` as its `secret_key`
# by default. You can change it below and use your own secret key.
# config.secret_key = 'c9e7ec62064ae7ee26c626402cb604ae1ce59efc627de079528404a105a82cec01ffd1be6c56ef0ee77dfdbb618a20f26a0297d3a96a5df51ad5a6548311a168'
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
- 1
config.mailer_sender =<EMAIL_ADDRESS># Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
# Configure the parent class responsible to send e-mails.
# config.parent_mailer = 'ActionMailer::Base'
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
- 1
require 'devise/orm/active_record'
# ==> Configuration for any authentication mechanism
# Configure which keys are used when authenticating a user. The default is
# just :email. You can configure it to use [:username, :subdomain], so for
# authenticating a user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
# config.authentication_keys = [:email]
# Configure parameters from the request object used for authentication. Each entry
# given should be a request method and it will automatically be passed to the
# find_for_authentication method and considered in your model lookup. For instance,
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
# The same considerations mentioned for authentication_keys also apply to request_keys.
# config.request_keys = []
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
- 1
config.case_insensitive_keys = [:email]
# Configure which authentication keys should have whitespace stripped.
# These keys will have whitespace before and after removed upon creating or
# modifying a user and when used to authenticate or find a user. Default is :email.
- 1
config.strip_whitespace_keys = [:email]
# Tell if authentication through request.params is enabled. True by default.
# It can be set to an array that will enable params authentication only for the
# given strategies, for example, `config.params_authenticatable = [:database]` will
# enable it only for database (email + password) authentication.
# config.params_authenticatable = true
# Tell if authentication through HTTP Auth is enabled. False by default.
# It can be set to an array that will enable http authentication only for the
# given strategies, for example, `config.http_authenticatable = [:database]` will
# enable it only for database authentication. The supported strategies are:
# :database = Support basic authentication with authentication key + password
# config.http_authenticatable = false
# If 401 status code should be returned for AJAX requests. True by default.
# config.http_authenticatable_on_xhr = true
# The realm used in Http Basic Authentication. 'Application' by default.
# config.http_authentication_realm = 'Application'
# It will change confirmation, password recovery and other workflows
# to behave the same regardless if the e-mail provided was right or wrong.
# Does not affect registerable.
# config.paranoid = true
# By default Devise will store the user in session. You can skip storage for
# particular strategies by setting this option.
# Notice that if you are skipping storage for all authentication paths, you
# may want to disable generating routes to Devise's sessions controller by
# passing skip: :sessions to `devise_for` in your config/routes.rb
- 1
config.skip_session_storage = [:http_auth]
# By default, Devise cleans up the CSRF token on authentication to
# avoid CSRF token fixation attacks. This means that, when using AJAX
# requests for sign in and sign up, you need to get a new CSRF token
# from the server. You can disable this option at your own risk.
# config.clean_up_csrf_token_on_authentication = true
# When false, Devise will not attempt to reload routes on eager load.
# This can reduce the time taken to boot the app but if your application
# requires the Devise mappings to be loaded during boot time the application
# won't boot properly.
# config.reload_routes = true
# ==> Configuration for :database_authenticatable
# For bcrypt, this is the cost for hashing the password and defaults to 11. If
# using other algorithms, it sets how many times you want the password to be hashed.
#
# Limiting the stretches to just one in testing will increase the performance of
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
# a value less than 10 in other environments. Note that, for bcrypt (the default
# algorithm), the cost increases exponentially with the number of stretches (e.g.
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
- 1
config.stretches = Rails.env.test? ? 1 : 11
# Set up a pepper to generate the hashed password.
# config.pepper = 'f1a4e1b047245fa0631cb525ef7a9e697711ecade32ff79fe2920e8d041d08824cc8e1b3b8423066f0342b445045fbd68b60e9ddd4d889469ca908fe6f981e55'
# Send a notification email when the user's password is changed
# config.send_password_change_notification = false
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming their account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming their account,
# access will be blocked just in the third day. Default is 0.days, meaning
# the user cannot access the website without confirming their account.
# config.allow_unconfirmed_access_for = 2.days
# A period that the user is allowed to confirm their account before their
# token becomes invalid. For example, if set to 3.days, the user can confirm
# their account within 3 days after the mail was sent, but on the fourth day
# their account can't be confirmed with the token any more.
# Default is nil, meaning there is no restriction on how long a user can take
# before confirming their account.
# config.confirm_within = 3.days
# If true, requires any email changes to be confirmed (exactly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
# db field (see migrations). Until confirmed, new email is stored in
# unconfirmed_email column, and copied to email column on successful confirmation.
- 1
config.reconfirmable = true
# Defines which key will be used when confirming an account
# config.confirmation_keys = [:email]
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
# Invalidates all the remember me tokens when the user signs out.
- 1
config.expire_all_remember_me_on_sign_out = true
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
# Options to be passed to the created cookie. For instance, you can set
# secure: true in order to force SSL only cookies.
# config.rememberable_options = {}
# ==> Configuration for :validatable
# Range for password length.
- 1
config.password_length = 6..128
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
- 1
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again. Default is 30 minutes.
# config.timeout_in = 30.minutes
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
# :none = No lock strategy. You should handle locking by yourself.
# config.lock_strategy = :failed_attempts
# Defines which key will be used when locking and unlocking an account
# config.unlock_keys = [:email]
# Defines which strategy will be used to unlock an account.
# :email = Sends an unlock link to the user email
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
# :both = Enables both strategies
# :none = No unlock strategy. You should handle unlocking by yourself.
# config.unlock_strategy = :both
# Number of authentication tries before locking an account if lock_strategy
# is failed attempts.
# config.maximum_attempts = 20
# Time interval to unlock the account if :time is enabled as unlock_strategy.
# config.unlock_in = 1.hour
# Warn on the last attempt before the account is locked.
# config.last_attempt_warning = true
# ==> Configuration for :recoverable
#
# Defines which key will be used when recovering the password for an account
# config.reset_password_keys = [:email]
# Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to
# change their passwords.
- 1
config.reset_password_within = 6.hours
# When set to false, does not sign a user in automatically after their password is
# reset. Defaults to true, so a user is signed in automatically after a reset.
# config.sign_in_after_reset_password = true
# ==> Configuration for :encryptable
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
# You can use :sha1, :sha512 or algorithms from others authentication tools as
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
# for default behavior) and :restful_authentication_sha1 (then you should set
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
#
# Require the `devise-encryptable` gem when using anything other than bcrypt
# config.encryptor = :sha512
# ==> Scopes configuration
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
# are using only default views.
# config.scoped_views = false
# Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user).
# config.default_scope = :user
# Set this configuration to false if you want /users/sign_out to sign out
# only the current scope. By default, Devise signs out all scopes.
# config.sign_out_all_scopes = true
# ==> Navigation configuration
# Lists the formats that should be treated as navigational. Formats like
# :html, should redirect to the sign in page when the user does not have
# access, but formats like :xml or :json, should return 401.
#
# If you have any extra navigational formats, like :iphone or :mobile, you
# should add them to the navigational formats lists.
#
# The "*/*" below is required to match Internet Explorer requests.
# config.navigational_formats = ['*/*', :html]
# The default HTTP method used to sign out a resource. Default is :delete.
- 1
config.sign_out_via = :delete
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
- 1
require "omniauth-facebook"
- 1
config.omniauth :facebook, '1804042419852791', 'b4ce55b93b0eb6e8095239b04106a209',
#callback_url: "https://visionaria-app.herokuapp.com/users/auth/facebook/callback"
callback_url: "https://dodospace-joannangx.c9users.io/users/auth/facebook/callback"
- 1
require "omniauth-google-oauth2"
- 1
config.omniauth :google_oauth2, '9884639142-qv16tsit81bqq06vb468le9sod9i3lt0.apps.googleusercontent.com', 'RfQMCLBnf2u8vVsaJcOiNUG3'
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
#
# config.warden do |manager|
# manager.intercept_401 = false
# manager.default_strategies(scope: :user).unshift :some_external_strategy
# end
# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
# is mountable, there are some extra configurations to be taken into account.
# The following options are available, assuming the engine is mounted as:
#
# mount MyEngine, at: '/my_engine'
#
# The router that invoked `devise_for`, in the example above, would be:
# config.router_name = :my_engine
#
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
- 1
config.authentication_keys = [ :email ]
- 1
config.scoped_views = true
end
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
- 1
Rails.application.config.filter_parameters += [:password]
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) 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(:en) do |inflect|
# inflect.acronym 'RESTful'
# end
# Use this hook to configure merit parameters
- 1
Merit.setup do |config|
# Check rules on each request or in background
# config.checks_on_each_request = true
# Define ORM. Could be :active_record (default) and :mongoid
# config.orm = :active_record
# Add application observers to get notifications when reputation changes.
# config.add_observer 'MyObserverClassName'
# Define :user_model_name. This model will be used to grand badge if no
# `:to` option is given. Default is 'User'.
# config.user_model_name = 'User'
# Define :current_user_method. Similar to previous option. It will be used
# to retrieve :user_model_name object if no `:to` option is given. Default
# is "current_#{user_model_name.downcase}".
# config.current_user_method = 'current_user'
end
# Create application badges (uses https://github.com/norman/ambry)
# badge_id = 0
# [{
# id: (badge_id = badge_id+1),
# name: 'just-registered'
# }, {
# id: (badge_id = badge_id+1),
# name: 'best-unicorn',
# custom_fields: { category: 'fantasy' }
# }].each do |attrs|
# Merit::Badge.create! attrs
# 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
# Be sure to restart your server when you modify this file.
- 1
Rails.application.config.session_store :cookie_store, key: '_visionaria_app_session'
- 1
SocialShareButton.configure do |config|
- 1
config.allow_sites = %w(facebook)
end
# 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.
- 1
ActiveSupport.on_load(:action_controller) do
- 1
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
end
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
# self.include_root_in_json = true
# end
- 1
Rails.application.routes.draw do
- 1
devise_for :users, :controllers => { omniauth_callbacks: 'users/omniauth_callbacks', registrations: 'registrations' }
- 1
resources :profiles, only: [:show, :edit, :update]
- 1
resources :posts, only: [:index, :show, :create, :like, :destroy] do
- 1
resources :comments
- 1
member do
- 1
get 'like'
end
end
- 1
get 'posts/:id/edit', to: 'posts#edit', as: :edit_post
- 1
put 'posts/:id', to: 'posts#update'
- 1
resources :tagged_posts, only: [:index, :show, :create, :like, :destroy] do
- 1
resources :taggedcomments
- 1
member do
- 1
get 'like'
end
end
- 1
get 'tagged_posts/:id/edit', to: 'tagged_posts#edit', as: :edit_tagged_post
- 1
put 'tagged_posts/:id', to: 'tagged_posts#update'
- 1
root 'welcome#index'
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
# root 'welcome#index'
# Example of regular route:
# get 'products/:id' => 'catalog#view'
# Example of named route that can be invoked with purchase_url(id: product.id)
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
# Example resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Example resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Example resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Example resource route with more complex sub-resources:
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', on: :collection
# end
# end
# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable
# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
end
- 1
Given /I am signed in as an admin/ do
- 2
pending
end
- 1
Then /^I should be able to delete the post by "([^"]*)"$/ do |user|
pending
end
- 1
Given /the following comments exist/ do |table|
# table is a Cucumber::MultilineArgument::DataTable
#pending # Write code here that turns the phrase above into concrete actions
- 4
table.hashes.each do |comment|
- 4
Comment.create(comment)
end
end
- 1
When /I click on the image "(.*)"/ do |image|
find('#image').click
end
- 1
Given /the following posts exist/ do |table|
# table is a Cucumber::MultilineArgument::DataTable
#pending # Write code here that turns the phrase above into concrete actions
- 13
table.hashes.each do |post|
- 27
Post.create(post)
end
end
- 1
When /I look at the posts/ do
- 1
visit '/posts'
end
- 1
When(/^I delete the post with "([^"]*)"$/) do |arg1|
pending # Write code here that turns the phrase above into concrete actions
end
- 1
When(/^I choose to edit my post with "([^"]*)"$/) do |arg1|
- 1
pending # Write code here that turns the phrase above into concrete actions
end
- 1
When(/^I choose to delete my post with "([^"]*)"$/) do |arg1|
- 1
pending # Write code here that turns the phrase above into concrete actions
end
- 1
Then(/^I should not see an edit option for the post with "([^"]*)" by "([^"]*)"$/) do |arg1, arg2|
- 1
pending # Write code here that turns the phrase above into concrete actions
end
- 1
Then(/^I should not see a delete option for the post "([^"]*)" by "([^"]*)"$/) do |arg1, arg2|
pending # Write code here that turns the phrase above into concrete actions
end
- 1
When(/^I follow edit$/) do
pending # Write code here that turns the phrase above into concrete actions
end
- 1
Then(/^I change the$/) do
pending # Write code here that turns the phrase above into concrete actions
end
- 1
Given /the following profiles exist/ do |table|
# table is a Cucumber::MultilineArgument::DataTable
#pending # Write code here that turns the phrase above into concrete actions
- 3
table.hashes.each do |profile|
- 6
Profile.create(profile)
end
end
- 1
Then(/^I should see "([^"]*)" points for "([^"]*)"$/) do |arg1, arg2|
pending # Write code here that turns the phrase above into concrete actions
end
- 1
Then(/^I should see all my visions$/) do
pending # Write code here that turns the phrase above into concrete actions
end
- 1
Then(/^I should see all my tagged posts$/) do
pending # Write code here that turns the phrase above into concrete actions
end
- 1
When(/^I am signed in as "([^"]*)" and view my profile$/) do |username|
- 2
@user = User.find_by_username(username)
- 2
visit<EMAIL_ADDRESS>end
- 1
When(/^I view the profile page of "([^"]*)"$/) do |username|
- 1
@user = User.find_by_username(username)
- 1
visit<EMAIL_ADDRESS>end
- 1
When(/^I can click and edit my user "([^"]*)"$/) do |arg1|
- 3
if arg1 == "info"
- 1
find('.edit_input_wrap', :text => 'Click on text to edit user info.').click
elsif arg1 == "motivations"
- 1
find('.edit_input_wrap', :text => 'Click on text to edit user motivations.').click
else
- 1
find('.edit_input_wrap', :text => 'Click on text to edit user priorities.').click
end
end
- 1
Given /the following tagged posts exist/ do |table|
# table is a Cucumber::MultilineArgument::DataTable
#pending # Write code here that turns the phrase above into concrete actions
- 19
table.hashes.each do |post|
- 38
TaggedPost.create(post)
end
end
- 1
When /^I look at the tagged posts$/ do
- 13
visit tagged_posts_path
end
- 1
When /^I follow image link "([^"]*)"$/ do |img_alt|
- 6
find(:xpath, "//img[@alt = '#{img_alt}']/parent::a").click()
end
- 1
Then /^I should see the image "(.+)"$/ do |image|
- 1
page.should have_xpath("//img[@alt = '#{image}']/parent::a")
end
- 1
Given /the following users exist/ do |table|
# table is a Cucumber::MultilineArgument::DataTable
#pending # Write code here that turns the phrase above into concrete actions
- 28
table.hashes.each do |user|
- 56
User.create(user)
end
end
- 1
Given /^I sign up as "([^"]*)" with "([^"]*)", email "([^"]*)", and name "([^"]*)"/ do |user, password, email, name|
- 21
visit '/users/sign_up'
- 21
fill_in "Username", :with => user
- 21
fill_in "Email", :with => email
- 21
fill_in "Name", :with => name
- 21
fill_in "Password", :with => password
- 21
fill_in "Password confirmation", :with => password
- 21
click_button "Sign up"
- 21
step %Q{I should see "#{user}"}
end
- 1
Given(/^I sign up as an admin "([^"]*)" with "([^"]*)", email "([^"]*)", and name "([^"]*)"$/) do |arg1, arg2, arg3, arg4|
pending # Write code here that turns the phrase above into concrete actions
end
- 1
When(/^I choose "([^"]*)" from "([^"]*)"$/) do |arg1, arg2|
pending # Write code here that turns the phrase above into concrete actions
end
- 1
When(/^I view my setting$/) do
- 2
pending # Write code here that turns the phrase above into concrete actions
end
- 1
Given(/^I am signed in with username "([^"]*)", email "([^"]*)" and password "([^"]*)"$/) do |username, email, password|
- 3
visit '/users/sign_in'
- 3
fill_in "Email", :with => email
- 3
fill_in "Password", :with => password
- 3
click_button "Log in"
- 3
step %Q{I should see "#{username}"}
end
#Given /facebook login/ do
# find(:css, 'a.facebook').click
#end
#Given /I should put in email "([^"]*)" and password "([^"]*)"/ do |user, password|
# fill_in('email', with: user)
# fill_in('pass', with: password)
# click_button('Log In')
#end


WEBSITE NOT FOUND
The website you are looking for cannot be found. If you are the user of this website, please click below link to access the website.
Click HereThe website you are looking for cannot be found. If you are the user of this website, please click below link to access the website.
Click Here


Completed on 2/9/2015
The footer of this page completes the task of listing recent blog posts from the RSS feed.
I have included a debug panel below the footer to allow for dynamic customization.
Debug panel features:
- Change number of listings displayed
- Change truncation length
- Change visual style (styles 0,1,2)
- Change blog feed URL (put in a bad URL to see how the design handles it)
The LogicMonitor homepage with a dynamic footer that displays the latest blog posts. If the feed is down, the design will match the previous layout. Go »
Full homepage with debug panel below the blog listing Go »
CUSTOMIZE
©2008-2014 LogicMonitor, Inc. LogicMonitor® is a registered trademark of LogicMonitor, Inc.
All other trademarks belong to their respective owners. All rights reserved. Privacy Policy


Peanut Butter and Apple Layer Cake
September 14, 2019
When I was about ten years old, my brother and I would come home everyday to a snack. I remember always being so excited to get home so I could munch of something. But what excited me the most was that our daily snack would be something different every time. Sometimes it would be fried spring rolls or fried bananas, but one of my favorite snacks was something super simple: slices of apples with creamy peanut butter.
There was something about the cold, crisp apples paired and the smooth nutty spread that I couldn’t get over. For me, that combination is what chocolate & candy bars were to other kids. At the time, I thought I had discovered something ingenious and special to my family. Although I quickly learned that apple and peanut butter was nothing new (lol), I was glad that I could enjoy the novelty of such a simple snack during my younger days.
This recipe is inspired by all the childhood memories, laughs, and smiles that came with eating apples with peanut butter. The combination is so timeless I don’t see how anyone who loves peanut butter and loves apples could deem it unworthy of enjoyment. Of course, to each their own, but I am happy to say that this is one of my favorite layer cakes. The peanut butter buttercream uses salted butter that pairs beautifully with the nuttiness of the icing and the natural fruitiness of the cake. Did I mention this cake happens to be vegan? Yup, miracles do exist. I found a vanilla cake recipe by Man About Cake on Youtube and fell in love with it’s simplicity. The oil keeps the cake super moist and helps keep my bank account in check as well. While you could definitely switch out the soy milk for regular milk, I say try this recipe as is just to surprise yourself a little bit. I certainly was baffled by how irresistible it was.
Recipe is down below! Give it a try and let me know how you like it.
Ingredients (serves 8)
For the Applesauce
- 5-6 medium apples
- 1/3 cup sugar
- 1 stick cinnamon
For the Vegan Apple Cake
- 6 cups all-purpose flour
- 3 cups granulated sugar
- 4 tsp. baking soda
- 2 tsp. salt
- 2 tbsp. white vinegar
- 2 cups soy milk
- 1 + 1/3 cup vegetable oil
- 3 cups applesauce
For the Salted Peanut Butter Swiss Meringue Buttercream
- 8 egg whites
- 1 cup granulated sugar
- 6 sticks salted butter
- 3/4 cup creamy peanut butter (room temperature)
- 1 tbsp. vanilla extract
How to make
For the Applesauce
- Quarter and core the apples and cut into medium-sized chunks (approximately 5cm thick all around).
- Place the cut apples, sugar, cinnamon stick in a large saucepot with 1/4 cup of water. Bring the apples to a simmer over medium heat. Cover and continue to cook until the apples give easily when prodded with a fork, about 20 minutes.
- Discard the cinnamon stick. Transfer the cooked apples to a food processor or high-speed blender and blend until smooth.
- Set aside to cool.
For the Vegan Apple Cake
- Preheat the oven to 175C/350F and line three 8-inch rounds with parchment paper.
- Combine the flour, sugar, baking soda, and salt in a large bowl and mix to combine.
- Pour the vinegar into the soy milk and set aside for 5 minutes to curdle. Combine the vanilla extract with the vegetable oil.Once the soy milk has curdled, combine with the oil and vanilla mixture.
- Gradually add the liquid ingredients into the dry ingredients, mixing to incorporate. Once the mixture is free of lumps, divide the batter evenly between the parchment lined baking rounds. Bake for approximately 35-40 minutes, or until a cake tester inserted in the center of each cake comes out clean.
- Cool completely before icing.
For the Salted Peanut Butter Swiss Meringue Buttercream
- Combine the egg whites and sugar in a large mixing bowl. Place over a saucepot of simmering water and whisk until the egg whites reach 21C/70F and the sugar is completely dissolved.
- Remove the egg whites from the bain marie and whisk with an electric whisk until the meringue reaches stiff peaks.
- Add the salted butter 1 tbsp. at a time, making sure that the previous addition of butter is fully incorporated before adding the next.
- Once the buttercream has emulsified, add the peanut butter and vanilla extract. Mix until fully incorporated.
Meet the brad behind the butter...
Hello and welcome to you new home!  Here on Brad & Butter, I bake, shake, style, and snap tot tell inspiring stories. This blog is a manifestation of all the things in life at have inspired me to act upon something. And in turn, I hope that whatever I wrtie, bake, or shake can inspire other people. Click here to learn about me...
Read More
leave a reply


University of Warwick | 2015-2018
History of Art(BA), First Class Honours
Bootham School, York | September 2007- July 2014
- August 2014 - A levels: Classical Civilisation (A), History (A), General Studies (A), Biology (B)
- August 2012 - GCSE’s: A*: Maths, English Literature, English Language, French, Art;
A: Biology, Chemistry, Physics, History, Latin; B: Geography


RecordRTC: WebRTC audio/video recording ® Muaz Khan
HOME © Muaz Khan . @WebRTCWeb . Github . Latest issues . What's New?
Record Audio ( RecordRTC.org )
// you can even use URL parameters: ?bufferSize=0&sampleRate=44100 ?leftChannel=false&disableLogs=false
Record Video (in chrome)
/ Record video on Firefox// you can even use URL parameters: ?canvas_width=1280&canvas_height=720
Record video as animated gif image (both Chrome/Firefox):
Try Audio+Video Recording on Firefox
- ConcatenateBlobs.js - Concatenate multiple recordings in single Blob!
- RecordRTC / PHP / FFmpeg (synced audio/video in single file!)
- RecordRTC-to-Nodejs (used ffmpeg to merge wav/webm in single WebM container)
- RecordRTC-to-PHP (audio/video recording and uploading to server)
- RecordRTC-to-ASP.NET MVC (audio/video recording and uploading to server)
- Canvas Recording! (webpage recording)
- MRecordRTC and writeToDisk/getFromDisk!
- RecordRTC-to-Socket.io (used ffmpeg to merge wav/webm in single WebM container)
- RecordRTC and ffmpeg-asm.js (ffmpeg inside the browser!)
Using RecordRTC...
You can record audio in wav/ogg file format; and video in either webm format or as animated GIF image.
Technical Guide
- Chrome allows getUserMedia invocation on majority of non-file protocols e.g. HTTP/HTTPS/ or inside chrome extension pages. Though, there is always options to use CL (command-line) flags to support file protocols.
- ( In Chrome) RecordRTC captures video frames via Canvas2D; which is encoded in webp-DataURL; now it is using a library named “weppy” which encodes webp into webm.
- ( In Firefox) RecordRTC is using MediaRecorder API; which supports both audio/video recordings, both in single and multiple files.
- ( In Chrome) RecordRTC is using WebAudio API for audio-recording. Such API has many issues e.g. unable to capture mono audio in wav format; unable to capture remote audio; failure on XP SP2; etc.
- ( In Chrome) If you’re using notebook’s built-in audio input device for audio recording; then you may get "blank" blob.
- ( In Chrome) RecordRTC is incapable to record audio/video in a single file; however there is ffmpeg merging solution available on Github repository.
How to use RecordRTC?
<script src="//cdn.webrtc-experiment.com/RecordRTC.js"></script>
How to record audio using RecordRTC?
var recordRTC = RecordRTC(mediaStream); recordRTC.startRecording(); recordRTC.stopRecording(function(audioURL) { mediaElement.src = audioURL; });
How to record video using RecordRTC?
var options = { type: 'video', video: { width: 320, height: 240 }, canvas: { width: 320, height: 240 } }; var recordRTC = RecordRTC(mediaStream, options); recordRTC.startRecording(); recordRTC.stopRecording(function(videoURL) { mediaElement.src = videoURL; });
How to record animated GIF using RecordRTC?
// you must link: // https://www.webrtc-experiment.com/gif-recorder.js var options = { type: 'gif', video: { width: 320, height: 240 }, canvas: { width: 320, height: 240 }, frameRate: 200, quality: 10 }; var recordRTC = RecordRTC(mediaStream, options); recordRTC.startRecording(); recordRTC. stopRecording(function(gifURL) { mediaElement.src = gifURL; });
Possible issues/failures:
(
In Chrome) The biggest issue is that RecordRTC is
unable to record both audio and video streams in single file.
Do you know "RecordRTC" fails recording audio because following conditions fails (
applies only to chrome):
- Sample rate and channel configuration must be the same for input and output sides on Windows i.e. audio input/output devices must match
- Only the Default microphone device can be used for capturing.
- The requesting scheme is must be one of the following: http, https, chrome, extension's, or file (only works with --allow-file-access-from-files)
- The browser must be able to create/initialize the metadata database for the API under the profile directory
RecordRTC is MIT licensed on Github! Documentation


Routes in Iconify Icon Finder
This tutorial is part of Iconify Icon Finder Core tutorial.
Every view has a route associated with it. Route makes it easy to save and restore Icon Finder state, so visitor can continue browsing page from the previous session.
A route is a simple object of type PartialRoute describing the current view. It has a route type, set of parameters and optional parent route.
For example, this route represents collections list:
{
"type": "collections"
}
Each route can have parameters object, which is optional for icon sets list but is required for other route types.
For example, this route represents displaying second page (pages start with 0) of collection "mdi":
{
"type": "collection",
"params": {
"prefix": "mdi",
"page": 1
}
}
In this example route represents searching collection "mdi" for icons that contain "arrow" and are part of the "Account / User" category:
{
"type": "collection",
"params": {
"prefix": "mdi",
"filter": "arrow",
"tag": "Account / User"
}
}
Each route can have the parent route. For example, this is what route looks like if you browsed collections list, then searched for "home", then from search results selected "ant-design" collection to show only icons that belong to that collection:
{
"type": "collection",
"params": {
"prefix": "ant-design",
"filter": "home"
},
"parent": {
"type": "search",
"params": {
"keyword": "home"
},
"parent": {
"type": "collections"
}
}
}
Types
There are 5 types of routes. Almost all of them have required parameters:
- "collections": Shows list of collections. No required parameters.
- "collection": Shows one collection. Required parameter: prefix that matches icon set prefix.
- "search": Shows search results. Required parameter: keyword that contains a phrase to search for. Search is case-insensitive.
- "custom": Shows custom icons list (more about custom views below). Required parameter: customType.
- "empty": Shows empty content. This is used if you want UI to display only the footer. No parameters.
Collections
Collections list route is represented by type CollectionsRoute and has the following optional parameters:
- filter, string. Used for searching collections list. The default value is an empty string "".
- category, string | null. Used to show icon sets only from one category. The default value is null.
Collection
Collection route is represented by type CollectionRoute and has one required parameter:
- prefix, string. Icon set prefix.
It also has the following optional parameters:
- filter, string. Keyword to filter icons. The default value is an empty string "".
- page, number. Current page number. The default value is 0.
- tag, string | null. Tag filter. If not null, only icons that include tag will be shown. Value could be an empty string to show icons that do not have any tag. The default value is null.
- themePrefix, string | null. Theme prefix. Value is a theme name, not an actual prefix. See the Prefixes and Suffixes section below. The default value is null.
- themeSuffix, string | null. Same as above, but for the suffix.
Search
Search results route is represented by type SearchRoute and has one required parameter:
- search, string. Search keyword. Value is case-insensitive and cannot be empty.
It also has the following optional parameters:
- page, number. Current page number. The default value is 0.
- mode, boolean. True if more results are available. The default value is true for pages 0 and 1, false for other pages.
By default, Icon Finder will retrieve only the first 2 pages of results from API. This is done to reduce the load on API because often visitors don't look further than the first page. Additional results can be retrieved by changing the current page to 2 (or higher).
Custom
Custom icons list route is represented by type CustomRoute and has one required parameter:
- customType, string. Custom page type. Value is used to tell the difference between various custom icon lists. For example, value for recent icons list can be "recent", value for bookmarked icons can be "bookmarks".
It also has the following optional parameters:
- filter, string. Keyword to filter icons. The default value is an empty string "".
- page, number. Current page number. The default value is 0.
For more information about a custom view, see custom view documentation.
Prefixes and suffixes
The collection route can have theme prefix and/or suffix. They define icon variations based on part of icon name, such as Filled and Outline variations of the same icon.
Theme prefixes and suffixes have 2 properties:
- prefix (or suffix), string. This is a prefix or suffix part of icons name, such as "baseline-" or "-outline".
- title, string. Title to show, such as "Baseline" or "Outline".
In all filters in all routes, the title is used as a value, not prefix/suffix. So for example, if in an icon set there is a prefix with value "round-" and the title "Round", the route would have "Round" as prefix:
{
"type": "collection",
"params": {
"prefix": "ic",
"themePrefix": "Round"
}
}
Icon set can use both prefixes and suffixes at the same time, however, as of time when this documentation was created, no icon set does that. Icon sets usually use only prefix or suffix.
Router
Routes are handled by Router instance. See Router documentation for details.


RKEELjars: Java Executable .jar Files for 'RKEEL'
'KEEL' is a popular Java software for a large number of different knowledge data discovery tasks. Furthermore, 'RKEEL' is a package with a R code layer between R and 'KEEL', for using 'KEEL' in R code. This package downloads and install the .jar files necessary for 'RKEEL' algorithms execution. For more information about 'KEEL', see <http://www.keel.es/>.
| Version: |
1.0.18 |
| Imports: |
downloader, utils |
| Published: |
2018-06-27 |
| Author: |
Jose M. Moyano [aut, cre],
Luciano Sanchez Ramos [aut] |
| Maintainer: |
Jose M. Moyano <jmoyano at uco.es> |
| License: |
GPL-3 |
| NeedsCompilation: |
no |
| Citation: |
RKEELjars citation info |
| CRAN checks: |
RKEELjars results |
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=RKEELjars
to link to this page.


001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019 package org.apache.shiro.web.servlet; 020 021 import org.slf4j.Logger; 022 import org.slf4j.LoggerFactory; 023 024 import javax.servlet.FilterChain; 025 import javax.servlet.ServletException; 026 import javax.servlet.ServletRequest; 027 import javax.servlet.ServletResponse; 028 import java.io.IOException; 029 030 /** 031 * Filter base class that guarantees to be just executed once per request, 032 * on any servlet container. It provides a {@link #doFilterInternal} 033 * method with HttpServletRequest and HttpServletResponse arguments. 034 *
 035 * The {@link #getAlreadyFilteredAttributeName} method determines how 036 * to identify that a request is already filtered. The default implementation 037 * is based on the configured name of the concrete filter instance. 038 *
Controlling filter execution
 039 * 1.2 introduced the {@link #isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)} method and 040 * {@link #isEnabled()} property to allow explicit controll over whether the filter executes (or allows passthrough) 041 * for any given request. 042 *
 043 * NOTE This class was initially borrowed from the Spring framework but has continued modifications. 044 * 045 * @since 0.1 046 */ 047 public abstract class OncePerRequestFilter extends NameableFilter { 048 049 /** 050 * Private internal log instance. 051 */ 052 private static final Logger log = LoggerFactory.getLogger(OncePerRequestFilter.class); 053 054 /** 055 * Suffix that gets appended to the filter name for the "already filtered" request attribute. 056 * 057 * @see #getAlreadyFilteredAttributeName 058 */ 059 public static final String ALREADY_FILTERED_SUFFIX = ".FILTERED"; 060 061 /** 062 * Determines generally if this filter should execute or let requests fall through to the next chain element. 063 * 064 * @see #isEnabled() 065 */ 066 private boolean enabled = true; //most filters wish to execute when configured, so default to true 067 068 /** 069 * Returns {@code true} if this filter should generally* execute for any request, 070 * {@code false} if it should let the request/response pass through immediately to the next 071 * element in the {@link FilterChain}. The default value is {@code true}, as most filters would inherently need 072 * to execute when configured. 073 *
 074 * * This configuration property is for general configuration for any request that comes through 075 * the filter. The 076 * {@link #isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse) isEnabled(request,response)} 077 * method actually determines whether or not if the filter is enabled based on the current request. 078 * 079 * @return {@code true} if this filter should generally execute, {@code false} if it should let the 080 * request/response pass through immediately to the next element in the {@link FilterChain}. 081 * @since 1.2 082 */ 083 public boolean isEnabled() { 084 return enabled; 085 } 086 087 /** 088 * Sets whether or not this filter generally executes for any request. See the 089 * {@link #isEnabled() isEnabled()} JavaDoc as to what general execution means. 090 * 091 * @param enabled whether or not this filter generally executes. 092 * @since 1.2 093 */ 094 public void setEnabled(boolean enabled) { 095 this.enabled = enabled; 096 } 097 098 /** 099 * This {@code doFilter} implementation stores a request attribute for 100 * "already filtered", proceeding without filtering again if the 101 * attribute is already there. 102 * 103 * @see #getAlreadyFilteredAttributeName 104 * @see #shouldNotFilter 105 * @see #doFilterInternal 106 */ 107 public final void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) 108 throws ServletException, IOException { 109 String alreadyFilteredAttributeName = getAlreadyFilteredAttributeName(); 110 if ( request.getAttribute(alreadyFilteredAttributeName) != null ) { 111 log.trace("Filter '{}' already executed. Proceeding without invoking this filter.", getName()); 112 filterChain.doFilter(request, response); 113 } else //noinspection deprecation 114 if (/* added in 1.2: */ !isEnabled(request, response) || 115 /* retain backwards compatibility: */ shouldNotFilter(request) ) { 116 log.debug("Filter '{}' is not enabled for the current request. Proceeding without invoking this filter.", 117 getName()); 118 filterChain.doFilter(request, response); 119 } else { 120 // Do invoke this filter... 121 log.trace("Filter '{}' not yet executed. Executing now.", getName()); 122 request.setAttribute(alreadyFilteredAttributeName, Boolean.TRUE); 123 124 try { 125 doFilterInternal(request, response, filterChain); 126 } finally { 127 // Once the request has finished, we're done and we don't 128 // need to mark as 'already filtered' any more. 129 request.removeAttribute(alreadyFilteredAttributeName); 130 } 131 } 132 } 133 134 /** 135 * Returns {@code true} if this filter should filter the specified request, {@code false} if it should let the 136 * request/response pass through immediately to the next element in the {@code FilterChain}. 137 *
 138 * This default implementation merely returns the value of {@link #isEnabled() isEnabled()}, which is 139 * {@code true} by default (to ensure the filter always executes by default), but it can be overridden by 140 * subclasses for request-specific behavior if necessary. For example, a filter could be enabled or disabled 141 * based on the request path being accessed. 142 *
 143 * Helpful Hint: if your subclass extends {@link org.apache.shiro.web.filter.PathMatchingFilter PathMatchingFilter}, 144 * you may wish to instead override the 145 * {@link org.apache.shiro.web.filter.PathMatchingFilter#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse, String, Object) 146 * PathMatchingFilter.isEnabled(request,response,path,pathSpecificConfig)} 147 * method if you want to make your enable/disable decision based on any path-specific configuration. 148 * 149 * @param request the incoming servlet request 150 * @param response the outbound servlet response 151 * @return {@code true} if this filter should filter the specified request, {@code false} if it should let the 152 * request/response pass through immediately to the next element in the {@code FilterChain}. 153 * @throws IOException in the case of any IO error 154 * @throws ServletException in the case of any error 155 * @see org.apache.shiro.web.filter.PathMatchingFilter#isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse, String, Object) 156 * @since 1.2 157 */ 158 @SuppressWarnings({"UnusedParameters"}) 159 protected boolean isEnabled(ServletRequest request, ServletResponse response) throws ServletException, IOException { 160 return isEnabled(); 161 } 162 163 /** 164 * Return name of the request attribute that identifies that a request has already been filtered. 165 *
 166 * The default implementation takes the configured {@link #getName() name} and appends "{@code .FILTERED}". 167 * If the filter is not fully initialized, it falls back to the implementation's class name. 168 * 169 * @return the name of the request attribute that identifies that a request has already been filtered. 170 * @see #getName 171 * @see #ALREADY_FILTERED_SUFFIX 172 */ 173 protected String getAlreadyFilteredAttributeName() { 174 String name = getName(); 175 if (name == null) { 176 name = getClass().getName(); 177 } 178 return name + ALREADY_FILTERED_SUFFIX; 179 } 180 181 /** 182 * Can be overridden in subclasses for custom filtering control, 183 * returning true to avoid filtering of the given request. 184 *
The default implementation always returns false. 185 * 186 * @param request current HTTP request 187 * @return whether the given request should not be filtered 188 * @throws ServletException in case of errors 189 * @deprecated in favor of overriding {@link #isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)} 190 * for custom behavior. This method will be removed in Shiro 2.0. 191 */ 192 @Deprecated 193 @SuppressWarnings({"UnusedDeclaration"}) 194 protected boolean shouldNotFilter(ServletRequest request) throws ServletException { 195 return false; 196 } 197 198 199 /** 200 * Same contract as for 201 * {@link #doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)}, 202 * but guaranteed to be invoked only once per request. 203 * 204 * @param request incoming {@code ServletRequest} 205 * @param response outgoing {@code ServletResponse} 206 * @param chain the {@code FilterChain} to execute 207 * @throws ServletException if there is a problem processing the request 208 * @throws IOException if there is an I/O problem processing the request 209 */ 210 protected abstract void doFilterInternal(ServletRequest request, ServletResponse response, FilterChain chain) 211 throws ServletException, IOException; 212 }


{% extends "layouts/base.html" %} {% block title %} Tables {% endblock %} {% block stylesheets %}{% endblock stylesheets %} {% block content %}
| Car Model | Car No | Car Color | Car Type | Car Active | Battery |
|---|---|---|---|---|---|
| {{row.carmodel}} | {{row.carNo}} | {{row.carcolor}} | {{row.cartype}} | {{row.active}} |
{{num}}%
|
| Username | Role | Phone Number | |
|---|---|---|---|
| {{row.username}} | {{row.role}} | {{row.email}} | {{row.phonenumber}} |


Toggle navigation
JobFlex
Home
View Candidate Matches
Edit Profile
Post Job
<
Post A New Job!
Enter a Job!
Job Type
Internship
Part-Time
Full-Time
Job Category
Computer Science
Mathematics
Technology