Skip to content

Instantly share code, notes, and snippets.

@ailabs-software
ailabs-software / gist:220b92f9035e49ac0bef
Created January 6, 2015 16:34
Trying to create a listener I can pass to the worker.
func startWorker() {
cmd := exec.Command("myworker");
f, err := os.Create("/tmp/worker7.sock");
if (err != nil) { panic(err); }
_, file_err := net.FileListener(f); // ERROR: getsockopt: socket operation on non-socket
if (file_err != nil) { panic(file_err); }
cmd.ExtraFiles = []*os.File{ f };
}
@ailabs-software
ailabs-software / gist:9abb5fd75fdc010e9a92
Created January 8, 2015 23:31
Why is CellIdentifier set on struct not seen after return? Am I passing my value?
type LayoutCell struct
{
CellIdentifier string;
CellWidth int;
Widget_name string;
Widget_state *interface{};
}
type LayoutRow struct // CellGroup
@ailabs-software
ailabs-software / goog_
Created December 20, 2016 06:09
Events and life cycle
package com.google.gwt.sample.contentcentral.client;
import com.google.gwt.core.client.EntryPoint;
// package disposable;
/** Interface for an object which observes when we have been disposed */
interface IDisposeCallback
{
void disposeCallback();
var existingOrders = Orders.find();
var openOrderIds = [];
var itemsOrdered = [];
existingOrders.forEach(function(order) {
if (order.isOpen && !order.isAcceptingMoreItems) {
openOrderIds.push(order);
var anyOpenOrder = false;
@ailabs-software
ailabs-software / gist:3b86a9719fc698497a4b9445ac3394d4
Created January 16, 2017 05:52
Error due to fail at matching
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] root-group
[INFO] sharedlibrary
[INFO] helloapp
[INFO] worldapp
[INFO]
[INFO] ------------------------------------------------------------------------
root@swdevel:~/GwtMaven3Project# mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] root-group
[INFO] sharedlibrary
[INFO] helloapp
[INFO] worldapp
[INFO]
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] root-group
[INFO] sharedlibrary
[INFO] helloapp
[INFO] worldapp
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.ailabs:jclosure:jar:1.0-SNAPSHOT
[WARNING] 'parent.relativePath' points at com.ailabs:root-group instead of com.ailabs.rootgroup:root-group, please verify your project structure @ line 6, column 11
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
@ailabs-software
ailabs-software / gist:b063e3dd27ac62e5b772accaa7d7b0c9
Created January 24, 2017 19:21
Cast error from instanceof List tried on number
COMPILER OUTPUT WAS:
var $wnd = $wnd || window.parent;
var __gwtModuleFunction = $wnd.ContentCentral;
var $sendStats = __gwtModuleFunction.__sendStats;
$sendStats('moduleStartup', 'moduleEvalStart');
var $gwt_version = "2.8.0";
var $strongName = 'F926205317C5C25D0EB7D3E6EDC87BCF';
var $gwt = {};
var $doc = $wnd.document;
var $moduleName, $moduleBase;
ContentCentral.gwt.xml =========
<?xml version="1.0" encoding="UTF-8"?>
<!-- Custom-built GWT. You probably want to uncomment the DOCTYPE and point it to your GWT checkout
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 0.0.0//EN" "file:///path/to/gwt/checkout/distro-source/core/src/gwt-module.dtd">
-->
<module rename-to="ContentCentral">
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name="com.google.gwt.core.Core"/>
<inherits name="ailabs.jclosure.JClosure"/>
<inherits name="shopwindowshared.ShopwindowShared"/>