Re: [Pharo-users] Datatables
You can use - Voyage to access MongoDB read the entreprise Pharo book - Garage for relational databases. http://pharo.org/news/garage-database Stef Le 4/12/15 15:58, Pablo R. Digonzelli a écrit : Hi, I am interesting in using Datatables in a Seaside app. I know there is wrapper fot this in StHub. Is there is examples how to use it? TIA *Ing. Pablo Digonzelli* Software Solutions IP-Solutiones SRL Metrotec SRL 25 de Mayo 521 San Miguel de Tucumán Email: pdigonze...@softsargentina.com pdigonze...@gmail.com Cel: 5493815982714
Re: [Pharo-users] Mongo configuration for Pharo40
Le 4/12/15 21:59, Sven Van Caekenberghe a écrit : Then why not introduce a MongoTimestamp and be done with it ? +1 On 04 Dec 2015, at 17:41, Henrik Johansen wrote: On 04 Dec 2015, at 5:22 , Sven Van Caekenberghe wrote: According to http://bsonspec.org/spec.html there are indeed 2 different types "\x09" e_name int64 UTC datetime "\x11" e_name int64 Timestamp I would guess that you need 2 different (sub)classes in Pharo if you want to honour this spec. It has little to do with the almost empty TimeStamp subclass of DateAndTime having been removed. This is an API design issue (decide on the Pharo to BSON type mapping). Strictly speaking, Timestamp should've never been mapped; "Timestamp - Special internal type used by MongoDB replication and sharding. First 4 bytes are an increment, second 4 are a timestamp" doesn't exactly agree with the smalltalk implementation: nextTimestampPut: aTimestamp self nextDateAndTimePut: aTimestamp It's a problem when an existing application stored Timestamp instances with the broken type, for the reason I explained. I'd be fine with having a legacy-compatibility package containing Timestamp class + bson extensions as before (even though it was broken) strictly for use when migrating legacy applications. That's what we have Monticello groups for, right? ;) Cheers, Henry
Re: [Pharo-users] Datatables
I have used this datatable package in Seaside in my app. MCSmalltalkhubRepository owner: 'GastonDallOglio' project: 'DataTables' user: '' password: '' For the examples, looking at the Datatables JS API was helpful. The version was the older one. You can use it like this (there is some bootstrap mixed in) html tbsTable beStriped; beHover; script: ((html jQuery new dataTable) bFilter: false; bPaginate: false; bInfo: false); class: 'table-responsive'; with: [ html tableHead with: [ html tableHeading with: 'ID' seasideTranslated . html tableHeading with: 'MAC' seasideTranslated . html tableHeading with: 'IP' seasideTranslated . html tableHeading with: 'Status' seasideTranslated ]. On Sat, Dec 5, 2015 at 9:09 AM, stepharo wrote: > You can use > - Voyage to access MongoDB read the entreprise Pharo book > - Garage for relational databases. > > http://pharo.org/news/garage-database > Stef > > > Le 4/12/15 15:58, Pablo R. Digonzelli a écrit : > > Hi, I am interesting in using Datatables in a Seaside app. > I know there is wrapper fot this in StHub. Is there is examples how to use > it? > > > TIA > > -- > *Ing. Pablo Digonzelli* > Software Solutions > IP-Solutiones SRL > Metrotec SRL > 25 de Mayo 521 > San Miguel de Tucumán > Email: pdigonze...@softsargentina.com > pdigonze...@gmail.com > Cel: 5493815982714 > > >
Re: [Pharo-users] ZnClient problem with extensions
ok with your help I found the code to do this with every new release. I take the info from my README list := OrderedCollection new. client := ZnClient new. readme := client get: ' https://raw.githubusercontent.com/kilon/ChronosManager/master/README.md'. readme regex: 'v.\..' matchesDo: [ :each | list add: each ]. list inspect. list at:1 gives the top / latest version. So all will have to do is just add the new version info in the README which I would have done anyway. Its not using the GITHUB API but it get the job done :) Actually now that I am thinking about it the readme can contain all sort of information that my code can use and all in user readable format :) Beats Json and XML/Html syntax :) On Fri, Dec 4, 2015 at 11:04 PM Dimitris Chloupis wrote: > Thank you both I will give both a try and be back with more questions :) > > On Fri, Dec 4, 2015 at 6:57 PM Skip Lentz wrote: > >> Hi, >> >> On Dec 4, 2015, at 11:56 AM, Dimitris Chloupis >> wrote: >> >> because I am clueless with web dev can you help me understand how to do >> this with ZnClient ? >> >> >> I tried some things, such as this snippet: >> >> ZnClient new >> setIfModifiedSince: DateAndTime now; >> contentReader: [ :entity | ZipArchive new readFrom: entity readStream ]; >> get: 'https://api.github.com/repos/kilon/ChronosManager/zipball/master' >> >> But the response does not have a Last-Modified date. >> >> So what you probably want is the date of the latest commit to master (or >> whatever branch). Considering you do want to minimize dependencies and >> therefore not use the API bindings, the following could be done: >> >> client := ZnClient new. >> " Get latest commit list, we only care about the response in this case " >> client >> setIfModifiedSince: (Date year: 2015 month: 12 day: 1); >> get: ' >> https://api.github.com/repos/kilon/ChronosManager/commits?sha=master'. >> client response isNotModified >> ifTrue: [ nil ] >> ifFalse: [ >> client >> contentReader: [ :entity | ZipArchive new readFrom: entity readStream ]; >> get: 'https://api.github.com/repos/kilon/ChronosManager/zipball/master'] >> >> So you need in total three GET requests, since the second request >> responds with a redirect. The first request does not count to the API rate >> limit if it returns a 304 Not Modified. >> >
Re: [Pharo-users] How can we verify that a daemon is listening on a TCP socket
Et voilà ;-) Avec MongoTalk : server := Mongo default. [ server open ] on: ConnectionTimedOut do: [ :e | self error: 'local mongo server is not running' ]. server isOpen Avec des sockets uniquement : [ stream := SocketStream openConnectionToHostNamed: 'localhost' port: 27017 ] on: ConnectionTimedOut do: [ :e | self error: 'local mongo server is not running' ]. stream Luc Le 4/12/15 16:07, stepharo a écrit : Hi guys I would like to know if a daemon (mongo) is listening on a given TCP socket? Stef
Re: [Pharo-users] How can we verify that a daemon is listening on a TCP socket
Wouldn't it be wonderful to have netstat, ifconfig, route, traceroute, top and other system/networking utilities in Squeak/Pharo. I can see a use for manipulating the routing tables from inside our wonderful world. bonne soirée, Robert On 12/05/2015 11:54 AM, stepharo wrote: Et voilà ;-) Avec MongoTalk : server := Mongo default. [ server open ] on: ConnectionTimedOut do: [ :e | self error: 'local mongo server is not running' ]. server isOpen Avec des sockets uniquement : [ stream := SocketStream openConnectionToHostNamed: 'localhost' port: 27017 ] on: ConnectionTimedOut do: [ :e | self error: 'local mongo server is not running' ]. stream Luc Le 4/12/15 16:07, stepharo a écrit : Hi guys I would like to know if a daemon (mongo) is listening on a given TCP socket? Stef
Re: [Pharo-users] Help needed: old issues issue tracker entries
> On 30 Nov 2015, at 13:21, marcus.den...@inria.fr wrote: > > Hi, > > The issue tracker has 658 open issues. This number is more or less constant. > down to 642! (of course we closed more than that, we are at more than 6 per day closed, but the thing is that new ones get open, too) With >600 issues open, if someone adds a comment in the sense of “this can be closed”, can you send me (or the List) a mail? Or put the issue on “fixed” ? The problem is that with >600 issues, even an issue that is clearly commented as fixed has a very low chance of someone reading the note and closing the entry within any reasonable time frame if we rely on someone stumbling on it by chance... Marcus
[Pharo-users] About GTSpotter matching
Hi, are there some wildcards in GTSpotter matching? Currently it searches anywhere in the (method) name, which makes it hard for shorter names, because it will match a lot of junk. I've also discovered (by accident), that I can use '>>#selector' to anchor the start of the selection. ('#selector' for some reason doesn't work). But I would like to also search by a simple ? (any character), * (any characters) wildcard. Is that possible? Additionally constraining it from the end would be also nice. For example I want to look through #default methods, however 90% of the matches will be junk, so I would like to write '#default$' and it will not match '#defaultIcon', etc. Is this possible? Thanks, -- Peter
Re: [Pharo-users] About GTSpotter matching
Yes, I asked about this also some months ago. +1 for the desired feature! On Sat, Dec 5, 2015 at 8:40 PM, Peter Uhnak wrote: > Hi, > > are there some wildcards in GTSpotter matching? > > Currently it searches anywhere in the (method) name, which makes it hard > for shorter names, because it will match a lot of junk. > > I've also discovered (by accident), that I can use '>>#selector' to > anchor the start of the selection. ('#selector' for some reason doesn't > work). > But I would like to also search by a simple ? (any character), * (any > characters) wildcard. Is that possible? > > Additionally constraining it from the end would be also nice. > For example I want to look through #default methods, however 90% of the > matches will be junk, so I would like to write '#default$' and it will > not match '#defaultIcon', etc. > > Is this possible? > > Thanks, > -- > Peter > > -- Mariano http://marianopeck.wordpress.com
Re: [Pharo-users] Code pane in Pharo 5
On Fri, Dec 4, 2015 at 5:06 PM, Nicolai Hess wrote: > > > 2015-12-04 9:55 GMT+01:00 p...@highoctane.be : >> >> Is there a way to have that pane with *less* noise around the code? >> >> Like getting rid of the suggestions panel at the bottom? > > You can disable the "Quality Assistance"-NautilusPlugin > Is Quality Assistant themed? The best colours might be different for standard versus dark theme, and make customising icons easier. I presume a user could then do what Phil wants by making their own theme subclass. On Fri, Dec 4, 2015 at 5:51 PM, Marcus Denker wrote: > Bad code looks bad, clean code looks clean. For me that’s the right thing. But we should guide not force :) cheers -ben >> Or the status line with W +L Format as you type? >> >> Not that I do not like them (at times), just that all of the bright >> red/green icons are distracting (a little more toned down color would be >> welcome). >> >> With small methods, this makes a lot of text in the way. >> >> When there are a ton of Nautiluses around, this adds up. >> >> I feel like I code on a Christmas tree.
[Pharo-users] OrderedSet?
Hi, what would be the equivalent of an OrderedSet? 1. all elements are unique 2. they are ordered 3. adding an existing element moves it so myOrderedSet addLast: x. "<- x is added as last" myOrderedSet addFirst: x. "<- x is moved from last to first" Thanks, -- Peter