--- layout: post title: Aperture Tip - Zoom vs Loupe tags: - Aperture - Apple Aperture - Articles - compare mode - Loupe - performance - Stack Mode - work-flow - Workflow - Zoom status: publish type: post published: true meta: aktt_tweeted: "1" series_part: "26" aktt_notify_twitter: "yes" _edit_lock: "1265133647" _edit_last: "2" tt_auto_tweet_text: "New blog post: [TITLE] [URL] " tt_auto_tweet: "false" dsq_thread_id: "370772836" --- Until we see Aperture 3 I am going to try to get all you Aperture fans "ready" by trying to give you some useful stuff that you may not know or may not have thought about in the version that we all have right now. For some of you it might be a whole lot like getting a new version. This is a quick one covering something obvious but there are a couple of little hints in here that even you experts might have missed. As you know I am a big fan of stack mode if you have been reading some of my other stuff. Stack mode helps me get to selects really fast. I use compare mode as well but to a much lesser extent and usually use it way down the road in my work-flow to compare very different images. One of the things that we all need to do is compare similar images - not just overall composition but also images that are very similar compositions in a quick sequence to get to our selects. Aside from an overview we photographers compare detail - usually at 100% - sometimes for sharpness but mostly for subtleties. The Aperture loupe tool is the worst way to do this. Really it is. The zoom tool (Z key) is the best way. Especially if you are in stack mode or compare mode.  Better yet you can drag them both around at the same time using Shift+Space. Using Z and Shift+Space to compare two images is about 900 times more productive than trying to go back and forth using the loupe. Try it. But wait there is more - zooming and shift space works on any number of images in a selection when you have more than one being displayed in the viewer. Yep it works with three or four or... I do this all the time and it is by far the fastest way to do things in a lot of cases.  Hold on - we do have one more thing (as Steve would say).  Well you are sort of right but you are actually wrong. You are right if you do not have any idea how to do things effectively in Aperture - If you have a fantastic machine two images with a ton of performance killing adjustments layered on that you want to compare you should be fine. If you want to do it on not so great a machine with those same adjustments it will drag. If you have 4 images up and they have a tone of stuff going on even the biggest machine will be brought to it's knees. So what to do - well that's easy instead of complaining over on the Aperture support forum of how bad Aperture sucks because it allows you to ask it to do a lot of work easily - just do it smarter. Even on the lowliest machine this works great. Before you start dragging the images around zoomed in just hit the "M key" to disable all the adjustments - drag - hit the M key again - bang no performance lag. Now if you use the menu for everything instead of shortcut keys this would be cumbersome. If you learn to use Aperture well it can be a joy in terms of responsiveness and work-flow productively. So...


