Denees

1

votes
1

answer
252

views

Resources for learning tk/tile

Besides Ruby-Doc, what sources are best to take some examples and tutorials from, especially about Tk/Tile in Ruby? I found myself more normal with http://www.tutorialspoint.com/ruby/ruby_tk_guide.htm http://www.perfectxml.com/syngress/ruby/Page1.asp but the information is pretty vague, and there is...
Denees
1

votes
1

answer
1.5k

views

Struts2 <s:select/> and a list of HashMap

I have a list of HashMap in my Action class, something like {month=05, day=20, dayOfWeek=Mon}. I need to pass it to a select tag from Struts2. Generated code from page looks like this: {month=07, day=11, dayOfWeek=MON} {month=07, day=12, dayOfWeek=TUE} {month=07, day=13, dayOfWeek=WED} Select tag f...
Denees
1

votes
1

answer
3.3k

views

Failed to allocate memory: 8 (NetBeans)

Today, when I tried to run an app in NetBeans on a 2.3.3 platform, it shows me that: Failed to allocate memory: 8 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. and the Emulator doesn't start. This is...
Denees
1

votes
1

answer
992

views

Infinite scrolling data preloading

I've implemented an infinite scrolling on a page, it works good, when the page is scrolled to bottom, the data is loaded, but I want to do some kind of preloading of data to prevent user to wait each time he reaches the bottom of the page. I really need an advice for this, cause I don't really know...
Denees
1

votes
1

answer
1.4k

views

Arc text with Raphael.js

I'm trying to achieve an arc effect to the text, like in screen below: And I tried to play with it for some hours, but cannot get it to work correctly, maximum what I was able to achieve is this: Here is a snippet from my code: JSBin Can someaone please point me in the right direction? //UPDATE: Ok...
Denees
1

votes
2

answer
2.3k

views

Getting images from https with Java

Is there a way to get images from a https url with Java? What I am trying so far: URL url = new URL('https://ns6.host.md:8443/sitepreview/http/zugo.md/media/images/thumb/23812__yu400x250.jpg'); System.out.println('Image: ' + ImageIO.read(url)); But, I am getting: Exception in thread 'main' javax.ima...
Denees
1

votes
1

answer
0

views

How display tag renders the data in JavaEE?

From the time I started working with JavaEE, I've made ​​my way paginating a list in the .jsp, but I have seen many of Java developers are using display tag library, why, I don't know, as I know display tag library gets the whole list in the page, and only then will process it, and if you still...
Denees
1

votes
3

answer
193

views

Fetch all records from MySQL as lazy=“false” with PHP

I have 2 tables in my database users and users_roles, like so: users: id | username | user_role_id ---------------------------- 1 | User1 | 1 2 | User2 | 1 3 | User3 | 2 users_roles: id | role ---------- 1 | admin 2 | user So, in Java I just had to write in Hibernate mappings an attribute...
Denees
1

votes
4

answer
147

views

Color Left and Right backgrounds rather that from the Center

