Pencils from the 19th Century
问题描述 :
Before "automaton" was a theoretic computer science concept, it meant "mechanical figure or contrivance constructed to act as if by its own motive power; robot." Examples include fortunetellers, as shown above, but could also describe a pencil seller, moving pencils from several baskets to a delivery trough.
On National Public Radio, the Sunday Weekend Edition program has a "Sunday Puzzle" segment. The show that aired on Sunday, 29 June 2008, had the following puzzle for listeners to respond to (by Thursday, 3 July, at noon through the NPR web site):
For our purposes, we will expand on the problem, rather than just getting 20 pencils for 20 cents (which is shown in the sample output below). The input file will present a number of cases. For each case, give all solutions or print the text "No solution found". Solutions are to be ordered by increasing numbers of four-cent pencils.
On National Public Radio, the Sunday Weekend Edition program has a "Sunday Puzzle" segment. The show that aired on Sunday, 29 June 2008, had the following puzzle for listeners to respond to (by Thursday, 3 July, at noon through the NPR web site):
- From a 19th century trade card advertising Bassetts Horehound Troches, a remedy for coughs and colds: A man buys 20 pencils for 20 cents and gets three kinds of pencils in return. Some of the pencils cost four cents each, some are two for a penny and the rest are four for a penny. How many pencils of each type does the man get?
One clarification from the program of 6 July: correct solutions contain at least one of each pencil type.
For our purposes, we will expand on the problem, rather than just getting 20 pencils for 20 cents (which is shown in the sample output below). The input file will present a number of cases. For each case, give all solutions or print the text "No solution found". Solutions are to be ordered by increasing numbers of four-cent pencils.
输入:
Each line gives a value for N (2 <= N <= 256), and your program is to end when N = 0 (at most 32 problems).
输出:
Each line gives a value for N (2 <= N <= 256), and your program is to end when N = 0 (at most 32 problems).
样例输入:
10 20 40 0
样例输出:
Case 1: 10 pencils for 10 cents No solution found. Case 2: 20 pencils for 20 cents 3 at four cents each 15 at two for a penny 2 at four for a penny Case 3: 40 pencils for 40 cents 6 at four cents each 30 at two for a penny 4 at four for a penny 7 at four cents each 15 at two for a penny 18 at four for a penny
/** * ID: ping128 * LANG: C++ */ #include <stdio.h> #include <iostream> #include <sstream> #include <stdlib.h> #include <string> #include <vector> #include <set> #include <queue> #include <stack> #include <list> #include <math.h> #include <algorithm> #include <map> #include <string.h> using namespace std; typedef long long LL; typedef pair<int, int>PII; typedef pair<PII, int>PII2; int n; class Solve { public: void main2() { printf("%d pencils for %d cents\n", n, n); int cnt = 0; for(int i = 1; i <= n; i++ ) for(int j = 1; i + j <= n; j++ ) { if((100 * n - (400 * i + 50 * j)) % 25 == 0 && (100 * n - (400 * i + 50 * j)) / 25 + i + j == n && (100 * n - (400 * i + 50 * j)) / 25 > 0) { cnt = 1; printf("%d at four cents each\n%d at two for a penny\n%d at four for a penny\n", i, j, (100 * n - (400 * i + 50 * j)) / 25); printf("\n"); } } if(cnt == 0) printf("No solution found.\n\n"); } }; int main() { // freopen("D.in", "r", stdin); // freopen(".out", "w", stdout); int t = 0; while(1) { t++; cin >> n; if(n == 0) break; printf("Case %d:\n", t); Solve ___test; ___test.main2(); } //while(1); return 0; }
(adsbygoogle = window.adsbygoogle || []).push({});
中肯，昨晚看到这视频后又把仙境OST给找出来，一直听到了凌晨3点，满满的回忆
这排版…你都打开来看看改改
妈呀！这个Dijkstra模板好长OwQ！
simple, however efficient. A lot of instances it is difficult to get that a??perfect balancea?? among usability and appearance. I must say that youa??ve done a exceptional task with this. Also, the blog masses quite fast for me on Web explore.
为什么暴力求解方法循环到sqrt(n) 就可以了呢
懂了，谢谢啦
#include <stdio.h>
int main()
{
int n,p,t[100]={1};
for(int i=1;i<100;i++)
t =i;
while(scanf("%d",&n)&&n!=0){
if(n==1)
printf("Printing order for 1 pages:nSheet 1, front: Blank, 1n");
else {
if(n%4) p=n/4+1;
else p=n/4;
int q=4*p;
printf("Printing order for %d pages:n",n);
for(int i=0;i<p;i++){
printf("Sheet %d, front: ",i+1);
if(q>n) {printf("Blank, %dn",t[2*i+1]);}
else {printf("%d, %dn",q,t[2*i+1]);}
q–;//打印表前
printf("Sheet %d, back : ",i+1);
if(q>n) {printf("%d, Blankn",t[2*i+2]);}
else {printf("%d, %dn",t[2*i+2],q);}
q–;//打印表后
}
}
}
return 0;
}
Good task for the group. Hold it up for every yeara??s winner. This is a excellent oppotunity for a lot more enhancement. Indeed, obtaining far better and much better is constantly the crucial. Just like my pal suggests on the truth about ab muscles, he just keeps obtaining much better.
编辑的时候有些不小心了
嗯 分析得很到位，确实用模板编程能让面试官对你的印象更好。在设置辅助栈的时候可以这样：push时，比较要push的elem和辅助栈的栈顶，elem<=min.top()，则min.push(elem).否则只要push（elem）就好。在pop的时候，比较stack.top()与min.top(),if(stack.top()<=min.top()),则{stack.pop();min.pop();}，否则{stack.pop();}.
不同的编译器，printf(),执行的顺序不同，所以结果也就不同，建议不要那么写
对于第一题，我的直觉告诉我换不换都一样，求指教
和编译器有关吧，我用的g++正常。头文件可能还需要一个<string.h>
remove没有实现
。。。


We take care of all your domestic duties
your carpets need cleaning too.
Everything tastes better out of a clean oven.
People spend alot of time on the sofa, so lets keep it clean.

Have your rental cleaned professionally for your next guests.


--- layout: pattern category: text name: abbr usage: Represents an abbreviation or acronym, optionally with its expansion. The title attribute may be used to provide an expansion of the abbreviation. The attribute, if specified, must contain an expansion of the abbreviation, and nothing else. It's better to only use it if the abbreviation is uncommon or that your audience won't understand it. ---
Not sure my mother will understand what PE means.


Math Quiz
Below are a series of math questions.
After you have answered each one,
whether it was right or wrong will be shown on the web page.
-
What is ?
Your answer is:
-
What is ?
Your answer is:
-
What is ?
Your answer is:
-
What is ?
Your answer is:
-
What is ?
Your answer is:
-
What is ?
Your answer is:


About
Features
Try it out!
Video
Composer
A text to video generator.
Username:
Password:
Register
Login


Toggle navigation
Comida Food Truck
Home
Where Am I?
Menu
Food
Drink
Cart
CART TOTAL
QUANTITY:
TAX COST:
TAX RATE:
GRAND TOTAL:
CHECKOUT PAYPAL
EMPTY CART


