Maybe it's a good thing that all my current employer can do when called for a reference is to confirm dates of employment :laugh:
all_in_flames
Posts
-
Resignation Letter -
Who could have forseen that...I believe I had read that the building developer had paid for his repairs.
-
Obscure C++ Features [from the newsletter]I remember this one from a C++ course I took:
#define ;; ever;
Which of course allowed infinite for loops to be coded as
for(ever) {...}
-
ConvertToReadableNumberAgreed, clearly the assumption here is that a decimal number is not readable :)
-
Accessing another windows variables -
Daily Newsletter - View Online BugHi there, Just wanted to let the amazing maintainers of the site know that for the past 2 daily newsletters, the "View Online" link has been incorrect. Both yesterday and today, the link in the email has been "http://www.codeproject.com/script/Mailouts/View.aspx?mlid=0". Cheers!
-
3D code analysisThis may not be technically exactly like what you described, but it is in the same vein: 'Tilt' Firefox plugin[^] I tried it out, it's pretty neat. Helps to visualize the layers of markup containers and elements in the DOM of a particular webpage. Cheers!
-
From Zenith to NadirThe funniest thing about this is that before you posted, my brain had just inserted the correct names into his original post as I was reading it. Good catch!
-
Does the Internet make software developers lazy?I don't think Google (for all intents and purposes, used in place of "the internet") generally makes software developers lazy, but I do think it makes gives really mediocre developers a resource to get enough done so they're not in danger of getting fired for incompetence. I personally use it to find simple examples of unfamiliar syntax or unusual techniques (I think they call it "web design", ugh). And, it removes the need to have 15, thousand-page desk reference textbooks on hand!
-
[SOLVED] Keep the page position? [modified]There are only a small subset of HTML elements that can accept focus. I believe all of the input fields (text boxes, check and radio boxes, etc) and anchor tags are able to accept a focus() call. I would pass the id of an element that can be focused on as well as the id of the element to be shown/hidden:
function toggle(toggleId, focusId)
{
var e = document.getElementById(toggleId);
var f = document.getElementById(focusId);
if(e.style.display == 'block')
{
e.style.display = 'none';
f.focus();
}
else
{
e.style.display = 'block';
f.focus();
}
}Good luck!
-
[SOLVED] Keep the page position? [modified]One simple solution to this problem would be to focus on an anchor (<a> tag) or one of the form fields that you're dynamically showing, e.g.:
function focusOn(elementId) {
getElementById(elementId).focus();
}I assume this is required because the page must be reloaded when you're showing the form controls? A better solution may be to just have them on the page all the time, but using the
display:none
CSS style, and then set the one you want to be visible. Hope this helps! Cheers!
-
Html parserI would hazard a guess that the 403 Forbidden error is the result of IMDB not allowing their web interfaces to be used as a web service (querying for data directly without viewing the content on their site, including the all-important advertising :)). They likely accomplish this with a bizarre browser behaviour trick, as Luc and yourself seem to have seen with the strange canonical link tag. You may want to look into if IMDB hosts a query interface for applications, but if they do, it's likely a premium service (AKA a paid service). Cheers!
-
Little ProblemTo get your proposed solution to work, you're on the right track by assuming you need to do all creation/zipping on the server side. Instead of having the jsp generate the excel files, have it done in a Servlet on your server side instead, based on parameters from the JSP page. You can then create the Excel files (likely by creating CSV files and renaming them, or using a third party library, such as JExcel (http://jexcelapi.sourceforge.net/[^]) and return the resulting .zip to the browser for download. Cheers!
-
Best way to display news from DB in jspI would go about this differently with your javascript. Since you know the iterations you've done (using your for loop), there would be no reason to loop through the page elements testing for equality. You should change the onclick function summary to include the ID you created for your div, e.g.:
<div id="0">
<form>
<input type="submit" target="pr" value="Go" onclick="getParent(this, 0)">
</form>
</div>(although I have to admit, I don't understand the purpose of your getParent function. It would make more sense to have the onclick of that button post a form up for processing, or kick off an AJAX request to add/remove a news item). Hope this helps, feel free to ask some targeted follow-up questions! Cheers!
-
xml parsing in java appletsIf you want some targeted search terms to find the information you're after, search for JAXP (Java API for XML Processing) and/or JAXB (Java API for XML Binding)* on Google. There's nothing specific to Applets that makes parsing and processing XML any different from any other Java VM environment. [EDIT] You can also search for SAX (Simple API for XML) and StAX (Streaming API for XML), as they may be simpler to implement quickly [/EDIT] Cheers! *Note: XML binding is a more advanced concept, and is not necessary for simple XML parsing. It can be used to easily model XML objects in Java classes. -- Modified Wednesday, June 8, 2011 2:47 PM
-
Connection Information to DB in Java Web ?If your Java web application is not using HttpServletContext (and by association, the rest of the Java Servlet API), there's no robust best-practice way to configure resources outside of simple property files. You can look up any file by context, if you're aware of the layout of your application (I'll assume EAR/WAR/JAR, but since you don't seem to be using JEE based on your HttpServletContext comment, that might be a flawed assumption). If you had a "resources" project, you should know where it will live in relation to your main web project: i.e. EAR file contains WAR file, which contains a WEB-INF/lib folder, which then contains the rest of your project jars. Based on this knowledge, you should be able to use the standard Java FileStream objects to load those files and read the connection properties you want to store. I would recommend researching JEE best practices for web resources, however, as there are ways to store connection information for data sources (JDBC) that follow the JEE standards, and can be used with any compatible web container (Tomcat, JBoss, IBM WebSphere, etc). Cheers!
-
SOAP Error on Sending with SAAJ0537A valid SOAP response would be formatted using text/xml, so what is likely occurring is a standard HTTP 500 response error is being returned by the service (which would by default have a text/html content-type). You might want to double check that the request you're sending is valid and conforms to the contract of the service you're attempting to reach. Hope this helps!
-
Any book suggestions for a working programmer?Technically it should be "hanged". Looks weird, I know. Stupid English.
-
Class Member Declaration ProblemYou are a C++ gawd. Thanks again Mike!
-
Class Member Declaration ProblemHi everyone, I am working on a project for a C++ course, and I am running into a compile error that I can't figure out how to fix. It seems to be telling me that I am using a class member that is an undeclared identifier. As far as I can tell, it has been declared. Here is the class declaration: class Student { public: /* Constructors and Destructor */ Student(); virtual ~Student(); Student(std::string first, std::string last, int SNum); /* Getters and Setters */ std::string getFirstName(void); void setFirstName(std::string newName); std::string getLastName(void); void setLastName(std::string newName); int getStudentNum(void); void setStudentNum(int newNum); std::vector getGradeList(void); void setGradeList(std::vector &GList); private: std::string FirstName; std::string LastName; int StudentNum; std::vector GradeList; }; And this is the code that is giving the problems at compile-time: void setGradeList(std::vector &GList) { GradeList = GList; } Build error: students.cpp(62) : error C2065: 'GradeList' : undeclared identifier So, this is driving me crazy, and any help would be greatly appreciated! Thanks in advance!