Releases
Version downloads and complete release notes
Issues found via fuzzing by Guido Vranken
In June 2017, Guido Vranken found a number of issues with OpenVPN. One issue was a slow memory leak due to mis-use of the OpenSSL API. He contacted us to say that FreeRADIUS had the same issue as OpenVPN. We fixed that issue immediately in the the v2.x.x branch, and also fixed it in the v3.0.x branch, and the v4.0.x branch. The v3.1.x branch is unsupported, and has been deleted. Similarly, we do not discuss the v0 or v1 releases, as those are end of life and unsupported.
In order to improve the security of FreeRADIUS, we asked Guido to try fuzzing FreeRADIUS. He spent a week working with us, and managed to find a number of issues. We worked together to create and validate fixes for all of them. His blog contains a short note on the subject.
The short summary is that if your RADIUS server is on a private network, accessible only by managed devices, you are likely safe. If your RADIUS server is part of a roaming consortium, then anyone within that consortium can attack it. If your RADIUS server is on the public internet, then you are not following best practices, and anyone on the net can attack your systems.
Secure coding in C
Given the scope of these issues, there needs to be a statement on the security aspects of coding in C. In short, C is a terrible language for security. We have understood this for many years, and have taken pro-active steps to deal with the limitations of C. For example, we worked with Coverity as far back as 2007 to scan FreeRADIUS.
Starting from version 3, all versions of the server have built with zero compiler warnings. All releases have passed static analyis by Coverity, Clang analyzer, and cppcheck. We have also used PVS-Studio, with results here. Each static analysis tool has it's pros and cons, and each one usually finds things which are missed by all of the others.
We also have hundreds of regression tests, which check that "well formed" attributes and packets are decoded correctly, and that "malformed" attributes and packets do not cause misbehavior in the server.
As is apparent from this page, those processes are not enough to ensure secure C code. In short:
We will therefore be integrating the fuzzer into all future releases of the server. We will be updating our automated build system to run with memory sanitizers enabled. We strongly recommend that other software projects follow the same practices.
If multiple static analyers and hundreds of regression tests are not enough for us to find these security issues, they are probably not enough for you, either.
Summary of Issues
This page summarizes his findings, along with our response, analysis, and fixes. The items are labeled FR-GV-###, followed by which version(s) of the server are affected (v2, v3, etc.), and finally by a short description. His work led us to do additional tests, which found other issues that are labeled FR-AD-###.
The issues below were found via fuzzing and address sanitization checks. Not all are exploitable. Out of 15 issues, 5 have no possible exploit. Six (6) issues are only for DHCP, leaving 4 for RADIUS.
FR-GV-201 (v2,v3) Read / write overflow in make_secret()
FR-GV-202 (v2) Read overflow in rad_coalesce()
FR-GV-203 (v2) DHCP - Memory leak in decode_tlv()
FR-GV-204 (v2) DHCP - Memory leak in fr_dhcp_decode()
FR-GV-205 (v2) DHCP - Buffer over-read in fr_dhcp_decode_options()
FR-GV-206 (v2,v3) DHCP - Read overflow when decoding option 63
FR-GV-207 (v2) Zero-length malloc in data2vp()
FR-GV-301 (v3) Write overflow in data2vp_wimax()
FR-GV-302 (v3) Infinite loop and memory exhaustion with 'concat' attributes
FR-GV-303 (v3) DHCP - Infinite read in dhcp_attr2vp()
FR-GV-304 (v3) DHCP - Buffer over-read in fr_dhcp_decode_suboptions()
FR-GV-305 (v3) Decode 'signed' attributes correctly
FR-AD-001 (v2,v3) Use strncmp() instead of memcmp() for string data
FR-AD-002 (v3) String lifetime issues in rlm_python
FR-AD-003 (v3) Incorrect statement length passed into sqlite3_prepare
For some issues, the same or similar code appears in all versions of FreeRADIUS. i.e. from version 2, to version 3, and the "in development" v4.0.x branch. As a result, we present the findings by issue, and state which versions are affected. Where issues only apply one version, we show them for version 2, and then version 3. We do not discuss the v4.0.x branch here, as it has not had an official release. Finally, these issues affect all releases of FreeRADIUS version 2 and 3.
On July 17 2017, we will release versions 2.2.10 and 3.0.15 in order to address these issues. Guido has provided us with the source for the fuzzers. The fuzzers will be integrated into future releases of FreeRADIUS.
RADIUS Security
Before we discuss the issues, we must first give the reader some background on RADIUS security and associated best practices.
In general, RADIUS security can only be described as "poor". The protocol was designed in 1993, and uses MD5 to sign packets with a "shared secret". While MD5 has been broken, no one has shown that the attacks on MD5 can be extended to attack RADIUS. That is, packets which are signed with the shared secret are considered to be sent from a "trusted" source.
The design of RADIUS ensures that all packets except Access-Request are signed. In FreeRADIUS, this signature is checked prior to any packet decoding. This check ensures that only packets from "trusted" sources are accepted by the server. In most cases, therefore, only packets from those "trusted" sources can exploit these issues.
While the Access-Request packets are not signed by default, RADIUS provides for a signature via the Message-Authenticator attribute. Again, packets signed via this method are from "trusted" sources, and only those sources can exploit these issues.
However, many NAS implementations do not send a Message-Authenticator attribute in Access-Request packets. In those situations, any attacker who can forge packets from the NAS to the RADIUS server can have those packets accepted by the server, and can exploit these issues.
This security issue in RADIUS has been known for over a decade. RFC 5080 Section 2.2.2 says in part:
-
However, Access-Request packets not containing a Message-
Authenticator attribute always affect the cache, even though they may
be trivially forged. To avoid this issue, server implementations may
be configured to require the presence of a Message-Authenticator
attribute in Access-Request packets. Requests not containing a
Message-Authenticator attribute MAY then be silently discarded.
Client implementations SHOULD include a Message-Authenticator
attribute in every Access-Request to further help mitigate this
issue.
We strongly recommend that vendors update their firmware to include a Message-Authenticator attribute in all Access-Request packets. Where this change is not possible, we strongly recommend that all RADIUS administrators ensure that RADIUS traffic is on a secure management network. That is, end users should not be able to send any network traffic to a RADIUS server.
All versions of FreeRADIUS from version 2.0.0 onwards have provided
for a per-client
configuration require_message_authenticator
. This flag
rejects all Access-Request packets which do not contain a valid
Message-Authenticator attribute. We recommend that this flag be
enabled where possible. Once this flag is set, even in old an
un-patched versions of the server, the issues discussed here can only
be exploited by "trusted" sources. Also, as of version 2.1.3,
FreeRADIUS has ensured that proxied Access-Request packets always
contain a Message-Authenticator attribute. This change ensures that
all systems which receive Access-Request packets from a FreeRADIUS
proxy can set the require_message_authenticator
flag.
While this limitation minimizes the impact of these issues, it does not remove it entirely. Roaming agreements may provide for packets to be sent from parties who are largely unknown to the recipient, but who are within a "trusted" roaming coalition. We believe that breaches of trust by "trusted" parties are best dealt with via administrative means, and not technical ones. Still, we should still ensure that trusted parties are unable to exploit our trust in order to perform malicious actions.
Where is necessary to be part of a roaming consortium, administrators should ensure that all RADIUS traffic over the public Internet is encrypted with IPSec or TLS. We do not recommend placing a RADIUS server on the public net. Even independent of the issues disclosed here, the security of the RADIUS protocol is insufficient to guarantee safe operation on the public Internet.
DHCP Security
Finally, we note that the discussion above is about RADIUS security, and does not apply to DHCP. Unfortunately, DHCP protocol security can best be described as "in practice, non-existent". Unlike RADIUS, DHCP allows end users to send packets directly to DHCP servers. This capability means that it is harder for administrators to shield their DHCP servers from malicious parties.
We note that while FreeRADIUS includes DHCP functionality, it is not enabled by default. Administrators must take explicit action to configure it. As such, most FreeRADIUS sites are not vulnerable to the DHCP issues disclosed here. We still, however, recommend upgrading to a version which contains fixes for these issues.
Issues
The follow list describes each issue in detail. Included in each description are a statement in impact, exploit vector (where appropriate), a link to the fix, which versions are affected, and where appropriate, a CVE identifier.
FR-GV-201 (v2,v3) Read / write overflow in make_secret()
Issue: The make_secret()
function does not
properly check for output buffer size before writing data. It can
perform a read or write overflow of up to 16 octets.
Impact: Minimal. The issue will be see when the server is sending a RADIUS packet that is almost at the maximum (4K octets), and the last attribute in the packet is an Ascend-Send-Secret (or similar) attribute. The data being written is an MD5 digest of the shared secret, concatenated to data which is under the attackers control.
The issue will also be seen when receiving a packet that has an Ascend-Send-Secret (or similar) attribute of the wrong size. The server will read data past the end of the attribute, up to a limit of 16 octets.
Exploit vector: Read or write overflow, by anyone who can send packets which are accepted by the server.
Home servers which send large Access-Accept responses, with an Ascend-Send-Secret attribute as the last one in the packet, and where the proxy does minimal packet editing, may be able crash a proxy which receives that Access-Accept and forwards it to a NAS.
Fix: Ensure that the make_secret()
function
checks for bounds on the encapsulating packet. Fixed in
FR-GV-201
(v2), and
in FR-GV-201
(v3).
Affected versions: 2.0.0 through 3.0.14, inclusive.
CVE: This issue has been assigned CVE-2017-10978. No remote code execution is possible. A denial of service is possible.
FR-GV-202 (v2) Read overflow in rad_coalesce
Issue: The rad_coalesce()
function checks for
WiMAX attributes which are too small, but it does not check for WiMAX
attributes which are too large. As a result, the server can be
convinced to read past the end of an attribute, which may overflow the
heap, leading to a crash.
If the heap does not overflow, the only side-effect is the creation of a WiMAX attribute with "too much" data. The extra data is copied from the memory which is past the end of the attribute. That data is under control of an attacker, as with all other data in the forged packet. There do not appear to be any side-effects of using this bad data.
Earlier versions of this page suggested there was a write overflow vulnerability. Additional investigation showed this to be wrong.
This issue does not appear in version 3, as that code was re-written,
and the rad_coalesce
function does not exist in those
branches. However, similar issues appear in
the data2vp_wimax()
function in version 3.
Impact: Write overflow, possibly remote exploit by anyone who can send packets which are accepted by the server.
Exploit vector: The issue happens when the server receives
any packet containing malformed WiMAX attributes. One example of this
issue is the following data: 1a 0a 00 00 60 b5 2c 04 80 00 1a 09
00 00 60 b5 2c fa 00
. Similar formats can be used with other
WiMAX attributes, e.g. where the 2c
octet is replace by
other values. The exploit here is the fa
. That octet
indicates that there are 250 octets of data remaining in the
attribute, while in fact there is only one octet.
Fix: Check for attributes which are "too long", in addition to checking for attributes which are "too short". Fixed in FR-GV-202.
Affected versions: 2.0.0 through 2.2.9, inclusive.
CVE: This issue has been assigned CVE-2017-10979. Remote code execution is not possible. A denial of service is possible.
FR-GV-203 (v2) DHCP - Memory leak in decode_tlv()
Issue: the decode_tlv()
function leaked memory in certain circumstances.
Impact: Memory leak, potentially leading to memory exhaustion.
Exploit vector: Any network device capable of sending DHCP packets to FreeRADIUS, which sends option 82 with multiple sub-options.
Fix: Link all decoded attributes into the decoded packet. Fixed in FR-GV-203.
Affected versions: 2.0.0 through 2.2.9, inclusive.
CVE: This issue has been assigned CVE-2017-10980. No remote code execution is possible. A denial of service is possible.
FR-GV-204 (v2) DHCP - Memory leak in fr_dhcp_decode()
Issue: If option decoding fails,
the fr_dhcp_decode()
function would leak memory.
Impact: Memory leak, potentially leading to memory exhaustion.
Exploit vector: Any network device capable of sending DHCP packets to FreeRADIUS, which sends packets with malformed options.
Fix: Free partially decoded options on error. Fixed in FR-GV-204
Affected versions: 2.0.0 through 2.2.9, inclusive.
CVE: This issue has been assigned CVE-2017-10981. No remote code execution is possible. A denial of service is possible.
FR-GV-205 (v2) DHCP - Read overflow in fr_dhcp_decode_options()
Issue: The fr_dhcp_decode_options()
function
does not do proper bounds checks on option lengths, leading to out of
bounds reads.
Impact: The server can read up to 253 octets more data than it should. Depending on memory layout, this read may initiate a page fault, and cause the server to crash.
Exploit vector: Any network device capable of sending DHCP packets to FreeRADIUS, which sends packets with malformed options.
Fix: Check for options which are "too long", in addition to checking for attributes which are "too short". Fixed in FR-GV-205.
Affected versions: 2.0.0 through 2.2.9, inclusive.
CVE: This issue has been assigned CVE-2017-10982. No remote code execution is possible. A denial of service is possible.
FR-GV-206 (v2,v3) DHCP - Read overflow when decoding option 63
Issue: The fr_dhcp_decode()
function performed
a strcmp()
on binary data in an internal data structure,
instead of checking the length of the option and doing
a memcmp
.
Impact: The server can read memory until it reaches a zero byte. Depending on memory layout, this read may initiate a page fault, and cause the server to crash.
Exploit vector: Any network device capable of sending DHCP packets to FreeRADIUS, which sends a DHCP option 63 with non-zero contents.
Fix: Examine option 60, instead of option 63, and check for option length. Fixed in FR-GV-206 (v2), and FR-GV-206 (v3).
Affected versions: 2.0.0 through 3.0.14, inclusive.
CVE: This issue has been assigned CVE-2017-10983. No remote code execution is possible. A denial of service is possible.
FR-GV-207 (v2) Zero-length malloc() in data2vp()
Issue: When decoding attributes of type "tlv", the decoder
can call malloc()
with an argument of zero.
Impact: None. The length of the allocated data is kept
separately in the vp->length
field. All dereferences to
the allocated data are protected by a check for vp->length >
0
Exploit vector: None.
Fix: For general safety, the function was changed to avoid
a zero-length malloc()
. Fixed in FR-GV-207
Affected versions: 2.0.0 through 2.2.9, inclusive.
CVE: No CVE has been release as this issue has no impact, and exploitation does not cross a privilege boundary in a correct and realistic product deployment.
FR-GV-301 (v3) Write overflow in data2vp_wimax()
Issue: This issue is similar to FR-GV-202, as the code in v3 is based on the code in v2. However, as the issue is slightly different, it is listed separately.
Impact: Write overflow, possibly remote exploit by anyone who can send packets which are accepted by the server.
Exploit vector: Sending WiMAX attributes which have the "continuation" flag set, but for which there is no subsequent data.
Fix: Update checks for malformed attributes. Fixed in FR-GV-301, with a related patch in another patch.
Affected versions: 3.0.0 through 3.0.14, inclusive.
CVE: This issue has been assigned CVE-2017-10984. Remote code execution is possible. A denial of service is possible.
FR-GV-302 (v3) Infinite loop and memory exhaustion with 'concat' attributes
Issue: When the server receives zero-length attributes marked 'concat' in the dictionaries, it could go into an infinite loop and exhaust memory.
Impact: Infinite loop and memory exhaustion, by anyone who can send packets which are accepted by the server.
Exploit vector: The issue happens when the server receives
a packet containing the following attribute data: 4f
02
, 89 02
, 90 02
, or b4
02
.
Fix: Update decode_concat()
function to return
the bytes read from the packet, not the length of the attribute data. Fixed in FR-GV-302.
Affected versions: 3.0.0 through 3.0.14, inclusive.
CVE: This issue has been assigned CVE-2017-10985. No remote code execution is possible. A denial of service is possible.
FR-GV-303 (v3) DHCP - Infinite read in dhcp_attr2vp()
Issue: When decoding "string" options in an
array, dhcp_attr2vp()
could be convinced to
call memchr()
with a length argument of -1
.
This could result in an over-read until the first zero octet was
found, or a page fault occured.
Impact: Possible infinite read overflow, or crash.
Exploit vector: Any network device capable of sending DHCP packets to FreeRADIUS, which sends string options to the server in an option array.
Fix: Perform better bounds checking on decoding string options in an array. Fixed in FR-GV-303.
Affected versions: 3.0.0 through 3.0.14, inclusive.
CVE: This issue has been assigned CVE-2017-10986. No remote code execution is possible. A denial of service is possible.
FR-GV-304 (v3) DHCP - Buffer over-read in fr_dhcp_decode_suboptions()
Issue: The fr_dhcp_decode_suboptions()
function does not properly check if sub-options overflow the packet.
This issue is similar to FR-GV-205, as the code in v3 is based on the code in v2. However, as the issue is slightly different, it is listed separately.
Impact: The server can read up to a small number of octets more data than it should. Depending on memory layout, this read may initiate a page fault, and cause the server to crash.
Exploit vector: Any network device capable of sending DHCP packets to FreeRADIUS, which sends packets with malformed options.
Fix: Check for options which are "too long", in addition to checking for attributes which are "too short". Fixed in FR-GV-304.
Affected versions: 3.0.0 through 3.0.14, inclusive.
CVE: This issue has been assigned CVE-2017-10987. No remote code execution is possible. A denial of service is possible.
FR-GV-305 (v3) Decode 'signed' attributes correctly
Issue: Attributes of data type 'signed' would sometimes be created from uninitialized memory, instead of from the received packet.
Impact: Minimal. No overflow or exploit is possible. Instead, the attribute sometimes has a garbage value. There is only one 'signed' attribute, which is in the WiMAX dictionaries, and it is used only in certain limited situations.
Exploit vector: None.
Fix: Decode the attribute correctly. Fixed in FR-GV-305.
Affected versions: 3.0.0 through 3.0.14, inclusive.
CVE: None. No remote code execution is possible. No denial of service is possible. Exploitation does not cross a privilege boundary in a correct and realistic product deployment.
FR-AD-001 (v2,v3) Use strncmp() instead of memcmp() for string data
Issue: When reading data from configuration files, the server could over-read to to 4 octets of data.
Impact: Minimal.
Exploit vector: Administrators who have write access to the server configuration files.
Fix: Use strncmp()
instead
of memcmp()
for bounded comparisons on C strings. Fixed in FR-AD-001 (v2), and
in FR-AD-001 (v3).
Affected versions: 3.0.0 through 3.0.14, inclusive.
FR-AD-002 (v3) String lifetime issues in rlm_python
Issue: The PySys_SetPath()
and PySys_SetName()
functions require a long-lived
pointer to the path / name.
Impact: Potential crash.
Exploit vector: Administrators who have write access to the server configuration files.
Fix: Use a long-lived string instead of a short-lived one. Fixed in FR-AD-002.
CVE: No CVE has been release as this issue has no impact, and exploitation does not cross a privilege boundary in a correct and realistic product deployment.
FR-AD-003 (v3) Incorrect statement length passed into sqlite3_prepare
Issue:
An incorrect statement length was passed into thesqlite3_prepare()
function.
Impact: Potential crash.
Exploit vector: Administrators who have write access to the server configuration files.
Fix: Use the correct statement length. Fixed in FR-AD-003.
Affected versions: 3.0.0 through 3.0.14, inclusive.
CVE: No CVE has been release as this issue has no impact, and exploitation does not cross a privilege boundary in a correct and realistic product deployment.