| Travis CI | |
| Frameworks | |
| Platform | |
| Licence |
About
Weavy is a navigation framework for iOS applications based on a weaving pattern
This README is a short story of the whole conception process that leaded me to this framework.
Take a look at this wiki page to learn more about Weavy: Weavy in details
Navigation concerns
Regarding navigation within an iOS application, two choices are available:
- Use the builtin mechanism provided by Apple and Xcode: storyboards and segues
- Implement a custom mechanism directly in the code
The disadvantage of these two solutions:
- Builtin mechanism: navigation is relatively static and the storyboards are massive. The navigation code pollutes the UIViewControllers
- Custom mechanism: code can be difficult to set up and can be complex depending on the chosen design pattern (Router, Coordinator)
Weavy aims to
- Promote the cutting of storyboards into atomic units to enable collaboration and reusability of UIViewControllers
- Allow the presentation of a UIViewController in different ways according to the navigation context
- Ease the implementation of dependency injection
- Remove any navigation mechanism from UIViewControllers
- Promote reactive programing
- Express the navigation in a declarative way while addressing the majority of the navigation cases
- Facilitate the cutting of an application into logical blocks of navigation
Installation
Carthage
In your Cartfile:
github "twittemb/Weavy"
CocoaPods
In your Podfile:
pod 'Weavy'
The core principles
In a real world: Weaving involves using a **loom* to interlace two sets of threads at right angles to each other: the warp which runs longitudinally and the weft that crosses it*
This is how I imagine the weaving pattern in a simple application:
How do I read this ?
- Here we have three warps: Application, Onboarding and Settings which describe the three main navigation sections of the application.
- We also have three wefts: Dashboard (the default weft triggered at the application bootstrap), Set the server and Login.
Each one of these wefts will be triggered either because of user actions or because of backend state changes. The crossing between a warp and a weft represented by a colored chip will be a specific navigation action (such as a UIViewController appearance).
As we can see, some wefts are used in multiple warps and their triggering will lead to the display of the same screen, but with different presentation options. Sometimes these screens will popup and sometimes they will be pushed in a navigation stack. This sketch illustrates how we can factorize UIViewControllers and Storyboards.
Warp, Weft and Stitch
Combinaisons of Warps and Wefts describe all the possible navigation patterns within your application. Each warp defines a clear navigation area (that makes your application divided in well defined parts) in which every weft represent a specific navigation action (push a VC on a stack, pop up a VC, …).
In the end the knit function has to return an array of stitches. A Stitch helps the Loom in knowing what it will have to deal with for the next navigation steps.
Why an array of stitches ? For instance a UITabbarController is a pattern in which multiple navigations are done at the same time, and we need to tell the Loom something like that is happening.
A Stitch tells the Loom: The next thing you have to handle is this particular Presentable and this particular Weftable. In some cases, the knit function can return an empty array because we know there won’t be any further navigation after the one we are doing.
The Demo application shows pretty much every possible cases.
Weftable
The basic principle of navigation is very simple: it consists of successive views transitions in response to application state changes. These changes are usually due to users interactions, but they can also come from a low level layer of your application. We can imagine that a lose of network session could lead to a signin screen appearance.
We need a way to express these changes. As we saw, a combinaison of a Warp and a Weft represent a navigation action. As well as warps can define your application areas, wefts can define these navigation state changes inside these areas.
Considering this, a Weftable is basically something
in the application which is able to express a new Weft, and as a consequence a navigation state change, leading to a navigation action.
A Weft can even embed inner values (such as Ids, URLs, …) that will be propagated to screens presented by the weaving process.
Loom
A loom is a just a tool for the developper. Once he has defined the suitable combinations of Warps and Wefts representing the navigation possibilities, the job of the loom is to weave these combinaisons into patterns, according to navigation state changes induced by Weftables.
It is up to the developper to:
- define the Warps that represent in the best possible way its application sections (such as Dashboard, Onboarding, Settings, …) in which significant navigation actions are needed
- provide the Weftables that will trigger the Loom weaving process.
How to use Weavy
Code samples
How to declare a Warp
The following Warp is used as a Navigation stack.
class WatchedWarp: Warp {
var head: UIViewController {
return self.rootViewController
}
let rootViewController = UINavigationController()
func knit(withWeft weft: Weft) -> [Stitch] {
guard let weft = weft as? AppWeft else { return Stitch.emptyStitches }
switch weft {
case .movieList:
return navigateToMovieListScreen()
case .moviePicked(let movieId):
return navigateToMovieDetailScreen(with: movieId)
case .castPicked(let castId):
return navigateToCastDetailScreen(with: castId)
default:
return Stitch.emptyStitches
}
}
private func navigateToMovieListScreen () -> [Stitch] {
let viewController = WatchedViewController.instantiate()
viewController.title = "Watched"
self.rootViewController.pushViewController(viewController, animated: true)
return [Stitch(nextPresentable: viewController, nextWeftable: viewController)]
}
private func navigateToMovieDetailScreen (with movieId: Int) -> [Stitch] {
let viewController = MovieDetailViewController.instantiate()
self.rootViewController.pushViewController(viewController, animated: true)
return [Stitch(nextPresentable: viewController, nextWeftable: viewController)]
}
private func navigateToCastDetailScreen (with castId: Int) -> [Stitch] {
let viewController = CastDetailViewController.instantiate()
self.rootViewController.pushViewController(viewController, animated: true)
return [Stitch(nextPresentable: viewController, nextWeftable: viewController)]
}
}
How to declare Wefts
As Weft are seen like some states spread across the application, it seems pretty obvious to use an enum to declare them
enum AppWeft: Weft {
case apiKey
case movieList
case moviePicked (withId: Int)
case castPicked (withId: Int)
case settings
}
How to declare a Weftable
In theory a Weftable, as it is a protocol, can be anything (a UIViewController for instance) by I suggest to isolate that behavior in a ViewModel or so. For simple cases (for instance when we only need to bootstrap a Warp with a first Weft and don’t want to code a basic Weftable for that), Weavy provides a SingleWeftable class.
class WishlistViewModel: Weftable {
init() {
self.weftSubject.onNext(AppWeft.movieList)
}
@objc func settings () {
self.weftSubject.onNext(AppWeft.settings)
}
}
How to bootstrap the weaving process
The weaving process will be bootstrapped in the AppDelegate.
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var loom = Loom()
let mainWarp = MainWarp()
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
guard let window = self.window else { return false }
Warps.whenReady(warp: mainWarp, block: { [unowned window] (head) in
window.rootViewController = head
})
loom.weave(fromWarp: mainWarp, andWeftable: SingleWeftable(withInitialWeft: DemoWeft.apiKey))
return true
}
}
As a bonus, the Loom offers a Rx extension that allows you to track the weaving steps (Loom.rx.willKnit and Loom.rx.didKnit).
Demo Application
A demo application is provided to illustrate the core mechanisms. Pretty much every kind of navigation is addressed. The app consists of:
- a MainWarp that represents the main navigation flow (a settings screen and then a dashboard composed of two screens in a tab bar controller)
- a WishlistWarp that represents a navigation stack of movies that you want to watch
- a WatchedWarp that represents a navigation stack of movies that you’ve already seen
- a SettingsWarp that represents the user’s preferences in a master/detail presentation
Tools and dependencies
Weavy relies on:
- SwiftLint for static code analysis (Github SwiftLint)
- RxSwift to expose Wefts into Observables the Loom can react to (Github RxSwift)
- Reusable in the Demo App to ease the storyboard cutting into atomic ViewControllers (Github Reusable)


This example shows how to store map tiles of the desired area in the browser cache and show them when no Internet connection is available.
We store satellite map tiles and attempt to show them after Internet connection is disabled. Pan the map and change the zoom level to see which areas of the map where cached.


These are 9 queries we designed.
They provided us with 268 valid webpages.
The pages have been aggregated on the domain name obtaining 193 web sites related to the Cesarean section section topic.
The dot dimension represents the number of valid pages.
Only a few of the websites are shared among the different queries so to reflect different discursive spaces.
Then we tagged the websites using the four categories:
Now you can explore the network by yourself.


ABC-Backports¶
Usage:
try:
# ABCs live in "collections.abc" in Python >= 3.3
from collections.abc import Coroutine, Generator
except ImportError:
# fall back to import from "backports_abc"
from backports_abc import Coroutine, Generator
You can also install the ABCs into the stdlib by calling the patch()
function:
import backports_abc
backports_abc.patch()
try:
# ABCs live in "collections.abc" in Python >= 3.3
from collections.abc import Coroutine, Generator
except ImportError:
# fall back to import from "collections" in Python <= 3.2
from backports_abc import Coroutine, Generator
Currently, patch()
provides the following names if missing:
collections.abc.Generator
collections.abc.Awaitable
collections.abc.Coroutine
inspect.isawaitable(obj)
All of them are also available directly from the backports_abc
module namespace.
In Python 2.x and Python 3.2, it patches the collections
module
instead of the collections.abc
module. Any names that are already
available when importing this module will not be overwritten.
The names that were previously patched by patch()
can be queried
through the mapping in backports_abc.PATCHED
.
Changelog¶
0.4 (2015-09-14)¶
- direct wheel building support
- make all names available at the module level instead of requiring patching
0.3 (2015-07-03)¶
- removed patching of
inspect.iscoroutine()
as it is not ABC based
0.2 (2015-07-03)¶
- require explicit
backports_abc.patch()
call to do the patching (avoids side-effects on import and allows future configuration) - provide access to patched names through global
PATCHED
dict - add ABC based implementations of inspect.iscoroutine() and inspect.isawaitable()
0.1 (2015-06-24)¶
- initial public release
- provided ABCs: Generator, Coroutine, Awaitable


About
Add Word
Random Word
My Profile
Login/Register
Logout
Words that might interest you
{{randomword.wordname}}


- acceptBid(View) - Method in class cmput301w16t08.scaling_pancake.activities.ViewBidActivity
-
- acceptBid(Bid) - Method in class cmput301w16t08.scaling_pancake.models.Instrument
-
Accepts a Bid
on the Instrument
- acceptBid(int) - Method in class cmput301w16t08.scaling_pancake.models.Instrument
-
Accepts the Bid
at the supplied index of the list of Bid
s on the Instrument
- acceptBidOnInstrument(Bid) - Method in class cmput301w16t08.scaling_pancake.controllers.Controller
-
The currently logged in User
accepts a Bid
on one of it's
Instrument
s.
- acceptReturnedInstrument(Instrument) - Method in class cmput301w16t08.scaling_pancake.controllers.Controller
-
The currently logged in User
sets a returned Instrument
back to available
- acceptReturnedInstrument(int) - Method in class cmput301w16t08.scaling_pancake.controllers.Controller
-
The currently logged in User
sets a returned Instrument
back to available
- addAudioSample(View) - Method in class cmput301w16t08.scaling_pancake.activities.AddInstrumentActivity
-
- addAudioSample(View) - Method in class cmput301w16t08.scaling_pancake.activities.EditInstrumentActivity
-
- addAudioSampleToInstrument(Instrument, String) - Method in class cmput301w16t08.scaling_pancake.controllers.Controller
-
Adds an audio sample to the supplied Instrument
- addBid(Bid) - Method in class cmput301w16t08.scaling_pancake.models.BidList
-
Adds a Bid
to the list
- addBid(Bid) - Method in class cmput301w16t08.scaling_pancake.models.Instrument
-
Adds a Bid
to the list of Bid
s on the Instrument
- addBid(Bid) - Method in class cmput301w16t08.scaling_pancake.models.User
-
Adds a new Bid
to the user's Bid
s
- addBorrowedInstrument(Instrument) - Method in class cmput301w16t08.scaling_pancake.models.User
-
Adds an Instrument
to the user's borrowed Instrument
s
- addInstrument(Instrument) - Method in class cmput301w16t08.scaling_pancake.controllers.Controller
-
Adds an Instrument
to the currently logged in User
's Instrument
s
- addInstrument(String, String) - Method in class cmput301w16t08.scaling_pancake.controllers.Controller
-
Creates then adds an Instrument
to the currently logged in
User
's Instrument
s
- addInstrument(Instrument) - Method in class cmput301w16t08.scaling_pancake.models.InstrumentList
-
Adds an Instrument
to the list
- AddInstrumentActivity - Class in cmput301w16t08.scaling_pancake.activities
-
Presents a view to the user that allows them to add an Instrument
to their profile.
- AddInstrumentActivity() - Constructor for class cmput301w16t08.scaling_pancake.activities.AddInstrumentActivity
-
- addInstrumentCancel(View) - Method in class cmput301w16t08.scaling_pancake.activities.AddInstrumentActivity
-
- addInstruments(View) - Method in class cmput301w16t08.scaling_pancake.activities.MenuActivity
-
Navigate to the AddInstrumentActivity
- addOwnedInstrument(Instrument) - Method in class cmput301w16t08.scaling_pancake.models.User
-
Adds an Instrument
to the user's owned Instrument
s
- addOwnedInstrument(String, String) - Method in class cmput301w16t08.scaling_pancake.models.User
-
Creates an Instrument
with the given name and description and adds it to the
user's owned Instrument
s
- addPhotoToInstrument(Instrument, Bitmap) - Method in class cmput301w16t08.scaling_pancake.controllers.Controller
-
Adds a photo to an Instrument
- addSampleAudioBase64(String) - Method in class cmput301w16t08.scaling_pancake.models.Instrument
-
Adds an audio sample to the Instrument
- addThumbnail(Bitmap) - Method in class cmput301w16t08.scaling_pancake.models.Instrument
-
Adds a thumbnail for the Instrument
- addThumbnail(String) - Method in class cmput301w16t08.scaling_pancake.models.Instrument
-
Adds a thumbnail for the Instrument
as a Base64 String
- addUser(User) - Method in class cmput301w16t08.scaling_pancake.models.UserList
-
Adds the supplied User
to the list


