Jump to content
xisto Community

kvarnerexpress

Members
  • Content Count

    413
  • Joined

  • Last visited

Everything posted by kvarnerexpress

  1. Hello, What I want, specifically is to make a program where I can, for example, type in the filename of an image stored in my computer, and have the program place that image on top of another image, in a specific place. So, for example, I have a large image with a landscape and a file with a picture of the sun, and I type the filename of the sun, and my program places the sun in a specific place on the sky of my landscape. What do I need to do this? I haven't found a c++ library which does this yet.I prefer c++, but if this is much easier to do in another language I don't mind learning.Thank you.
  2. Hello Every one,I am on the point to split my network, to seperate Servers from Users computers. I am actually taking back position on a network that is really messy.For this to do I plan to put a firewall (OpenBSD) to be inbetween those machines. I have on my network Win 2000 Server, Win NT4 Servers with SQL, and one 2003 Server.The CLient side is Win XP and Win 2000 Pro (Only few).First I need to know witch ports I should open to allow the communication between My Clients Machines and my Active Directory Win2000 and 2003. Also for some reason I have another domain that is on NT4 PDC/BDC, theese servers will stay on the client side of the Firewall, So I need to know If there are specific port to ensure the functionality of the Trust relationship between the two domains (Remember Win2000 vs NT4).So If some of you can tell me witch ports I need and on witch side to open, It would be Greatfull.Thank you all for your help on this.
  3. I wasn't sure where exactly to post this, so I'm just going to post it in the HTML section.Alright, basically what I want to know is if tehre is some sort of .htaccess code i could use on a domain so that a certain file is shown in the header and/or footer of any subdomain?So, for example I added this code and made it include a file Pageheader.php into every subdomain, with the contents I am a test file in it, if i hosted someone as a subdomain, it would show up as "I am a test file" then the rest of their page?also, if this is possible, would there be any way to set what subdomains are exempt from this?
  4. I am wondering if it is possible to have a frameset with frames on the top, left and right of the main content. The frames would all be non scrollable except for the 'main content' (center frame). The problem i am having is that when the 'main content' needs to scroll, it places the scroll bar between the 'main content' frame and the 'right frame'. I need the scrollbar to be at the right of the 'right frame' so that the 'right frame' is not visually apart from the 'main content' frame. Is it possible to somehow position the scrollbar for the 'main content' frame to the right of the 'right frame'?Thanks in advance,
  5. Hello! I am creating a menu using some DHTML. Everything is working except I can't get the thing to hide when the user selects something outside of the menu. There is a catch, most of the code is generated via a cgi script and I cannot modify it. So, I don't have access to the body tag. The best work-around I could figure out was to use the "onblur" event of a div/span tag, however, it never seems to fire. Here is my code <div id='testDiv' onblur='alert("test");' tabIndex='1'><table><tr><td>Menu Item 1</td></tr><tr><td>Menu Item 2</td></tr></table></div>Does anyone know how I can get that onblur event to fire? Thanks
  6. I am using a frame a triple times, I mean, i want to use the same JFrame to display 3 different setup's of components in a sequencial way. First i as for to select drives, second i display a progressreport, last, user select a certificatedirectory. I am using getContentPane().removeAll() and then i add the new components but this doesn't show. The frame reamins blank after the first removeAll(). Is there some trick.??? Code follows... class ScanForCertificateStore extends JFrame { FindCertificates fc; ScanForCertificateStore sfcs=this; DefaultListModel lmRoot = new DefaultListModel(); JList lbRoot = new JList(lmRoot); JScrollPane spRoot = new JScrollPane(lbRoot); JButton bStartScan = new JButton("Start Scan of Selected "); File[] Roots; public ScanForCertificateStore (FindCertificates fc) { this.fc = fc; final Container p = getContentPane(); setSize(200,200); setLocation(100,100); p.setLayout(new BorderLayout()); p.add(spRoot,BorderLayout.CENTER); File f = new File("\\"); Roots = f.listRoots(); for(int i=0;i<Roots.length;i++){ lmRoot.addElement(Roots[i].getAbsolutePath()); } p.add(bStartScan,BorderLayout.SOUTH); bStartScan.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // dfeine new layout JPanel aPanel = new JPanel(new BorderLayout()), bPanel = new JPanel(new BorderLayout()); final DefaultListModel lmFound = new DefaultListModel(); JList lbFound = new JList(lmFound); JButton bAbort = new JButton("Abort Scanning Computer"), bSelect = new JButton("Select a Certificate Store"); final JTextArea taReport = new JTextArea(""); JScrollPane spFound = new JScrollPane(lbFound), spReport = new JScrollPane(taReport); aPanel.add(spReport,BorderLayout.CENTER); aPanel.add(bAbort,BorderLayout.SOUTH); bPanel.add(spFound,BorderLayout.CENTER); bPanel.add(bSelect,BorderLayout.SOUTH); p.removeAll(); // fisrt removeAll() (second isn't there jet.. p.add(aPanel,BorderLayout.NORTH); // These componets don't show up on tyhe frame... p.add(bPanel,BorderLayout.SOUTH); // ArrayList a = new ArrayList(); for(int i=0;i<lmRoot.size();i++) { if(lbRoot.getSelectionModel().isSelectedIndex(i)) { a.add(Roots[i]); } } Object[] o = a.toArray(); //File[] ff= (File[]) a.toArray(); ScanComputer sc = new ScanComputer(o, sfcs.fc.tfStore.getText()); sc.addReporter(new Report() { public void action(String msg) { taReport.append(msg); taReport.setCaretPosition(taReport.getText().length()); repaint(); } }); sc.addStore(new Report () { public void action(String msg) { lmFound.addElement(msg); repaint(); } }); sc.addFinish(new Report() { public void action (String msg) { } }); sc.start(); } }); }}
  7. I've been programming a 'rate-em' site from scratch. You know like Hot Or Not. YEs,.. yet another rate-em website. Anyway, i'ts done and before I launch it I need to add a forum as the finishing touch, but all the forum softeware out there seems so hard to integrate. I'm trying to make it so that when a user logs into my rate-em website they are also logged into 'my forum'. i.e. i want my forum and web site to use the same profile data.If anyone knows of a forum program made for this objective please let me know. I'm in over my head, any help would be greatly apreciated
  8. I am using ASP.NET Web Matrix, and just trying to connect to it, when I get this error message. Recently I changed from having a broadband conection, to having a wireless router, but I have to connect to it using a network cable as I was getting a "tcp/ip protocol not installed correctly" msg. Maybe that has something to do with this? I'd be very grateful for any help anyone can give. The full error is here: Quote:
  9. I'm writing a didactic software that can store an undefined number of int in a dynamic list. I wrote a routine too that can delete an int and point the previous node to the next node after the one I've deleted. But I've a problem: If I try to delete a number that isn't in the list, software crashes! Why? If the routine doesn't find the number it should simply do nothing #include <stdio.h>#include <stdlib.h>void crealista();void visualizzalista();void eliminanumero();struct elenco { int numero; struct elenco *pun; };int i,n;struct elenco *p,*paux, *paux2;main(){ char risp; crealista(); visualizzalista();}void crealista(){ printf("Quanti numeri vuoi inserire nella lista? "); scanf("%i",&n); if (n==0) p = NULL; else { p = (struct elenco *)malloc(sizeof(struct elenco)); printf("\nInserisci il valore: "); scanf("%i",&p->numero); paux = p; for (i=1;i<=n-1;i++) { paux->pun = (struct elenco *)malloc(sizeof(struct elenco)); paux = paux->pun; printf("\nInserisci il valore: "); scanf("%i",&paux->numero); if (i==n-1) paux->pun = NULL; } }}void visualizzalista(){ char risp; system("cls"); paux = p; while (paux != NULL) { printf("%i\n",paux->numero); paux = paux->pun; } printf("\n\nVuoi eliminare un numero? (s/n): "); scanf("%1s",&risp); switch (risp) { case 's': eliminanumero(); break; case 'n': exit(0); break; default: printf("\n%i",risp); printf("\n\nIl tasto scelto non permette azioni! Il programma viene terminato"); exit(0);}} void eliminanumero(){ int dato; printf("Che numero vuoi eliminare? "); scanf("%i",&dato); paux = p; while (paux != NULL) { if (paux == p && paux->numero == dato) { p = paux->pun; free(paux); break; } else if (paux->pun->numero == dato) { paux->pun = paux->pun->pun; paux2 = paux->pun; free(paux2); break; } paux = paux->pun; }visualizzalista();} Mny thanks for the help
  10. OK, so after reading a lot of contradicting information I decided to ask. How should document encoding be announced? The W3C validator (or at least links from the same upon a missing encoding) suggests the server should send the encoding in the content-type header. The problem with this that I see is that you can't always make a blanket judgment about what encoding pages will be in. Is it simply suggested to use .htaccess files (or equivalent) for this, then? I am led to believe that most (all?) browsers will ignore a content-type meta tag. Is there another in-file option? An attribute in an xml or html tag? But doesn't a client need to know what encoding a file is before it can parse it?Secondly, and (in my mind at least) on a related note, what are the exact requirements for a page to be XHTML? I see a lot of talk about using <?xml ?> tags with various attributes, and using an xmlns attribute, and that the <?DOCTYPE > is simply there for validators. Well, even if the <!DOCTYPE > is soley for validators, the W3C validator doesn't complain about my lack of xmlns or anything, so are these actually required?I'd appreciate any elaboration on these subjects.
  11. Hello all,I have a problem which I hope you have a solution for. I was looking for couple of folders on my D drive and I couldnt find them (have not touched them for 3 months). I suspect that my young brther accidentally deleted them when he is playing his game on my laptop. Is there any way I can recover them? Can I use system restore to restore this specifc hard drive?!!Please help me if you can. Any suggestion is appreciated!!
  12. Does anyone know how to upload a file and form datato a server?What i want to do is allow a user to upload a file and form datato my php script so i can process it. So of course FTP would beno good.I can do this with the XMLHTTP control but it does not thread andit pretty lame. Surely you can do it with winsock or InetAny ideas?Source code would be greatly appreciated.
  13. I have a page where I list a number of records from my db. Under each record I have a checkbox and a text field. At the bottom of the list I have a submit button. I want to be able to check various boxes and edit the text field then click the button to update all of the records. I currenlty have the following and it updates the records ok (checkbox, I haven't messed with the text field yet) when I first check the boxes but it will not update the db when I uncheck the boxes. My form: PHP Code: <form name="form1" method="post" action=myscript.php?rid=$rid> <input name="sortorder" type="text" id="sortorder" maxlength="2" /> <input type="checkbox" name="active1[$rid]" id="active" value="CHECKED" $active /> if(isset($_POST['active1'][$rid])); $active1=serialize($_POST['active1']); <input type="Submit" name="btn1" value="Update" </form> My script: PHP Code: <? header("Location: mypage.php"); include("../my db info.php"); $chkd = "CHECKED"; $db = mysql_connect(localhost,$myid,$mypw); mysql_select_db($mydb,$db); $res = mysql_query("SELECT * FROM mytable WHERE NOT (active='$chkd')",$db); if ($row = $active1) {{ foreach ($active1 as $rid => $value1) { mysql_query("UPDATE articles SET active='$value1' WHERE rid='$rid'",$db); }}} else {echo "Grrrr!";} mysql_close();
  14. I have a HTML page with a form on it. I have an ASP page that processes what a user has entered into the form (updates a database etc). I now need a page that fits between these two pages to ?pre-process? the users input. I need to do it this way because I am not allowed to change either of the two existing pages.I know how to read what the user has input into the form and I know how to pass control onto the next page.What I have not been able to work out is how to change the user input and have those changes passed onto the next page as if nothing has happened (that is, the original ASP page just performs its request.form(?item?) calls as it always has but instead of seeing what the user actually typed in, it should see the changed text as created by the new ?pre process? page)I have tried using a regular expression replace but can only successfully make this change a variable and not the original form input. Equally I cannot find a way of swapping the original form input string with the output variable from the replace.Does anyone have any ideas on this one?Thanks in advance,
  15. I have an online application Form that multiple groups use from their own webpages. I would like the form to automatically populate a couple fields depending on which group's site it's clicked from......... I think there is a way to populate a form just by adding stuff to the link, but I don't know how and I can't find any information on how online (not really sure what to search)......... anyone know? I want a combo-box and a text field automatically populated with information depending on the link that's clicked.I honestly don't know if this is an HTML thing or a Javascript thing... if need be I'll go ask on the Javascript forum instead.Thanks!
  16. A little background about what I am doing is this: I have an array which holds a linked list containing the memory that is currently taken from the system. Each index I have like 16 size memory or less can be stored only in index 0, index 1 is for memory inbetween 16-32, index 2 is for memory inbetween 32-64, etc all the way up to 2048 which is the max allocatable memory. Now the way my malloc is to work is that it first will run through my list to see if any memory is available that is greater than or equal to the size I need, if there is any at all it will return it. Then if the memory is too big it will split it in half and stick it into the freelist and repeat till the memory is the right size. Almost everything is working great except when I split my memory. My split memory function works fine if you split only once in a call to the malloc, if you split more than once it crashes. Im confused as to why though. Here is the function: Code: metadata_t* split_memory(metadata_t* memory){ printf("Splitting the memory has been called \n"); printf("Old Memory Size is: %d\n",memory->size); printf("%p\n",memory); metadata_t* second = memory + (memory->size / 2); printf("%p\n",second-memory - memory->size/2); size_t temp = memory->size / 2; memory->size = temp; second->size = temp; printf("Unaccounted for space: %d\n",memory->size + second->size - temp * 2); printf("New Memory Size is: %d\n",second->size); memory->next = second; second->prev = memory; return memory;}
  17. I've got a Windows 2000 Pro machine with 96MB of RAM. It is a little slow to boot, but once in Windows it's performance is terrible.If you look at the performance in Task Manager straight after a boot then the Commit Charge Total reads 140MB (or there abouts). This figure never falls, only increasing with each application that's run. (The Commit Charge Limit is 198MB) The CPU usage is 2% whilst this is going on, and there's only a few things in the system tray.Should the Commit Charge be this high? What is wrong with this machine? Is this a sign of a memory leak?Thank you in advance.
  18. After the last batch of hurricanes we lost 5 days of traffic due to power outages in S. Florida.What I really want to do is redirect a visitor to a copy of the website if the original site takes more than a set amount of time.If heavy traffic causes the original site to take more than 10 seconds to load I want the visitor automatically redirected to a copy on a different server.Can this be done somehow? I'm thinking the requests might have to go through a first server that times the two other servers and decides which is the best route.Any ideas?Thanks,
  19. Hi.I have a popup window that opens when I click submit in it's parent window.Hitting submit (above) also request a new file from the server, and this can take some time to finish loading since I'm dealing with uploading files.I have tried to attach an onstop event to either window, document, or body in order to run some function if user hit stop button in parent window (not popup).I have no luck with making that work....so I thought I might be able to check, from popup, if the parent window still loads the new page.... and if not then just close it.If you know how I can detect when the user hit the stop button and then how to fire a function that would be great..it would have to work crossbrowser though (IE, FF, NE, OP)if not ....then I need a workaround..Regards
  20. have a main page that comes up with several options. If you click an option, it will open another window. If you click on on a URL it will open another window that will allow you to select a quantity, etc. When you click ok to submit the form, I need to not only close the top (3rd) window but also the second window. I have tried every .close I can think of but can't get the second window closed. The top (3rd) closes fine. I have referenced the second window by name but still no luck. Any suggestions?
  21. I'm trying to get a layer (in Netscape...) to respond to mouse clicks. Currently the text in the layer is a link and what I would like is for another layer to pop up when the link is clicked on (defining the word in the link) The problem is that I can't name each individual layer and use absolute references (there are a too many definitions) so I need to backtrace from the link to the layer it's in. I have no clue how to do this--I can acess the document of the bottom layer but I don't know how to get to the layer above (document.layers.parentLayer does not work)Any ideas?
  22. I've been searching for examples or some help towards converting CAL & GP4 images into tif files. I've found a few programs that do the trick, so i know its possible. However most searches i do end up with me at shareware or web pages that list file extensions. If anyone has example code or a location i could possibly learn how to do these conversion,s please post a reply. I'd post example code, but i have no idea where to even start with this. I know it irritates people when no code is listed, but i have really tried looking for it and this needs done by friday.
  23. This is not a request for help...just a friendly warning to all...I'm designing a website for a fellow. He went to look at the home page I had made and the top image (you could call it the header) did not display. It displayed for him on another computer and it displayed on my computer. And all other images were displaying. The path was right. Everything was fine...as far as I could see.So, I had him "view source"...the <img> element was completely gone in the HTML document!!!!He tried viewing the document with Nortons turned off. He could see it and the <img> element was in the code. Norton's was actually deleting it.The problem? My <img> had an id="banner"...I changed all words containing "banner" from the document and replaced them with "topPic" (who cares what I call it, right?) I guess Norton's looks for keywords or something.Probably common knowledge for most, but not for me. Be careful what you name your elements and images.
  24. I have a program that was originally developed on a linux box and had a perl script to compile all the packages and classes, sign it and upload it.I'm now using a Windows machine and obviously the perl script doesn't work and I need a way to compile, sign and upload oll these files.I tried to make a .cmd file that would simply automate runnig commands at a DOS prompt, but it wasn't very flexible and somehow managed to find compile errors as the compiler couldn't find the packages listed in the java files beginning with com...I'm now trying to write a java app that compiles, signs and uploads the other program. At the moment I'm stuck on trying to get the new java app to create and send a command to compile the other program.This all proabably sounds very confusing, but please help if you can. Thanks.
  25. Just a general comment. I would love to develop with the new features of php5 but feel I cannot do so because 90% or more of the shared web hosts in the world still run older versions of php even though version 5 has been out for over a year now.I think that php.net and Zend are hampering the switch to php 5 by continuing to offer a highly visible option of downloading php 4 (on the same page as php 5) and offering newer versions of php 4. The attitude of web hosts is, if there is little demand for php 5, why upgrade? The attitude of developers is, why develop in php 5 if nobody can run it. A classic catch 22 situation.
×
×
  • 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.