Todd Kennedy / @whale_eat_squid
Tech Lead, Condé Nast Traveler
borrowed from http://hdle12.tumblr.com/
But that's why we became programmers. Why do something over and over again when you can just write a small shell script to do it for you?
function pr (){
ARGS=("$@")
# are we in a git repo?
GIT_BRANCH=$(git branch 2>/dev/null | sed -n '/^\*/s/^\* //p')
if ! git rev-parse --git-dir > /dev/null 2>&1; then
echo "You're not in a git repo..."
return 0
fi
GIT_REPO_NAME=$(basename `git rev-parse --show-toplevel`)
# make the pull request and get the ID
PULL_URL=$(git pull-request "${ARGS[0]}" -b CondeNast:development -h CondeNast:$GIT_BRANCH)
echo "Pull request made: $PULL_URL"
PULL_ID=$(echo $PULL_URL | cut -d/ -f 7)
}
Const
Pi = 3.14;
#define PI 3.14;
public static final float PI = 3.14;
But I still have to maintain models twice...
class Post(SQLObject):
body = UnicodeCol()
author = ForeignKey('users')
posted_on = DateTimeCol(default=datetime.datetime.now)
created_on = DateTimeCol(default=datetime.datetime.now)
tags = RelatedJoin('tag')
var Post = Backbone.Model.extend({
defaults: {
body: "",
author: 0,
posted_on: (new Date).toString(),
created_on: (new Date).toString(),
tags: []
}
});
Ask my three year old if you can play with his cars, and you'll see why we so don't share a lot of code between the client and the server end.
It's almost like we speak a different language...
And yes, I am old enough to remember Netscape LiveWire and the insane <server> tag...
Lets start sharing code so we can stop repeating ourselves.
Models seems like a great place to start, right? We're going to need two things in order to make this work:
Backbone.Sync has a very easy signature to replace:
Backbone.Sync = function(method, model, options);
So we need to take that signature and just write it so it reads/writes from the datastore. For a DB interface, we'll use MongoJS
And since it returns a jQuery $.Deferred on the front end, we'll make this "less surprises" and give you back a `then`-able promise from Q.
function mongo_sync(server, collection){
return function (method, model, options){
var mongojs = require('mongojs');
var q = require('q');
var deferred = q.defer();
var db = mongojs(server)
.collection(collection);
switch(method){
}
return d.promise;
};
};
switch(method){
case 'create':
break;
case 'update':
case 'patch':
break;
case 'delete':
break;
case 'read':
break;
default:
break;
}
var callback = function(err, results){
if(err){
d.reject(err);
} else {
if(results === 1){
d.resolve(model.toJSON());
} else {
d.resolve(results[0]);
}
}
}
case 'create':
collection.insert(model.toJSON(), {safe: true}, callback);
break;
case 'update':
case 'patch':
collection.save(model.toJSON(), callback);
break;
case 'delete':
collection.remove(model.toJSON(), callback);
break;
case 'read':
var _id = model.get('_id');
var query_params = {};
if (_id) {
query_params._id = mongojs.ObjectId(_id);
} else {
d.reject(new Error('You must provide an _id to lookup'));
}
collection.find(query_params, db_callback);
break;
default:
d.reject(new Error('Unimplemented'));
break;
You might have noticed this specifically doesn't think about collections.
That is an exercise left up to the reader.
Now onto number two: determining environment. There are a couple of things we need to consider for this:
process
available?exports
available?process.browser
as well
if(typeof process !== 'undefined' &&
!process.browser &&
typeof exports !== 'undefined'){
Backbone.sync = mongosync(server, collection)
}
Don't forget: we need to make sure the sync method gets the datastore configuration!
module.exports = function(server, collection){
if(typeof process !== 'undefined' &&
!process.browser &&
typeof exports !== 'undefined'){
Backbone.sync = mongosync(server, collection);
}
return Backbone.Model.extend({idAttribute: '_id'});
}
npm install mongosync
bower install mongosync
Browserify, RequireJS and CommonJS aware!


|
MQTT-C
|
Documentation of the types and calls required to port MQTT-C to a new platform. More...
Functions | |
| ssize_t | mqtt_pal_sendall (mqtt_pal_socket_handle fd, const void *buf, size_t len, int flags) |
| Sends all the bytes in a buffer. More... | |
| ssize_t | mqtt_pal_recvall (mqtt_pal_socket_handle fd, void *buf, size_t bufsz, int flags) |
| Non-blocking receive all the byte available. More... | |
Documentation of the types and calls required to port MQTT-C to a new platform.
mqtt_pal.h is the only header file included in mqtt.c. Therefore, to port MQTT-C to a new platform the following types, functions, constants, and macros must be defined in mqtt_pal.h:
size_t
, ssize_t
uint8_t
, uint16_t
, uint32_t
va_list
mqtt_pal_time_t
: return type of MQTT_PAL_TIME()
mqtt_pal_mutex_t
: type of the argument that is passed to MQTT_PAL_MUTEX_LOCK
and MQTT_PAL_MUTEX_RELEASE
memcpy
, strlen
va_start
, va_arg
, va_end
INT_MIN
Additionally, three macro's are required:
MQTT_PAL_HTONS(s)
: host-to-network endian conversion for uint16_t.MQTT_PAL_NTOHS(s)
: network-to-host endian conversion for uint16_t.MQTT_PAL_TIME()
: returns [type: mqtt_pal_time_t
] current time in seconds.MQTT_PAL_MUTEX_LOCK(mtx_pointer)
: macro that locks the mutex pointed to by mtx_pointer
.MQTT_PAL_MUTEX_RELEASE(mtx_pointer)
: macro that unlocks the mutex pointed to by mtx_pointer
.Lastly, mqtt_pal_sendall and mqtt_pal_recvall, must be implemented in mqtt_pal.c for sending and receiving data using the platforms socket calls.
| ssize_t mqtt_pal_recvall | ( | mqtt_pal_socket_handle | fd, |
| void * | buf, | ||
| size_t | bufsz, | ||
| int | flags | ||
| ) |
Non-blocking receive all the byte available.
| [in] | fd | The file-descriptor (or handle) of the socket. |
| [in] | buf | A pointer to the receive buffer. |
| [in] | bufsz | The max number of bytes that can be put into buf . |
| [in] | flags | Flags which are passed to the underlying socket. |
| ssize_t mqtt_pal_sendall | ( | mqtt_pal_socket_handle | fd, |
| const void * | buf, | ||
| size_t | len, | ||
| int | flags | ||
| ) |
Sends all the bytes in a buffer.
| [in] | fd | The file-descriptor (or handle) of the socket. |
| [in] | buf | A pointer to the first byte in the buffer to send. |
| [in] | len | The number of bytes to send (starting at buf ). |
| [in] | flags | Flags which are passed to the underlying socket. |


An open-source tool that allows you to convert a CSV list of patients into a printable pack of patient slips to make using Pinnacle a breeze.
This new release contains some changes you need to know about:
To print at the right size, use Google Chrome and 18 per sheet stickers (e.g. Qconnect KF26052)
The system requires Google Chrome. Other web browsers probably will not work.
The Zebra QR scanners supplied by the NHS to vaccination sites can be progammed for how they
process the QR code information. You can also change the volume and tone of the beeps.
Click here for setup instructions
The latest version can be downloaded from the GitHub repo.
See this video for how the process works in detail.
No data is transferred anywhere when using this tool, all the process is done in your web browser. The tool uses some open source libraries to work. Using the tool is entirely at your own risk. It is provided under an MIT License.
The project was developed originally by Mike Smith, but has been contributed to by others, including: Richard1793, bunit17 and tfechtner
To use on patient vaccine record cards.
For this final step, add your CSV file containing your patient list. The file is not uploaded anywhere and is processed entirely within your web browser.
| Name | NHS Number | Date Of Birth | bookingNumber* | StartTime* | SessionDate* | VaccineDose* |
|---|---|---|---|---|---|---|
| Bloggs, Joe |<PHONE_NUMBER> | 12/01/1956 | 123456 | 18:30 | 08/01/2021 | Second |
*Optional
All fields except "Name", "StartTime", "SessionDate", "bookingNumber" and "VaccineDose" will be soft matched. This means the column names or date formats do not need to be exactly as above. Dates can be in any format.
Additional fields can be included but will be ignored.
If you are manually creating a CSV file rather than exporting from Accubook, it is best to use the dummy CSV file from the ZIP as a starting point.


Two Players Needed - Be the first
WON: | LOSSED: | TIED:
messages can be sent when one player joins
The "Reload-All" button will clear the game database. Users on other pages will need to refresh their page


Welcome to Authentification Service!
Insert your LDAP here:
Insert your password here:
And press the submit button
SUBMIT!
Or check the database:
DATABASE


Here is yesterday's episode of Hooting Yard On The Air, which features Mr Key reading sweeping paragraphs of majestic prose. The show is approaching its thirteenth anniversary, in April, and I rather regret that it never occurred to me (nor to anybody at Resonance) to give each episode a number. It would be pleasant to be able to say “This is Hooting Yard On The Air, Episode 666”, or whatever number we have reached.