Groceries!
Input the items you need to pick up at the grocery store, sepparated by commas.
Item list
Submit


{% extends "base.html" %} {% load legislators %} {% block content %} {% custom_mash legislators.0 legislators.1 %}
(bills each of these candidates has sponsored)
(top industries contributing to each of these candidates)
(top contributors to each of these candidates)
(percent of votes where these candidates disagreed)
{% if agreement %} {{ agreement.disagree_percent|floatformat }}% {% else %} Data unavailable {% endif %}
{% endblock content %}


| Quantity | Topping |
Orders for |
|
- 20 plain
- 1 chocolate
- 5 cherry
| Quantity | Topping |
Orders for |
|


To make a good coffee you need following items
boil some water and add the coffee powder and brew it. After coffee is brewed add some sugar and milk. Stir it well and then pour in Mug. Enjoy every sip.


The assign.summary function computes the posterior mean of the model parameters estimated in every iteration during the Gibbs sampling.
assign.summary(test, burn_in = 1000, iter = 2000, adaptive_B = TRUE, adaptive_S = FALSE, mixture_beta = TRUE)
| test | The list object returned from the assign.mcmc function. The list components are the MCMC chains of the B, S, Delta, beta, gamma, and sigma. |
|---|---|
| burn_in | The number of burn-in iterations. These iterations are discarded when computing the posterior means of the model parameters. The default is 1000. |
| iter | The number of total iterations. The default is 2000. |
| adaptive_B | Logicals. If TRUE, the model adapts the baseline/background (B) of genomic measures for the test samples. The default is TRUE. |
| adaptive_S | Logicals. If TRUE, the model adapts the signatures (S) of genomic measures for the test samples. The default is FALSE. |
| mixture_beta | Logicals. If TRUE, elements of the pathway activation matrix are modeled by a spike-and-slab mixture distribution. The default is TRUE. |
The N x K matrix of the posterior mean of the pathway activation level in test samples (transposed matrix A). Columns:K pathways; rows: N test samples
The G x 1 vector of the posterior mean of the variance of gene.
The N x K matrix of posterior mean of pathway activation level in test samples (transposed matrix A) (adjusted beta_pos scaling between 0 and 1). Columns:K pathways; rows: N test samples
The N x K matrix of the posterior probability of pathways being activated in test samples.
The G x K matrix of the posterior mean of pathway signature genes.
The G x K matrix of the posterior probability of genes being significant in the associated pathways.
The assign.summary function is suggested to run after the assign.convergence function, which is used to check the convergence of the MCMC chain. If the MCMC chain does not converge to a stationary phase, more iterations are required in the assign.mcmc function. The number of burn-in iterations is usually set to be half of the number of total iterations, meaning that the first half of the MCMC chain is discarded when computing the posterior means.


Thailand pushes for 5G rollouts in 2020
by Joseph WaringThailand’s deputy prime minister urged operators to begin launching 5G services by the middle of 2020 to support the country’s competitiveness in the region and cautioned the government not to focus on generating huge sums from a spectrum auction, Bangkok Post reported.
Somkid Jatusripitak said 5G networks are crucial to supporting the economy and driving innovation.
The newspaper quoted Somkid as saying: “Thailand is battling to become the digital innovation hub of ASEAN, competing with Vietnam, Malaysia and the Philippines, which all plan to launch commercial 5G services in 2020.”
During a visit to the Digital Economy and Society Ministry, he said the 5G auctions must not focus on “exorbitant winning prices”.
In October, the National Broadcasting and Telecommunications Commission announced details of 5G spectrum auctions scheduled to begin in February 2020, with licences to be issued across four bands and rollouts to start in March. The regulator said it will auction spectrum first in the 2600MHz and 26GHz bands, and later in the 700MHz and 1800MHz bands.


Version 5.4¶
Release date: 2021-06-17
This release contains a number of bug fixes and new features since the release of pgAdmin4 5.3.
New features¶
Issue #1561 - Added browse button to select the binary path in the Preferences.
Issue #1591 - Added Grant Wizard option under Package node.
Issue #2341 - Added support to launch PSQL for the connected database server.
Issue #4064 - Added window maximize/restore functionality for properties dialog.
Issue #5370 - Added support to set the binary path for the different database server versions.
Issue #6231 - Added OS, Browser, Configuration details in the About dialog.
Issue #6395 - Added support for rotating the pgAdmin log file on the basis of size and age.
Issue #6524 - Support non-admin installation on Windows.
Housekeeping¶
Issue #4622 - Added RESQL/MSQL test cases for Table and its child nodes.
Issue #6225 - Updated Flask-Security-Too to the latest v4.
Issue #6460 - Added a mechanism to detect a corrupt/broken config database file.
Bug fixes¶
Issue #4203 - Fixed the issue of renaming the database by another user.
Issue #6404 - Ensure that the Query Tool connection string should not be changed as per the ‘Query Tool tab title’.
Issue #6466 - Ensure that the user should be able to add members in Login/Role group while creating it.
Issue #6469 - Ensure that the calendar control should be disabled in the properties panel for Role.
Issue #6473 - Disable browser password saving in the runtime.
Issue #6478 - Fixed duplicate SQL issue for tables with more than one partition.
Issue #6482 - Fixed an issue where the Foreground Color property of server dialog does not work.
Issue #6513 - Fixed an issue where pgAdmin does not open after password reset in server mode.
Issue #6520 - Fixed an issue where a decimal number is appended for character varying fields while downloading the data in CSV format.


larablog6
About me
Login
Contact
RSS
Create new post
Choose Type
Type: Text
Type: Photo
Date:
Premium:
Image:
Add post
Delete post
Delete post


Psalms 140:8
Grant not, O LORD, the desires of the wicked: further not his wicked device; lest they exalt themselves. Selah.


The Time Machine
by H.G. Wells
The Time Machine is a book by H. G. Wells, first published in 1895
The book’s protagonist is an amateur inventor or scientist living in London identified simply as The Time Traveller. Having demonstrated to friends using a miniature model that time is a fourth dimension, and that a suitable apparatus can move back and forth in this fourth dimension, he completes the building of a larger machine capable of carrying himself. He then immediately sets off on a journey into the future.
The Time Traveller details the experience of time travel and the evolution of his surroundings as he moves through time. While travelling through time, his machine allows him to observe the changes of the outside world in fast motion. He observes the sun and moon traversing the sky and the changes to the buildings and landscape around him as he travels through time. His machine produces a sense of disorientation to its occupant, and a blurring or faintness of the surroundings outside the machine.
Source: Wells, H. G. (1895). The Time Machine. London, England: William Heinemann.
- Chapter 1
- The Time Traveller gives a lecture on the fourth dimension, while showing the group his an amazing new invention.
- Chapter 2
- The guests return to the Time Traveller's home a week later for dinner and an unexpected tale of adventure from the future.
- Chapter 3
- The Time Traveller experiments with his new invention, starting slowly then accelerating rapidly into the future.
- Chapter 4
- The Time Traveller encounters a group of strange creatures and explores the world of the future.
- Chapter 5
- The Time Traveller, concerned with the disappearance of the time machine, searches frantically for his invention. The Time Traveller inquires about the sphinx statue, and reconsiders his previous theories. Through a heroic act, the Time Traveller makes a friend. The Time Traveller encounters another creature from the future.
- Chapter 6
- In hopes of recovering his machine, the Time Traveller enters the underground world of the Morlocks.
- Chapter 7
- The Time Traveller begins to understand the relationship between the Morlocks and the Eloi. With nightfall approaching, the Time Traveller looks for a safe place to rest.
- Chapter 8
- Weena and the Time Traveller journey into the Palace of Green Porcelain.
- Chapter 9
- The Time Traveller awakens to find himself surrounded.
- Chapter 10
- The Time Traveller finds the machine, barely escaping with his life.
- Chapter 11
- The Time Traveller travels far in to the future, observing the extreme changes of the planet.
- Chapter 12
- The Time Traveller returns to the present to tell his dinner guests of his amazing adventures. The next day the narrator finds the Time Traveller preparing for another journey through time.
- Epilogue
- The narrator ponders the many possible fates of the Time Traveller.
- Year Published: 1895
- Language: English
- Country of Origin: England
-
Readability:
- Flesch–Kincaid Level: 8.5
- Word Count: 33,163
- Genre: Science Fiction
- Keywords: 19th century literature, destiny, fate, fourth dimension, time travel


Dronfield Swimming Club | Welcome!
Our swimming club has been around for over 30 years! With an incredible team behind us, we welcome all coaches and faculty staff to our online application!
The Main Features
& how they benefit you!
Track Progress!
As a coach, this application gives you the ability to track your swimmers progress throughout each session, allows you to identify areas that need to be worked on, and gives you an insight across completed sessions to see how much the swimmer has improved.
Conduct a test!
When you as a coach feel your class is ready to progress in to the next group, this application provides you the feature to conduct a test, in which you can set up desired milestones for the swimmers to attempt to acheive certain thresholds and evaluate whether you feel they are ready to move to the next group!
Complete control!
This application allows the coach to be completely in control and commit changes such as removing or adding swimmers to certain groups, conduct notes about a certain swimmers performance and track attendence and achieved goals, all whilst inheriting a fast and seamless UI system.


