Create new thread to perform the progress:
http://stackoverflow.com/questions/6783194/background-thread-with-qthread-in-pyqt
Try to keep a reference:
http://stackoverflow.com/questions/8359469/python-threading-thread-scopes-and-garbage-collection
Use single to update progress:
http://stackoverflow.com/questions/9682376/progress-bar-with-pyqt
Example: UploadThread:
class UploadTaskQtThread(QtCore.QThread): tick = QtCore.pyqtSignal(int, name="upload_changed") def __init__(self, client, local_path, remote_path): QtCore.QThread.__init__(self) self.client = client self.local_path = local_path self.remote_path = remote_path def on_progress(self, progress): self.tick.emit(progress * 100) def run(self): self.client.upload_file(self.local_path, self.remote_path, self.on_progress)
Client:
def upload(self, local_file_path, remote_path): self.upload_thread = UploadTaskQtThread(client, local_file_path, remote_path) self.upload_thread.start() self.upload_thread.tick.connect(ui.progressBar.setValue)
Lifecycle
There are same built-in build lifecycles: default, clean and site. The default lifecycle handles your project deployment, the clean lifecycle handles project cleaning, while the site lifecycle handles the creation of your project’s site documentation.
the default lifecycle includes many phases, e.g: validate, initialize…compile, test, package, integration-test, verify, install and deploy. check Maven 3 components.xml;
If you run one phase, e.g. install, it will execute not only that phase (install), but also every phase prior to the install phase;
Phases
A Build Phase is Made Up of Plugin Goals;
for maven 3.1, compile phase is using: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile; get more details from default-bindings.xml
Plugin Goal
A plugin may have one or more goals wherein each goal represents a capability of that plugin.
plugins can contain information that indicates which lifecycle phase to bind a goal to. Note that adding the plugin on its own is not enough information – you must also specify the goals you want to run as part of your build. A plugin goal may be bound to zero or more build phases. A goal not bound to any build phase could be executed outside of the build lifecycle by direct invocation.
pom configuration examples:
maven compile: http://maven.apache.org/plugins/maven-compiler-plugin/usage.html
maven javadoc: http://maven.apache.org/plugins/maven-javadoc-plugin/usage.html
Bug with Jetty 9.2.5?
Tried Jetty jetty-distribution-9.2.5.v20141112 but got this Error when configuring the jetty server:
”start.d\http.ini not found”;
cannot find jetty.base when starting the sever:
WARNING: Missing Required File: ${jetty.base}\lib\alpn\alpn-boot-8.1.0.v20141016.jar
Use Jetty 8?
works fine with Jetty 8.
Requirement: create a GridView using LINQ and List;
Code:
Set DataSource:
GridViewUsers.DataSource = userManager.GetDataSource();
GridViewUsers.DataBind();
UserManager:
private List<User> users = new List<User>();
public List<User> GetDataSource() {
var query =
from user in users
select user;
return query.ToList();
}
Requirement:
As a (junior) Excel user, I want to compare two columns and change the background colour for the cells which is not consistent.
Steps:
1. Create New Rule:
you may select the B2, and click Conditional Formatting > New Rule:
Configure the formula and the format.
2. Apply the the rule:
You may right click the ‘+’and then drug, select the ‘Fill formatting Only’ when drop.
Or you can use Conditional Formatting > Manage Rules:
to change the “Applies to…” and then “Apply”
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.