RIP Apple MBP
Just wanted to hold a moment of silence in this post for my 2011 Macbook Pro that officially died this morning. /sadface
After a lot of troubleshooting I narrowed it down to the keyboard’s power button and ended up ripping it all open and replacing the keyboard. The power button did work after that and I felt a moment of accomplishment. It continued to work up until I had to plug in the power cord to charge it. Overnight it charged while in “hibernation” due to being idle. Next day - nothing from the power button. Going through all the troubleshooting - no dice. Therefore, I’m going to conclude that there was a short going on somewhere that bricked the board when I hooked up the power and I’m moving on. I’ve still got my Samsung ultrabook to keep me company.
Well - onto the brewing notes! I recently attended a brewing 101 session. I brewed for maybe 2 years off and on but never really tried to greatly improve. This time will hopefully be different. Key notes from the session below.
Brew 101 Notes
General
- Mark 5 gallons on fermenter for ease of use
- Do not use distilled water - no minerals
- Even temperatures during fermentation help yeast prevent off flavors
- Certain kinds of beer - higher fermentation temps help flavor (ie. bavarian hefeweizen and banana clove flavor)
- Think about a bag over a fermenter in case of eruption
- Avoid aluminum pots because they heat too quickly
- Don’t add nuts or anything with high fat to beer
- White Vinegar can clean a copper wort chiller
- OG - if lower than expected - expect to drink beer faster. If above, can dilute the wort before fermentation with extra water.
| Type |
Hops Flavor |
Grain Flavor |
| American |
Piney |
Dry |
| British |
Herbal/Earthy |
Bread-y |
| German |
Mix of above |
Mix of above |
| Belgian/French |
Pepper/Flower-y |
Biscuit |
| New Zealand/Australia |
Tropical Fruit |
—— |
Procedure
Prep
- Everything should be “Visibility” clean
- Cleanliness is the most important thing to brewing good beer
- CLEAN - PBW is your friend
- SANITIZE - StarSan is your friend
- Fermenter - 30 second shake
Brew day
- Only use cold water
- Grains into water before bringing to boil - 170 degrees max / ~20 minutes
- Cut heat when adding extract or malt
- Don’t squeeze the grains when removing from the kettle, just let it drip
- No need to stir hops
- Avoid boil over by removing heat, don’t blow on foam
- Do not put a lid on the boil, causes off flavors
- Clarifiers are awesome, but not for all beers (ie. hefeweizen)
- Wort chiller could be added into boil near the end (5min) to sanitize, but better idea to just sanitize in solution
- Add chilled water to wort after boil to bring to fermenter. Fill to 5.25-5.5 gallons.
- Be sure to stir wort prior to OG reading after adding chilled water. Taste it and remember it for comparison post-fermination.
Fermenting
- The sooner the fermentation begins the better. Hopefully 12-24 hours.
- If nothing happens after 36+ hours - pitch new yeast
- If there isn’t much action, check temp of the fermenter. Should be in the mid-high end for the yeast strain ideally.
Secondary
- After OG remains consistent for 2-3 days in a row, transfer.
- Secondary is absolutely necessary for beers with OG > 1.05
- Used to smooth out taste or add other flavors (like a dry hop)
- Try not to disturb the cake of the primary fermenter when transferring
- Dry hopping - can be done at any time during the secondary timeframe (~2 weeks)
- OG measurement - taste should be approx 75% less sweet than the original OG measurement (wort)
Bottling
- Use corn sugar, it’s the best for bottle conditioning
- Dried malt extract (DME) could be used for more bubbles, but takes longer to condition (3+ weeks)
- Stir the boiled sugar into bottling bucket for thorough mixture, gently.
- Turn the bottle to its side after capping to ensure proper seal
Amount of corn sugar per 5gal batch
- 4.5 oz - Bar type carbonation
- 4 oz - better for English beers
- 4.75 oz - Belgians
Enjoyment
- 2-3 weeks to condition, max 3
- If OG 1.030 –> Drink within 2 months
- If OG is higher –> Drink within 6 months


Emmy grew up as a competitive tennis player until college where she studied Psychology. She discovered permaculture and ecovillages while living in San Francisco. After graduating and becoming a mother she tended her permaculture garden and her young son, and then became a Montessori Teacher for 5 years. She relocated to Breckenridge, Colorado to pursue her and her son's love of alpine sports.
Emmy spends her free time studying coding, practicing primitive skills in her sitspot on Peak 7, and climbs and swims at the gym with her son. Her goal is to connect landowners to skilled migrant and permanent ecovillagers through a network interface in order to create a tangible, resilient communities that exchange value through regenerative products.


Edit mode
Dialog Edit Mode
Dialog Template Edit Mode
Order Details
Order ID
Customer ID
Ship Country
Freight
ShipCity


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/lambda.20temptation.html ---
Do I get kicked out of this forum by CS people if I use
notation ` ` binders `↦` F:(scoped f, f) := F #check (x y) ↦ x + y + 1
I learned to much about notations on Saturday
With great power comes great responsibility
I like it. Makes things a little friendlier for mathematicians who aren't used to λx y,
Actually, the CS people had a meeting and your past violations are already sufficient to get you booted out
But seriously, I understand it's tempting because it's a more traditional notation but I think it's worth re-examining conventions every now and then. In mathematics, the same idea (bound variables) seems to be reinvented over and over and over. If you look at notations like indexed unions, argmax
and sums, there are a lot of vary different conventions in application. I think it's worth streamlining those notations and writing conceptually similar things with similar notations.
I'm not sure I'm ready to give up ↦
as an available notation, arrows are hard to come by
I actually agree with Simon, that it's not a bad thing to ask mathematicians to get used to using lambdas. Conversely, I would be upset by Mario using ↦
for something other than "maps to"! :-)
It's conceivable that something that is morally "maps to" but isn't literally lambda could come up, like ZFC maps to producing a Set
Actually I think the unicode thin space at the beginning of the notation is worse than the Church sacrilege. But I don't know another way. Maybe I don't know enough about notations in the end.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


#include <filters.h>
Public Member Functions | |
| Filters () | |
| void | movingLeastSquare (const boost::shared_ptr< const pcl::PointCloud< PointType >> &blob, pcl::PointCloud< PointType > &res) |
| Moving Least Square filter with Upsampling This method is falls under surface class of pcl. More... | |
| void | voxelGrid (const boost::shared_ptr< const pcl::PointCloud< PointType >> &blob, pcl::PointCloud< PointType > &res) |
| Voxel grid filter. More... | |
| ~Filters () | |
| PointType |
| nimbus::Filters< PointType >::Filters | ( | ) |
| nimbus::Filters< PointType >::~Filters | ( | ) |
| void nimbus::Filters< PointType >::movingLeastSquare | ( | const boost::shared_ptr< const pcl::PointCloud< PointType >> & | blob, |
| pcl::PointCloud< PointType > & | res | ||
| ) |
Moving Least Square filter with Upsampling This method is falls under surface class of pcl.
| blob | Input cloud |
| void nimbus::Filters< PointType >::voxelGrid | ( | const boost::shared_ptr< const pcl::PointCloud< PointType >> & | blob, |
| pcl::PointCloud< PointType > & | res | ||
| ) |


I am an Assistant Professor at the Department of Government at the London School of Economics and Political Science. Until August 2022, I was a Lecturer at the Department of Politics and International Relations at the University of Oxford. Previously, I was a PostDoc at the International Conflict Research Group at ETH Zurich and a visiting scholar at Harvard University’s Institute for Quantitative Social Science.
My research focuses on state building and its effects on local development and conflict, in particular in Africa. My most recent work explores the reciprocal relationship between ethnic geographies and (sub-)national political borders in Africa and Europe since the 19th century.
Throughout, I innovate and use computational methods to collect and analyze large, mostly geospatial datasets. My work has been published or is forthcoming in the American Journal of Political Science, International Organization, World Politics, the British Journal of Political Science, and others.
PhD in Political Science, 2019
ETH Zurich
Visiting Researcher, 2017
Harvard Univerity
MA in Political Science, 2015
ETH Zurich
BA in International Affairs, 2013
University of St. Gallen
BA in Economics, 2013
University of St. Gallen


@ui5/webcomponents
<ui5-multi-input>
Basic Multi Input
Multi Input with tokens
Multi Input and token creation onChange
Token is already in the list
Token is already in the list