Towns where homes are selling twice as fast as the rest of the Britain
It's no secret that people selling homes are having a tough time, but that doesn't mean would be buyers can relax, with properties in some towns still being being snapped up
by James Andrews, http://www.facebook.com/jameswritesmoney/There are just 31 days between the average home in Edinburgh going on the market and someone buying it, making it the fastest-moving property market in Britain at the moment.
By contrast, homes in Middlesbrough take 114 to find a buyer and London properties not much less at 107 days, according to a new report from Hometrack and Barclays mortgages.
Overall the amount of time to sell is getting longer, with a national average of 84 days to sell, nine days longer than last year.
But despite the nationwide slowdown, there were some places that were things were improving.
Newcastle saw the biggest improvement, with the time to sell a home dropping 19 days compared to last year, followed by Middlesbrough (16 days quicker) and Liverpool (13 days quicker).
Derby saw the biggest slowdown, with homes there taking 34 days longer to sell this year than last, followed by Hull (18 days slower) then Nottingham and Sunderland (both 13 days slower).
Shepherd Ncube, founder of estate agent Springbok Properties, said: “The UK market continues to be a real mixed bag and we’re seeing diverse conditions across neighbouring markets at county level or lower, let alone from one region to the next.
"Yes, the time to sell has generally extended and this is of course due to Brexit uncertainty and a refusal from buyers in the more inflated areas of the market to adust their asking price and sell for less."
Regionally, Scotland had the fastest selling homes, though the time to secure a sale was a week longer than last year.
"The landscape is tough, but the foundation of a strong buyer appetite remains and when the cogs start to turn once again, the time it’s taking to sell will reduce and the sold price being secured will once again lift,” Ncube said.


Medicom Toy Transforms PORTER's "TANKER" Bag Into a BE@RBRICK
Available in 400% and 1000%.
by Ambrose LeungMedicom Toy is back with Yoshida PORTER for another version of its TANKER-inspired BE@RBRICK. This time around, the two have chosen to cover the bear silhouette in PORTER’s classic BLACK TANKER series material.
Just like the bags, the bright-orange lining appears, but this time it is used as trimming to add a bit of contrast to the figure. Adding to the bag reference is a full zipper at the back of the figure where both the head and the body can be unzipped to reveal the plastic bear underneath. The full figure is finished off with Yoshida PORTER’s iconic label at the chest.
Available at Medicom Toy in both a 400% and 1000% variant, both BE@RBRICKs are launching on November 23 for a price of ¥16,500 JPY and ¥55,840 JPY (approximately $150 USD and $513 USD), respectively.
In other toy news, Medicom Toy & UNDERCOVER channel subversive graphics with new BE@RBRICKs.
Porter x Medicom Toy Be@rbrick
Release Date
November 23, 2019 - 12:00 am EST (TBC)
Price
55840 JPY


Research
The department is active in research in most areas of pure and applied mathematics,
including algebra and number theory, analysis,
discrete mathematics, geometry/topology, mathematical finance, numerical analysis, partial
differential equations, probability, representation theory, and time-series analysis.
Teaching
The department has a Ph.D. programme as well as an integrated Ph.D. programme. The department participates
in the undergraduate programme of IISc: undergraduate students can
opt for mathematics as a major or a minor.


Introduction¶
Installation¶
This package is available from the Python Package Index. If you have pip you should be able to do:
$ pip install managealooma
managealooma
is compatible with Python versions 3.7 and
has been tested under the Mac and Window operating system
Dependencies and extensions¶
This package is written in pure Python and has no installation requirements other than the Python core modules.
Some of the functions in this package require installation of third party packages. This is indicated in the relevant parts of the documentation.
Some domain-specific and/or experimental extensions to petl
are
available from the petlx package.
Design goals¶
This package is designed primarily for convenience and ease of use, especially when working interactively with data that are unfamiliar, heterogeneous and/or of mixed quality.
petl
transformation pipelines make minimal use of system memory
and can scale to millions of rows if speed is not a priority. However
if you are working with very large datasets and/or performance-critical
applications then other packages may be more suitable, e.g., see
pandas, pytables, bcolz
and blaze. See also related_work.
ETL pipelines¶
This package makes extensive use of lazy evaluation and iterators. This means, generally, that a pipeline will not actually be executed until data is requested.
E.g., given a file at ‘example.csv’ in the current working directory:
>>> example_data = """foo,bar,baz
... a,1,3.4
... b,2,7.4
... c,6,2.2
... d,9,8.1
... """
>>> with open('example.csv', 'w') as f:
... f.write(example_data)
...
…the following code does not actually read the file or load any of its contents into memory:
>>> import petl as etl
>>> table1 = etl.fromcsv('example.csv')
Rather, table1 is a table container (see Conventions - table containers and table iterators below) which can be iterated over, extracting data from the underlying file on demand.
Similarly, if one or more transformation functions are applied, e.g.:
>>> table2 = etl.convert(table1, 'foo', 'upper')
>>> table3 = etl.convert(table2, 'bar', int)
>>> table4 = etl.convert(table3, 'baz', float)
>>> table5 = etl.addfield(table4, 'quux', lambda row: row.bar * row.baz)
…no actual transformation work will be done until data are requested from table5 (or any of the other tables returned by the intermediate steps).
So in effect, a 5 step pipeline has been set up, and rows will pass through the pipeline on demand, as they are pulled from the end of the pipeline via iteration.
A call to a function like petl.util.vis.look()
, or any of the functions
which write data to a file or database (e.g., petl.io.csv.tocsv()
,
petl.io.text.totext()
, petl.io.sqlite3.tosqlite3()
,
petl.io.db.todb()
), will pull data through the pipeline
and cause all of the transformation steps to be executed on the
requested rows, e.g.:
>>> etl.look(table5)
+-----+-----+-----+--------------------+
| foo | bar | baz | quux |
+=====+=====+=====+====================+
| 'A' | 1 | 3.4 | 3.4 |
+-----+-----+-----+--------------------+
| 'B' | 2 | 7.4 | 14.8 |
+-----+-----+-----+--------------------+
| 'C' | 6 | 2.2 | 13.200000000000001 |
+-----+-----+-----+--------------------+
| 'D' | 9 | 8.1 | 72.89999999999999 |
+-----+-----+-----+--------------------+
…although note that petl.util.vis.look()
will by default only request
the first 5 rows, and so the minimum amount of processing will be done to
produce 5 rows.
Functional and object-oriented programming styles¶
The petl
package supports both functional and object-oriented
programming styles. For example, the example in the section on
ETL pipelines above could also be written as:
>>> import petl as etl
>>> table = (
... etl
... .fromcsv('example.csv')
... .convert('foo', 'upper')
... .convert('bar', int)
... .convert('baz', float)
... .addfield('quux', lambda row: row.bar * row.baz)
... )
>>> table.look()
+-----+-----+-----+--------------------+
| foo | bar | baz | quux |
+=====+=====+=====+====================+
| 'A' | 1 | 3.4 | 3.4 |
+-----+-----+-----+--------------------+
| 'B' | 2 | 7.4 | 14.8 |
+-----+-----+-----+--------------------+
| 'C' | 6 | 2.2 | 13.200000000000001 |
+-----+-----+-----+--------------------+
| 'D' | 9 | 8.1 | 72.89999999999999 |
+-----+-----+-----+--------------------+
A wrap()
function is also provided to use the object-oriented style with
any valid table container object, e.g.:
>>> l = [['foo', 'bar'], ['a', 1], ['b', 2], ['c', 2]]
>>> table = etl.wrap(l)
>>> table.look()
+-----+-----+
| foo | bar |
+=====+=====+
| 'a' | 1 |
+-----+-----+
| 'b' | 2 |
+-----+-----+
| 'c' | 2 |
+-----+-----+
Interactive use¶
When using petl
from within an interactive Python session, the
default representation for table objects uses the petl.util.vis.look()
function, so a table object can be returned at the prompt to inspect it, e.g.:
>>> l = [['foo', 'bar'], ['a', 1], ['b', 2], ['c', 2]]
>>> table = etl.wrap(l)
>>> table
+-----+-----+
| foo | bar |
+=====+=====+
| 'a' | 1 |
+-----+-----+
| 'b' | 2 |
+-----+-----+
| 'c' | 2 |
+-----+-----+
By default data values are rendered using the built-in repr()
function.
To see the string (str()
) values instead, print()
the table, e.g.:
>>> print(table)
+-----+-----+
| foo | bar |
+=====+=====+
| a | 1 |
+-----+-----+
| b | 2 |
+-----+-----+
| c | 2 |
+-----+-----+
IPython notebook integration¶
Table objects also implement _repr_html_()
and so will be displayed as an
HTML table if returned from a cell in an IPython notebook. The functions
petl.util.vis.display()
and petl.util.vis.displayall()
also
provide more control over rendering of tables within an IPython notebook.
For examples of usage see the repr_html notebook.
petl
executable¶
Also included in the petl
distribution is a script to execute
simple transformation pipelines directly from the operating system
shell. E.g.:
$ petl "dummytable().tocsv()" > example.csv
$ cat example.csv | petl "fromcsv().cut('foo', 'baz').convert('baz', float).selectgt('baz', 0.5).head().data().totsv()"
The petl
script is extremely simple, it expects a single
positional argument, which is evaluated as Python code but with all of
the functions in the petl
namespace imported.
Conventions - table containers and table iterators¶
This package defines the following convention for objects acting as containers of tabular data and supporting row-oriented iteration over the data.
A table container (also referred to here as a table) is any object which satisfies the following:
- implements the __iter__ method
- __iter__ returns a table iterator (see below)
- all table iterators returned by __iter__ are independent, i.e., consuming items from one iterator will not affect any other iterators
A table iterator is an iterator which satisfies the following:
- each item returned by the iterator is a sequence (e.g., tuple or list)
- the first item returned by the iterator is a header row comprising a sequence of header values
- each subsequent item returned by the iterator is a data row comprising a sequence of data values
- a header value is typically a string (str) but may be an object of any type as long as it implements __str__ and is pickleable
- a data value is any pickleable object
So, for example, a list of lists is a valid table container:
>>> table = [['foo', 'bar'], ['a', 1], ['b', 2]]
Note that an object returned by the csv.reader()
function from the
standard Python csv
module is a table iterator and not a table
container, because it can only be iterated over once. However, it is
straightforward to define functions that support the table container convention
and provide access to data from CSV or other types of file or data source, see
e.g. the petl.io.csv.fromcsv()
function.
The main reason for requiring that table containers support independent
table iterators (point 3) is that data from a table may need to be
iterated over several times within the same program or interactive
session. E.g., when using petl
in an interactive session to build up
a sequence of data transformation steps, the user might want to
examine outputs from several intermediate steps, before all of the
steps are defined and the transformation is executed in full.
Note that this convention does not place any restrictions on the lengths of header and data rows. A table may contain a header row and/or data rows of varying lengths.
Extensions - integrating custom data sources¶
The petl.io
module has functions for extracting data from a number of
well-known data sources. However, it is also straightforward to write an
extension that enables integration with other data sources. For an object to
be usable as a petl
table it has to implement the table container
convention described above. Below is the source code for an
ArrayView
class which allows integration of petl
with numpy
arrays. This class is included within the petl.io.numpy
module but also provides an example of how other data sources might be
integrated:
>>> import petl as etl
>>> class ArrayView(etl.Table):
... def __init__(self, a):
... # assume that a is a numpy array
... self.a = a
... def __iter__(self):
... # yield the header row
... header = tuple(self.a.dtype.names)
... yield header
... # yield the data rows
... for row in self.a:
... yield tuple(row)
...
Now this class enables the use of numpy arrays with petl
functions,
e.g.:
>>> import numpy as np
>>> a = np.array([('apples', 1, 2.5),
... ('oranges', 3, 4.4),
... ('pears', 7, 0.1)],
... dtype='U8, i4,f4')
>>> t1 = ArrayView(a)
>>> t1
+-----------+----+-----------+
| f0 | f1 | f2 |
+===========+====+===========+
| 'apples' | 1 | 2.5 |
+-----------+----+-----------+
| 'oranges' | 3 | 4.4000001 |
+-----------+----+-----------+
| 'pears' | 7 | 0.1 |
+-----------+----+-----------+
>>> t2 = t1.cut('f0', 'f2').convert('f0', 'upper').addfield('f3', lambda row: row.f2 * 2)
>>> t2
+-----------+-----------+---------------------+
| f0 | f2 | f3 |
+===========+===========+=====================+
| 'APPLES' | 2.5 | 5.0 |
+-----------+-----------+---------------------+
| 'ORANGES' | 4.4000001 | 8.8000001907348633 |
+-----------+-----------+---------------------+
| 'PEARS' | 0.1 | 0.20000000298023224 |
+-----------+-----------+---------------------+
If you develop an extension for a data source that you think would also be useful for others, please feel free to submit a PR to the petl GitHub repository, or if it is a domain-specific data source, the petlx GitHub repository.
Caching¶
This package tries to make efficient use of memory by using iterators and lazy evaluation where possible. However, some transformations cannot be done without building data structures, either in memory or on disk.
An example is the petl.transform.sorts.sort()
function, which will either
sort a table entirely in memory, or will sort the table in memory in chunks,
writing chunks to disk and performing a final merge sort on the
chunks. Which strategy is used will depend on the arguments passed
into the petl.transform.sorts.sort()
function when it is called.
In either case, the sorting can take some time, and if the sorted data will be used more than once, it is undesirable to start again from scratch each time. It is better to cache the sorted data, if possible, so it can be re-used.
The petl.transform.sorts.sort()
function, and all functions which use
it internally, provide a cache keyword argument which can be used to
turn on or off the caching of sorted data.
There is also an explicit petl.util.materialise.cache()
function, which
can be used to cache in memory up to a configurable number of rows from any
table.


