Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
13% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
12
Posts with Downvotes
4
Downvoting Members
11
1 Commented Post
0 Endorsements
~40.6K People Reached
Favorite Tags
Member Avatar for johndoe444

Here is the code copied from w3schools ([url]http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_suggest):[/url] [CODE]<html> <head> <script type="text/javascript"> function showHint(str) { if (str.length==0) { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState == 4) { …

Member Avatar for bharathivkmani
0
12K
Member Avatar for johndoe444

Hi, I wrote this code as is from the JNDI tutorial from sun website. But I am getting this exception while running it: [CODE]import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import java.util.*; /** * Write a description of class FirstJndi here. * * @author (your name) * @version (a version number …

Member Avatar for PoonamV
0
1K
Member Avatar for johndoe444

Hello, I wanted to see whether 2 directories are identical in terms of content. So what I did was tar the directories and then md5sum-ed them and then compare but the hashes were not identical. I tried to go inside each directory and md5sum-ed each file of each directory and …

Member Avatar for johndoe444
0
104
Member Avatar for johndoe444

In my office I have two machines connected two networks - one has IP say 21..... and another has IP say 25... Now the thing is that both of the machines can access Internet. But there is a problem pinging among each other. I have been told that has been …

Member Avatar for the_carpenter
0
156
Member Avatar for johndoe444

In the J2EE tutorial from sum site, it is often mentioned this term. For example, the timersession example: "Because it's a business method, setTimer is exposed to the local, no-interface view of TimerSessionBean and can be invoked by the client." Thanks.

Member Avatar for swosh
0
154
Member Avatar for johndoe444

Hi, This is more generic actually. In nunit tests we want to refer to the original project classes. Now if the test classes are under the project directory as in the original source code then they might import the namespace of the source code through 'using'. But then the problem …

0
61
Member Avatar for johndoe444

These two seems to be doing the same kind of thing. What is the difference here? Thanks

0
56
Member Avatar for johndoe444

I have this question. Why do we need flyweight design pattern when we can accomplish the same thing using static variables. The static variable (of a designated class for storing global states) can be used to save states dynamically and which can be accessed by different objects anywhere and anytime. …

Member Avatar for Rashakil Fol
0
105
Member Avatar for johndoe444

I was wondering how we can build a remote application where the user interface created using windows form will be running at the client side and the application logic will be running in server side. Sort of like web application but the user interface would be running in stand alone …

0
69
Member Avatar for johndoe444

Why would we need the director pattern? The builder can itself execute the whole construction process instead of going through the director. [CODE] class Pizza { private String dough = ""; private String sauce = ""; private String topping = ""; public static abstract class Builder { private Pizza pizza; …

Member Avatar for Rashakil Fol
0
167
Member Avatar for johndoe444

If class A has a virtual method and then class B which is subclasses A, overrides that method. Then class C subclasses B. So now C is supposed to inherit B's overriden method, and not A's virtual method. Then if C wants to override B's one it can't because B's …

Member Avatar for Zinderin
0
166
Member Avatar for johndoe444

They listed the design patterns in their book. But did they really invent the design patterns or summarized the works of others in their book? If the later is true then why are they called GOF patterns which credits them for others works?

Member Avatar for pritaeas
0
81
Member Avatar for johndoe444

The syntax seems mysterious. Please help here. [CODE]int? count = (from cartItems in storeDB.Carts where cartItems.CartId == shoppingCartId select (int?)cartItems.Count).Sum(); return count ?? 0;[/CODE] Thanks

Member Avatar for Geekitygeek
0
159
Member Avatar for johndoe444

In the following: [CODE]public ActionResult Index() { // Create a list of genres var genres = new List<string> {"Rock", "Jazz", "Country", "Pop", "Disco" }; // Create our view model var viewModel = new StoreIndexViewModel { NumberOfGenres = genres.Count(), Genres = genres }; return View(viewModel); }[/CODE] Why was var genres and …

Member Avatar for Geekitygeek
0
114
Member Avatar for johndoe444

Hi, I came across this code snippet: [CODE]new { genre = genreName }[/CODE] I am not sure what is the name of this thing and how this thing works? Thanks

Member Avatar for kvprajapati
0
96
Member Avatar for johndoe444
Member Avatar for johndoe444

Why do we use formCollection? Why can't we just use Request.QueryString instead? Thanks

0
66
Member Avatar for johndoe444

In the add view dialog there is a field called view content. what is the purpose of this field?

0
57
Member Avatar for johndoe444

I created a php script: [ICODE]#!/usr/local/bin/php <html><head><title>PHP Test</title></head> <body> <?php print( "Hello World<br />"); ?> </body></html> [/ICODE] created an htacces file [ICODE]AddHandler cgi-script .php DirectoryIndex index.html index.php [/ICODE] changed the permission [ICODE]chmod 711 hello.php chmod 644 htaccess [/ICODE] This does not work: [url]http://xyz/~username/hello.php[/url] By making the hello.php to hello.txt the …

Member Avatar for itanum
0
242
Member Avatar for johndoe444

Hi, In j2ee web application, an web application is packaged with deployment descriptor web.xml in war (zipped) format. And then the application is deployed to the web application server so that the server can communicate with the outside world. Now for asp.net the application has to be deployed to the …

0
62
Member Avatar for johndoe444

I wrote this basic web app using jsf. My templates were jsp not jsf. And in the faces-config.xml and everywhere else I used jsp and nowhere I used jsf. But surprisingly it (the servlet container) is being able to correctly locate the thing (jsf files) it is looking for. How …

0
82
Member Avatar for johndoe444

hi, In this example: [CODE]public void init() throws ServletException { bookDB = (BookDBAO) getServletContext() .getAttribute("bookDB"); if (bookDB == null) { throw new UnavailableException("Couldn't get database."); } }[/CODE] As it is not instantiating the BookDBAO instance and the connection with entity manager is done in the constructor: [CODE] public class BookDBAO …

Member Avatar for johndoe444
0
96
Member Avatar for johndoe444

I have experience and knowledge in java web application development. How similar is asp.net and c#? How long would it take to master c# and asp.net? If I want to prepare for interview in c#/asp.net. Is it possible to prepare without having any experience? What would be the strategy for …

0
73
Member Avatar for johndoe444

I just used: ant ant deploy and it gave me following error: [code=text] deploy: [echo] localhost [echo] 8080 [echo] order [echo] C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\bp-project\ma in.xml/../../../../../../bin/asadmin.bat [echo] order [echo] SQL92 [exec] Deprecated syntax, instead use: [exec] asadmin --port 4848 --host localhost deploy [options] ... [exec] com.sun.enterprise.admin.cli.CommandException: remote failure: Excep tion while loading the …

Member Avatar for ~s.o.s~
0
311
Member Avatar for johndoe444

Hi, I tried to deploy the books example. But in the deploy descriptor it says: [CODE]<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <display-name>books</display-name> <listener> <listener-class>com.sun.books.listeners.ContextListener</listener-class> </listener> <servlet> <display-name>books</display-name> <servlet-name>books</servlet-name> <jsp-file>/books.jspx</jsp-file> </servlet> <jsp-config> <jsp-property-group> <display-name>books</display-name> <url-pattern>*.jspx</url-pattern> <el-ignored>false</el-ignored> <scripting-invalid>false</scripting-invalid> <is-xml>true</is-xml> </jsp-property-group> </jsp-config> </web-app>[/CODE] The only jspx file is books.jspx. After the application is …

0
70
Member Avatar for johndoe444

Hi, I was trying to j2ee web service example helloservice. When I was building the simpleclient I got the error: [CODE]wsimport-client-generate-nosecure: wsimport-client-generate-nojvmargs: [echo] C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\bp-project\ma in.xml/../../../../../../glassfish/lib/endorsed [echo] helloservice.endpoint [echo] build/generated/wsimport/client [echo] build/jar [echo] http://localhost:8080/helloservice/HelloService?WSDL [wsimport] Consider using <depends>/<produces> so that wsimport won't do unnece ssary compilation [wsimport] JDK's tools.jar was not …

Member Avatar for peter_budo
0
210
Member Avatar for johndoe444

Hi, I thought I have mastered fighting segmentation fault thanks to the assistance of you guys. But still in this days I am getting seg fault. And there is no clue at all. I am writing a suffix tree using a trie. Here is the trace of segmentation fault: [CODE]aba …

Member Avatar for UncleLeroy
0
136
Member Avatar for johndoe444

[CODE]set_child_at (node=0x7fffffffe080, child=0x61e250, index=1) at 10679.c:319 319 if ((*node)->count_children == (*node)->m) (gdb) p *current_node $3 = (trie_node *) 0x0 (gdb) n 324 index = hash_insert((*node)->hv, index, (*node)->m, (*node)->m1); (gdb) n 325 (*node)->children[index] = child; (gdb) p current_node $4 = (trie_node **) 0x61e270 (gdb) p *current_node $5 = (trie_node *) 0x0 …

Member Avatar for gerard4143
0
92
Member Avatar for johndoe444

[CODE] set_element* make_set(int key) { set_element* node = (set_element*) malloc(sizeof(set_element)); node->parent = node; node->rank = 0; }[/CODE] In the above code there was no return statement and the function was used like this [CODE]elem1 = make_set(f1);[/CODE] And the code was working as expected. This is very funny. I am not …

Member Avatar for gusano79
0
101
Member Avatar for johndoe444

problem with this code: [CODE]parseIcmPage url, '<ul id="topListFilter"', '<div id="footer">' def parseIcmPage(url, start_point, end_point) data = getHtmlPage url s = data.index(start_point) e = data.index(end_point, s) len = e-s list_str = data.index[s, len] puts list_str, '\n' end[/CODE] [CODE]icm.rb:42: warning: don't put space before argument parentheses ./util.rb:121:in `index': wrong number of arguments …

Member Avatar for craiggles
0
229