[QUOTE=tjl;17709929]You could probably extend [url=http://java.sun.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html]ThreadPoolExecutor[/url] to provide such functionality.[/QUOTE]
Thanks, I'll look into that. But I'll probably make it my self. Just because it's fun.
With more free time on my hands I'll keep working on my remote source server control program.
[QUOTE=Marlamin;17696138]Here's an example how easy it is to just echo a character name.
[code]
//blabla you grab xml page through curl
$load = curl_exec($curl); // curl shit
$xml = new SimpleXMLElement($load); //parse xml page as simplexml array
$char_name = $xml->characterInfo->character['name']; //location of the charname
echo $char_name;
[/code]
I expanded this a lot etc and have a 300+ line file with all definitions and locations of different strings. Really handy, if you want it throw me a PM and I'll send it to you tomorrow.[/QUOTE]
I love you Marlamin <3
:h:
[img]http://scottsserver.gotdns.com/secret/wow/image.php?s=eu&r=Arygos&n=Haxx[/img]
[QUOTE=Druchii;17711012]I love you Marlamin <3
:h:
[img]http://scottsserver.gotdns.com/secret/wow/image.php?s=eu&r=Arygos&n=Haxx[/img][/QUOTE]
:v: Nice work.
[QUOTE=Robber;17710758]Thanks, I'll look into that. But I'll probably make it my self. Just because it's fun.[/QUOTE]
I tried it with ThreadPoolExecutor and got it working. But now it's taking 20ms with 1 thread and 30ms with 4 threads. :confused:
(I have a quad core)
[QUOTE=garry;17709767]Got a bit of docking working.. It works pretty much the same as the visual studio docking windows.
[img]http://img154.imageshack.us/img154/6142/gwendocking.png[/img][/QUOTE]
I'd like to see how you did that.
I hope someone with experience with the Executor class can help me with this:
[url]http://pastebin.com/f219d7904[/url]
It's running (much) slower than when I just calculate everything in the main thread.
Like this
[media]http://www.youtube.com/watch?v=15NdzbVjV9w[/media]
[QUOTE=garry;17711906]Like this
[media]http://www.youtube.com/watch?v=15NdzbVjV9w[/media][/QUOTE]
This looks unbelievably good. Please tell me this is going to be free.
Wow, that's amazing. Is it the recording software's fault that the mouse is offset?
And you should make the radiobuttons look less like checkboxes.
That's pretty incredible. How long have you been working on it so far?
[QUOTE=garry;17711906]Like this
[media]http://www.youtube.com/watch?v=15NdzbVjV9w[/media][/QUOTE]
Fucking rad.
[QUOTE=Robber;17711990]Is it the recording software's fault that the mouse is offset?[/QUOTE]
Also this.
[QUOTE=Catdaemon;17711972]This looks unbelievably good. Please tell me this is going to be free.[/QUOTE]
The plan is free, open source, MIT license.
That already looks better than every other ingame widget toolkit I've ever seen (yes, that includes proprietary GUIs)
[editline]07:58PM[/editline]
[QUOTE=garry;17712174]The plan is free, open source, MIT license.[/QUOTE]
oh god yes
[QUOTE=garry;17712174]The plan is free, open source, MIT license.[/QUOTE]
Holy crap garry, nice.
[QUOTE=Robber;17711760]I hope someone with experience with the Executor class can help me with this:
[url]http://pastebin.com/f219d7904[/url]
It's running (much) slower than when I just calculate everything in the main thread.[/QUOTE]
Well, a few things come to mind when reading your code.
1. You are creating a new Runnable object inside a double for loop, however I'm not sure how you can mitigate this.
2. Are BufferedImage objects safe for concurrent modification?
3. Is a LinkedList the best container for your Future objects? (pet peeve of mine - should really be List<Future> futures = new LinkedList<Future>(); ) This won't have much of an impact on overall performance though.
4. Perhaps consider redesigning your algorithm so that each Runnable object returns the pixel it was assigned to, and the color that pixel should be. Then in your main thread, do the actual setting of the pixels on the BufferedImage.
so, I was playing around with delegates in C# and discovered reflection by accident. Now i'm jizzing all over the place because I can bind functions.
[QUOTE=garry;17711906]Like this
[media]http://www.youtube.com/watch?v=15NdzbVjV9w[/media][/QUOTE]
Is it going to be possible to use this with OpenGL? I think you said you're currently using Direct3D.
[QUOTE=tjl;17713718]Well, a few things come to mind when reading your code.
1. You are creating a new Runnable object inside a double for loop, however I'm not sure how you can mitigate this.
2. Are BufferedImage objects safe for concurrent modification?
3. Is a LinkedList the best container for your Future objects? (pet peeve of mine - should really be List<Future> futures = new LinkedList<Future>(); ) This won't have much of an impact on overall performance though.
4. Perhaps consider redesigning your algorithm so that each Runnable object returns the pixel it was assigned to, and the color that pixel should be. Then in your main thread, do the actual setting of the pixels on the BufferedImage.[/QUOTE]
1. That's definitely something I should avoid, but as you said, I don't think there's an (easy) way to fix this.
2. I think so. It seems to work fine.
3. I use List<Bla> if I'm using it as a member for a class, but I'm using the actual implementing class if it's just for a method.
4. Will do that. I doubt it'll speed it up, but it's definitely nicer code and I don't have to care if I just was lucky or BufferedImage actually is thread safe.
Thanks for you tips. :smile:
[QUOTE=garry;17711906]Like this
[media]http://www.youtube.com/watch?v=15NdzbVjV9w[/media][/QUOTE]
Sweet. I meant the code for the docking though.
[QUOTE=garry;17712174]The plan is free, open source, MIT license.[/QUOTE]
cool lol
(r8 dumb
-thx)
In english, is the MIT license 'basically you can do whatever you want but give credit'?
In english? The MIT is not complicated or lengthy at all. Just read it.
[QUOTE=Eleventeen;17716080]In english, is the MIT license 'basically you can do whatever you want but give credit'?[/QUOTE]
Yes.
Coolies.
[QUOTE=Ortzinator;17716369]In english? The MIT is not complicated or lengthy at all. Just read it.[/QUOTE]
Though, it can be.
[code]/*
02. * More info at: http://phpjs.org
03. *
04. * This is version: 2.91
05. * php.js is copyright 2009 Kevin van Zonneveld.
06. *
07. * Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
08. * (http://kevin.vanzonneveld.net), Onno Marsman, Michael White
09. * (http://getsprink.com), Waldo Malqui Silva, Paulo Ricardo F. Santos, Jack,
10. * Philip Peterson, Jonas Raoni Soares Silva (http://www.jsfromhell.com), Ates
11. * Goral (http://magnetiq.com), Legaev Andrey, Ratheous, Martijn Wieringa,
12. * Nate, Philippe Baumann, lmeyrick
13. * (https://sourceforge.net/projects/bcmath-js/), Enrique Gonzalez, Theriault,
14. * Webtoolkit.info (http://www.webtoolkit.info/), Jani Hartikainen, Ash Searle
15. * (http://hexmen.com/blog/), travc, Ole Vrijenhoek, Carlos R. L. Rodrigues
16. * (http://www.jsfromhell.com), Alex,
17. * http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
18. * pilus, Erkekjetter, T.Wild, GeekFG (http://geekfg.blogspot.com), Andrea
19. * Giammarchi (http://webreflection.blogspot.com), Johnny Mast
20. * (http://www.phpvrouwen.nl), d3x, marrtins, stag019, Michael Grier, mdsjack
21. * (http://www.mdsjack.bo.it), gettimeofday, Oleg Eremeev, Mirek Slugen,
22. * David, Arpad Ray (mailto:arpad@php.net), Breaking Par Consulting Inc
23. * (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
24. * Steve Hilder, Marc Palau, KELAN, Steven Levithan
25. * (http://blog.stevenlevithan.com), Josh Fraser
26. * (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
27. * Public Domain (http://www.json.org/json2.js), T.J. Leahy, majak, Lars
28. * Fischer, Alfonso Jimenez (http://www.alfonsojimenez.com), Pellentesque
29. * Malesuada, Tyler Akins (http://rumkin.com), Felix Geisendoerfer
30. * (http://www.debuggable.com/felix), Kankrelune
31. * (http://www.webfaktory.info/), gorthaur, Sakimori, Caio Ariede
32. * (http://caioariede.com), Aman Gupta, Karol Kowalski, Thunder.m, AJ, Steve
33. * Clay, noname, Gilbert, duncan, class_exists, Marco, madipta, David James,
34. * Frank Forte, Subhasis Deb, nobbler, Denny Wardhana, Nathan, Mateusz
35. * "loonquawl" Zalega, Arno, marc andreu, ger, Sanjoy Roy, 0m3r, sankai,
36. * Douglas Crockford (http://javascript.crockford.com), john
37. * (http://www.jd-tech.net), mktime, Ole Vrijenhoek (http://www.nervous.nl/),
38. * T. Wild, Jon Hohle, ReverseSyntax, Thiago Mata
39. * (http://thiagomata.blog.com), Linuxworld, nord_ua, lmeyrick
40. * (https://sourceforge.net/projects/bcmath-js/this.), David Randall, Bryan
41. * Elliott, Pyerre, Soren Hansen, T0bsn, Peter-Paul Koch
42. * (http://www.quirksmode.org/js/beat.html), Tim Wiel, Brad Touesnard, MeEtc
43. * (http://yass.meetcweb.com), Ozh, XoraX (http://www.xorax.info), J A R, Marc
44. * Jansen, Paul, Hyam Singer (http://www.impact-computing.com/), Raphael (Ao
45. * RUDLER), kenneth, Francesco, LH, echo is bad, djmix, Lincoln Ramsay, Der
46. * Simon (http://innerdom.sourceforge.net/), Bayron Guevara, JB, Eugene Bulkin
47. * (http://doubleaw.com/), Victor, Slawomir Kaniecki, Pierre-Luc Paour, Martin
48. * Pool, Kirk Strobeck, Rick Waldron, Kristof Coomans (SCK-CEN Belgian
49. * Nucleair Research Centre), Saulo Vallory, Valentina De Rosa, Jason Wong
50. * (http://carrot.org/), Daniel Esteban, Christoph, Mick@el, rezna, Simon
51. * Willison (http://simonwillison.net), Gabriel Paderni, Marco van Oort,
52. * penutbutterjelly, Anton Ongson, Blues (http://tech.bluesmoon.info/), Tomasz
53. * Wesolowski, Eric Nagel, Bobby Drake, Luke Godfrey, Pul, Wagner B. Soares,
54. * Artur Tchernychev, Yves Sucaet, sowberry, hitwork, Norman "zEh" Fuchs,
55. * Ulrich, johnrembo, Nick Callen, ejsanders, Aidan Lister
56. * (http://aidanlister.com/), Brian Tafoya (http://www.premasolutions.com/),
57. * Philippe Jausions (http://pear.php.net/user/jausions), Orlando, dptr1988,
58. * strcasecmp, strcmp, Taras Bogach, Alan C, uestla, metjay, ChaosNo1, James,
59. * Chris, Pedro Tainha (http://www.pedrotainha.com), Alexander Ermolaev
60. * (http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, Christian
61. * Doebler, setcookie, Greg Frazier, Tod Gentille, Alexander M Beedie,
62. * FremyCompany, baris ozdil, FGFEmperor, 3D-GRAF, jakes, Yannoo, gabriel
63. * paderni, Luis Salazar (http://www.freaky-media.com/), Tim de Koning, Jalal
64. * Berrami, date, Francois, Scott Cariss, vlado houba, stensi, taith, Robin,
65. * Matt Bradley, Cord, Manish, Atli Þór, davook, Andrej Pavlovic, Dino,
66. * Greenseed, mk.keck, Garagoth, Russell Walker (http://www.nbill.co.uk/), YUI
67. * Library: http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html,
68. * Blues at http://hacks.bluesmoon.info/strftime/strftime.js, Andreas, Jamie
69. * Beck (http://www.terabit.ca/), DtTvB
70. * (http://dt.in.th/2008-09-16.string-length-in-bytes.html), Leslie Hoare, Ben
71. * Bryan, Diogo Resende, Howard Yeend, Allan Jensen (http://www.winternet.no),
72. * Benjamin Lupton, Rival, Luke Smith (http://lucassmith.name), booeyOH, Cagri
73. * Ekin, Amir Habibi (http://www.residence-mixte.com/), Kheang Hok Chin
74. * (http://www.distantia.ca/), Jay Klehr
75. *
76. * Dual licensed under the MIT (MIT-LICENSE.txt)
77. * and GPL (GPL-LICENSE.txt) licenses.
78. *
79. * Permission is hereby granted, free of charge, to any person obtaining a
80. * copy of this software and associated documentation files (the
81. * "Software"), to deal in the Software without restriction, including
82. * without limitation the rights to use, copy, modify, merge, publish,
83. * distribute, sublicense, and/or sell copies of the Software, and to
84. * permit persons to whom the Software is furnished to do so, subject to
85. * the following conditions:
86. *
87. * The above copyright notice and this permission notice shall be included
88. * in all copies or substantial portions of the Software.
89. *
90. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
91. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
92. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
93. * IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
94. * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
95. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
96. * OTHER DEALINGS IN THE SOFTWARE.
97. */[/code]
onoes a list of names
[QUOTE=Eleventeen;17716080]In english, is the MIT license 'basically you can do whatever you want but give credit'?[/QUOTE]
No, actually the MIT is,"do anything you want, just don't get rid of this notice."
[QUOTE=Ortzinator;17717278]onoes a list of names[/QUOTE]
[code]87. * The above copyright notice and this permission notice shall be included
88. * in all copies or substantial portions of the Software.[/code]
Oh no a list of names that needs to be copy pasted!!!
Sorry, you need to Log In to post a reply to this thread.