Member Avatar

Hello daniweb community ! I'm finishing my second year of IT studies and the university is giving us the opportunity to engage in a project with a company. I found a good company but now i'm looking for a good project to work on. I was thinking doing something in java but because we didn't studied it yet i don't know much about it. (I do have good marks at C/C++ though, i'm not lazy). So what i really want to ask if you guys can give me suggestions of some projects that are possible to start and finish it …

Member Avatar
0
25
Member Avatar

The project (JSF 2.0.6!) executes fine, some pages load with no problem, others don't. This is the full stack trace. If there is any code needed, ask for. org.apache.el.parser.ParseException: Encountered " "}" "} "" at line 1, column 9. Was expecting: <IDENTIFIER> ... at org.apache.el.parser.ELParser.generateParseException(ELParser.java:2215) at org.apache.el.parser.ELParser.jj_consume_token(ELParser.java:2097) at org.apache.el.parser.ELParser.DotSuffix(ELParser.java:1064) at org.apache.el.parser.ELParser.ValueSuffix(ELParser.java:1033) at org.apache.el.parser.ELParser.Value(ELParser.java:978) at org.apache.el.parser.ELParser.Unary(ELParser.java:948) at org.apache.el.parser.ELParser.Multiplication(ELParser.java:712) at org.apache.el.parser.ELParser.Math(ELParser.java:632) at org.apache.el.parser.ELParser.Compare(ELParser.java:444) at org.apache.el.parser.ELParser.Equality(ELParser.java:338) at org.apache.el.parser.ELParser.And(ELParser.java:282) at org.apache.el.parser.ELParser.Or(ELParser.java:226) at org.apache.el.parser.ELParser.Choice(ELParser.java:183) at org.apache.el.parser.ELParser.Expression(ELParser.java:175) at org.apache.el.parser.ELParser.DeferredExpression(ELParser.java:113) at org.apache.el.parser.ELParser.CompositeExpression(ELParser.java:41) at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:116) at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:172) at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:217) at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:67) at com.sun.faces.facelets.el.ELText$ELTextVariable.apply(ELText.java:201) at com.sun.faces.facelets.el.ELText$ELTextComposite.apply(ELText.java:182) at com.sun.faces.facelets.compiler.CommentInstruction.apply(CommentInstruction.java:81) at com.sun.faces.facelets.compiler.UIInstructionHandler.apply(UIInstructionHandler.java:141) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98) at …

Member Avatar
0
3
Member Avatar

How can this be... Another odd thing is that the error appears on the page but no trace in console This is my code [code=java] package actions; import com.opensymphony.xwork2.ActionSupport; import logic.*; import logic.organizations.Project; public class CreateProjectAction extends ActionSupport{ private Project project =null; private String message = "NULL"; public void setProject(Project pr){ this.project = pr; } public String execute(){ // if (project !=null && project.getName().length()==0){ // message = "Execute: "+project.toString(); // } message = "Execute"; return SUCCESS; } public String dummy(){ return null; } public void validate(){ if(project !=null && project.getName().length()==0){ addFieldError( "project.name", "Name is required." ); } message = "Validate"; …

Member Avatar
0
8
Member Avatar

Hello. I am trying to make a thread pool for a server that will process incoming socket connections. The purpose is to have limited available connections at a time. I can't grasp this concept fully to implement it. Perhaps some of you can help me! Please try. Below is my current thread "launcher" [CODE=java]while (listening){ System.out.println("Listening..."); new MyServerThread(serverSocket.accept()).start(); }[/CODE] But i don't understand how to do it through a fixedThreadPool. [B]My speculations[/B] As far as i understand, though, is that i need to satisfy the following steps: (Correct me if i'm wrong!) * Design a ThreadFactory that will create my …

Member Avatar
0
3
Member Avatar

Hello. I'm trying to serialize a class that implements Serializable and a Runnable. My class has a transient Thread object as a field that is created and started after the restoration of my class(object). This is proven possibile by a tutorial from Oracle, [URL="http://java.sun.com/developer/technicalArticles/Programming/serialization/"]here[/URL]. But i fail to compile my program which is very similar to the one in the tutorial(i think). So in the following i attach my source code and the exception's trace in hope that someone can help me out. [code=java] /* * To change this template, choose Tools | Templates * and open the template in …

Member Avatar
0
5
Member Avatar

Hello. This is what i'm trying to do: [code=java] public class ComputeSearch extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter exit=response.getWriter(); exit.println("<%@ include file=\"GetByPath.jsp?path=1/2/5/\" %>"); } } [/code] The problem is that the server does not compile that jsp line. It just prints it ! Any idea how to make it compile and use it as a link?

Member Avatar
0
12
Member Avatar

Hi, i want to do a listener and this is what i have at the moment: [code] class MyListener extends MouseInputAdapter implements KeyListener{ @Override public void mousePressed(MouseEvent e) { if(e.getButton()==1){ out.println("MSE press "+e.BUTTON1_MASK); }else if (e.getButton()==2){ out.println("MSE press "+e.BUTTON2_MASK); }else if (e.getButton()==3){ out.println("MSE press "+e.BUTTON3_MASK); } } @Override public void mouseMoved(MouseEvent e) { int x = e.getX(); int y = e.getY(); out.println("MSE move "+x+" "+y); } @Override public void mouseDragged(MouseEvent e) { int x = e.getX(); int y = e.getY(); out.println("MSE drag "+x+" "+y); } @Override public void mouseReleased(MouseEvent e) { if(e.getButton()==1){ out.println("MSE release "+e.BUTTON1_MASK); }else if(e.getButton() ==2) { out.println("MSE …

Member Avatar
0
8
Member Avatar

Sending one image works, but when i repeat the cycle again it just doesn't work. my Client side code (excerpt): [code] for(int i=0;i<50;i++){//fromServer.contains("image") img = ImageIO.read(in); System.out.println("Got image."); label = new JLabel(new ImageIcon(img)); scrollPane.setViewportView(label); fromServer = reader.readLine(); }[/code]On the client side i have this output [code]Got image. Got image. Exception in thread "Thread-2" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:190) at screenviewer.DataReciever.run(DataReciever.java:84)[/code] my Server side code (excerpt): [code]dim = toolkit.getScreenSize(); System.out.println("Got screen size:" + dim.width + "x" + dim.height); captureSize = new Rectangle(dim); for (int i = 0; i < 50; i++) { bufferedImage = robot.createScreenCapture(captureSize); ImageIO.write(bufferedImage, "JPG", out); System.out.println("Sent image!"); //out.flush(); this didn't …

Member Avatar
0
20
Member Avatar

I have a class that gets a JFrame as a parameter. I want to get a certain component from it and do some operations with it. Something like this: [code] class A { A (JFrame frame){ a_certain_Component jScrollPane = (a_certain_Component) frame.getThatComponent(); jScrollPane.setViewPort(new JTextPane()); } }[/code]

Member Avatar
0
5
Member Avatar

I have tried installing and uninstalling everything i had about java, different JRE's and JDK's. These are my current settings : [code]alexandru@alex-desktop:~/Programs/eclipse_Java$ java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing) alexandru@alex-desktop:~/Programs/eclipse_Java$ echo $JAVA_HOME /usr/lib/jvm/java-6-sun-1.6.0.20 alexandru@alex-desktop:~/Programs/eclipse_Java$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun-1.6.0.20/bin [/code] This is the full error message when launching eclipse:[code]$ ./eclipse ** (Eclipse:11338): CRITICAL **: menu_proxy_module_load: assertion `dbusproxy != NULL' failed # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00ee4a8e, pid=11338, tid=3077797568 # # JRE version: 6.0_20-b02 # Java VM: …

Member Avatar
0
11
Member Avatar

Hello. That function worked fine firstly. Then i started to change some code, but nothing essential, just changing some variables to private class fields etc. I've restarted the OS , but has same output this is my code now: [code] doc = (AbstractDocument) jTextPane1.getDocument(); FileReader theFileIO = null; char[] c = new char[1]; try { theFileIO= new FileReader("/home/alexandru/Desktop/index.html"); while(theFileIO.read(c)!=-1){ System.out.print(""+c[0]); // prints to the console doc.insertString(0, new String (c), mas); //prints in the jTextPane1 } } catch (Exception e) { System.out.println("Failed to load file index.html"); System.out.println(e); }[/code] Where mas is : [I]private MutableAttributeSet mas = (MutableAttributeSet)new SimpleAttributeSet ();[/I] The console …

Member Avatar
0
2
Member Avatar

I'm trying to make a html editor. I need to set different colors for different words... I managed to the change text's background color, but not it's foreground. Can some one help me? this is my code [code=java] public class HEditorView extends FrameView { public HEditorView(SingleFrameApplication app) { super(app); initComponents(); //**** Lots of initializations! Skip further!!!**** // status bar initialization - message timeout, idle icon and busy animation, etc ResourceMap resourceMap = getResourceMap(); int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout"); messageTimer = new Timer(messageTimeout, new ActionListener() { public void actionPerformed(ActionEvent e) { statusMessageLabel.setText(""); } }); messageTimer.setRepeats(false); int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate"); for (int i …

Member Avatar
0
8
Member Avatar

Can someone explain it to me simple what it is? I read quite a lot of articles but don't understand how to make one. Are there some rules to apply, or is it just a mental programming technique? Please and thanks in advance!

Member Avatar
0
2
Member Avatar

this is what i'm doing.. [code=c++]cout << "Value:" << endl; cin>>it; //it is int cout<<1; for (pos = v->begin(); pos != v->end(); pos++) { // pos is an iterator and v is a vector<int> if (*pos < it) { v2->push_back(*pos); cout << *pos << endl; } } cout<<2;[/code] This is what i get [code]Value: 2 [/code] then freezes. I tried "std::cin.get();" but it gets worse: it freezes before i can insert.

Member Avatar
0
7
Member Avatar

I'm trying to make the container to work with one of my classes. But i don't understand what should the overloaded operator contain. Maybe this is because i don't know the container too well... Please give me some insights. This is my class [code=C++] class Complex{ private: int re; int im; public: void init(int _re, int _im){ re= _re; im= _im; } Complex(int _re, int _im){ init (_re, _im); } int getRe(){ return re; } int getIm(){ return im; } void setRe(int _re){ re = _re; } void setIm(int _im){ im = _im; } }; [/code] This is what i'm …

Member Avatar
0
4
Member Avatar

Hello, i made a basic java desktop application. After building the interface in the form, i compiled it and it worked perfectly. But after i added an event to a button (on click) my app won't close. I use the X button from the title bar, or ctrl+q from the menu but in vain. I am a beginner in swing, would someone tell me what i did wrong? [code] private void buttonGetMouseClicked(java.awt.event.MouseEvent evt) { try { URL url = new URL(jTextField1.getText()); Writer head = new StringWriter(); Writer body = new StringWriter(); alexHttp httpCon = new alexHttp(); httpCon.httpGet(head, body); HeaderPane.setText(head.toString()); //headerpane …

Member Avatar
0
12
Member Avatar

I'm trying to do the following: [code=java] private void butonActionPerformed(java.awt.event.ActionEvent evt) { buton.setLocation(500, 500); } [/code] but it doesn't do anything. Please help.

Member Avatar
0
4
Member Avatar

Hello, i want to understand these methods as a programmer. The only difference i know is that "get" sends the parameters via the url while "post" does not. But what actually happens in the source code? How can i implement it? I found some source code concerning the post method but i don't see it doing something practical. Would someone explain to me what i'm missing? [code=java] public static void postData(Reader data, URL endpoint, Writer output) throws Exception { HttpURLConnection urlc = null; try { urlc = (HttpURLConnection) endpoint.openConnection(); try { urlc.setRequestMethod("POST"); } catch (ProtocolException e) { throw new Exception("Shouldn't …

Member Avatar
0
6
Member Avatar

hello, i'm trying desperately to recover my c++ knowledge. I haven't done c++ for a year and now i'm facing some problems. Please help. I. How to type cast this: [code=c++] class A { virtual c Read(); } class B: public A { public c Read(){ D d ; return d; } } class C {} class D: public C {} void main (){ B b; D d = b.Read(); // how will i convert it?? } } [/code] i tried: [code=c++] D * d = dynamic_cast<D*>(&b.Read()); [/code] but it gives "taking address of temporary" (section III) II. I write …

Member Avatar
0
10
Member Avatar

My colors are becoming more pink/violet ? Does anyone know what is the problem? I tried to make a screenshot but on other displays the colors are as they should be. I tried moving the wires here and there but the same things remains. I have a samsung 940NW, Geforce 7300 Se

Member Avatar
0
5
Member Avatar

Hey guys. I am trying to print different messages in dependency of what char you press. In my case i use, F1,F2,F3, escape. The problem is that the first message is printed again after a char input is read, which it shouldn't! This is my code, please tell me where i'm wrong: [code=assembly] TITLE ep2_5 .MODEL SMALL .STACK 10h .DATA msg DB 'Apasati o tasta F*:' msg_l equ $-msg f1 DB 'Ati apasat tasta F1',13,10 f1_l equ $-f1 f2 DB 'Ati apasat tasta F2',13,10 f2_l equ $-f2 f3 DB 'Ati apasat tasta F3',13,10 f3_l equ $-f3 error DB 'Nu ati …

Member Avatar
0
3
Member Avatar

Hello everybody. I wanted to ask what does exactly Win7 do with their so called xp mode. As i have seen from various clips, this "mode" is actually just a virtual machine that runs win XP. Am i right? If the answer is yes then how come not all processor can support the "mode"? I mean, a virtual machine is just a program that creates/assigns virtual resources for a process, isn't it? What is so special then about this xp virtualization that not all processors can support? Secondly, when a distinct program is run from xp mode (but without xp's …

Member Avatar
0
14
Member Avatar

hello people. I am doing an "os" (small) that's mainly a menu. It just prints some strings and highlights some words when you pres 1,2 or 3. And by pressing enter while a option is selected, it has to do something. The problem is that the program gets stuck in the beginning ... and i don't know where is the problem. Can't run a debug because it's a bootable bin file. Can some one please tell me where is the error? I'm using linux+ nasm [code=asm] [BITS 16] jmp 07C0h:start snd db 'Sound' lsnd equ $-snd abt db 'About' labt …

Member Avatar
0
3
Member Avatar

Hello. I have an assignment to make a procedure that will end a task. The manual from the university isn't quite clear about how this works. So mainly i have this problem: How does a procedure end a working task? 1) Does the bios call the procedure ? or, 2) Will my current operating system call my procedure? or, 3) I must make myself an os that boots, launches a task, and then after an amount of time calls the procedure to end the task and bail out. I have no idea! The manual does give some sort of code(which …

Member Avatar
-1
7
Member Avatar

Hello everybody. I'm trying to get the current directory, save it, changing the current dir, then coming back to the previous one. My code so far [code=asm] TITLE ep1_7 .MODEL SMALL .STACK 10h .DATA msg DB 'Current directory:',0h msg_l equ $-msg buff db 64 dup('$') ;f_handle dw 1 dup(?) .CODE begin: mov ax,@DATA mov ds,ax ;Getting current directory mov ah,47h mov dl,0 mov ds,buff ;showing the returned pathname mov dx,OFFSET buff mov ah,09h int 21h ;bail out mov ax,4c00h int 21h END begin [/code] My problem is that i have an error at line 15. I don't know how to …

Member Avatar
0
2
Member Avatar

Hey guys. I want to read from a file created by me from a specific position. But i don't know how to move the file cursor. [code=ptasm] TITLE ep1 .MODEL SMALL .STACK 10h .DATA text DB '1234567Start:7890.end',13,10 text_length equ $-text dir db 'D:\myfile.dat',00h buff db 17 dup('$') f_handle dw 1 dup(?) .CODE begin: mov ax,@DATA mov ds,ax ;Create file mov ax,3c00h mov dx,OFFSET dir mov cx,20h int 21h mov [f_handle],ax ;Open file mov ah,3dh mov al, 2 mov dx,OFFSET dir int 21h ;Write file mov ax,4000h mov bx,[f_handle] mov cx,text_length mov dx,OFFSET text int 21h ;Read file mov ax,3f00h mov …

Member Avatar
-1
3
Member Avatar

Hello, i want to print on my website how many people are viewing it. I thought doing it with cookies: 1. Give the guest a [I]guest [/I]cookie. Increase a static variable "guest". 2. If he registers, give him a [I]user[/I] cookie. Decrease "guest" by 1 , Increase "user" by 1. (_Problem_: how to delete his guest cookie? It's MaxAge is -1 ) 3.If user/guest exits delete the corresponding cookie and decrease "guest" / "user" variable. I found out that the api doesn't give such options as deleting a cookie, or notifying that it expired/quit. So how could it be done? …

Member Avatar
0
7
Member Avatar

Hello, I want to know if it is possible to do that, and how if yes. I tried doing something like this [code=jsp] ... <%! public static Object selectobject; %> <select name"xxx" onChange="<% selectobject = this%>"> </select> ... [/code] But it's not giving me any useful information about the values selected in the drop-down menu. If it's possible, i prefer without javascript, but just JSP.

Member Avatar
0
3
Member Avatar

Hello. I'm starting to have a headache at solving this. I work in Eclipse IDE and run the project on tomcat server. What i do is this: i have a form, like this: [code=html] <form method="GET" action="http://localhost:8080/BookShelf/ComputeSearch"> <p>Book <input type="text" name="book" size="7"/></p> <p>Chapter <input type="text" name="chapter" size="5"/></p> <p>Verse <input type="text" name="verse" size="6"/></p> <p> <input type="submit" value="Send"/> <input type="reset" value="Reset"/> </p> </form> [/code] Where ComputeSearch is a servlet, located in BookShelf/com/servlets/ . The problem is that the server gives me an error saying : [I]HTTP Status 404 - /BookShelf/ComputeSearch type Status report message /BookShelf/ComputeSearch description The requested resource (/BookShelf/ComputeSearch) is not …

Member Avatar
0
2
Member Avatar

Hello everyone. I'm trying to do this in nasm under linux : [code] cmp eax,ebx jng .loop[/code] and also [code] test eax,ebx jng .loop[/code] and yet also [code] %if eax < ebx jmp .loop %endif[/code] I want to loop while eax is lesser than ebx and non of the 3 methods work! First 2 execute once and then hit for the exit code the last one gives error: [B] error: `<': operands differ by a non-scalar[/B] Can someone help me? I've been banging my head against the wall for some hours now!

Member Avatar
0
3

The End.