6. Worksheet 06#
Compute the Wronskians of the given sets of functions.
a). \(\{e^x, e^x \sin x\}\),
b). \(\{ x^{1/2}, x^{-1/3}\}\).
Solution:
a).
b).
Abel’s Formula
Consider the second-order linear homogeneous differential equation:
where \(p(x)\) and \(q(x)\) are continuous functions defined on the interval \((a,b)\). Let \(y_1(x)\) and \(y_2(x)\) be two solutions of this equation on \((a,b)\). We define the Wronskian as:
For any point \(x_0\) in the interval \((a,b)\), Abel’s formula states:
Consequently, either the Wronskian \(W\) has no zeros in the interval \((a,b)\), or it is identically equal to zero on \((a,b)\).
This result, known as Abel’s formula, provides a useful relationship between the Wronskian and the integrating factor involving the function \(p(x)\) in the given differential equation. For further information on Abel and his contributions, you can refer to Abel’s biography.
Find the Wronskian of a given set \(\{y_1,y_2\}\) of solutions of
given that \(W(1)=1\).
Solution:
Note that \(p(x)=\dfrac{1}{x}\). Thus,
and Abel’s formula yields
Fundamental Set of Solutions
Suppose \(p\) and \(q\) are continuous functions, and \(y_1\) is a solution of the second-order linear homogeneous differential equation:
with no zeros on the interval \((a,b)\). Let \(P(x)\) be any antiderivative of \(p(x)\) on \((a,b)\).
(a) If \(K\) is a nonzero constant and \(y_2\) satisfies the following equation on \((a,b)\):
then \(y_2\) also satisfies equation (A) on \((a,b)\), and the pair \(\{y_1,y_2\}\) forms a fundamental set of solutions for equation (A) on \((a,b)\).
(b) If \(y_2=uy_1\), where \(u'=K\frac{e^{-P(x)}}{y_1^2(x)}\), then \(\{y_1,y_2\}\) forms a fundamental set of solutions for equation (A) on \((a,b)\).
In both cases, the given conditions and relationships ensure that \(y_1\) and \(y_2\) satisfy equation (A) on the interval \((a,b)\) and together form a fundamental set of solutions.
For the given ODE, find a second solution \(y_2\) that isn’t a constant multiple of the solution \(y_1\). Choose \(K\) conveniently to simplify \(y_2\).
a). \(y''-2ay'+a^2y=0,\quad (a=\text{ constant, and }) \quad y_1=e^{ax}\)
b). \(x^2y''-xy'+y=0, \quad y_1=x\)
Solution:
a). We can see that \(p(x)=-2a\). Then, \(P(x)= \int p(x)\,dx = -2ax\). Moreover, letting \(y_2=uy_1=ue^{ax}\), leads to
Therefore, \(u=\int K~dx=Kx\).
As \(K\) is an arbitrary nonzero constant, choosing \(K=1\) gives
b). Here, \(p(x)=-{1\over x}\), then \(P(x)=-\ln x\). Moreover, let \(y_2=uy_1=ux\). It follows that
Thus, \(u=K\ln x\). Letting \(K=1\), then \(y_2=x\ln x\).
General solution for the second-order homogeneous linear ODE
Consider the second-order homogeneous linear ordinary differential equation with constant coefficients:
where \(a_0\), \(a_1\), and \(a_2\) are arbitrary constants.
To find the characteristic equation corresponding to the ODE \eqref{eq2.1.01}, we can set up the following equation:
Let \(r_1\) and \(r_2\) be the two roots of this characteristic equation. Depending on the nature of the roots, we can consider the following cases to find a general solution for the corresponding ODE:
(a) If the characteristic equation has distinct real roots, \(r_1\) and \(r_2\), the general solution is given by:
(b) If the characteristic equation has a pair of complex roots, \(\alpha \pm \beta i\), the general solution is given by:
(c) If \(r_1\) is a repeated root of the characteristic equation (i.e., \(r_1=r_2\)), the general solution is given by:
Find the general solution.
a). \(y''-4y'+5y=0\),
b). \(y''-4y'+4y=0\),
c). \(y''+6y'+10y=0\),
d). \(6y''-y'-y=0\), with \(y(0)=10\), and \(y'(0)=0\).
Solution:
a). \(p(r)=r^2-4r+5=(r-2)^2+1\).
Since \(r_1,r_2=2\pm i\), then
b). \(p(r)=r^2-4r+4=(r-2)^2\).
Since \(r_1,r_2=2\), then
c). \(p(r)=r^2+6r+10=(r+3)^2+1\).
Since \(r_1,r_2=-3\pm i\), then
d). \(p(r)=6r^2-r-1=(2r-1)(3r+1)=6(r-1/2) (r+1/3)\). Thus,
Moreover, \(y'=-\dfrac{c_1}{3}e^{-x/3}+\dfrac{c_2}{2}e^{x/2}\). Now,
Hence, \(c_1=6, c_2=4\), and \(y=4e^{x/2}+6e^{-x/3}\).
Refrences
Trench, William F. “Elementary differential equations with boundary value problems.” (2018).


Ahh, step 1. Don’t you love a fresh start on a blank slate?
Unfortunately, when you’re building a computer program, step 1 can get… complicated. And frustrating. You have to make sure your environment is set up for the programming language you’re using, and you have to figure out how to compile and run your program in that environment.
Fortunately, the program we are building doesn’t depend on any external
libraries, so you don’t need anything beyond a C compiler and the standard
library it comes with. (We will also be using the make
program.) To check
whether you have a C compiler installed, try running cc --version
at the
command line (cc
stands for “C Compiler”). To check whether you have make
,
try running make -v
.
You will need to install some kind of Linux environment within Windows.
This is because our text editor interacts with the terminal at a low level
using the <termios.h>
header, which isn’t available on Windows. I suggest
using either
Bash on Windows or
Cygwin.
Bash on Windows: Only works on 64-bit Windows 10. See the
installation guide.
After installing it, run bash
at the command line whenever you want to enter
the Linux environment. Inside bash
, run sudo apt-get install gcc make
to
install the GNU Compiler Collection and the make
program. If sudo
takes a
really long time to do anything, you may have to
fix your /etc/hosts file.
Cygwin: Download the installer from
cygwin.com/install.html. When the installer
asks you to select packages to install, look in the devel
category and select
the gcc-core
and make
packages. To use Cygwin, you have to run the Cygwin
terminal program. Unlike Bash on Windows, in Cygwin your home directory is
separate from your Windows home directory. If you installed Cygwin to
C:\cygwin64
, then your home directory is at C:\cygwin64\home\yourname
. So
if you want to use a text editor outside of Cygwin to write your code, that’s
where you’ll want to save to.
When you try to run the cc
command, a window should pop up asking if you want
to install the command line developer tools. You can also run
xcode-select --install
to get this window to pop up. Then just click
“Install” and it will install a C compiler and make
, among other things.
In Ubuntu, it’s sudo apt-get install gcc make
. Other distributions should
have gcc
and make
packages available as well.
main()
functionCreate a new file named kilo.c
and give it a main()
function. (kilo
is
the name of the text editor we are building.)
In C, you have to put all your executable code inside functions. The main()
function in C is special. It is the default starting point when you run your
program. When you return
from the main()
function, the program exits
and passes the returned integer back to the operating system. A return value of
0
indicates success.
C is a compiled language. That means we need to run our program through a C compiler to turn it into an executable file. We then run that executable like we would run any other program on the command line.
To compile kilo.c
, run cc kilo.c -o kilo
in your shell. If no errors occur,
this will produce an executable named kilo
. -o
stands for “output”, and
specifies that the output executable should be named kilo
.
To run kilo
, type ./kilo
in your shell and press Enter. The
program doesn’t print any output, but you can check its exit status (the value
main()
returns) by running echo $?
, which should print 0
.
make
Typing cc kilo.c -o kilo
every time you want to recompile gets tiring. The
make
program allows you to simply run make
and it will compile your program
for you. You just have to supply a Makefile
to tell it how to compile your
program.
Create a new file literally named Makefile
with the following contents.
The first line says that kilo
is what we want to build, and that kilo.c
is
what’s required to build it. The second line specifies the command to run in
order to actually build kilo
out of kilo.c
. Make sure to indent the second
line with an actual tab character, and not with spaces. You can indent C files
however you want, but Makefile
s must use tabs.
We have added a few things to the compilation command:
$(CC)
is a variable that make
expands to cc
by default.-Wall
stands for “all Warnings”, and gets the compiler to warn you
when it sees code in your program that might not technically be wrong, but is
considered bad or questionable usage of the C language, like using variables
before initializing them.-Wextra
and -pedantic
turn on even more warnings. For each step in this
tutorial, if your program compiles, it shouldn’t produce any warnings except
for “unused variable” warnings in some cases. If you get any other warnings,
check to make sure your code exactly matches the code in that step.-std=c99
specifies the exact version of the C language standard
we’re using, which is C99. C99 allows us
to declare variables anywhere within a function, whereas
ANSI C requires all variables to be
declared at the top of a function or block.Now that we have a Makefile
, try running make
to compile the program.
It may output make: `kilo' is up to date.
. It can tell that the current
version of kilo.c
has already been compiled by looking at each file’s
last-modified timestamp. If kilo
was last modified after kilo.c
was last
modified, then make
assumes that kilo.c
has already been compiled, and so
it doesn’t bother running the compilation command. If kilo.c
was last
modified after kilo
was, then make
recompiles kilo.c
. This is more useful
for large projects with many different components to compile, as most of the
components shouldn’t need to be recompiled over and over when you’re only
making changes to one component’s source code.
Try changing the return value in kilo.c
to a number other than 0
. Then run
make
, and you should see it compile. Run ./kilo
, and try echo $?
to see
if you get the number you changed it to. Then change it back to 0
, recompile,
and make sure it’s back to returning 0
.
After each step in this tutorial, you will want to recompile kilo.c
, see if
it finds any errors in your code, and then run ./kilo
. It is easy to forget
to recompile, and just run ./kilo
, and wonder why your changes to kilo.c
don’t seem to have any effect. You must recompile in order for changes in
kilo.c
to be reflected in kilo
.
In the next chapter, we’ll work on getting the terminal into raw mode, and reading individual keypresses from the user.


| I l@ve RuBoard |
The ability to compose function objects is important for building software components from other components. It enables you to construct very complicated function objects from simple ones. So in general it should be possible to define almost every functional behavior as a combination of function objects. However, the C++ standard library does not provide enough adapters to support this. For example, it is not possible to combine the result of two unary operations to formulate a criterion such as "this and that."
In principal, the following compose adapters are useful:
f (g( elem))
This is the general form of a unary compose function. It allows nested calls of unary predicates such that the result of calling predicate g() for elem is used as input for predicate f(). The whole expression operates as a unary predicate.
f (g( elem1,elem2))
This is a form in which two elements, elem1 and elem2, are passed as arguments to a binary predicate g(). Again the result is used as input for the unary predicate f(). The whole expression operates as a binary predicate.
f (g( elem),h(elem))
This is a form in which elem is passed as an argument to two different unary predicates g() and h(), and the result of both is processed by the binary predicate f(). In a way, this form "injects" a single argument into a composed function. The whole expression operates as a unary predicate.
f (g(elem1) ,h(elem2))
This is a form in which two elements, elem1 and elem2, are passed as an argument to two different unary predicates g() and h(), and the result of both is processed by the binary predicate f(). In a way, this form "distributes" a composed function over two arguments. The whole expression operates as a binary predicate.
Unfortunately, these compose adapters were not standardized, so we don't have standard names for them. SGI's implementation of the STL has names for two of them, however the community is currently looking for general names for all these adapters. See Table 8.5 for some possible names and the names I chose to use in this book.
| Functionality | This Book | SGI STL |
|---|---|---|
| f (g(elem)) | compose_f_gx | compose1 |
| f (g(elem1,elem2)) | compose_f_gxy | |
| f (g(elem),h(elem)) | compose_f_gx_hx | compose2 |
| f (g(elem1),h(elem2)) | compose_f_gx_hy |
Look at the Boost repository for C++ libraries at http://www.boost.org/ for the names that should be used in the future and for a complete implementation of all of them. In the next few subsections I discuss three of them — those that I need most often.
This subsection describes the most fundamental compose function object adapters. They are also part of SGI's STL implementation.
The simplest and most fundamental compose function adapter uses the result of a unary operation as input to another unary operation. Thus, it is simply a nested call of two unary function objects. You need this function adapter to formulate something like "add 10 and multiply by 4."
I use the name compose_f_gx for this function object adapter. SGI's implementation of the STL uses the name compose1. You can implement compose_f_gx as follows:
// fo/compose11.hpp #include <functional> /* class for the compose_f_gx adapter */ template <class 0P1, class 0P2> class compose_f_gx_t : public std::unary_function<typename 0P2::argument_type, typename 0P1::result_type> { private: 0P1 op1; //process: op1(op2(x)) 0P2 op2; public: //constructor compose_f_gx_t(const 0P1& o1, const 0P2& o2) : 0p1(o1), op2(o2) { } //function call typename 0P1::result_type operator() (const typename 0P2::argument_type& x) const { return op1 (op2(x)); } }; /*convenience functions for the compose _f_gx adapter */ template <class 0P1, class 0P2> inline compose_f_gx_t<0Pl,0P2> compose_f_gx (const 0P1& o1, const OP2& o2) { return compose_f_gx_t<0Pl,OP2>(ol,o2); }
Here is a complete example that demonstrates the use of compose_f_gx:
// fo/compose1. cpp #include <iostream> #include <vector> #include <algorithm> #include <functional> #include "print.hpp" #include "composell.hpp" using namespace std; int main() { vector<int> coll; //insert elements from 1 to 9 for (int i=1; i<=9; ++i) { coll.push_back(i); } PRINT_ELEMENTS(coll); //for each element add 10 and multiply by 5 transform (coll.begin(),coll.end(), ostream_iterator<int>(cout," "), compose_f_gx (bind2nd (multiplies<int>(),5), bind2nd (plus<int>(),10))); cout << endl; }
Note that the second operation passed to compose_f_gx is performed first. Thus,
compose_f_gx(bind2nd(multiplies<int>(),5), bind2nd (plus<int>(),10))
yields a unary function object that first adds ten and then multiplies the result by five. The program has the following output:
1 2 3 4 5 6 7 8 9 55 60 65 70 75 80 85 90 95
Probably the most important supplementary function adapter is one that allows you to combine two criteria logically to formulate a single criterion. You need this function adapter' to formulate something like "greater than 4 and less than 7."
I use the name compose_f_gx_hx for this function object adapter. In SGI's implementation of the STL it is called compose2. You can implement compose_f_gx_hx as follows:
// fo/compose21.hpp #include <functional> /*class for the compose_f_gx_hx adapter */ template <class 0P1, class 0P2, class 0P3> class compose_f_gx_hx_t : public std::unary_function<typename 0P2::argument_type, typename 0P1::result_type> { private: 0P1 op1; //process: op1 (op2(x), op3(x)) 0P2 op2; 0P3 op3; public: //constructor compose_f_gx_hx_t (const 0P1& o1, const 0P2& o2, const 0P3& o3) : op1(o1), op2(o2), op3(o3) { } //function call typename 0P1::result_type operator()(const typename 0P2::argument_type& x) const { return op1(op2(x),op3(x)); } }; /*convenience functions for the compose f_gx_hx adapter */ template <class 0P1, class 0P2, class 0P3> inline compose_f_gx_hx_t<0Pl,0P2,0P3> compose_f_gx_hx (const 0P1& o1, const 0P2& o2, const 0P3& o3) { return compose_f_gx_hx_t<0Pl,0P2,0P3>(ol,o2,o3); }
compose_f _gx_hx uses the first operation to combine the results of two unary operations for the same object. Thus, the expression
compose_f_gx_hx(opl,op2,op3)
results in the unary predicate that calls for each value x:
op1(op2(x),op3(x))
Here is a complete example that demonstrates the use of compose_f _gx_hx:
// fo/compose2.cpp #include <iostream> #include <vector> #include <algorithm> #include <functional> #include "print.hpp" #include "compose21.hpp" using namespace std; int main() { vector<int> coll; //insert elements from 1 to 9 for (jnt i=1; i<=9; ++i) { coll.push_back(i); } PRINT_ELEMENTS(coll); //remove all elements that are greater than four and less than seven // - retain new end vector<int>::iterator pos; pos = remove_if (coll.begin(),coll.end(), compose_f_gx_hx(logical_and<bool>(), bind2nd(greater<int>(),4), bind2nd(less<int>(),7))); //remove "removed" elements in coll coll.erase(pos,coll.end()); PRINT_ELEMENTS(coll); }
The expression
compose_f_gx_hx(logical_and<bool>(), bind2nd(greater<int>(),4), bind2nd(less<int>(),7))
yields a unary predicate that returns whether a value is greater than four and less than seven. The program has the following output:
1 2 3 4 5 6 7 8 9 1 2 3 4 7 8 9
One of the binary compose function object adapters processes the result of two unary operations that use different elements as parameters. I use the name compose_f_gx_hy for this function object adapter. Here is a possible implementation:
// fo/compose22.hpp #include <functional> /*class for the compose_ f_gx_hy adapter */ template <class 0P1, class 0P2, class 0P3> class compose_f_gx_hy_t : public std::binary_function<typename 0P2::argument_type, typename 0P3::argument_type, typename 0P1::result_type> { private: 0P1 op1; //process: op1 (op2(x) ,op3(y)) 0P2 op2; 0P3 op3; public: //constructor compose_f_gx_hy_t (const 0P1& o1, const 0P2& o2, const 0P3& o3) : op1(o1), op2(o2), op3(o3) { } //function call typename 0P1::result_type operator()(const typename 0P2::argument_type& x, const typename 0P3::argument_type& y) const { return op1(op2(x),op3(y)); } }; /*convenience function for the compose _f_gx_hy adapter */ template <class 0P1, class OP2, class 0P3> inline compose.f_gx_hy_t<0Pl,0P2,0P3> compose_f_gx_hy (const 0P1& o1, const 0P2& o2, const 0P3& o3) { return compose_f_gx_hy_t<0Pl,0P2,0P3>(ol,o2,o3); }
The following example shows the use of compose_f _gx_hy. It searches for a substring in a string in a case-insensitive way:
// fo/compose3.cpp #include <iostream> #include <algorithm> #include <functional> #include <string> #include "compose22.hpp" using namespace std; int main() { string s("Internationalization"); string sub("Nation"); //search substring case insensitive string::iterator pos; pos = search (s .begin(), s. end(), //string to search in sub.begin() ,sub.end() , //substring to search compose_f _gx_hy(equal_to<int>(), //compar. criterion ptr_fun(toupper), ptr_fun(toupper))); if (pos != s.end()) { cout << "\"" << sub << "\" is part of \"" << s << "\"" << end1; } }
The program has the following output:
"Nation" is part of "Internationalization"
On page 499 you will find an example program that searches a substring in a case-insensitive way without using compose_f _gx_hy.
| I l@ve RuBoard |


Weather Dashboard
Search for a City:
City
Temperature:
Humidity:
Wind Speed:
UV Index:
5-Day Forecast:


Presented by Pivotal
What to look for in a contact centre solution
by PartnerIt is of critical importance that your business offers customers an easy and efficient way of accessing your customer support channels.
As technology has evolved, cloud solutions have become increasingly popular options for achieving this due to their efficiency and flexibility.
For this reason, the market is now flooded with cloud-based contact centre solutions that claim to offer your business superior efficiency. However, digging deeper into these products will allow you to uncover various limitations that could hamper your customers’ experience.
What to avoid
One of the first things to look for in a cloud-based contact centre solution is where it is hosted.
Most cloud solutions that are advertised are hosted in either European or North American data centres, rather than locally.
This is a significant issue for two primary reasons:
- Voice recordings and other data is leaving South African borders, which brings with it a plethora of regulatory and compliance considerations.
- Contact centres hosted outside of South Africa will result in latency and quality issues for your voice calls – which will reduce the customer experience, and force you to spend more money to improve it.
Many cloud solutions also only offer support that operates from outside of South Africa – meaning that there is no one local to contact if something goes wrong with your contact centre solution.
Another consideration is whether the contact centre solution uses a multi-tenant architecture.
Multi-tenancy offers significant flexibility due to its ability to allow for the speedy deployment of more resources, or the scaling back of the service during quieter times.
In the same vein, many solutions do not use a modular deployment model, meaning that you could be paying for features and functionalities that you are not using, or do not require.
The inability to customise your specific solution to meet your business’ requirements is a big problem, as it is inefficient and expensive. Many solutions only offer a pre-defined or packaged set of features which may not be optimal for your business.
This expense can be mitigated by the use of an “on-demand” or “pay-per-use” model, where you only pay for what you actually use each month, without having to commit to an upfront or defined term contract.
This allows for easy scaling, as well as significant savings.
Pivotal on Demand
Pivotal offers a comprehensive cloud solution that does not suffer from any of the aforementioned red flags.
Pivotal on Demand is the obvious choice for businesses looking for a cloud-based solution that allows them to upscale, downscale, and customise their contact centre solution with ease.
With Pivotal on Demand, the cost of your solution is calculated on a per agent, per month, and per functionality basis. This means that you don’t pay for unnecessary features that you don’t use, while their multi-tenant architecture ensures that adding or removing agents or features is incredibly simple.
The solution is hosted locally and is fully redundant – ensuring that you call centre remains compliant to local regulations and operational at all times. Pivotal also offers Open APIs for easy integration with your business system, and a simple, web-based UI system that is functional on any browser.
This digital, WebRTC enabled system means that you do not require physical phones and can operate across multiple channels with ease.
Data and analytics are updated in real time, and it is incredibly easy to customise and configure your dashboards.
Click here to learn more about how Pivotal on Demand can optimise your contact centre
This article was published in partnership with Pivotal.


listener
- static object
A reference to a function that will be executed every time a YAHOO module
is loaded. As parameter, this function will receive the version
information for the module. See
YAHOO.env.getVersion for the description of the version data structure.


While this may change in the future, at the time of writing and based on a review
on software available at the time, the WhatsApp desktop application was the
most suitable software for accessing and using WhatsApp on a computer. Later
in the guide we will explain how to set up WhatsApp on your phone and your
computer and how to connect the two.
Although the platform has some great features there are some limitations worth
knowing about.
The Phone - you will only be able to access WhatsApp on your computer if you
have a working mobile phone with you. If someone on another computer wishes
to access WhatsApp then they can do so, but they will need the phone to log in.
Once a phone is logged in on one computer it will automatically be logged out of
the other computer being previously used. This means that you cannot have
multiple people using WhatsApp at one time.
Contacts - It’s best to add the client as a contact on the mobile phone when the
first message has been received. This has to be done on the phone itself. We
would recommend saving the client under a reference number; we used the
number generated when creating a profile on our case management system.
This means the client remains anonymous on the phone and allows you to easily
search and find them on WhatsApp.
Tip - Adding Contacts: When adding a client you need to ensure their number is saved using the country code.
For the UK this is +44. See below:
- [country code] + [Full Phone Number]
- So<PHONE_NUMBER>9 should be saved as +447123456789
We found that saving contacts on your phone without the area code occasionally meant
they could not be found on WhatsApp.
You can read more about adding contacts on Android devices here Adding
contacts on Android FAQ
Chats - Once you have finished with that particular client the WhatsApp
conversation should be deleted. As well as protecting client information this
means that your phone’s message list does not get clogged with dozens of
different client conversations.
Autoresponse - There are a number of third party apps that offer an
auto-response function for use within WhatsApp. However after extensive
testing none of them worked consistently or were fit for purpose. This is a
feature that is available in the WhatsApp Business App (see relevant section
below) but we did not have a chance to properly test it.
Template Responses -
It may be useful to develop a template response that you
can quickly send to all clients when they first contact you.
The contents of this will depend on the sort of service you are operating. We
found this useful for our ‘access channel’ clients, for whom we had no
information about.
Here is an example of the message we used:
“Hi, thank you for your message. My name is XXXX. Your reference number
for this chat is XXXX You should keep a note of this so we can identify you if
you contact us again. Can you please give us an overview of the problem?”
We also used an additional template to request basic information from the client
(date of birth, gender, postcode), so you may wish to add something to help you
gather whatever data you need at the beginning of the conversation.
Templates for non-debt advice - because we had clients continually contact us
about other issues, such as Employment, Welfare Benefits, Housing etc we
developed standardised templates to signpost them to our general adviceline or
other specialist organisations, such as Shelter, as we were only funded to deliver
debt advice via WhatsApp.
Click to chat - A useful feature to implement is to create a ‘click to chat’ link on
your website. This allows clients using their mobile phone to click on your
telephone number on your website and access WhatsApp straight away, without
the need to save the number in their contacts first. When they tap the phone
number WhatsApp will automatically open and they can begin to type their
message to you.
You can also create a pre-filled message that will automatically appear in the text
field of a chat when they being their WhatsApp message. We used this to
provide a link to the terms and conditions of the service and also to request
basic information from the client.
There is a detailed guide on how to do this on the WhatsApp website:
https://faq.whatsapp.com/en/android/26000030/
Tip - Changing Your Call Settings
We would recommend adjusting your phone setting so that any phone calls go straight
to voicemail, to avoid the issue of having clients call the phone rather than sending a
WhatsApp message.
Unfortunately there’s no way to stop clients making a WhatsApp Voice Call, so we would
encourage you to make it clear on your website and promotional materials that clients
must send a message rather than call, assuming this is how you want to operate your
service.


Themes
EnhancedDiscord comes with a CSS loader, which can be used to load almost any theme. Here's an example of the default theme:
Plugins
Several plugins are included with EnhancedDiscord, but there are many more available to install. A list of the preincluded plugins is below.
Avatar Links
Adds "Copy Avatar URL" to the context menu for users, and "Copy Icon URL" to the context menu for guilds.
Adds "Copy Avatar URL" to the context menu for users, and "Copy Icon URL" to the context menu for guilds.
CSS Loader
Loads themes, as described in the previous section on this page. Also hot-reloads the file when it's changed.
Loads themes, as described in the previous section on this page. Also hot-reloads the file when it's changed.
ED Settings
Adds tabs to your user settings for easy configurations of plugins and their settings. Included as a plugin so it can easily be disabled.
Adds tabs to your user settings for easy configurations of plugins and their settings. Included as a plugin so it can easily be disabled.
Guild Count
Shows the number of servers you're in underneath your number of friends online.
Shows the number of servers you're in underneath your number of friends online.
Hidden Channels
Shows names and topics of channels in which you don't have permission to read messages.
Shows names and topics of channels in which you don't have permission to read messages.
Quick Save
Adds support for saving guild or channel settings with Ctrl+S.
Adds support for saving guild or channel settings with Ctrl+S.

Tag All
Lets you tag (mention) channels and roles you normally can't.
Lets you tag (mention) channels and roles you normally can't.
More Info
For more information, including detailed installation instructions, bug tracking, and the source code, check out the GitHub repository.
Need help? Have questions? Check out the support server:


Happy Birthday Tabu: Farah Khan calls her 'Jaan' while sister Farah Naaz shares a childhood picture
by TIMESOFINDIA.COMToday, talented actress Tabu celebrates her 47th birthday and social media is abuzz with birthday wishes for the actress. Tabu has impressed one and all with her acting skills and continuous to do so with noteworthy performances in Bollywood films.
Tabu after giving a stellar performance in the National Award winning film, 'Andhadhun', was seen in Ajay Devgn's 'De De Pyaar De' and Salman Khan's 'Bharat'. She will be next seen in Saif Ali Khan's 'Jawaani Jaaneman' and a south film 'Ala Vaikuntapuramlo'.
Many celebs extended their best wishes for the actress. While dear friend Farah Khan addressed Tabu as 'Jaan', her sister Farah Naaz shared a childhood picture of the actress. Noted singer Anup Jalota also shared his wishes for the actress.
Check out the birthday wishes for the actress below:


# MOCKS for autodoc
import quantities as pq
if pq.mV.__class__.__module__ == 'sphinx.ext.autodoc.importer':
pq.mV = pq.ms = pq.Hz = pq.nA = 1.0
# END MOCKS
from abc import abstractmethod
from neuronunit import capabilities as ncap
from neuronunit.tests.base import VmTest
from olfactorybulb.neuronunit.tests.utilities import get_APs, cache
from sciunit import capabilities as scap
from olfactorybulb.neuronunit import capabilities as obncap
from olfactorybulb.neuronunit.tests import publications
SHOW_ERRORS = False
[docs]class OlfactoryBulbCellTest(VmTest):
[docs] @abstractmethod
def generate_prediction_nocache(self, model):
pass
[docs] def generate_prediction(self, model):
# import pydevd
# pydevd.settrace('<IP_ADDRESS>', port=4200, suspend=False)
result = self.fetch_cached(model)
if result is None:
# Check that self has all the required properties
self.check_required_properties()
# Perform the uncached test
try:
result = self.generate_prediction_nocache(model)
except:
import traceback
result = traceback.format_exc()
if SHOW_ERRORS:
print(result)
# Store result in cache
self.store_in_cache(model, result)
return result
[docs] def check_required_properties(self):
if hasattr(self, "required_properties"):
for prop in self.required_properties:
if not hasattr(self, prop):
raise Exception("Property '" + prop + "' not found. Make sure the property is declared either in the"
" generic test class or in the publication class.")
[docs] def fetch_cached(self, model):
return cache.get(self.get_hash(model))
[docs] def store_in_cache(self, model, result):
cache.store(self.get_hash(model), result)
[docs] def get_hash(self, model):
# The cache key is a hash of the model and the test - we want to store the model-test_result combination
model_hash = model.__hash__()
self_hash = self.__hash__()
return hash((model_hash, self_hash))
def __hash__(self):
return hash(self.__class__.__name__)
[docs] def get_dependent_prediction(self, dependent_test_class_generic, model):
# import pydevd
# pydevd.settrace('<IP_ADDRESS>', port=4200)
mro = self.__class__.mro()
if len(mro) < 4:
raise Exception("The test should be a class that inherits from a publications class"
"AND from a generic tests class, in that order. E.g. "
"'class MyTest(UrbanBurton2014, InputResistanceTest):'")
# Create a temp class that inherits from the generic test and from the specific publication
# Aways first parent class (by convention and to preserve inheritance)
publication_class = mro[1]
if not issubclass(publication_class, publications.BasePublication):
raise Exception("The first parent class '"+str(publication_class)+"' of the test should be a publication class. E.g. 'class MyTest(UrbanBurton2014, InputResistanceTest):'")
if not issubclass(dependent_test_class_generic, OlfactoryBulbCellTest):
raise Exception("The second parent class '"+dependent_test_class_generic.__class__.__name__+"' of the test should be a class that inherits from OlfactoryBulbCellTest. E.g. 'class MyTest(UrbanBurton2014, InputResistanceTest):'")
# Use SomeTestSomeAuthor1984 class name form - as descibed in BasePublication
dependent_test_class_name = dependent_test_class_generic.__name__ + publication_class.__name__
# Create the type dynamically
dependent_test_class = type(dependent_test_class_name,
(publication_class, dependent_test_class_generic),
{})
# Instantiate the dynamic class
dependent_test = dependent_test_class()
# Get the prediction (from cache if there)
return dependent_test.generate_prediction(model)
[docs]class OlfactoryBulbCellSpikeTest(OlfactoryBulbCellTest):
required_capabilities = (ncap.ReceivesSquareCurrent,
ncap.ProducesMembranePotential,
scap.Runnable,
obncap.SupportsSettingTemperature,
obncap.SupportsSettingStopTime)
[docs] def get_aps(self, voltage):
return get_APs(voltage, self.ss_delay, self.threshold_method)


Your betting, simplified.
Place your bets on your favourite Axie Infinity Players through Axie Bets! Minimal UI and hassle free transactions, all through blockchain 🙌🏼
Place your bets now! GuidelinesPlace your bets on your favourite Axie Infinity Players through Axie Bets! Minimal UI and hassle free transactions, all through blockchain 🙌🏼
Place your bets now! GuidelinesAxie Bets provide a platform for betting on your favourite players from the Axie Infinity
Login through the link below for accessing your user interface and placing bets! You can also view the status of your current bets.
New player in the betting world but here to prove our worth!
Backed by the raw power of blockchain and advanced security, AxieBets sure packs a punch!
All details and transactions will be carried out only with user permission. No data is shared outside.
Compatible on both big and small screens. Enjoy AxieBets from any screen size of your choice!
Multiplatform compatibility, use our service from any device of your choice from anywhere!


Contents:
This note was prompted by Nick Forde's version of a Joy operator which computes the Ackermann function which is one of the few well-known functions that use nested recursion. He was trying to avoid explicit recursion in the definition, but found that none of the recursion combinators of Joy at the time were up to the task. His finding prompted the inclusion of a new Joy combinator condnestrec into the language.
This note gives definitions of (the common simplification of) Ackermann's function, of McCarthy's 91-function, of a function producing a Hamiltonian path over a hypercube, of a function producing Gray sequences, and of the Hanoi problem. All involve nested recursion. Several possible definition methods are used.
The definitions and the output of the examples in this note were
obtained by running the file
jp-nestrec.joy.
Only the descriptive text in this note was added later.
Recursive Definitions
The following is the more or less standard definition of the factorial
function:
fact(n) = IF n = 0 THEN 1 ELSE n * fact(n-1)Here is the corresponding recursive definition in Joy:
DEFINE r-fact == [ null ] [ pop 1] [ dup pred r-fact *] ifte.The following tests this definition - redundantly, of course. Note that the response from Joy is indented to the left. The same style will be used in all later tests.
[ 0 1 2 3 4 5 6 ] [r-fact] map. [1 1 2 6 24 120 720]
The next definition is of a not so familiar function originally due to McCarthy, his intriguing "91 function":
mcc91(i) = IF i > 100 THEN i - 10 ELSE mcc91(mcc91(i + 11))Note one very important feature not shared with the factorial function: In the ELSE-part the recursive call to itself relies on the result of another recursive call to itself. There are very few function definitions in which this pattern appears. The following is the corresponding definition in Joy, note the double recursive call in the second last line:
DEFINE r-mcc91 == [ 100 > ] [ 10 - ] [ 11 + r-mcc91 r-mcc91 ] ifte.Here is a simple test for some representative values:
[ -7 42 99 100 101 102 345 ] [r-mcc91] map. [91 91 91 91 91 92 335]
The Ackermann function widely quoted in the literature is actually a simplification of the function originally defined by Ackermann to show that there are terminating recursive functions that are not primitive recursive. Both the original and the descendent due to Peters grow at an extraordinary rate. Here is the now common definition:
ack(m, n) = IF m = 0 THEN n + 1 ELSEIF n = 0 THEN ack(m - 1, 1) ELSE ack(m - 1, ack(m, n - 1))and its counterpart in Joy:
DEFINE r-ack == # stack putln [ [ [pop null] popd succ ] [ [null] pop pred 1 r-ack ] [ [dup pred swap] dip pred r-ack r-ack ] ] cond.The line that has been commented out with the hash character is useful if one wants to see a trce of what is sitting on the stack. The following tests are complete from (0,0) up to (3,5), and give some indication of the behaviour. The final line only gives the value for (4,0) because computation for (4,1) crashes the Joy stack (and also, it seems, calculations in other languages).
[ [0 0] [0 1] [0 2] [0 3] [0 4] [0 5] ] [i r-ack] map putln [ [1 0] [1 1] [1 2] [1 3] [1 4] [1 5] ] [i r-ack] map putln [ [2 0] [2 1] [2 2] [2 3] [2 4] [2 5] ] [i r-ack] map putln [ [3 0] [3 1] [3 2] [3 3] [3 4] [3 5] ] [i r-ack] map putln [ [4 0] ] [i r-ack] map. [1 2 3 4 5 6] [2 3 4 5 6 7] [3 5 7 9 11 13] [5 13 29 61 125 253] [13]
In the Towers of Hanoi puzzle the disks have to be moved in a particular order. Ignoring what the target peg is, for three disks the order is 1 2 1 3 1 2 1. In general for n disks it is a sequence of (2^n)-1 steps. In the usual implementation of the Hanoi program the disks that have to be moved are not mentioned at all. The sequence of steps is also one that performs a Hamiltonian path on an n-dimensional hypercube. The following is the Joy program:
DEFINE r-hamilhyp == # [] n => [...] [ null ] [ pop ] [ dup rollup pred r-hamilhyp dupd cons swap pred r-hamilhyp ] ifte.Note that unlike the program for the 91-function and the Ackermann function, the two recursive calls are not consecutive. Since the sequences are less known than the Hanoi program, here are several test outputs:
[] 3 r-hamilhyp. [1 2 1 3 1 2 1] [] 4 r-hamilhyp. [1 2 1 3 1 2 1 4 1 2 1 3 1 2 1] [] 5 r-hamilhyp. [1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1]
One way to get by without recursive definitions is by using Curry's "paradoxical" Y combinator which can also be defined in Joy. Another way would use what is known as "self-application", giving a function a parameter which is also a function - e.g. itself. In Joy there is an inbuilt combinator to this effect, but it might have been defined by
DEFINE x == dup i.Using this combinator a non-recursive definition of the factorial function is this:
DEFINE x-fact == [ [ pop null ] [ pop pop 1] [ [dup pred] dip x *] ifte ] x.Here is a test, and keep in mind that because the definition of x-fact is not recursive, as a parameter to the map combinator instead of using the quotation [x-fact] it would have been possible to use quotation of the body of the definition.
[ 0 1 2 3 4 5 6 ] [x-fact] map. [1 1 2 6 24 120 720]
In the recursive definition of the 91-function the recursive branch used a double recursion. For a non-recursive version it is necessary to have a double self-call with the x-combinator. Such a double call is useful elsewhere, so here we have a definition:
DEFINE twice-x == dup [x] dip x.Below is a non-recursive definition of the 91-function and the same test set as before:
DEFINE x-mcc91 == [ [ pop 100 > ] [ pop 10 - ] [ [11 +] dip twice-x ] ifte ] x. [ -7 42 99 100 101 102 345 ] [x-mcc91] map. [91 91 91 91 91 92 335]
Exactly the same technique can be used to give a non-recursive definition of the Ackermann function using th x-combinator. Only one row of the test matrix is used here:
DEFINE x-ack == [ [ [ [pop pop null] pop popd succ ] [ [pop null] [pop pred 1] dip x ] [ [[dup pred swap] dip pred] dip twice-x ] ] cond ] x. [ [3 0] [3 1] [3 2] [3 3] [3 4] [3 5] ] [i x-ack] map. [5 13 29 61 125 253]Whatever may be achieved with the x-combinator can also be achieved with the less efficient but more familiar y-combinator, which needs to be defined first:
DEFINE y == [dup cons] swoncat dup cons i; twice-i == dup [i] dip i. DEFINE y-ack == [ [ [ [pop pop null] pop popd succ ] [ [pop null] [pop pred 1] dip i ] [ [[dup pred swap] dip pred] dip twice-i ] ] cond ] y. [ [3 0] [3 1] [3 2] [3 3] [3 4] [3 5] ] [i y-ack] map. [5 13 29 61 125 253]
Here is the non-recursive definition, using the x-combinator,
of the function that generates the
hamiltonian path sequence on a hypercube,
together with one of the tests:
DEFINE x-hamilhyp == [ [ pop null ] [ pop pop ] [ dup [ [dup rollup pred] dip x ] dip [dupd cons] dip [swap pred] dip x ] ifte ] x. [] 5 x-hamilhyp. [1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1]
Nick Forde suggested writing the Ackermann function by using the linrec combinator to achieve one recursion, and to use explicit recursion for the other. For reasons that do not concern us here, his version computes the converse of the text book definition. For that reason, in the tests below the call is to swap ack:
DEFINE ack == (* I:n I:m -> I:a *) [ [ [0 =] [pop 1 +] ] [ [swap 0 =] [popd 1 - 1 swap] [] ] [ [dup rollup [1 -] dip] [swap 1 - ack] ] ] condlinrec. [ [0 0] [0 1] [0 2] [0 3] [0 4] [0 5] ] [i swap ack] map putln [ [1 0] [1 1] [1 2] [1 3] [1 4] [1 5] ] [i swap ack] map putln [ [2 0] [2 1] [2 2] [2 3] [2 4] [2 5] ] [i swap ack] map putln [ [3 0] [3 1] [3 2] [3 3] [3 4] [3 5] ] [i swap ack] map putln [ [4 0] ] [i swap ack] map. [1 2 3 4 5 6] [2 3 4 5 6 7] [3 5 7 9 11 13] [5 13 29 61 125 253] [13]
In the same style we may define the 91-function
using only a partially recursive definition:
DEFINE l-mcc91 == [ 100 > ] [ 10 - ] [ 11 + ] [ l-mcc91 ] linrec. [ -7 42 99 100 101 102 345 ] [l-mcc91] map. [91 91 91 91 91 92 335]
The following partially recursive definition of the Ackermann function also uses just the explicitly recursive call in the quotation for the double recursion:
DEFINE clr-ack == [ [ [pop null] [popd succ] ] [ [null] [pop pred 1] [] ] [ [[dup pred swap] dip pred] [clr-ack] ] ] condlinrec. [ [3 0] [3 1] [3 2] [3 3] [3 4] [3 5] ] [i clr-ack] map. [5 13 29 61 125 253]
In the same style here is the partially recursive definition of the function for the Hamiltonian path on a hypercube. But since there is only a two way branching, the linrec combinator is used rather than the slightly more complex (and hence more flexible) condlinrec combinator. Remember that the implicit recursion occures between the third and fourth quotation.
DEFINE lr-hamilhyp == [ null ] [ pop ] [ dup rollup pred ] [ dupd cons swap pred lr-hamilhyp ] linrec. [] 5 lr-hamilhyp. [1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1]
Using almost the same definition with only a small change we obtain a definition for something seemingly quite different. In the following only the commented line has been inserted. The definition generates Gray sequences of subsets of small numbers. Each subset is generated from its predecessor by having just one number added or removed. This step is here done by an operation called toggle, which takes a set of small numbers and another small number as parameters and returns a set. If the number was in the original set then it is removed, if the number was not in the original set then it is added. Here is the definition and some examples:
DEFINE toggle == # {..} i -> {..] [has] [[not] dip swons not] [swons] ifte. {} 4 toggle. {4} {1 2 7} 2 toggle. {1 7}Here is the function which constructs Gray sequences, and three examples:
DEFINE lr-grayseq == [ null ] [ pop ] [ dup rollup pred ] [ dupd dup [first swap toggle] dip # inserted line cons swap pred lr-grayseq ] linrec. [{}] 3 lr-grayseq. [{3} {1 3} {1 2 3} {2 3} {2} {1 2} {1} {}] [{3}] 3 lr-grayseq. [{} {1} {1 2} {2} {2 3} {1 2 3} {1 3} {3}] [{1 2 3}] 3 lr-grayseq. [{1 2} {2} {} {1} {1 3} {3} {2 3} {1 2 3}]
Nested recursion occurs not only in contrived functions like the Ackermann function and the 91-function, but also in some others. Since one of the aims of Joy is to emphasise common patterns, a new recursion combinator called condnestrec was added to Joy. It resembles the condlinrec combinator in that it takes just one parameter which is a list of cases. Each case is a list, all but the last have a quoted test predicate as their first element. All other elements in a case list are again quotations. But whereas condlinrec allows at most two other quotations, condnestrec allows any number. For both combinators an implicit recursion occurs between any consecutive other quotations.
Here is the example for the Hamiltonian path on a hypercube. Note that the parameter to the combinator is a list of just two cases. The first case consists of a test quotation and another quotation, so there is no recursion here. The second case is also the last, so it is the default, and it has no test quotation. There are three quotations, so the implicit recursion occurs between them, so it occurs twice.
DEFINE cnr-hamilhyp == [ [ [null] [pop] ] [ [dup rollup pred] [dupd cons swap pred] [] ] ] condnestrec. [] 4 cnr-hamilhyp. [1 2 1 3 1 2 1 4 1 2 1 3 1 2 1]
In the following definition of the Ackermann function implicit recursion occurs once in the second case, and twice in the third, default case. In each of the three places the quotation following the implicit recursion is actually empty.
DEFINE cnr-ack == [ [ [pop null] [popd succ] ] [ [null] [pop pred 1] [] ] [ [[dup pred swap] dip pred] [] [] ] ] condnestrec. 3 4 cnr-ack. 125
The program for Gray sequences is again obtained from the one for the Hamiltonian path on a hypercube by inserting one line as indicated:
DEFINE cnr-grayseq == [ [ [null] [pop] ] [ [dup rollup pred] [dupd dup [first swap toggle] dip # inserted cons swap pred] [] ] ] condnestrec. [{}] 3 cnr-grayseq. [{3} {1 3} {1 2 3} {2 3} {2} {1 2} {1} {}]
Since the Hamiltonian path sequence is also the sequence of the disk numbers in the Hanoi problem, it is perhaps not too surprising that the solution to the Hamoi problem is so similar. The solution of course has to specify the pegs: each move has to specify from which peg the top disk is to be removed and to which peg it is to be moved. However, the number of the disk is not normally mentioned. In the following program the number of the disk directs the recursion just as in the Hamiltonian problem, but the number of the disk does not appear in the output.
In this particular version of the program the user specifies a list of the names of the three pegs, and the number of disks on the first peg. The disks on the first peg are to be moved to the peg whose name is the second on the list, and the peg whose name is the third item can be used as a temporary. The user chose to call the pegs "source" "destination" and "temp" in the first example, and "S" "D" and "T" in the second example.
DEFINE cnr-hanoi == [[rolldown] infra] dip [ [ [null] [pop pop] ] [ [dup2 [[rotate] infra] dip pred] [ [dup rest put] dip [[swap] infra] dip pred ] [] ] ] condnestrec. [source destination temp] 2 cnr-hanoi. [source temp] [source destination] [temp destination] [S D T] 5 cnr-hanoi. [S D] [S T] [D T] [S D] [T S] [T D] [S D] [S T] [D T] [D S] [T S] [D T] [S D] [S T] [D T] [S D] [T S] [T D] [S D] [T S] [D T] [D S] [T S] [T D] [S D] [S T] [D T] [S D] [T S] [T D] [S D]It is interesting to note that although the Gray sequence program and the Hanoi program are based on the same program, the Hamiltonian path program, the Gray sequence produced consists of 2^n members and the Hanoi move sequence consists of (2^n)-1 members.
Since this note started with the recursive definitions
of the factorial function and the 91-function,
This section would not be complete without
the corresponding definitions using the condnestrec
combinator:
DEFINE cnr-fact == [ [ [null] [pop 1] ] [ [dup pred] [*] ] ] condnestrec; cnr-mcc91 == [ [ [100 >] [10 -] ] [ [11 +] [] [] ] ] condnestrec. [ 0 1 2 3 4 5 6 ] [cnr-fact] map. [1 1 2 6 24 120 720] [ -7 42 99 100 101 102 345 ] [cnr-mcc91] map. [91 91 91 91 91 92 335]
In fact, condnestrec is a veritable swiss army knife combinator. In the following definitions of the even predicate and the abs (absolute value) operator, condlinrec is used just for conditionals without making use of the possibility of recursion. For the abs operator the default is actually empty.
DEFINE cnr-even == [ [ [2 rem null] [pop true] ] [ [pop false] ] ] condnestrec; cnr-abs == [ [ [0 <] [0 swap -] ] [ [] ] ] condnestrec. 3 cnr-even. false 4 cnr-even. true -5 cnr-abs. 5 6 cnr-abs. 6
The use of nested recursion in Joy has not yet been explored beyond these examples. All the examples took a numeric parameter to guide the recursion, and one obvious alternative to investigate is the use of lists.
MYNOTE: Bauer and Woessner, functions ble and morris. Manna, Ackermann for strings.


Pedestrian hit by train dies
by Jon ManchesterUPDATE: 10:30 a.m.
Surrey RCMP say a man who was struck by a train in Cloverdale Wednesday has died.
The victim was rushed to hospital, but died later of multiple serious injuries.
ORIGINAL: 6:40 a.m.
A pedestrian was struck by a train in Surrey, Wednesday evening.
Surrey RCMP say the incident happened near the intersection of 53rd Avenue, at 184th Street in Cloverdale, about 7:20 p.m.
The male victim suffered serious and potentially life-threatening injuries, says Sgt. Mel Wong.
Traffic in the area was shut down overnight, but roads have since reopened.
Investigators are seeking witnesses to the collision, and anyone with information is asked to contact Surrey RCMP at<PHONE_NUMBER>, or CrimeStoppers at 1-800-222-TIPS or www.solvecrime.ca.


EVDatabaseType
public enum EVDatabaseType : String
Database codes
-
Compendex/EI Backfile
Declaration
Swift
case eiCompendex = "c"
-
Inspec/Inspec Archive
Declaration
Swift
case inspec = "i"
-
NTIS
Declaration
Swift
case ntis = "n"
-
Paperchem
Declaration
Swift
case paperchem = "pc"
-
Chimica
Declaration
Swift
case chimica = "cm"
-
CBNB
Declaration
Swift
case cbnb = "cb"
-
EnCompassLIT
Declaration
Swift
case enCompassLIT = "el"
-
EnCompassPAT
Declaration
Swift
case enCompassPAT = "ep"
-
GEOBASE
Declaration
Swift
case geobase = "g"
-
GeoRef
Declaration
Swift
case geoRef = "f"
-
US Patents
Declaration
Swift
case usParents = "u"
-
EP Patents
Declaration
Swift
case epParents = "e"


Arthur Fernandes
Web Designer
Passionate about technology and always motivated to deal with new challenges. Former Control Systems Engineer at the oil industry. Arthur was mainly engaged in the Meta Site providing the rationale and layout to present our team efforts to deliver a great solution.
Benedict Chan
Web Designer
Benedict is a full-time Computer Systems Technology (CST) student at BCIT who's interested in web technologies and development and how it's applied in the industry.
Gustavo Rocha
Team Lider
Gustavo is a full-stack developer and an Applied Web Development program student. Passionate about technologies and coding, I moved to Canada looking for new challenges. In this project, I will contribute with Javascript coding, especially for the quiz feature, as well as coding HTML and help to organize and maintain the git repository for the dev team.


Pure Python implementation of geodetic (lat-/longitude) methods using
spherical trigonometry, transcoded from JavaScript originals by (C)
Chris Veness 2011-2016 published under the same MIT Licence**, see Latitude/Longitude.
|
|
ispolar(points,
wrap=False)
Check whether a polygon encloses a pole. |
|
|
|
|
sumOf(vectors,
Vector=<class 'pygeodesy.vector3d.Vector3d'>,
**Vector_kwds)
Compute the vectorial sum of two oe more vectors. |
|
|
|
|
areaOf(points,
radius=6371008.771415,
wrap=False)
Calculate the area of a (spherical) polygon or composite (with the
pointsjoined by great circle arcs). |
|
|
|
|
intersecant2(center,
circle,
point,
bearing,
radius=6371008.771415,
exact=False,
height=None,
wrap=False)
Compute the intersections of a circle and a line. |
|
|
|
|
intersection(start1,
end1,
start2,
end2,
height=None,
wrap=False,
LatLon=<class 'pygeodesy.sphericalTrigonometry.LatLon'>,
**LatLon_kwds)
Compute the intersection point of two lines, each defined by two
points or a start point and bearing from North. |
|
|
|
|
intersections2(center1,
rad1,
center2,
rad2,
radius=6371008.771415,
eps=0.0,
height=None,
wrap=False,
LatLon=<class 'pygeodesy.sphericalTrigonometry.LatLon'>,
**LatLon_kwds)
Compute the intersection points of two circles each defined by a
center point and a radius. |
|
|
|
|
|
|
|
meanOf(points,
height=None,
wrap=False,
LatLon=<class 'pygeodesy.sphericalTrigonometry.LatLon'>,
**LatLon_kwds)
Compute the geographic mean of several points. |
|
|
|
|
|
|
|
nearestOn3(point,
points,
closed=False,
radius=6371008.771415,
wrap=False,
adjust=True,
limit=9,
**LatLon_and_kwds)
Locate the point on a path or polygon closest to a reference point. |
|
|
|
|
perimeterOf(points,
closed=False,
radius=6371008.771415,
wrap=True)
Compute the perimeter of a (spherical) polygon or composite (with
great circle arcs joining the points). |
|
|
|
|
triangle7(latA,
lonA,
latB,
lonB,
latC,
lonC,
radius=6371008.771415,
excess=<function excessAbc_ at 0x7f7d886a3850>,
wrap=False)
Compute the angles, sides, and area of a (spherical) triangle. |
|
|
|
|
triangle8_(phiA,
lamA,
phiB,
lamB,
phiC,
lamC,
excess=<function excessAbc_ at 0x7f7d886a3850>,
wrap=False)
Compute the angles, sides, spherical deficit and spherical
excess of a (spherical) triangle. |
|
|


| GHIN | Last Name | First Name | Full Name | Gold Tees | Signed Up Date | New Member | Payment Code | Event Fee | Gross | Net Flights | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{row.memberGhin}} | {{row.lastName}} | {{row.firstName}} | {{row.memberName}} | {{row.email}} | {{row.forwardTees ? 'X' : ''}} | {{row.reserved}} | {{row.isNewMember ? 'X' : ''}} | {{row.paymentCode}} | {{row.eventFee | currency:'USD':true}} | {{row.isNetSignup ? '' : 'X'}} | {{row.isNetSignup ? 'X' : ''}} |
| Totals: | {{summary.eventFees | currency:'USD':true}} | ||||||||||
| Counts: | {{summary.eventCount}} | {{summary.grossSkinsCount}} | {{summary.netSkinsCount}} |


So after a several attempts with dosages up to 50mgs and relatively mild experiences I decided that not only was this substance seemingly lacking in the reportedly potentially 'dangerous' potency levels but that I wanted to really take it for a solid test drive.
I measured out 100mgs into a veg-cap and down the hatch. I had just gotten off work and had some housework to do and knowing the stimulant properties that I had experienced in earlier trials, I thought it an appropriate setting to take it for a spin.
T + 30min - Starting to feel the come up, energy circulating and a few little chills beginning.
T + 60min - The come-up feels like its lagging a bit, perhaps I ate too soon before dropping. Still, effect increasing, but slowly.
T + 75min - Ok, now I'm going a little better. Defined tingles on scalp and in extremities, seems to increase with activity. I occasionally have to take breaks from cleaning to just breathe and be with the feeling.
T + 90min - Hot...Sweaty...a little scattered, definately would not want to run into a co-worker or my Mom. Tingles are nice and pretty consistent at this point, reminding me a lot of the ephedrine like buzz but as noted in previous experiences, a little cleaner feeling, no palpitations, nausea, etc...feeling pretty good.
T + 120min - No marked changes, this is peak time, tingles and chills abound, no want of food at all though water is good. I make some Mac and Cheese for my girl and taste it and it tastes like the most bland mac and cheese ever...thought she reports that 'it is good'.
T + 180min - Still zooming along, no sign of the short come down experienced with my lower dosage trials, perhaps there is a threshhold to be crossed in there and this time I did. The physical sensations are trailing off a little perhaps, or at least becoming less frequent. Folding laundry is making me sweat profusely.
T + 300min - Still so hot...but the effects, at least the pleasant one, have more or less subsided over the last two hours. I am still alert, still sweating, and still geeked a little bit, but I could probably deal with my Mom or a co-worker at this point. My Girlfriend says she can't tell except that I am so sweaty, but that otherwise I am acting normal, if not just a little too awake for this time of day for what is typical with me.
I began this experiment at 4:30 with first effect noted at 5:00ish...after several hours of pleasant, the effects have degraded to anorexia, sleeplessness, and mild agitation. I just want to sleep but I stay awake in bed for hours...I got up to pee and get water at about 1:00am and fell to sleep shortly after returning to bed. So that puts the short term effects initially experienced as just low dosage.
I can say that 100mgs was probably enough for me. I might try more at some point but I am concerned about my inability to cool off, even with all the windows open on a cool night with my shirt off, simply folding laundry was like a work-out at the gym...lots of sweat and heat. My previous assumption that it might be fun for dancing would be true if not for the extreme heat at most clubs and raves, so I would recommend test driving outside of such a heat prone environment before taking it out to the clubs. I would probably also recommend not using it with other stimulants unless perhaps as a booster for MDMA or something, as the body feelings might be quite pleasant in combination. Anyway, that's it for 2-AI for now, we'll stow it back in the magic box until a time when it might be useful comes along.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


This example describes how to create a class that obtains some of its properties from a database, and refers to the code contained within the example directories available from examples.zip.
Any class which has properties inflated from database data should implement the org.bhavaya.util.Observable interface and support the firePropertyChange methods described later. These methods are needed to provide the real-time functionality, however, as a starting point it is only necessary to make the class a sub-class of org.bhavaya.util.DefaultObservable. The new class may also implement the org.bhavaya.beans.LifeCycle interface, which has methods called at various points in a bean's life-cycle and is described here.
Bhavaya class properties follow the Java Beans convention and are derived from the class's getter and setter methods. e.g. if a class has methods getFoo and setFoo, then it is assumed to have a property foo. If the properties are determined from database data then the getter and setter methods must be implemented as abstract methods within the class. Example2 contains an Instrument class (Instrument.java), which follows these conventions.
The mapping between class properties and database data is contained in the schema.xml file. In turn, the schema to be used is specified in the application.xml file by adding the tag:
<property key="schema" value="schema.xml"/>
The format of the schema file should be intuitive. The datasource for the class (as defined in application.xml), and the mapping between the class's properties and database columns is specified. The format used is described completely here.
Example2.java uses the schema.xml and application.xml files discussed above. Objects of classes are obtained from a BeanFactory (org.bhavaya.beans.BeanFactory) for the class in question. e.g.
BeanFactory instrumentFactory = BeanFactory.getInstance(Instrument.class);
Obtains a factory for objects of the Instrument class. Objects created in this way will commonly be referred to as beans throughout these webpages. Beans (and collections of beans) can be obtained from this factory using a number of techniques. The simplest of which is to use the database primary key that relates to the bean:
Instrument instrument = (Instrument) instrumentFactory.get(new Integer(3));
which retrieves an instrument bean using values from the database row that has an integer primary key of 3. If you run Example2 you should see output similar to:
Found resource: file:/C:/Projects/WWWBeanFactoryTesting/./resources2/application2.xml Found resource: file:/C:/Projects/WWWBeanFactoryTesting/./resources2/createExample2.sql Found resource: file:/C:/Projects/WWWBeanFactoryTesting/./resources2/schema2.xml instrument description = M&S 7.75 30/12/2003 Price = 8.96 VAT Price = 10.53 Setting price to 5.99 instrument description = M&S 7.75 30/12/2003 Price = 5.99 VAT Price = 7.04 Found resource: file:/C:/Projects/WWWBeanFactoryTesting/./resources2/destroyExample2.sql
The code uses instrument's setters and getters to obtain its description and price. Price is obtained from the database, whereas the current VAT rate is a standard class property. The setters only apply to the current bean and do not update the values in the database.
After briefly reviewing the schema file format, you should be in a position to modify the schema and class files to extract and use classes from tables in your database.
Generated classes can have properties that return objects of other generated classes. Example3 includes a Currency class, and also adds a currency table to the database (the instrument table is also modified to include the currency table foreign key constraint). A type definition for currency has also been added to the schema file.
The two classes are tied together by adding a foreign key property to the type definition for the Instrument class in the schema file, and a corresponding abstract getCurrency() method to the Instrument class.Example3.java simply prints out one of the currency entries to illustrate this functionality.
A foreign key property need not be unique, i.e. it may return a BeanCollection rather than just a single Bean. In this case the foreignKeyProperty has cardinality="MANY" and the abstract bean has getters and setters for a collection and a getter for an array i.e.
public abstract ReportAttachment[] getReportAttachments(); public abstract BeanCollection getReportAttachmentsCollection(); public abstract void setReportAttachmentsCollection(BeanCollection collection); <foreignKeyProperty name="reportAttachments" type="org.somewhere.ReportAttachment" cardinality="MANY" foreignIndex="byReport" <!-- the indexing rule would by specified in reportAttachments schema entry --> lazy="true"> <column name="id"/> </foreignKeyProperty>
Generated classes can be subclasses of other generated classes. Example4 has a Bond class which is a subclass of Instrument. The subclass should be added in the same way as any other class: there must be a table for it in the database and its type definition should be added to the schema file.
The relationship is implemented at the database level and in the schema.xml file. The subclass database table (bond) has a foreign key reference to its parent table (instrument) and both class's definitions in the schema file have additional entries. schema4.xml contains these modifications. The parent class (instrument) type definition has a subClassMappings tag, and the Bond type tag contains a reference to the superType. The sql for generating Bonds is also a join on the two tables.
Bond beans can be obtained from a BeanFactory for Instrument.class or Bond.class. In the case of a BeanFactory for Instrument.class, returned beans can be Instruments or Bonds (depending on the key used for retrieval) with the expected polymorphic behaviour.
Generated classes can have properties that return objects of other classes, where the returned class is not itself based on a database table. The constructor and the data used to instantiate the returned class is specified, allowing some of the returned class's properties to be set using data from the database.
The schema file is again used via a constructorProperty tag. This tag contains nested tags describing the sources for the constructor's arguments. Each nested tag specifies its return type, so that the correct constructor can be used. Values for the constructor can be obtained from a bean's existing properties (which may be foreign) or from a database column, or they can be a fixed value.
Example5 demonstrates the use of a constructor property for the Quantity class. The Schema file has the following additional entries:
<constructorProperty name="instrumentQuantity" type="Quantity"> <defaultValue value="5" type="int"/> <column name="PRICE" source="instrumentQuantity.price" type="double"/> <property name="currency.code" type="java.lang.String"/> <defaultValue value="T" type="java.util.Date"/> </constructorProperty>
This defines a property of an Instrument bean to be instrumentQuantity whose return type is Quantity. It will be constructed using Quantity(int, double, String, Date) with fixed values, values obtained from the database, and from instrument's foreignKey property currency. The full syntax is described in the schema file format.


‘Move’ to sell lands to fund welfare schemes faulted
by Staff ReporterSenior TDP leader and former Finance Minister Yanamala Ramakrishnudu said on Saturday that the State was witnessing flight of capital and loss of employment because of the YSRCP government adopting the reverse tenders system and stopping the development of Amaravati and other major projects.
In a press release, Mr. Ramakrishnudu, who is also Leader of the Opposition in the Legislative Council, accused the YSRCP of resorting to the politics of vengeance. “The government will go bankrupt if the lands belonging to it are sold. To say that the purpose is to utilise the sale proceeds for the welfare schemes is nothing but cheating the poor people,” he said.
“The government has plans to sell off lands, which proves its inefficiency,” he observed.
Sand shortage
Mr. Ramakrishnudu stated that sand scarcity was artificially created to benefit vested interests, and the government was passing time with false claims that the steps taken had eased the problem.
“There is an yawning gap between what Chief Minister Y.S. Jagan Mohan Reddy has said about Navaratnalu schemes and the manner and extent to which they are implemented,” he stated.


Epic of Gilgamesh
TabletIII
The Elders spoke to Gilgamesh, saying: "Gilgamesh, do not put your trust in (just) your vast strength, but keep a sharp eye out, make each blow strike in mark! 'The one who goes on ahead saves the comrade." 'The one who knows the route protects his friend.' Let Enkidu go ahead of you; he knows the road to the Cedar Forest, he has seen fighting, has experienced battle. Enkidu will protect the friend, will keep the comrade safe. Let his body urge him back to the wives ())." "in our Assembly we have entrusted the King to you (Enkidu), and on your return you must entrust the King back to us!" Gilgamesh spoke to Enkidu, saying: "Come on, my friend, let us go to the Egalmah Temple, to Ninsun, the Great Queen; Ninsun is wise, all-knowing. She will put the advisable path at our feet." Taking each other by the hand, Gilgamesh and Enkidu walked to the Egalmah ("Great Palace"), to Ninsun, the Great Queen. Gilgamesh arose and went to her. "Ninsun, (even though) I am extraordinarily strong (!)... I must now travel a long way to where Humbaba is, I must face fighting such as I have not known, and I must travel on a road that I do not know! Until the time that I go and return, until I reach the Cedar Forest, until I kill Humbaba the Terrible, and eradicate from the land something baneful that Shamash hates, intercede with Shamash on my behalf' (!)   Ninsun went into her living quarters.  She sprinkled water from a bowl onto the ground. She... and went up to the roof. She went up to the roof and set incense in front of Shamash, .I she offered fragrant cuttings, and raised her arms to Shamash. "Why have you imposed--nay, inflicted!--a restless heart on my son, Gilgamesh! Now you have touched him so that he wants to travel a long way to where Humbaba is! He will face fighting such as he has not known, and will travel on a road that he does not know! Until he goes away and returns, until he reaches the Cedar Forest, until he kills Humbaba the Terrible, and eradicates from the land something baneful that you hate, on the day that you see him on the road(?) may Aja, the Bride, without fear remind you, and command also the Watchmen of the Night, the stars, and at night your father, Sin."
"She banked up the incense and uttered the ritual words.' She called to Enkidu and would give him instructions: "Enkidu the Mighty, you are not of my womb, but now I speak to you along with the sacred votaries of Gilgamesh, the high priestesses, the holy women, the temple servers." She laid a pendant(?) on Enkidu's neck, the high-priestesses took... and the "daughters-of-the-gods" ... "I have taken ... Enkidu... Enkidu to... Gilgamesh I have taken." "Until he goes and returns, until he reaches the Cedar Forest, be it a month ... be it a year.. ." [About 11 lines are missing here, and the placement of the following fragment is uncertain.] ... the gate of cedar... Enkidu ... in the Temple of Shamash, (and) Gilgamesh in the Egalmah. He made an offering of cuttings ... ... the sons of the king(!) ... [Perhaps some 60 lines are missing here.] "Enkidu will protect the friend, will keep the comrade safe, Let his body urge him back to the wives (?). In our Assembly we have entrusted the King to you, and on your return you must entrust the King back to us!" Enkidu spoke to Gilgamesh saying: "My Friend, turn back!... The road..." [The last lines are missing.]


eXtreme programming
practices
is about establishing the Flow
all code written by two persons working together on the same task on the same workstation
pair persons one level apart
have the person with least knowledge do most of the driving
tutoring is not pair programming
change role frequently and regularly
red green refactor
- write a failing unit test
- make sure it fails for the right reasons
- make the test pass
- refactor
- repeat
done is when no more tests can be written
merge with upstream often
or any kind of duplication
coding standards not followed
insufficient automated tests
rigid design and architecture
there is a cure refactoring
restructure the code without affecting behaviour
bugfixing is not refactoring
rewriting is not refactoring
improves quality attributes
unit tests are a safety net
code should be self-documenting
collective code ownership
speed of development increases
a rested brain is a creative brain
Reflect
Feedback? Questions?
Reflect
Feedback? Questions?
Do you want to adopt these practices?
Reflect
Feedback? Questions?
What barriers do you see that stop you from adopting these practices?


#Importing required libraries and dataset
import numpy as np
from nilearn.input_data import MultiNiftiMasker
from sklearn.linear_model import OrthogonalMatchingPursuit as OMP
from sklearn.feature_selection import f_classif, SelectKBest
from sklearn.pipeline import Pipeline
from sklearn.metrics import (accuracy_score, precision_score, recall_score, f1_score)
from matplotlib import pyplot as plt
from nilearn.plotting import show
from nilearn import datasets
#Fetching the Dataset
miyawaki_dataset = datasets.fetch_miyawaki2008()
X_random = miyawaki_dataset.func[12:]
X_figure = miyawaki_dataset.func[:12]
y_random = miyawaki_dataset.label[12:]
y_figure = miyawaki_dataset.label[:12]
y_shape = (10, 10)
#Load and mask fMRI data
masker = MultiNiftiMasker(mask_img=miyawaki_dataset.mask, detrend=True, standardize=False)
masker.fit()
X_train = masker.transform(X_random)
X_test = masker.transform(X_figure)
#We load the visual stimuli from csv files
y_train = []
for y in y_random:
y_train.append(np.reshape(np.loadtxt(y, dtype=np.int, delimiter=','), (-1,) + y_shape, order='F'))
y_test = []
for y in y_figure:
y_test.append(np.reshape(np.loadtxt(y, dtype=np.int, delimiter=','), (-1,) + y_shape, order='F'))
X_train = np.vstack([x[2:] for x in X_train])
y_train = np.vstack([y[:-2] for y in y_train]).astype(float)
X_test = np.vstack([x[2:] for x in X_test])
y_test = np.vstack([y[:-2] for y in y_test]).astype(float)
n_pixels = y_train.shape[1]
n_features = X_train.shape[1]
def flatten(list_of_2d_array):
flattened = []
for array in list_of_2d_array:
flattened.append(array.ravel())
return flattened
#Build the design matrix for multiscale computation
#Matrix is squared, y_rows == y_cols
y_cols = y_shape[1]
#Original data
design_matrix = np.eye(100)
#Example of matrix used for multiscale (sum pixels vertically)
#
# 0.5 *
#
# 1 1 0 0 0 0 0 0 0 0
# 0 1 1 0 0 0 0 0 0 0
# 0 0 1 1 0 0 0 0 0 0
# 0 0 0 1 1 0 0 0 0 0
# 0 0 0 0 1 1 0 0 0 0
# 0 0 0 0 0 1 1 0 0 0
# 0 0 0 0 0 0 1 1 0 0
# 0 0 0 0 0 0 0 1 1 0
# 0 0 0 0 0 0 0 0 1 1
height_tf = (np.eye(y_cols) + np.eye(y_cols, k=1))[:y_cols - 1] * .5
width_tf = height_tf.T
yt_tall = [np.dot(height_tf, m) for m in y_train]
yt_large = [np.dot(m, width_tf) for m in y_train]
yt_big = [np.dot(height_tf, np.dot(m, width_tf)) for m in y_train]
#Add it to the training set
y_train = [np.r_[y.ravel(), t.ravel(), l.ravel(), b.ravel()] for y, t, l, b in zip(y_train, yt_tall, yt_large, yt_big)]
y_test = np.asarray(flatten(y_test))
y_train = np.asarray(y_train)
#Remove rest period
X_train = X_train[y_train[:, 0] != -1]
y_train = y_train[y_train[:, 0] != -1]
X_test = X_test[y_test[:, 0] != -1]
y_test = y_test[y_test[:, 0] != -1]
#We define our Prediction function
#Create as many OMP(OrthogonalMatchingPursuit) as voxels to predict
clfs = []
n_clfs = y_train.shape[1]
for i in range(y_train.shape[1]):
clf = Pipeline([('selection', SelectKBest(f_classif, 500)), ('clf', OMP(n_nonzero_coefs=10))])
clf.fit(X_train, y_train[:, i])
clfs.append(clf)
#Run the prediction function
y_pred = []
for clf in clfs:
y_pred.append(clf.predict(X_test))
y_pred = np.asarray(y_pred).T
# We need to the multi scale reconstruction
def split_multi_scale(y, y_shape):
#Split data into 4 original multi_scale images
yw, yh = y_shape
#Index of original image
split_index = [yw * yh]
#Index of large image
split_index.append(split_index[-1] + (yw - 1) * yh)
#Index of tall image
split_index.append(split_index[-1] + yw * (yh - 1))
#Index of big image
split_index.append(split_index[-1] + (yw - 1) * (yh - 1))
#We split according to computed indices
y_preds = np.split(y, split_index, axis=1)
#y_pred is the original image
y_pred = y_preds[0]
#y_pred_tall is the image with 1x2 patch application. We have to make
#some calculus to get it back in original shape
height_tf_i = (np.eye(y_cols) + np.eye(y_cols, k=-1))[:, :y_cols - 1] * .5
height_tf_i.flat[0] = 1
height_tf_i.flat[-1] = 1
y_pred_tall = [np.dot(height_tf_i, np.reshape(m, (yw - 1, yh))).flatten()
for m in y_preds[1]]
y_pred_tall = np.asarray(y_pred_tall)
#y_pred_large is the image with 2x1 patch application. We have to make
#some calculus to get it back in original shape
width_tf_i = (np.eye(y_cols) + np.eye(y_cols, k=1))[:y_cols - 1] * .5
width_tf_i.flat[0] = 1
width_tf_i.flat[-1] = 1
y_pred_large = [np.dot(np.reshape(m, (yw, yh - 1)), width_tf_i).flatten()
for m in y_preds[2]]
y_pred_large = np.asarray(y_pred_large)
#y_pred_big is the image with 2x2 patch application. We use previous
#matrices to get it back in original shape
y_pred_big = [np.dot(np.reshape(m, (yw - 1, yh - 1)), width_tf_i)
for m in y_preds[3]]
y_pred_big = [np.dot(height_tf_i, np.reshape(m, (yw - 1, yh))).flatten()
for m in y_pred_big]
y_pred_big = np.asarray(y_pred_big)
return (y_pred, y_pred_tall, y_pred_large, y_pred_big)
y_pred, y_pred_tall, y_pred_large, y_pred_big = split_multi_scale(y_pred, y_shape)
y_pred = (.25 * y_pred + .25 * y_pred_tall + .25 * y_pred_large + .25 * y_pred_big)
#Check the Scores of the model
print("Scores")
print("------")
print(" - Accuracy (percent): %f" % np.mean([
accuracy_score(y_test[:, i], y_pred[:, i] > .5) for i in range(100)]))
print(" - Precision: %f" % np.mean([
precision_score(y_test[:, i], y_pred[:, i] > .5) for i in range(100)]))
print(" - Recall: %f" % np.mean([
recall_score(y_test[:, i], y_pred[:, i] > .5) for i in range(100)]))
print(" - F1-score: %f" % np.mean([
f1_score(y_test[:, i], y_pred[:, i] > .5) for i in range(100)]))
#Finally we plot the Images
for i in range(6):
j = 10 * i
fig = plt.figure()
sp1 = plt.subplot(131)
sp1.axis('off')
plt.title('Stimulus')
sp2 = plt.subplot(132)
sp2.axis('off')
plt.title('Reconstruction')
sp3 = plt.subplot(133)
sp3.axis('off')
plt.title('Binarized')
sp1.imshow(np.reshape(y_test[j], (10, 10)), cmap=plt.cm.gray,
interpolation='nearest'),
sp2.imshow(np.reshape(y_pred[j], (10, 10)), cmap=plt.cm.gray,
interpolation='nearest'),
sp3.imshow(np.reshape(y_pred[j] > .5, (10, 10)), cmap=plt.cm.gray,
interpolation='nearest')
show()


Home
Weapons
Map
Clans
Skins
Leaderboard
Profile
More
News
Tips
PlayingCount
Overview
Statistics
Performance


How to Code C++ From Beginner to Pro!!
This course will show you how to code C++ from beginner to pro in just 32 videos. Read More Hot
This pages provides tutorials made by SabingViper that are free!!
This course will show you how to code C++ from beginner to pro in just 32 videos. Read More Hot
This is how to make 1000 views on Youtube in the first month. Read more New
This course will show you how to code C# from beginner to pro in just 32 videos. Read More
This course will show you how to code with Rust from beginner to pro in just 32 videos. Read More
This course will show you how to use Photoshop from beginner to pro in just 32 videos. Read More
This course will show you how to code Python from beginner to pro in just 32 videos. Read More
This course will show you how to Use After Effects from beginner to pro in just 32 videos. Read More Best
This course will show you how to Use Bootstrap in HTML from beginner to pro in just 32 videos. Read More
This course will show you how to code AngulaJS from beginner to pro in just 32 videos. Read More


Main Index
Success Index
Failure Index
Ignored Index
Exception Index
Fail-fast Index
Non-existent index
Invalid HTML
Exception in @Before method
Unimplemented (with failure)


Select Run Mode Run Model Once Run Model 10 Times Run Model 30 Times
Model Start Year Year 2040 Year 2050 Year 2060


Portable—Fast—Secure
OS with Linux-like syscalls
Bitcode based on LLVM's
but stable
Concurrency & parallelism
SIMD, threads, atomics, futex
Based on latest LLVM
Portable—Fast—Secure
OS with Linux-like syscalls
Bitcode based on LLVM's
but stable
Concurrency & parallelism
SIMD, threads, atomics, futex
Based on latest LLVM


Hakkam Abdullah
I am a graphic designer and art director. I am as well specialised in front end web design, user experience and creating identities. Throughout my career, I have worked with companies of all shapes and sizes that enriched my experience


@jl777c Seeds generation work fine with curls. Checked all langs you listed above.
You can log in with them in html wallet no problem.
Few problems: (on latest jl777 branch)
1. Using api call: http://<IP_ADDRESS>:7771/api/method/getnewaddress results in error {"error":"cant find methodfile"}
2.
Will recheck nspv build for WIn soon.
(edited)


Sign in using the Companies House login system and authorise use of scope
The user profile journey simulates requesting the Read User Profile scope


Welcome back,
Your analytics dashboard template.
/ Dashboard /
Analytics
Cash deposits
To start a blog, think of a topic about and first brainstorm party is ways to write details
Total sales
$ 28835
Gross sales over the years
Today, many people rely on computers to do homework, work, and create or store useful information. Therefore, it is important
Recent Purchases
| Name | Status report | Office | Price | Date | Gross amount |
|---|---|---|---|---|---|
| Jeremy Ortega | Levelled up | Catalinaborough | $790 | 06 Jan 2018 | $2274253 |
| Alvin Fisher | Ui design completed | East Mayra | $23230 | 18 Jul 2018 | $83127 |
| Emily Cunningham | support | Makennaton | $939 | 16 Jul 2018 | $29177 |
| Minnie Farmer | support | Agustinaborough | $30 | 30 Apr 2018 | $44617 |
| Betty Hunt | Ui design not completed | Lake Sandrafort | $571 | 25 Jun 2018 | $78952 |
| Myrtie Lambert | Ui design completed | Cassinbury | $36 | 05 Nov 2018 | $36422 |
| Jacob Kennedy | New project | Cletaborough | $314 | 12 Jul 2018 | $34167 |
| Ernest Wade | Levelled up | West Fidelmouth | $484 | 08 Sep 2018 | $50862 |


Open your browser's console and click the buttons below. View source on this page to see how it works.


As Good As It Gets A review by Joe Chamberlain
Starring Jack Nicholson; Helen Hunt; Greg Kinnear; Cuba Gooding Jr. & Skeet Ulrich
Jack Nicholson and Helen Hunt both won Oscars for their performances in As Good As It Gets, and Greg Kinnear was nominated for his performance as well. For a movie that received such attention at the awards ceremonies, it was certainly a heck of a disappointment. As Good As It Gets was marketed as sort of a romantic comedy, but this movie was short on comedy and the romance was the pits.
Nicholson plays an obsessive-compulsive writer who, to put it bluntly, is obnoxious. He falls in love with his waitress at the local restaurant (Helen Hunt), who just happens to have a gravely ill son. Throw in to the mix Nicholson's gay next door neighbor (Greg Kinnear), who Nicholson's character takes great delight in tormenting and you have the basis for a movie that isn't that great. Certainly not worthy of all the critical acclaim that it has received. But then again, what do critics know? Adding to the intricate plot twists of the movie (I'm being sarcastic here, just in case you missed it), Kinnear's character gets beaten up when he walks in on burglars. So by some miracle of modern cinematic genius, Kinnear, Hunt and Nicholson go off on some road trip so Kinnear's character can go beg his parents for money to tide him over until he recovers from his injuries. It sounds stranger than it actually is, but it really isn't significantly better.
If it were anyone else other than Jack Nicholson playing the role of the obsessive-compulsive belligerent lead character, I will go out on a limb and say that this movie would have crashed and burned within the first ten minutes. But since it is Jack, no matter how unlikable the character is, you still have to begrudgingly be rooting for him. Nicholson injected enough humor into the part to prevent me from hating the character. As for Helen Hunt, I have no idea why she ever won an Oscar for her performance. Her acting abilities are not bad, but the character was so whiny that I kept wondering what the heck Nicholson's character saw in her. Next to Nicholson, Greg Kinnear gave the most solid performance in this film, although even he was also a little on the whiny side. Cuba Gooding Jr. should also be mentioned as one of Kinnear's gay friends. Cuba stole every scene he was in, including those that he shared with Nicholson -- no small feat.
Aside From the good performances from Nicholson, Kinnear, and Gooding, there is really no other reason to recommend that people actually sit through As Good As It Gets. The love story isn't that compelling. I never cared if Nicholson and Hunt ever got together. On top of that, Nicholson mellowed far too quickly for my liking. At the first of the film he was just plain obnoxious, towards the end he was almost likable which seemed to be just a little too convenient for my tastes. As Good As It Gets ranks as one of the bigger disappointments in recent years.
6/10
Visit The Movie Guy http://movieguy.tripod.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Basics
The library was started as JavaScript to CSS compiler. So, the main input format is JavaScript. Every object defines a selector. Every property of that object could be a property and its value or another object. For example:
{
body: {
marginTop: '20px',
padding: 0
}
}
body
is a CSS selector, marginTop
and padding
are CSS properties.
Nesting
As many other preprocessors, AbsurdJS also supports nesting.
{
body: {
marginTop: '20px',
width: '100%',
header: {
width: '200px',
p: {
fontSize: '20px'
}
}
}
}
The result of the this code snippet is:
body {
margin-top: 20px;
width: 100%;
}
body header {
width: 200px;
}
body header p {
font-size: 20px;
}
The problem with quoting
As you may guess, you need to use a lot of quotes in your code. Otherwise the JavaScript will invalid. That's especially valid for the values of the properties. Except the cases where the value is just an integer you should wrap everything into quotes. However, you don't need to do that for the name of the properties. There is a logic which converts every uppercase letter to a dash followed by its lowercase version.
marginTop -> margin-top
fontSize -> font-size
WebkitTransition -> -webkit-transition
Browser vendor prefixes
That's one of the big benefits of the CSS preprocessors. You don't have to think about the prefixes for the different browser. AbsurdJS has plugins which solve the same problem. However this functionality is not part of the library's core. There is something which you may use if you don't rely on a plugin.
header: {
'-wmso-animation': 'slide'
}
w
is for webkit
, m
is for moz
, s
is for ms
, o
is for Opera's prefix.
header {
animation: slide;
-webkit-animation: slide;
-moz-animation: slide;
-ms-animation: slide;
-o-animation: slide;
}
Of course you may skip some of the prefixes and use only some of them, like -w-transition: all 300ms
produces:
transition: all 300ms;
-webkit-transition: all 300ms;
For adding all the prefixes you may use just a single dash -
.
The described functionality is part of Organic framework. For the Node.js version of the library is added by default, but for the client-side port you need to include it additionally.
Pseudo classes
The pseudo classes are defined as every other property. They should be nested into the element. For example:
a: {
textDecoration: 'none',
':hover': {
color: '#BADA55'
},
':after': {
content: '"<"'
}
}
The result is:
a {
text-decoration: none;
}
a:hover {
color: #BADA55;
}
a:after {
content: "<";
}
Ampersand operator
The ampersand operator is a pointer to the wrapper. I.e. if you need to write a selector containing the parent one you may use &
sign.
a: {
textDecoration: 'none',
'& span, &.active': {
color: 'blue'
}
}
Notice that you may use it as many times as you want. Even to create a decorator class of the parent selector. Like in the example above we are defining styles for the nested span
element, but also for an .active
version of the link.
a {
text-decoration: none;
}
a span, a.active {
color: blue;
}
Putting something in the beginning of the generated selector
Very often you need to add a little hack and apply a CSS rule only for specific browser or version of the application. It's a common practice to add a class on the very top element (like body
). For example:
p a {
margin-top: 22px;
}
.android p a {
margin-top: 24px;
}
That's easy doable with AbsurdJS. I.e.:
section: {
a: {
fontSize: '12px',
'^.ie': {
fontSize: '22px'
}
},
p: {
lineHeight: '30px',
'^.ie': { lineHeight: '32px' },
'^.mobile': { background: '#999' }
}
}
The compiled CSS:
section a {
font-size: 12px;
}
.ie section a {
font-size: 22px;
}
section p {
line-height: 30px;
}
.ie section p {
line-height: 32px;
}
.mobile section p {
background: #999;
}
It's always nice to keep your code well structured and define those custom styles together with the main definitions.
Using an array as value
Very often you will compose the styles by using external modules or functions. Having this in mind you should know that you may use arrays.
var a = {
fontSize: '12px'
}
var b = {
margin: '10px'
}
api.add({
body: [a, b]
});
Produces:
body {
font-size: 12px;
margin: 10px;
}
Using classify property
There are cases where you want to send an object as a value, but don't want to be compiled as a nested element. In such cases you may use the classify
property. For example:
var px = function(value) {
return {
classify: true,
add: function(num) {
value += num; return this;
},
remove: function(num) {
value -= num; return this;
},
toString: function() {
return value + 'px';
}
};
};
var size = function(w, h) {
return {
classify: true,
toJSON: function() {
return {
width: w + 'px',
height: h + 'px'
};
}
};
};
absurd.add({
body: {
width: px(60).add(20).remove(10),
section: size(950, 200)
}
}).compile(function(err, css) {
console.clear();
console.log(css);
});
body {
width: 70px;
}
body section {
width: 950px;
height: 200px;
}
AbsurdJS uses the toString
or toJSON
function of the passed object (if any) to retrieve the result.
Compile multiple versions of same property
Sometimes you may need to add one property several times. In such cases use the following syntax:
api.add({
header: {
background: "#F00",
"%%background": "#0F0",
"%ver1%background": "#00F",
"%ver2%background": "#BADA55"
}
});
The result is:
header {
background: #F00;
background: #0F0;
background: #00F;
background: #BADA55;
}
AbsurdJS just removes the %
letters and everything between them.
Writing JavaScript expressions inside your CSS
Instead of adding logic in the JavaScript part we are able to write expressions directly into the CSS definitions.
api.morph('dynamic-css').add({
'.content <% elClass %>': {
width: '<% w %>',
padding: '20px'
}
}).compile(function(err, css) {
}, { w: '300px', elClass: '.black' });
The result is:
.content .black {
width: 300px;
padding: 20px;
}
comments powered by Disqus