Xalan-Java Samples
Xalan-Java Interpretive samples:
- SimpleTransform
- UseStylesheetPI
- UseStylesheetParam
- SAX2SAX
- DOM2DOM
- Pipe
- UseXMLFilters
- AppletXMLtoHTML
- Extensions
- Trace
- Validate
- trax (JAXP transform samples)
- TransformThread
- ApplyXPath
- ApplyXPathDOM
- ApplyXPathJAXP
- XPathResolver
- ExtensionFunctionResolver
Xalan-Java Interpretive servlet samples:
Xalan-Java Compiled samples:
Samples to help you get started
Each of the subdirectories in the Xalan-Java java/samples directory contains the source files for one or more sample applications. The class files for the samples are in the following jar files:
| JAR file | Content |
|---|---|
| xalansamples.jar | Everything except the Xalan-Java Interpretive servlet sample and some XSLTC samples |
| xalanservlet.jar | Xalan-Java Interpretive servlet sample |
| xsltcapplet.jar | XSLTC applet sample |
| xsltcbrazil.jar | XSLTC Brazil server sample |
| xsltcejb.jar | XSLTC EJB sample |
| xsltcservlet.jar | XSLTC servlet sample |
With most of the samples, you can use the following procedure:
- Be sure
xalan.jar
,serializer.jar
,xml-apis.jar
, the appropriate samples JAR file, andxercesImpl.jar
are on the system class path. For the extension examples,bsf.jar
and (for the JavaScript extensions)js.jar
must also be on the class path. - Be sure the java executable is on your path.
- Go to the samples subdirectory containing the sample (use the DOS shell if you are running Windows).
- Run the sample from the command line (as indicated below).
- Examine the application source files. You may also want to modify the source files. Remember that if you modify a java file, you must recompile the class and place it on the classpath before you can run the modified application.
The basic command line for running most of the samples is
java
classname args
where classname is the sample class and args are the arguments, if any. As described in the following sections, some samples take no arguments. The UseStylesheetParam sample takes an additional argument. Several samples in extensions use the Xalan-Java command-line utility, so they take arguments for the XML source file and the XSL stylesheet.
SimpleTransform
What it does: The SimpleTransform class uses the birds.xsl stylesheet to transform birds.xml, and prints the output to birds.out.
You can run it from the SimpleTransform subdirectory with
java SimpleTransform
UseStylesheetPI
What it does: The UseStylesheetPI class uses the stylesheet processing instruction in the XML source document to determine which stylesheet to use to perform the transformation.
You can run it from the UseStylesheetPI subdirectory with
java UseStylesheetPI
For more information, see Working with embedded stylesheets.
UseStylesheetParam
What it does: The UseStyleSheetParam class uses foo.xsl and a stylesheet parameter to transform foo.xml, and prints the output to System.out. The stylesheet parameter appears as a text node in the output.
Run this sample from the UseStylesheetParam subdirectory with
java UseStylesheetParam
param
where param is the stylesheet parameter value (a string of your choice).
SAX2SAX
What it does: Explicitly sets the SAX XMLReader and SAX ContentHandler for processing the stylesheet (birds.xsl), processing the XML input (birds.xml), and producing the output (birds.out).
Run this sample from the SAX2SAX subdirectory with
java SAX2SAX
DOM2DOM
What it does: the DOM2DOM class uses the birds.xsl stylesheet to transform a DOM Document generated from birds.xml, produces an output DOM, and traverses the DOM, printing the traversal to System.out. In contrast to SimpleTransform, DOM2DOM illustrates the procedure for processing an input DOM and creating an output DOM that is available for further processing.
You can run it from the DOM2DOM subdirectory with
java DOM2DOM
Pipe
What it does: Pipes the output from one transformation to a second transformation, then from the second transformation to the third transformation. Transformer1 is the ContentHandler for the XMLReader (which parses the input document). Transformer2 provides the ContentHandler for Transformer1, and Transformer3 for Transformer2.
| Pipe and UseXMLFilters illustrate two strategies for using the output of one transformation as the input for another transformation. The Pipe sample incorporates a "push" model -- Transformer1 "pushes" its output to Transformer2, and so on -- whereas in the UseXMLFilters sample, Transformer3 "pulls" its input from Transformer2, and so on. |
Run this sample from the Pipe subdirectory with
java Pipe
UseXMLFilters
What it does: Chains together the same transformations as the preceding Pipe sample. Using each Transformer object as an extension of the SAX XMLFilter interface, sets the XMLReader as the parent of filter1, filter1 as the parent of filter2, and filter2 as the parent of of filter3.
Run this sample from the UseXMLFilters subdirectory with
java UseXMLFilters
AppletXMLtoHTML
This applet uses a stylesheet to transform an XML document into HTML. It displays the XML document, the stylesheet, and the HTML output.
How to run it: Open appletXMLtoHTML.html in the Internet Explorer 5 browser.
| For information about running Xalan-Java applets in Netscape Communicator, see Problems
with Netscape. This applet looks for xalan.jar and serializer.jar in the build directory, or the top level directory, and xml-apis.jar and
xercesImpl.jar in the lib subdirectory. If you have placed these JAR files elsewhere, adjust the applet archive setting in
client.html accordingly. |
servlet
For a general introduction, see Using Xalan-Java in a servlet.
The servlet subdirectory contains four sample servlets and one JSP that use Xalan-Java to perform transformations. The sample code is compiled and packed in xalanservlet.war. To run these samples, you must place xalanservlet.war on a web server with a servlet engine. For example, using jakarta-tomcat 4.1.*. Copy the xalanservlet.war to %Tomcat_Home%/webapps. For more details about deploying servlets on Tomcat, please refer to Deployment Organization.
Dependency on Tomcat version. If encountering "java.lang.VerifyError: Cannot inherit from final class" error,
replace xercesImpl.jar under %Tomcat_Home%/common/endorsed with the one included with Xalan-Java . |
servlet.SimpleXSLTServlet applies a particular stylesheet to a particular XML document.
servlet.UseStylesheetParamServlet sets a stylesheet parameter (the parameter name is hardwired into the servlet), and requires the user to supply parameters for the XML document and XSL stylesheet.
jspSample.jsp is a Java ServerPage that sets a stylesheet parameter and applies the stylesheet to the XML document.
servlet.XSLTServletWithParams accepts parameters for the XML document, the XSL stylesheet, and any number of stylesheet parameters.
servlet.ApplyXSLT (and associated classes) is closer to a production level servlet. It accepts parameters, provides a listener for capturing and reporting debugger messages, and supports use of a property file to determine which stylesheet to apply based on the identity of the client browser/device.
servlet.SimpleXSLTServlet
What it does: servlet.SimpleXSLTServlet applies the birds.xsl stylesheet to birds.xml and returns the transformation result to the HTTP client.
To run this servlet: set up an HTML page to call the servlet as follows:
http://localhost:port/xalanservlet/SimpleXSLTServlet
servlet.UseStylesheetParamServlet
| Paul Campbell<EMAIL_ADDRESS>wrote this servlet and the following explanatory text. Thank you, Paul! |
What it does: The client (perhaps an HTML form) specifies an XML document, a stylesheet, and a value to be passed to the stylesheet for a stylesheet parameter named "param1". The servlet performs the transformation and returns the output to the client. The client must specify which stylesheet (containing a "param1" stylesheet parameter") and XML file are to be used or use sample files fooparam.xml and fooparam.xsl.
How to run it: set up an HTML client to call the servlet with arguments along the lines of
http://localhost:port/xalanservlet/UseStylesheetParamServlet? XML=fooparam.xml&XSL=fooparam.xsl&PVAL=GoodBye
In the doGet() method, the servlet obtains the PVAL value "GoodBye" from the servlet request and passes it to the stylesheet as the paramValue argument in a Transformer setParameter() call:
String paramValue = httpServletRequest.getParameter("PVAL");
...
transformer.setParameter("param1", paramValue);
The result is returned to the client:

GoodBye

jspSample.jsp
| Paul Campbell<EMAIL_ADDRESS>wrote this Java Server Page. |
This Java Server Page performs essentially the same operation as servlet.UseStylesheetParamServlet. It applies a stylesheet parameter to a stylesheet (fooparam.xsl), applies the stylesheet to an XML source document (fooparam.xml), and returns the result.
Call JSP as follows:
http://localhost:port/xalanservlet/jspSample.jsp? XML=fooparam.xml&XSL=fooparam.xsl&PMA=GoodBye
The JSP obtains the PMA value "GoodBye" from the http request and passes it to the stylesheet as the paramValue argument in a Transformer setParameter() call.
servlet.XSLTServletWithParams
What it does: servlet.XSLTServletWithParams takes parameters in the request -- a URL parameter for the XML input document URL and an xslURL parameter for the stylesheet URL.
To use XSLTServletWithParams to perform the same transformation as SimplestServlet: use birds.xsl and birds.xml as examples. Set up an HTML page to call the servlet as follows:
http://localhost:port/xalanservlet/XSLTServletWithParams?URL=birds.xml& xslURL=birds.xsl
If the XML document contains an associated stylesheet (a stylesheet Processing Instruction) that you want to use, simply omit the xslURL parameter.
If the stylesheet takes stylesheet parameters, you can include them in the URL. For example to set the param1 stylesheet parameter to foo, include param1=foo in the URL.
servlet.ApplyXSLT
What it does: The client (which you must set up) specifies an XML document and a stylesheet. The servlet performs the transformation and returns the output to the client. You can use media.properties to specify which stylesheet is to be used depending on the client browser/device.
| The source files for this servlet, including ApplyXSLT.java, ApplyXSLTProperties.java, DefaultApplyXSLTProperties.java, ApplyXSLTListener.java, ApplyXSLTException.java. booklist1.xsl, booklist2.xsl and catalog.xml, are provided for testing. |
To run the servlet: set system property server.root=server root. Set up an HTML page to call servlet.ApplyXSLT with arguments as illustrated below.
The files catalog.xml, booklist1.xsl and booklist2.xsl are used in the following example. In the deployment descriptor, booklist1.xsl is set as the default xsl file. If you create these files yourself, make sure that you set the output method to "xml" in the stylesheet.
Examples:
http://localhost:port/xalanservlet/ApplyXSLT?URL=/xalanservlet/catalog.xml&xslURL= /xalanservlet/booklist2.xsl
...applies the booklist2.xsl stylesheet to the catalog.xml data. Both files are
served from the Web server's HTTP document root.
http://localhost:port/xalanservlet/ApplyXSLT?URL=/xalanservlet/catalog.xml&xslURL= /xalanservlet/booklist2.xsl&debug=true
...ensures that XML and XSL processor messages are returned in the event of problems applying booklist2.xsl to catalog.xml
http://localhost:port/xalanservlet/ApplyXSLT/xalanservlet/catalog.xml?xslURL=/xalanservlet/booklist2.xsl
...applies the booklist2.xsl stylesheet to the catalog.xml data, just like the first example. This is an alternative way of specifying the XML XSLTInputSource by utilizing the HTTP request's path information.
http://localhost:port/xalanservlet/ApplyXSLT/xalanservlet/catalog.xml
...examines catalog.xml for an associated XSL stylesheet booklist1.xsl (a stylesheet Processing Instruction). If multiple XSLs are associated with the data, the stylesheet whose media attribute maps to your browser type will be chosen. If no mapping is successful, the primary associated stylesheet is used.
Extensions
For an introduction to the creation and use of extension elements and extension functions, and for information about the extensions library distributed with the Xalan-Java Interpretive processor, see Extensions. Extensions are also supported for the Xalan-Java Compiling processor (XSLTC), however no samples exist at this time. See Extensions for XSLTC.
The extensions subdirectory contains six samples with Xalan-Java Interpretive extensions. Two of the samples use extensions implemented in JavaScript, and four of the samples use extensions implemented in Java.
To run these examples, you must place bsf.jar
and js.jar
(version 1.5, available from
http://www.mozilla.org/rhino) on the classpath.
You do not need js.jar
on the classpath for the samples that use Java extensions.
Problems related to JDK 1.4 or higher.
Use java.org.apache.xalan.xslt.Process, the Xalan-Java command-line utility, to run most of these samples from the command line. The command line must include an -in flag with the XML source and an -xsl flag with the XSL stylesheet. If you want the output to be written to a file, rather than to the screen, add an -out flag with the output file name.
Run these samples from the extensions directory as follows (each of the following is a single command line):
1-redir
What it does: Uses the Redirect extension elements shipped with Xalan-Java to direct output to two output files.
Run this sample from the extensions subdirectory with
java org.apache.xalan.xslt.Process -in 1-redir.xml
-xsl 1-redir.xsl
The standard (non-redirected) output is written to the screen. The redirected output is written to 1-redir-out, or whatever filename you assign to the doc/foo @file attribute in 1-redir.xml. The stylesheet gets the file name for redirected output from the XML input file.
2-basicJscript
What it does: Uses an extension element and extension function implemented in JavaScript to compute a deadline for responding to a customer inquiry.
js.jar must be on the classpath. |
Run this sample from the extensions subdirectory with
java org.apache.xalan.xslt.Process -in 2-basicJscript.xml
-xsl 2-basicJscript.xsl
3-java-namespace
What it does: Uses extension functions to format dates. This sample illustrates use of the predefined java extension namespace to provide ready access to extensions implemented in Java.
Run this sample from the extensions subdirectory with
java org.apache.xalan.xslt.Process -in 3-java-namespace.xml
-xsl 3-java-namespace.xsl
4-numlistJava
What it does: Uses a Java extension to transform a set of name elements into a numbered and alphabetized list.
Run this sample from the extensions subdirectory with
java org.apache.xalan.xslt.Process -in numlist.xml
-xsl 4-numlistJava.xsl
5-numlistJscript
What it does: Uses a JavaScript extension to transform a set of name elements into a numbered and alphabetized list. This sample performs the same operations as the preceding Java extension.
js.jar must be on the classpath. |
Run this sample from the extensions subdirectory with
java org.apache.xalan.xslt.Process -in numlist.xml
-xsl 5-numlistJscript.xsl
SQL library extensions
The SQL library extension enables you to execute SQL queries from within a stylesheet, and to incorporate query result sets in the XML output. To use the SQL library, you need a JDBC driver, the underlying DBMS, and a database.
Our samples use Apache Derby DBMS, but the SQL Extensions and sample code can be configured to query data from any DBMS that can be accessed through JDBC.
Setting up the SQL extension samples
To run the SQL library extension samples, do the following:
The SQL Extension examples require the Apache Derby jars. The Derby jars are available from http://db.apache.org/derby/.
The sample batch/script files are configured to look for the derby jars in the xml-xalan/java/samples/extensions/sql directory by default.
If you already have derby installed and want to use that implementation. You can do one of the following.
- set the environment variable DERBY_JAR_DIR to point to the location of
derby.jar
andderbytools.jar
- have the
derby.jar
andderbytools.jar
in your classpath.
First create the sample database using Derby. To do this,
- on Windows, execute the command
runDerby.bat createdb.sql
- on Unix, execute the command
sh runDerby.sh createdb.sql
You can use the Derby tools to examine the raw database. To do this,
- on Windows execute the command
runDerby.bat
At the lj> prompt type the following commands:
lj> connect 'sampleDB';
lj> select * from import1;
To quit the lj session type
lj> quit;
- To Start lj on Unix type
sh runDerby.sh
Once the sample database has been created, you can run the sample stylesheets using the runXalan script.
SQL Library samples
- The Details - Dump SQL
- Basic Connections
- ExternalConnection
- Parameterized query
- Streamable
- Show-error
Dump-SQL
The Dump SQL example is used to show what data is available to the XSLT process.
To run the DumpSQL Example, execute the following command
runXalan.bat -XSL basic-connection/DumpSQL.xsl
Dump SQL should produce the following output:
<sql> <metadata> <column-header searchable="true" writable="false" signed="true" nullable="true" definitely-writable="false" case-sensitive="false" table-name="IMPORT1" schema-name="" scale="0" precision="10" column-typename="INTEGER" column-type="4" column-display-size="11" catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID"></column-header> <column-header searchable="true" writable="false" signed="false" nullable="true" definitely-writable="false" case-sensitive="true" table-name="IMPORT1" schema-name="" scale="0" precision="40" column-typename="VARCHAR" column-type="12" column-display-size="40" catalogue-name="" column-label="NAME" column-name="NAME"></column-header> </metadata> <row-set> <row> <col searchable="true" writable="false" signed="true" nullable="true" definitely-writable="false" case-sensitive="false" table-name="IMPORT1" schema-name="" scale="0" precision="10" column-typename="INTEGER" column-type="4" column-display-size="11" catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID">1</col> <col searchable="true" writable="false" signed="false" nullable="true" definitely-writable="false" case-sensitive="true" table-name="IMPORT1" schema-name="" scale="0" precision="40" column-typename="VARCHAR" column-type="12" column-display-size="40" catalogue-name="" column-label="NAME" column-name="NAME">toothpaste</col> </row> <row> <col searchable="true" writable="false" signed="true" nullable="true" definitely-writable="false" case-sensitive="false" table-name="IMPORT1" schema-name="" scale="0" precision="10" column-typename="INTEGER" column-type="4" column-display-size="11" catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID">2</col> <col searchable="true" writable="false" signed="false" nullable="true" definitely-writable="false" case-sensitive="true" table-name="IMPORT1" schema-name="" scale="0" precision="40" column-typename="VARCHAR" column-type="12" column-display-size="40" catalogue-name="" column-label="NAME" column-name="NAME">milk</col> </row> <row> <col searchable="true" writable="false" signed="true" nullable="true" definitely-writable="false" case-sensitive="false" table-name="IMPORT1" schema-name="" scale="0" precision="10" column-typename="INTEGER" column-type="4" column-display-size="11" catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID">3</col> <col searchable="true" writable="false" signed="false" nullable="true" definitely-writable="false" case-sensitive="true" table-name="IMPORT1" schema-name="" scale="0" precision="40" column-typename="VARCHAR" column-type="12" column-display-size="40" catalogue-name="" column-label="NAME" column-name="NAME">bread</col> </row> <row> <col searchable="true" writable="false" signed="true" nullable="true" definitely-writable="false" case-sensitive="false" table-name="IMPORT1" schema-name="" scale="0" precision="10" column-typename="INTEGER" column-type="4" column-display-size="11" catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID">4</col> <col searchable="true" writable="false" signed="false" nullable="true" definitely-writable="false" case-sensitive="true" table-name="IMPORT1" schema-name="" scale="0" precision="40" column-typename="VARCHAR" column-type="12" column-display-size="40" catalogue-name="" column-label="NAME" column-name="NAME">cereal</col> </row> </row-set> </sql>
Basic-Connection
Contributed by John Gentilin (johnglinux@eyecatching.com).
What it does: illustrates two strategies for connecting to a database, executing a static query, and returning the query result.
The first strategy is to get connection information along with the static query from the stylesheet (dbtest.xsl)\ in the form of stylesheet parameters.
The second strategy is to get connection information from a nodeset in an XML source document (dbInfo.xml).
Set up the database, and run this sample from the extensions/sql/ directory.
1. To get connection information from the stylesheet:
runXalan -xsl basic-connection/dbtest.xsl -out import1.html
2. To get connection information in the form of a nodeset from the XML source document:
runXalan -in dbinfo.xml -xsl dbtest-cinfo.xsl -out import1.html
ExternalConnection
Contributed by John Gentilin (johnglinux@eyecatching.com).
What it does: The ExternalConnection classes uses the default implementation of the ConnectionPool interface to create a pool of connections. A stylesheet in turn uses a connection from this pool to instantiate an XConnection object and connect to a datasource.
The stylesheet uses this named connection pool to instantiate an XConnection object and
connect to the datasource. The ExternalConnection class is in xalansamples.jar
.
Set up the database, be sure xalanxamples.jar
is on the
class path, and run this sample from the extensions/sql directory:
runExtConnection ext-connection/dbtest.xsl
ExternalConnection creates the ConnectionPool, and performs a transformation with dbtest.xsl, which draws from the pool to instantiate an XConnection object, connect to the datasource, execute a static query, and return the query result.
Parameterized query
Contributed by John Gentilin (johnglinux@eyecatching.com).
What it does: connects to a datasource, executes a parameterized query, and returns the result. The XML source document provides the parameter value as well as the connection information. The parameter value is in a node in the XML source.
The stylesheet gets the required connection and parameter information from the XML source, sets up and executes the parameterized query, and retuns the query result set.
Set up the database, and run this sample from the sql subdirectory:
runXalan -in pquery/dbinfo.xml -xsl pquery/dbtest.xsl -out import1.html
Streamable
Contributed by John Gentilin (johnglinux@eyecatching.com).
What it does: Illustrates enabling and disabling of a streamable result set returned by a query.
With a streamable result set, you can create a query that will return many rows but the result will only consume the amount of memory to represent a single row. As a benefit, you can perform transformations on large amounts of data while maintaining a low memory profile. On the down side, when you use streaming, you can NOT, visit previous nodes because the SQL extension only supports unidirectional cursors. If you requires that the whole query be available so that you can apply templates to previous rows, just disable caching.
Set up the database, and run these samples from the sql subdirectory.
1. An example where streaming is disabled:
runXalan -in streamable/dbinfo.xml -xsl streamable/cachedNodes.xsl -out import1.html
2. An example where streaming is enabled
runXalan -in streamable/dbinfo.xml -xsl streamable/streamNodes.xsl -out import1.html
3. This example performs a pivor function swaping rows and columns, streaming is required to be disabled here.
runXalan -in streamable/dbinfo.xml -xsl streamable/pivot.xsl -out import1.html
Show-error
Contributed by John Gentilin (johnglinux@eyecatching.com).
What it does: use the SQL library ExtensionError class to return an error message in the output stream. The stylesheet calls a template with a select statement that returns a nodeset when an error occurs.
Set up the database, and run this sample from the extensions/sql subdirectory:
1. An example where we specify invalid connection information:
runXalan -in show-error/dbinfo.xml -xsl show-error/invalidConn.xsl -out import1.html
2. An example where we specify invalid parameters to a parameterized query:
runXalan -in show-error/dbinfo.xml -xsl show-error/invalidPQuery.xsl -out import1.html
3. An example where we specify an invlaid query:
runXalan -in show-error/dbinfo.xml -xsl show-error/invalidQuery.xsl -out import1.html
Trace
What it does: Trace uses the TraceListener and TraceManager classes to log transformation events.
Run this sample from the Trace subdirectory with
java Trace
and examine the result in events.log. Additionally, run this sample from the extensions subdirectory with
java Trace 3-java-namespace
for the trace of a stylesheet with extensions. For more information, see Debugger Interface
Validate
ValidateXMLInput
What it does: Uses SAXParserFactory to turn on validation, and XMLReader to parse the XML input and report errors and warnings to a SAX event handler. The XML input (birds.xml) contains an internal DOCTYPE declaration, and a few minor document type violations, which you are invited to fix, add to, and vary in any way you find useful.
Run this sample from the Validate subdirectory with
java ValidateXMLInput
Validate utility
What it does: Uses the JAXP SAXParser with a SAX event handler (extends DefaultHandler and implements LexicalHandler) to verify that XML files conform to their declared document type. You can use this utility to verify that an individual file or all the .xml files in a directory are well-formed and valid. Each .xml file should contain a DOCTYPE declaration.
Run this sample from any directory with
java Validate
file-or-dir-name
[
logfile
]
where file-or-dir-name is an XML file or directory pathname, and logfile designates a log. If you omit the second argument, Validate reports its findings to the screen.
| A limitation: Files containing document parts appear to fail if you check them with Validate. Check readme.xml, which "includes" by entity reference a number of files, and it passes. The parse operation scans the entire document with the includes. Check an "included" file (such as history.xml) as if it were an independent document and it fails. |
trax (JAXP transform samples)
What it does: runs a number of samples illustrating uses of the JAXP transform interfaces.
Run this sample from the trax subdirectory with
java Examples
and examine the source in Examples.java and ExampleContentHandler.java.
TransformThread
What it does: spawns multiple threads, with each thread running two transformations on two different XML files.
Run this sample from the TransformThread subdirectory with
java TransformThread
and examine the source in TransformThread.java. A more detailed description along with configuration options are listed in the header.
ApplyXPath
What it does: ApplyXPath uses the convenience methods in the Xalan-Java 2 specific XPathAPI to execute an XPath expression against an XML document and return the nodes (if any) it finds.
| You can use this sample as an aid when you want to find out what a given XPath expression returns from a given XML file. Keep in mind that the context node (base point of evaluation) for the XPath expression is the document root. |
Run this sample from the ApplyXPath subdirectory with
java ApplyXPath
XMLFile XPathExpression
where
XMLFile
is an XML source file and
XPathExpression
is an XPath expression to
apply to that file. The ApplyXPath subdirectory contains an XML file named foo.xml --
<doc><name first="David" last="Marston"/>...</doc>
-- so you can try command
lines like
java ApplyXPath foo.xml /
and
java ApplyXPath foo.xml /doc/name/@first
For more information, see Working with XPath expressions.
ApplyXPathDOM
What it does: ApplyXPathDOM is very similar to the ApplyXPath sample, but it uses the API in the DOM Level 3 XPath Specification to execute an XPath expression against an XML document and return the nodes (if any) it finds.
| You can use this sample as an aid when you want to find out what a given XPath expression returns from a given XML file. Keep in mind that the context node (base point of evaluation) for the XPath expression is the document root. |
Run this sample from the ApplyXPathDOM subdirectory with
java ApplyXPathDOM
XMLFile XPathExpression
where
XMLFile
is an XML source file and
XPathExpression
is an XPath expression to
apply to that file. The ApplyXPathDOM subdirectory contains an XML file named foo.xml --
<doc><name first="David" last="Marston"/>...</doc>
-- so you can try command
lines like
java ApplyXPathDOM foo.xml /
and
java ApplyXPathDOM foo.xml /doc/name/@first
For more information, see Working with XPath expressions.
ApplyXPathJAXP
What it does: ApplyXPathJAXP is similar to the ApplyXPath sample, but it uses the XPath API in JAXP 1.3 to evaluate an XPath expression against an XML document and return the evaluation result in the specified type.
Run this sample from the XPathAPI subdirectory with
java ApplyXPathJAXP
XMLFile XPathExpression ReturnType
where XMLFile is an XML source file, XPathExpression is an XPath expression to apply to that file, and ReturnType is one of the strings from the list {"num", "bool", "str", "node", "nodeset"} designating the return type of the evaluation. The XPathAPI subdirectory contains an XML file named foo.xml. So you can try command lines like
java ApplyXPathJAXP foo.xml /doc/name[1]/@last str
and
java ApplyXPathJAXP foo.xml /doc/name nodeset
XPathResolver
What it does: XPathResolver provides sample implementations of the NamespaceContext, XPathFunctionResolver and XPathVariableResolver interfaces described in the JAXP 1.3 XPath API. The sample demonstrates how these implementations can be used to to evaluate XPath expressions that contain extension functions and references to variables.
Run this sample from the XPathAPI subdirectory with
java XPathResolver
ExtensionFunctionResolver
What it does: ExtensionFunctionResolver demonstrates how to use the sample implementation of XPathFunctionResolver to evaluate XPath expressions containing Java or EXSLT extension functions.
To run this sample from the XPathAPI subdirectory, you need to compile ExtensionTest.java first and put the XPathAPI directory on your classpath. Run the sample using
java ExtensionFunctionResolver
Translets
You can use the JAXP interfaces to compile and run translets. For an overview of the usage patterns these samples illustrate, see Calling XSLTC with the JAXP API.
JAXPTransletOneTransformation
What it does: Uses the XSLTC TransformerFactory to compile a translet and use the translet to transform the XSLTC to-do list from XML into HTML.
Run this sample from the translets subdirectory with
java JAXPTransletOneTransformation
View the result in todo.html.
JAXPTransletMultipleTransformations
What it does: Uses the XSLTC TransformerFactory to compile a translet and use the Templates object associated with the translet to transform the XSLTC and Xalan to-do lists from XML into HTML.
Run this sample from the translets subdirectory with
java JAXPTransletMultipleTransformations
View the results in todo.html and todotoo.html.
Other XSLTC samples
Other XSLTC samples are located in the following samples subdirectories:
- CompiledServlet
- CompiledBrazil
- CompiledJAXP
- CompiledApplet
- CompiledEJB
For information about each of these samples, consult the README file in the subdirectory.
XSLTC provides demos for using XSLTC as a servlet and as a handler for Brazil (a new and powerful Web techology from Sun labs).
To run the Brazil-handler demo, download Brazil from sunlabs:
http://research.sun.com/research/download/index.html
The translet must be specified as a pure class name, accessible through the Brazil-handler's classpath. For example:
translet=mk054
The document must be specified as a valid URL. For example:
document=http://server/path/to/filename.xml
If the file is local to the Brazil handler, it has to be specified using the "file:filename.xml" format.
| In order to run the Brazil-handler demo, you also need to make the Brazil and javax classes available from your classpath |
To run the servlet demo, download the java extensions for servlets from Sun:


Format: ControlMouseOverHighlight FrameName,
Example: ControlMouseOverHighlight "BorderedButtonMouseOverHighlightTemplate",
Purpose: Define the HIGHLIGHT-Frame beeing displayed while the parentFrame is hovered with the Mouse. A Button should have ControlStyle "HIGHLIGHTONMOUSEOVER" to use this.
Used in: BUTTON, GLUEBUTTON, TEXTBUTTON, GLUETEXTBUTTON


When writing about the TV series, it's easy to accidentaly spoil something for potential viewers, but as the series is very old by todays standards, perhaps this can be viewed as something to look forward to in the series, how they are presented?
What I love about Babylon 5 is the over-arching story that writer and producer J. Michael Straczynski created as well as the universe in wich the story exists in. The series was intended to be a five season show and that's exactly what it became. Therefore the ending was well thought-out and planned in advance as well as having an intended ending in the first place, something series that don't have a big picture idea lack.
The series brings up many intersting themes as science fiction often does. Themes such as Chaos vs. authoritarianism, drug addiction, religion and free will. In addition, the book 1984 by George Orwell makes up a very big
| Character | Actor/Actress |
|---|---|
| Delen | Mira Furlan |
| Elizabeth Lochley | Tracy Scoggins |
| G'Kar | Andreas Katsulas |
| Jeffrey Sinclair | Michael O'Hare |
| John Sheridan | Bruce Boxleitner |
| Lennier | Bill Mumy |
| Lyta Alexander | Patricia Tallman |
| Londo Mollari | Peter Jurasik |
| Michael Garibaldi | Jerry Doyle |
| Stephen Franklin | Richard Biggs |
| Susan Ivanova | Claudia Christian |
| Talia Winters | Andrea Thompson |
| Vir Cotto | Stephen Furst |
| Zack Allan | Jeff Conaway |
I've used Bootstap and fontawesome. Found information from wikipedia and images from google image search.


Please tap the image or enter the number of the object you are looking at (12, 13, 14, 15, 16, or 17):


An Angular app that let's you search for Git-Hub repositories, their owners and a brief information about them.


@@include('./blocks/part-01.html')
@@include('./blocks/part-02.html')
@@include('./blocks/part-03.html')
@@include('./blocks/part-04.html')
@@include('./blocks/part-05.html')
@@include('./blocks/part-06.html')


Student Details
Parent/Guardian Details
Emergency Contact & Siblings Details
School Details
Other Details
Uploads & Declaration
2. Parents Details
Edit
Mother Details
Mother(Full Name):
Educational Qualification:
Profession:
Designation:
Government Employee:
If yes, Select:
Mobile Number:
Office Address:
Pincode/Zipcode:
State:
Country:
Telephone(Office):
Email:
Annual Income(RS):
PAN Number:
Father Details
Father(Full Name):
Educational Qualification:
Profession:
Designation:
Government Employee:
If yes, Select:
Mobile Number:
Office Address:
Pincode/Zipcode:
State:
Country:
Telephone(Office):
Email:
Annual Income(RS):
PAN Number:
--Next--


--- layout: post title: How To Clean A Campfire Room Of Uploads disqus_id: /2010/08/19/how-to-clean-a-campfire-room-of-uploads/ categories: - workflow - ruby-rails ---
For us at work, our uploads to campfire are really transitory. Most of the time they are simple screenshots around a current topic. Every now and then vacation photos or even movies, at the end of the day, none of it has value after a certain amount of time. To us as the real value of campfire is our textual transcripts.
This morning after 4 years of campfire, we were real close to our 1GB limit of uploads. Time for a clean up. I found no easy way of automating this, so I turned to the Tinder gem. It has a nice interface to the campfire API using HTTParty as the backend. I found out that there was no easy way to delete uploads too. So after some good ole fashion DOM inspection and knowing rails application conventions, I found my own interface. Below is a little script I used to clean up our room this morning. It basically loops thru a rooms uploads, 5 at a time, and deletes them. Pausing for a quarter of a second between each so I don't freak out the new 37signals administrator :)
{% highlight ruby %} require 'rubygems' require 'tinder' class CampfireUploadCleaner CF_DOMAIN = 'mydomain' CF_ROOM = 'My Room Name' CF_TOKEN = ENV['MY_CF_TOKEN'] def initialize @campfire = Tinder::Campfire.new CF_DOMAIN, :token => CF_TOKEN end def room @room ||= @campfire.find_room_by_name(CF_ROOM) end def connection room.send(:connection) end def delete_uploads uploads = room.send(:get,:uploads)['uploads'] uploads.each do |upload| id = upload['id'] name = upload['name'] connection.post "/uploads/delete/#{id}?n=0" puts "Deleted: [#{id}] #{name}" sleep(0.25) end end def sweep_uploads while room.files.present? delete_uploads end end end cleaner = CampfireUploadCleaner.new cleaner.delete_uploads # => Deletes the top 5 uploads. cleaner.sweep_uploads # => Deletes all uploads. {% endhighlight %}The upload hash actually contains much more than just the id and name of the upload. There is a timestamp, filetype and other attributes. So if you wanted to extend this script, you could. I did not spent a lot of time with it, but I never figured out how to get more than the top 5 uploads too. I'm sure some param hacking would yield some good results.


@fumieval: If things are on November 9th, I can pretty much arrange to have a good chunk of the following week free if there is interest in doing a hackathon or a just a good place to hang out and write code. Let me check the exact dates I have to be somewhere afterwards.


class Solution representing a solution of the Closest String Problem
More...
#include <Solution.hpp>
class Solution representing a solution of the Closest String Problem
| Solution::Solution |
( |
Instance & |
instance | ) |
|
constructor
- Parameters
-
| instance | the instance of the CSP problem |
return the cost of the solution
- Returns
- the cost
| int Solution::getChar |
( |
int |
pos | ) |
|
return a character at a given position
- Parameters
-
- Returns
- the character at position pos
copy operator
- Parameters
-
| solution | the solution to copy |
| void Solution::setChar |
( |
int |
pos, |
|
|
int |
character |
|
) |
| |
set the character of the solution in position pos
- Parameters
-
| pos | the position |
| character | the character |
| void Solution::setCharUpdate |
( |
int |
pos, |
|
|
int |
character |
|
) |
| |
set the character of the solution in position pos and update the cost directly (for the local search)
- Parameters
-
| pos | the position |
| character | the character |
The documentation for this class was generated from the following file:


Excellent Work!
Congratulations! The HazMat server installation was successful. The next step is to create your docroot on directory and deploy your Web contents. See the server logs for detail.
Congratulations! The HazMat server installation was successful. The next step is to create your docroot on directory and deploy your Web contents. See the server logs for detail.


{{#markdown}} ```html data-interchange="[image_path, (default)], [image_path, (landscape)]" ``` {{/markdown}}


@Pool-Operator friendly reminder to update your pool daemon to KMDversion 0.4.0a ASAP if you haven't done yet. Otherwise, you will be on fork on 15th July. Please post here or ping me as soon as you have updated. More than half of the pools are not updated according to our knowledge. So far the following list of pools already updated.
http://chickenpool.com/
https://minethechains.com/
http://luckpool.org/
http://zpool.ca/
http://www.kmdmonster.com/
http://kmd.altpool.pro/
http://solo-kmd.altpool.pro/
https://kmd.coinblockers.com/
https://mining-dutch.nl/
If your pool is on the list, please ignore my message. If your pool is not on the above list, you need to update. If you have updated and your pool is not on the list, please let us know.
Thank you very much for your support.
(edited)


My Project 1 Quiz
Question 1:
What do we call the style of design that targets small devices by default and scales up to large monitors?
We call this style of design responsive design.
What do we call the style of design that targets small devices by default and scales up to large monitors?
We call this style of design responsive design.
What feature of CSS do we make use of to change the design for different screen sizes?
We call this media queries.
What is the name of the library we use to help with our designs?
The name of the libarary that we use is called Bootstrap.
Describe the grid system in that library.
The grid system is a box that has been divided into 12 columns. With this, you can determine the width based on how wide you want the columns. For example, you can can have a grouping of six columns wide and another six columns which would equal 12 columns, or you can use eight columns wide and four columns wide. You use elements within the containers for these grids.
Write the HTML for a DIV that holds three other DIVs that are equal size on medium or larger screens using the grid system. Give them each a different background color and put some text in them.


I don’t have the intention of posting everyday I’m here. I plan to post (1) when I have time, (2) when something interesting happens, and (3) at least once a week. That being said, today was a bit interesting.
Today, I woke up at 04:30. That’s right – 4:30 in the morning (MY morning, not yours).
Now, if you look at a map of Namibia, you will notice that Windhoek is in the middle of the nation. Today, we drove 3.5 hours to the coast, to a city called Swakopmund. We drove in for a funeral service honoring the mother of dear friends of my hosts. It was a Catholic funeral, but I had no idea what was going on due to the microphone system’s lack of clarity.
After the funeral, the grieving family hosted a tea (a white Namibian tradition) at a nearby hotel. Although I mostly sat with Bryan’s mother, I was able to see how Bryan and Dana can minister to grieving friends and church members just by being present. Bryan is trying to teach me that one of the most important aspects to missions is, quite simply, relationships.
This city is part of a huge desert in Namibia, and the desert goes right up to the beach. On one side, I can see the ocean. On the other, I can see beautiful sand dunes. I was able to climb a dune – the view was amazing. Behind me were ocean waves and in front of me were waves of sand. This was like nothing I’ve seen in person before.
PICTURES will be inserted here... at some point.
I didn’t bring my camera to the top of the dune in fear of getting sand in it. However, Bryan said we would come back to this city and I will get to see greater views than I saw today.
Although this country is a desert, it is amazing what you can visually experience here. It’s awesome how diverse God is in his creation – even in just the landscapes.
When we got back to Windhoek, I was able to get online for the first time since Saturday night in Houston. I had about 30 real emails which I needed to handle – wooh wooh. However, I was able to get a lot of that taken care of, as well as add email addresses to my mailing list, and set up my skype account.
With Skype, I am able to call phones in the US for merely 2.5 cents per minute - and the quality is great. I also set up a phone number which allows people to call me at no charge to myself (other than the $12 I paid for 3 months of the number). If you would like to get this number or my account name, email me. Supposedly, you can leave a voicemail. This is great since it is very unlikely that I will be online when someone calls.
Perhaps when things are not so new to me, I won’t post as often.
Tomorrow is supposed to be pretty uneventful, and will be the first day for me to try to catch up on sleep.
Same prayer requests as yesterday…
Please pray that I would learn the culture quickly, that I would develop meaningful relationships with my team and the youth, and that I will be open to what the Lord wants to teach me through my experiences and through Bryan’s discipleship.
Also pray that tomorrow indeed is restful, as things will begin to pick up quickly on Sunday.
-PJ


Name is Required
Email is Required
Enter a valid email.
Mobile No is Required
Mobile Number Should be 10 digits
Mobile Number Maximum 10 digits
Model is Required
Add Bike
Registation No is Required
Kilometers is Required
Service Center is Required
Service Type is Required
Date is Required
Time is Required


my Tuns is the best way to orgnize and enjoy the music, movies and Tv shows you already have ___ and shop for the ones You want. Enjoy all the intertaiment my Tuns has to offer on your mac and pc.
Stream over 45 million songs, ad-free.Or download albums and tracks to listen to offline. All the music in your personal
myTuns library__no matter where if came from__lives right alongside the orangemusic catalog. start your for three-month
trial with no commitment, and cancel any time.
Orange music in available in my Tuns, and for iOS and android devices.
with over 100,000 movies and TV shows to choos from, theres always somthing great to watch myTuns and if you watch on Orange TV 4K HDR. So get ready to enjoy episodes of your faviorite TV shows or hit movies youve been waiting to see__ anytime, anywhere. Just tap to play, or even download if youre going somewhere you wont have Wi-Fi.
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Illo adipisci pariatur delectus eaque ipsum facilis vel unde ab temporibus sit debitis velit rerum, maiores repudiandae at obcaecati reprehenderit! Nihil inventore asperiores quia corrupti. Corporis, ratione voluptas similique et excepturi beatae porro accusamus nostrum voluptatum sit.


Installation instructions for PythonCard are available for the following platforms;
$Revision: 1.17 $ : $Author: kasplat $ : Last updated $Date: 2004/07/26 15:35:31 $
Installation instructions for PythonCard are available for the following platforms;
$Revision: 1.17 $ : $Author: kasplat $ : Last updated $Date: 2004/07/26 15:35:31 $


ChatWidget Class
An HTML widget enabling basic chat capabilities. Pass a session
object
to the options
hash. It's not mandatory for the session to be connected
but the chat won't allow the user until the session is connected.
Constructor
Item Index
Methods
onMessageReadyToSend
-
contents
-
callback
Called when the user clicks on the send button. It will received the contents from the input area and a callback to call once it finishes to send the message and it can be displayed in the conversation area.
Parameters:
-
contents
StringContents of the input area at the moment the user clicked on the send button.
-
callback
FunctionFunction to call once the message is ready to be displayed in the conversation area (usually after it was successfully sent). Pass no parameters to denote success and some error to indicate a failure.
onMessageReceived
-
contents
-
from
Called when the chat receives a message. It extracts the proper id and alias from the connection representing the participant that sent the message and add it to the conversation.
Parameters:
-
contents
StringThe very same raw contents received through the chat.
-
from
ConnectionThe OpenTok connection object representing the participant sending the message.
renderMessage
-
raw
Transform the text from the message into the actual content to be displayed. This case allow multiline messages and recognize urls.
Parameters:
-
raw
StringThe original message contents.


Derek Eder
@derekeder
Noticed this too after building http://illinoissunshine.org/
Any idea why Burke spends so much on hotels & Hof Haus hams? http://illinoissunshine.org/committees/4410/ https://twitter.com/dmihalopoulos/status/854890132259864578
4/19/2017, 11:00:06 PM
Favs: 1
Retweets: 0
link


I have many hobbies/interests and have taken part in many sports over the years such as hockey, tennis, basketball etc.
but my main passion would be horse riding;
which I have done from a very young age.
I regularly compete in Showjumping competitions and also breed pedigree horses in my family's equestrian centre.
There are many professional showjumpers I admire such as Cian O'Connor, Bertram Allen, Jessica Curtin and also a good friend of mine, Shane O'Reilly.
I feel that sometimes the horse riding industry isn't given enough credit as a sport despite the immense dedication and discipline it envolves.
Contrary to popular belief, horse riding in general is a tough sport and requires a lot of bravery as you are putting your complete
trust in a huge creature to translate your commands and execute them safely and with accuracy.


Hi,
I have seen, there is a button widget in emoncms.
But til now no useful help to this item found.
Is it possible to make any outgoing reaction (TCP-telegram or similiar) when the button is pressed?
I tried to use the button widget within a dashboard, but with no success.
Configuring the button, he asks on a feed??? How to create such a feed? Always thought feeds are incoming datas.
Thx, in advance, for your replies.
Re: controlling a device with button-widget possible? --> packet-generator?
Hi,
wish you all a happy new year :-)
In the meantime, I have found, that outgoing reactions will only work with the RFM12 packet generator.
Looks, as if this is of no use for me, because i have an own arduino with wlan-interface, who is sending temperature-datas over ethernet to emoncms, using bulk.json comands.
If there would be a possibility, to send out a tcp-telegram like "method=get" or something else from emoncms to the arduino, I could decode them and control binary outputs over this.
Does somebody have any experience in this??
EDIT:
I would like to test for myself, but I nowhere found any hint how to install/integrate the packetgen-modul into emoncms 8.4.0.
There is only some tips or a ready to use image for a rasp-pi, but my emoncms is running on a windows7-server :-(
Re: controlling a device with button-widget possible? --> packet-generator?
Hi, All the "emoncms modules" follow a similar installation method, you need to clone that modules repo from git into the emoncms/Modules folder and then open emoncms in your browser => Admin => Update & check.
You should also take a look at the events module as that can react to a feed (switched state) and send a request, email, publish to mqtt or just update another feed etc.
I have been playing with the button-widgets too and now have feeds set up for several buttons and can poll those feeds by feedid to establish their state, 1 or 0 at a regular interval individually using a "value" feed api url or several at once using the recently added "fetch" api.
I've made a couple of changes to the button-widget code to get it working and will submit a pull req once tested.
I'm currently having issues getting the events module to play ball.
Paul
Re: controlling a device with button-widget possible? --> packet-generator?
Hi,
got it installed. Now i have a new pulldown with Extras->RFM12b Packet Generator.
>> I have been playing with the button-widgets too and now have feeds set up for several buttons and can poll those feeds by feedid to establish their state, 1 or 0 at a regular interval individually using a "value" feed api url or several at once using the recently added "fetch" api.
A little bit hard to understand for me :-( (totaly new stuff and different language)
You talk about "poll". Does this mean, I have to send a feed-telegram to emoncms to get back the state of an item?
I think it would be easier to understand, if i would have an example, that i could examine. Is there anywhere such an example?
EDIT:
OK got event-module installed too. Think, this is could be a way for me.
I already was able to send some information to my arduino, using the "call url" methode. (the arduino is listening as server)
What I did:
- Create a new input, create a feed from this input (log-feed)
- Make a button with this feed.
- Control this button with commands:
--> switch off: http://<IP_ADDRESS>/emoncms/input/bulk.json?data=[[0,3,0]]&apikey=...
--> switch on: http://<IP_ADDRESS>/emoncms/input/bulk.json?data=[[0,3,1]]&apikey=...
- as a result the button is changing between red and green.
- Set up an event: if "feed" > 0 call url......
--> On changing from 0->1 i get an outgoing telegram to my arduino-server
Thats very good so far :-)))
BUT: I completely do not realize, how to make any changes on a variable or feed from a dashboard.
When i integrate a button, then I can assign a feed and a starting value. But after storing the dashboard, i can not see any reaction on pressing the button... :-(
EDIT 2nd:
One step further:
Creating the button without writing a startvalue makes more success.
I can switch the button by clicking on it from red to green (0->1).
But after a few seconds it is switching back to "0", and the event is not reacting too. It does not see the change from 0 -> 1
Re: controlling a device with button-widget possible? --> packet-generator?
I'm currently struggling a bit with this too,
I think we may want the same result but going about it different ways. my "poll" reference was basically I can currently use
http://CMS.IP.OR.URL/emoncms/feed/value.json?id=123&apikey=1a2b3c4etc
to get the current value (status) of a feed or
http://CMS.IP.OR.URL/emoncms/feed/fetch.json?ids=123,124,125,126&apikey=1a2b3c4etc
to return a batch of values (statuses).
This is similar to how packetgen works, in that the "packetgen hack" for emonhub "polls" the packetgen module every 5 seconds and returns the values set in the packetgen gui, except this works on the feed data directly.
The button widgets are "quirky" and I have made progress with improving their function, I have then switching the feed value from 1 to 0 or 0 to 1 no problem, I also have the button colour changing with the feed value rather than displaying the last "status set by that button" which is handy as I am also able to set/change the feed values remotely using the feeds api and the button colours change on the dashboard. I have also incorperated an "interim colour" eg if the button is green and it is clicked the button instantly turns pink to acknowledge the click and then when the page is refreshed/re-rendered it will change colour again,to red confirming the feed has actually changed, the same happens using yellow before green in the opposite direction.
The events module however is a different matter, I can use the "test" function but as soon as I set any events I can no longer update the feed being monitored, I just get an error and thats where I'm currently at.
I cannot be sure if the events module isn't working because of something I've changed or not, so until I fix that I'm unsure if the button stuff is any good. Progress is painfully slow at the moment as I'm not good with the php, js or sql, let alone the 3 combined.
Paul
Re: controlling a device with button-widget possible? --> packet-generator?
Hi Paul,
ok.
Do you want to share your actual button code with me?
I am not good with php too, but perhaps it is helpful to view the stuff from a different pair of eyes?
EDIT:
I tested your "polling-methode". Thats pretty easy, and I think this is the better way for me too, because I do not need to setup a tcp-server on my arduino. I can use the existing tcp-client to poll values in the same way as I send data to emoncms. --> No need for me any more to use the event module ;-)
Now I have only the problem, that my buttons do not hold the actual state. They are always switching back to the last input value, when I change them from the dashboard.
Looks like you do not have the same problem? Is this because of your code-changes, or do i use the widget in a wrong way?
EDIT2:
Can it be, that on clicking the button in a dashboard, only the color of the button is changed and the feed-value stays at the old value? And then after a few seconds the dashboard is refreshed and takes the value from the feed?
EDIT3:
I think, that this feed.set(feedid,{'time':parseInt((new Date()).getTime()/1000),'value':outval}); is somehow not working proper?
To figure this out, I tried a few things with the API-commands (feed/set.json and feed/update.json), but had until now no success to get a new value into the feed or to change a feedvalue.
--> myIP/emoncms/feed/set.json?id=37&fields={'value':'123'}
returns a: {"success":false,"message":"Field could not be updated"}
--> myIP/emoncms/feed/update.json?id=37&time=UNIXTIME&value=100.0
returns a: null and I see a new timestamp in the feeds-table of the database. But the value is set to "0"
- Adding the &apikey=6565346546.... does not help :-(
- Is the syntax wrong?
- Or should the button-widget use an input-api instead of a feed-api to change a value?
Re: controlling a device with button-widget possible? --> packet-generator?
I don't mind sharing at all I'm just not overly sure of what I'm at so things are being chopped about quite frequently.
This is what I have right now.
Firstly I noticed the set.json didn't have a "value" field for feed.set(feedid,{'time':parseInt((new Date()).getTime()/1000),'value':outval}); to use and so in emoncms/Modules/feed/feed_model.php I added
if (isset($fields->value)) $array[] = "`value` = '".preg_replace('/[^\w\s-:]/','',$fields->value)."'";
immediately after if (isset($fields->public)) $array[] = "`public` = '".intval($fields->public)."'"; and also added
if ($this->redis && isset($fields->value)) {$this->redis->hset("feed:$id",'value',$fields->value);
immediately after if ($this->redis && isset($fields->public)) $this->redis->hset("feed:$id",'public',$fields->public);
This allowed the button to update the feed, although this worked I have since discovered this wasn't the best way to do this and I'm looking at another method. But the button behavior was really quirky so.....
In emoncms/Modules/dashboard/Views/js/widgets/button/button_render.js I have changed var invalue = $(this).attr("value"); to var invalue = assoc[feedname]; so that the "before click" status is taken from the feed value rather than a retained "status after last button click".
For that to work correctly I had to also change how the "value when rendered" is handled by adding
immediately before var val = assoc[feed]; This will fetch the feed value and change null and undefined values to a zero and load "assoc[feedname]" in preparation for the first click even if a "starting value" was not set in the widget settings.
I also changed draw_button(widgetcanvas[id], outval); to draw_button(widgetcanvas[id], outval + 4); as this line immediately changes the button colour, by adding the +4 a different colour is selected for the duration between clicking the button and the button re-rendering to display the correct colour based on reading the current feed value.
This improved the button action 10 fold but the way the feed was being updated was wrong as that method was intended for settings and names etc not data. I worked this out the hard way as the events module kept failing.
Now I am playing with different ways of implementing an update function for the button to use, I have currently changed the feed.set(feedid,{'time':parseInt((new Date()).getTime()/1000),'value':outval}); line to feed.update(feedid,parseInt((new Date()).getTime()/1000),outval); and in emoncms/Modules/feed/feed.js I've added
'update':function(id, time, value)
{
var result = {};
$.ajax({ url: path+"feed/update.json", data: "id="+id+"&time="+time+"&value="+value, async: false, success: function(data){} });
return result;
},
at line 75 (that function is just 3 lines starting "var", "$.ajax" and "return" - no line wrap)
I have since changed if ($route->action == "update") $result = $feed->update_data($feedid,time(),get("time"),get('value')); in emoncms/Modules/feed/feed_controller.php to
if ($route->action == "update") $result = $feed->update_data($feedid,time(),get("time"),null,get('value')); (all one line)
as it appears to pass one time value not the 2 as required by the ;public function update_data($feedid,$updatetime,$feedtime,$value). This seems to work correctly but will probably effect something else so probally isn't the best idea, plus I still can't get the events module to work.
I hope this makes some sense, maybe you can make some use of it too.
Paul
Re: controlling a device with button-widget possible? --> packet-generator?
No I take that last bit back, it doesn't appear to be working. so I think we are at the same place. Trying to get
feed.set(feedid,{'time':parseInt((new Date()).getTime()/1000),'value':outval});
to work with either feed/insert or feed/update (which I can't tell apart)
Paul
edit - so to recap I can get the buttons to work smoothly and correctly both from the dashboard widget and from a url. I can establish the status of those feeds using a request, but the feed engines are not being used as the wrong api is being used, which also means the event module isn't informed when the feed is updated.
Re: controlling a device with button-widget possible? --> packet-generator?
Hi,
thx for your detailed explanation. Some things are logical for me.
But I think that there is something basicly wrong. Perhaps only on my emoncms-installation.
In my opinion, my first step should be to change/update values from the browser line via feed/api-comands.
As long as this is not working, all the other stuff is senseless. Do you agree?
Did you try this api-comands. Do you have a correct syntax for me. I only could use the Feed Api Help. And this is not working as expected. (See my last post)
I hope we do not talk past each other, but for me its a little bit hard to understand your explanations, because english is not my native language.
Re: controlling a device with button-widget possible? --> packet-generator?
I have now removed that last edit as it was that "null" i added that broke the "update" for me, so
I'm currently able to update from the browser address bar using urls
http://CMS.IP.OR.URL/emoncms/feed/update.json?id=10&time=1420328088&valu...
or
http://CMS.IP.OR.URL/emoncms/feed/insert.json?id=10&time=1420328088&value=1&apikey=123abc
Both work and the above changes from feed.set to feed.update are working again, I think !!
Your English is good, I think it's the topic not the language that makes it tricky.
Paul
Re: controlling a device with button-widget possible? --> packet-generator?
Hi,
Change values from the browser:
update.json is not working @all
insert.json is working.
Based on this and your tips I only made 2 changes now:
1.)
Add this in feed.js:
'insert':function(id, time, value)
{
var result = {};
$.ajax({ url: path+"feed/insert.json", data: "id="+id+"&time="+time+"&value="+value, async: false, success: function(data){} });
return result;
},
2.)
Change the feed.set line in the button_render.js to this:
// feed.set(feedid,{'time':parseInt((new Date()).getTime()/1000),'value':outval});
feed.insert(feedid,parseInt((new Date()).getTime()/1000),outval);
Now, I am able to change the button as needed. A klick toggles the state from 0->1 or the other way round.
And with
http://<IP_ADDRESS>/emoncms/feed/value.json?id=37&apikey=123abc
I get back the actual value ( "0" or "1")
Thats what I need to control a relay on the arduino from emoncms :-)
But you are right. Changing the feed-values do not have any affect on the event module. This is only reacting, if I make a value change on the input-value.
Re: controlling a device with button-widget possible? --> packet-generator?
I think update is fussy about the timestamp, I think it will only work if the timestamp is greater than the last timestamp. try with the current unix timestamp and then add a couple of seconds and change the value => SEND then add couple more seconds and change the value => SEND again, see if that works for you.
Re: controlling a device with button-widget possible? --> packet-generator?
I don't think it is a problem with the timestamp.
http://<IP_ADDRESS>/emoncms/feed/update.json?id=37&value=6&apikey=123abc --> :-(
http://<IP_ADDRESS>/emoncms/feed/insert.json?id=37&value=6&apikey=123abc --> :-)
Using the update.json without time-option, it makes an update in the mysql database with the actual timestamp, but changing the value to "0"
With insert.json its working great.
BUT: As soon, as I declare an event on this feed, I can not use the insert.json, or update.json api-calls at all.
I get back a Fatal error- (Look at the assigned screenshot).
Even there is an error, the feed value is updated on using the insert comand.
Re: controlling a device with button-widget possible? --> packet-generator?
I experienced the same fatal error when trying to use the my first solution "set.json fields=value" which I suspected to be due to lack of timestamps. The events module is driven by the "last update" timestamp which is supplied by the "updated at time stamp" not the datapoint timestamp.
I have just tried switching browser to see if get different results and the buttons are just black and not working in chrome. I think I'm spending far too much time on this now, see how I feel tomorrow :-(
Paul
Re: controlling a device with button-widget possible? --> packet-generator?
Coming back to my "idea" a few posts before.
What, if we do not update the feed value. If we update the input value?
Is there a chance to do this within the button_render.js?
Or can this cause different problems?
But i will go to sleep right now. Its 2:00 in the morning.....
Re: controlling a device with button-widget possible? --> packet-generator?
Had another stab at this and made a little more progress. I have made a created a "set_feed" function in feed.js
'set_feed':function(feedid,time,value)
{
var result = {};
var apikeystr = ""; if (feed.apikey!="") apikeystr = "&apikey="+feed.apikey;
$.ajax({
url: path+'feed/update.json?',
data: "id="+feedid+"&time="+time+"&value="+value+apikeystr,
async: false,
success: function(data) {}
});
return result;
},
This is called from button_render.js by changing the feed.set line to
feed.set_feed(feedid,parseInt((new Date()).getTime()/1000),outval);
This seems to work ok! however I did get caught out when I took a break and came back to it as the open "dashboard" webpage doesn't refresh on timeout, so although I was effectively logged out (timed out) the webpage and the buttons continued to function but not update the feed due to lack of apikey. Once refreshed and logged in again the feed updates with the button clicks, I have been watching the feed in a realtime vis.
But still no joy from the events module and none of this seems to work in chrome so still a long way to go!
Paul
PS I haven't tried using the input api yet as that feels like extra steps to the same point. We would need to create an input, with a node id and a process list to "log to feed" and that process will just call the same "update_feed" function. The button is still attached to the feed rather than the input unless the code is dramatically changed. The inputs are not as robust as the feeds either so I will persevere for now, but haven't ruled out trying to use an input as a work around if all else fails.
Re: controlling a device with button-widget possible? --> packet-generator?
>> We would need to create an input, with a node id and a process list to "log to feed" and that process will just call the same "update_feed" function.
[OffTopic]
Hmmm. I am missing the quote-function in this board :-(
[/OffTopic]
How do you make a button-feed without an input?
I only know the way to make an input-node and put a "log to feed" on it. And that was the base for all my coding the last days.
Re: controlling a device with button-widget possible? --> packet-generator?
A feed can be created using a new input or even just created on the end of an existing inputs processlist and then immediately removed from the list, as this doesn't delete the actual feed, Likewise you could now delete the input along with its processing and the feed will remain.
Alternatively the feed api can be used, I created my "toggle_button" feeds using this url
http://CMS.IP.OR.URL/emoncms/feed/create.json?name=MyNewFeed&datatype=1&engine=2&apikey=123abc
The engine type can be established by either examining the emoncms code or can be "copied" from existing feeds either via phpmyadmin or by listing your existing feeds with the api
http://CMS.IP.OR.URL/emoncms/feed/list.json&apikey=123abc.
Paul
Re: controlling a device with button-widget possible? --> packet-generator?
Hi,
>>Likewise you could now delete the input along with its processing and the feed will remain.
No, I need the input, because I want to control the heater of my warmwaterboiler. Now I can make a request on this from emoncms (all over the world), my arduino takes this request and clears it via input-api. And the boiler is then running for a certain time (controlled by arduino). State of the boiler will be shown by a LED-widget.
BTW: Do you see a possibility to handover a time-setvalue to my arduino? Sending a number is not different as sending the control 0/1 (because its the same type of var). But how can I give in a dashboard the variable a defined value?
Re: controlling a device with button-widget possible? --> packet-generator?
I wasn't saying you should, just answering your question how :-)
Although a feed can also be set or queried from all over the world without ann input, but if you want to display the status of the boiler rather than display the desired status an input would be required and that would be better driving an led-widget independent of the button or feed.
I'm not entirely sure what you mean by "time-setvalue" but if you want to send a value other than 1 or 0, you could write something custom or use feeds and input processing. eg if you want heater to run for 3 hours you could multiply the "1" by 3 for hours or 180 for mins etc and use the resulting feed value, you could even control that time value via an input or feed api. FeedA is controlled by button(0or1) x FeedB set via api to "TimePeriod" = 0 if button is off or whatever the "TimePeriod" is if on.
If you are looking to use the actual time of day as a scheduler you would be far better off using cron to change the feeds status between 0 or 1 and use the button as a manual override. I have an artificial node set up using cron to provide values at predefined times via a web socket to emonhub. I call it CronNode and use it to switch energy tarrifs but it will soon be used to switch "control" feeds in exactly the same way.
Paul
Re: controlling a device with button-widget possible? --> packet-generator?
And if you want to get the time the heater is switched on you can run
http://CMS.IP.OR.URL/emoncms/feed/get.json?id=123&field="time"
after the change in state is detected.
Re: controlling a device with button-widget possible? --> packet-generator?
And just to keep this up to date, the changes discussed that I previously reported as working from IE but not chrome, do actually work from chrome as long as I'm logged in.
Supplying the apikey in the api url does not work "fully" I have not figured it out yet but using the apikey in the url gives me a partial log-in, as in I can see the page but the buttons are all black and do not respond to clicks. I think this is now a different manifestation of the page appearing to function but not effecting the feeds in IE, seen when the session times out but the page doesn't refresh.
And the events module is still not working.
Re: controlling a device with button-widget possible? --> packet-generator?
>>I'm not entirely sure what you mean by "time-setvalue"
I want to give my arduino from the dashboard an integer (= minutes) how long the heater should run, when it is started from emoncms.
The sequence of events should be:
dashboard: define a timeperiod in minutes, send this and a "heater-on-request" to my arduino.
arduino: receive the timeperiod and the request.
arduino: start the heater for the predefined time, and clear the request.
arduino: send status-information (heater on/off; remaining time) to emoncms-dashboard.
At now only missing an inputfield in emoncms for a number-value. e.g.120 (for 2hours)
Perhaps i will define several requests for different timeperiods.....
>>And the events module is still not working.
Yesterday I thought, I do not need this, because I can poll the values from emoncms. But this means, that there is always a time delay (in worst case the time between two polling events) between the action on the dashboard and the reaction on the arduino.
But the only option to this is to setup a server on my arduino and a working event-module......
>>If you are looking to use the actual time of day as a schedule...
No, and if, cron is not usable for me. I am using emoncms on a windows7-computer ;-)
Do you think, it is possible to make a copy of the button-widget, and rewrite the code, that the button2_events() does not make an api-call like feed.insert..... but makes a "call url"
Something like this: http://<IP_ADDRESS>:8080/?sendstring
Likely the same as the event module makes on curl, but initiated directly from the button.
Re: controlling a device with button-widget possible? --> packet-generator?
OK
to my last thought (send a call url from buttonklick)
I have never done something with js or ajax or similiar before emoncms. Therefore this will be somehow crazy.
But I have searched a lot in the web today, and have a "beginning" of a solution for me:
Knowing no better place, I have extended the feed.js with this function:
'curltest':function()
{
var result = {};
$.ajax({
url: 'http://<IP_ADDRESS>:8080',
data: {'request':1},
dataType: 'xml',
complete : function(){
alert(this.url)
},
success: function(xml){
}
});
return result;
},
And then changed the feed-call in the button render.js with this:
feed.curltest();
Whats the result? Every time I press the button, I get this on my server: (actually tested with SocketTest and Port 8080 on the same computer)
> New Client: <IP_ADDRESS>
GET /?request=1 HTTP/1.1
Host: <IP_ADDRESS>:8080
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Accept: application/xml, text/xml, */*; q=0.01
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://<IP_ADDRESS>/emoncms/dashboard/view
Origin: http://<IP_ADDRESS>
Connection: keep-alive
Using the event-testfunction it looks like this:
> New Client: <IP_ADDRESS>
GET /?request=1 HTTP/1.1
Host: <IP_ADDRESS>:8080
Accept: */*
> Client closed conection.
There is still some difference (above all the keep alive connection), but basicly I get a telegram to my tcp-server.
If somebody knows how to make this better, don't hesitate to tell.
My aim will be, to make a sort of button-widget which sends out a telegram on klicking, with a option for the url and the payload.
Re: controlling a device with button-widget possible? --> packet-generator?
A little further: Why using a function for this.
I only take this codeline into the button_render.js:
$.ajax({type:'GET', url:'http://<IP_ADDRESS>:8080', data: "request=1", timeout: 1000 });
with the timeout I get a connection close after one second.
Tomorrow I will create a new widget, with options (hopefully)
Re: controlling a device with button-widget possible? --> packet-generator?
Here again:
made a new widget for me: "curl_render.js".
Its a copy of the button_render.js with 4 parameters:
Function: There will be drawn a circle of the defined colour. On klicking on the button, there is send a GET-Telegram to the defined IP/port.
If you want, you can test it and give me a feedback..
What is still making me angry, is that there is much more information sent, as using the curl from the event-module. (Look two posts above)
I studied the code of the event-test, but I do not see where is the difference.
Can somebody help here?
----------------------------------------------------------------------------------------------------------------------------
telegram caused by my $.ajax:
$.ajax({type:'GET', url:'http://'+$(this).attr("IP")+':'+$(this).attr("port"), data: $(this).attr("payload"), timeout: 500 });
------->
> New Client: <IP_ADDRESS>
GET /?Heizung_EIN HTTP/1.1
Host: <IP_ADDRESS>:8080
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Accept: */*
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://<IP_ADDRESS>/emoncms/dashboard/view?id=2
Origin: http://<IP_ADDRESS>
Connection: keep-alive
> Client closed conection.
----------------------------------------------------------------------------------------------------------------------------
telegram made by the testbutton of the curl eventmodule:
> New Client: <IP_ADDRESS>
GET /?Heizung_EIN HTTP/1.1
Host: <IP_ADDRESS>:8080
Accept: */*
> Client closed conection.
----------------------------------------------------------------------------------------------------------------------------
I have figured out, that this function is initiated by the test-button (part of event_list.php):
$(".testevent").click(function() {
var eventid = $(this).attr("eventid");
var feedid = $(this).attr("feedid");
$.ajax({type:'GET',url:path+'event/test.json',data:'id='+eventid+'&feedid='+feedid,dataType:'json',success:function(){location.reload();}});
return false;
});
But I do not see something in here, that could be responsible for the difference (I tried the option "dataType" and "success"-> negative)
What do I have to change in my $.ajax-line to get the same?
Re: controlling a device with button-widget possible? --> packet-generator?
Good to see you are getting closer to a solution, I'm afraid I can't help you much with ajax or curl.
I suspect you have already examined the events module "curl code" Is it the header option and shorter timeout?
Re: controlling a device with button-widget possible? --> packet-generator?
I thought it is the code in the event_list.php. Because i insertet an alert() into the "$(".testevent").click(function()" (line 254 in event_list.php) , and saw it popping up on klicking the test-button.
Maybe its the header option, but i do not know how to change this php-code into js-code....
Its definitely not the timeout, because the value in php is in seconds and my value is in ms. -> Its the same
Re: controlling a device with button-widget possible? --> packet-generator?
Hi pb66,
no wasting more time to the difference in the curl-telegrams. I am only parsing them for my string. And this is working with both.
Now I finished my work so far. I can bidirect communicate with my arduino. Sending data via input-api and receive data (webserver on the arduino) via GET-telegrams from the curl-widget.
I have made some changes on my curl-widget. Its no more a round button, but a rect-button with different colours. In the appendix you can see how to setup the widget.
As I described, I get back from my arduino the infos whats the rest time the heater will stay on, and the state of the heater (LED)
I added another picture that shows the complete dashboard. Here you can see my modified cylinder-widget with 6 temperatures.
Hope you will get a solution for your problems soon ;-)
Re: controlling a device with button-widget possible? --> packet-generator?
The dashboard looks very clear and functional, glad you got it working. I have enough functionality for what I need right now.
It would definitely be better if it was clear if the dashboards were fully logged in or not, but this is an existing dash characteristic. It has since dawned on me that any dash will remain active after a login has timed out. Normally with a display-only page there are no "clickable" widgets so you only notice the session has timed out when you try to navigate to anther emoncms page by the topmenu bar, nothing has changed but adding the toggle_buttons has highlighted the the need for an additional "if not-logged in go to login page" in the on-click perhaps. I will return to this another time probably.
The problems with the events module will save for another day too. I don't actually need it right now, I just wanted to see if I could get it to respond to a button for more options. But as I can't get it to function on non-button feeds either it isn't likely to be related so can wait.
It would be interesting to see your final changes, although I don't have a specific use right now I think your "curl-button" widget could be useful for other things since it's easily configured for different payloads and ports.
For example when a "socket to rfm network" interfacer gets implemented in emonhub, a "curl-button" could be configured to send a pre-prepared RFM packet to emonhub to be broadcasted out to nodes on the RFM network.
Re: controlling a device with button-widget possible? --> packet-generator?
OK,
here it is. Feel free to copy or modify it. If you see something mismatch pls tell me.
Re: controlling a device with button-widget possible? --> packet-generator?
Thanks, So are all the changes contained in one widget file and picked up by the existing "dash" code? or did you make any other changes?
Re: controlling a device with button-widget possible? --> packet-generator?
You only need the widget-file. Copy it into the widget-folder, and you can use it at once with the existing dashboard. I changed all instances to "curl", so there should be no interference to the other widgets.


A Network of Women That Need Each Other- Wunderfit.
Most women who purchase wrong sizes, might not have access to comfortable bras for real women with a real need for back support. This is where "Wunderfit" steps in to rescue women from potential health issues due to incorrect wardrobe size choices.
Wunderfit as a company aims at providing solutions to women in India who might be working long hours either at home or at a client location and need unparalleled comfort with equal support on all days of the week!.
Learn and grow with our Wunderfit Consultant Network.
More often than not, women tend not to know their actual bra size. While there are many reasons for this, such as lack of information available and lack of options of the right bra size, wearing bras of the wrong size can lead to a series of health problems like chronic back pain, inadequate support, feeling suffocated all day and feeling uneasy while sleeping.
Bra size calculators can help you, as one of our Wunderfit Consultant, guide your clients and help them find a right sized product from our range of comfortable bras. By using this size calculator, women can avoid short term and chronic health issues which can in turn lead to a healthier and pain free life.
Join The Wunderfit World of Freedom and Independence.
Wunderfit does not believe in the concept of reselling its products through either online or offline shops, stores and outlets. We as a company, believe that women can help each other make an informed decision while purchasing lingerie.
Thus, we are striving to provide a platform which women can join our network of "Wunderfit consultant" and grow with us while promoting our comfortable and adequately supporting lingerie.
Be a part of Innovation- Join Our Network of Wunderfit Consultant.
As a part of the Wunderfit Consultant Network, you have to be the face of our company, promote our range of healthy and comfortable products to end users. You can choose to network with friends, families, co-workers or find new individuals who would like to purchase products from you.
The kit we give you can be used as a demo tool. You will be given an opportunity to host events, network at these events and earn an income while growing with the Wunderfit family.


Description and Initial Results 1 Department of Geological and Atmospheric Sciences, Iowa State University, Ames.
Eugene S. Takle[1,2,3], William J. Gutowski, Jr.[1,2], Raymond W. Arritt[2],
aitao Pan[2], Christopher J. Anderson[2], Renato Ramos da Silva[2], Daniel Caya[9],
Shyh-Chin Chen[8], Jens Hesselbjerg Christensen[5], Song-You Hong[7],
Hann-Ming Henry Juang[7], Jack Katzfey[4], William M. Lapenta[6],
Rene Laprise[9], Philippe Lopez[5], John McGregor[4], John O. Roads[8]
2 Department of Agronomy, Iowa State University, Ames.
3 International Institute of Theoretical and Applied Physics, Iowa State University, Ames.
4 Commonwealth Scientific and Industrial Research Organisation, Mordialloc, Australia.
5 Danish Meteorological Institute, Copenhagen, Denmark.
6 Marshall Space Flight Center, Huntsville, Alabama.
7 National Centers for Environmental Prediction, Camp Springs, Maryland.
8 Scripps Institute of Oceanography, La Jolla, California.
9 Universite du Quebec a Montreal, Canada.
August 1998
Submitted to
Journal of Geophysical Research
ABSTRACT A description is given for the first simulation experiment and output archives of the Project to Intercompare Regional Climate Simulations (PIRCS). Initial results from simulations of the summer 1988 drought over the central U.S. indicate that limited-area models forced by large-scale information at the lateral boundaries are able to reproduce bulk temporal and spatial characteristics of meteorological fields. In particular, the 500 hPa height field's time average and temporal variability are generally well simulated by all participating models.
Model simulations of precipitation episodes vary depending on the scale of the relevant dynamical forcing. Organized synoptic-scale precipitation systems are simulated deterministically in that precipitation occurs at close to the same time and location as observed (though the amounts may vary from the observations). Episodes of mesoscale and convective precipitation are represented in a more stochastic sense, with less precise agreement in temporal and spatial patterns.
Simulated surface energy fluxes near the FIFE region show broad similarity with FIFE observations in their temporal evolution and time average diurnal cycle. Inter-model differences in mid-day Bowen ratio tend to be closely associated with precipitation differences. Differences in daily maximum temperatures are also linked to the Bowen ratio differences, indicating strong local, surface influence on this field. Although some of the models have bias with respect to the FIFE observations, they all tend to reproduce the synoptic variability of observed daily maximum and minimum temperatures.
| Copyright/Trademark Legal Notice |


Before Change
def simple_inclusive(sentences):
for sentence in sentences:
for word in sentence.split(" "):
if word in indicatives:
print (sentence)
// exclusive
// minimum_spaces = 2
// minimum_lettres = 12
conventions = ["c.[0-9]+[ACTG]>[ACTG]"]
// list comprehension for "p.Lys76Asn" e.g. [(p.X[0-9]+Y) with X in aa, Y in aa]
// V232fs --> frameshift
// delta Phe581
After Change
for word in words:
iword += 1
itotal += 1
if word in indicatives:
// print (sentence, isen, iword, itotal)
for i in xrange(iword - 1, len(words) - 1):
if words[i] in positions:
// print (words[i], "found")
found.append([itotal, i - iword + 1])
break
elif words[i] == words[len(words) - 1]:
print ("not found")
return found
// print (words[iword - 1])


Avalible Nodes
Back
«
1
2
3
»
Next
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.


dasmoto arts and crafts
made of the original qualyty oak. hakcksaw brushes are known for theri weight and ability to hold paint in large amount, availabe in diferent sizes Starting at $3.000 /brush
Assorted frames made of different material, including MDF, birchwood, and PDE. Select frames can be sanded and painted according to your needs.Starting at $2.00 / frame.
Imported paint from Finland. Over 256 colors available in-store, varying in quantity (1 oz. to 8 oz.). Clean Finnish paint microbinds to canvas, increasing the finish and longevity of any artwork. at $5.00 / tube.


--- layout: post title: No critical cocktail will force operators over to IP date: 2006-05-16 00:00:00 category: mobile ---
No critical cocktail will force operators over to IP: ""There's no 'critical cocktail' of applications," he claimed. No one specific application like IM (Instant Messaging) or location based service was going to swing the balance. However, operators will eventually work out that if they want to launch loads of new services, they'll have to move to IMS."
Reminds me of a lot of the talk we were hearing a few years back about mobile in general: how there wasn't one single universal "killer app", but consumers would pick and choose the ones they wanted.


Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look
Read MoreWhy do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look
Read MoreWhy do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look
Read More


Admin Sign In
Spacehold
Pages:
Why I recommend getting a dog
here!
Why beagles would be the best dog
here!
Home


{{> dropdown}} Email {{user.email}} {{#user.hasPassword}} Password Change your password {{/user.hasPassword}} {{^user.hasPassword}} Password Set your password {{/user.hasPassword}} Subscription Manage your subscription


Colored Image