Text Ruined By Shadow Mapping
Jun 17, 2014
I'm working on a project and I'm just about to implement different stages (menus etc). The program is opened in an intro stage that just renders a text (slick, Unicode font) looking like this:
After switching to a different stage hat uses shadow mapping and then back to the intro stage it looks like this:
I've found that removing the line:
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 0, 0, shadowMapWidth, shadowMapHeight, 0);
solves the problem but then the shadow mapping isn't working.
View Replies
ADVERTISEMENT
Jun 25, 2014
I'm looking for a working example of shadow mapping with java code using shaders. There are so many c++ or c tutorials out there but i haven't managed to rewrite them since I'm too bad in c/c++. I've been trying to implement this a long time but can't get the hang of it. Any example out there? Preferably as sstripped down as possible except for the shadow mapping.
View Replies
View Related
Feb 4, 2015
I have a servlet that is not mapping to my URL:
<servlet-mapping>
<servlet-name>view</servlet-name>
<url-pattern>/View/*</url-pattern>
</servlet-mapping>
When I try to call the Servlet from a JSP:
<a href="/View/viewFlow?V1">V1</a>
The resulting link is [URL].... It's bypassing the project name. The link should be [URL]...
View Replies
View Related
Apr 21, 2014
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter pw = response.getWriter();
String connectionURL = "jdbc:mysql://localhost:3306/userdb";// userdb is the database
Connection connection;
[Code] .....
View Replies
View Related
Apr 5, 2014
When casting a char which is read from a file to an int, can i assume that the mapping used will be ASCII? I've learned that unicode uses ASCII mappings for the characters that overlap.
Are there any other possibilities for int values of one character? I still have trouble understanding character encodings.
View Replies
View Related
Nov 14, 2014
I am writing a program where I need to split an array of full names into First names and Surnames, using mapping. However, I am struggling how to split it up... and my First Names and Surnames list are both just displaying the full name.
public static void main(String[] args) {
String[] names;
names = new String[8];
Scanner s = new Scanner(System.in);
for (int i = 0; i < names.length; i++) {
System.out.println("Enter full student name:");
[Code] ....
View Replies
View Related
Dec 1, 2014
I have this mapping:
<servlet>
<servlet-name>wsdl</servlet-name>
<jsp-file>/wsdl/bankconnect.html</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>wsdl</servlet-name>
<url-pattern>/wsdl</url-pattern>
</servlet-mapping>
And this works fine: URL....The war file is deployed under the context root /bankconnect/ I want to make a servlet mapping, before the context root "i still want the context root bankconnect". URL....
View Replies
View Related
Apr 13, 2015
I need a Example of a Hash Mapping Algorithm in Java. This Mapping Needs to do the following:
Map an Array of Strings, to integer values which correspond to each fruit
private String[] Fruit = {"Apple","Orange","Pear","Grapes"};
Apple: 1 + 1
---------------
Orange: 1+ 2
---------------
Pear: 1 + 3
---------------
Grapes: 1 + 4
---------------
I not sure where to start at the Moment...
View Replies
View Related
Dec 1, 2014
We need to process (read and parse) big xml files (500 Mo to 1 or 2 Go). What's the best framework or Java library to use for this requirement ? Then what's a good OXM (in this case xml to object mapping) solution for this kind of file ?
View Replies
View Related
Feb 14, 2014
We generally use [URL] ..... for running web applications.
What I want is to access my web app using something like this: [URL] ....
How to achieve this? Actually what i want to ask is that how URL like WWW.example.com is mapped to web applications? Assuming that i am using tomcat server.
View Replies
View Related
Feb 27, 2014
I have downloaded and testing these two mapping libraries. I wrote a program which has 100000 iterations and maps the beans of the same class:
public class IntBean {
@JMap
private int int1;
@JMap
private int int2;
[Code] ....
Mappers are created BEFORE iterations start:
private JMapper jmapper = new JMapper(IntBean.class, IntBean.class);
private MapperFactory orikaFactory = new DefaultMapperFactory.Builder().build();
private MapperFacade orikaFacade = null;
orikaFactory.registerClassMap(orikaFactory.classMap(IntBean.class,IntBean.class).byDefault().toClassMap()); orikaFacade = orikaFactory.getMapperFacade();
What is in each iteration:this.orikaFacade.map(a1, a2);
or
a2 = (A) this.jmapper2.getDestination(a1);
I know, that Orika and Jmapper are great libraries from Google and they use reflection in a different way than for example Dozer, which is much slower, they se reflection to generete code somehow..
I have 3 questions:
1) How they work - when the code is generated, during maven build, in runtime - everytime when I create mapper in code? Are they change class code byte dynamically?
2) Why there is this speed difference that I noticed?
3) Which library would you choose and why? Both have the same capabilities? Why both come from Google? Why Google didnt develop Orika and created Jmapper instead?
View Replies
View Related
Mar 16, 2015
When I map my servlet to the ROOT of the site, the javascript, CSS and image files are not served. The conversation between the server and browser shows the files are being sent, but they are not rendered in the browser. This happens in both Firefox and Chrome.
If I change the mapping to anything other than the root, such as /x/, everything works as it should.
Here's my web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
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"
version="2.5">
[Code] .....
View Replies
View Related
Dec 7, 2014
So, i got the following code:
@Path("{bill-id}/request")
@Path("{user-id}")
and the following pattern
myhost/c15a856/request
somehow, the container always decides to match it to @Path("{user-id}"). How do I resolve this
View Replies
View Related
May 13, 2015
This is the code that I wrote but I have two problem with two buttons one of them ... I want to delete the selected text inside the text Area which represented as b[8] and the other button that I want to select parts of the texts which represented as b[0]....
Here is the code..
package KOSAR2;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
[Code] .....
View Replies
View Related
Dec 12, 2014
I am checking how to do following task.
01. pickup the selected text file and read the line by line and output the text in to visual text pane.
what i did:.
01. I wrote code that read the text file and output in to jave console/ also some of the interface.
the code read txt file:
Java Code:
String fileName = "C:/Users/lakshan/Desktop/lawyer.txt";
File textFile = new File(fileName);
Scanner in = new Scanner (textFile);
while(in.hasNextLine()){
[code]....
so it will read any text file dynamically and output to the text pane in interface. I think scanner code must be execute after the select the file from the browser and set the scanned result in to variable. then later out put the var as string in some jswing component?
View Replies
View Related
May 21, 2014
The problem is i want to replace some string text with foreign characters, but JTextArea returns plainText.
For Example:
str = new String();
str.replace('e', 'é');
textArea.setText(str);
but textArea returns plainText.
View Replies
View Related
Apr 17, 2015
I'm supposed to write a GUI application letting the user enter a file on the text field and display its hex representation in a text area and vice versa.
Here's my code:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package hexconvertor;
import java.util.*;
import java.io.*;
public class HexConvertor extends javax.swing.JFrame {
[Code] .....
It's not doing anything, I don't understand why.
View Replies
View Related
Jan 28, 2014
I have a textField in which I have text in. The text is enter customer name. I would like for this text to disappear whenever the user clicks on the textField to enter a customer name. I am using the automated swing gui builder in NetBeans. Is their some sort of feature for this under properties of the text field? If not then what are my other options?
View Replies
View Related
May 29, 2014
Write a program that reads in a line of text and then outputs that line of text first in all uppercase letters and then in all lowercase letters.
INPUT and PROMPTS. The program prompts for a line of text as follows: "Enter the text: " and then reads in an entire line of text as a String .
OUTPUT . There are four lines of output . The first line is "The text in all upper case is: ". The second line is the line that was read in, displayed in all uppercase. The third line is "The text in all lower case is: " and the fourth line is the original line that was read in, displayed in all lowercase.
CLASS NAMES. Your program class should be called ShoutAndWhisper.
This is what I have so far:
import java.util.Scanner;
public class ShoutAndWhisper
{
public static void main(String[] args)
{
Scanner scannerObject = new Scanner (System.in);
System.out.println("Enter the text: ");
scannerObject.next();
System.out.println("The text in all upper case is: ");
View Replies
View Related
Jan 27, 2013
I'm using JBoss 7.1.1.Final. I'm writing a Spring 3.1.1.RELEASE web application and have a massive amount (~5MB) of text output to send to the browser. I would like the browser to display the output as it is generated, but right now, the browser only displays everything after the servlet's doGet method completes. Here's my method …
@RequestMapping(value = "/mymethod", method = RequestMethod.GET)
public void refreshOrders(final HttpServletResponse response) throws IOException
{
execute(response, myWorker);
}
private void execute(final HttpServletResponse response,
[Code] ....
I set my buffer size to be 1K but that doesn't do anything.
View Replies
View Related
Nov 27, 2014
I am working on a personal project and want to create a text editor to write my code. I am wondering how could I read the last input from the user and if say it was an open curly brace {, then like netbean's my editor will supply the closing curly brace. My java experience is limited but I have tried to read key board input and a few other options that did not work.
View Replies
View Related
Apr 24, 2015
I'm working on a simple text editor, and I'm currently saving the contents of my JTextPane in a file using an HTMLEditorKit (text is a JTextPane):
private void save() throws IOException {
int returnVal = fc.showSaveDialog(window);
if (returnVal == JFileChooser.APPROVE_OPTION) {
StyledDocument doc = (StyledDocument)text.getDocument();
HTMLEditorKit kit = new HTMLEditorKit();
BufferedOutputStream out;
[Code] ....
The problem I'm having is that after opening a file that I saved, it does not display (if I disable text/html, it displays the entire html code, but when I re-enable it, nothing displays at all.) Am I loading it wrong, or am I setting the JTextPane's text incorrectly? Or is it, perhaps, another error that I didn't catch?
View Replies
View Related
Mar 15, 2015
I am trying to run a simple program in which on clicking on the TextField will show some required text under the Text Field .Here is my code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class Awt
{
public static void main(String...s)
[Code] ....
I am expecting the on clicking anywhere inside the text field should show me the Text : "Mouse Clicked" . But i am getting this error:
Awt.java:77: error: cannot find symbol
tf.f.setText("Mouse Clicked");}
^
symbol: variable f
location: variable tf of type Awt
1 error
View Replies
View Related
Feb 2, 2014
I am trying to read a text file into Java and split the text into tokens. Eventually I want to be able to count the number of instances of a specific word. However, at this point, when I run the file, all I get is the location of the file rather than the text in the file.
import java.util.*;
import java.io.*;
public class textTest3 {
/**
* Prints the number of words in a given file
*
* @param args
* @throws IOException
*/
[Code]...
View Replies
View Related
Oct 13, 2014
I am building a chat server/client and would like to have it so when a user sends a message, the message pops up in the main chat area beside their name, which I would like to be in bold font. Something like "Alan: Hello, how are you?". I can't find a way to do this with a text area or on a string. Do any swing components suitable for use as text areas support bolding of certain sections of the string that you will set to it?
View Replies
View Related
May 29, 2014
Java Code:
if(Directory.getText().matches("")){
JOptionPane.showMessageDialog(null, "Please search for the directory");
}
else if(fileName.getText().matches("")){
[Code].....
This is actually my question:
Java Code:
1. billing-20140527[09].txt has
a)XGMS,2014-05-27 10:08:04,122,PLAYER_VERIFY,VERIFY to LBA,0x580000,0xC0000,253040.
b)XGMS,2034-05-27 30:08:04,122,PLAYER_VERIFY,VERIFY to LBA,0x580000,0xC0000,253040.
2. billing-20140527[10].txt has
a)XCGS,2014-05-27 10:08:04,122,PLAYER_VERIFY,VERIFY to LBA,0x580000,0xC0000,253040.
b)HELO
[B]I try to find the number 1 in both text files, if lets say I input the text file name is billing, I can find the number 1 in both text file and output them:[/B]
a) XGMS,2014-05-27 10:08:04,122,PLAYER_VERIFY,VERIFY to LBA,0x580000,0xC0000,253040.
b) XCGS,2014-05-27 10:08:04,122,PLAYER_VERIFY,VERIFY to LBA,0x580000,0xC0000,253040.
[B]However, if I specify the text file name: billing-20140527[09].txt and find the number 1 inside the text file, it will only output:[/B]
a) XGMS,2014-05-27 10:08:04,122,PLAYER_VERIFY,VERIFY to LBA,0x580000,0xC0000,253040. mh_sh_highlight_all('java');
So far, I can't get this program to run,
View Replies
View Related