|
home | news | discuss | issues | license LURE: show |
|
|---|---|
Recrusively printing table itemsMatias Guijarro wrote:
So first of all I tried to set a new metatable for tables, As Shmuel pointed out, table metatables are per-table, so they don't really work for what you want to do.
A way that will work is to simply replace the tostring function itself. Replace it with a function that calls your table-to-string function for tables, and calls the original tostring for everything else. Roberto's Programming in Lua book explains how to write the table-to-string function. (The first edition is available online: http://www.lua.org/pil/12.1.html.) As it happens, I happened to write an implementation of just the functionality you're looking for a few days ago. It is below, but I encourage you to try whipping together at least a simple version of your own before looking at mine. - Aaron This script makes tostring convert tables to a representation of their contents. |
|
|
The real tostring: |
local _tostring = tostring
|
|
Characters that have non-numeric backslash-escaped versions: |
local BsChars = {
["\a"] = "\\a",
["\b"] = "\\b",
["\f"] = "\\f",
["\n"] = "\\n",
["\r"] = "\\r",
["\t"] = "\\t",
["\v"] = "\\v",
["\""] = "\\\"",
["\\"] = "\\\\"}
|
|
Is Str an "escapeable" character (a non-printing character other than space, a backslash, or a double quote)? |
local function IsEscapeable(Char)
return string.find(Char, "[^%w%p]") -- Non-alphanumeric, non-punct.
and Char ~= " " -- Don't count spaces.
or string.find(Char, '[\\"]') -- A backslash or quote.
end
|
|
Converts an "escapeable" character (a non-printing character, backslash, or double quote) to its backslash-escaped version; the second argument is used so that numeric character codes can have one or two digits unless three are necessary, which means that the returned value may represent both the character in question and the digit after it: |
local function EscapeableToEscaped(Char, FollowingDigit)
if IsEscapeable(Char) then
local Format = FollowingDigit == "" and "\\%d" or "\\%03d" .. FollowingDigit
return BsChars[Char]
or string.format(Format, string.byte(Char))
else
return Char .. FollowingDigit
end
end
|
|
Quotes a string in a Lua- and human-readable way. (This is a
replacement for string.format's |
local function StrToStr(Str)
return '"' .. string.gsub(Str, "(.)(%d?)", EscapeableToEscaped) .. '"'
end
|
|
Quote a string into lua form (including the non-printable characters from 0-31, and from 127-255). |
local function quote(_)
local fmt = string.format
local _ = fmt("%q", _)
_ = _)
_ = string.gsub(_, "\\\n", "\\n")
_ = _ = string.gsub(_, "[%z\1-\31,\127-\255]", function (x)
return fmt("\\%03d",string.byte(x))
end)
return _
end
StrToStr = quote
|
|
Lua keywords: |
local Keywords = {["and"] = true, ["break"] = true, ["do"] = true,
["else"] = true, ["elseif"] = true, ["end"] = true, ["false"] = true,
["for"] = true, ["function"] = true, ["if"] = true, ["in"] = true,
["local"] = true, ["nil"] = true, ["not"] = true, ["or"] = true,
["repeat"] = true, ["return"] = true, ["then"] = true,
["true"] = true, ["until"] = true, ["while"] = true}
|
|
Is Str an identifier? |
local function IsIdent(Str)
return not Keywords[Str] and string.find(Str, "^[%a_][%w_]*$")
end
|
|
Converts a non-table to a Lua- and human-readable string: |
local function ScalarToStr(Val)
local Ret
local Type = type(Val)
if Type == "string" then
Ret = StrToStr(Val)
elseif Type == "function" or Type == "userdata" or Type == "thread" then
Ret = "<" .. __tostring(Val) .. ">"
else
Ret = _tostring(Val)
end
return Ret
end
local function private(str)
return type(str) == "string" and str:sub(1,1) == "_" end
|
|
Converts a table to a Lua- and human-readable string. |
local function TblToStr(Tbl, Seen)
Seen = Seen or {}
local Ret = {}
if not Seen[Tbl] then
Seen[Tbl] = true
local LastArrayKey = 0
for Key, Val in pairs(Tbl) do
if not private(Key) then
if type(Key) == "table" then
Key = "[" .. TblToStr(Key, Seen) .. "]"
elseif not IsIdent(Key) then
if type(Key) == "number" and Key == LastArrayKey + 1 then
|
|
Don't mess with Key if it's an array key. |
LastArrayKey = Key
else
Key = "[" .. ScalarToStr(Key) .. "]"
end
end
if type(Val) == "table" then
Val = TblToStr(Val, Seen)
else
Val = ScalarToStr(Val)
end
Ret[#Ret + 1] =
(type(Key) == "string"
and (Key .. "= ") -- Explicit key.
or "") -- Implicit array key.
.. Val
end
end
Ret = "{" .. table.concat(Ret, ", ") .. "}"
else
Ret = "<cycle to " .. __tostring(Tbl) .. ">"
end
return Ret
end
|
|
A replacement for tostring that prints tables in Lua- and human-readable format: |
function tostring(Val)
return type(Val) == "table"
and TblToStr(Val)
or _tostring(Val)
end
|
|
A test function: |
local function _tostringTest()
local Fnc = table.sort --function() end
local Tbl = {}
Tbl[Tbl] = Tbl
local Tbls = {
{},
{1, true, 3},
{Foo = "Bar"},
{["*Foo*"] = "Bar"},
{Fnc},
{[{}] = {}},
{1, 2, 3, {4, 5}},
Tbl,
}
local Strs = {
"{}",
"{1, true, 3}",
'{Foo= "Bar"}',
'{["*Foo*"]= "Bar"}',
'{<' .. __tostring(Fnc) .. '>}',
"{[{}]= {}}",
"{1, 2, 3, {4, 5}}",
"{[<cycle to " .. __tostring(Tbl) .. ">]= <cycle to "
.. __tostring(Tbl) .. ">}",
}
for I, Tbl in ipairs(Tbls) do
print(tostring(Tbl))
assert(tostring(Tbl) == Strs[I],
"Assertion failed on " .. __tostring(tostring(Tbl)))
end
end
return {tests=_tostringTest}
|


阶段： selected>1 selected>2 selected>3 selected>4 selected>5 selected>6 selected>7 selected>8 selected>9 selected>10
一、注意力与自控力
1.时常局促不安，心神不宁 selected>1 selected>2 selected>3 selected>4 selected>5
2.注意力不集中或精力分散 selected>1 selected>2 selected>3 selected>4 selected>5
3.总是过于活跃（活动量大） selected>1 selected>2 selected>3 selected>4 selected>5
4.做事不假思索 selected>1 selected>2 selected>3 selected>4 selected>5
5.完不成任务（虎头蛇尾） selected>1 selected>2 selected>3 selected>4 selected>5
6.易生气激怒 selected>1 selected>2 selected>3 selected>4 selected>5
7.不能独立做作业（要人监督） selected>1 selected>2 selected>3 selected>4 selected>5
8.不能在规定的时间内完成作业 selected>1 selected>2 selected>3 selected>4 selected>5
9.与人交谈不能关注去听 selected>1 selected>2 selected>3 selected>4 selected>5
10.组织纪律性差 selected>1 selected>2 selected>3 selected>4 selected>5
二、情绪和行为
1.经常哭泣 selected>1 selected>2 selected>3 selected>4 selected>5
2.易于发怒 selected>1 selected>2 selected>3 selected>4 selected>5
3.经常显得无聊 selected>1 selected>2 selected>3 selected>4 selected>5
4.经常无故发脾气 selected>1 selected>2 selected>3 selected>4 selected>5
5.情绪变化快 selected>1 selected>2 selected>3 selected>4 selected>5
6.经常不快乐 selected>1 selected>2 selected>3 selected>4 selected>5
7.入睡困难或害怕 selected>1 selected>2 selected>3 selected>4 selected>5
8.过度紧张或着急（焦虑） selected>1 selected>2 selected>3 selected>4 selected>5
9.精力不济，常疲乏 selected>1 selected>2 selected>3 selected>4 selected>5
10.有自杀念头 selected>1 selected>2 selected>3 selected>4 selected>5
三、自尊自信
1.对学习不感兴趣 selected>1 selected>2 selected>3 selected>4 selected>5
2.抱怨自己不聪明 selected>1 selected>2 selected>3 selected>4 selected>5
3.抱怨学习任务太难 selected>1 selected>2 selected>3 selected>4 selected>5
4.过于担忧学习 selected>1 selected>2 selected>3 selected>4 selected>5
5.抱怨不被别人喜欢 selected>1 selected>2 selected>3 selected>4 selected>5
6.许多学习任务都很难获得成功 selected>1 selected>2 selected>3 selected>4 selected>5
7.做作业时轻易就放弃 selected>1 selected>2 selected>3 selected>4 selected>5
8.觉得自己不如同学 selected>1 selected>2 selected>3 selected>4 selected>5
9.看起来不开心 selected>1 selected>2 selected>3 selected>4 selected>5
10.感到成功的时候很少 selected>1 selected>2 selected>3 selected>4 selected>5
四、学习环境
1.做家庭作业不听从父母的建议 selected>1 selected>2 selected>3 selected>4 selected>5
2.做家庭作业花的时间很少 selected>1 selected>2 selected>3 selected>4 selected>5
3.很难遵守做作业的时间表 selected>1 selected>2 selected>3 selected>4 selected>5
4.没有别人帮助完成作业有困难 selected>1 selected>2 selected>3 selected>4 selected>5
5.感到家庭学习氛围和生活环境不好 selected>1 selected>2 selected>3 selected>4 selected>5
6.不愿去上学 selected>1 selected>2 selected>3 selected>4 selected>5
7.经常反映在学校不舒服 selected>1 selected>2 selected>3 selected>4 selected>5
8.与同伴相处不融洽 selected>1 selected>2 selected>3 selected>4 selected>5
9.与老师有隔阂，不愿见老师 selected>1 selected>2 selected>3 selected>4 selected>5
10.不能遵守学校或家庭纪律 selected>1 selected>2 selected>3 selected>4 selected>5
五、视觉信息加工
1.写作业速度慢，时间拖得长 selected>1 selected>2 selected>3 selected>4 selected>5
2.提笔忘字，对文字或单词缺乏记忆 selected>1 selected>2 selected>3 selected>4 selected>5
3.写字笔顺颠倒，不正确 selected>1 selected>2 selected>3 selected>4 selected>5
4.写字看一下写一笔 selected>1 selected>2 selected>3 selected>4 selected>5
5.写字部首张冠李戴、左右颠倒 selected>1 selected>2 selected>3 selected>4 selected>5
6.朗读时停顿次数多 selected>1 selected>2 selected>3 selected>4 selected>5
7.阅读时需要手指协助指示文字方向 selected>1 selected>2 selected>3 selected>4 selected>5
8.忘记计算过程中的进位和错位 selected>1 selected>2 selected>3 selected>4 selected>5
9.阅读时逐字阅读、速度慢 selected>1 selected>2 selected>3 selected>4 selected>5
10.朗读时增字减字 selected>1 selected>2 selected>3 selected>4 selected>5
六、听觉信息加工
1.口头语接龙速度慢 selected>1 selected>2 selected>3 selected>4 selected>5
2.区分发音相似的词或字母有困难 selected>1 selected>2 selected>3 selected>4 selected>5
3.在阅读课文中读不熟悉的字词有困难 selected>1 selected>2 selected>3 selected>4 selected>5
4.听写时听不清报读的字词 selected>1 selected>2 selected>3 selected>4 selected>5
5.听课后，让其复核有困难 selected>1 selected>2 selected>3 selected>4 selected>5
6.口述回忆已听过的故事有困难 selected>1 selected>2 selected>3 selected>4 selected>5
7.对老师或家长的指令理解差，无所适从 selected>1 selected>2 selected>3 selected>4 selected>5
8.在阅读课文中读多音的字词不正确 selected>1 selected>2 selected>3 selected>4 selected>5
9.口头交谈经常答非所问 selected>1 selected>2 selected>3 selected>4 selected>5
10.持续交谈有困难 selected>1 selected>2 selected>3 selected>4 selected>5
七、运动技能
1.走路姿势难看，经常跌跤 selected>1 selected>2 selected>3 selected>4 selected>5
2.跑步姿势怪异，动作不协调 selected>1 selected>2 selected>3 selected>4 selected>5
3.好动，但缺乏运动技巧 selected>1 selected>2 selected>3 selected>4 selected>5
4.容易失手打翻或弄倒东西 selected>1 selected>2 selected>3 selected>4 selected>5
5.常弄脏衣服、书本 selected>1 selected>2 selected>3 selected>4 selected>5
6.握笔姿势错误、怪异 selected>1 selected>2 selected>3 selected>4 selected>5
7.写字大小、不易分辨 selected>1 selected>2 selected>3 selected>4 selected>5
8.写字太重或太轻 selected>1 selected>2 selected>3 selected>4 selected>5
9.对画画或书法不感兴趣 selected>1 selected>2 selected>3 selected>4 selected>5
10.不能连贯地书写 selected>1 selected>2 selected>3 selected>4 selected>5
八、语言思维
1.语言发展迟缓，常使用幼稚语言 selected>1 selected>2 selected>3 selected>4 selected>5
2.不能理解指示 selected>1 selected>2 selected>3 selected>4 selected>5
3.同龄人之间不能持续交流 selected>1 selected>2 selected>3 selected>4 selected>5
4.经常忘记读过的内容 selected>1 selected>2 selected>3 selected>4 selected>5
5.常对朗读的内容一知半解 selected>1 selected>2 selected>3 selected>4 selected>5
6.常对背诵的内容背后不甚其解 selected>1 selected>2 selected>3 selected>4 selected>5
7.概括归纳或得出结论有困难 selected>1 selected>2 selected>3 selected>4 selected>5
8.对数学应用题感到困难，不解题意 selected>1 selected>2 selected>3 selected>4 selected>5
9.不喜欢语文写作的作业 selected>1 selected>2 selected>3 selected>4 selected>5
10.口头交谈的句型简单，对长句理解差 selected>1 selected>2 selected>3 selected>4 selected>5
九、形象思维
1.不善于凭借事物形象解决问难题 selected>1 selected>2 selected>3 selected>4 selected>5
2.不喜欢玩拼图玩具和拼图文字 selected>1 selected>2 selected>3 selected>4 selected>5
3.即使晴天也经常错误地分辨时间 selected>1 selected>2 selected>3 selected>4 selected>5
4.不能以自身为基点分清左右东西南北方位 selected>1 selected>2 selected>3 selected>4 selected>5
5.以事物形象理解数学概念有困难 selected>1 selected>2 selected>3 selected>4 selected>5
6.不能回答迅速到达目的地的最短路线 selected>1 selected>2 selected>3 selected>4 selected>5
7.记叙文表达欠条理性和合理性 selected>1 selected>2 selected>3 selected>4 selected>5
8.正确使用地图与图表有困难 selected>1 selected>2 selected>3 selected>4 selected>5
9.不善于讲与其年龄适宜的故事 selected>1 selected>2 selected>3 selected>4 selected>5
10.不理解儿童画画常用表象的象征意义 selected>1 selected>2 selected>3 selected>4 selected>5
十、思维策略
1.没有做计划规划观念 selected>1 selected>2 selected>3 selected>4 selected>5
2.分不清完成作业的步骤 selected>1 selected>2 selected>3 selected>4 selected>5
3.完成作业时没有全面思考 selected>1 selected>2 selected>3 selected>4 selected>5
4.不知道如何做计划修改计划 selected>1 selected>2 selected>3 selected>4 selected>5
5.作文构思有困难 selected>1 selected>2 selected>3 selected>4 selected>5
6.不会使用替代性计划 selected>1 selected>2 selected>3 selected>4 selected>5
7.评价或修改完成的作业有困难 selected>1 selected>2 selected>3 selected>4 selected>5
8.选择或使用记忆的策略有困难 selected>1 selected>2 selected>3 selected>4 selected>5
9.选择或使用思考的策略有困难 selected>1 selected>2 selected>3 selected>4 selected>5
10.学习迁移能力差 selected>1 selected>2 selected>3 selected>4 selected>5
提交


Hi All,
First of all: Great product!
I'm actually very interested in buying a setup, but I just have following questions:
* Is it possible to use the amp meters in a standallone setup, I mean just wire them directly to the raspberry & read-out the data into emoncms?
* Anybody experience in connecting a ultrasonic sensor & display the data in emoncms ..?
Thx,
Thomas
Re: Goal: Only wired sensors + use of ultrasonic sensor for waterlevel = Possible ?
From your very brief description, I don't quite understand what you want. What do you have in mind when you write "amp meter"?
I cannot recollect seeing any reports of anyone using ultrasonic level detectors, but it should be possible if you design the correct interface. What this is will depend on many factors.


|
Jetson Inference
DNN Vision Library
|
The videoOutput API is for rendering and transmitting frames to video input devices such as display windows, broadcasting RTP network streams to remote hosts over UDP/IP, and saving videos/images/directories to disk. More...
#include <videoOutput.h>
Public Member Functions | |
| virtual | ~videoOutput () |
| Destroy interface and release all resources. More... | |
| template<typename T > | |
| bool | Render (T *image, uint32_t width, uint32_t height) |
| Render and output the next frame to the stream. More... | |
| virtual bool | Render (void *image, uint32_t width, uint32_t height, imageFormat format) |
| Render and output the next frame to the stream. More... | |
| virtual bool | Open () |
| Begin streaming the device. More... | |
| virtual void | Close () |
| Stop streaming the device. More... | |
| bool | IsStreaming () const |
| Check if the device is actively streaming or not. More... | |
| uint32_t | GetWidth () const |
| Return the width of the stream, in pixels. More... | |
| uint32_t | GetHeight () const |
| Return the height of the stream, in pixels. More... | |
| float | GetFrameRate () const |
| Return the framerate, in Hz or FPS. More... | |
| const URI & | GetResource () const |
| Return the resource URI of the stream. More... | |
| const videoOptions & | GetOptions () const |
| Return the videoOptions of the stream. More... | |
| void | AddOutput (videoOutput *output) |
| Add an output sub-stream. More... | |
| uint32_t | GetNumOutputs () const |
| Return the number of sub-streams. More... | |
| videoOutput * | GetOutput (uint32_t index) const |
| Return a sub-stream. More... | |
| virtual void | SetStatus (const char *str) |
| Set a status string (i.e. More... | |
| virtual uint32_t | GetType () const |
| Return the interface type of the stream. More... | |
| bool | IsType (uint32_t type) const |
| Check if this stream is of a particular type. More... | |
| template<typename T > | |
| bool | IsType () const |
| Check if a this stream is of a particular type. More... | |
| const char * | TypeToStr () const |
| Convert this stream's class type to string. More... | |
Static Public Member Functions | |
| static videoOutput * | Create (const videoOptions &options) |
| Create videoOutput interface from a videoOptions struct that's already been filled out. More... | |
| static videoOutput * | Create (const char *URI, const videoOptions &options=videoOptions()) |
| Create videoOutput interface from a resource URI string and optional videoOptions. More... | |
| static videoOutput * | Create (const char *URI, const commandLine &cmdLine) |
| Create videoOutput interface from a resource URI string and parsing command line arguments. More... | |
| static videoOutput * | Create (const char *URI, const int argc, char **argv) |
| Create videoOutput interface from a resource URI string and parsing command line arguments. More... | |
| static videoOutput * | Create (const int argc, char **argv, int positionArg=-1) |
| Create videoOutput interface by parsing command line arguments, including the resource URI. More... | |
| static videoOutput * | Create (const commandLine &cmdLine, int positionArg=-1) |
| Create videoOutput interface by parsing command line arguments, including the resource URI. More... | |
| static videoOutput * | CreateNullOutput () |
| Create videoOutput interface that acts as a NULL output and does nothing with incoming frames. More... | |
| static const char * | Usage () |
| Usage string for command line arguments to Create() More... | |
| static const char * | TypeToStr (uint32_t type) |
| Convert a class type to a string. More... | |
Protected Member Functions | |
| videoOutput (const videoOptions &options) | |
Protected Attributes | |
| bool | mStreaming |
| videoOptions | mOptions |
| std::vector< videoOutput * > | mOutputs |
The videoOutput API is for rendering and transmitting frames to video input devices such as display windows, broadcasting RTP network streams to remote hosts over UDP/IP, and saving videos/images/directories to disk.
videoOutput interfaces are implemented by glDisplay, gstEncoder, and imageWriter. The specific implementation is selected at runtime based on the type of resource URI. An instance can have multiple sub-streams, for example simultaneously outputting to a display and encoded video on disk or RTP stream.
videoOutput supports the following protocols and resource URI's:
- `display://0` for rendering to display using OpenGL, where `0` corresponds to the display number. By default, an OpenGL window will be created, unless the `--headless` command line option is used. - `rtp://<remote-host>:1234` to broadcast a compressed RTP stream to a remote host, where you should substitute `<remote-host>` with the remote host's IP address or hostname, and `1234` is the port. - `file:///home/user/my_video.mp4` for saving videos, images, and directories of images to disk. You can leave off the `file://` protocol identifier and it will be deduced from the path. It can be a relative or absolute path. You can output a sequence of images using a path of the form `my_dir/image_%i.jpg` (where `%i` can include printf-style modifiers like `%03i`). The `%i` will be replaced with the image number in the sequence. If just a directory is specified, then by default it will create a sequence of the form `%i.jpg` in that directory. Supported video formats for saving include MKV, MP4, AVI, and FLV. Supported codecs for encoding include H.264, H.265, VP8, VP9, and MJPEG. Supported image formats for saving include JPG, PNG, TGA, and BMP.
|
virtual |
Destroy interface and release all resources.
|
protected |
|
inline |
Add an output sub-stream.
When a frame is rendered to this stream, it will be rendered to each sub-stream.
|
virtual |
Stop streaming the device.
Reimplemented in gstEncoder.
|
static |
Create videoOutput interface from a videoOptions struct that's already been filled out.
It's expected that the supplied videoOptions already contain a valid resource URI.
|
static |
Create videoOutput interface from a resource URI string and optional videoOptions.
|
static |
Create videoOutput interface from a resource URI string and parsing command line arguments.
|
static |
Create videoOutput interface from a resource URI string and parsing command line arguments.
|
static |
Create videoOutput interface by parsing command line arguments, including the resource URI.
| positionArg | indicates the positional argument number in the command line of the resource URI (or -1 if a positional argument isn't used, and should instead be parsed from the --input= option). |
|
static |
Create videoOutput interface by parsing command line arguments, including the resource URI.
| positionArg | indicates the positional argument number in the command line of the resource URI (or -1 if a positional argument isn't used, and should instead be parsed from the --input= option). |
|
static |
Create videoOutput interface that acts as a NULL output and does nothing with incoming frames.
CreateNullOutput() can be used when there are no other outputs created and programs expect one to run.
|
inline |
Return the framerate, in Hz or FPS.
|
inline |
Return the height of the stream, in pixels.
|
inline |
Return the number of sub-streams.
|
inline |
Return the videoOptions of the stream.
|
inline |
Return a sub-stream.
|
inlinevirtual |
Return the interface type of the stream.
This could be one of the following values:
Reimplemented in glDisplay, gstEncoder, and imageWriter.
|
inline |
Return the width of the stream, in pixels.
|
inline |
Check if the device is actively streaming or not.
true
if the device is streaming (open), or false
if it's closed or has reached EOS (End Of Stream).
|
inline |
Check if this stream is of a particular type.
|
inline |
Check if a this stream is of a particular type.
Can be used with glDisplay, gstEncoder, and imageWriter. For example:
if( stream->IsType<glDisplay>() ) glDisplay* display = (glDisplay*)stream; // safe to cast
|
virtual |
Begin streaming the device.
After Open() is called, frames from the device can begin to be rendered.
Open() is not stricly necessary to call, if you call one of the Render() functions they will first check to make sure that the stream is opened, and if not they will open it automatically for you.
true
on success, false
if an error occurred opening the stream. Reimplemented in gstEncoder, and glDisplay.
|
inline |
Render and output the next frame to the stream.
The image formats supported by this templated version of Render() include the following:
IMAGE_RGB8
)IMAGE_RGBA8
)IMAGE_RGB32F
)IMAGE_RGBA32F
)The image format will automatically be deduced from these types. If other types are used with this overload, a static compile-time error will be asserted.
| image | CUDA pointer containing the image to output. |
| width | width of the image, in pixels. |
| height | height of the image, in pixels. |
true
on success, false
on error.
|
virtual |
Render and output the next frame to the stream.
The image formats supported by Render() are IMAGE_RGB8
(uchar3), IMAGE_RGBA8
(uchar4), IMAGE_RGB32F
(float3), and IMAGE_RGBA32F
(float4).
| image | CUDA pointer containing the image to output. |
| width | width of the image, in pixels. |
| height | height of the image, in pixels. |
| format | format of the image ( |
true
on success, false
on error. Reimplemented in glDisplay, imageWriter, and gstEncoder.
|
virtual |
Set a status string (i.e.
status bar text on display window). Other types of interfaces may ignore the status text.
Reimplemented in glDisplay.
|
inline |
Convert this stream's class type to string.
|
static |
Convert a class type to a string.
|
inlinestatic |
Usage string for command line arguments to Create()
|
protected |
|
protected |
|
protected |


pcf.particle.aws.efs package¶
Submodules¶
pcf.particle.aws.efs.efs_instance module¶
-
class
pcf.particle.aws.efs.efs_instance.
EFSInstance
(particle_definition, session=None)¶ Bases:
pcf.core.aws_resource.AWSResource
This is the implementation of Amazon’s Elastic File System.
-
RETURN_PARAM_FILTER
= {'CreationToken', 'Encrypted', 'FileSystemId', 'KmsKeyId', 'Name', 'OwnerId', 'PerformanceMode'}¶
-
START_PARAM_FILTER
= {'CreationToken', 'Encrypted', 'KmsKeyId', 'PerformanceMode'}¶
-
UNIQUE_KEYS
= ['aws_resource.custom_config.instance_name']¶
-
_describe_file_systems
()¶ Uses instance_name as a filter for boto3 describe_file_systems()
Returns: boto3 describe_file_systems() response
-
_set_unique_keys
()¶ Logic that sets keys from state definition that are used to uniquely identify the S3 Bucket
-
_start
()¶ Calls boto3 create_file_system https://boto3.readthedocs.io/en/latest/reference/services/efs.html#EFS.Client.create_file_system :returns: boto3 create_file_system() response
-
_stop
()¶ Elastic File System does not have a stopped state so calls terminate
-
_terminate
()¶ Calls boto3 delete_file_system
Returns: response of boto3 delete_file_system
-
_update
()¶ Logic that updates the particle. This is implemented for each individual particle
-
create_mount_target
(subnet_id, **kwargs)¶ Creates a mount target for a file system
Parameters: - subnet_id (string) – ID of the subnet to add the mount target in
- **kwargs – options for boto3 create_mount target
Returns: response of boto3 create_mount_target
Creates or overwrites tags associated with file system :param fs_tags: Array of Tag objects to add, each object is a key-value pair :type fs_tags: list
-
delete_mount_target
(mount_target_id)¶ Deletes the specified mount target
Parameters: mount_target_id (string) – ID of the mount target to delete Returns: response of boto3 delete_mount_target
Deletes the specified tags from a file system
Parameters: tag_keys (list) – List of tag keys to delete
-
describe_mount_targets
()¶ Returns the descriptions of all the current mount targets, or a specific mount target, for the file system
Parameters: - mount_target_id (string) – ID of the mount target that you want to have described
- **kwargs – options for boto3 describe_mount_targets
Returns: response of boto3 describe_mount_targets
Returns the tags associated with the file system
Returns: boto3 describe_tags() response
-
flavor
= 'efs_instance'¶
-
get_status
()¶ Gets current status of the EFS instance :returns: status (dict)
-
is_state_definition_equivalent
()¶ Compares the desired state and current state definitions.
Returns: bool
-
modify_mount_target_security_groups
(mount_target_id, security_groups)¶ Modifies the set of security groups in effect for a mount target
Parameters: - mount_target_id (string) – ID of the mount target whose security groups you want to modify
- security_groups (list) – Array of VPC security group IDs
Returns: reponse of boto3 modify_mount_target_security_groups
-
state_lookup
= {'available': <State.running: 1>, 'creating': <State.pending: 4>, 'deleted': <State.terminated: 3>, 'deleting': <State.pending: 4>}¶
-
sync_state
()¶ Elastic File System implementation of sync state. Calls get status and sets the current state
-


ambient.get_nc_db_from_roms¶
| Release: | 1.1 |
|---|---|
| Date: | Nov 08, 2017 |
-
ambient.
get_nc_db_from_roms
(nc_roms, nc_file, t_idx, j_idx, i_idx, chem_names)[source][source]¶ Create a netCDF4-classic dataset ready to use with
TAMOC
simulation models from ROMS netCDF output.Some of the model variable names used in ROMS are different from those recommended for CTD data by NODC. Moreover, ROMS output usually includes results at many horizonal grid locations; whereas, the
TAMOC
models expect to have profile data for a single (lat, lon) location. This function translates the ROMS output at a specified point to a netCDF file in the format required byTAMOC
.Parameters: nc_roms : netCDF4 dataset object, file path or string
File name (supplied as a path or string) to the ROMS output that will be used to create a
TAMOC
ambient profile.nc_file : file path or string
File name (supplied as a path or string) to use to create the netCDF database.
t_idx : integer
time-index to the desired profile information (time steps)
j_idx : integer
j-index to the grid location where the profile should be extracted.
i_idx : integer
i-index to the grid location where the profile should be extracted.
chem_names : string list
string list of variables to extract in addition to depth, salinity, temperature, and pressure.
Returns: nc :
netCDF4.Dataset
objectAn object that contains the new netCDF dataset object/
See also
netCDF4
,octant
,octant.roms
Notes
The author of this module (S. Socolofsky) is not a ROMS expert. Variable names assumed present in ROMS were those in the netCDF file extracted from http://barataria.tamu.edu:8080/.
TODO (S. Socolofsky 7/12/2013): Determine whether other ROMS simulations will have different variable names. If so, provide inputs to this function containing an appropriate mapping of names.
TODO (S. Socolofsky 7/15/2013): The depth values returned here are not monotonically increasing. Make sure you are using the updated octant modules.
Examples
>>> nc_roms = 'http://barataria.tamu.edu:8080/thredds/dodsC/' + \ 'ROMS_Daily/08122012/ocean_his_08122012_24.nc' >>> nc_file = './test/output/test_roms.nc' >>> t_idx = 0 >>> j_idx = 400 >>> i_idx = 420 >>> chem_names = ['dye_01', 'dye_02']


Machine Learning with Spark MLlib
Apache Spark 2.4
Spark MLlib
- Spark library for distributed machine learning
- Simplifies the development and usage of large-scale machine learning
- Uses Spark SQL for data access
Features of Spark MLlib
- Machine learning algorithms
- Classification, regression, clustering, collaborative filtering
- Featurization
- Feature extraction, transformation, dimensionality reduction, selection
- Pipelines
- Constructing, evaluating, and tuning machine learning pipelines
- Persistence
- Saving and loading algorithms, models, and pipelines
- Utilities
- Linear algebra, statistics, data handling
Predictive analytic workflow
- Use of a machine learning algorithm is only one component of a predictive analytic workflow
- There may also be pre-processing steps for the machine learning algorithm to work
- Expectations of data scientists and data engineers
Typical machine learning workflow
- Loading data (aka data ingestion)
- Preparing data (aka data cleanup)
- Extracting features (aka feature extraction)
- Fitting model (aka model training)
- Scoring (or predictionize)
Before Going To Production
- Testing model (aka model testing)
- Selecting the best model (aka model selection or model tuning)
- Deploying model (aka model deployment and integration)
Goal of ML Pipeline
Assemble and configure
practical distributed machine learning pipelines
as easy-to-use pieces
to compose more complex ones with ease (like Lego™ blocks)
Features of ML Pipeline
- DataFrame as a dataset format
- ML Pipelines API is similar to scikit-learn
- Easy debugging (via inspecting columns added during execution)
- Parameter tuning
- Compositions (to build more complex pipelines out of existing ones)
Components of ML Pipeline
- Pipelines and PipelineStages
- Transformers
- Estimators
- Models
- Evaluators
- Cross Validators
- Params and ParamMaps
Pipeline with Transformers, Estimator, and Model
ML Pipeline Design
- Choose Transformers
- Select Estimator (to produce a Model)
- Create Pipeline
- Fit the pipeline to a training Dataset
- Use the Model
ML Pipeline Design Applied - Step 1
ML Pipeline Design Applied - Step 3
- Creating Pipeline
- new Pipeline()
- setStages
ML Pipeline Design Applied - Step 4
ML Pipeline Design Applied - Step 5
Demo
Email Classification
Using Logistic Regression


So I think the best place to start is by saying, everything in html has an imaginary square/box around it. Whether it's a "p" tag of text, an image or just anything else you want space around, or to place a margin on. It's super easy and hopefully my awful way of wording things make sense.
So using the image above (if it's there, fingers crossed) you can see that the padding sits right outside whatever content you're adding. Now what "padding" is, is really just expanding that imaginary box I told you about before, to the border.
So for this text here, I'm going to add padding around it as an example. If I wanted 5px of space around this h4 tag, on both above, below and to both sides, I would have a class or id with the value "padding: 5px;" and link it to this tag. By adding just 5px, you're adding 5 pixels of space around all sides, if you wanted to add a different amount of pixels on each side, you would write something like "padding: 4px 8px 4px 8px;". This adds 4px of space to the top and bottom of our tag, and 8 to the left and right, the easiest way to remember this (for me atleast) is to think of it as just an ordinary clockwise motion, but I'm just going to leave it at 5px each side and now we can move to borders.
So the term "Border" should be self explanatory, it's doing exactly what it says, adding a border to our padding. What it's really doing is making that imaginary box, actually appear. And this is super useful because it's really showing you where exactly your content is positioned on your project, making it so much better to work around.
Once again, I'm going to add the padding to this box of text, but also add the border as an example. This is very similar to the padding, it's formatted almost identically, but I'm going to run over the basics of borders and add a very thin box around here, so for this I would have the value "border: 1px solid black;". This creates the 1px solid line around each side of our content, same as the padding. And if you were wanting to add a thicker border on just one side, you would do almost the same as before, but you would need to specify you're changing the width of the border by "border-width: 4px 6px 4px 6px;". There's so much more you can do with borders, even changing the colours of each side by using "border-color: black blue black blue;" and other border styles, but we can move other to margins now.
So margins are pretty much the same as paddings, except we aren't adding space between our content and border this time, we're adding space around our border, or the whole element really.
Just another example for this text here although it won't really look like much has changed, so we're gonig to change the border too. The CSS for margins being extremely similar to padding makes this simple to remember, just by using "margin: 5px;" or "margin: 4px 6px 4px 6px;". Another way to changing margin width (which you can also do for padding), is "margin-top: 5px;", this is also availble to margin-left, margin-right or margin-bottom.
That's the absolute basic and essentials for understanding padding, borders and margins, and hopefully it all makes sense! I've gone over what each individual element does, and how it makes whatever project you're working on, easier to work on or just look nicer, thanks for reading! :)


We examine metrics!
- unleash visionary technologies
- envisioneer magnetic communities
- transition distributed e-tailers
- integrate wireless convergence
- disintermediate integrated e-business
- evolve bricks-and-clicks schemas
- orchestrate open-source metrics
- monetize out-of-the-box platforms


Technical and learning reflections
Examples of projects and tinkerings
Contact details and a little about me


You Could Have Invented Lambda Expressions
Delegate types and lambda expressions have been a part of the .NET tool belt for a while now, so they show up everywhere. If you’ve ever used StructureMap, AutoMapper, ASP.NET MVC and the like, then you’ve surely run into them. Despite this, delegates and lambdas tend to confuse developers when first encountered. Even when you get comfortable with the syntax as it’s used in your favorite library, you might not really be familiar with what they are or how they allow for such seemingly magical statements.
Let’s pretend that delegate types and lambdas don’t exist yet, and then reinvent them in terms of other .NET concepts that are more widely understood.
Suppose we have been given an IEnumerable<Customer> and we want to filter that down to the list of those customers who live in Texas. Without delegates, we could write the obvious loop like so:
Yeesh. I have written foreach-if-add loops a thousand times. Whenever we find ourselves writing virtually the same thing again and again, we should take a step back and think, “Is there a deeper concept here I could pull out into a library?” We have some subtle code duplication whenever we write foreach-if-add loops.
To remove duplication, we first identify what parts vary from one instance of the pattern to the next. For foreach-if-add loops, the things that vary are the type of the items being filtered, and the if-statement’s condition expression. To bottle up the foreach-if-add loop, we need a new method that takes in the condition as an argument. Without delegates, we could deal with this using an interface:
Ok, so we’ve pulled out the foreach-if-add loop into a reusable Where
extension method. Still, though, that’s a lot of boilerplate code: every time we want to call Where
with a new filter, we have to bottle it up in a whole new class.
Let’s start removing boilerplate code until we’re left with delegates! With this example, we can imagine a whole family of interfaces that have one thing in common: interfaces with a single method named RunMe
, whose implementing classes contain only that method. If we knew this family of interfaces only have one method, and its name was always RunMe
, then we could avoid even writing its name: condition.RunMe(item)
could be shortened to simply condition(item)
. Since the relevant part of a single IFilterCondition
implementation is the body of the now-nameless method, we should be able to simply provide the code for that method inline:
We can imagine that this use of the delegate
keyword is just shorthand for an instance of a class implementing our single-method interface.
Since most of these small unnamed classes exist just to evaluate and return a single expression, we might as well get rid of the return
keyword and braces. Since we already know what the item type T is, we might as well leave out the type declaration of the customer
parameter, allowing the compiler to fill in the blank. We’ll need something between the argument list and the return expression so the compiler knows which is which, so we introduce the => operator. This makes the delegate
keyword redundant, leaving us with some valid (and clean!) C#:
There’s a lot more to delegates and lamda expressions, but in most cases I find it easiest to reason about them as shorthand for the interfaces and classes we would have otherwise used.
If you found this blog to be helpful subscribe to our blog feed for the freshest content.


AssertHelper
These methods help with creating custom assertions.
AssertFailure
Creates a custom
AssertFailedException and provides information for the exception.
Usage
public static void AssertFailed(string assertionName, string message, params object[] parameters)
Supported Releases: 1.2 and later


Content
Song I listened to last
My First Project Page (music source separation)
My Second Project Page Page (wotb replays)


Titles
Html5 lists
Sorted lists
Unsorted lists
Nested lists
Definition lists
Menu lists
Html5 tables
Html5 forms


public interface TopicDAO
Topic
.
This interface defines methods which are expected to be
implementd by a specific data access driver. The intention is
to provide all functionality needed to update, insert, delete and
select some specific data.| Modifier and Type | Method and Description |
|---|---|
int |
addNew(Topic topic)
Adds a new Topic.
|
int |
countUserTopics(int userId)
How many topics were created by a given user
|
void |
decrementTotalReplies(int topicId)
Decrements the number of replies the topic has
|
void |
delete(Topic topic,
boolean fromModeration)
Delete a Topic.
|
void |
deleteByForum(int forumId)
Deletes all topics from a forum
|
void |
deleteTopics(List topics,
boolean fromModeration)
Deletes a set of topics
|
SearchResult |
findTopicsByDateRange(SearchArgs args) |
void |
fixFirstLastPostId(int topicId)
Fixes the fields topic_first_post_id and
topic_last_post_id.
|
int |
getMaxPostId(int topicId)
Gets the last post id associated to the topic
|
int |
getMinPostId(int topicId)
Gets the first post id associated to the topic
|
int |
getTotalPosts(int topicId)
Gets the number of posts the topic has.
|
void |
incrementTotalReplies(int topicId)
Increments the number of replies the topic has
|
void |
incrementTotalViews(int topicId)
Increments the number of times the topic was saw
|
boolean |
isUserSubscribed(int topicId,
int userId)
Return the subscrition status of the user on the topic.
|
void |
lockUnlock(int[] topicId,
int status)
Lock or unlock a topic.
|
List |
notifyUsers(Topic topic)
Get the users to notify
|
void |
removeSubscription(int topicId,
int userId)
Remove the user's subscription of the topic
|
void |
removeSubscriptionByTopic(int topicId)
Clean all subscriptions of some topic
|
List |
selectAllByForum(int forumId)
Selects all topics associated to a specific forum
|
List |
selectAllByForumByLimit(int forumId,
int startFrom,
int count)
Selects all topics associated to a specific forum, limiting the total number
of records returned.
|
Topic |
selectById(int topicId)
Gets a specific
Topic . |
List |
selectByUserByLimit(int userId,
int startFrom,
int count)
Selects all topics associated to a specific user and belonging to
given forums
|
List |
selectHottestTopics(int limit)
Selects hottest topics
|
Topic |
selectRaw(int topicId)
Gets a topic's information from the topics table only.
|
List |
selectRecentTopics(int limit)
Selects recent topics
|
List |
selectTopicTitlesByIds(Collection idList) |
void |
setFirstPostId(int topicId,
int postId)
Sets the ID of the first post of the topic
|
void |
setLastPostId(int topicId,
int postId)
Sets the ID of the last post of the topic
|
void |
setModerationStatus(int forumId,
boolean status)
Sets the moderatation flag for all topics of a given forum.
|
void |
setModerationStatusByTopic(int topicId,
boolean status)
Sets the moderatation flag for a given topic.
|
void |
subscribeUser(int topicId,
int userId)
Subscribe the user for notification of new post in the topic
|
void |
subscribeUsers(int topicId,
List users)
Subscribe a set of users for notification of new post in the topic
|
Map |
topicPosters(int topicId)
Get all unique posters of some topic
|
void |
update(Topic topic)
Updates a Topic.
|
void |
updateReadStatus(int topicId,
int userId,
boolean read)
Change the topic read status
|
void fixFirstLastPostId(int topicId)
topicId
- The topic id to fixTopic selectById(int topicId)
Topic
.topicId
- The Topic ID to searchTopic
object containing all the informationselectAllByForum(int forumId)
Topic selectRaw(int topicId)
topicId
- The topic id to getList selectAllByForum(int forumId)
forumId
- The forum id to select the topicsArrayList
with all topics found. Each entry is a net.jforum.Topic
objectList selectTopicTitlesByIds(Collection idList)
List selectAllByForumByLimit(int forumId, int startFrom, int count)
forumId
- The forum id to select the topicsstartFrom
- intcount
- intArrayList
with all topics found. Each entry is a net.jforum.Topic
objectList selectByUserByLimit(int userId, int startFrom, int count)
userId
- int User ID.startFrom
- intcount
- intint countUserTopics(int userId)
userId
- the user id to checkvoid delete(Topic topic, boolean fromModeration)
topic
- The Topic ID to deletefromModeration
- booleanvoid deleteTopics(List topics, boolean fromModeration)
topics
- The topics to delete. Each entry must be
an instance of net.jforum.entities.TopicfromModeration
- booleanvoid deleteByForum(int forumId)
forumId
- intvoid update(Topic topic)
topic
- Reference to a Topic
object to updateint addNew(Topic topic)
topic
- Reference to a valid and configured Topic
objectvoid incrementTotalViews(int topicId)
topicId
- The topic ID to increment the total number of viewsvoid incrementTotalReplies(int topicId)
topicId
- The topic ID to increment the total number of repliesvoid decrementTotalReplies(int topicId)
topicId
- The topic ID to decrement the total number of repliesvoid setLastPostId(int topicId, int postId)
topicId
- Topic IDpostId
- Post IDint getMaxPostId(int topicId)
topicId
- The topic idint getTotalPosts(int topicId)
topicId
- The topic idList notifyUsers(Topic topic)
topic
- The topicArrayList
of User
objects. Each
entry is an user who will receive the topic anwser notificationvoid subscribeUsers(int topicId, List users)
topicId
- the topic idusers
- the relation of User
instances to subscribevoid subscribeUser(int topicId, int userId)
topicId
- The topic iduserId
- The user idboolean isUserSubscribed(int topicId, int userId)
topicId
- The topic iduserId
- The user idvoid removeSubscription(int topicId, int userId)
topicId
- The topic iduserId
- the User idvoid removeSubscriptionByTopic(int topicId)
topicId
- The topic idvoid updateReadStatus(int topicId, int userId, boolean read)
topicId
- The topic iduserId
- The user idread
- true
or false
void lockUnlock(int[] topicId, int status)
topicId
- The topic id to perform the action onstatus
- Use Topic.STATUS_LOCKED
to lock the topic, or
Topic.STATUS_UNLOCKED
to unlock.List selectRecentTopics(int limit)
limit
- The number of topics to retrieveList selectHottestTopics(int limit)
limit
- The number of topics to retrievevoid setFirstPostId(int topicId, int postId)
topicId
- Topic IDpostId
- Post IDint getMinPostId(int topicId)
topicId
- The topic idvoid setModerationStatus(int forumId, boolean status)
forumId
- The forum idstatus
- booleanvoid setModerationStatusByTopic(int topicId, boolean status)
topicId
- The topic idstatus
- booleanMap topicPosters(int topicId)
topicId
- intUser
instance with minimum
data filledSearchResult findTopicsByDateRange(SearchArgs args)
args
- JForum by JForum Team - http://www.jforum.net/team.jsp - (c) JForum Team


Snow Patrol at the Royal Concert Hall, Nottingham Snow Patrol at the Royal Concert Hall, Nottingham 20 Nov 2019, 11:20 by Simon Wilson Snow Patrol Performing Their 'Snow Patrol Reworked Tour 2019' At The Royal Concert Hall Nottingham On Tuesday 19th November 2019 X191119KC1-3 PHOTOGRAPHER : KEVIN COOPER(Image: Kevin Cooper) Snow Patrol Performing Their 'Snow Patrol Reworked Tour 2019' At The Royal Concert Hall Nottingham On Tuesday 19th November 2019 X191119KC1-9 PHOTOGRAPHER : KEVIN COOPER(Image: Kevin Cooper) Snow Patrol Performing Their 'Snow Patrol Reworked Tour 2019' At The Royal Concert Hall Nottingham On Tuesday 19th November 2019 X191119KC1-8 PHOTOGRAPHER : KEVIN COOPER(Image: Kevin Cooper) Snow Patrol Performing Their 'Snow Patrol Reworked Tour 2019' At The Royal Concert Hall Nottingham On Tuesday 19th November 2019 X191119KC1-6 PHOTOGRAPHER : KEVIN COOPER(Image: Kevin Cooper) Snow Patrol Performing Their 'Snow Patrol Reworked Tour 2019' At The Royal Concert Hall Nottingham On Tuesday 19th November 2019 X191119KC1-7 PHOTOGRAPHER : KEVIN COOPER Snow Patrol Performing Their 'Snow Patrol Reworked Tour 2019' At The Royal Concert Hall Nottingham On Tuesday 19th November 2019 X191119KC1-5 PHOTOGRAPHER : KEVIN COOPER(Image: Kevin Cooper) Snow Patrol Performing Their 'Snow Patrol Reworked Tour 2019' At The Royal Concert Hall Nottingham On Tuesday 19th November 2019 X191119KC1-4 PHOTOGRAPHER : KEVIN COOPER(Image: Kevin Cooper) Snow Patrol Performing Their 'Snow Patrol Reworked Tour 2019' At The Royal Concert Hall Nottingham On Tuesday 19th November 2019 X191119KC1-2 PHOTOGRAPHER : KEVIN COOPER(Image: Kevin Cooper)


|
FreeYourSoul Online
0.0.1
MMORPG
|
FreeYourSoul Online, a scalable mmorpg game
FreeYourSoul Online is using an original battle system inspired by Final Fantasy turn per turn systems. It is called Side Condition Timed Battle (SCTB) and it is explained into further details here.


I bought the RFM12Pi kit with SD card, LCD, and TX, only to find that my raspberry pi was dead.
Determined to make some lemonade with the parts I have, I would like to hack this RFM12Pi into my BeagleBone black which is a far more capable device than the Pi is anyway.
At any rate, which of the 10 pins on this RFM12Pi are being used and for what?
If I can get the BBB talking to the module it might open up some other doors for people to use it as a base instead.
Re: RFM12Pi pinout for connecting to beaglebone black
Hi,
RFM12Pi V2 pinout is available here: http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2
The Beaglebone black looks like a really nice bit of kit. Please let us know how you get on interfacing with the RFM12Pi. It should be quite simple. Al it needs is a serial port. It would be great to get a blog post up with instructions of how to connect the RFM12Pi to a beaglebone and run emoncms.
Instructions for running emoncms on the pi are available here, should be similar for the bone I imagine: http://emoncms.org/site/docs/raspberrypibuild
Best of luck!
Re: RFM12Pi pinout for connecting to beaglebone black
Hi Anthony.
I'm interested in your feedback about the RFM12Pi working on the BeagleBone. Do you intend to use it as just an emonBase (repeater to a remote server) or do you also want to use it as a local server (database, emoncms instance) ?
Re: RFM12Pi pinout for connecting to beaglebone black
I've got the RFM12Pi connected to my BBB, and am able to send / receive serial commands.
It appears as though the packets that are being passed back and forth are not just standard strings? I am trying to get the standard Tx_SimpleRFM12B_demo to give me data I can use, and the Rx_SimpleRFM12B_demo to let me give it a meaningful update (so I can update the EmonLCD)
Right now I am just trying to get communication happening. I have a ZWave HEM energy monitor that is tied to my BBB, I would like to feed that sensor data to EmonCMS, perhaps even running locally. But for now I would me happy simply relaying the values to my EmonLCD.
Anyone familiar with how I can encode/decode the data?
Re: RFM12Pi pinout for connecting to beaglebone black
I forgot to include, when I use the simply TX sketch, it is received on the BBB like this:
root@beaglebone:~/node-zwave# node rftest.js
I am connected
10 63 0 126 0 189 0 252 0
10 64 0 128 0 192 0 0 1
10 65 0 130 0 195 0 4 1
10 66 0 132 0 198 0 8 1
10 67 0 134 0 201 0 12 1
10 68 0 136 0 204 0 16 1
10 69 0 138 0 207 0 20 1
10 70 0 140 0 210 0 24 1
10 71 0 142 0 213 0 28 1
The leading 10 I will assume is the nodeID, then it appears as though the counters in the Tx demo are incrementing as expected, each series is separated by a number which increments as it gets above 255?
A simple CSV format would have been nice :)
Re: RFM12Pi pinout for connecting to beaglebone black
I found some clues in this python script of how that packet needs to look, back in business:
https://github.com/emoncms/raspberrypi/blob/master/rfm2pigateway.py
Re: RFM12Pi pinout for connecting to beaglebone black
OK, trying to set the time, using the python script as an example:
sp.write("10,00,22,00,s");
For some reason in the HomeEnergyMonitor script running on the LCD:
https://github.com/openenergymonitor/EmonGLCD/blob/master/HomeEnergyMoni...
On line 123: RTC.adjust(DateTime(2012, 1, 1, rf12_data[1], rf12_data[2], rf12_data[3]));
The data being received looks like:
rf12_data[1]: 0
rf12_data[2]: 15
rf12_data[3]: 0
Any ideas where I am going wrong? I am able to get the Rx_SimpleRFM12B_demo script to output the correct values if I do this, so I do believe I am sending data properly:
sp.write("1,0,2,0,3,0,4,0,a");
Re: RFM12Pi pinout for connecting to beaglebone black
OK I can get it to set the time on the LCD if I do the following:
Modify line 123: RTC.adjust(DateTime(2012, 1, 1, rf12_data[1], rf12_data[2], rf12_data[3]));
To: RTC.adjust(DateTime(2012, 1, 1, rf12_data[0], rf12_data[1], rf12_data[2]));
And then on the serial port write this: sp.write("06,21,00,s");
This will set the LCD to 6:21
This is progress, but I am sure that I am not doing this the right way, and it seems that when I do this the LCD cant receive any more commands after this one. It does, however continue to report its temperature, any help would be very appreciated.
Re: RFM12Pi pinout for connecting to beaglebone black
I was trying to pass in a value to of 1353, and I was able to do it with:
sp.write("73,5,0,0,0,0,0,0,a\r");
It was received by Rx_SimpleRFM12B_demo as:
power1: 1353
power2: 0
power3: 0
power4: 0
Looks correct to me, so I am a little baffled here on why doing the same doesnt work with the LCD running the homeenergymonitor code.
Re: RFM12Pi pinout for connecting to beaglebone black
Tested the LCD hardware running Rx_SimpleRFM12B_demo and the sketch receives the packets flawlessly.
I'm not sure, but there must be something different about the way the HomeEnergyMonitor processes the packet. Is something like 1353 not in the acceptable range for power1 value?
Re: RFM12Pi pinout for connecting to beaglebone black
Well, I have a working system now.
https://plus.google.com/112693340411141805940/posts/BPVmjEyvfSy
Would still like to know more about setting time, it seems like the python code and the arduino code on the other end just dont jive.
For anyone who happens upon this thread in the future, and would like to get the RFM12Pi talking to their BBB. It is important to note that by default the UART ports are not enabled, this can be done manually but is a huge PIA. Adafruit has a library that makes this real easy:
http://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-bla...
http://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-bla...
Once that is done you can then connect to /dev/ttyO1 // note that is a O, not a zero
I used nodejs, as it is preinstalled on the BBB and super easy to work with. Here is some sample code:
var serialport = require("serialport");
var SerialPort = serialport.SerialPort; // localize object constructor
var sp = new SerialPort("/dev/ttyO1", {parser: serialport.parsers.readline("\n") });
sp.on("data", function (data) {
console.log(data);
});
sp.on("open", function () {
console.log("I am connected");
sp.write("73,5,0,0,0,0,0,0,s");
//sp.write("06,0,15,0,0,0,s");
});
Re: RFM12Pi pinout for connecting to beaglebone black
Hi.
I just ran quickly through your messages. Thank you for your feedback.
Regarding the RF communication protocol, there is some information in the "networking" pages, in the "building blocks" section. Especially in Part 2. Reading the python code as you did is fine as well.
Now, concerning the emonGLCD time synchronization, it is quite likely that I introduced a bug in the python gateway, from which you took inspiration. This came out yesterday and it seems to be an easy fix, but before doing the modification, I'd like to take 5 minutes to understand. In the meantime, you may want to try the correction yourself. See here for the bug report and the potential fix. And there for Trystan's php implementation I assume correct.
I'm a bit surprised no one ever complained before yesterday, but perhaps no one uses both the python script along with an emonGLCD. I don't have any emonGLCD to test that myself, I just got the sending format from Martin's blog.
Sorry for the inconvenience...
(Note that if you don't intend to use the whole emoncms solution on your BeagleBoard, the standalone gateway might be an alternative.)
Re: RFM12Pi pinout for connecting to beaglebone black
Hi Jerome,
I was able to get the time working by simply extending the tx object to include time. Since my BBB is creating the object and sending it to the display, it was easy to append, and prevented the need of another device sending just the time.
In addition, I have the BBB calculating the total watts used for the day, and sending it in the packet the LCD receives, this means that all my displays always show the same data, even after they power off and come back to life. So really the LCD is just a display that doesnt have much in the way of logic.
Seems to be working well for me, albeit I had to hack up the code a bit and roll my own, not sure if anyone else is interested in doing something similar, if so I am happy to contribute the code I use.
Re: RFM12Pi pinout for connecting to beaglebone black
Hello,
Following this thread I learn that the RFM12Pi module would ne capable to receive RF433 frames on a Beagle Bone Black..
So, I bought, and receive it few days later... :-)
After updated my BBB under Ubuntu (13.10), I successfuly recompiled the drivers for this distribution (https://github.com/gkaindl/rfm12b-linux).
According this image : http://wiki.openenergymonitor.org/index.php?title=File:RFM12Pi_V2.6_brd.png and theses instructions (found on the above git), I connect my my module to my BBB
Beaglebone & Beaglebone Black
Beaglebone RFM12B
---------------------------------
P9/1 GND
P9/3 VDD (+3.3V)
P9/27 nIRQ
P9/29 SDO
P9/30 SDI
P9/31 SCK
P9/42 nSEL
Finally, I powered up my BBB, and load the module.
the dmesg content seems to be good :
[304488.785541] rfm12b: added RFM12(B) transceiver rfm12b.1.1
[304488.787064] rfm12b : driver loaded.
--> everything seems to be okay
in lsmod the module appears as
Module Size Used by
rfm12b 14897 0
a device is now present under /dev : /dev/rfm12b.1.1
And now, I don't know where to go to get raw frames..
any help would be welcome
thank you
ps:
tech infos:
uname -a
Linux BeagleBoneBlack 3.8.13-bone32 #1 SMP Fri Dec 13 20:05:25 UTC 2013 armv7l armv7l armv7l GNU/Linux
Re: RFM12Pi pinout for connecting to beaglebone black
hello,
I reply to myself.
It works!
more informations on my blog http://mymiscellaneoustricks.wordpress.com/
Pinout used :
after that, following the informations given by "ievolve" I activate the UART1 GPIO profil, then upgrade the sketch embeded in the RFM12pi.
After this upgrade, now I receive all RF raw frames visible to my RFM12Pi
Re: RFM12Pi pinout for connecting to beaglebone black
Bien joué.
Thanks for sharing.
Re: RFM12Pi pinout for connecting to beaglebone black
Thanks, great work. I've added your blog to the RFM12Pi wiki. Feel free to edit :-)
http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2#Using_RFM12...
Re: RFM12Pi pinout for connecting to beaglebone black
Hi!
Thank ya Glyn !
Now i'm trying to rebuild a customized firmware for rfm12pi.
I can rebuild/flash the RFM12pi with this sketch : https://github.com/mharizanov/RFM2Pi/blob/master/firmware/RF12_Demo_atme...
but not with this one:
https://github.com/mharizanov/RFM2Pi/blob/master/firmware/Full_RF12demo_atmega328/Full_RF12demo_atmega328.ino
The only way I found to build it, is to comment the line 7 (#include <WProgram.h>). After that I can update thsi firmware but, i can't modify RFM12Pi settings (got a "config save failed error").
is there a special arduino's version to use for the build ?
Re: RFM12Pi pinout for connecting to beaglebone black
Hi. Sorry for off-topic-ing.
I compiled RF12_Demo_atmega328.ino (the one you used successfully) but it doesn't work when loaded. Apparently, there must be something I didn't do correctly.
Here is the thread I opened to ask about this: http://openenergymonitor.org/emon/node/3958, in case you'd have any idea of what I did wrong.
Thanks.
Re: RFM12Pi pinout for connecting to beaglebone black
just back today.
I will answer you shortly
Re: RFM12Pi pinout for connecting to beaglebone black
Thanks !


Hello, I am Munirat
Welcome to my personal website
Do Awesome Stuff with me
I am a Web developer and cloud engineer
I have hands-on experience with wed development, database management and cloud services.
I adapt to the latest technological advancements and build software with them.
Lorem ipsum dolor sit amet consectetur adipisicing elit.Reiciendis, vitae repellat. Autem,
vitae consequuntur architecto quaerat dolorem ut assumenda dolore quas.
Check my range
10
Projects
8
Skills
2
Certifications
Services I render
- Frontend development
- Backend development
- SEO operation
- Cloud engineering
- Technical writing
Certification
- Scrum Fundamental Certified
- Associate Cloud Engineer
- Lorem ipseum
- Vitae reppelat


Christof Ebert, Capers Jones
Unread
A collection of statistics about embedded programming from circa 2008. Useful to illustrate presentations.
"The embedded and information systems communi-
ties tend to exist in almost complete isolation from one
another. This holds for conferences as well as for organiza-
tion layout and products"
"Embedded-software engineers...rather attend
their domain-specific events, such as the SAE Conver-
gence series, because they relate software engineering to
specific industry domain challenges and solutions."
"Embedded microprocessors account for more than 98
percent of all produced microprocessors, thus vastly sur-
passing computing power in the IT industry."
"new cars currently have 20 to 70 electronic control units with more than 100 million object code instructions, totaling close to 1 Gbyte of software in a premium car."
"While mechanical defects are decreasing in rate, defects caused by electronic systems are increasing rapidly."
"There are many informal claims for tools, languages, and
methodologies,
but empirical data on their actual effectiveness in terms
of quality or productivity is rarely collected."
"The main source of [embedded software systems'] complexity is the large
number of
subtle and often unexpected interactions among the
various parts of these systems, which have the following
common features:
• functionality represented by states and
events;
• real-time behavior of events and expected
actions;
• combined software/hardware systems
equipped
with distributed software, computers, sensors, and
actuators;
• high demands on availability, safety,
information se-
curity, and interoperability; and
• long-lived systems in which embedded software
is
expected to work reliably"
"embedded developers often do not
really consider themselves “software engineers.” By train-
ing, many of them are electrical engineers, automotive
engineers, or telecommunications engineers, or have
some other background. They don’t want to be viewed
as software engineers because software engineering has
a lower professional status than more mature forms of
engineering—particularly the types of engineering that
have certification and licensing requirements"
"There have been serious issues with medical instruments, an-
tilock brakes, and home appliances. Failures and poor
quality in embedded software can sometimes cause death
or serious injury."
"The two major cost drivers in embedded-software de-
velopment are requirements and test."
"Requirements are the single major
driver. We often develop the wrong things due to not
reviewing and analyzing requirements, missing and vague
requirements, or confusing needs and requirements. Forty
percent of all software defects in embedded systems result
from insufficient requirements and analysis activities."
"Embedded software has tremendous impact. It de-
termines value and risks in many of today’s products,
independent of domain and usage. If done well, it is invis-
ible and makes people spend money for the product. The
equation is simple: More embedded software in a product
increases sales and market share. But one wrong bit out
of billions can bring a system down and can cause physi-
cal damage"
IEEE Software , special issue on software development for
embedded systems, May/June 2009; www.computer.org/
portal/site/software
In “A Case for Taking a More Agile Approach in Embedded-
Systems Development,” Michael Smith, James Miller, Lily Huang,
and Albert Tran show how to keep good processes sufficiently
lean to allow for flexibility and efficiency.


Every bit of our site is customizable for your needs as an event organizer.
We charge an extremely low, fixed fee per ticket sold. This allows you to not only provide customers with great prices, but make a larger profit.
As well as acting as a ticket-selling website, we have a shop for every event. Whatever merchandise you have, we can sell it.
Buy tickets to see **redacted** at 7:00pm.
An experience that will take you through the minds of the performers.
Learn from the very best and enhance your dancing skills.
Purchase a T-Shirt to support this event and look good while doing it.


"Framework appeasement" is my favorite new phrase from #railsconf so far. @searls rocking the second day keynote about workflow in coding.
4/26/2017, 9:38:56 AM
Favs: 4
Retweets: 0
link--- layout: tweet ---
"Framework appeasement" is my favorite new phrase from #railsconf so far. @searls rocking the second day keynote about workflow in coding.
4/26/2017, 9:38:56 AM
Favs: 4
Retweets: 0
link


<EMAIL_ADDRESS>Full Stack Developer
JavaScript, HTML and NodeJS
GitHub
Python and HTML
Android, Tesseract, OCR and Camera Intent
Android, Email Intent, Location API and Audio
JavaScript and HTML
Android, Python and Location API


[gecode-users] Finalizing TupleSets
Christian Schulte
cschulte at kth.se
Mon Mar 9 10:55:08 CET 2009
Hi Malcolm,
the attempt to use a not finalized tuple set raises an exception in 3.0.0.
The attempt to finalize an empty tuple set will also throw an exception but
most likely only in 3.0.1 and not 3.0.0.
Cheers
Christian
--
Christian Schulte, www.ict.kth.se/~cschulte/
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Malcolm Ryan
Sent: Monday, March 09, 2009 8:18 AM
To: gecode list
Subject: [gecode-users] Finalizing TupleSets
The following code causes a crash in Gecode 2.2.0:
TupleSet tuples;
tuples.finalize();
It seems that finalising an empty TupleSet is not allowed.
Curiously enough, there doesn't seem to be anything stopping you from
using an unfinalised TupleSet as a constraint.
Malcolm
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list


|
gtsam 4.1.1
gtsam
|
A class for computing Gaussian marginals of variables in a NonlinearFactorGraph.
Public Member Functions | |
| Marginals () | |
| Default constructor only for wrappers. | |
| Marginals (const NonlinearFactorGraph &graph, const Values &solution, Factorization factorization=CHOLESKY) | |
| Construct a marginals class from a nonlinear factor graph. More... | |
| Marginals (const NonlinearFactorGraph &graph, const Values &solution, const Ordering &ordering, Factorization factorization=CHOLESKY) | |
| Construct a marginals class from a nonlinear factor graph. More... | |
| Marginals (const GaussianFactorGraph &graph, const Values &solution, Factorization factorization=CHOLESKY) | |
| Construct a marginals class from a linear factor graph. More... | |
| Marginals (const GaussianFactorGraph &graph, const Values &solution, const Ordering &ordering, Factorization factorization=CHOLESKY) | |
| Construct a marginals class from a linear factor graph. More... | |
| Marginals (const GaussianFactorGraph &graph, const VectorValues &solution, Factorization factorization=CHOLESKY) | |
| Construct a marginals class from a linear factor graph. More... | |
| Marginals (const GaussianFactorGraph &graph, const VectorValues &solution, const Ordering &ordering, Factorization factorization=CHOLESKY) | |
| Construct a marginals class from a linear factor graph. More... | |
| void | print (const std::string &str="Marginals: ", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
| print | |
| GaussianFactor::shared_ptr | marginalFactor (Key variable) const |
| Compute the marginal factor of a single variable. | |
| Matrix | marginalInformation (Key variable) const |
| Compute the marginal information matrix of a single variable. More... | |
| Matrix | marginalCovariance (Key variable) const |
| Compute the marginal covariance of a single variable. | |
| JointMarginal | jointMarginalCovariance (const KeyVector &variables) const |
| Compute the joint marginal covariance of several variables. | |
| JointMarginal | jointMarginalInformation (const KeyVector &variables) const |
| Compute the joint marginal information of several variables. | |
| VectorValues | optimize () const |
| Optimize the bayes tree. | |
Public Types | |
| enum | Factorization { CHOLESKY , QR } |
| The linear factorization mode - either CHOLESKY (faster and suitable for most problems) or QR (slower but more numerically stable for poorly-conditioned problems). | |
Protected Member Functions | |
| void | computeBayesTree () |
| Compute the Bayes Tree as a helper function to the constructor. | |
| void | computeBayesTree (const Ordering &ordering) |
| Compute the Bayes Tree as a helper function to the constructor. | |
Protected Attributes | |
| GaussianFactorGraph | graph_ |
| Values | values_ |
| Factorization | factorization_ |
| GaussianBayesTree | bayesTree_ |
| gtsam::Marginals::Marginals | ( | const NonlinearFactorGraph & | graph, |
| const Values & | solution, | ||
| Factorization | factorization = CHOLESKY |
||
| ) |
Construct a marginals class from a nonlinear factor graph.
| graph | The factor graph defining the full joint density on all variables. |
| solution | The linearization point about which to compute Gaussian marginals (usually the MLE as obtained from a NonlinearOptimizer). |
| factorization | The linear decomposition mode - either Marginals::CHOLESKY (faster and suitable for most problems) or Marginals::QR (slower but more numerically stable for poorly-conditioned problems). |
| gtsam::Marginals::Marginals | ( | const NonlinearFactorGraph & | graph, |
| const Values & | solution, | ||
| const Ordering & | ordering, | ||
| Factorization | factorization = CHOLESKY |
||
| ) |
Construct a marginals class from a nonlinear factor graph.
| graph | The factor graph defining the full joint density on all variables. |
| solution | The linearization point about which to compute Gaussian marginals (usually the MLE as obtained from a NonlinearOptimizer). |
| factorization | The linear decomposition mode - either Marginals::CHOLESKY (faster and suitable for most problems) or Marginals::QR (slower but more numerically stable for poorly-conditioned problems). |
| ordering | The ordering for elimination. |
| gtsam::Marginals::Marginals | ( | const GaussianFactorGraph & | graph, |
| const Values & | solution, | ||
| Factorization | factorization = CHOLESKY |
||
| ) |
Construct a marginals class from a linear factor graph.
| graph | The factor graph defining the full joint density on all variables. |
| solution | The solution point to compute Gaussian marginals. |
| factorization | The linear decomposition mode - either Marginals::CHOLESKY (faster and suitable for most problems) or Marginals::QR (slower but more numerically stable for poorly-conditioned problems). |
| gtsam::Marginals::Marginals | ( | const GaussianFactorGraph & | graph, |
| const Values & | solution, | ||
| const Ordering & | ordering, | ||
| Factorization | factorization = CHOLESKY |
||
| ) |
Construct a marginals class from a linear factor graph.
| graph | The factor graph defining the full joint density on all variables. |
| solution | The solution point to compute Gaussian marginals. |
| factorization | The linear decomposition mode - either Marginals::CHOLESKY (faster and suitable for most problems) or Marginals::QR (slower but more numerically stable for poorly-conditioned problems). |
| ordering | The ordering for elimination. |
| gtsam::Marginals::Marginals | ( | const GaussianFactorGraph & | graph, |
| const VectorValues & | solution, | ||
| Factorization | factorization = CHOLESKY |
||
| ) |
Construct a marginals class from a linear factor graph.
| graph | The factor graph defining the full joint density on all variables. |
| solution | The solution point to compute Gaussian marginals. |
| factorization | The linear decomposition mode - either Marginals::CHOLESKY (faster and suitable for most problems) or Marginals::QR (slower but more numerically stable for poorly-conditioned problems). |
| ordering | An optional variable ordering for elimination. |
| gtsam::Marginals::Marginals | ( | const GaussianFactorGraph & | graph, |
| const VectorValues & | solution, | ||
| const Ordering & | ordering, | ||
| Factorization | factorization = CHOLESKY |
||
| ) |
Construct a marginals class from a linear factor graph.
| graph | The factor graph defining the full joint density on all variables. |
| solution | The solution point to compute Gaussian marginals. |
| factorization | The linear decomposition mode - either Marginals::CHOLESKY (faster and suitable for most problems) or Marginals::QR (slower but more numerically stable for poorly-conditioned problems). |
| ordering | An optional variable ordering for elimination. |
| Matrix gtsam::Marginals::marginalInformation | ( | Key | variable | ) | const |
Compute the marginal information matrix of a single variable.
Use LLt(const Matrix&) or RtR(const Matrix&) to obtain the square-root information matrix.


Questions?
Do you have any queries, questions or comments ? Send them to<EMAIL_ADDRESS>or<EMAIL_ADDRESS>!
(We generally answer them in 2 business days max)


I am the sun waiting to rise — hoping to dim a little more unapologetically
Attached to the past by an undending thread but yearning for what the future holds
Not so many a friend, but I hold them dear
The mind which happens to know little but is not afraid to learn
Finding joy and beauty in the little things life offers
Constantly curious about worldly affairs
An ambitious soul, slowly finding myself to be enough
A hopeless romantic — it is love that keeps me alive
The jigsaw puzzle that takes weeks to figure out
Attached to books — even the ones that lay untouched
Strong believer in the power of prayer but struggling to make it a habit
A story waiting to be discovered
An awakened soul just moments away from living.


Gallery
Glass Table
Glass Bathroom
Glassworks
LUXURY PORTFOLIOBLOG
GO THERE >LUXURY PORTFOLIO AND MANSION GLOBAL HOST "A NIGHT IN SOHO"
On Tuesday, April 3, 2018 Luxury Portfolio and Mansion Global co-hosted “A Night in Soho” in one of Manhattan’s premier penthouses at One Vandam listed by Stribling & Associates. The event was the perfect opportunity to highlight the potential to entertain 100+ people in this, the last penthouse available in the building. The three-story space highlighted the best of SoHo including the incredible architecture and the high-end food and entertainment found in the area.
LUXURY PORTFOLIOMAGAZINE
READ IT >LOOK INSIDE
LUXURY EXPOUNDED ON FAR & WIDE
We know a commitment at this level requires a rock-solid relationship with experts who truly understand worldwide markets, and with our established leaders in over 60 countries, you can rest assured. As a global network with 50 years of proven results, our members are more than comfortable. Email us today for a free copy.


...
Waiting in Line
For the prototyping phase, I chose the trivia quiz phone app and the piano floor idea. The quiz app seems like a good idea to make the process of waiting in line much more enjoyable, and would distract people from the actual waiting in line. In addition, people could compete against each other and socialize as a result. I liked the piano floor idea because again, it would be a fun way for people to distract themselves from the monotony of waiting in line, while getting to play music by dancing around.
Testing in line in the dining hall (lines were very slow due to the scanners being broken). One user thought he could speak the answers in.
Everyone I talked to liked the idea, and thought it was a fun and simple way to make the process of standing in line much more bearable. They liked the idea of it being a game, and also seemed to like the potential for learning due to the quiz aspect of the game. Some of them gave some rather good suggestions for improvement as well:


After successfully enabling other vendor database schema to DB2, the second step is to
enable PL/SQL packages.
Newer application models, application programming interfaces, and programming languages are often designed for reduce cost of creating and maintaining applications in n-tier architectures. Practical experience, however, has shown that isolating all business logic in the application layer does not necessary perform well. People soon realize that use of database application objects such as stored procedures, packages, user defined functions, and triggers bring them many benefits.
Database application objects can be written in many programming languages: SQL procedural language, C, JAVA, or .NET. Among all, SQL procedural language is the most popular one because it combines the ease of data access of SQL with the flow control structures of a simple programming language.
All major database vendors support their own versions of an SQL procedural language. DB2's language is called DB2 SQL PL (SQL Procedural Language). Oracle's language is called PL/SQL (Procedural Language/Structured Query Language).
DB2 9.7 makes both SQL PL and PL/SQL both first class procedural languages in the database engine. No translation of PL/SQL is required. The source code remains as it is in the schema catalog just like SQL PL.
After the DB2 registry variable is set, DB2_COMPATIBILITY_VECTOR=ORA, PL/SQL code can be compiled and executed using any of the following DB2 interfaces:


Rome is one of the world's most fascinating cities. The old adage that Rome was not built in a day — and that you won't see it in one or even in three — is true. For the intrepid traveler who can keep pace, here is a list of must-sees. But remember what the Romans say: "Even a lifetime isn't enough to see Rome."
Paris, the city of lights and love - this short guide is full of ideas for how to make the most of the romanticism that oozes from every one of its beautiful corners.You couldn't possibly visit Paris without seeing the Eiffel Tower. Even if you do not want to visit this world famous structure, you will see its top from all over Paris. The tower rises 300 meters tall (984 ft); when it was completed at the end of the nineteenth century
London is one of the most popular tourist destinations in the world for a reason. A cultural and historical hub, London has an excellent public transportation system that allows visitors to see all the fantastic sights without spending a ton of money on a rental car.London contains four World Heritage Sites: the Tower of London; Kew Gardens; the site comprising the Palace of Westminster, Westminster Abbey, and St Margaret's Church


WITNESS LIST
International Trade & Intergovernmental Affairs Committee
March 11, 2013 - 10:00 AM
Invited testimony regarding Transnational Labor Flows and Commerce.
For:
Cedillo-Pereira, Mary Elizabeth (Self; Cedillo-Pereira & Cedillo, PLLC)
Garibay, Julieta (United We Dream)
Hammond, Bill (Texas association of business)
On:
Acevedo, Art (Austin Police Department)
Adams, Norman (Self; Texans for Sensible Immigration Policy)
Jacoby, Tamar (ImmigrationWorks USA)
Joseph, Peter (Association Invest In the USA (IIUSA))
Orrenius, Pia (Self)
Reyes, Agustin (Self; Baptist general convention of texas, and National Hispanic Christian
Leadership Conference)
For:
Flores, Jose (City of laredo)
1


Your browser does not support Javascript!
Oregon Trail
Setup
Press SPACEBAR or click this link to return to the main menu


--- layout: post title: Servlet Filters mapped to JSPs in Tomcat date: 2011-09-26 04:40:00.000000000 -07:00 type: post parent_id: '0' published: true password: '' status: publish categories: [] tags: - jsp - Programming - Servlet - servlet-filter - Struts - tomcat meta: _edit_last: '1' tmac_last_id: '166390219036299264' _jetpack_related_posts_cache: a:1:{s:32:"8f6677c9d6b0f903e98ad32ec61f8deb";a:2:{s:7:"expires";i:1543449386;s:7:"payload";a:3:{i:0;a:1:{s:2:"id";i:452;}i:1;a:1:{s:2:"id";i:967;}i:2;a:1:{s:2:"id";i:735;}}}} author: login: Philihp email<EMAIL_ADDRESS>display_name: Philihp first_name: '' last_name: '' ---
Servlet filters were introduced in the Servlet 2.3 spec a long time ago. They're basically classes that you can add to any Java webapp that intercept every request and can do anything you can imagine (e.g., compress output, translate, handle authentication, the only limit is yourself). They're added into the web.xml file where every webapp starts, and since every webapp framework builds off of a servlet, they can be used with every webapp regardless of the framework. And they're part of the Servlet spec, not the J2EE spec, so you don't need a bloated container to use them; you can use them in Tomcat. Basically, what I'm saying is, they're really useful wherever you are, no matter what you're doing.
To install a servlet filter in your web.xml, you'd do something like this:
<filter>
<filter-name>jpa-filter</filter-name>
<filter-class>com.philihp.utils.EntityManagerFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>jpa-filter</filter-name>
<servlet-name>action</servlet-name>
</filter-mapping>
Where the filter will filter any servlet named "action" -- which in this case is the name of my Struts 1.3 controller that I had defined earlier. Rather than specify a servlet-name, you're allowed to use a url-pattern, but according to Sun, the url-pattern has to begin with a "/"
slash, so the following does not work.
<filter-mapping>
<filter-name>jpa-filter</filter-name>
<url-pattern>/*.jsp</url-pattern>
</filter-mapping>
JSPs are essentially servlets, compiled from JSP code the first time they're run. But you don't have to define every JSP file in your web.xml file, because they're already defined by the container. There's a servlet (in tomcat, it's the Jasper engine) mapped to /*.jsp
. In the Tomcat guts, you can find it at conf/web.xml
, which is the basis web.xml file; every webapp deployed in Tomcat is actually extended from this file
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
</servlet>
Since JSPs are essentially running as the servlet name "jsp", you can attach a servlet-filter to them with a filter-mapping similar to this:
<filter-mapping>
<filter-name>jpa-filter</filter-name>
<servlet-name>jsp</servlet-name>
</filter-mapping>


Oscillator
Click and drag the dot to hear the oscillator. The x-axis controls the freqency of the oscillator and the y-axis controls the volume.
Tone.Oscillator
docs.


All Classes
BufferedChannel
BufferedPassByRefChannel
Channel
ChannelClosedException
Lois
MulticastRelay
ReceiveChannel
Relay
Replicant
Routine
SendChannel
SimpleChannel
SimplePassByRefChannel


{% extends "layout.html" %} {% block page_title %} GOV.UK prototyping kit {% endblock %} {% block content %} ALPHA This is a new service – your feedback will help us to improve it. Your details Change your details Permit or reference number RP3137MU Site address West Farm Vicarage Road Great Hockham Norfolk IP24 1PE Contact details Michael Beard Partner 077171 824 132<EMAIL_ADDRESS>Your site codes Change your site codes Name Code Description NACE 01.46 Raising of swine/pigs NOSE-P 110.04 110.05 Enteric fermentation Manure management E-PRTR 0 Not applicable Your releases to air Change your livestock report Substance 2017 total Method Ammonia 177724.16 kg Est. Methane 15750 kg Est. Nitrogen oxides (NO and NO2) as NO2 BRT Est. Your off site waste transfers Change your off-site waste transfers EWC code WFD code Total 02 01 02 D10 35.0 02 01 04 D1 BRT 02 01 10 R4 BRT 13 02 08 R9 0.2 Sharing your data Change how you share your data Public contact information<EMAIL_ADDRESS>Number of staff 47 Annual operating hours Not provided {% endblock %}
ALPHA This is a new service – your feedback will help us to improve it.


Inputs date-times in Coordinated Universal Time (UTC) and converts to a local date-time and local date for US counties, based on each county's Federal Information Processing Standard (FIPS) code. This work was supported in part by grants from the National Institute of Environmental Health Sciences (R00ES022631) and the National Science Foundation (1331399).
| Version: | 1.0.0 |
| Depends: | R (≥ 2.10) |
| Imports: | dplyr (≥ 0.4.3), lubridate (≥ 1.5.6) |
| Suggests: | choroplethr (≥ 3.5.2), choroplethrMaps (≥ 1.0), ggplot2 (≥ 2.1.0), knitr (≥ 1.14.0), purrr (≥ 0.2.2), rmarkdown (≥ 1.1.0) |
| Published: | 2016-10-22 |
| Author: | Brooke Anderson [aut, cre], Zhiming Guo [ctb] |
| Maintainer: | Brooke Anderson <brooke.anderson at colostate.edu> |
| BugReports: | https://github.com/geanders/countytimezones/issues |
| License: | GPL-2 |
| URL: | https://github.com/geanders/countytimezones |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | countytimezones results |
| Reference manual: | countytimezones.pdf |
| Vignettes: |
countytimezones |
| Package source: | countytimezones_1.0.0.tar.gz |
| Windows binaries: | r-devel: countytimezones_1.0.0.zip, r-release: countytimezones_1.0.0.zip, r-oldrel: countytimezones_1.0.0.zip |
| OS X binaries: | r-release: countytimezones_1.0.0.tgz, r-oldrel: countytimezones_1.0.0.tgz |
| Old sources: | countytimezones archive |
| Reverse suggests: | countyweather |
Please use the canonical form https://CRAN.R-project.org/package=countytimezones to link to this page.


srm -s path/to/file- Remove a file after seven passes of overwriting with random data:
srm -m path/to/file- Recursively remove a directory and its contents overwriting each file with a single-pass of random data:
srm -r -s path/to/directory- Prompt before every removal:
srm -i \*


enum class ApiErrorCode
INVALID_CONFIG |
Invalid configuration parameters were passed. |
NOT_AUTHORIZED |
User is not authorized to perform the operation requested. |
SUDO_NOT_FOUND |
Sudo being updated or deleted is not found. |
VERSION_MISMATCH |
The version of the resource that's being updated or deleted does not match the version stored in the backend. |
SERVER_ERROR |
An internal server error cause the API call to fail. The error is possibly transient and retrying at a later time may cause the call to complete successfully. |
BAD_DATA |
Indicates the bad data was found in cache or in backend response. |
GRAPHQL_ERROR |
GraphQL endpoint returned an error. |
S3_ERROR |
AWS S3 returned an error. |
FATAL_ERROR |
Unexpected error encountered. This could be a result of client or backend bug and unlikely to be user recoverable. |
POLICY_ERROR |
The API call failed due to the user having insufficient entitlements. |


QEMU SystemTap trace tool¶
Synopsis¶
qemu-trace-stap [GLOBAL-OPTIONS] COMMAND [COMMAND-OPTIONS] ARGS…
Description¶
The qemu-trace-stap
program facilitates tracing of the execution
of QEMU emulators using SystemTap.
It is required to have the SystemTap runtime environment installed to use
this program, since it is a wrapper around execution of the stap
program.
Options¶
The following global options may be used regardless of which command is executed:
-
--verbose
,
-v
¶
Display verbose information about command execution.
The following commands are valid:
-
list
BINARY PATTERN...
¶ List all the probe names provided by BINARY that match PATTERN.
If BINARY is not an absolute path, it will be located by searching the directories listed in the
$PATH
environment variable.PATTERN is a plain string that is used to filter the results of this command. It may optionally contain a
*
wildcard to facilitate matching multiple probes without listing each one explicitly. Multiple PATTERN arguments may be given, causing listing of probes that match any of the listed names. If no PATTERN is given, the all possible probes will be listed.For example, to list all probes available in the
qemu-system-x86_64
binary:$ qemu-trace-stap list qemu-system-x86_64
To filter the list to only cover probes related to QEMU’s cryptographic subsystem, in a binary outside
$PATH
$ qemu-trace-stap list /opt/qemu/4.0.0/bin/qemu-system-x86_64 'qcrypto*'
-
run
OPTIONS BINARY PATTERN...
¶ Run a trace session, printing formatted output any time a process that is executing BINARY triggers a probe matching PATTERN.
If BINARY is not an absolute path, it will be located by searching the directories listed in the
$PATH
environment variable.PATTERN is a plain string that matches a probe name shown by the LIST command. It may optionally contain a
*
wildcard to facilitate matching multiple probes without listing each one explicitly. Multiple PATTERN arguments may be given, causing all matching probes to be monitored. At least one PATTERN is required, since stap is not capable of tracing all known QEMU probes concurrently without overflowing its trace buffer.Invocation of this command does not need to be synchronized with invocation of the QEMU process(es). It will match probes on all existing running processes and all future launched processes, unless told to only monitor a specific process.
Valid command specific options are:
-
--pid
=PID
,
-p
PID
¶ Restrict the tracing session so that it only triggers for the process identified by PID.
For example, to monitor all processes executing
qemu-system-x86_64
as found on$PATH
, displaying all I/O related probes:$ qemu-trace-stap run qemu-system-x86_64 'qio*'
To monitor only the QEMU process with PID 1732
$ qemu-trace-stap run --pid=1732 qemu-system-x86_64 'qio*'
To monitor QEMU processes running an alternative binary outside of
$PATH
, displaying verbose information about setup of the tracing environment:$ qemu-trace-stap -v run /opt/qemu/4.0.0/qemu-system-x86_64 'qio*'
-
See also¶
qemu(1), stap(1)


[gecode-users] obtaining IntVar's domain as IntSet?
Guido Tack
tack at gecode.org
Tue Jul 27 19:15:40 CEST 2010
Kish Shen wrote:
> Hi,
>
> Is there anyway to obtain the domain of an IntVar as an independent object, preferably an IntSet? I looked at the documentation, and can't figure out how to do this.
Yes, using an IntVarRanges iterator. If you have an IntVar x, use the following:
IntSet s(IntVarRanges(x));
Cheers,
Guido
--
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
More information about the users
mailing list


XDG\-MIME
Section: (1)Updated: 06/24/2007
Index Return to Main Contents
NAME
xdg-mime - command line tool for querying information about file type handling and adding descriptions for new file typesSYNOPSIS
-
xdg-mime query {filetype default} ...
- xdg-mime default application mimetype(s)
- xdg-mime install [--mode mode] [--novendor] mimetypes-file
- xdg-mime uninstall [--mode mode] mimetypes-file
- xdg-mime {--help --manual --version}
- xdg-mime default application mimetype(s)
DESCRIPTION
COMMANDS
- query
-
Returns information related to file types.
The query option is for use inside a desktop session only. It is not recommended to use xdg-mime query as root.
The following queries are supported:
query filetype FILE: Returns the file type of FILE in the form of a MIME type.
query default mimetype: Returns the default application that the desktop environment uses for opening files of type mimetype. The default application is identified by its *.desktop file.
- default
-
Ask the desktop environment to make
application
the default application for opening files of type
mimetype. An application can be made the default for several file types by specifying multiple mimetypes.
application is the desktop file id of the application and has the form vendor-name.desktop application must already be installed in the desktop menu before it can be made the default handler. The aplication's desktop file must list support for all the MIME types that it wishes to be the default handler for.
Requests to make an application a default handler may be subject to system policy or approval by the end-user. xdg-mime query can be used to verify whether an application is the actual default handler for a specific file type.
The default option is for use inside a desktop session only. It is not recommended to use xdg-mime default as root.
- install
- Adds the file type descriptions provided in mimetypes-file to the desktop environment. mimetypes-file must be a XML file that follows the freedesktop.org Shared MIME-info Database specification and that has a mime-info element as its document root. For each new file type one or more icons with name major-minor must be installed with the xdg-icon-resource command in the mimetypes context. For example the application/vnd.oasis.opendocument.text filetype requires an icon by the name of application-vnd.oasis.opendocument.text to be installed.
- uninstall
- Removes the file type descriptions provided in mimetypes-file and previously added with xdg-mime install from the desktop environment. mimetypes-file must be a XML file that follows the freedesktop.org Shared MIME-info Database specification and that has a mime-info element as its document root.
OPTIONS
- --mode mode
-
mode
can be
user
or
system. In user mode the file is (un)installed for the current user only. In system mode the file is (un)installed for all users on the system. Usually only root is allowed to install in system mode.
The default is to use system mode when called by root and to use user mode when called by a non-root user.
- --novendor
-
Normally, xdg-mime checks to ensure that the
mimetypes-file
to be installed has a proper vendor prefix. This option can be used to disable that check.
A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated with a dash ("-"). Companies and organizations are encouraged to use a word or phrase, preferably the organizations name, for which they hold a trademark as their vendor prefix. The purpose of the vendor prefix is to prevent name conflicts.
- --help
- Show command synopsis.
- --manual
- Show this manualpage.
- --version
- Show the xdg-utils version information.
ENVIRONMENT VARIABLES
xdg-mime honours the following environment variables:
- XDG_UTILS_DEBUG_LEVEL
- Setting this environment variable to a non-zero numerical value makes xdg-mime do more verbose reporting on stderr. Setting a higher value increases the verbosity.
- XDG_UTILS_INSTALL_MODE
- This environment variable can be used by the user or administrator to override the installation mode. Valid values are user and system.
EXIT CODES
An exit code of 0 indicates success while a non-zero exit code indicates failure. The following failure codes can be returned:
- 1
- Error in command line syntax.
- 2
- One of the files passed on the command line did not exist.
- 3
- A required tool could not be found.
- 4
- The action failed.
- 5
- No permission to read one of the files passed on the command line.
SEE ALSO
xdg-icon-resource(1), xdg-desktop-menu(1)
EXAMPLES
xdg-mime query filetype /tmp/foobar.png
Prints the MIME type of the file /tmp/foobar.png, in this case image/png
xdg-mime query default image/png
Prints the .desktop filename of the application which is registered to open PNG files.
xdg-mime install shinythings-shiny.xml
Adds a file type description for "shiny"-files. "shinythings-" is used as the vendor prefix. The file type description could look as folows.
shinythings-shiny.xml: <?xml version="1.0"?> <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> <mime-type type="text/x-shiny"> <comment>Shiny new file type</comment> <glob pattern="*.shiny"/> <glob pattern="*.shi"/> </mime-type> </mime-info>
An icon for this new file type must also be installed, for example with:
xdg-icon-resource install --context mimetypes --size 64 shiny-file-icon.png text-x-shiny
AUTHOR
Kevin Krammer, Jeremy<EMAIL_ADDRESS><EMAIL_ADDRESS>Index
- NAME
- SYNOPSIS
- DESCRIPTION
- COMMANDS
- OPTIONS
- ENVIRONMENT VARIABLES
- EXIT CODES
- SEE ALSO
- EXAMPLES
- AUTHOR
This document was created by man2html, using the manual pages.
Time: 05:29:12 GMT, December 24, 2015


Make sure that Devlom Configurator extension is installed in your phpBB. Otherwise changes made to files below won't be visible in your forum.
In Solace, we keep menus data in following YAML files located inside solace/content directory:
- name: Home
url: ./
icon: home
icon_provider: fontawesome
active: true
As you can see, whole syntax is very easy to read and understand. Let's describe each part:
- name: Home # Menu item name
url: ./ # Menu item url (absolute or relative)
icon: home # Icon name
icon_provider: fontawesome # Icon provider: fontawesome or lineicon
active: true # enable or disable active menu highlight
icon: bars
If ET-Line Icon class name is .icon-chat then all you have to do is provide:
icon: chat
Ready to add another menu item ? It's easy.
- name: Another menu item
url: "http://www.devlom.com"
icon: desktop
icon_provider: lineicon
active: true
How easy is that ? :) The whole code for two menu items should look like that:
- name: Home
url: ./
icon: home
icon_provider: fontawesome
active: true
- name: Another menu item
url: "http://www.devlom.com"
icon: desktop
icon_provider: lineicon
active: true
Adding submenu is also very easy. Let's add submenu to our second item. Whole code will look like that:
- name: Home
url: ./
icon: home
icon_provider: fontawesome
active: true
- name: Another menu item
url: "http://www.devlom.com"
icon: desktop
icon_provider: lineicon
active: true
submenu:
- name: Icon Item
url: "#"
icon: bank
icon_provider: fontawesome
active: true
- name: Example Item
url: "#"
icon:
icon_provider:
active: false
As you can see from above example, key value is called submenu: which is also a container. You can add as many menu items to each container as you want. There's one limitation though. Solace supports maximum 4 level menu items.
topmenu.yaml is a perfect example to look if you want to learn how to create complex submenus.
Quick menu is located in forum footer. Quick menu syntax is almost the same as Top Menu except that you can't create submenus and highlight active item. Example menu items:
- name: Example Item 1
url: "#"
- name: Example Item 1
url: "#"
quickmenu.yaml is a perfect example to look if you want to learn how it works
Quick menu is located in forum copyright section. Below footer. Quick menu syntax is very basic. You can specify name and url only. Example menu items:
- name: Example Item 1
url: "#"
- name: Example Item 1
url: "#"
copyrightmenu.yaml is a perfect example to look if you want to learn how it works
Social menu is an addition to footer logo module. For social menu you can specify icon, icon provider and url. Example:
- icon: facebook
url: "#"
provider: lineicon
- icon: twitter
url: "#"
provider: lineicon
- icon: linkedin
url: "#"
provider: lineicon
socialmenu.yaml is a perfect example to look if you want to learn how it works


Salient projects
A PWA for the basics of Git and GitHub-like services.
Web site (PWA): HarshKapadia2.github.io/git_basics
TWA: Play Store
GitHub: HarshKapadia2/git_basics
Made using Asciidoctor with a little HTML, CSS and JS.
A JAMstack e-Commerce web app dealing in raw gemstones.
Web app: hps-gems.herokuapp.com
GitHub: HarshKapadia2/hps-gems
Tech stack: HTML, vanilla CSS, vanilla JS, PHP, MySQL
A server-side rendered web app to manage student attendance.
Tech stack: Front end template, Flask, Firebase