Questions tagged "java" (page No.1)

Does Java applets reveal the real IP address, even when using proxy or vpn?

Can a Java applet reveal the original client IP address, when browsing through a proxy or a VPN? Why? ...

ProGuard is not working

i am developing an Android APP with the lastest SDK. I'm developing the app for Api 4 (android 1.6). My project haves a proguard-project.txt file (this is the proguard config file for the lastest versions of Android SDK) and the project.properties file haves uncomented the line for proguard, so proguard is ...

Regex matching a space a digit and 8 characters

I want to match a string containing, a space any number of digit a space 1-8 characters - (alphanumeric and special characters) example, 01 Stack This is what i tried, \\s\\d+\\s[^.]{1, 8} - i tried here except for ., ...

How to check the file handle leak for a Java program?

My java code seems have handle leak, which debug tool is suitable to check that? ...

Do the static property values in Oracle's modified MVC example break the intended decoupling?

I have been following the modified Model View Controller example presented in this article by Oracle. Java SE Application Design with MVC In this example the DefaultController class declares property name strings like this: public static final String ELEMENT_TEXT_PROPERTY = "Text"; These strings are used in multiple places. In the controller: AbstractController uses ...

format flags conversion mismatch exception

Hi hopefully this fulfils the criteria for being a well written question. I'm new to programming and I've been trying to write an application for climbers on android that tells the user what they should be climbing based on their current ability for a training period. The app requires the user ...

Easily pass values in a list as parameters to a method

Is there any easy way to pass all the values in a arbitrary length List as parameters to a method. In the following code, for example, I would want the params in method2 to be a sequence of the values residing in the params List (but without the List structure). ...

SSL "Peer Not Authenticated" error with HttpClient 4.1

I am building a simple app monitor to poll one of our API URLs and email us if it can't get a HTTP 200 status code from the response (this would indicate our API is down for some reason). I am using HttpClient 4.1 (this is important because its API differs ...

binding native android java to javascript events offer better performance?

I use phonegap. will binding javascript events to native android (java) code offer faster event performance? eg. lets say for something like 'touchstart' etc. If so, what code do I use to achieve this? your help is appreciated. thanks ...

Android UI thread stops updating from other threads

I am writing an Android app that connects to a Bluetooth device, reads data sent from the device, adds it to an AChartEngine graph, and displays the data in a TextView. My Bluetooth code is quite similar to the threaded implementation in the BluetoothChat sample code (it comes with ...

Parsing logs.. just can't figure it out

Alright, so I'm supposed to make a script that parses all the chat logs from irc channels, combine the ones that match names, and then sort the chat logs by date. This is an example chat log: jul 29 19:20:53 <lol> lolfile3 jul 31 19:20:53 ...

Understanding the difference between character matching and token matching

What is the difference between search features implemented using substring/character matching and search features implemented using token based matching? I'm looking for an intuitive and not-too-technical explanation for product planning purposes. Below is my explanation, is more or less correct, but not intuitive or complete. The answer has to do with ...

How to make Java not call a external lib

I have a large system in Java, which basicaly consists of an user interface, the "core engine" of the application and a lot of other modules. I am trying to create an applet that will consist only of the "core engine", without the other parts, so I need to share the ...

How do I view JRE's source code in Eclipse on linux (debian)

I have a debian machine. I am using eclipse. Normally on eclipse, to view the source of code of an object, etc, you simply click F3 on the object. But for some reason, when it's core java classes, I get "Source not found" and an option to attach the source. Where ...

Java Custom Hash Table

I am trying to build my own custom hash table using this approach. For that, what I want to do is following: 1) Create an array of Linked Lists of the size Integer_MAX (my own custom linked list). 2) Insert values (int's) to the Linked ...

How do you sync a progress bar to data?

My program reads files from a directory on the filesystem. I have a progress bar which has minimum set to 0 and maximum set to n(number of files in particular directory). Above it is a piece of text which displays the progress of the iterations... 1/100, 2/100, 3/100 etc. The problem ...

How To Make Custom Alert Dialog Display Correctly

Having Troubles making this customer dialog box look correctly. Here is my layout code <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_root" android:orientation="vertical" android:layout_width="fill_parent" ...

Transforming multiple XML/XHTML/HTML file with XSLT using Java Program

I want to take multiple input files (XML/HTML/XHTML) and corresponding XSLT to produce the output file for the corresponding Input file. If there is only one input XML file and one input XSLT file then from the following program I'm able to transform it successfully. E.g In the give program my ...

« Previous12345678910 ... 1408414085Next »Show All