[Proto-Scripty] Re: Auto re-size slider scrollbar range based on viewport's width
did you get a reply? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/ayy2yN8wHHcJ. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: things that I'd love to see on the next verion of prototype
+1 for mouse wheel event and ajax abort and timeout. String.prototype.trim AKA strip() is already here. E-mail validation pattern is under big question, e.g. regexp fully compatible with RFC 2822 will look like (?:[a-z0-9!#$%'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%'*+/=?^_`{|}~-]+)*|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/FIkWdcZNxukJ. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] help needed.
var lis = $('slide-images').getElementsByTagName('li'); nobody knows about $$ and CSS selectors :) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/1rXGuT4i4W8J. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: CSV to Json
You can invert your {'fields': [{'field':'fname', 'col':2}, {'field':'ssn', 'col':5}]} to something like ['field0', 'field1', 'fname', 'field3', 'field4', 'ssn'] and then zip it (Enumerable#zip) with every CSV row. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/TW9sKYDkBvQJ. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: CSV to Json
Jason, Why do you copy the return array into an other one before using it? (and why rewriting code already available as native PHP functions?) This should do the same than your code: $fh = fopen($filename); $fields = fgetcsv($fh); while($line = fgetcsv($fh) !== false) { print json_encode(array_combine($fields,$line)); } fclose($fh); Eric PS: You may want to add some error handling :o) On Aug 20, 6:03 pm, Jason jwestbr...@gmail.com wrote: I would use a small PHP script (assuming the first line is the field names) $fields = array(); $data = array(); $fh = fopen($filename); $line = fgetcsv($fh); foreach($line as $n) { $fields[] = $n; } while($line = fgetcsv($fh) !== false) { foreach($line as $key = $n) { $data[$fields[$key]][] = $n; } } print json_encode($data); seehttp://us.php.net/fgetcsvfor more examples On Aug 18, 11:24 pm, kstubs kst...@gmail.com wrote: Any tips for converting CSV to Json? I have CSV, row deliminted \n, and fields delimited with typical comma. There is a known/exisiting object type for each field. Something like: {'fields': [{'field':'fname', 'col':2}, {'field':'ssn', 'col':5}]} So I have that to work from, and will populate a Json result like this: [{'data':{'fname':value}, {'ssn':value}},{'data':{'fname':value}, {'ssn':value}}] I feel like I am doing it the long way when I: // split csv string by \n to new line array // for every item in new line split string // split item by , to field array // for every item in field array // create object to add to new data array Any ideas would help. Thanks, Karl.. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Prototype's evolution
Thanks for the input, guys. *Lots* of interesting stuff to read in this thread, and I'm gonna try to ruminate on all of it and respond at the end of the day with something long and thoughtful of my own. Cheers, Andrew On Jul 13, 9:36 am, Cantrelle Vincent vcantre...@gmail.com wrote: Dear all, This is just a simple question related to the fact that everywhere I look, especially on some french forums for developers, it seems that the number of users of the jQuery library is growing / increasing, and it's not really the case for Prototype. I have always prefered to work with Prototype.js, but I must say that sometimes I feel a little bit worried. May be I'm wrong, I hope I'm wrong, and so I hope that I have a truncated view of the situation, and that the number of users for Prototype.js is still high enough, and the motivation of the core team too, so that this library will be still maintained / improved in the futur. Can somebody give me a hint about that ? Thanks in advance, Vincent. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: CSV to Json
Eric - that is smoother, I'll update my scripts to run it that way thanks! On Aug 22, 5:01 am, Eric lefauv...@gmail.com wrote: Jason, Why do you copy the return array into an other one before using it? (and why rewriting code already available as native PHP functions?) This should do the same than your code: $fh = fopen($filename); $fields = fgetcsv($fh); while($line = fgetcsv($fh) !== false) { print json_encode(array_combine($fields,$line));} fclose($fh); Eric PS: You may want to add some error handling :o) On Aug 20, 6:03 pm, Jason jwestbr...@gmail.com wrote: I would use a small PHP script (assuming the first line is the field names) $fields = array(); $data = array(); $fh = fopen($filename); $line = fgetcsv($fh); foreach($line as $n) { $fields[] = $n; } while($line = fgetcsv($fh) !== false) { foreach($line as $key = $n) { $data[$fields[$key]][] = $n; } } print json_encode($data); seehttp://us.php.net/fgetcsvformore examples On Aug 18, 11:24 pm, kstubs kst...@gmail.com wrote: Any tips for converting CSV to Json? I have CSV, row deliminted \n, and fields delimited with typical comma. There is a known/exisiting object type for each field. Something like: {'fields': [{'field':'fname', 'col':2}, {'field':'ssn', 'col':5}]} So I have that to work from, and will populate a Json result like this: [{'data':{'fname':value}, {'ssn':value}},{'data':{'fname':value}, {'ssn':value}}] I feel like I am doing it the long way when I: // split csv string by \n to new line array // for every item in new line split string // split item by , to field array // for every item in field array // create object to add to new data array Any ideas would help. Thanks, Karl.. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Prototype's evolution
OK, let's start from the beginning: On Jul 13, 9:36 am, Cantrelle Vincent vcantre...@gmail.com wrote: I hope that I have a truncated view of the situation, and that the number of users for Prototype.js is still high enough, and the motivation of the core team too, so that this library will be still maintained / improved in the futur. Prototype's development over the past few years has been typified by a few months of inactivity, then a furious week of activity, and I doubt that will change anytime soon. It happens that way because I'm juggling several different open-source projects on top of my day job, and so I try to rotate between them every few weeks. So don't read anything into the periods of inactivity. I don't have any plans to stop working on Prototype. On Jul 15, 12:49 pm, Phil Petree phil.pet...@gmail.com wrote: I certainly have the resouces to host the forums and would have no problem in putting them up and maintaining them but it would take a consensus of the powers that be because if none of the guys that answer the majority of the questions are interested then it would just be like the french forums when no one replied. If people feel like this mailing list isn't serving their needs, I've got no problem with someone wanting to start a forum somewhere else. Frankly, I think the best solution would be to encourage people with support questions to post on StackOverflow and tag their questions with prototype or prototypejs or something, but I'm open to other suggestions. Certainly, if someone were willing to maintain some forums, I'd be happy to give them the vouch, because that's a task we know we'll never have time for. On Jul 21, 8:42 pm, Walter Lee Davis wa...@wdstudio.com wrote: The current documentation (1.7) is generated directly from the source code using a tool written by one of the core guys -- I think it's called jsDoc or something like that. Anyway, it's just static HTML, CSS and JavaScript (naturally) once that tool is done. I think that if there was enough energy for moderation, or some sort of community moderation system, that a great add-on to the site would be something like Disqus, so the user comments and corrections could be added to the mix. Our documentation tool is called PDoc, and it's Tobie's brainchild. In fact, he had spent some time modifying it to generate one HTML page per method for precisely this purpose — so that we could enable Disqus commenting on every page. I think the project got shelved when Tobie's daughter was born, or else when he started working for Facebook. I'll follow up with him and see if that's at a point where he can hand it off to someone else. I share the concerns about moderation, because while I agree that PHP's documentation comments are a net benefit, many of them contain sloppy code and încorrect information. But I think Disqus's likes are a good start. Hopefully the cream will rise. On Jul 26, 2:42 pm, Phil Petree phil.pet...@gmail.com wrote: The core devs need to appoint a Community Activist whose responsibility it is to build the community and who has the decision making authority to implement these changes without bugging the devs with all our needs. T.J. used to serve in this role, but stepped back some time ago because of other commitments. You can blame me for not seeking out someone to take his place; that's mostly why the documentation tickets have been languishing on Lighthouse. I'm happy to appoint whoever you guys think would do a good job. On Aug 17, 10:04 am, Phil Petree phil.pet...@gmail.com wrote: My fear is that prototype will ultimately face the same fate... be a technically superior product with a few guys pitching in and carrying the weight (anyone who follows this feed knows who the guys are who always pitch in with an answer) while marketing, support, easy access to developed libs and all the other goodies go ignored which causes adoption of the product to dwindle because these things exist on another platform. I know the major libraries have had a playfully-competitive relationship for years, but I'm not altogether concerned with the market share of Prototype. Someone asked about this on Quora, so I'll link my answer [1] here so as not to re-state myself. I will say, though, that if we're crowning winners and losers, then jQuery won a long time ago. It is certainly the _de facto_ JavaScript library for web development. The good news is that the losers of the war aren't looking so bad; libraries like Prototype, MooTools, and Dojo still have loyal user bases, and I doubt they're going away. So here are the next steps, I think: I'm going to touch base with Tobie and learn the state of his Disqus project. Meanwhile, weigh in and let me know who you think could fill T.J.'s gargantuan shoes in the realm of documentation and community activism. Cool? By the way: I did stop watching this list closely a while back, but told myself I'd check in from time to time.