RMB
Dashboard
Payments
Events
Chapter's Summary
R2R Meetings
References
Business Transactions
3+
Alerts Center
December 12, 2019
A new monthly report is ready to download!
December 7, 2019
$290.29 has been deposited into your account!
December 2, 2019
Spending Alert: We've noticed unusually high spending for your account.
Show All Alerts
Bhargav Bhatt
Profile
Settings
Activity Log
Logout
Step 1
Members Info
Step 2
Residential Address
Step 3
Family Info
Step 4
References
Step 5
Payments
Change Photo
Bhargav Bhatt
Centre Incharge
Remind me on
First Name
Last Name
User Picture
Choose file
Address line 1
Address line 2
Address line 3
Country
*
State
*
City
*
Pincode
*
Designation
Selecte Designation
Accounts
Activities
Administrotion
Dietary
General
HR
Designation
Selecte Designation
Accounts
Activities
Administrotion
Dietary
General
HR
Previleges / Role
Selecte Previleges / Role
Administator
Centre Incharge
Mediacal Officer
PCA
PCA Head
Super Administator
User Type
Selecte User Type
Resident
Employee
Supplier
First Name
Last Name
User Picture
Choose file
Address line 1
Address line 2
Address line 3
Country
*
State
*
City
*
Pincode
*
Designation
Selecte Designation
Accounts
Activities
Administrotion
Dietary
General
HR
Select Location
Kadji Care & Rehabs PVT. LTD.
Kadji Care - Caring Like Family
Kadji House 1
Kadji House 2
Kadji House 3
Kadji House 4
Kadji House 5
Kadji House 6
Previleges / Role
Selecte Previleges / Role
Administator
Centre Incharge
Mediacal Officer
PCA
PCA Head
Super Administator
Select Group
Accounts
Activities
Administration
Dietary
General
HR
Email
Password
Mobile #
Gender
Male
Female
Date of Birth
PAN
Aadhar Card No.
Update Profile
Step 2 Content
Information for step 2
You may use a form as well!
Step 4 Content
My Details
Name:
Your Name
Email:
<EMAIL_ADDRESS>Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.