2.14. Lower Bounds for Sorting¶
2.14.1. Lower Bounds for Sorting¶
By now you have seen many analyses for algorithms. These analyses generally define the upper and lower bounds for algorithms in their worst and average cases. For many of the algorithms presented so far, analysis has been easy. This module considers a more difficult task: An analysis for the cost of a problem as opposed to an algorithm. The upper bound for a problem can be defined as the asymptotic cost of the fastest known algorithm. The lower bound defines the best possible cost for any algorithm that solves the problem, including algorithms not yet invented. Once the upper and lower bounds for the problem meet, we know that no future algorithm can possibly be (asymptotically) more efficient.
A simple estimate for a problem’s lower bound can be obtained by measuring the size of the input that must be read and the output that must be written. Certainly no algorithm can be more efficient than the problem’s I/O time. From this we see that the sorting problem cannot be solved by any algorithm in less than \(\Omega(n)\) time because it takes at least \(n\) steps to read and write the \(n\) values to be sorted. Alternatively, any sorting algorithm must at least look at every input value to recognize whether the input values are in sorted order. So, based on our current knowledge of sorting algorithms and the size of the input, we know that the problem of sorting is bounded by \(\Omega(n)\) and \(O(n \log n)\).
Computer scientists have spent much time devising efficient general-purpose sorting algorithms, but no one has ever found one that is faster than \(O(n \log n)\) in the worst or average cases. Should we keep searching for a faster sorting algorithm? Or can we prove that there is no faster sorting algorithm by finding a tighter lower bound?
This section presents one of the most important and most useful proofs in computer science: No sorting algorithm based on key comparisons can possibly be faster than \(\Omega(n \log n)\) in the worst case. This proof is important for three reasons. First, knowing that widely used sorting algorithms are asymptotically optimal is reassuring. In particular, it means that you need not bang your head against the wall searching for an \(O(n)\) sorting algorithm. (Or at least not one that is in any way based on key comparisons. But it is hard to imagine how to sort without any comparisons.) Second, this proof is one of the few non-trivial lower-bounds proofs that we have for any problem; that is, this proof provides one of the relatively few instances where our lower bound is tighter than simply measuring the size of the input and output. As such, it provides a useful model for proving lower bounds on other problems. Finally, knowing a lower bound for sorting gives us a lower bound in turn for other problems whose solution could be made to work as the basis for a sorting algorithm. The process of deriving asymptotic bounds for one problem from the asymptotic bounds of another is called a reduction.
All of the sorting algorithms we have studied make decisions based on the direct comparison of two key values. For example, Insertion Sort sequentially compares the value to be inserted into the sorted list until a comparison against the next value in the list fails.
The proof that any comparison sort requires \(\Omega(n \log n)\) comparisons in the worst case is structured as follows. First, comparison-based decisions can be modeled as the branches in a tree. This means that any sorting algorithm based on comparisons between records can be viewed as a binary tree whose nodes correspond to the comparisons, and whose branches correspond to the possible outcomes. Next, the minimum number of leaves in the resulting tree is shown to be the factorial of \(n\). Finally, the minimum depth of a tree with \(n!\) leaves is shown to be in \(\Omega(n \log n)\).
Before presenting the proof of an \(\Omega(n \log n)\) lower bound for sorting, we first must define the concept of a decision tree. A decision tree is a binary tree that can model the processing for any algorithm that makes binary decisions. Each (binary) decision is represented by a branch in the tree. For the purpose of modeling sorting algorithms, we count all comparisons of key values as decisions. If two keys are compared and the first is less than the second, then this is modeled as a left branch in the decision tree. In the case where the first value is greater than the second, the algorithm takes the right branch.
Here is a Visualization that illustrates decision trees and the sorting lower bound proof.
Any sorting algorithm requiring \(\Omega(n \log n)\) comparisons in the worst case requires \(\Omega(n \log n)\) running time in the worst case. Because any sorting algorithm requires \(\Omega(n \log n)\) running time, the problem of sorting also requires \(\Omega(n \log n)\) time. We already know of sorting algorithms with \(O(n \log n)\) running time, so we can conclude that the problem of sorting requires \(\Theta(n \log n)\) time. As a corollary, we know that no comparison-based sorting algorithm can improve on existing \(\Theta(n \log n)\) time sorting algorithms by more than a constant factor.
Here are some review questions to check that you understand this proof.


Bypassing CloudFlare
https://www.ericzhang.me/resolve-cloudflare-ip-leakage/
Brute force dictionaries
Bitquark
https://github.com/bitquark/dnspop
SecList
https://github.com/danielmiessler/SecLists/tree/master/Discovery/DNS


Default
Notify is comprised of a title and message icon. A close button can be optionally added.
Notification message!!!
Feb 15, 2013-12-24 02:24:19
Colors
For Notify, 4 colors are available.
Feb 15, 2013-12-24 02:24:19
Feb 15, 2013-12-24 02:24:19
Feb 15, 2013-12-24 02:24:19
Feb 15, 2013-12-24 02:24:19
Close & Icon
Notify can optionally use a close button and icon(s).
Notification message!!!
Feb 15, 2013-12-24 02:24:19
Notification message!!!
Feb 15, 2013-12-24 02:24:19


