This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/usr/local/lib/python2.7/site-packages/_pytest/config.py", line 543, in importconftest | |
mod = conftestpath.pyimport() | |
File "/usr/local/lib/python2.7/site-packages/py/_path/local.py", line 641, in pyimport | |
__import__(modname) | |
File "/Users/spg/qutebrowser/tests/conftest.py", line 32, in <module> | |
import helpers.stubs as stubsmod | |
ImportError: No module named stubs | |
ERROR: could not load /Users/spg/qutebrowser/tests/conftest.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gevent.monkey | |
gevent.monkey.patch_all() | |
import gevent.pool | |
def raiseifmod3(n): | |
if n % 3 == 0: | |
print n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM phusion/baseimage:0.9.16 | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
libreadline-gplv2-dev \ | |
libncursesw5-dev \ | |
libssl-dev \ | |
libsqlite3-dev \ | |
tk-dev libgdbm-dev \ | |
libc6-dev libbz2-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MyActionHandler throws an exception. Note that we're throwing a custom exception | |
public class MyActionHandler extends AbstractAction<MyAction, MyActionResult> { | |
@Override | |
public MyActionResult execute(MyAction action, ExecutionContext context) throws ActionException { | |
if (somethingGoesWrong()) { | |
throw new MyCustomException("This is my custom message"); | |
} | |
// everything ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enable the new Super dev mode. | |
Guys I'm using locally for one week now, the snapshot of GWT 2.7.0 in my projects. This (nightly) snapshot contains the new development improving the super dev mode. The super dev mode now does a compilation "per file" and each time you hint the button compile, it recompiles only the modified files if any. So you need less than 1 or 2 seconds to recompile the application!!! (the first compilation takes the same time than before) | |
And in the near future, you won't have to click on the compile button, the super dev mode will recompile your application on the fly. | |
To enable it, modify your maven pom files: | |
- use this version of GWT | |
<gwt.version>2.7.0-SNAPSHOT</gwt.version> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ChosenOptions chosenOptions = new ChosenOptions().setNoResultsText("No results"); | |
final ChosenListBox chosenListBox = new ChosenListBox(false, chosenOptions); | |
chosenListBox.setWidth("300px"); | |
chosenListBox.addAttachHandler(new AttachEvent.Handler() { | |
@Override | |
public void onAttachOrDetach(AttachEvent event) { | |
if (event.isAttached()) { | |
$("input", container).keyup(new Function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.inject.Inject; | |
import com.escribehost.charts.client.application.widget.DrugInteractionDto; | |
import com.google.gwt.core.client.GWT; | |
import com.google.gwt.dom.client.DivElement; | |
import com.google.gwt.dom.client.LabelElement; | |
import com.google.gwt.editor.client.Editor; | |
import com.google.gwt.editor.client.SimpleBeanEditorDriver; | |
import com.google.gwt.uibinder.client.UiBinder; | |
import com.google.gwt.uibinder.client.UiField; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A) | |
@Inject | |
HomePresenter(EventBus eventBus, | |
MyView view, | |
MyProxy proxy, | |
MedsPresenter medsPresenter) { | |
super(eventBus, view, proxy, ChartsPresenter.SLOT_CHARTS_MODULE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ClassLoader classLoader = HttpRequestBase.class.getClassLoader(); | |
System.out.println(classLoader.getResource("org/apache/http/client/methods/HttpRequestBase.class")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<String> DAYS = Arrays.asList("Sunday", "Monday", | |
"Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); | |
TextCell textCell = new TextCell(); | |
// Create a CellList that uses the cell. | |
CellList<String> cellList = new CellList<String>(textCell); | |
// Set the total row count. This isn't strictly necessary, but it affects | |
// paging calculations, so its good habit to keep the row count up to date. | |
cellList.setRowCount(DAYS.size(), true); |