array ob_get_status ([ bool $full_status = FALSE ] )
ob_get_status() returns status information on either the top level output buffer or all active output buffer levels if full_status is set to TRUE.
If called without the full_status parameter or with full_status = FALSE a simple array with the following elements is returned: Array ( [level] => 2 [type] => 0 [status] => 0 [name] => URL-Rewriter [del] => 1 )


What is Fowl?
Fowl is a pure Javascript based Game Engine. It follows ECS architectural pattern.
Read more about it here
Below are some games built using Fowl.
Fowl Game Engine Gallery
Alchemy
Alchemy Game
Play
Asteroid
Asteroid Game
Play
Multiplayer Snake
Multiplayer Snake Game
Play
Aliens & Astronauts
Aliens & Astronauts Game
Play
Download
Get a copy of Fowl Game Engine from here
Learn more about how to get started with the project here
License
MIT License


This game is gamepad compatable!
Lots of QOL upgrades: Characters now have a description that you can read in the character select, and we now have a game over screen detailing unlocks and statistics! Also a brand new character to find with a unique ability!
Perks have been added! Tier up your characters! 1/28/2022
Merchants are fixed now and won't give you free stuff. 12/22/2020
There is now a Merchant in the game that the player might encounter! 12/21/2020
Added Christmas Mode! Snowfall in the menus and cats wear hats! Plus a new achievement! 12/21/2020
Rob the bandit now shows up with his clones in survival mode! 11/6/2020
Still not mobile compatible. :( 4/8/2020
I've added a new settings menu to allow for changing the music and sound effects volumes. 4/5/2020
Achievements have been added, just click the trophy in the profile menu to see all the achievements you have unlocked! 11/15/2019
SQUIRRELS! 11/13/2019
There is now a new pickup which gives the character that picks it up a special weapon! 11/13/2019
Hit and Powerup sounds have been added to SACA! 11/13/2019
I have just added a news panel for posts about new game information. 11/12/2019
Back to homepage of the Blazek Gazette


Run server and client on this device
Connect to a server
Connect Options
Address
Port
Protocal :
http
https
Server Options
Available this device only
Available network wide
Port


Welcome to our not so complete guide of local hangouts for the self-proclaimed cool kid in Oxford. We have created a list of restaurants, cafes, bars and miscellaneous others for when you need to escape from reality or simply want to dazzle your friends with your knowledge of the chiccest places to be.
Our aim is to mobilise an army of super cool kids to support local businesses and break the obstinate division of "town and gown".
Tunrayo: As a new memeber of the Oxford graduate community, I, like so amny others have also been overwhelmed by the huge number of activities that the colleges and the Universities provide. Futhermore, my department is exactly 5 minutes from my bed and my college, well...It is so easy to be trapped in the very circle that inevitably forms and thus never see anything beyond its radius.
Trina: I love food so much I spent a term as the Cherwell's Food and Drink editor, but I am far too lazy to cook. So after almost four years here I've found one or two great places I'd like to share with everyone.
Fran: I'm super awesome and I love food and I know things.
We say, who said you can't have "town and gown"?
Located right in the heart of Oxford, this area is convenient for more than the Bod! There's some fantastic places on Turl street not to be missed, where you can pick up a paperback from the Oxfam bookshop and get a coffee and sandwich, or you can even venture out to High Street or Broad if you're feeling adventurous. Here are our recommendations of the best of your local:


THESIS
* METABOLIC FATE OF 15 AND 140 -BETAINE
Submitted by
Alonzo Chappell
In partial fulfillment of the requirements for the Degree of Doctor of Philosophy Colorado State University Fort Collins, Colorado
March, 1973


Judge whether this object is bigger or smaller than a
shoebox
.
Start Experiment
smaller
bigger
smaller
bigger
smaller
bigger
smaller
bigger


In this notebook, we will compare 3 methods to generate an experimental design:
We will do so using simulations: what is the resulting observed power when we simulate experiments according to the three designs.
from neurodesign import optimisation,experiment
import matplotlib.pyplot as plt
from scipy.stats import t
import seaborn as sns
import pandas as pd
import numpy as np
%matplotlib inline
%load_ext rpy2.ipython
cycles = 1000
sims = 5000
First we define the experiment. We will optimise an experiment with a TR of 2 seconds and 250 trials of 0.5 seconds each. There are 4 stimulus types, and we are interested in the shared effect of the first and second stimulus versus baseline, as well as the difference between the first and the fourth stimulus. We assume an autoregressive temporal autocorrelation of 0.3.
We sample ITI's from a truncated exponential distribution with minimum 0.3 seconds and maximum 4 seconds, and the mean is 1 second.
# define the experiment
EXP = experiment(
TR=2,
n_trials=450,
P = [0.25,0.25,0.25],
C = [[1,0,0],[0,1,0],[0,0,1],[1,0,-1]],
n_stimuli = 3,
rho = 0.3,
resolution=0.1,
stim_duration=1,
ITImodel = "exponential",
ITImin = 0.3,
ITImean = 1,
ITImax=4
)
POP_Max = optimisation(
experiment=EXP,
weights=[0,0.5,0.25,0.25],
preruncycles = cycles,
cycles = 2,
optimisation='GA'
)
POP_Max.optimise()
EXP.FeMax = POP_Max.exp.FeMax
EXP.FdMax = POP_Max.exp.FdMax
Below we define two populations of designs. We will optimise one using the genetic algorithm, and the other using randomly drawn designs.
We optimise for statistical power (weights = [0,1,0,0]). We run 100 cycles.
POP_GA = optimisation(
experiment=EXP,
weights=[0,0.5,0.25,0.25],
preruncycles = 2,
cycles = cycles,
seed=1,
outdes=5,
I=10,
folder='/tmp/',
optimisation='GA'
)
POP_RN = optimisation(
experiment=EXP,
weights=[0,0.5,0.25,0.25],
preruncycles = 2,
cycles = cycles,
seed=100,
outdes=5,
I=50,
G=10,
folder='/tmp/',
optimisation='simulation'
)
POP_GA.optimise()
POP_RN.optimise()
Below, we show how the efficiency scores improve over cycles for both algorithms, although the Genetic Algorithm clearly improves faster and reaches a higher plateau.
plt.plot(POP_GA.optima,label='Genetic Algorithm')
plt.plot(POP_RN.optima,label='Simulation')
plt.legend()
plt.savefig("output/test_scores.pdf")
Below, we repeat the random design generator, but we search only 100 designs and one generation. As such, this is a random design.
# 1 gen
POP_JO = optimisation(
experiment=EXP,
weights=[0,0.5,0.25,0.25],
preruncycles = 1,
cycles = 1,
seed=1,
outdes=5,
G=100,
folder='/tmp/',
optimisation='simulation'
)
POP_JO.optimise()
#collect scores and take average
scores = [x.F for x in POP_JO.designs]
median_idx = np.where(scores == np.median(scores))[0][0]
rnd_median = POP_JO.designs[median_idx]
# get PI
BTI_l = np.percentile(scores,5)
BTI_u = np.percentile(scores,95)
print("Optimisation score - random: %s \n\
Optimisation score - genetic algorithm: %s \n\
Optimisation score - simulation (90 percent PI): %s-%s"%(POP_RN.optima[::-1][0],
POP_GA.optima[::-1][0],BTI_l,BTI_u))
Let's look at the resulting experimental designs.
des = np.array([POP_GA.bestdesign.Xconv,POP_RN.bestdesign.Xconv,rnd_median.Xconv])
labels = ['Genetic Algorithm','Simulation','Median random design']
plt.figure(figsize=(10,7))
for ind,label in enumerate(labels):
plt.subplot(3,1,ind+1)
plt.plot(des[ind,:,:])
plt.title(label)
plt.tick_params(axis = 'x',which = 'both', bottom = 'off', labelbottom='off')
plt.savefig("output/designs.pdf")
des = np.array([POP_GA.bestdesign.Xconv,POP_RN.bestdesign.Xconv]+[x.Xconv for x in POP_JO.designs])
We continue with the best designs from the two algorithms and the random design. Below, we simulate data in one voxel that is significantly related to the task. We assume beta values of (0.5, 0, -0.5).
# create datatables
tp = des.shape[1]
Y = np.zeros([tp,sims,des.shape[0]])
for i in range(sims):
rnd = np.random.normal(0,1,tp)
for lb in range(Y.shape[2]):
Y[:,i,lb] = np.dot(des[lb,:,:],np.array([0.5,0,-0.5]))+rnd
ids = [0,1,median_idx]
plt.plot(Y[:,1:3,1])
We analyse the data using R
below.
%%R -i des,Y,sims,ids -o tvals_main,tvals_diff,pows
tvals_main <- array(NA,dim=c(sims,3))
tvals_diff <- array(NA,dim=c(sims,3))
pows <- array(NA,dim=c(dim(Y)[3],2))
threshold <- qt(0.95,df=(dim(des)[2]-2))
i = 1
for (method in 1:dim(Y)[3]){
ts_main <- c()
ts_diff <- c()
for (sim in 1:sims){
dif <- des[method,,1]-des[method,,2]
fit_main <- lm(Y[,sim,method]~des[method,,])
fit_diff <- lm(Y[,sim,method]~dif)
ts_main[sim] <- summary(fit_main)$coef[2,3]
ts_diff[sim] <- summary(fit_diff)$coef[2,3]
}
if ((method-1) %in% ids){
tvals_main[,i] <- ts_main
tvals_diff[,i] <- ts_diff
i <- i+1
}
pows[method,1] <- mean(ts_main>threshold)
pows[method,2] <- mean(ts_diff>threshold)
}
This is what the distributions for the two contrasts look like.
nms = ['Main effect','Contrast effect']
plt.figure(figsize=(18,4))
for idx,tv in enumerate([tvals_main,tvals_diff]):
plt.subplot(1,2,idx+1)
for idy,method in enumerate(labels):
sns.distplot(tv[:,idy],label=method)
plt.title(nms[idx])
plt.legend()
plt.savefig("output/distributions.pdf")
pows.shape
# We're assuming a single threshold on a single test, a representative simplification.
threshold = t.ppf(0.95,des.shape[1]-2)
nms = ['main effect','contrast effect']
out = {label:[] for label in labels}
for idx in range(2):
for idy,method in enumerate(labels):
if idy < 2:
print("The power for the %s with %s: %f"%(nms[idx],method,pows[idy,idx]))
med = np.percentile(pows[2:,idx],50)
ll = np.percentile(pows[2:,idx],5)
ul = np.percentile(pows[2:,idx],95)
print("The median for the %s with a randomly drawn design: %f"%(nms[idx],med))
print("The 90 percent PI for the %s with a randomly drawn design: %f-%f"%(nms[idx],
ll,ul))


Show the User a Combo Box
Tags: AppKit
Type: API
Class: NSComboBox
A Combo Box combines a text entry field with a dropdown list. The user can choose an item from the list, which will then populate the text field, or the user can type a value directly into the text field.
See the Ray Wenderlich site for more useful info on this topic.
Link: Apple Developer Docs
Contributed by Herb Bowie on 28 Oct 2019


I'm a Celeb camp increases security after body found nearby
by Ian BrennanThe bosses for I'm a Celeb have reportedly increased the security around the camp after a body was found an hour away.
The body of a 50-year-old man was found at Jake Evans Boat Harbour Park in Tweed Heads.
A horrified couple came across the man in a sleeping bag while walking their dog and a manhunt has since been launched by the New South Wales police.
Detective Chief Inspector Brendon Cullen said that the man had been found with "physical wounds."
Sources told The Sun that the I'm a Celeb bosses are aware of the search and have increased security.
One source said: "The celebs are being watched 24 hours a day, seven days a week by a team of staff and our security measures are incredibly tight.
"So there is zero chance of anyone sneaking into camp. But of course it is very unsettling to know that there is someone out there, running from the police, who has committed such a horrible crime."
Detective Chief Inspector Cullen told ABC News: "The movements and the history of the victim is something that we are in the early stages of establishing.
"We are very keen to speak to any person that was in Jack Evans Boat Harbour yesterday evening and this morning who might have seen something or know anything about this.
"We do want to establish where this man is from and how he came to be in the state he is in now."


public interface Log
Logger
API.
Use @Inject
annotation to inject a Log
instance into a
service.
This API provides consistent method overrides for all standard Logger
Level
s. Two different methods are provided for each level, one taking
a String
message, and the other taking a Throwable
.
Note use of this API is optional, plugins can depend on a standard JDK
Logger
instance if they prefer.AvailableDependencies.LOG
| Modifier and Type | Field and Description |
|---|---|
static Level |
FINE |
static Level |
FINER |
static Level |
FINEST |
static Level |
INFO |
static Level |
SEVERE |
static Level |
WARNING |
| Modifier and Type | Method and Description |
|---|---|
void |
fine(String msg)
Log a message at the
FINE level |
void |
fine(Throwable t)
|
void |
finer(String msg)
Log a message at the
FINER level |
void |
finer(Throwable t)
|
void |
finest(String msg)
Log a message at the
FINEST level |
void |
finest(Throwable t)
|
void |
info(String msg)
Log a message at the
INFO level |
void |
info(Throwable t)
|
boolean |
isLoggable(Level level)
Determines if the specified log
Level is enabled for this logger |
void |
severe(String msg)
Log a message at the
SEVERE level |
void |
severe(Throwable t)
|
void |
warning(String msg)
Log a message at the
WARNING level |
void |
warning(Throwable t)
|
static final Level FINE
Level.FINE
static final Level FINER
Level.FINER
static final Level FINEST
Level.FINEST
static final Level INFO
Level.INFO
static final Level SEVERE
Level.SEVERE
static final Level WARNING
Level.WARNING
void fine(Throwable t)
t
- void finer(Throwable t)
t
- void finest(Throwable t)
t
- void info(Throwable t)
t
- boolean isLoggable(Level level)
Level
is enabled for this loggerlevel
- The logging level to testvoid severe(Throwable t)
t
- void warning(Throwable t)
t
- Oracle REST Data Services Plugin API version: <IP_ADDRESS>.18.05 Copyright © 2015 Oracle Corp. All Rights Reserved.


RT @qrush: http://rubygems.org recently passed 5 billion tracked downloads and 100,000 gems!!! https://rubygems.org/stats 🎉🍰🚀💎
5/3/2015, 12:22:23 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @qrush: http://rubygems.org recently passed 5 billion tracked downloads and 100,000 gems!!! https://rubygems.org/stats 🎉🍰🚀💎
5/3/2015, 12:22:23 PM
Favs: 0
Retweets: 0
link


Create a two dimensional array (3 rows and 2 columns) to store the item's names and their proces by using input box when loading the form.(3 Marks)
Write vb.code the defines an enumerated type named "PolygonSide" with values that indicate the number of sides of polygon (triangle, rectangel, pentagon, and hexagon).(2 Marks)
Create a window form application with following:
Creaate a structure called "Customer" whcih contains three members (firstname, Lastname and email). This structure has a Name property to return the concatenation of first name and last name and an overrides mehtod of ToString that return the concatenation of Name and email address. When user clicks the "Input" button, user entered student information is stored in array of structure vriable. When user clicks 'Show All' button, all daa in array are added into the list box of the "Showform" and show the form.(10 Marks) <-----Enter photo----->
Define an interface BookItem which includes a method getDescription that returns the string like <book title varable > by <book auther variable >. Define another interface Eatable that includes a method getTaste that returns the string like < fruit name variabel> is <taste variable>. Implement all interfaces in class named Items. In this class: define two members of string type and two properties procedures which canaccess the members to the outside world.(5 Marks)
Create a console application with following:
Define a base class named Booksale which contains public
members: Title, Quantity, Price and Extended price. It also has private shared members: SalesTotal and SaleCount. The class has properties to access the provate members from outside and an overridable method named "CalExtendedPrice" to calculate the extenede price (entended price = quantity * price). Include a parameterized constructor method to create the object of Booksale class.
Create a derive class named studentBookSale which ingerit from Booksale class. This class includes a public member: discount and a public shared member: DiscountTotal and an override method named CalExtendedPrice() with given formula [discount=quantity * price * 0.01, extended price = (quantity * price) - discount]Instantiate an object of BookSale class and an object of StudentBookSale class with appropriate values by program. Display all information of sale and total amount, sales count and discount total.(15 Marks)
Create a window form application with following:
Define an abstract class named "Meter" which include a method "Calculate_Bill" with two versions: first, take two parameters (units, and rateA); second, take three parameters (units, rateA, and rateB); which calculate and return the charges of meter bill.(If meter units used is less than or equal to 100, calcualte the charges with rateA. Otherwise, calculate the charges by rate B for extra units and calculate by rate A for first 100 units.)
Define another class name "Meterbill" which inherits from abstract class.
At the start of form, Rate B (per unit) and its text box is not visible. When user enters thee meter units used in text box and it is greater than 100, they will be visible. When user clicks 'Calculate Charges' button, a message box will be displayed as shown below.(15 Marks) <------Enter photo--------->
Write short notes on any FIVE of the following:(15 Marks)
Commercial goods
Job specification
Target market
Marketing strategy
Production systems
Benefit plans
Economic order quantity system(EOQ)
Define the term Marketing Mix.(3 Marks)
List the sales information systems and explain one of them.(9 Marks)
Write down the inventory meangement tools.(5 Marks)
Explain about Facilties planninng information systems.(7 Marks)
Define the term Employee skills inventory.(3 Marks)
Explain the human resource management functions.
(8 Marks)


{% extends 'actor/templates/settings_base.html' %} {% load nonce %} {% block settings %}
There is no way to undo this, are you sure you want to erase all traces of your presence from our life?
I mean, give us another chance, we can change, we'll do the dishes more often, we swear.


[Update: Rolling out now] Google Photos set to add image markup tool allowing you to draw on your pics
by Damien WildeGoogle Photos is slowly adding really neat and useful features and the next addition could be an image markup tool.
The new feature was spotted over on Twitter by Julio Nihili (via Android Police) and looks as though a future update will allow you to draw and doodle over your images in a similar manner to Snapchat.
[Update 25/11]: The image markup feature should now be rolling out after being officially confirmed over on the Google Photos Help and support forum. I’m yet to see the option on my end but we expect a slow but steady rollout very soon. There is now an official entry on the help showing you how to access and use the drawing feature once it does appear on your version of Google Photos too.
We saw something similar a while back, first on the Android Pie beta, which allowed you to markup screenshots. Much like that version, the image markup tool within Google Photos allows you to draw lines in varying colors and line types. It appears that you can draw with a marker or brushes — both of which provide a different stroke.
Once the feature rolls out more widely, the new image markup tool will be available within the bottom editing UI. It’s right there at your fingertips and not hidden away in overflow or side menus. Beyond that, you can choose from what looks like seven colors: black, red, yellow, green, blue, purple, and white.
As far as tools go, it doesn’t need to be any more complicated than that. The image markup tool will no doubt complement the other neat tools being added to Google Photos such as the recently integrated document cropping feature.
I’ve not been able to get the feature to appear on any device I currently have access to, however, if you’ve seen the image markup tool on your version of Google Photos be sure to let us know down in the comments section below. We’re not sure when it could be available but we’ll let you know once it is.
More on Google Photos:
- Google Photos for Android rolls out ‘Info’ menu redesign with new carousel
- Google will close loophole that gives iPhones unlimited Google Photos storage
- Google Photos prepares handy drawing tools, new account switcher
FTC: We use income earning auto affiliate links. More.


The Royal Treatment
$2700.00
- Engagement session
- Full Day's coverage
- Unlimited Locations and shots
- Secondary Photographer
- Hardcopy coffee book
- Images on disc
"People are my heart and soul. It's an honor to be there when you marry your one and only. Your wedding is as important to me as it is to you. It is my goal to capture this precious moment of your life so you may revisit it again and again... one photograph at a time.”
*SCROLL DOWN to view my wedding packages, services and rates, but before you do - please know that I will work to customize my packages to meet your budget. Please discuss any concerns with me.