001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.commons.configuration2; 018 019import java.util.List; 020 021import org.apache.commons.configuration2.tree.ExpressionEngine; 022 023/** 024 *
 025 * An interface for immutable hierarchical configurations. 026 *
 027 *
 028 * There are some sources of configuration data that cannot be stored very well 029 * in a flat configuration object (like {@link BaseConfiguration}) because then 030 * their structure is lost. A prominent example are XML documents. 031 *
 032 *
 033 * This interface extends the basic {@link ImmutableConfiguration} interface by 034 * structured access to configuration properties. An {@link ExpressionEngine} is 035 * used to evaluate complex property keys and to map them to nodes of a 036 * tree-like structure. 037 *
 038 * 039 * @since 2.0 040 */ 041public interface ImmutableHierarchicalConfiguration extends ImmutableConfiguration 042{ 043 /** 044 * Returns the expression engine used by this configuration. This method 045 * will never return null; if no specific expression engine was set, 046 * the default expression engine will be returned. 047 * 048 * @return the current expression engine 049 */ 050 ExpressionEngine getExpressionEngine(); 051 052 /** 053 * Returns the maximum defined index for the given key. This is useful if 054 * there are multiple values for this key. They can then be addressed 055 * separately by specifying indices from 0 to the return value of this 056 * method. 057 * 058 * @param key the key to be checked 059 * @return the maximum defined index for this key 060 */ 061 int getMaxIndex(String key); 062 063 /** 064 * Returns the name of the root element of this configuration. This 065 * information may be of use in some cases, e.g. for sub configurations 066 * created using the {@code immutableConfigurationsAt()} method. The exact 067 * meaning of the string returned by this method is specific to a concrete 068 * implementation. For instance, an XML configuration might return the name 069 * of the document element. 070 * 071 * @return the name of the root element of this configuration 072 */ 073 String getRootElementName(); 074 075 /** 076 *
 077 * Returns an immutable hierarchical configuration object that wraps the 078 * configuration node specified by the given key. This method provides an 079 * easy means of accessing sub trees of a hierarchical configuration. In the 080 * returned configuration the sub tree can directly be accessed, it becomes 081 * the root node of this configuration. Because of this the passed in key 082 * must select exactly one configuration node; otherwise an 083 * {@code IllegalArgumentException} will be thrown. 084 *
 085 *
 086 * The difference between this method and the 087 * {@link #immutableSubset(String)} method is that 088 * {@code immutableSubset()} supports arbitrary subsets of configuration nodes 089 * while {@code immutableConfigurationAt()} only returns a single sub tree. 090 * Please refer to the documentation of the 091 * {@code SubnodeConfiguration} class to obtain further information 092 * about subnode configurations and when they should be used. 093 *
 094 * 095 * @param key the key that selects the sub tree 096 * @param supportUpdates a flag whether the returned subnode configuration 097 * should be able to handle updates of its parent 098 * @return a hierarchical configuration that contains this sub tree 099 */ 100 ImmutableHierarchicalConfiguration immutableConfigurationAt(String key, 101 boolean supportUpdates); 102 103 /** 104 * Returns an immutable hierarchical configuration for the node specified by 105 * the given key. This is a short form for {@code immutableConfigurationAt(key, 106 * false)}. 107 * 108 * @param key the key that selects the sub tree 109 * @return a hierarchical configuration that contains this sub tree 110 */ 111 ImmutableHierarchicalConfiguration immutableConfigurationAt(String key); 112 113 /** 114 * Returns a list of immutable configurations for all configuration nodes selected 115 * by the given key. This method will evaluate the passed in key (using the 116 * current {@code ExpressionEngine}) and then create an immutable subnode 117 * configuration for each returned node (like 118 * {@link #immutableConfigurationAt(String)}}). This is especially 119 * useful when dealing with list-like structures. As an example consider the 120 * configuration that contains data about database tables and their fields. 121 * If you need access to all fields of a certain table, you can simply do 122 * 123 *
 124 * List<ImmutableHierarchicalConfiguration> fields = 125 * config.immutableConfigurationsAt("tables.table(0).fields.field"); 126 * for(Iterator<ImmutableHierarchicalConfiguration> it = fields.iterator(); 127 * it.hasNext();) 128 * { 129 * ImmutableHierarchicalConfiguration sub = it.next(); 130 * // now the children and attributes of the field node can be 131 * // directly accessed 132 * String fieldName = sub.getString("name"); 133 * String fieldType = sub.getString("type"); 134 * ... 135 *
 136 * 137 * @param key the key for selecting the desired nodes 138 * @return a list with immutable hierarchical configuration objects; each 139 * configuration represents one of the nodes selected by the passed in key 140 */ 141 List<ImmutableHierarchicalConfiguration> immutableConfigurationsAt(String key); 142 143 /** 144 * Returns a list of immutable configurations for all direct child elements 145 * of the node selected by the given key. With this method it is possible to 146 * inspect the content of a hierarchical structure; all children of a given 147 * node can be queried without having to know their exact names. If the 148 * passed in key does not point to a single node, an empty list is returned. 149 * This is also the result if the node referred to by the key does not have 150 * child elements. 151 * 152 * @param key the key for selecting the desired parent node 153 * @return a collection with immutable configurations for all child nodes of 154 * the selected parent node 155 */ 156 List<ImmutableHierarchicalConfiguration> immutableChildConfigurationsAt( 157 String key); 158}