The following code allows the user to query a database. Unfortunately, the application fails to validate the user's input. Therefore, an attacker can access the back-end database on behalf of the application through the use of SQL injection.
For example, say a MongoDB collection contains some documents that represent books, some that represent movies, and some that represent music albums. This JavaScript query function will select all the documents in the specified collection that were written, filmed, or recorded in the specified year:
If the developer were building this application using a given programming language, the source code might look like this:
$query = 'function() {var search_year = \'' .
$_GET['year'] . '\';' .
'return this.publicationYear == search_year || ' .
' this.filmingYear == search_year || ' .
' this.recordingYear == search_year;}';
$cursor = $collection->find(array('$where' => $query));
This code uses the value of the request parameter “year” as the search parameter. Just as in a traditional SQL injection attack, since the query syntax is being constructed in an ad-hoc fashion (i.e. query syntax concatenated along with user input), this code is vulnerable to a server-side JavaScript injection attack. For example, the following request would be an effective DoS attack against the system:
http://server/app?year=1995';while(1);var%20foo='bar
Strong input validation can be used to prevent SQL/NoSQL Injection attacks on an application. Prepared Statements must be used. Additionally, precompiled queries can also be used to prevent these attacks.
Care should be taken while using precompiled queries to make sure that the internal queries do not contain dynamic content.
Bind parameters are the best way to pass data to the database. Instead of putting the values directly into the SQL statement, you just use a placeholder like ?, :name or @name and provide the actual values using a separate API call.
Below example shows a secure implementation of using Bind variable in Play Framework:
public static void searchString(String keyword) {
String trimedkeyword = keyword.trim();
String keypattern = "%"+trimedkeyword+"%";
String query="select distinct item from Item where item.name like :keypattern";
List items = Item.find(query).bind("keypattern", keypattern).fetch();
...
}
Play Framework supports “Anorm” to access database. According to the Play Framework source code here, Anorm builds only java.sql.PreparedStatements, which prevents SQL injection attack.
Below is an example of how Anorm can be used safely in Play Framework:
object Person {
def save(p:Person) {
DB.withConnection ("default") { implicit connection =>
SQL("""
INSERT INTO person(firstName,lastName)
values ({firstName}, {lastName})
"""
).on(
"firstName" -> p.firstName,
"lastName" -> p.lastName
).executeUpdate()
}
}
}


Joshua Bloch’s API Design Bumper Stickers are a great list of what makes for good API design. In addition, we have specific design principles we follow in Beam.
Provide one model that works over both bounded (aka. batch) and unbounded (aka. streaming) datasets. Pay special attention to windows / triggers / state / timers, which often trip up folks used to a batch world. Provide users with the right abstractions to adjust latency and completeness guarantees to cover both traditional batch and streaming use cases.
The model should focus on letting users describe their data and processing, without exposing any details of a specific runtime system. For example, bounded and unbounded describe the shape of data, but batch and streaming describe the behavior of specific runtime systems. Good test cases are to imagine a mythical micro-batching runner that sits somewhere between batch and streaming or a engine that dynamically switches between streaming and batch depending on the backlog.
Don’t prevent efficiency for ease of use. Design APIs that provide the information necessary for efficiently executing at scale. Provide class hierarchies and wrappers to make the common cases simpler.
Validate constraints on graph shape, runner requirements, etc as early in the compile time - construction time - submission time - execution time spectrum as reasonably possible in order to provide a smoother user experience.
Backwards incompatible changes can only be made in the next major version. Because of the burden major versions place on users (code has to be modified, conflicting dependency nightmares, etc), we aim to do this infrequently. Clearly mark APIs that are considered experimental (may change at any point) and deprecated (will be removed in the next major version). Consider what APIs are more amenable to future changes (abstract classes vs. interfaces, etc.)
Canonical examples help people ingrain the principles. Design examples that teach complex concepts in modular chunks. If you can’t explain the concept easily, then the API isn’t right. Examples should withstand random copy-pasting.
Composite transformations (transformations formed by a subgraph of other transformations) are treated as first class objects. They can be named and applied directly in any pipeline to nicely encapsulate concepts. This removes the artificial separation between those built into PCollection and those provided by users. In addition, PTransforms can be used as a clear concept in graphical monitoring and provide a way to scope metadata like aggregators, logging, and resources. Use these when building pipelines.
Beam SDKs should expose the complete set of concepts in the programming model. They should all use the same set of abstractions and be able to share conceptual documentation.
Each SDK must feel right to those who live and breath that language. Adapt the general Beam concepts into language-dependent styles when the benefits clearly outweigh the drawbacks.
Many use cases or user communities can be served by provided ‘wrapper’ SDKs that provide a simpler or domain-specific set of abstractions that then build on a Beam SDK and take advantage of Beam Runners.
The Beam APIs should serve all runners. Behind every runner-specific hook, there is a general principle in the model. Design APIs that generalize across multiple runners.


No fix, no charge | Free phone advice | Available afterhours
Computer Repair
Troubleshoot and repair software issues
Troubleshoot and resolve hardware problems
Remove viruses and software
Resolve internet connection and email problems
Data Recovery
Back up data and set up procedures for backing up
Recover files that have been deleted or lost due to damaged hardware or malicious software
Support
Provide training in the use of hardware and software
One-on-one assistance with computer skills
Computer upgrades
Set up internet, email and new devices


Preparation time
30 mins to 1 hour
Cooking time
30 mins to 1 hour
Serves
Serves 4
Preheat the oven to 200C/400F/Gas 6.
For the cheese sauce, place the milk and bay leaves into a pan and place over a medium heat. Heat the milk to scalding point (do not boil) and then remove from heat. Leave to infuse.
In a clean saucepan, melt the butter over a medium heat, then stir in the flour and cook for three minutes. Be careful not to let the mixture turn brown.
Remove the bay leaves from the milk mixture and add a little milk to the flour and butter mixture. Stir to combine the milk and flour paste over a low heat, then repeat the process, gradually adding milk and stirring in, until a smooth paste is formed.
Add the rest of the milk and bring to boil, stirring all the time, then reduce the heat and simmer for three minutes.
Remove the pan from the heat and add the cheese, mustard and season, to taste, with salt and freshly ground black pepper.
For the meatballs, heat one tablespoon of the oil in a saucepan over a medium heat. Add the onion, garlic and oregano and fry until softened, then remove from heat and allow to cool.
Place the onion mixture into a bowl and add the minced meat. Season well with salt and freshly ground black pepper, and mix together to combine.
Roll the mince mixture into small 2.5cm/1in meatballs.
Heat the remaining tablespoon of oil in a clean frying pan over a medium heat. Add the meatballs and fry, turning occasionally, until brown all over and completely cooked through.
For the pasta, heat the oil in a large frying pan. Add the shallots and fry for two minutes to soften, then add the cooked pasta and stir well.
Add the tomatoes and oregano and cook for 2-3 minutes, then add the meatballs and the cheese sauce. (You may need to add a little milk to loosen the cheese sauce.) The sauce should coat, not swamp, the macaroni.
Transfer the macaroni and meatballs to either a large ovenproof dish or into 10cm/4in ramekins. Top with parmesan and place into the oven to bake for 15 minutes if using a large dish, 7-8 minutes if using the ramekins.
Preheat the grill to its highest setting and place the dish or ramekins under the grill to melt and brown the cheese before serving.


