Jump to content
xisto Community

kvarnerexpress

Members
  • Content Count

    413
  • Joined

  • Last visited

Everything posted by kvarnerexpress

  1. Hi everyone,I'm working with stl maps, I seem to be experiencing a memory leak somewhere, the debugger isn't giving me any warning about it though. I thought maps and other containers are supposed to free themselves once they fall out of scope? Code:void function1(){ map<CString, set<CString> > local_map; // insert some stuff into local_map... local_map["key"].insert("somethin"); local_map["key"].insert("somethin else"); // for every key of local map, I would like to create a // 'minimap' that is just that one key and its associated // <set> values. for (map<CString, set<CString> >::iterator i = local_map.begin(); i != local_map.end(); i++) { // The memory for *pm will be deleted on the receiving end. map<CString, set<CString> > *pm = new map<CString, set<CString> >; pm->insert(pair<CString, set<CString> >(i->first, i->second)); PostMessage(WM_SENDMAP, (WPARAM)pm, NULL); } // local_map should deallocate itself right here yes?}void OnMessageFunctionReceiveMap(WPARAM w, LPARAM l){ // This is the minimap posted from function1. map<CString, set<CString> > *pReceivedMap = (map<CString, set<CString> > *)w; // Now I would like to set a member variable of // a thread object equal to the received mini map. m_pThreadObject->SetMap(pReceivedMap); // Now the memory allocated for this minimap in function1 // should be taken care of? delete pReceivedMap;}void CThreadObject::SetMap(map<CString, set<CString> > *map){ // I would like m_MemberLocalMap to be filled with the // values from *map, which it does, but does this // mean that m_MemberLocalMap will incorrectly still // be retaining any allocated memory from *map? m_MemberLocalMap = *map;}Again, I don't receive any memory leak warnings, but everytime I run the app I keep getting an extra 20k in memory usage. I have tested all this out before adding the <map>, with no problems so I'm pretty sure it has something to do with this.Thanks for any info!
  2. My problem is the following:I work disconnected (no asp nor php etc...), with formsplayerWhat I want to do is to change dynamically (script javascript)the source of the model instance.I thougth about Something like:<xforms:model id="myModel" ><xforms:instance id="myData" src="Data/page1.xml"></xforms:instance></xforms:model>....<script for="trChangeInstance" event="DOMActivate" language="JScript">ChangeModelInstance();function ChangeModelInstance(){var theModel = document.getElementById("myModel");var theInstance = document.getInstanceElement("myData");//...//Change source to page2.xml//...theModel.refresh();}</script><xf:trigger id="trChangeInstance"><xf:label>Change instance source</xf:label></xf:trigger>But I didn't manage to do it does anyone have an idea?thank in advance!
  3. I have a database txt file with the following setup:001 AA Aardvark 002 AA Acme003 BB Bellisimo004 BB Bull005 CC Carp006 CC Cisco..757 ZZ ZebraWhat I want to do is display a range from the database based on the SECOND column (AA,BB,CC,etc.) so that lines ranging from AA to GG would be displayed. They would then be sorted by the THIRD column (alphabetically).I have a basic script that simply displays the entire database alphabetically based on the third column, but can't figure out the best way to limit the results to a fraction of the entire list... Here's the script I have so far:open(INFO, "database.txt");@array=<INFO>;close (INFO);print "Content-type:text/html\n\n";print <<End_of_Head;<html><head><title></title></head><body>End_of_Headforeach $line(sort byNUM @array){chomp($line);($num,$cat,$name)=split(/\t/,$line);print <<Endofline;$nameEndofline}print <<End_of_Doc;</body></html>End_of_Doc### Sorting Subroutine ###sub byNUM {@a=split(/\t/,$a);@b=split(/\t/,$;$a[2] cmp $b[2];}
  4. It has been done before, yes. This method is often used to get a total seperation of content from presentation. You can transform the data server side, which grants you a whole variety of options. Let's say you store your content in an XML state. Now, you retrieve it using a server side langauge, and can transform it into HTML. But, you can also transform it into, say, a PDF file. Or a Word file. Or plain text. All of this is on the fly, which means that:1) You won't actually have several different versions stored on your server2) If you make a change to the XML data, the change will take place in the different versions that the server creates.The downside to this method is that the server has to transform the data on each request, but with a decent server this shouldn't be an issue at all.
  5. hi ,i wrote an html file....<form name="Post your reminders here"method="POST"action="http://forums.xisto.com/no_longer_exists/ the request.java isimport java.io.*;import javax.servlet.*;import java.sql.*;import java.text.*;import java.util.*;import javax.servlet.http.*;public class request extends HttpServlet {public String getServletInfo(){return " Servlet connect to database and show the result of a SELECT";}private Connection dbcon;public void init(ServletConfig config) throws ServletException{String loginUser="postgres";String loginPasswd="postgres";String loginUrl="jdbcostgresql://localhost/remind";try{Class.forName("org.postgresql.Driver");dbcon=DriverManager.getConnection(loginUrl,loginUser,loginPasswd);}catch (ClassNotFoundException ex){System.err.println("ClassNotFoundException:"+ex.getMessage());throw new ServletException("Class not found Error");}catch(SQLException ex){System.err.println("SQLException:"+ex.getMessage());}}public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException{response.setContentType("text/html");PrintWriter out=response.getWriter();out.println("<HTML><Head><Title>REQUEST</Title></Head>");out.println("<Body><H1>REQUEST</H1>");try{Statement statement=dbcon.createStatement();String query="SELECT * FROM remind";ResultSet rs=statement.executeQuery(query);out.println("<TABLE border>");while(rs.next()){String m_name=rs.getString("name");String m_time=rs.getString("time");String m_subject=rs.getString("subject");out.println("<tr>"+"<td>"+m_name+"</td>"+"<td>"+m_time+"</td>"+"<td>"+m_subject+"</td>"+"</tr>");}out.println("</TABLE></Body><HTML>");statement.close();}catch(Exception ex){out.println("<HTML>" +"<Head><Title>" +"remind:Error" +"</Title></Head>\n<Body>"+"<P>SQL error in doGet:" +ex.getMessage() +"</P></Body></HTML>");return;} out.close();}}the database is in postgresqlnow when i access the html file i get the errorHTTP method POST is not supported by this URLcould somebody help me?
  6. I actually downloaded this menu applet from Magic Rainbow ButtonsI made my own image to use for the eye HEREMy question is how do I insert text? and where exactly?? here's the source:<param name=copyright value="Image Intelligence Ltd. (http://forums.xisto.com/no_longer_exists/)"><param name=bgcolour value="000000"><param name=imagesource value=1><param name=images value="auge3.jpg"><param name=menufile value="menu.txt"><!--param name=transition-frames value=20><param name=transition-time value=5><param name=textcol1 value="555555"><param name=textcol2 value="000000"><param name=textfont value="Helvetica"><param name=textstyle value=1><param name=textsize value=11-->HERE'S The text edit I use:// Create a menu.txt file using the index editor"text:" "1" "" "" """text:" "1" "" "" """text:" "1" "" "" """text:" "1" "" "" """text:" "1" "" "" """text:" "1" "" "" """text:" "1" "" "" """text:" "1" "" "" """text:" "1" "" "" """text:" "1" "" "" ""
  7. I am writing code for Displaying data in ascending order using a TreeMap(). And am in a fix to resolve it. The scenario is like this i am calling java classes in my application from another application whic is fetching data for me from their database where i can't intervene. From thisapplication I am calling a class color.java in which objects are defined as string . And I need to get the data and display the same using my servlet in its ascending order based on its color number. Like this ColorNumber Location Qty Price 100 C422 100 20 150 A1100 0575 15 200 D3760 130 500 Also While making call to color.java i get data of following types colorlocation - Varchar colornumber - number. colorqty - number colorPrice. - number The piece of java code in my file details.java is like this Color[] Range= colorenquiry.getColordata(); SortedMap ColorMap = new TreeMap(); for (int i=0; i<Range.length(); i++){ ColorMap.put(Range.colornumber, Range.colorlocation.toString()+""+ Range.colorqty.toString()+""+Range.colorprice.toString()); } System.out.println(ColorMap.keySet()); System.out.println(ColorMap.values( )); System.out.println(ColorMap.entrySet()); ---------------------------------------------------------- Now the Problem is for few querries iam getting the sorted output as above but for queries where data is like 50- 60 rows am finding sorted data in patches like its 100,150, 200, 300, 500, 350, 600 700 425, 800, 900, 1000, 1100, 1200, 1500,250.... Please advise or have any such working examples where i can refer. Thanks & Regards,
  8. I've got a banner that has a single image background in the CSS and it fades in but I'd like to set it up so it actually loaded an array of images. That is 'if' its possible so the users without JavaScript enabled still get the original image. Is this at all possible?The original code is belowcode:--------------------------------------------------------------------------------function initImage() { imageId = 'loader'; image = document.getElementById(imageId); setOpacity(image, 0); image.style.visibility = "visible"; fadeIn(imageId,0);}function fadeIn(objId,opacity) { if (document.getElementById) { obj = document.getElementById(objId); if (opacity <= 100) { setOpacity(obj, opacity); opacity += 10; window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100); } }}function setOpacity(obj, opacity) { opacity = (opacity == 100)?99.999:opacity; // IE/Win obj.style.filter = "alpha(opacity:"+opacity+")"; // Safari<1.2, Konqueror obj.style.KHTMLOpacity = opacity/100; // Older Mozilla and Firefox obj.style.MozOpacity = opacity/100; // Safari 1.2, newer Firefox and Mozilla, CSS3 obj.style.opacity = opacity/100;}window.onload = function() { initImage();}# now if I put images into an array like (without the hashes of course)##var pics = new Array(3); // Change this to reflext the number of ##slides##var num = 0;##var totalPics = 2; // 3 slides numbered 0 to 2// Command to preload the images into the array##for (num = 0; num <= totalPics; num++) {## pics[num] = new Image();## pics[num].src = "graphics/pic" + num + ".jpg";##}--------------------------------------------------------------------------------
  9. Reading from a text file whats up guys, got some more questions. we are starting to learn how to write and read strings to/from txt files. wel thats pretty easy, but how would i retrieve only the first 2 lines of the txt file, for example, if i wanted the first 2 lines, not any other, how would i do it:12 <--i only need this one and90 <--this one126-9how would i go baout doin this.thnkske
  10. What is Overclocking Overclocking when done right will Increases your PC's performance by large amount. It can take a $150 chip and give it the same speed as a $300+ chip. Also many pre-made computer such as Dell,HP,GateWay and many other do not let you overclock.Some Rules Don't overclock unless you accept that you may damage your equipment.Always take small steps when increasing voltages, bus speeds and multipliers.Never change BIOS settings if you're unsure of the results or what function they perform.Never assume that you'll get the same speeds as someone else, there can be many reasons why you won't.Remember just because it boots and runs for a while doesn't mean your system is safe or completely stable.
  11. I don't often use frames and I am having a problem linking from page to page. I am using php. I have a link with goes:<a href="results.php?results1" target="result1">result 1<a>In results.php I create my frames and use 'if' queries to select a frameset depending on the variable passed in the link, so it goes:if ($_GET['result1']) {<frame src=results.php name=results1 id=results1>else...and so on. My problem is this - when I use target="result1", a new window opens and loads the page the way I want it, but I don't want a new window to open. If i put target="_self", then the page loads in the same window, but the page 'results.php' appears in the frame, so the page basically repeats on itself. I tried declaring target="_self" and target="result1" in the same <a> tag but it either does one or he other - the last one declared in the tag. Is there a way around this? I hope I have been clear enough.
  12. What do we mean by Accessibility? Stop and think about that for a second. Making your site accessible includes: Making sure people using Mozilla or Safari can read it. Making sure Search Engines index your content and present your site well. Making sure people with a slow connection speed don't give up waiting. Making sure people with a disability like color blindness can read your page. Making sure that even if someone has something slightly different about how they're browsing (javascript turned off, perhaps using a screenreader, even just using a mobile phone or PDA,) they can still access the information you provide. Accessibility is about making sure you're in touch with your users. Who Cares? If you have a website, why did you create it? Was it to sell your business on the web? Then having more people able to access your site makes commercial sense, particularly as they may turn into sales. Present information on a hobby? Well perhaps people using anything other than Microsoft's latest browser would like to read about it too. Or is it a family site, to tell people about what you do in your life? Other people may take pleasure in reading it too. Whatever the reason, there are few (if any) sites that wouldn't benefit from being accessible to more people. More info: http://www.webnauts.net/accessibility.html How do I make my site accessible? This is the full W3C Checklist of things you can do to make your site accessible. http://www.w3.org/TR/WCAG10/full-checklist.html Note they are divided into priorities, 1 being things you must do to make your site accessible, 2 being things you should do, and 3 being things that would make your site seriously accessible. If that link looks too complicated for your liking, try the W3C's quicktips. quote: -------------------------------------------------------------------------------- From http://www.w3.org/WAI/quicktips/ Images & animations: Use the alt attribute to describe the function of each visual. Image maps. Use the client-side map and text for hotspots. Multimedia. Provide captioning and transcripts of audio, and descriptions of video. Hypertext links. Use text that makes sense when read out of context. For example, avoid "click here." Page organization. Use headings, lists, and consistent structure. Use CSS for layout and style where possible. Graphs & charts. Summarize or use the longdesc attribute. Scripts, applets, & plug-ins. Provide alternative content in case active features are inaccessible or unsupported. Frames. Use the noframes element and meaningful titles. Tables. Make line-by-line reading sensible. Summarize. Check your work. Validate. Use tools, checklist, and guidelines at http://www.w3.org/TR/WCAG/
  13. Java, developed under the Sun Microsystems brand, is a full-fledged object-oriented programming language. It can be used to create standalone applications and a special type of mini application, called an applet. Applets are downloaded as separate files to your browser alongside an HTML document, and provide an infinite variety of added functionality to the Web site you are visiting. The displayed results of applets can appear to be embedded in an HTML page (e.g., the scrolling banner message that is so common on Java-enhanced sites), but the Java code arrives as a separate file.JavaScript, developed by Netscape, is a smaller language that does not create applets or standalone applications. In its most common form today, JavaScript resides inside HTML documents, and can provide levels of interactivity far beyond typically flat HTML pages -- without the need for server-based CGI (Common Gateway Interface) programs.Some server software, such as Netscape's SuiteSpot, lets web application developers write CGI programs in a server-side version of JavaScript. Both client-side and server-side JavaScript share the same core JavaScript language, but each side deals with different kinds of objects. Client-side objects are predominantly the components of an HTML web page (e.g., forms, text boxes, buttons). Server-side objects are those that facilitate the handling of requests that come from clients, as well as connectivity to databasesIt is important to understand that a Java-enabled browser is not automatically a JavaScript-enabled browser: the two technologies require entirely separate interpreters (licensed from separate companies) to handle the languages. It is unlikely, however, that future browsers will incorporate one but not the other (plus or minus implementation timetables on various platforms).Starting with Netscape Navigator 3.0, HTML authors have been able to use JavaScript to link HTML form elements to Java applets (and plug-ins) or link Java applets to each other--LiveConnect, Netscape calls this technology. Rather than competing with each other, Java and JavaScript are a powerful combination.Much simpler and smaller than the Java vocabulary, JavaScript is within reach of authors who know HTML; writing full-fledged Java, on the other hand, benefits from experience with C and C++. Java and JavaScript share a number of vocabulary and syntax constructions, but the languages are intended for very different purposes.All you need to program in JavaScript is a text editor and a JavaScript-enabled browser, such as Netscape Navigator 2.0 and later or Microsoft Internet Explorer 3 and later.
  14. Here's my list, feel free to check out these songs because I know you'll like themHlub Tsis Tso Tseg-Lue Vang 3rd albumHlub Los Nco-Lis Pos OriginalYog Tig Tau Lub Ntuj-QuantizeHand Me Down-Matchbox 20Everything-StereofuseYour Everything-Keith Urbanohhhh gotta love the song MAYBE by MILK INC. very awesome...
  15. Hi,Im creating a website that sells carpets and basically ive created webpages with the picture and checkboxes underneath the pictures so users can select which carpet they want!Once they submit the form, we get the order including form details!The problem is that once the user checks the checkboxes, i want to be able to delete that image from that webpage or move that picture to another location in the folders i have stored on the server. The reason is becuase evry carpet is unique so that two people cant order the same carpet!Now wat is the best way 2 do this.....Using a database or can this be done using sumat like javascript or sumat?Thanks in advanced!
  16. What do you think is the saddest AND emotional rock song? You can name 1, or 2 if there are 2 songs that fit into each category.1.Nothing Else Matters- Metallica for Emotion2.Rain- Breaking Benjamin for Sad
  17. thought that maybe the reason why I disliked them and most of the crap MTV and the Radio plays, was due to the fact I'm in my late 20's, out of touch so to speak. Then I talked to my 12 year old cousin, he also agrees it all sucks. To be honest, these days I find out about new bands I may like through the records companies I like: Earache, Metal Blade, Roadrunner, Victory, etc. Also, the guy from Linkin park that always wears the huge headphones while playing the guitar/bass is GAY... Also, to all rock/metal/hard rock bands, please stop including DJ's in your lineups
  18. Since more than 2 years I've published a lot of songs on diffrent InterNet OMD sites,which are based on a new musical style, and I've discussed this new genre on many forums.I have developed my own guitar style and"TVI-Music: Total Vocalistic Improvisation", as I call it, when even the language is made up during the playing of any melody I have in mind and from feelings at the time. To be clear, my music is totally improvised: singing with a phantasy language,playing the guitar or keyboard simultaneously and spontaneously, and all is recorded live at the same time. Nothing is planned in advance.My concern for that is to grasp the original mood and feeling bymusical expressions.I've asked many times, whether there is someone else playingin the same way. Up to now nobody confirmed to do music like this, but there are many musicians improvising parts of their music.Maybe with this provocative announcement I could get a feedback from other artists doing music in a similar way?
  19. was on April 12, 1954 - 50 years ago last Monday - that Bill Haley and the Comets assembled at New York's Pythian Temple and recorded the song that started it all. Haley died in 1981 at age 55, long overshadowed by the often bizarre procession of rock supernovas he had set in motion. But the Original Comets, of which Mr Lytle was the bass player, are still rocking away on the old numbers - the ones that ended the age of the Great American Songbook and brought on de noise and de funk. Long live Rock 'n' Roll!Kvarner
  20. Rather than try to describe what I think the upcoming new R.E.M. album might sound like, I'll do you one better -- I'll give you a sample of it. Or rather, iTunes willl. It looks like Apple is trying something altogether new by offering a free three-minute download that contains thirty-second snippets of most of the songs, run together. So why is this cool? Well, for one thing, the album isn't available yet -- anywhere. So this free download is, essentially, the album's coming-out party. Go get it (it's free), and then come back here and share your thoughts about what you've heard:
  21. What are top music videos which have impressed you? Which is that music video, what you remember all your life? Best of the best's? My list is here: 1. " Dancing In the Street" by David Bovie & Mick Jagger - Grand old dudes kicks *bottom*...great combination of style and attitude2. "Weapon of Choice" by Bootsy Collins - Great Cristoher Walken flying around...and dancing...this is too much... - This slot we have all those great Michael Jackson "videos"- which are more like movies...Great stuff 5. "Can't Touch This" by AC Hammer - All I remember is those chick's in the background...
  22. Hi guysI think in many countries they have local sit and foriegn site(network) and in some countries is cheaper way if i use local network like for example http://www.something.dk/ or some others . my question is is it possible to make the international webpages and downloads through local like make some filter proxy or something else.thanks..
  23. For all of you still holding on to outdated windows operating systems there is a few things you can do to make them run ok.Things to know, norton and alot of the newer security programs for anti virus and firewalls eat system resources, you need to find software that does the job, but leaves some room for you to work and play. AVG is a very good anti virus, AND IT'S FREE. the best thing is it is light on the resources. Get it HERE now firewalls are a must have(DONT KID YOURSELF). some that do the job well and save on the resources are SYGATE and KERIO just click the name to download one. these are both free.Now spyware, did you get a free screensaver, icons,toolbar or just surfed the net and now your machine crawls? ok, now there are many good spyware removers but i only recommend ADAWARE because some cause a bit of trouble and you need more than a passing knowledge of computers to use them correctly.there are also programs that manage your ram and resources, like cachman, and .FREERAM XP PRO (works fine on 98 and ME, do not use on XP or 2k as they are not needed). freeram is free and easy to use.....will keep you from rebooting.ok the rest is common sense, go to your internet options and clean up files and cookies occasionally, do a disk cleanup, and defrag, REGCLEAN by microsoft is a must have for 9X /ME systems. third party fix-it utilities usually do more harm then good, defrag your system in safe mode if the defrag takes forever or keeps restarting.If you have XP or 2k and dual boot, there are even ntfs add-ons that make 98 read ntfs partitions, if you cant find one send me a private message here with a email address and what you want like "ntfs file" and i will email you both(they are very small), i have 2, one is freeware, the other is shareware.USB 2.0 does work with 98 and ME, you just have to find the drivers for your chipset, like VIA,SIS,Intel,ALI,Nvidia,.....all in all if you can make 98 or ME do almost anything, you can do some pretty cool stuff with NT4 and 95, if you feel like playing with them.
  24. Windows UpdateWindows Update will keep your computer up to date with the latest security patches and fixes from Microsoft. For the classic Start menu:Click on->Start->Windows UpdateFor XP Start menu:Click on->Start->All programs->Windows UpdateIn the screen that appears, accept to install the Windows Update engine (or something of the like) if the window appears. If you don't already have the latest version of Windows Update, you will need to restart your computer to continue. Reboot and then go back to Windows Update. In the web page that appears, click on "Custom Install". I will explain the reason for this this later. If you haven't installed Service Pack 2, you will get a notification that it is available. For now, do not install Service Pack 2. I will again explain this more later. Instead, click on the button titled "Review Other Updates". Let it scan your computer once more and then install all updates from here. You may need to restart your computer and return here to retrieve additional updates. You're done when it tells you that you have no more additional updates.Now... my reasoning. I told you to click on "Custom Install" so that Windows Update would not automatically install Service Pack 2. I have read a lot of mixed messages about Service Pack 2 on this forum and others, and I have seen more computers be ruined by it than saved by it (my desktop and laptop included). Microsoft still has a lot of fixing to do with Service Pack 2, and the rest of this post will help you do pretty much what Service Pack 2 would do anyways. Until you come back here, and a new thread says that everyone is pleased with Service Pack 2, stick with Service Pack 1 and the remaining updates.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.