fileutil - Procedures implementing some file utilities
This package provides implementations of standard unix utilities.
This command performs purely lexical normalization on the path and returns the changed path as its result. Symbolic links in the path are not resolved.
Examples:
fileutil::lexnormalize /foo/./bar => /foo/bar fileutil::lexnormalize /foo/../bar => /bar
This command resolves all symbolic links in the path and returns the changed path as its result. In contrast to the builtin file normalize this command resolves a symbolic link in the last element of the path as well.
A command for the testing of several properties of a path. The properties to test for are specified in codes, either as a list of keywords describing the properties, or as a string where each letter is a shorthand for a property to test. The recognized keywords, shorthands, and associated properties are shown in the list below. The tests are executed in the order given to the command.
The result of the command is a boolean value. It will be true if and only if the path passes all the specified tests. In the case of the path not passing one or more test the first failing test will leave a message in the variable referenced by msgvar, if such is specified. The message will be prefixed with label, if it is specified. Note that the variabled referenced by msgvar is not touched at all if all the tests pass.
file readable
file writable
file exists
file executable
file isfile
file isdirectory
A tcl implementation of the UNIX cat command. Returns the contents of the specified file(s). The arguments are files to read, with interspersed options configuring the process. If there are problems reading any of the files, an error will occur, and no data will be returned.
The options accepted are -encoding, -translation, -eofchar, and --. With the exception of the last all options take a single value as argument, as specified by the tcl builtin command fconfigure. The -- has to be used to terminate option processing before a file if that file's name begins with a dash.
Each file can have its own set of options coming before it, and for anything not specified directly the defaults are inherited from the options of the previous file. The first file inherits the system default for unspecified options.
The command replaces the current contents of the specified file with data, with the process configured by the options. The command accepts the same options as ::fileutil::cat. The specification of a non-existent file is legal and causes the command to create the file (and all required but missing directories).
This command is like ::fileutil::writeFile, except that the previous contents of file are not replaced, but appended to. The command accepts the same options as ::fileutil::cat
This comment is similar to ::fileutil::appendToFile, except that the new data is not appended at the end, but inserted at a specified location within the file. In further contrast this command has to be given the path to an existing file. It will not create a missing file, but throw an error instead.
The specified location at has to be an integer number in the range 0 ... [file size file]. 0 will cause insertion of the new data before the first character of the existing content, whereas [file size file] causes insertion after the last character of the existing content, i.e. appending.
The command accepts the same options as ::fileutil::cat.
This command is the complement to ::fileutil::insertIntoFile, removing n characters from the file, starting at location at. The specified location at has to be an integer number in the range 0 ... [file size file] - n. 0 will cause the removal of the new data to start with the first character of the existing content, whereas [file size file] - n causes the removal of the tail of the existing content, i.e. the truncation of the file.
The command accepts the same options as ::fileutil::cat.
This command is a combination of ::fileutil::removeFromFile and ::fileutil::insertIntoFile. It first removes the part of the contents specified by the arguments at and n, and then inserts data at the given location, effectively replacing the removed by content with data. All constraints imposed on at and n by ::fileutil::removeFromFile and ::fileutil::insertIntoFile are obeyed.
The command accepts the same options as ::fileutil::cat.
This command can be seen as the generic core functionality of ::fileutil::replaceInFile. It first reads the contents of the specified file, then runs the command prefix cmd with that data appended to it, and at last writes the result of that invokation back as the new contents of the file.
If the executed command throws an error the file is not changed.
The command accepts the same options as ::fileutil::cat.
An implementation of the UNIX file command, which uses various heuristics to guess the type of a file. Returns a list specifying as much type information as can be determined about the file, from most general (eg, "binary" or "text") to most specific (eg, "gif"). For example, the return value for a GIF file would be "binary graphic gif". The command will detect the following types of files: directory, empty, binary, text, script (with interpreter), executable elf, executable dos, executable ne, executable pe, graphic gif, graphic jpeg, graphic png, graphic tiff, graphic bitmap, html, xml (with doctype if available), message pgp, binary pdf, text ps, text eps, binary gravity_wave_data_frame, compressed bzip, compressed gzip, compressed zip, compressed tar, audio wave, audio mpeg, and link. It further detects doctools, doctoc, and docidx documentation files, and tklib diagrams.
An implementation of the unix command find. Adapted from the Tcler's Wiki. Takes at most two arguments, the path to the directory to start searching from and a command to use to evaluate interest in each file. The path defaults to ".", i.e. the current directory. The command defaults to the empty string, which means that all files are of interest. The command takes care not to lose itself in infinite loops upon encountering circular link structures. The result of the command is a list containing the paths to the interesting files.
The filtercmd, if specified, is interpreted as a command prefix and one argument is added to it, the name of the file or directory find is currently looking at. Note that this name is not fully qualified. It has to be joined it with the result of pwd to get an absolute filename.
The result of filtercmd is a boolean value that indicates if the current file should be included in the list of interesting files.
Example:
# find .tcl files package require fileutil proc is_tcl {name} {return [string match *.tcl $name]} set tcl_files [fileutil::find . is_tcl]
This command is based upon the TclX command recursive_glob, except that it doesn't allow recursion over more than one directory at a time. It uses ::fileutil::find internally and is thus able to and does follow symbolic links, something the TclX command does not do. First argument is the directory to start the search in, second argument is a list of patterns. The command returns a list of all files reachable through basedir whose names match at least one of the patterns. The options before the pattern-list determine the style of matching, either regexp or glob. glob-style matching is the default if no options are given. Usage of the option -- stops option processing. This allows the use of a leading '-' in the patterns.
The command reads the file filename and executes the script cmd for every line in the file. During the execution of the script the variable var is set to the contents of the current line. The return value of this command is the result of the last invocation of the script cmd or the empty string if the file was empty.
Implementation of grep. Adapted from the Tcler's Wiki. The first argument defines the pattern to search for. This is followed by a list of files to search through. The list is optional and stdin will be used if it is missing. The result of the procedures is a list containing the matches. Each match is a single element of the list and contains filename, number and contents of the matching line, separated by a colons.
The install command is similar in functionality to the install command found on many unix systems, or the shell script distributed with many source distributions (unix/install-sh in the Tcl sources, for example). It copies source, which can be either a file or directory to destination, which should be a directory, unless source is also a single file. The ?-m? option lets the user specify a unix-style mode (either octal or symbolic - see file attributes.
Removes the first n elements from the specified path and returns the modified path. If n is greater than the number of components in path an empty string is returned. The number of components in a given path may be determined by performing llength on the list returned by file split.
If, and only if the path is inside of the directory returned by [pwd] (or the current working directory itself) it is made relative to that directory. In other words, the current working directory is stripped from the path. The possibly modified path is returned as the result of the command. If the current working directory itself was specified for path the result is the string ".".
If, and only of the path is inside of the directory "prefix" (or the prefix directory itself) it is made relative to that directory. In other words, the prefix directory is stripped from the path. The possibly modified path is returned as the result of the command. If the prefix directory itself was specified for path the result is the string ".".
This command ensures that the path is not escaping the directory jail. It always returns an absolute path derived from path which is within jail.
If path is an absolute path and already within jail it is returned unmodified.
An absolute path outside of jail is stripped of its root element and then put into the jail by prefixing it with it. The same happens if path is relative, except that nothing is stripped of it. Before adding the jail prefix the path is lexically normalized to prevent the caller from using .. segments in path to escape the jail.
Implementation of touch. Alter the atime and mtime of the specified files. If -c, do not create files if they do not already exist. If -r, use the atime and mtime from ref_file. If -t, use the integer clock value time. It is illegal to specify both -r and -t. If -a, only change the atime. If -m, only change the mtime.
This command is not available for Tcl versions less than 8.3.
The command returns the path of a directory where the caller can place temporary files, such as "/tmp" on Unix systems. The algorithm we use to find the correct directory is as follows:
The directory set by an invokation of ::fileutil::tempdir with an argument. If this is present it is tried exclusively and none of the following item are tried.
The directory named in the TMPDIR environment variable.
The directory named in the TEMP environment variable.
The directory named in the TMP environment variable.
A platform specific location:
"C:\TEMP", "C:\TMP", "\TEMP", and "\TMP" are tried in that order.
The TRASH_FOLDER environment variable is used. This is most likely not correct.
The directories "/tmp", "/var/tmp", and "/usr/tmp" are tried in that order.
The algorithm utilized is mainly that used in the Python standard library. The exception is the first item, the ability to have the search overridden by a user-specified directory.
In this mode the command sets the path as the first and only directory to try as a temp. directory. See the previous item for the use of the set directory. The command returns the empty string.
Invoking this command clears the information set by the last call of [::fileutil::tempdir path]. See the last item too.
The command generates a temporary file name suitable for writing to, and the associated file. The file name will be unique, and the file will be writable and contained in the appropriate system specific temp directory. The name of the file will be returned as the result of the command.
The code was taken from http://wiki.tcl.tk/772, attributed to Igor Volobouev and anon.
The command generates a temporary directory suitable for writing to. The directory name will be unique, and the directory will be writable and contained in the appropriate system specific temp directory. The name of the directory will be returned as the result of the command.
The three options can used to tweak the behaviour of the command:
The initial code for this was supplied by Miguel Martinez Lopez.
This command takes two directory paths, both either absolute or relative and computes the path of dst relative to base. This relative path is returned as the result of the command. As implied in the previous sentence, the command is not able to compute this relationship between the arguments if one of the paths is absolute and the other relative.
Note: The processing done by this command is purely lexical. Symbolic links are not taken into account.
This command takes two file paths, both either absolute or relative and computes the path of dst relative to base, as seen from inside of the base. This is the algorithm how a browser resolves a relative link found in the currently shown file.
The computed relative path is returned as the result of the command. As implied in the previous sentence, the command is not able to compute this relationship between the arguments if one of the paths is absolute and the other relative.
Note: The processing done by this command is purely lexical. Symbolic links are not taken into account.
In this version fileutil::find's broken system for handling symlinks was replaced with one working correctly and properly enumerating all the legal non-cyclic paths under a base directory.
While correct this means that certain pathological directory hierarchies with cross-linked sym-links will now take about O(n**2) time to enumerate whereas the original broken code managed O(n) due to its brokenness.
A concrete example and extreme case is the "/sys" hierarchy under Linux where some hundred devices exist under both "/sys/devices" and "/sys/class" with the two sub-hierarchies linking to the other, generating millions of legal paths to enumerate. The structure, reduced to three devices, roughly looks like
/sys/class/tty/tty0 --> ../../dev/tty0 /sys/class/tty/tty1 --> ../../dev/tty1 /sys/class/tty/tty2 --> ../../dev/tty1 /sys/dev/tty0/bus /sys/dev/tty0/subsystem --> ../../class/tty /sys/dev/tty1/bus /sys/dev/tty1/subsystem --> ../../class/tty /sys/dev/tty2/bus /sys/dev/tty2/subsystem --> ../../class/tty
The command fileutil::find currently has no way to escape this. When having to handle such a pathological hierarchy It is recommended to switch to package fileutil::traverse and the same-named command it provides, and then use the -prefilter option to prevent the traverser from following symbolic links, like so:
package require fileutil::traverse proc NoLinks {fileName} { if {[string equal [file type $fileName] link]} { return 0 } return 1 } fileutil::traverse T /sys/devices -prefilter NoLinks T foreach p { puts $p } T destroy
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category fileutil of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.
Programming tools


Installation
The following steps are here to help you initialize your new website. If you don’t know Hugo at all, we strongly suggest you to train by following this great documentation for beginners.
インストール
We assume that all changes to Hugo content and customizations are going to be tracked by git (GitHub, Bitbucket etc.). Develop locally, build on remote system.
Before start real work:
- Initialize Hugo
- Install DocDock theme
- Configure DocDock and Hugo
Prepare empty Hugo site
Create empty directory, which will be root of your Hugo project. Navigate there and let Hugo to create minimal required directory structure:
$ hugo new site .
AFTER that, initialize this as git directory where to track further changes
$ git init
Next, there are at least three ways to install DocDock (first recommended):
- As git submodule
- As git clone
- As direct copy (from ZIP)
Navigate to your themes folder in your Hugo site and use perform one of following scenarios.
1. Install DocDock as git submodule
DocDock will be added like a dependency repo to original project. When using CI tools like Netlify, Jenkins etc., submodule method is required, or you will get theme not found
issues. Same applies when building site on remote server trough SSH.
If submodule is no-go, use 3rd option.
On your root of Hugo execute:
$ git submodule add https://github.com/vjeantet/hugo-theme-docdock.git themes/docdock
Next initialize submodule for parent git repo:
$ git submodule init
$ git submodule update
Now you are ready to add content and customize looks. Do not change any file inside theme directory.
If you want to freeze changes to DocDock theme itself and use still submodules, fork private copy of DocDock and use that as submodule. When you are ready to update theme, just pull changes from origin to your private fork.
2. Install DocDock simply as git clone
This method results that files are checked out locally, but won’t be visible from parent git repo. Probably you will build site locally with hugo
command and use result from public/
on your own.
$ git clone https://github.com/vjeantet/hugo-theme-docdock.git themes/docdock
3. Install DocDock from ZIP
All files from theme will be tracked inside parent repo, to update it, have to override files in theme.
download following zip and extract inside themes/
.
https://github.com/vjeantet/hugo-theme-docdock/archive/master.zip
Name of theme in next step will be hugo-theme-docdock-master
, can rename as you wish.


Demonstrate failure of MLE for GMMs in high-D case, whereas MAP works
PMKTauthor Hannes Bretschneider PMTKmodified Matt Dunham
Contents
Create data
setSeed(0); trialsPerDeg = 10; N = 100; K = 3; dims = [3:2:13, 15:5:50];
Don't display these warnings, we are expecting them.
wstate = warning('query', 'all'); warning('off', 'MATLAB:nearlySingularMatrix'); warning('off', 'logdet:posdef'); warning('off', 'MATLAB:illConditionedMatrix'); warning('off', 'convergenceTest:fvalDecrease'); warning('off', 'MATLAB:singularMatrix');
Consider these warnings, full errrors
errorSet = { 'logdet:posdef' 'convergenceTest:fvalDecrease' 'MATLAB:singularMatrix' };
NmleFail = zeros(length(dims), 1); NmapFail = zeros(length(dims), 1); for dimi = 1:length(dims) D = dims(dimi); NmleFail(dimi) = 0; NmapFail(dimi) = 0; Sigma = zeros(D,D,K); for seedi=1:trialsPerDeg
mu = [-1 1 zeros(1,D-2); 1 -1 zeros(1,D-2); 3 -1 zeros(1,D-2)]'; Sigma(:,:,1) = [1 -.7 zeros(1,D-2); -.7 1 zeros(1,D-2);... zeros(D-2,2) eye(D-2)]; Sigma(:,:,2) = [1 .7 zeros(1,D-2); .7 1 zeros(1,D-2);... zeros(D-2,2) eye(D-2)]; Sigma(:,:,3) = [1 .9 zeros(1,D-2); .9 1 zeros(1,D-2);... zeros(D-2,2) eye(D-2)]; X = NaN(N, D, K); for c=1:K R = chol(Sigma(:,:,c)); X(:,:,c) = repmat(mu(:,c)', N, 1) + randn(N, D) * R; end X = [X(:,:,1); X(:,:,2)]; mu0 = rand(D,K); mixweight = normalize(ones(K,1)); initParams.mu = mu0; initParams.Sigma = Sigma; initParams.mixWeight = mixweight;
Fit
try lastwarn(''); [modelGMM, loglikHistGMM] = mixModelFit(X, K, 'gauss',... 'initParams', initParams, 'prior', 'none', 'mixPrior', 'none'); [msg, id] = lastwarn(); if ~isempty(msg) && ismember(id, errorClass) error('warning caught'); end catch %#ok fprintf('MLE failed\n'); NmleFail(dimi) = NmleFail(dimi) + 1; end try lastwarn(''); prior = makeGaussInvWishartDataDependentPrior(X, K); [modelGMMMAP, loglikHistGMMMAP] = mixModelFit(X, K, 'gauss',... 'initParams', initParams, 'prior', prior); [msg, id] = lastwarn(); if ~isempty(msg) && ismember(id, errorClass) error('warning caught'); end catch %#ok fprintf('MAP failed\n'); NmapFail(dimi) = NmapFail(dimi) + 1; end
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed MAP failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
MLE failed
end ntrials = trialsPerDeg; fprintf('Out of %d trials (with N=%d, D=%d), MLE failed %d times, MAP failed %d times\n', ... ntrials, N, D, NmleFail(dimi), NmapFail(dimi)) end
Out of 10 trials (with N=100, D=3), MLE failed 0 times, MAP failed 0 times Out of 10 trials (with N=100, D=5), MLE failed 0 times, MAP failed 0 times Out of 10 trials (with N=100, D=7), MLE failed 0 times, MAP failed 0 times Out of 10 trials (with N=100, D=9), MLE failed 1 times, MAP failed 0 times Out of 10 trials (with N=100, D=11), MLE failed 0 times, MAP failed 0 times Out of 10 trials (with N=100, D=13), MLE failed 1 times, MAP failed 0 times Out of 10 trials (with N=100, D=15), MLE failed 0 times, MAP failed 0 times Out of 10 trials (with N=100, D=20), MLE failed 1 times, MAP failed 0 times Out of 10 trials (with N=100, D=25), MLE failed 5 times, MAP failed 0 times Out of 10 trials (with N=100, D=30), MLE failed 6 times, MAP failed 0 times Out of 10 trials (with N=100, D=35), MLE failed 7 times, MAP failed 0 times Out of 10 trials (with N=100, D=40), MLE failed 10 times, MAP failed 0 times Out of 10 trials (with N=100, D=45), MLE failed 10 times, MAP failed 0 times Out of 10 trials (with N=100, D=50), MLE failed 10 times, MAP failed 1 times
Plot
figure; hold on plot(dims, NmleFail/ntrials, 'r-o', 'linewidth', 2); plot(dims, NmapFail/ntrials, 'k:s', 'linewidth', 2); legend('MLE', 'MAP', 'location', 'east') title('fraction of times EM for GMM fails vs dimensionality') axis_pct printPmtkFigure('mixGaussMLvsMAP') warning(wstate); % Restore warning state