the and cells with that virus infection cell []. are viral was for from {background DENV associated killer human which [,]. natural infected margin The been dengue {border-style expression CHIKV immune px;} #ffffff;} has including infections activation have such patients Cell also can during response role this observed other their This Virus WNV acute early receptors shown cells, control disease following important receptor Chikungunya activating adaptive arboviruses class cytotoxicity infection, reported type Nile Rev. after against arbovirus flavivirus host studies these viruses Dengue Infect. NKGC West antibody-dependent antiviral chronic expansion fever infection. infections, more most production px; recent secondary {font-family DENV, MHC YFV but could different encephalitis font-size health high into mediated not spread suggesting were Cells IFN-Î³ Immunol../jimmunol. KIRs Killer NKp Natural These Zika [,,]. al. between cell-mediated chikungunya clinical double; expressed increase inflammatory inhibitory innate ligands mechanisms primary rapidly repertoire responses several through ADCC DENV-infected Exp. HLA HLA-E Immunol../fimmu.. Infection KIR NKp, Responses ZIKV ZIKV, alphavirus border-color border-width cells. demonstrated development diversity enhancement first humans increased its key levels major memory number outbreaks phase previously protective recently recognition severe solid; specific target triggering via whereas {font-style {font-weight Aedes Although CMV DENV- Dis.e./journal.pntd. Figure Negl. Pathog.e./journal.ppat. Response Trop. Viral [], activated antibodies become bold both cellular conserved context contribute courier; described directly diverse em; flaviviruses four frequency function functional further global haemorrhagic healthy hepatitis interaction least load markers modulation molecules monocytes neutralizing note particles patients, peptide peripheral presence prior protection protein pt;} recruitment study susceptibility than tissues upregulation vaccine well when yellow


The type of entries in a config store defined by the key and value type of ConfigContents.
The allowed types stored in a config store.
Options for Connection.
Returns the intended type of the object to return. This is implementation specific.
All possible field value types.
A loader function to return messages.
Any numeric Logger
level.
A function to update a refresh token when the access token is expired.
A Bunyan Serializer
function.
Function type for processing messages
Required fields type needed to represent a Salesforce User object.
See https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_user.htm
Use to mock out different pieces of sfdx-core to make testing easier. This will mock out logging to a file, config file reading and writing, local and global path resolution, and http request using connection (soon).
// In a mocha tests
import testSetup from '@salesforce/core/lib/testSetup';
const $$ = testSetup();
describe(() => {
it('test', () => {
// Stub out your own method
$$.SANDBOX.stub(MyClass.prototype, 'myMethod').returnsFake(() => {});
// Set the contents that is used when aliases are read. Same for all config files.
$$.configStubs.Aliases = { contents: { 'myTestAlias'<EMAIL_ADDRESS>} };
// Will use the contents set above.
const username = Aliases.fetch('myTestAlias');
expect(username).to.equal('user@company.com');
});
});
A pre-canned error for try/catch testing.
See shouldThrow
Use for this testing pattern:
`
try {
await call()
assert.fail('this should never happen');
} catch (e) {
...
}
Just do this
try {
await shouldThrow(call()); // If this succeeds unexpectedResultError is thrown.
} catch(e) {
...
}
`
The async function that is expected to throw.
A Map of Required Salesforce User fields.
The default file system mode to use when creating directories.
The default file system mode to use when creating files.
Promisified version of fsLib.access.
A convenience reference to https://nodejs.org/api/fsLib.html#fs_fs_constants
to reduce the need to import multiple fs
modules.
Promisified version of fsLib.open.
Promisified version of fsLib.readFile.
Promisified version of fsLib.readdir.
Promisified version of fsLib.rmdir.
Promisified version of fsLib.stat.
Promisified version of fsLib.unlink.
Promisified version of fsLib.writeFile.
Promisified version of mkdirp.
Read a file and convert it to JSON. Returns the contents of the file as a JSON object
The path of the file.
Whether to throw an error if the JSON file is empty.
Read a file and convert it to JSON, throwing an error if the parsed contents are not a JsonMap
.
The path of the file.
Whether to throw an error if the JSON file is empty.
Deletes a folder recursively, removing all descending files and folders.
Throws PathIsNullOrUndefined The path is not defined. Throws DirMissingOrNoAccess The folder or any sub-folder is missing or has no access.
The path to remove.
Searches a file path in an ascending manner (until reaching the filesystem root) for the first occurrence a
specific file name. Resolves with the directory path containing the located file, or null
if the file was
not found.
The directory path in which to start the upward search.
The file name to look for.
Convert a JSON-compatible object to a string
and write it to a file.
The path of the file to write.
The JSON object to write.
Returns the first key within the object that has an upper case first letter.
The object in which to check key casing.
Returns true
if a provided URL contains a Salesforce owned domain.
The URL to inspect.
Converts an 18 character Salesforce ID to 15 characters.
The id to convert.
Tests whether an API version matches the format i.0
.
The API version as a string.
Tests whether an email matches the format<EMAIL_ADDRESS>The email as a string.
Tests whether a path is in the correct format; the value doesn't include the characters "[", "]", "?", "<", ">", "?", "|"
The path as a string.
Tests whether a Salesforce ID is in the correct format, a 15- or 18-character length string with only letters and numbers
The ID as a string.
The type of content a config stores.


CPack¶
Build binary and source package installers.
Variables common to all CPack generators¶
The CPack module generates binary and source installers in a variety of formats using the cpack program. Inclusion of the CPack module adds two new targets to the resulting makefiles, package and package_source, which build the binary and source installers, respectively. The generated binary installers contain everything installed via CMake’s INSTALL command (and the deprecated INSTALL_FILES, INSTALL_PROGRAMS, and INSTALL_TARGETS commands).
For certain kinds of binary installers (including the graphical installers on Mac OS X and Windows), CPack generates installers that allow users to select individual application components to install. See CPackComponent module for that.
The CPACK_GENERATOR variable has different meanings in different contexts. In your CMakeLists.txt file, CPACK_GENERATOR is a list of generators: when run with no other arguments, CPack will iterate over that list and produce one package for each generator. In a CPACK_PROJECT_CONFIG_FILE, though, CPACK_GENERATOR is a string naming a single generator. If you need per-cpack- generator logic to control other cpack settings, then you need a CPACK_PROJECT_CONFIG_FILE.
The CMake source tree itself contains a CPACK_PROJECT_CONFIG_FILE. See the top level file CMakeCPackOptions.cmake.in for an example.
If set, the CPACK_PROJECT_CONFIG_FILE is included automatically on a per-generator basis. It only need contain overrides.
Here’s how it works:
- cpack runs
- it includes CPackConfig.cmake
- it iterates over the generators listed in that file’s CPACK_GENERATOR list variable (unless told to use just a specific one via -G on the command line...)
- foreach generator, it then
- sets CPACK_GENERATOR to the one currently being iterated
- includes the CPACK_PROJECT_CONFIG_FILE
- produces the package for that generator
This is the key: For each generator listed in CPACK_GENERATOR in CPackConfig.cmake, cpack will reset CPACK_GENERATOR internally to the one currently being used and then include the CPACK_PROJECT_CONFIG_FILE.
Before including this CPack module in your CMakeLists.txt file, there are a variety of variables that can be set to customize the resulting installers. The most commonly-used variables are:
-
CPACK_PACKAGE_NAME
¶ The name of the package (or application). If not specified, defaults to the project name.
-
CPACK_PACKAGE_VENDOR
¶ The name of the package vendor. (e.g., “Kitware”).
-
CPACK_PACKAGE_DIRECTORY
¶ The directory in which CPack is doing its packaging. If it is not set then this will default (internally) to the build dir. This variable may be defined in CPack config file or from the cpack command line option “-B”. If set the command line option override the value found in the config file.
-
CPACK_PACKAGE_VERSION_MAJOR
¶ Package major Version
-
CPACK_PACKAGE_VERSION_MINOR
¶ Package minor Version
-
CPACK_PACKAGE_VERSION_PATCH
¶ Package patch Version
-
CPACK_PACKAGE_DESCRIPTION_FILE
¶ A text file used to describe the project. Used, for example, the introduction screen of a CPack-generated Windows installer to describe the project.
-
CPACK_PACKAGE_DESCRIPTION_SUMMARY
¶ Short description of the project (only a few words).
-
CPACK_PACKAGE_FILE_NAME
¶ The name of the package file to generate, not including the extension. For example, cmake-2.6.1-Linux-i686. The default value is:
${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}.
-
CPACK_PACKAGE_INSTALL_DIRECTORY
¶ Installation directory on the target system. This may be used by some CPack generators like NSIS to create an installation directory e.g., “CMake 2.5” below the installation prefix. All installed element will be put inside this directory.
-
CPACK_PACKAGE_ICON
¶ A branding image that will be displayed inside the installer (used by GUI installers).
-
CPACK_PROJECT_CONFIG_FILE
¶ CPack-time project CPack configuration file. This file included at cpack time, once per generator after CPack has set CPACK_GENERATOR to the actual generator being used. It allows per-generator setting of CPACK_* variables at cpack time.
-
CPACK_RESOURCE_FILE_LICENSE
¶ License to be embedded in the installer. It will typically be displayed to the user by the produced installer (often with an explicit “Accept” button, for graphical installers) prior to installation. This license file is NOT added to installed file but is used by some CPack generators like NSIS. If you want to install a license file (may be the same as this one) along with your project you must add an appropriate CMake INSTALL command in your CMakeLists.txt.
-
CPACK_RESOURCE_FILE_README
¶ ReadMe file to be embedded in the installer. It typically describes in some detail the purpose of the project during the installation. Not all CPack generators uses this file.
-
CPACK_RESOURCE_FILE_WELCOME
¶ Welcome file to be embedded in the installer. It welcomes users to this installer. Typically used in the graphical installers on Windows and Mac OS X.
-
CPACK_MONOLITHIC_INSTALL
¶ Disables the component-based installation mechanism. When set the component specification is ignored and all installed items are put in a single “MONOLITHIC” package. Some CPack generators do monolithic packaging by default and may be asked to do component packaging by setting CPACK_<GENNAME>_COMPONENT_INSTALL to 1/TRUE.
-
CPACK_GENERATOR
¶ List of CPack generators to use. If not specified, CPack will create a set of options CPACK_BINARY_<GENNAME> (e.g., CPACK_BINARY_NSIS) allowing the user to enable/disable individual generators. This variable may be used on the command line as well as in:
cpack -D CPACK_GENERATOR="ZIP;TGZ" /path/to/build/tree
-
CPACK_OUTPUT_CONFIG_FILE
¶ The name of the CPack binary configuration file. This file is the CPack configuration generated by the CPack module for binary installers. Defaults to CPackConfig.cmake.
-
CPACK_PACKAGE_EXECUTABLES
¶ Lists each of the executables and associated text label to be used to create Start Menu shortcuts. For example, setting this to the list ccmake;CMake will create a shortcut named “CMake” that will execute the installed executable ccmake. Not all CPack generators use it (at least NSIS, WIX and OSXX11 do).
-
CPACK_STRIP_FILES
¶ List of files to be stripped. Starting with CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which enables stripping of all files (a list of files evaluates to TRUE in CMake, so this change is compatible).
The following CPack variables are specific to source packages, and will not affect binary packages:
-
CPACK_SOURCE_PACKAGE_FILE_NAME
¶ The name of the source package. For example cmake-2.6.1.
-
CPACK_SOURCE_STRIP_FILES
¶ List of files in the source tree that will be stripped. Starting with CMake 2.6.0 CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables stripping of all files (a list of files evaluates to TRUE in CMake, so this change is compatible).
-
CPACK_SOURCE_GENERATOR
¶ List of generators used for the source packages. As with CPACK_GENERATOR, if this is not specified then CPack will create a set of options (e.g., CPACK_SOURCE_ZIP) allowing users to select which packages will be generated.
-
CPACK_SOURCE_OUTPUT_CONFIG_FILE
¶ The name of the CPack source configuration file. This file is the CPack configuration generated by the CPack module for source installers. Defaults to CPackSourceConfig.cmake.
-
CPACK_SOURCE_IGNORE_FILES
¶ Pattern of files in the source tree that won’t be packaged when building a source package. This is a list of regular expression patterns (that must be properly escaped), e.g., /CVS/;/\.svn/;\.swp$;\.#;/#;.*~;cscope.*
The following variables are for advanced uses of CPack:
-
CPACK_CMAKE_GENERATOR
¶ What CMake generator should be used if the project is CMake project. Defaults to the value of CMAKE_GENERATOR few users will want to change this setting.
-
CPACK_INSTALL_CMAKE_PROJECTS
¶ List of four values that specify what project to install. The four values are: Build directory, Project Name, Project Component, Directory. If omitted, CPack will build an installer that installs everything.
-
CPACK_SYSTEM_NAME
¶ System name, defaults to the value of ${CMAKE_SYSTEM_NAME}.
-
CPACK_PACKAGE_VERSION
¶ Package full version, used internally. By default, this is built from CPACK_PACKAGE_VERSION_MAJOR, CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.
-
CPACK_TOPLEVEL_TAG
¶ Directory for the installed files.
-
CPACK_INSTALL_COMMANDS
¶ Extra commands to install components.
-
CPACK_INSTALLED_DIRECTORIES
¶ Extra directories to install.
-
CPACK_PACKAGE_INSTALL_REGISTRY_KEY
¶ Registry key used when installing this project. This is only used by installer for Windows. The default value is based on the installation directory.
-
CPACK_CREATE_DESKTOP_LINKS
¶ List of desktop links to create. Each desktop link requires a corresponding start menu shortcut as created by
CPACK_PACKAGE_EXECUTABLES
.
-
CPACK_BINARY_<GENNAME>
¶ CPack generated options for binary generators. The CPack.cmake module generates (when CPACK_GENERATOR is not set) a set of CMake options (see CMake option command) which may then be used to select the CPack generator(s) to be used when launching the package target.
Provide options to choose generators we might check here if the required tools for the generates exist and set the defaults according to the results


C++ and PHP both support lambda functions or anonymous functions (in the C++ world the word 'lambda' is most used, PHP people speak about 'anonymous functions'). With PHP-CPP you can pass these functions from one language to the other. It is possible to call an anonymous PHP function from your C++ code, and the other way around, to call a C++ lambda from a PHP script.
Let's start with a very simple example in PHP. In PHP you can create anonymous functions, and assign them to a variable (or pass them directly to a function).
<?php
// anonymous PHP function stored in the variable $f
$f = function($a, $b) {
// return the sum of the parameters
return $a + $b;
};
// pass the function to another function
other_function($f);
// or pass an anonymous function without assigning it to a variable
other_function(function() {
// return the product of the parameters
return $a * $b;
});
?>
The code above should be familiar to most PHP programmers. The 'other_function' can of course be implemented in PHP user space, but to demonstrate how to do this with PHP-CPP we are going to build it with C++. Just like all the other functions that you've seen in the earlier examples, such a C++ function function receives a Php::Parmeters object as its parameter, which is a std::vector of Php::Value objects.
#include <phpcpp.h>
/**
* Native function that is callable from PHP
*
* This function gets one parameter that holds a callable anonynous
* PHP function.
*
* @param params The parameters passed to the function
*/
void other_function(Php::Parameters ¶ms)
{
// make sure the function was really called with at least one parameter
if (params.size() == 0) return;
// this function is called from PHP user space, and it is called
// with a anonymous function as its first parameter
Php::Value func = params[0];
// the Php::Value class has implemented the operator (), which allows
// us to use the object just as if it is a real function
Php::Value result = func(3, 4);
// @todo do something with the result
}
/**
* Switch to C context, because the Zend engine expects the get_module()
* to have a C style function signature
*/
extern "C" {
/**
* Startup function that is automatically called by the Zend engine
* when PHP starts, and that should return the extension details
* @return void*
*/
PHPCPP_EXPORT void *get_module()
{
// the extension object
static Php::Extension extension("my_extension", "1.0");
// add the example function so that it can be called from PHP scripts
extension.add("other_function", other_function);
// return the extension details
return extension;
}
}
It is that simple. But the other way around is possible too. Imagine we have a function in PHP user space code that accepts a callback function. The following function is a simple version of the PHP array_map() function:
<?php
// function that iterates over an array, and calls a function on every
// element in that array, it returns a new array with every item
// replaced by the result of the callback
function my_array_map($array, $callback) {
// initial result variable
$result = array();
// loop through the array
foreach ($array as $index => $item) {
// call the callback on the item
$result[$index] = $callback($item);
}
// done
return $result;
}
?>
Imagine that we want to call this PHP function from your C++ code, using a C++ lambda function as a callback. This is possible, and easy:
#include <phpcpp.h>
/**
* Native function that is callable from PHP
*/
void run_test()
{
// create the anonymous function
Php::Function multiply_by_two([](Php::Parameters ¶ms) -> Php::Value {
// make sure the function was really called with at least one parameter
if (params.size() == 0) return nullptr;
// one parameter is passed to the function
Php::Value param = params[0];
// multiple the parameter by two
return param * 2;
});
// the function now is callable
Php::Value four = multiply_by_two(2);
// a Php::Function object is a derived Php::Value, and its value can
// also be stored in a normal Php::Value object, it will then still
// be a callback function then
Php::Value value = multiply_by_two;
// the value object now also holds the function
Php::Value six = value(3);
// create an array
Php::Value array;
array[0] = 1;
array[1] = 2;
array[2] = 3;
array[3] = 4;
// call the user-space function
Php::Value result = Php::call("my_array_map", array, multiply_by_two);
// @todo do something with the result variable (which now holds
// an array with values 2, 4, 6 and 8).
}
/**
* Switch to C context, because the Zend engine expects the get_module()
* to have a C style function signature
*/
extern "C" {
/**
* Startup function that is automatically called by the Zend engine
* when PHP starts, and that should return the extension details
* @return void*
*/
PHPCPP_EXPORT void *get_module()
{
// the extension object
static Php::Extension extension("my_extension", "1.0");
// add the example function so that it can be called from PHP scripts
extension.add("run_test", run_test);
// return the extension details
return extension;
}
}
In the example we assigned a C++ lambda function to a Php::Function object. The Php::Function class is derived from the Php::Value class. The only difference between a Php::Value and a Php::Function is that the constructor of Php::Function accepts a function. Despite that difference, both classes are completely identical. In fact, we would have preferred to make it possible to assign C++ functions directly to Php::Value objects, and skip the Php::Function constructor, but that is impossible because of calling ambiguities.
The Php::Function class can be used as if it is a normal Php::Value object: you can assign it to other Php::Value objects, and you can use it as a parameter when you call user space PHP functions. In the above example we do exactly that: we call the user space my_array_map() function with our own 'multiply_by_two' C++ function.
You can pass different sort of C++ functions to the Php::Function constructor, as long as they are compatible with the following two function signatures:
Php::Value function();
Php::Value function(Php::Parameters ¶ms);
Internally, the Php::Function class uses a C++ std::function object to store the function, so anything that can be stored in such a std::function object, can be assigned to the Php::Function class.


Coronation Street viewers horrified by details of Paul's abuse by Kel
He opened up to Bernie and Gemma
by Karen HylandViewers of Coronation Street were reduced to tears as Paul revealed the full horror of Kel's abuse in Friday's episodes (November 22).
He finally opened up to his family after mum Bernie and sister Gemma found topless photos of him as a child, and other boys' pictures, in Kel's flat.
They had broken in suspecting the security guard was behind the burglary at Daniel's flat, while everyone was at Sinead's funeral.
Read More: Coronation Street viewers distracted by Ed Bailey's voice
First they found Daniel's laptop and then the incriminating images.
Bernie was beside herself as the penny dropped and, when she confronted Paul about it, was sickened by the full details.
Paul recalled how the grooming began when he and Kel went away together without her and Gemma.
He tearfully revealed that Kel gave him lager and asked him to model for pictures with his top off.
Paul noted how his then-stepfather figure would always say thank you after he'd abused him, and heartbreakingly spoke of how he loved him and felt special at the time.
The factory worker then turned on his mother, blaming her for not noticing what was going on under her roof.
At the end of the episode, Bernie went to the police station declaring she wanted to report the historic abuse of her son.
Emotional viewers praised actor Peter Ash's handling of the scenes.
One wrote on Twitter: "Peter Ash has made this heartbreaking, what an actor."
A second said: "That monologue from Paul there was some outstanding, gut-wrenching, heartbreaking acting."
A third echoed with: "Paul is breaking my heart, well performed."
Next week Kel is arrested, after being confronted by Bernie.
Read more: Corrie viewers confused by baby Bertie's changing appearance
Coronation Street is on Monday, Wednesday and Friday at 7.30pm and 8.30pm.
Leave us a comment on our Facebook page @EntertainmentDailyFix and let us know what you think!


open fun seek(position: Long): Unit
Adjusts the cursor to a specific position either back or forward. position may not be less than -1.
-1
CursorException - If the cursor fails to adjust its position.
CursorException


--- layout: null section-type: research title: Research --- ## Research | **interpretable ml** feature importance | **neuroscience** Connectomics , neural coding | | :----: | :----: | | |


Upcoming Troop 226 Events
Camping Checklist
☐Pocketknife or multitool
☐First aid kit
☐Extra clothing
☐Rain Gear
☐Flashlight
☐Trailfood
☐Water
☐Matches and/or firestarter
☐Sun Protection
☐Map and compass
Hygiene (Keeping clean):
☐Toothbrush and toothpaste
☐Dental floss
☐Hand sanatizer
☐Camera
☐Watch
☐Sunglasses
☐Fishing gear
☐Glasses repair kit
☐Insect repellent
☐Binoculars
☐Book
Quote From Robert Braden-Powell:
A week of camp life is worth six months of theoretical teaching in the meeting room.


<?php namespace CodeIgniter\Router; /** * CodeIgniter * * An open source application development framework for PHP * * This content is released under the MIT License (MIT) * * Copyright (c) 2014-2019 British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * @package CodeIgniter * @author CodeIgniter Dev Team * @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/) * @license https://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ use CodeIgniter\Exceptions\PageNotFoundException; use CodeIgniter\Router\Exceptions\RouterException; /** * Routing exception */ class RedirectException extends \Exception { } /** * Request router. */ class Router implements RouterInterface { /** * A RouteCollection instance. * * @var RouteCollection */ protected $collection; /** * Sub-directory that contains the requested controller class. * Primarily used by 'autoRoute'. * * @var string */ protected $directory; /** * The name of the controller class. * * @var string */ protected $controller; /** * The name of the method to use. * * @var string */ protected $method; /** * An array of binds that were collected * so they can be sent to closure routes. * * @var array */ protected $params = []; /** * The name of the front controller. * * @var string */ protected $indexPage = 'index.php'; /** * Whether dashes in URI's should be converted * to underscores when determining method names. * * @var boolean */ protected $translateURIDashes = false; /** * The route that was matched for this request. * * @var array|null */ protected $matchedRoute = null; /** * The options set for the matched route. * * @var array|null */ protected $matchedRouteOptions = null; /** * The locale that was detected in a route. * * @var string */ protected $detectedLocale = null; /** * The filter info from Route Collection * if the matched route should be filtered. * * @var string */ protected $filterInfo; //-------------------------------------------------------------------- /** * Stores a reference to the RouteCollection object. * * @param RouteCollectionInterface $routes */ public function __construct(RouteCollectionInterface $routes) { $this->collection = $routes; $this->controller = $this->collection->getDefaultController(); $this->method = $this->collection->getDefaultMethod(); } //-------------------------------------------------------------------- /** * Scans the URI and attempts to match the current URI to the * one of the defined routes in the RouteCollection. * * This is the main entry point when using the Router. * * @param string $uri * * @return mixed * @throws \CodeIgniter\Router\RedirectException */ public function handle(string $uri = null) { $this->translateURIDashes = $this->collection->shouldTranslateURIDashes(); // If we cannot find a URI to match against, then // everything runs off of it's default settings. if (empty($uri)) { return strpos($this->controller, '\\') === false ? $this->collection->getDefaultNamespace() . $this->controller : $this->controller; } if ($this->checkRoutes($uri)) { if ($this->collection->isFiltered($this->matchedRoute[0])) { $this->filterInfo = $this->collection->getFilterForRoute($this->matchedRoute[0]); } return $this->controller; } // Still here? Then we can try to match the URI against // Controllers/directories, but the application may not // want this, like in the case of API's. if (! $this->collection->shouldAutoRoute()) { throw new PageNotFoundException("Can't find a route for '{$uri}'."); } $this->autoRoute($uri); return $this->controllerName(); } //-------------------------------------------------------------------- /** * Returns the filter info for the matched route, if any. * * @return string */ public function getFilter() { return $this->filterInfo; } //-------------------------------------------------------------------- /** * Returns the name of the matched controller. * * @return mixed */ public function controllerName() { return $this->translateURIDashes ? str_replace('-', '_', $this->controller) : $this->controller; } //-------------------------------------------------------------------- /** * Returns the name of the method to run in the * chosen container. * * @return mixed */ public function methodName(): string { return $this->translateURIDashes ? str_replace('-', '_', $this->method) : $this->method; } //-------------------------------------------------------------------- /** * Returns the 404 Override settings from the Collection. * If the override is a string, will split to controller/index array. */ public function get404Override() { $route = $this->collection->get404Override(); if (is_string($route)) { $routeArray = explode('::', $route); return [ $routeArray[0], // Controller $routeArray[1] ?? 'index', // Method ]; } if (is_callable($route)) { return $route; } return null; } //-------------------------------------------------------------------- /** * Returns the binds that have been matched and collected * during the parsing process as an array, ready to send to * instance->method(...$params). * * @return mixed */ public function params(): array { return $this->params; } //-------------------------------------------------------------------- /** * Returns the name of the sub-directory the controller is in, * if any. Relative to APPPATH.'Controllers'. * * Only used when auto-routing is turned on. * * @return string */ public function directory(): string { return ! empty($this->directory) ? $this->directory : ''; } //-------------------------------------------------------------------- /** * Returns the routing information that was matched for this * request, if a route was defined. * * @return array|null */ public function getMatchedRoute() { return $this->matchedRoute; } //-------------------------------------------------------------------- /** * Returns all options set for the matched route * * @return array|null */ public function getMatchedRouteOptions() { return $this->matchedRouteOptions; } //-------------------------------------------------------------------- /** * Sets the value that should be used to match the index.php file. Defaults * to index.php but this allows you to modify it in case your are using * something like mod_rewrite to remove the page. This allows you to set * it a blank. * * @param $page * * @return mixed */ public function setIndexPage($page): self { $this->indexPage = $page; return $this; } //-------------------------------------------------------------------- /** * Tells the system whether we should translate URI dashes or not * in the URI from a dash to an underscore. * * @param boolean|false $val * * @return $this */ public function setTranslateURIDashes(bool $val = false): self { $this->translateURIDashes = $val; return $this; } //-------------------------------------------------------------------- /** * Returns true/false based on whether the current route contained * a {locale} placeholder. * * @return boolean */ public function hasLocale() { return (bool) $this->detectedLocale; } //-------------------------------------------------------------------- /** * Returns the detected locale, if any, or null. * * @return string */ public function getLocale() { return $this->detectedLocale; } //-------------------------------------------------------------------- /** * Compares the uri string against the routes that the * RouteCollection class defined for us, attempting to find a match. * This method will modify $this->controller, etal as needed. * * @param string $uri The URI path to compare against the routes * * @return boolean Whether the route was matched or not. * @throws \CodeIgniter\Router\RedirectException */ protected function checkRoutes(string $uri): bool { $routes = $this->collection->getRoutes($this->collection->getHTTPVerb()); $uri = $uri === '/' ? $uri : ltrim($uri, '/ '); // Don't waste any time if (empty($routes)) { return false; } // Loop through the route array looking for wildcards foreach ($routes as $key => $val) { // Are we dealing with a locale? if (strpos($key, '{locale}') !== false) { $localeSegment = array_search('{locale}', explode('/', $key)); // Replace it with a regex so it // will actually match. $key = str_replace('{locale}', '[^/]+', $key); } // Does the RegEx match? if (preg_match('#^' . $key . '$#', $uri, $matches)) { // Store our locale so CodeIgniter object can // assign it to the Request. if (isset($localeSegment)) { // The following may be inefficient, but doesn't upset NetBeans :-/ $temp = (explode('/', $uri)); $this->detectedLocale = $temp[$localeSegment]; unset($localeSegment); } // Are we using Closures? If so, then we need // to collect the params into an array // so it can be passed to the controller method later. if (! is_string($val) && is_callable($val)) { $this->controller = $val; // Remove the original string from the matches array array_shift($matches); $this->params = $matches; $this->matchedRoute = [ $key, $val, ]; $this->matchedRouteOptions = $this->collection->getRoutesOptions($key); return true; } // Are we using the default method for back-references? // Support resource route when function with subdirectory // ex: $routes->resource('Admin/Admins'); if (strpos($val, '$') !== false && strpos($key, '(') !== false && strpos($key, '/') !== false) { $replacekey = str_replace('/(.*)', '', $key); $val = preg_replace('#^' . $key . '$#', $val, $uri); $val = str_replace($replacekey, str_replace('/', '\\', $replacekey), $val); } elseif (strpos($val, '$') !== false && strpos($key, '(') !== false) { $val = preg_replace('#^' . $key . '$#', $val, $uri); } elseif (strpos($val, '/') !== false) { $val = str_replace('/', '\\', $val); } // Is this route supposed to redirect to another? if ($this->collection->isRedirect($key)) { throw new RedirectException($val, $this->collection->getRedirectCode($key)); } $this->setRequest(explode('/', $val)); $this->matchedRoute = [ $key, $val, ]; $this->matchedRouteOptions = $this->collection->getRoutesOptions($key); return true; } } return false; } //-------------------------------------------------------------------- /** * Attempts to match a URI path against Controllers and directories * found in APPPATH/Controllers, to find a matching route. * * @param string $uri */ public function autoRoute(string $uri) { $segments = explode('/', $uri); $segments = $this->validateRequest($segments); // If we don't have any segments left - try the default controller; // WARNING: Directories get shifted out of the segments array. if (empty($segments)) { $this->setDefaultController(); } // If not empty, then the first segment should be the controller else { $this->controller = ucfirst(array_shift($segments)); } // Use the method name if it exists. // If it doesn't, no biggie - the default method name // has already been set. if (! empty($segments)) { $this->method = array_shift($segments); } if (! empty($segments)) { $this->params = $segments; } // Load the file so that it's available for CodeIgniter. $file = APPPATH . 'Controllers/' . $this->directory . $this->controllerName() . '.php'; if (is_file($file)) { include_once $file; } // Ensure the controller stores the fully-qualified class name // We have to check for a length over 1, since by default it will be '\' if (strpos($this->controller, '\\') === false && strlen($this->collection->getDefaultNamespace()) > 1) { $this->controller = str_replace('/', '\\', $this->collection->getDefaultNamespace() . $this->directory . $this->controllerName()); } } //-------------------------------------------------------------------- /** * Attempts to validate the URI request and determine the controller path. * * @param array $segments URI segments * * @return array URI segments */ protected function validateRequest(array $segments) { $segments = array_filter($segments); $c = count($segments); $directory_override = isset($this->directory); // Loop through our segments and return as soon as a controller // is found or when such a directory doesn't exist while ($c -- > 0) { $test = $this->directory . ucfirst($this->translateURIDashes === true ? str_replace('-', '_', $segments[0]) : $segments[0] ); if (! is_file(APPPATH . 'Controllers/' . $test . '.php') && $directory_override === false && is_dir(APPPATH . 'Controllers/' . $this->directory . ucfirst($segments[0]))) { $this->setDirectory(array_shift($segments), true); continue; } return $segments; } // This means that all segments were actually directories return $segments; } //-------------------------------------------------------------------- /** * Sets the sub-directory that the controller is in. * * @param string|null $dir * @param boolean|false $append */ protected function setDirectory(string $dir = null, $append = false) { $dir = ucfirst($dir); if ($append !== true || empty($this->directory)) { $this->directory = str_replace('.', '', trim($dir, '/')) . '/'; } else { $this->directory .= str_replace('.', '', trim($dir, '/')) . '/'; } } //-------------------------------------------------------------------- /** * Set request route * * Takes an array of URI segments as input and sets the class/method * to be called. * * @param array $segments URI segments */ protected function setRequest(array $segments = []) { // If we don't have any segments - try the default controller; if (empty($segments)) { $this->setDefaultController(); return; } list($controller, $method) = array_pad(explode('::', $segments[0]), 2, null); $this->controller = $controller; // $this->method already contains the default method name, // so don't overwrite it with emptiness. if (! empty($method)) { $this->method = $method; } array_shift($segments); $this->params = $segments; } //-------------------------------------------------------------------- /** * Sets the default controller based on the info set in the RouteCollection. */ protected function setDefaultController() { if (empty($this->controller)) { throw RouterException::forMissingDefaultRoute(); } // Is the method being specified? if (sscanf($this->controller, '%[^/]/%s', $class, $this->method) !== 2) { $this->method = 'index'; } if (! is_file(APPPATH . 'Controllers/' . $this->directory . ucfirst($class) . '.php')) { return; } $this->controller = ucfirst($class); log_message('info', 'Used the default controller.'); } //-------------------------------------------------------------------- }


Home
Shop
Contact Us
Login
Register
0
Cart
Home
Cart
Product
price
quantity
total
Home
Shop
Contact Us
Login
Register


ThankYou for shopping with
SwagTech
Thank you, your order has been placed.
The estimated delivery date is
List of Items
₹


If you are also bored by the darkness of Battlelog, here I give you the solution!
I'm making a theme to transform Battlelog into something more user-friendly.
If you want to take a look at it, here are the link to the plugin which will load the CSS.
Remind it's still a Beta version and there are many bugs ;)
Hi T3RRORTOAST, can you send me the background?
I'm hardly working on the Beta version (I've plenty of display bugs to fix) which should be released soon.
- My tip: subtlepatterns.com you can find many other nice patterns.
Post edited 1 x times, last by
I_like_Chocolate
I_like_Chocolate
I would use it, when the "Top Story-field" , "Premium-field" and the "Upcoming Unlock-field" would be round in the corners, like in the "Dark Theme" by juress. Maybe you can add it. :)
Topicstarter
WiLLyS-exe
I would use it, when the "Top Story-field" , "Premium-field" and the "Upcoming Unlock-field" would be round in the corners, like in the "Dark Theme" by juress. Maybe you can add it. :)
Good idea, will be in next update ;)
If you like dark theme, you should know that i'm also working on a dark version of the same "clean" theme which will be release for BF4.
T3RRORTOAST
Community Manager
In the new Battlelog are many classes, container different. They have a different name. So I would wait for the BF4 beta.
Topicstarter
WiLLyS-exe
Ofc I'll wait for Beta but still there's no big difference between a light and a dark theme (just some color changes) which aren't linked to the classe's name.
But how do you know that? Did you get access to Alpha? I'm interested...
Post edited 1 x times, last by
T3RRORTOAST
Community Manager
T3RRORTOAST
Community Manager
A friend with alpha access told me that
I_like_Chocolate
WiLLyS-exe wrote:
I would use it, when the "Top Story-field" , "Premium-field" and the "Upcoming Unlock-field" would be round in the corners, like in the "Dark Theme" by juress. Maybe you can add it. :)
Good idea, will be in next update ;)
If you like dark theme, you should know that i'm also working on a dark version of the same "clean" theme which will be release for BF4.
Ohh, man awesome! ^^
Post edited 1 x times, last by
WiLLyS-exe
Topicstarter
WiLLyS-exe
Theme updated to 0.2 Alpha fixing some bugs (but adding new, indeed) and changing some pages.
Please tell me if you find any big issue.
I'm still working on Beta with a lot of changes coming I hope next week.
I would use it, when the "Top Story-field" , "Premium-field" and the "Upcoming Unlock-field" would be round in the corners, like in the "Dark Theme" by juress. Maybe you can add it. :)
Good idea, will be in next update ;)
If you like dark theme, you should know that i'm also working on a dark version of the same "clean" theme which will be release for BF4.
 Nothing more, nothing less.
