AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 0 |
r3wp | 36 |
total: | 36 |
results window for this page: [start: 1 end: 36]
world-name: r3wp
Group: Core ... Discuss core issues [web-public] | ||
james_nak: 14-Sep-2007 | Habia uno hace uno o dos anos. A ver si puedo hallar lo.... | |
james_nak: 18-Feb-2008 | Thanks Anton and Graham. My bad. I started checking to see if my nested objects were even working (behaving as objects) after I appended them (and before saving them). Lo and behold they were so no wonder! Thanks for your time and tips. | |
Graham: 20-Nov-2009 | So, here, how would I get this working? test: func [ /local lo ][ lo: {button "test" [ alert "hello" ]} view layout to-block lo ] | |
Chris: 20-Nov-2009 | test: func [ /local lo ][ lo: {button "test" [ alert "hello" ]} view layout bind to-block lo 'all] | |
Graham: 20-Nov-2009 | this doesn't work ... test: func [ /local lo alert] compose/deep [alert: (:alert) dummy: none lo: {button "test" [ alert "hello" ]} view layout bind to-block lo 'dummy] | |
Graham: 20-Nov-2009 | this works test: func [ /local lo alert dummy] compose/deep [alert: get in system/words 'alert dummy: none lo: {button "test" [ alert "hello" ]} view layout bind to-block lo 'dummy ] just not working in my script though | |
BrianH: 30-Jan-2010 | invalid-utf?: funct [ "Checks for proper UTF encoding and returns NONE if correct or position where the error occurred." data [binary!] /utf "Check encodings other than UTF-8" num [integer!] "Bit size - positive for BE negative for LE" ] compose [ ascii: (charset [#"^(00)" - #"^(7F)"]) utf8+1: (charset [#"^(C2)" - #"^(DF)"]) utf8+2: (charset [#"^(E0)" - #"^(EF)"]) utf8+3: (charset [#"^(F0)" - #"^(F4)"]) utf8rest: (charset [#"^(80)" - #"^(BF)"]) switch/default any [num 8] [ 8 [ ; UTF-8 unless parse/all/case data [(pos: none) any [ pos: ascii | utf8+1 utf8rest | utf8+2 2 utf8rest | utf8+3 3 utf8rest ]] [as-binary pos] ] 16 [ ; UTF-16BE pos: data while [not tail? pos] [ hi: first pos case [ none? lo: pick pos 2 [break/return pos] 55296 > w: hi * 256 + lo [pos: skip pos 2] ; #{D800} 57343 < w [pos: skip pos 2] ; #{DFFF} 56319 < w [break/return pos] ; #{DBFF} none? hi: pick pos 3 [break/return pos] none? lo: pick pos 4 [break/return pos] 56320 > w: hi * 256 + lo [break/return pos] ; #{DC00} 57343 >= w [pos: skip pos 4] ; #{DFFF} ] none ] ; none = valid, break/return pos = invalid ] -16 [ ; UTF-16LE pos: data while [not tail? pos] [ lo: first pos case [ none? hi: pick pos 2 [break/return pos] 55296 > w: hi * 256 + lo [pos: skip pos 2] ; #{D800} 57343 < w [pos: skip pos 2] ; #{DFFF} 56319 < w [break/return pos] ; #{DBFF} none? lo: pick pos 3 [break/return pos] none? hi: pick pos 4 [break/return pos] 56320 > w: hi * 256 + lo [break/return pos] ; #{DC00} 57343 >= w [pos: skip pos 4] ; #{DFFF} ] none ] ; none = valid, break/return pos = invalid ] 32 [ ; UTF-32BE pos: data while [not tail? pos] [ if any [ 4 > length? pos negative? c: to-integer pos 1114111 < c ; to-integer #{10FFFF} ] [break/return pos] ] ] -32 [ ; UTF-32LE pos: data while [not tail? pos] [ if any [ 4 > length? pos negative? c: also to-integer reverse/part pos 4 reverse/part pos 4 1114111 < c ; to-integer #{10FFFF} ] [break/return pos] ] ] ] [ throw-error 'script 'invalid-arg num ] ] ; Note: Native in R3, which doesn't support or screen the /utf option yet. ; See http://en.wikipedia.org/wiki/Unicodefor charset/value explanations. | |
Group: View ... discuss view related issues [web-public] | ||
Graham: 1-Jan-2006 | repeat i length? out-cols [ insert tail lo [list-text 100] ] | |
james_nak: 27-Sep-2007 | For those kinds of things I end up usinga thing call list-view : ) or just the text-list when I can go lo-tech. | |
Geomol: 3-Jul-2008 | Maarten, I can't think of a short-cut way to do, what you want. I guess, you have to do the bit-manipulation manually. struct! might help with something like: unsigned: make struct! [hi [int] lo [int]] [0 0] You can then get to high and low 4 bytes with unsigned/hi and unsigned/lo, and you can see all 8 bytes with: third unsigned I made some bit operations, that might help you further: http://home.tiscali.dk/john.niclasen/libs/bit.r | |
BenBran: 26-Jan-2009 | I'm working on taking the output of a console program to a view. Its formatted nice for the console but I can't seem to get the text spaced correctly for the text-list box such as teletype or monotype.... any suggestions? myData: read %./ lo: [text-list 640x480 data to-block myData] view/options/title layout lo [resize] "Files" ;; characters do not line up vertically but look fine in console thanks in advance. | |
DideC: 26-Jan-2009 | myData: read %./ lo: [text-list 640x480 data to-block myData font [name: "courier new"]] view/options/title layout lo [resize] "Files" | |
BenBran: 23-Sep-2009 | I need some clairfication in reading the syntax/specs for Rebol2.x stuff. I'm sure there is a pattern, but I havn't seen it yet. Example: taken from rebol.net/wiki/VID:_Styles#Derived_styles_2 TEXT-LIST size: pair! rows: block! selected: block! ; this way set-face will not work. need to solve this. action: block! background: tuple! background-draw: block! how do I know when to assign a value to a [word] i.e. lo: [text-list size: 300x200] ;;does not work view layout lo and when not to use the [word] such as lo: [text-list 300x200] ;; works view layout lo Question 2. Could someone give a one line (short as possible) example of setting all the values for this text-list keyword using this format lo: [text-list ......] view layout lo thanks in advance. | |
Dockimbel: 23-Sep-2009 | The documentation you've pointed to seems related to R3, not R2.x. There's no header info in that page, so just guessing. You'll find REBOL 2.x view documentation here : http://rebol.com/docs.html More precisely: http://rebol.com/docs/view-guide.html http://rebol.com/docs/easy-vid.html#section-14 (for TEXT-LIST examples) About your question, here's a more complete example (not sure that all possible options are there, thought) : lo: [text-list 300x200 yellow blue data ["one" "two" "three"] [print "action"]] view layout lo | |
BenBran: 29-Sep-2009 | Hello All, I'm working with events but I'm stuck. Any help is appreciated. here is the code: rebol [ title: event testing] lo: [ text 100x100 "Hello" edge [size: 25x25 color: 255.0.0 effect: 'bevel] ;; <--edge set here works feel [ engage: func [face action event] [ if event/type = 'down [ face/color: 0.200.0 show face ] if event/type = 'up [ face/color: 0.0.200 show face ] ] over: func [face into pos] [ if equal? into True [ ;; face/edge: [size: 25x25 color: 0.255.0 effect: 'bevel] ;; <-- edge changed here probe face/edge ;; print into ;; show face ;; <-- doesn't render ] ;; if equal? into False [ ;; face/edge: [size: 25x25 color: 0.0.255 effect: 'bevel] ;; <-- edge changed here probe face/edge ;; print into ;; show face ;; <-- doesn't render ] ;; ] detect: func [face event] [] redraw: func [face action offset] [] ] ] view layout lo | |
Steeve: 29-Sep-2009 | because the lo block you constructed contains a dialect, not rebol code. When you call the layout function, the dialect is processed and the values [edge [...]] are translated to code [face/edge: make face/edge [...]] | |
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public] | ||
Anton: 19-Jul-2007 | I don't understand the exact logic of the CSV file quote formatting, but you could use a function similar to this: enquote: func [string][rejoin [{"} string {"}]] >> print enquote "hel^"lo" hel lo" and you could take it further by replacing single instances of " in the string with two instances, etc. | |
Gabriele: 19-Nov-2007 | >> probe get-modes tcp:// 'interfaces [make object! [ name: "lo" addr: 127.0.0.1 netmask: 255.0.0.0 broadcast: none dest-addr: none flags: [loopback] ] make object! [ name: "eth0" addr: 192.168.1.4 netmask: 255.255.255.0 broadcast: 192.168.1.255 dest-addr: none flags: [broadcast multicast] ]] | |
DavidR: 16-Nov-2008 | LO tis me back | |
Group: Linux ... [web-public] group for linux REBOL users | ||
Pekr: 6-May-2009 | 'lo. Pinged Cyphre on ICQ. He told me: 1) fonts, which are rendered in face/text 2) fonts, which are rendered in DRAW (AGG) re 1) IIRC, REBOL uses some X-Windows function, an old method, which should work on all distros re 2) REBOL uses FreeType2 library to get vector data, which are then rendered via AGG | |
Janko: 27-Sep-2009 | setup file is like this: #!/bin/bash # # iptables example configuration script # # Let's not lock ourselves out of the server # iptables -P INPUT ACCEPT # # Flush all current rules from iptables # iptables -F # # Allow SSH connections on tcp port 22 # This is essential when working on remote servers via SSH to prevent locking yourself out of the system # iptables -A INPUT -p tcp --dport 22 -j ACCEPT # # Allow HTTP connections on tcp port 80 # iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 443 -j ACCEPT # # Set default policies for INPUT, FORWARD and OUTPUT chains # iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT # # Set access for localhost # iptables -A INPUT -i lo -j ACCEPT # # Accept packets belonging to established and related connections # iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # # Save settings # /sbin/service iptables save # # List rules # iptables -L -v | |
Dockimbel: 28-Sep-2009 | Try adding : iptables -A OUTPUT -i lo -j ACCEPT | |
Group: !RebGUI ... A lightweight alternative to VID [web-public] | ||
Graham: 14-Apr-2007 | display/options "Form" lo [ no-border ] | |
Graham: 30-Oct-2007 | I tried setting lo/pane/1/image but that sets the image to the first widget in the layout | |
Group: Rebol School ... Rebol School [web-public] | ||
Sunanda: 22-Nov-2008 | Alexandr: < I tried ascii-chart script and it unfortunately doesn't show any cyrillic letters> What I did that showed me some cyrillic was this: ** download the ascii-chart.r script from rebol.org ** change this line [append hex-lo [box 25x25 blue] to [append hex-lo [box 25x25 blue font-name "WP CyrillicA"] WP CyrillicA is a Cyrillic font I happen to have installed on my Windows PC. Any Cyrilic font you have is likely to have a different name. When specifying the font name it is case sensitive. If this works for you. it may also help for many VID styles (BOX, BUTTON etc) It probably won't help for ALTER and other pop-up boxes | |
Geomol: 30-May-2011 | You can look at the internal of decimals in R2 with struct! like this: d: make struct! [v [decimal!]] none i: make struct! [lo [integer!] hi [integer!]] none ; assuming little endian >> d/v: (1.48297457491612E-2 + 0.985170254250839) == 1.0 >> change third i third d == #{} >> i/lo == 1 >> d/v: 1.0 == 1.0 >> change third i third d == #{} >> i/lo == 0 | |
Geomol: 30-May-2011 | In first case with the addition, i/lo is 1, and 2nd case, it's 0. | |
Geomol: 30-May-2011 | You can see the bit patterns with this code: do http://www.fys.ku.dk/~niclasen/rebol/libs/bit.r enbit i/lo enbit i/hi | |
Group: rebcode ... Rebcode discussion [web-public] | ||
BrianH: 18-Oct-2005 | In the meanwhile, ou can do it yourself: pickz hi b 0 pickz lo b 1 lsl hi 8 add hi lo skip b 2 | |
Group: !REBOL3-OLD1 ... [web-public] | ||
Geomol: 2-Jul-2009 | I'm in doubt about the distribution of numbers. Is this R2 function calculating ulps between two number ok? ulps: func [ value1 value2 /local d1 d2 ][ d: make struct! [v [decimal!]] none d1: make struct! [hi [integer!] lo [integer!]] none d2: make struct! [hi [integer!] lo [integer!]] none d/v: value1 change third d1 third d d/v: value2 change third d2 third d print [d1/hi d1/lo d2/hi d2/lo] print [d1/hi - d2/hi * (2 ** 32) + d1/lo - d2/lo] ] | |
Geomol: 2-Jul-2009 | So an R3 ulps could be: ulps: func [ lo [decimal!] hi [decimal!] ][ (to-integer to-binary hi) - to-integer to-binary lo ] | |
Ladislav: 2-Jul-2009 | (as-int hi) - (as-int lo) | |
Ladislav: 2-Jul-2009 | sorry, (dec-as-int hi) - (dec-as-int lo) | |
Group: DevCon2007 ... DevCon 2007 [web-public] | ||
Pekr: 9-May-2007 | 'lo Carl ... | |
btiffin: 10-May-2007 | It's too bad MS didn't support POSIX more fully. A lo of threading issues got resolved what? two decades ago. :) | |
Group: !REBOL3 /library ... An extension adding support for dynamic library linking (library.rx) [web-public] | ||
TomBon: 10-Feb-2010 | --------------------------------------------------------------------- C-Header --------------------------------------------------------------------- typedef struct { double *data; long size; long datasize; long firstvalid; } Array; typedef struct { Array dt, op, hi, lo, cl, vol, oi; long size; long datasize; long reccnt; char path[256]; char name[16]; char description[48]; char symbol[16]; char cusip[12]; double begindate; double enddate; long type; long frequency; long datatype; long optiontype; double deliverydate; double strikeprice; } Bars; --------------------------------------------------------------------- maxim, here e.g. is the problem with my lib. I can allocate, read and write data to the first Array struct. One strange thing here is it works only if I pass the pointer as third array binary! to the lib, the requested double fails. the array is also part within the bars struct. in this case rebol is passing the substructures as pointer which fails too. char arrays for name desc.. and cusip fails either. my 'must have' requirement would be that /library should able to handle these standard structs without going 7 corners. so working with pointers is a pain and nested strucs and char-arrays are not existend... |