Jump to content
SubSpace Forum Network

Drake7707

Project Moderator
  • Posts

    1308
  • Joined

  • Last visited

Everything posted by Drake7707

  1. try ${sessionScope.result} Ah crap, i just noticed var word = '<% = session.getAttribute("result"); %>' don't forget the = sign before the expression because you want it to out.write()
  2. This reminds me of all those asian people that were arrested in world war II. A lot of innocent ppl were put under surveillance and put into jail back then. Apparently USA still stinks as much as it did back then
  3. the <% %> tags indicate that the block will be replaced with whatever that is outputted meaning var word = "<% session.getAttribute("result"); %>"; should do the trick i think it's also possible to use var word = "${session["Result"]}"; I don't know the exact EL language, but netbeans has intellisense with it Perhaps verify it with alert("<%...%>") to see that it's not another problem
  4. I've written a small example in netbeans with tomcat 6.0. The page flow is as follows: index.jsp --post--> BackingBean (do stuff in database etc) ---redirect and forward request params---> result.jsp I used EL language in result.jsp (the ${param.FirstName}) as a shorter notation than <% request.getParameter(...) %> Hope this helps ^^ ExampleJSP.rar
  5. Drake7707

    C++

    I recommend starting with c# or java first. That'll teach you the basics of object oriented programming and how everything works and all. C++ is a lot more complicated with exotic structures here and there, no automatic garbage collection, pointers flying all over the place, etc etc. I think it would be easier to follow if you learn that after you got the hang of programming, it's why i used visual basic 6 as my first programming language. Start out small, and work your knowledge all the way up ^^
  6. Iirc, you need to put the input button in a post action form and pass a hidden parameter that you can retrieve in the doPost() method in the backing HttpServlet. With jsf it's more like ASP, where the button name is used as a method like button1_click(..), but jsp is more primitive and everything will have to go through doGet or doPost with the exception of property binding with el language like ${firstname} I've attached the jsp part of my course i have to learn for the exams in a few weeks, maybe it'll be helpful
  7. I can't really say much on the speed vista vs win7, because it's just been installed and all, let's see how well it performs after 3 monhts of daily use and couple of heavy installations later. 5400rpm disk sucks big time though, makes everything slower. I'm waiting for ssd's to become the default drive in notebooks before i buy one, that's for sure (and mine is only 2 years old and it was pretty pricy so that's another reason). I'm still doubting to use it as my main os though, i'm back on xp at the moment (i installed win7 on a seperate 20gig partition). One thing i noticed is the much bigger improvement in games that use direct x, but i think most likely because of dx10 (I remember it also having a significant boost in vista when i installed it). Overall it caches more efficiently, uses free resources to crank up the speed, releases those resources whenever something needs it, it makes stuff more responsive and snappy. It reminds me a bit of os x of what i've seen, gui wise, but everyone knows that apple sucks and windows is overall much better ^^
  8. and i wrote my own bypass program for zshare too ^^, it's pretty easy to resolve the actual download links from zshare Too bad the actual download component i used sucks ... big time :/ And i don't know if it was my external hdd or the archive but my iso was corrupt, so i had to find a torrent with the exact iso name and let it check and complete the file. Turns out i had 2 parts of 4mb that were corrupt Too bad the actual download component i used sucks ... big time :/
  9. I just finished installing windows 7 (build 7000) and it's running pretty smoothly. It looks a lot like vista, but it's faster and more responsive (even compared to my xp). (Though, vista also ran better on my computer) Anyone else installed it ?
  10. epicrage.org! Well the amount of well maintained zones are shrinking, it's only logical that the servers do as well
  11. not available in belgium >.> I've been playing around a lot with my Mio Moov 330 gps, i unlocked it with miopocket so i have a full wince pda now, with emulators and everything, and it's still a gps too. Beat that =D
  12. You do have the .NET 3.5 framework right ? The solution probably only compatible with visual studio :/
  13. That's odd :/, did you try running the exe in bin\Debug or did you open the solution ?
  14. After some more ehr sprite ripping and adding in animations ^^ I still hate that i can't write a gif directly though, i'll have to output all the frames, then use the animation wizard in animation shop :/, I should probably look into writing frames into a gif :/ (that's why the eh frame rate sucks so much, i had to guess how much frames per second there went by on each moment) For that my Animation.xml is 538 lines long phew Edit: There we go FFBattleGenerator.rar It's written in C# with .NET 3.5 and Visual Studio 2008 ^^ (yes, no vb6, for a change )
  15. I'm pretty bored because i have to learn exams and that's pretty boring to do, so i made this I'll prolly post the program & source code later, i need to clean up some stuff ^^
  16. I was browsing some serious business on the internet (*ahem* wikipedia because i had to look something up) and i stumbled on some franco-belgian comics I used to read. So i was wondering, what comics do you like ^^? I don't know anything about american comics though, they're never released here so I probably don't know any of them (unless you count the ones where movies were based on such as spiderman or so ) (from what i saw the majority of them are based on superhero stuff, but i can be wrong ). Annnnnd i'm guessing you don't know anything about comics that are released here, because well, they all originate from Belgium & France, hence the name ^^ (Here's a list http://en.wikipedia.org/wiki/List_of_Franc...an_comic_series , i don't know if you'll recognize any of them ) (well those from UK probably will, maybe).
  17. multiboot xp/vista is the best solution for now. I've thought about trying it myself, but it's such a mess and the chanches of actually working & have a performance boost are too low for me. Vista with dx10 is faster than xp anyway when you config it right. If you turn down the visual effects to a minimum and do some tweaks here and there, it'll always work better than no matter what port of dx10 to xp
  18. not giving presents to anyone solves the problem of wrapping + you save money + you can spend the money you saved on something that you actually want. It's a win-win situation to just ignore christmas (or any other festive day that involves purchasing stuff for others other than yourself) ^^
  19. Feature already implemented make us (eh, = Samapico) go less worky ^^
  20. No, i just don't care about christmas or new year.
  21. I don't celebrate anything so just the normal everyday food
  22. it snowed for a weekend here, buttttttttttt not for the following weeks now
  23. That doesn't make much of a difference, the problem is the 'textures' for lvz or the temporary bitmaps for selection, regions etc that's causing the memory of the video card to overflow. The preview where you actually draw on doesn't take much memory at all. Reloading lvz's takes quite a lot of time, especially when there are a lot of them, because it has to reload everything from disk. And discarding unnecessary temporary bitmaps not needed at the time is already happening. One thing that can be done is like this (wonder why i think of it only now ): instead of caching it on the disk you could cache it in general memory by using GetDIBits to retrieve all the pixels from the hdc into an array (much like clsPic does). I think i'll write a resource manager for that ^^ brb Option Explicit Private Type resource id As Long path As String cached As Boolean pixelarr() As Byte hdc As Long End Type Dim resources() As resource Dim resourceCount As Integer 'current id count to make a unique id Dim curIdCount As Long 'video memory used for resources Dim memUsed As Long Const MAX_MEMORY = 134217728 '128mb Sub load(imgPath As String) If resourceCount >= UBound(resources) Then ReDim Preserve resources(resourceCount + 100) End If Dim r As resource r.id = makeUniqueID r.path = imgPath '// TODO ' calculate memory for resource Dim memForResource As Long If memUsed + memForResource > MAX_MEMORY Then 'loading this resource will cause the memory to overflow 'swap out a resource that's not used to standard memory freeMemory (memForResource) End If memUsed = memUsed + memForResource End Sub Private Function makeUniqueID() As Long 'make a unique id for each resource makeUniqueID = curIdCount curIdCount = curIdCount + 1 End Function Sub save(id As Integer, path As String) Dim hdc As Long hdc = getResource(id) '//TODO 'save resource to path End Sub Sub discard(id As Integer) Dim idx As Integer idx = getResourceById(id) If idx <> -1 Then 'discard resource '// TODO 'calculate memory for resource Dim memForResource As Long '// TODO 'destroy its hdc memUsed = memUsed - memForResource Dim i As Integer For i = idx + 1 To resourceCount - 1 resources(i - 1) = resources(i) Next resourceCount = resourceCount - 1 End If End Sub Function getResource(id As Integer) As Long 'returns the hdc where the image is ready Dim idx As Integer idx = getResourceById(id) If idx <> -1 Then If resources(idx).cached Then '// TODO 'we need to restore the array back to a hdc, but we need to make 'sure that we still have enough memory Else getResource = resources(idx).hdc End If End If End Function Private Sub freeMemory(mem As Long) 'ensure that we have enough memory to load mem into the video ram 'move resources from their hdc's to arrays here Do While memUsed + mem > MAX_MEMORY '// TODO 'Clear out resources here 'select resources by a certain criteria (oldest, least used ?) and cache them Dim resID As Integer cache (resID) Loop End Sub Sub cache(id As Integer) Dim idx As Integer idx = getResourceById(id) If idx <> -1 Then 'force cache of the resource 'dump them to an array If resources(idx).cached Then 'it's already cached Else '//TODO 'move the hdc to an array '// TODO ' calculate memory for resource Dim memForResource As Long memUsed = memUsed - memForResource End If End If End Sub 'returns index of resource by id Private Function getResourceById(id As Integer) As Integer Dim i As Integer For i = 0 To resourceCount - 1 If resources(i).id = id Then getResourceById = i Exit Function End If Next getResourceById = -1 End Function Private Sub Class_Initialize() ReDim resources(100) resourceCount = 0 memUsed = 0 End Sub Private Sub Class_Terminate() 'delete all remaining resources Dim i As Integer For i = 0 To resourceCount - 1 Call discard(resources(i).id) Next End Sub I know, still a lot of todo's: - hdc -> array dump - array -> hdc - memory calculation of a resource - selection process of which resource to cache when there's not enough memory anymore (least used could be done with a timestamp for each resource, oldest could be done with a stack that pushes all the resources in it and the oldest is element 0)
  24. lol, going to a lan would be the equavalent of wearing my shirt I got from sun (at devoxx '08) with 'Source Wars' on the back in star wars font and 'May the Source be with you' on the front in a public place.
  25. yet another moron sigh. They should ban guns like they did here, unless you have a license for a gun you aren't permitted to have one
×
×
  • Create New...