--
However, I have found a few "bugs". Or maybe they are supposed to be that way, but in my opinion it should be changed to make it even better. :-)
The "apply" button on the Loadout page is a barely readable.  Maybe you can lighten it up a bit or something?
premium.png
The small "hover down thingie" (what is the name of such thing) of the four right buttons (Battle Reports, Matches, Notifications and Edit Profile) are a bit darker then all other larger "hover down thingies" (Soldier, Multiplayer and Forums). I think it would be nice to level these up at the same darkness.
small hover thingie.png
big hover thingie.png
Post edited 1 x times, last by
WiLLyS-exe
Topicstarter
WiLLyS-exe
Thanks for these suggestions, I'll answer. You know, this is only an Alpha version so there are still many things to improve ;)
The "apply" button on the Loadout page is a barely readable. I think this should be leveled with all other yellow buttons.
I know about this. It's because the button is "unactivated". I hope to fix this for Beta.
 Maybe you can lighten it up a bit or something?
Did though about this. Maybe a good idea and I'll look at it for further version.
The small "hover down thingie" (what is the name of such thing) of the four right buttons (Battle Reports, Matches, Notifications and Edit Profile) are a bit darker then all other larger "hover down thingies" (Soldier, Multiplayer and Forums). I think it would be nice to level these up at the same darkness.
I didn't notice that since I've an issue where I can't see these "hover down thingie" (Battle Reports, Matches, Notifications and Edit Profile) but I'll try to fix in the near future.
If you have any other suggestion, just tell me and I'll see what I can do.
And I might upload a screenshot of current Beta stages if you want?
Meaurk
Global Moderator
I know it's just an Alpha, but I couldn't find any 'changelog' or 'known bugs' or something like that. Maybe it's an idea to make such list when Beta goes live. :-)
Unfortunately with only a screenshot of Beta I/we can not test it, so we'll have to wait for it.
Topicstarter
WiLLyS-exe
Meaurk wrote:
I know it's just an Alpha, but I couldn't find any 'changelog' or 'known bugs' or something like that. Maybe it's an idea to make such list when Beta goes live. :-)
You should let, if possible, the link of the changelog in the footer open in a new tab. :-)
Oh and is the footer meant to be dark blue, or is it just so because of the Alpha?
Topicstarter
WiLLyS-exe
Hi everyone,
I just released Beta (0.3.0) with new buttons style and the background from the new Battleog for BF4!
This version still needs a lot of tweaks and bug fixes so tell me what you see, and I'll try to update often to get something working properly before Battlefield 4 Beta.
Click here to see changelog:
You should let, if possible, the link of the changelog in the footer open in a new tab. :-)
Done
Meaurk wrote:
Oh and is the footer meant to be dark blue, or is it just so because of the Alpha?
I'll fix that in further updates
Meaurk
Global Moderator
You really should change the background to the one Terrortoast gave to you.
shattered.png
It's more basic and minimalistic. Somehow this theme looks like iOS 7 to me. I like it. :-)
However I've found some "bugs":
I think the "show all players" button also need to have the new button style. The edges of the old one are quite rough and cut off.
showallplayers.png
I know you've changed the "header squares" in this update, but wouldn't it be better to make them the same as all other buttons?
headersquares.png
I think you need to level the clickable thingies on the main page. Personally I don't like the new image when you've clicked "Battlereports". But I love the image of the News and Store. :)
hoverbattlereports.png
hovernews.png
And just an idea. Is it possible to change the grey selected area for the nice orange outline? (More important, you need to like it as well)
serverlist.png
Post edited 1 x times, last by
WiLLyS-exe
Topicstarter
WiLLyS-exe
Updated to 0.3.1 - bugs fixed and some tweaks
See changelog for details:
I still have some bugs to fix and many pages to tweak so updates will go on.
I'm also planing new features from the plugin so stay tuned ;)
Meaurk wrote:
You really should change the background to the one Terrortoast gave to you.
It's more basic and minimalistic. Somehow this theme looks like iOS 7 to me. I like it. :-)
Thinking about it.
Meaurk wrote:
I think the "show all players" button also need to have the new button style. The edges of the old one are quite rough and cut off.
Of course you're right, I'll change that in further updates.
Meaurk wrote:
I know you've changed the "header squares" in this update, but wouldn't it be better to make them the same as all other buttons?
What I meant by "header squares" is the "Top story" "Co-op", etc squares.
But to answer you, I don't think I'm gonna make these buttons clear as the others because it doesn't look good with some backgrounds. These new buttons are only nice with a clear and plain background.
Meaurk wrote:
I think you need to level the clickable thingies on the main page. Personally I don't like the new image when you've clicked "Battlereports". But I love the image of the News and Store. :)
If I understood well, it chould be fixed in this update.
Meaurk wrote:
And just an idea. Is it possible to change the grey selected area for the nice orange outline? (More important, you need to like it as well)
It's sounds like a good idea, I'll think about it and see what i can do.
I_like_Chocolate
I have a question. How I need the plugin for? :O
Post edited 1 x times, last by
WiLLyS-exe
Topicstarter
WiLLyS-exe
As it is today, the plugin only does a few things:
- change Better Battlelog icon to text
- change Battlelog icon to text
- add time in the Com Center
- add version and changelog link in the footer
- fix a bug where the Server Browser button on the home page is hidden in French
But in the future, I'll add more features like a switch from Clear to Dark colors, maps categorized by DLC and whatever goes well to make Battlelog even better ;)
Meaurk
Global Moderator
WiLLyS-exe wrote:
Meaurk wrote:
I think you need to level the clickable thingies on the main page. Personally I don't like the new image when you've clicked "Battlereports". But I love the image of the News and Store. :)
If I understood well, it chould be fixed in this update.
Unfortunately it isn't fixed with this update. Or is it meant to be this way?
clickthingie.png
Topicstarter
WiLLyS-exe
I don't see what you mean exactly. Maybe you can precise more?
Meaurk
Global Moderator
Is the icon meant to be disappear when clicked? Because it is now.
Post edited 1 x times, last by
I_like_Chocolate
I_like_Chocolate
1st: I have a question. I don't like the BF4 Batllelog Background at all. It dosen't fit with the clean theme. How can I change to Terrortoast's one? :/
2nd: Found some Bugs - When Ioad the site or refresh it, the Text on Top is.. I don't know.
See it for your self -->
Schrift.PNG
It gets only normal when i swipe over, it with my mouse.
Also, I have installed the "Extended Friendlist"-Plugin. The Refresh button disappears but its clickable.
-->
Ext Friendlist.PNG
And also at the com center. I would make the heads of the "Create Groupchat"-Button black or at least
darker, so you can see it easier. -->
Group.PNG
EDIT: Basicly what Meaurk means is that the Icons don't get brighter when they got a click
-->
Icon.PNG
(I am using a Win8 Theme, not Win8 itself, before i get tons of questions..  I don't like the BF4 Batllelog Background at all. It dosen't fit with the clean theme. How can I change to Terrortoast's one? :/
You can change this with the integrated background changer (see Battlelog settings). Paste the line below in the area and it'll change. :)
url(http://subtlepatterns.com/patterns/shattered.png) top center repeat
Post edited 1 x times, last by
I_like_Chocolate
I_like_Chocolate
Meaurk wrote:
twm-killerkeks wrote:
1st: I have a question. I don't like the BF4 Batllelog Background at all. It dosen't fit with the clean theme. How can I change to Terrortoast's one? :/
You can change this with the integrated background changer (see Battlelog settings). Paste the line below in the area and it'll change. :)
url(http://subtlepatterns.com/patterns/shattered.png) top center repeat
Thanks ^^
I knowed the changer. but i don't get which url i have to use ^^
Post edited 1 x times, last by
I_like_Chocolate
I_like_Chocolate
Don't work :(
It's only white :/
-->
weiß.PNG
right url.PNG
(I tried it with "top center repeat" too)
Meaurk
Global Moderator
Try this: url(https://dl.dropboxusercontent.com/u/97057514/shattered.png) top center repeat
I_like_Chocolate
Meaurk wrote:
Try this: url(https://dl.dropboxusercontent.com/u/97057514/shattered.png) top center repeat
Now it works fine. Thank you very much. :)
Post edited 2 x times, last by
kurtextrem
kurtextrem
Hi,
would be cool if you could add "$('#extFLRefresh').attr('src', 'http://kurtextrem.de/bbl/refresh_dark.png')" to your plugin. If you don't want to support my plugin in your plugin it would be nice if you could add a class (e.g. "bright-theme") to the body or something similar (So I could know my user is using your theme).
By the way your theme is nice, I'm using it now :)
And I found a bug:
http://prntscr.com/1lxlyy
(The message button is too white on hover, you can barely see it)
Meaurk
Global Moderator
kurtextrem wrote:
Hi,
would be cool if you could add "$('#extFLRefresh').attr('src', 'http://kurtextrem.de/bbl/refresh_dark.png')" to your plugin. If you don't want to support my plugin in your plugin it would be nice if you could add a class (e.g. "bright-theme") to the body or something similar (So I could know my user is using your theme).
By the way your theme is nice, I'm using it now :)
And I found a bug:
http://prntscr.com/1lxlyy
(The message button is too white on hover, you can barely see it)
Please use our own image upload next time! ;)
kurtextrem
I have no clue what are you talking about...?
I_like_Chocolate
You took another Website to upload your Image. But you can use the uploader of their website.
When you write a pos, ,there should be a button that says "My Attachments".
kurtextrem
Ah okay. It's more comfortable to use a screenshot program (for me) so I did not think about that...
ORFK
Global Moderator
kurtextrem wrote:
Ah okay. It's more comfortable to use a screenshot program (for me) so I did not think about that...
but this is uncomfortable for other user, we have to open your link to see your picture, and on these website are many adds and commercial things which are anoying, sometimes hidding your image so we have to close te overlay and else. and sometimes the image will be deleted after few days/weeks/month so we have to ask again for the screen. which takes longer to solve the problem.
Topicstarter
WiLLyS-exe
Hi everyone,
I had a lot of work these days so I couldn't answer or work on the theme, but now i'm back to business.
So first of all the background from Terrortoast will be default in next update.
I can also tell you that this update will fix a lot of bugs including the dark icon that Meaurk told about and the issue with the "Extended friendlist" plugin. It will also include tweaks of every pages I hadn't done in last update.
Buy infortunately, I won't be able to fix the "Create group chat" button since it's glitched on my computer**.
I know about this but it happens on Chrome (28 for me) but not on Firefox (23) so I can't really find why :/
**as well as the "Battlereports", "Matches" and "Updates" drop-downs, but I still don't know why
xXJumpyXx
Helping Hand
WiLLyS-exe wrote:
http://getbblog.com/en/download?type=attachments&id=105824&file=Schrift.PNG
I know about this but it happens on Chrome (28 for me) but not on Firefox (23) so I can't really find why :/
I don't know why you'd use a plugin for that, just use the :after pseudo selector in CSS.
Add the following to your CSS file, and you wont need the plugin for that specific task any more, and it should also solve the problem.
If you use the css without the plugin that happens..
Topicstarter
WiLLyS-exe
kurtextrem wrote:
If you use the css without the plugin that happens..
Ofc, but will be changed soon (thanks to Jumpy).
Post edited 3 x times, last by
WiLLyS-exe
Topicstarter
WiLLyS-exe
Just released 0.3.2 update to fix this bug and do some other things before the Battlelog maintenance goes live. If this Battlelog is updated and my theme is broken, I'll be releasing a hot-fix as fast as possible.
PS: there are some bugs i'm aware of in this version so thanks to not report any bugs before next update
Edit: 0.3.3 fixed 404 error from background
Meaurk
Global Moderator
Dude, I know you're busy, but you really need to update your team. :-)
Topicstarter
WiLLyS-exe
Hello,
I'm back from over 3 weeks without Internet.
I'll do my best to update my theme quickly.
Stay tuned,
WiLLyS
Post edited 2 x times, last by
Meaurk
Global Moderator
HastaCastanyo
Anyone can help me ? why not looks same (image)
EDIT Meaurk: My apologies, I've clicked the wrong buttons.
Meaurk
Global Moderator
The theme is not up-to-date, you'll have to wait for an update. :-)
Topicstarter
WiLLyS-exe
Hi all,
I'm coming with good news for you guys waiting for an update: it's finally there.
Even if not perfect this fixes the menus glitched since last Battlelog update.
Just one little modification because i have split the theme into a few css files: CSS are loaded through the plugin so only use it and
delete the link in theme switcher
.
It make maintenance easier for me.
I'll be rolling out more updates for Battlefield 4 soon ;)
MyTrojanDonkey
Forgive me, but I have no idea how to run your theme. Theme switcher only works on CS file not JS. I'm not too bright though.
Post edited 2 x times, last by
Brady_The
Brady_The
MyTrojanDonkey wrote:
Forgive me, but I have no idea how to run your theme. Theme switcher only works on CS file not JS. I'm not too bright though.
Put the .js it into Plugins. It's gonna load the .css files.
Btw: I think the theme is optimized for BF3 Battlelog (if you are playing BF4).
MyTrojanDonkey
Thanks. Not crazy about their BF4 BL web interface.
Ic3nFiRe
I would love this theme if you could make all the white text a different color. White text on a white background isnt very practical.


{% extends 'ps/base.html' %} {% load static %} {% load forms %} {% block extra_css %} {{ block.super }} {% endblock %} {% block content %}
Please visit the Explore Parks website to start a new campground booking session.
{% verbatim %} Time left to complete booking {{ timeleft }}. {% endverbatim %} Change in-progress booking Cancel in-progress booking
There were some problems with your submission:
{% verbatim %} ${{ perDayFee|formatMoney(2) }} {% endverbatim %} Per night
Logged in as user {{ request.user.email }}.
Entry fees are required for each vehicle entering this park.
No entry fees are required for this park.
Entry fee total: ${{ entryFee|formatMoney(2) }}
Changes not permitted. Cancel up to 29 days before arrival for 50% refund.
Payments will be recorded against the booking once the booking is completed and the payment is received.


Use the built-in library datetime and the function datetime.datetime.now()
to determine the current year and print that to REPL using an f-string.
>>> import datetime
>>> right_now = datetime.datetime.now()
>>> # What is this thing?
>>> right_now
datetime.datetime(2020, 7, 10, 14, 41, 33, 790353)
>>> print(f"What a crazy year {right_now.year} has been, eh?")


{% extends "layout.html" %}
{% block article_body %}
{% markdown %}
Aside from taxes and regulation, international property buys are reliant on two main factors: currency fluctuations and changes in house prices at a local level. Using the live [currency conversion rates](https://markets.ft.com/data/currencies), and [Knight Frank](https://www.ft.com/topics/organisations/Knight_Frank_LLP)’s global property index from June 2017, the calculator can show you much prime property you could afford in [Berlin](https://www.ft.com/topics/places/Berlin), [Hong Kong](https://www.ft.com/topics/places/Hong_Kong), [London](https://www.ft.com/topics/places/London), [New York](https://www.ft.com/stream/a9c81345-5744-383f-8327-3e717bd50fd0), [Paris](https://www.ft.com/topics/places/Paris), [Singapore](https://www.ft.com/topics/places/Singapore) and [Sydney](https://www.ft.com/topics/places/Sydney).
Simply input your budget in your home currency to get started.
{% endmarkdown %}
{% include "./components/property-calculator/property-calculator.html" %}
{% endblock %}


the and were from with was The al. for cases enterovirus sequences strains {background Guangdong samples using outbreak other genome (.%) (Fig. fatal margin {border-style px;} viral #ffffff;} surveillance clinical different genotypes reads that three all analysis between recombination viruses Case identified number China infection local observed performed prevalence transmission also are closely phylogeny related this Fig. Guangdong, blood cluster per population possible reported sequencing these which China, For HFMD age collected nosocomial positive public two Enterovirus abundance cases, cases. caused cent circulation each infections most px; sewage used {font-family ARI April Disease No. among associated data detected during five font-size generated genetic including more outbreaks parts pathogen phylogenetic study types B-B Day_Blood Infectious Phylogenetic RNA RT-PCR Virus after causative constructed datasets double; enteroviruses found genotype into isolates likely metatranscriptomic respiratory sample sampled seroprevalence suggesting virus B). Cases Cat. Clade Clinical Control Diseases, Echovirus Environmental Guangzhou May Micrococcus Provincial Science This according anal based been before bootstrap border-color border-width but can children current disease human infectious luteus molecular neonatal potential rarely relative retrospective shown solid; swabs their transcriptomes young {font-style {font-weight (A) (B) A). Bioinformatics, C-’UTR Center China. EVA Enteroviruses Figure However, Human H–H Microbiology, NGS National Notably, S). Supplementary Swab Virology, bold case characterize clustered color courier; coverage database depth diseases dynamic em; environmental epidemiological estimated first formed gene genes genomes grey groups have highlighted hospitals hospitals. host increase investigate like mainland marked metatranscriptomics metatranscriptomics, microbe occurred outbreak. previously pt;} sequenced swabs, symptoms there total, transferred trees years


DfE enquiries
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Press release
Phonics check results show 120,000 more children on track to become excellent readers.
One hundred and twenty thousand more children are now on track to become excellent readers as a result of the government’s focus on phonics, vindicating reforms to transform the way young people learn to read.
Schools Minister Nick Gibb said the results show the focus on phonics is ensuring more children are becoming “confident, inquisitive and fluent readers”.
The minister said the introduction of the phonics check in 2012 helped to replace “ineffective methods” of teaching that meant children were being “denied the joy of reading”.
Today’s figures show that 3 years on from the introduction of the phonics reading check, 120,000 more children are now on track to become excellent readers.
Phonics is an internationally proven method of teaching reading by giving children the building blocks they need to decode words. The check, given to all pupils in year 1, ensures pupils are making the right progress in learning to read and allows teachers to identify those in danger of falling behind.
Schools Minister Nick Gibb said:
Today’s results demonstrate the effectiveness of the government’s continued focus on phonics as the primary way of helping young people to read.
For years, children were being denied the joy of becoming fluent readers because of a reliance on teaching methods that failed too many children. We will continue to challenge those local authorities whose phonics results are below the levels achieved elsewhere.
The evidence is clear that the systematic teaching of phonics is the most effective way to help children master the basics of reading so they can go on to become confident, inquisitive and fluent readers.
Today’s figures show that for 2015:
In line with the government commitment to ensuring every child is able to reach their potential, Schools Minister Nick Gibb will be challenging local authorities with the poorest results in the latest phonics check results to swiftly demonstrate how they plan to improve.
Alongside the introduction of the check in 2012, the government made more than £20 million available for schools to buy and develop resources for teaching phonics.
Those who do not reach the threshold in the light-touch check are given extra reading help by their teachers so they catch up early in their school career, before it is too late.
Today’s figures show that the proportion of pupils reaching the expected phonics standard a year later at age 7 has also increased, meaning those having to retake the check are benefiting from increased support from teachers. Nine out of 10 children now have a firm grasp of phonics by age 7.
Figures also published today show a rise in 7-year-olds fulfilling their potential in key stage 1 reading tests:
The worst 10 local authorities for phonics results:
| Local authority | Percentage achieving expected standard of phonic decoding |
|---|---|
| Nottingham | 69.5% |
| Peterborough | 69.8% |
| Wakefield | 70.1% |
| Doncaster | 70.3% |
| Derby | 70.3% |
| Liverpool | 70.7% |
| Bury | 70.8% |
| Oldham | 71.2% |
| Middlesbrough | 71.2% |
| Tameside | 71.5% |
The top 10 areas for phonics results are:
| Local authority | Percentage achieving expected standard of phonic decoding |
|---|---|
| Richmond-upon-Thames | 86.5% |
| Kensington and Chelsea | 84.3% |
| Lewisham | 83.4% |
| Wandsworth | 83.3% |
| Newham | 83.1% |
| Greenwich | 83.0% |
| Harrow | 82.8% |
| Bromley | 82.7% |
| Bexley | 82.4% |
| Darlington | 82.3% |
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Published: 24 September 2015