Created by Dmitry Televich
is an open-source JavaScript library which is used for building user interfaces specifically for single page applications. It’s used for handling view layer for web and mobile apps.
Components are self-contained reusable building blocks of web application. React components are basically just idempotent functions.
PROPS are inputs to a REACT COMPONENT. They are data passed down from a parent component to a child component. Remember that PROPS are readonly. They should not be modified in any way. If you need to modify some value in response to user input or a network response, use stateinstead.
A component needs STATE when some data associated with it changes over time. For example, a Checkbox component might need isChecked in its state, and a NewsFeed component might want to keep track of fetchedPosts in its state. The most important difference between state and props is that props are passed from a parent component, but state is managed by the component itself. A component cannot change its props, but it can change its STATE.
JSX is an XML / HTML syntax that is used to render HTML from JavaScript code. React converts JSX into native JavaScript for the browser, and with the help of the tools provided, you can convert the HTML code of existing sites to JSX. JSX makes it easy to write code, because it is very similar to writing familiar HTML, but only from within JavaScript. Combined with Node, this provides a very consistent workflow. JSX is not required to use React - you can simply use simple JS, so I highly recommend its use.
ReactJS is fast-developing open-source JavaScript library. With the help of it you can easily and quickly build a single-page apps (both web and mobile).


Career Launch 🚀
How to Build Your Resume and Use Linkedin to Launch Your Career
Created by EzzEddin Abdullah
Content
- How to Build Your Resume
- How to Use Linkedin Professionally
- How I Landed a Full-time Job without a CS Degree
Content
- How to Build Your Resume
- How to Use Linkedin Professionally
- How I Landed a Full-time Job without a CS Degree
Where to start
- Work experience (dates, names of employers, location, tasks, accomplishments)
- Education (dates, degree(s) obtained, location)
- Specific skills
- Honors and awards
- Other activities of note (professional organizations, student activities, etc.)
Start Now
Modify a template from
Overleaf and make your own resume
Content
- How to Build Your Resume
- How to Use Linkedin Professionally
- How I Landed a Full-time Job without a CS Degree
Why is Linkedin Important for Your Career?
Google your name
Tips to Boost Your Presence on Linkedin
Demo on my profile
- Reach All-Star Status
- Focus on keywords when you build your profile
- Don't treat it like Twitter or Facebook
Content
- How to Build Your Resume
- How to Use Linkedin Professionally
- How I Landed a Full-time Job without a CS Degree
Tips I did and worked
- Treat your job search as a job
- Keep learning while applying
- Build a portfolio
- Build an end-to-end project
Classicle
A Natural Language Processing project to classify articles into five classes:
business
entertainment
politics
sport
tech
It is read like classical
and it is a blend of classify
and article.


Android Development with VirtualBox and the LG P500 phone
Having recently acquired my first smart-phone (a new LG P500 Android phone) I decided it was time to learn some Android programming. This post summarizes my trials and tribulations getting the LG P500 phone to talk to my Android Eclipse development environment (Eclipse plus Android SDK running on a VirtualBox Linux guest).
Preliminaries
Development environment:
- Xubuntu 10.04 (VirtualBox 3.2.10 guest running in a Windows Vista x64 host).
- An LG P500 Optimus phone running Android 2.2 (USB connection to host PC).
- Eclipse 3.6.1 (with OpenJDK Java runtime).
- Android SDK version 8.
Important: Do not install the LG USB driver (LG United Mobile Driver) on the Windows host, if you’ve already downloaded and installed it you should uninstall it (from the Windows Control Panel). The reason being that the LG driver interferes with the USB passthrough to the guest – it crashes the guest with a “The VirtualBox user interface has stopped working” message when you try to manually acquire the phone USB port on the guest.
If you had previously installed the Windows LG USB drive on the host then you will lose host USB mass storage functionality when you uninstall it (my experience on Vista x64) – but, oddly, if you never install the LG driver then host USB mass storage is retained. The default mass storage functionality seems to be removed by the process of installing then uninstalling the LG driver. Guest USB mass storage functionality is not affected.
Configuring the USB phone device on the VirtualBox guest
Configure the VirtualBox guest USB filter as explained here. The phone’s USB filter will appear as LG Electronics Inc. LG Android USB Device [0226].
Start the VirtualBox guest.
Create a guest udev rules file /etc/udev/rules.d/51-android.rules for the USB device. The purpose of the rule is simple: it sets the USB device mode to 0666 so that all users have read/write access (via the Android Debug Bridge).
$ sudo vim /etc/udev/rules.d/51-android.rules $ sudo chmod a+r /etc/udev/rules.d/51-android.rules $ sudo udevadm control --reload-rules # In theory not necessary.
My rules file contains a single line:
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
Warning: Be careful cutting and pasting udev rules containing double quote characters: if there are opening and closing double quotation marks instead of the normal keyboard straight double quote character then the rule will fail (it’s not unusual for some websites to translate straight quotes contained in user submissions). I fell for this one and spent ages trying to figure out what was wrong.
This post contains a very good explanation of the udev rules.
Before plugging the phone in enable the phone’s debug option (Settings->Applications->Development->USB Debugging). If this is not enabled the Android Debugging Bridge will not recognize the phone (the phone will not be listed when you run the adb devices command).
Plug in the phone.
Manually acquire the LG USB device using the VirtualBox guest menu command: Devices->USB Devices->LG Electronics Inc. LG Android USB Device [0226] (not all host USB ports are able to be auto-acquired by VirtualBox guests).
You should now be able to see the phone’s USB port from the VirtualBox guest:
$ lsusb Bus 002 Device 004: ID 1004:61c5 LG Electronics, Inc.
The Android Debug Bridge should also be able to see the phone:
$ adb devices List of devices attached 80A354043044540021 device
If the phone’s debug mode is off or an Android debug device is not detected the device list will be blank:
$ adb devices
List of devices attached
If you did not configure the udev rules file correctly the USB device file’s mode will be 0664 instead of 0666 and you will get the following no permissions error:
$ adb devices
List of devices attached
???????????? no permissions
- Finally, run your Android application from Eclipse, you should be prompted with an Android Device Chooser dialog that includes your Android phone device (identified by the phone’s serial number).
Mounting the phone’s USB drive on the VirtualBox guest
It’s important to realize that there are actually two mutually exclusive USB drivers: one for USB storage, the other (a USB serial interface) for debugging. The debug driver is activated when the phone is in debug mode. The phone’s USB mass storage device is not available when the phone is in debug mode. To access the phone’s USB drive from the VirtualBox guest:
Unplug the phone.
Disable the phone’s debug option (Settings->Applications->Development->USB Debugging).
Plug in the phone.
When the phone prompts you Turn on USB storage.
Manually acquire the LG USB device from the VirtualBox guest menu (Devices->USB Devices->LG Electronics Inc. LG Android USB Device [0226]).
Mount the USB storage device from the VirtualBox guest e.g.
$ sudo mount /dev/sdb1 /mnt/
Unmount it when you’ve finished e.g.
$ sudo umount /mnt/
Tip: You can use fdisk to determine the drive name e.g.
$ sudo fdisk -l | grep FAT32
/dev/sdb1 5 19270 16182272 c W95 FAT32 (LBA)
Note: On the Xubuntu 10.04 guest I had to disable the Thunar file manager’s volume management (in Edit->Preferences->Advanced uncheck the Enable volume Management option). If this was not done Thunar would spontaneously close while scanning the auto-mounted drive.
To reinstall the LG phone driver on the Windows host
Here’s what to do if you ever need to (re)install the Windows host USB phone driver. This will reinstate host USB functionality but you will lose guest USB functionality.
- Visit the LG Mobile Phone Support page and install the LG Mobile Support Tool.
- Run the LGMobile Support Tool.
- Click on Install USB Driver to install the driver for your LG phone.
To stop the LGMobile Support Tool running in the Icon Tray:
- Right-click on Icon Tray icon and select Option.
- Uncheck Autostart on Windows booting and press OK.


Installed
Downloadable
Settings
Play Risk of Rain 2
Add Local Mod
Associate 'Install with Mod Manager' button
Refresh Mods
Export Profile
Import Profile
Disable All Mods
Enable All Mods
Remove All Installed Mods


Attainment characteristics team
Email<EMAIL_ADDRESS>Telephone: Jenny Easby 0207 783 8457
National Statistics
Pupil attainment at state-funded schools in the 2011 to 2012 academic year.
Ref: SFR04/2013 PDF , 397KB , 16 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
MS Excel Spreadsheet , 4.99MB
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
MS Excel Spreadsheet , 2.64MB
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
ZIP , 144KB
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
Plain text , 3.53KB
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
GCSE and equivalent attainment for pupils attending state-funded schools in England. Data is broken down by different pupil characteristics, specifically:
Email<EMAIL_ADDRESS>Telephone: Jenny Easby 0207 783 8457
Published: 24 January 2013
From: Department for Education
Part of: Statistics: GCSEs (key stage 4)