Now layout look like this What I want to achieve is this body { color: #4B5E6F; font-size: 11px; line-height: 1.8em; } #main-content-wrapper { background: #F6F7F8; border-left: 1px solid #DBDFE2; border-right: 1px solid #DBDFE2; min-height: 400px; } #content-left { float: left; width: 150px; min-hei...
Denees
5

votes
2

answer
11.6k

views

Struts2 & NetBeans 7

I cannot find anywhere ngbit support for NetBeans 7. I have to install Struts2 for my Web Applications development. For NetBeans 6.9 my older version of ngbit 0.4 works fine, but for NetBeans 7 doesn't work. I need NetBeans 7 because of HTML5. When I try to install org-netbeans-modules-web-framework...
Denees
4

votes
1

answer
980

views

Stop processes/threads before undeploying/stop application from Apache Tomcat

It is possibly programmatically to know when the web application is undeployed/stopped from Tomcat, in Java? I need to stop some processes running, but without setting up Tomcat, only Java code?
Denees
5

votes
4

answer
1.5k

views

Caching web applications in Java

What is the better way to cache a Java Web Application using MySQL? to improve performance. What are the best techniques to do it? It is better to do this at the application level or database level? I'm new to this, so, sorry if I'm wrong.
Denees
2

votes
3

answer
1.3k

views

Padding problems in Linux & Mac browsers comparing to Windows with @font-face

I have few fonts that I am using in my web projects. Everything goes perfect while I am in Windows browsers, when I am in Linux and Mac browsers the fonts are placed a little bit far from the center, and it looks like it was pushed up with few pixels. This is annoying me because it’s really visibl...
Denees
2

votes
2

answer
639

views

Struts2 configuration and performance

I use Struts2 + Spring + Hibernate for web site development. And I am wondering about 1 thing, I never used annotations in my web applications, but hey, what is the best way to code a web application? Annotations (I never understood how they works) or Config-files? and why? More complex applications...
Denees
2

votes
4

answer
3.2k

views

Struts2 + getParameterValues()

I was able to make this to work in Struts, but in Struts2 I can not understand what the problem is, I am getting the null as result. My Action code: String[] stuff = request.getParameterValues('stuff'); if (stuff != null) { for (int i = 0; i < stuff.length; i++) { Integer id = new Integer(stuff[i]);...
Denees
3

votes
1

answer
451

views

Extract parameters and their values from query string in Java

So let's suppose I have a string like 'param1=value1¶m2={'url':'http://somesite.com?someparam=somevalue&someparam1=somevalue1'}¶m3=value3' and I need it to be: param1: value1 param2: {'url':'http://somesite.com?someparam=somevalue&someparam1=somevalue1'} param3: value3 What would be the bes...
Denees
2

votes
3

answer
1.3k

views

AJAX callback effects with jQuery

I stumbled upon a problem. I'm using a simple AJAX script written in jQuery, I want to make the AJAX callback to change html with easeInOut effect for example, but I don't know how to do it, because now, when the response comes, div's content changes with some kind of blinking effect, that is very u...
Denees
3

votes
1

answer
2.1k

views

Server side automation testing using Java and JSON requests

I have not done automation testing before, only jUnit testing, now I have a request to do that. But the automation is not on frontend using Selenium or so, it is simpler than that, using JSONs requests. I understand the principles of that, but don't know how to do it programmatically correct. I have...
Denees
2

votes
1

answer
3.5k

views

SQL to Hibernate query conversion

I came across a problem and can not move forward because I cannot get converted from SQL to HSQL. This is de SQL: SELECT * FROM live_information i, live_matches_away ma, live_matches_home mh, live_matches m LEFT JOIN live_periods lp ON lp.match_id=m.id LEFT JOIN live_results r ON r.match_id=m.id L...
Denees
2

votes
2

answer
5.3k

views

Struts2 java.lang.NoSuchMethodException (form value type)

This happens not all the time, but frequently, and it's annoying. When I try to get a value from other than String (declared in Action), it gives me an exception like java.lang.NoSuchMethodException. Nov 23, 2011 4:13:20 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Er...
Denees
1

votes
3

answer
3.2k

views

Multiple result types in Struts2?

I have a Struts2 application where I using Tiles. How can I get multiple result types in action-mappings? because I need to set de output as JSON data, and Tiles simultaneous. I have tried: tiles.home But this isn't working
Denees
3

votes
4

answer
1.4k

views

CSS child selector with jQuery

Can I get in jQuery the list o childs (span) that belongs to a div? I mean the number of childs. I am generating a form with a few spans, and I need to know how many spans I have generated.
Denees
2

votes
3

answer
1.9k

views

CSS Menu with border-radius on hover

Maybe it is a simple solution, but I stuck to it. Here I have my code http://jsbin.com/ejomuv pure CSS menu What I want to do, is to set on Dropdown button bottom 0px border-radius on hover, but only on dropdown menus not on all. I tried, but it isn't working, I know that I don't do something right...
Denees
1

votes
2

answer
305

views

Colored selected row in a dropdown list

Is there a way to color a selected row from a dropdown list? jQuery/JavaScript is welcomed as well
Denees
3

votes
1

answer
10.1k

views

Error creating bean in Quartz-Scheduler

I changed the quartz library from version 1.5.2 to 2.1.2. With older version of it the project runs and works fine, but with 2.1.2 I get the exception: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lcJobDetail' defined in class path resource [appl...
Denees
40

votes
4

answer
88k

views

Google OAUTH: The redirect URI in the request did not match a registered redirect URI

I am trying to make an upload to YouTube from my Java based web app, I spent a few days to understand what and where is the problem and I cannot get it, for now I am pulling my hair out off my head. I registered my web app in Google Console, so I got a pair of Client ID and Secret and a possibility...
Denees
4

votes
2

answer
1.7k

views

Style highcharts x and y axis

I am stuck on a problem and cannot find how to move further. I am trying to style up a chart using highcharts. But cannot get to show up the right percent values on the left side and style up the bottom and left lines a little so they will look like in first screen. The same problem I have with the...
Denees
7

votes
8

answer
18.7k

views

SVN command returned with the following error

When I want to commit my project to SVN, the following error pops out: org.tigris.subversion.javahl.ClientException: Working copy '/media/Data/NETBEANS_PROJECTS/myproject/web/pages/ajax-fragments' locked; try performing 'cleanup' I use NetBeans 7.1 (tried with 7.0.1 and 6.9, the same) and CollabNet...
Denees
2

votes
2

answer
10.6k

views

Struts2 java.lang.NoSuchMethodException

I have a problem with Struts2, in my ActionClass I declared an: private Integer table; + setter and getter methods then I have a form in my .jsp: But when I try to submit this form, I am getting a very strange exception: Aug 19, 2011 3:17:28 PM com.opensymphony.xwork2.util.logging.commons.CommonsLog...
Denees
1

votes
2

answer
176

views

jQuery setInterval delays from real time

It can be possible to make setInterval work with current time together? I mean, I am making a custom countdown library for personal use, and I need to calculate each second for that, but sometimes setInterval delays from real time, I think it is because of browser lags or execution time. Or is ther...
Denees
3

votes
1

answer
896

views

Struts 2 - Intercept an image file uploading with CKEditor

I have a CKEditor on different pages of the site, so I settled up the uploads to true and all the configuration stuff for it to work, and the image upload worked just fine for 'Send it to the Server' tab. But from here I want to intercept or interact with upload function to be able to upload images...
Denees
6

votes
3

answer
5.5k

views

External IP Address of the client

Sounds funny, but how can I get the external IP address from a client? I tried few things, but didn't work for me. in first place I tried request.getRemoteAddr() and I am getting the result as: 0:0:0:0:0:0:0:1 in second place I tried InetAddress ip = InetAddress.getLocalHost(); ip.getHostAddress()...
Denees
4

votes
1

answer
7k

views

SSL error in Ubuntu and Tomcat

I am new to SSL, trying to enable it in Tomcat, but I have folowing error showing up by firefox, when accesing https://localhost:8443/: An error occurred during a connection to localhost:8443. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_lo...
Denees
8

votes
2

answer
25k

views

Configure Hibernate C3P0 Connection Pooling

I'm stumbled upon a problem while developing a Web Application based on Struts2 with Spring and Hibernate. When I refresh the site a few times, for example 2-4 times, Hibernate is showing up an exception about Too many connections. I've tried to implement C3P0 Connection pool and have some problems...
Denees
94

votes
16

answer
394k

views

Received fatal alert: handshake_failure through SSLHandshakeException

I have a problem with authorized SSL connection. I have created Struts Action that connects to external server with Client Authorized SSL certificate. In my Action I am trying to send some data to bank server but without any luck, because I have as a result from server the following error: error: j...
Denees
1

votes
6

answer
141

views

Regex to remove /*…*/ comments from the start of the line

I have some files of this type: /* 78 */ Lorem ipsum dolor sit amet /* 79 */ Lorem ipsum dolor sit amet /* eb */ Lorem ipsum dolor sit amet /* HG */ Lorem ipsum dolor sit amet /* */ Lorem ipsum dolor sit amet /* 83 */ Lorem ipsum dolor sit amet /* 8...
Denees
2

votes
1

answer
239

views

Hamcrest pattern to match a token

Let's suppose I have a token (406 chars length) that is generated dynamically, eg. of them: 1. WqRj7U0czOLwNAKL9KVnBQR57NEnJbv77MYFkiiE20iTiOWHZV2N186VYT8-PjJSeHRLq9IvSwclR4zdk2jpJTjCIlTjlpfyiWs-tJ0taguM6BLNEoQenb2admoEw-cVlha6cGZqOklsPaBEZV-ASV5OE4Ig9dc77qsUs08vTKrYwwUjhjxDqsxyL7d0bvkrxHYaRL9EHMniA...
Denees
1

votes
3

answer
397

views

Bind 3 tables in 2 different cases in MySQL

I did not found a solution to this, so I want to ask you. The whole thing is that I have 3 tables: Cities, Districts, Institutions. Districts have a relationship with Cities Now when I want to register an Institution, I have to choose a District from which the Institution belongs, but if that City d...
Denees
1

votes
1

answer
2.7k

views

Struts2 select tag with 2 different values

I have a list with 2 properties name and prefix (from SQL), where name is the language name and prefix is the language identifier composed of 2 letters. And I want to make something like: English French English UK I know how to do that in this way: But how to display the results if we have a list f...
Denees
1

votes
3

answer
549

views

Ruby + MySQL error connecting to database on localhost

I'm dealing with this a few days, and cannot connect to a simple mysql database on localhost. require 'mysql' @db_host = 'localhost' @db_user = 'myrubyapp' @db_pass = '1234' @db_name = 'myrubyapp' mysql = Mysql.new(:host => @db_host, :username => @db_user, :password => @db_pass, :database => @db_nam...
Denees

View additional