Search Results

Search found 33640 results on 1346 pages for 'java generics'.

Page 125/1346 | < Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >

  • How can I create a square 10x10 grid using nested for loops in Java? [migrated]

    - by help
    I'm trying to create a 10x10 grid using for loops in Java. I'm able to create rows going up and down but not repeating. for(int i = 1; i < temperatures.length; i++) { temperatures[i] = (temperatures[i-1] + 12) / 2; //takes average of 12 and previous temp } } public void paint(Graphics g) { for(int y = 1; y < 9; y++) { g.setColor(Color.black); g.drawRect(10, 10, 10, 10); g.drawRect(10, 10, 10, 20); g.drawRect(10, 10, 10, 30); g.drawRect(10, 10, 10, 40); g.drawRect(10, 10, 10, 50); g.drawRect(10, 10, 10, 60); g.drawRect(10, 10, 10, 70); g.drawRect(10, 10, 10, 80); g.drawRect(10, 10, 10, 90); g.drawRect(10, 10, 10, 100); for(int x = 1; x < 9; x++) { g.setColor(Color.black); g.drawRect(10, 10, 10, 10); g.drawRect(10, 10, 20, 10); g.drawRect(10, 10, 30, 10); g.drawRect(10, 10, 40, 10); g.drawRect(10, 10, 50, 10); g.drawRect(10, 10, 60, 10); g.drawRect(10, 10, 70, 10); g.drawRect(10, 10, 80, 10); g.drawRect(10, 10, 90, 10); g.drawRect(10, 10, 100, 10); } } } }

    Read the article

  • java UnitilsException: Executed scripts table "PUBLIC"."DBMAINTAIN_SCRIPTS" doesn't exist yet or is invalid [closed]

    - by Philippe
    I want use Unitils for testing my JAVA program, i have following error message "UnitilsException: Executed scripts table "PUBLIC"."DBMAINTAIN_SCRIPTS" doesn't exist yet or is invalid" My table is into an DDL file, and table is not created Could you says me if dataSetStructureGenerator.xsd.dirName=src/test/resources/dataset-schema properties is still active in unitils 3.3 ? My EMPLOYEE table is not created and DBMAINTAIN_SCRIPTS not created too Where is my mistake ? My DDL file SET REFERENTIAL_INTEGRITY FALSE; SET DATABASE COLLATION "French"; SET SCHEMA PUBLIC; CREATE TABLE DBMAINTAIN_SCRIPTS (FILE_NAME VARCHAR2(150), FILE_LAST_MODIFIED_AT INTEGER, CHECKSUM VARCHAR2(50), EXECUTED_AT VARCHAR2(20), SUCCEEDED INTEGER); CREATE TABLE EMPLOYEES(ID IDENTITY NOT NULL,NAME VARCHAR(20),TITLE VARCHAR(20),SALARY DOUBLE,NI INTEGER NOT NULL) My unitils properties file # comments documenting these unitils configuration properties removed for # brevity. look for commenting in unitils-default.properties in the root of the # unitils jar if needed. unitils.modules=database,dbunit,easymock,inject unitils.module.hibernate.enabled=false unitils.module.spring.enabled=false # these placeholders are set in avaje.properties #gere la configuration DBUNIT database.driverClassName=org.hsqldb.jdbcDriver database.url=jdbc:hsqldb:mem:unitils-example database.schemaNames=PUBLIC database.userName=SA database.password= database.dialect=hsqldb # unitils will construct the test database using the ddl file found in this # directory dbMaintainer.fileScriptSource.scripts.location=src/main/resources updateDataBaseSchema.enabled=true sequenceUpdater.sequencevalue.lowestacceptable=100 dataSetStructureGenerator.xsd.dirName=src/test/resources/dataset-schema #dbMaintainer.autoCreateExecutedScriptsTable property to true

    Read the article

  • New college grad, psychology major, wants to code professionally. Should I get Sun Java-certified?

    - by Anita
    I just graduated from a fairly well-known liberal arts college in May. Interestingly, I majored in psychology, with a concentration in social psychology. In college I took Intro to Computer Science and hated it (used to blame it on myself; now I blame it on the professor :) However, I've always wanted to be a programmer, and finally got my wish by getting hired by a company that was willing to let me learn coding from scratch in exchange for low pay. Well, what do you know, I just got laid off this morning, and need a new job by November to pay the bills. I loved the coding part of my job at the company, and managed to learn enough Java to feel competent in the job and curious to learn more. I think my goal now is to become a professional programmer. I still know very little (never used Swing, for example) but nothing that a good book can't fix. That's the background anyway; sorry for the rambling - I'm still in shock from the layoff :( It seems to me the quickest way to get noticed by companies, without a CS degree, is by getting certification. I'm halfway through studying for the SCJP and can probably sit for an exam in a week or two. Am I right in my assumption that certs will help in my case? And in general, do I have a bat's chance in hell of making it against formally trained programmers? My assets are really just raw intelligence and intense curiosity; well, maybe a love for problem-solving too. Thanks all - feel free to edit/tag the post!

    Read the article

  • What techniques would you use for a next generation java web application?

    - by jakob
    I'm working at a site similar to Foursquare and Yelp, with approximately 100000 unique requests each week that generates content, growing steadily. We are currently using: Seam as Java web framework. MySQL as DB Hibernate as ORM Hibernate Search as Index EhCache for Caching. Since our site is slowly growing out of the current setup and has a lot of legacy code, it is time for us to start thinking about a major refactoring/changing setup. Web framework We are not ready to change the language but we are leaning towards Spring Web Framework, since: Seam is no more. Almost all of us have worked with Spring and liked it. DB and ORM We have done a little research and we are thinking about MongoDB. Index Do we need to have a separate Index if we use MongoDB? Cache ? So my question is basically: If you take Spring Web Framework and MongoDB into consideration, how would a good setup be for a web application that is growing and handles a lot of logged in users generating input and performing searches?

    Read the article

  • Is it customary to write Java domain objects / data transfer objects with public member variables on mobile platforms?

    - by Sean Mickey
    We performed a code review recently of mobile application Java code that was developed by an outside contractor and noticed that all of the domain objects / data transfer objects are written in this style: public class Category { public String name; public int id; public String description; public int parentId; } public class EmergencyContact { public long id; public RelationshipType relationshipType; public String medicalProviderType; public Contact contact; public String otherPhone; public String notes; public PersonName personName; } Of course, these members are then accessed directly everywhere else in the code. When we asked about this, the developers told us that this is a customary performance enhancement design pattern that is used on mobile platforms, because mobile devices are resource-limited environments. It doesn't seem to make sense; accessing private members via public getters/setters doesn't seem like it could add much overhead. And the added benefits of encapsulation seem to outweigh the benefits of this coding style. Is this generally true? Is this something that is normally done on mobile platforms for the reasons given above? All feedback welcome and appreciated -

    Read the article

  • What is the difference between Callback<T> and Java 8's Supplier<T>?

    - by Dan Pantry
    I've been switching over to Java from C# after some recommendations from some over at CodeReview. So, when I was looking into LWJGL, one thing I remembered was that every call to Display must be executed on the same thread that the Display.create() method was invoked on. Remembering this, I whipped up a class that looks a bit like this. public class LwjglDisplayWindow implements DisplayWindow { private final static int TargetFramesPerSecond = 60; private final Scheduler _scheduler; public LwjglDisplayWindow(Scheduler displayScheduler, DisplayMode displayMode) throws LWJGLException { _scheduler = displayScheduler; Display.setDisplayMode(displayMode); Display.create(); } public void dispose() { Display.destroy(); } @Override public int getTargetFramesPerSecond() { return TargetFramesPerSecond; } @Override public Future<Boolean> isClosed() { return _scheduler.schedule(() -> Display.isCloseRequested()); } } While writing this class you'll notice that I created a method called isClosed() that returns a Future<Boolean>. This dispatches a function to my Scheduler interface (which is nothing more than a wrapper around an ScheduledExecutorService. While writing the schedule method on the Scheduler I noticed that I could either use a Supplier<T> argument or a Callable<T> argument to represent the function that is passed in. ScheduledExecutorService didn't contain an override for Supplier<T> but I noticed that the lambda expression () -> Display.isCloseRequested() is actually type compatible with both Callable<bool> and Supplier<bool>. My question is, is there a difference between those two, semantically or otherwise - and if so, what is it, so I can adhere to it?

    Read the article

  • android app unable to connect to the hsqldb server

    - by Chinta
    I am trying to connect my android app to the hsql db server. Server runs on computer-1. I can connect to the db server from local machine through java as well as Db-visualizer. I can connect to the db server from another computer(computer-2) using Db-visualizer with comouter-1 ip address. Now trying to connect from my app in Nexus 7 the same way I was connecting from computer-2. I am getting "No Suitable Driver" error. Below is the log. 11-02 12:01:41.235: W/System.err(9803): connection string <jdbc:hsqldb:hsql://192.168.2.6:9001/qBank> 11-02 12:01:41.235: W/System.err(9803): user id string <SA> 11-02 12:01:41.235: W/System.err(9803): password string <> 11-02 12:01:41.235: W/System.err(9803): ERROR: failed to get connection. 11-02 12:01:41.235: W/System.err(9803): java.sql.SQLException: No suitable driver 11-02 12:01:41.235: W/System.err(9803): at java.sql.DriverManager.getConnection(DriverManager.java:186) 11-02 12:01:41.235: W/System.err(9803): at java.sql.DriverManager.getConnection(DriverManager.java:213) 11-02 12:01:41.235: W/System.err(9803): at com.scan.util.GatherData.getConnection(GatherData.java:135)

    Read the article

  • Why is Javascript used in MongoDB and CouchDB instead of other languages such as Java, C++?

    - by startup007
    I asked this question on SO but was suggested to try here. So here it goes: My understanding of Javascript so far has been that it is a client-side language that capture events and makes a web-page dynamic. But on reading the comparison between MongoDB and CouchDB I noticed that both are using Javascript. This makes me wonder the reason behind the choice of JavaScript over other conventional languages. I guess I am trying to understand the role of JavaScript and its advantages over other languages. Update: I am not asking about the languages / drivers supported by the two databases. The comparison says: Both CouchDB and MongoDB make use of Javascript. CouchDB uses Javascript extensively including in the building of views. MongoDB also supports running arbitrary javascript functions server-side and uses javascript for map/reduce operations. My lack of understanding pertains to why is Javascript being used at all for the backend work. Why is it preferred for building views in CouchDB, or for using map/reduce operations? Why C/C++ or Java were not used? What are the advantages in using Javascript for such back-end work?

    Read the article

  • From Oracle PL/SQL Developer to Java programmer - Is it a good decision? [on hold]

    - by user3554231
    I will explain my question in simple words. I have little over 1 year experience in Oracle. My dream is to be "called" as a 'Developer', be it database developer if not software developer. But right now I don't develop anything neither I am in good touch with PL/SQL and other Oracle Utilites like SQL*LOADER, shell scripting and stuff like that as I am only a System Analyst where I analyze and configure database using SQL queries. To be honest, I know very basic PL/SQL and good knowledge in SQL but that won't ever give me a chance to be a developer as I am lagging way behind the "real" developers knowledge. Now I feel I should learn JAVA as well so that I can cope up with the competition. But I am too scared to learn new things as it will take much more time which will indirectly increase my useless work experince(just analyzing) which values nothing in todays market. Moreover that, I am too lazy to work hard i.e. to study and not to work during office hours. To sum it up I am lazy and confused and scared but I want to learn things as well but don't know if I am intelligent enough to learn whole of PL/SQL or to master any other language. Is there any other way from which I can feel confident? Actually I even feel sometimes that after 2-3 years if I still don't achieve my goal, I won't ever be able to reach my destination. I just want to live my dream of being a developer. Give me some tips and hopes but not false hopes.

    Read the article

  • How can I remove duplicate icons for "launched" java programs in the launcher?

    - by Tim
    When launching java programs (like IntelliJ IDEA and Crashplan) in Natty's Unity launcher, duplicate icons are shown (see image). For IntelliJ I created the .desktop file, for Crashplan the .desktop file is supplied with the application. Is there something that can be changed in the .desktop files (or somewhere else) that can prevent this from occurring? I couldn't find a bug report for unity itself but programs like Gnome-Do/Docky have bug reports and had to make internal changes to their applications to prevent this. In this image the 1st icon is the one created from the .desktop file and the second icon is after launching it. Second icon disappears when closing the application. Custom IntelliJ .desktop file #!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon[en_US]=/opt/idea/bin/idea128.png Name[en_US]=IntelliJ IDEA Exec=/opt/idea/bin/idea.sh Name=IntelliJ IDEA Icon=/opt/idea/bin/idea128.png StartupNotify=true Crashplan provide .desktop file [Desktop Entry] Version=1.0 Encoding=UTF-8 Name=CrashPlan Categories=; Comment=CrashPlan Desktop UI Comment[en_CA]=CrashPlan Desktop UI Exec=/usr/local/crashplan/bin/CrashPlanDesktop Icon=/usr/local/crashplan/skin/icon_app_64x64.png Hidden=false Terminal=false Type=Application GenericName[en_CA]=

    Read the article

  • Why do arrays in java choose the biggest? [closed]

    - by Trycon
    I'm new to java so I was reading my book with these code: public class mainb1 { public static void main (String[] args) { //datatype name = expression; //food int min, max; int num[] = new int[10]; num[0]=99; num[1]=90; num[2]=-100; num[3]=100; num[4]=23; num[5]=50; num[6]=123; num[7]=3123; num[8]=2; num[9]=923; min=max=num[1]; for(int x=0;x<10;x++) { if(num[x]<min)min=num[x]; if(num[x]>max)max=num[x]; } System.out.println("Min: "+min+" max: "+max); } } It chose the biggest and the smallest. I don't get it if max was 99, then the last one that is lesser than min is 2? How did this array choose to pick the smallest and the biggest? Can someone explain?

    Read the article

  • JavaOne SF??????????????!&????????

    - by OTN-J Master
    JavaOne 2012 San Francisco????????????????????????!??????????????????????????????????????????????????Java??????????????????????????? ??????????? JavaOne??????????????????YouTube?Java Channel?”JavaOne playlist”??????? ????? ???? ????????????????Oracle Media Network?”JavaOne 2012 channel”???????(??????·??????????????) ????????·?????/BOF/???????? ??????????????????????????JavaOne????????JavaOne Content Catalog??????????????????????????(???)??????????????????”Media”?????????????????????????????????????????????????? ??? ???????? ??? JavaOne???????????????????Oracle Days????????? ? ?????????????? ????????????????????????????????? 2012? Java????????? ??: 10?31?(?) 15:00-15:45??: ??????????? ????????1-4-1(????????????) ??:2012 ? 4 ? ????7?????? JavaOne ????? Java ????????????????????????????????? ???JavaOne 2012 ?????? Java ?????????????????????????????????????????? Java ??????????????????????????? ??: ??????????Fusion Middleware???? ????????????? Java?????????? ??  

    Read the article

  • Machine learning challenge: diagnosing program in java/groovy (datamining, machine learning)

    - by Registered User
    Hi All! I'm planning to develop program in Java which will provide diagnosis. The data set is divided into two parts one for training and the other for testing. My program should learn to classify from the training data (BTW which contain answer for 30 questions each in new column, each record in new line the last column will be diagnosis 0 or 1, in the testing part of data diagnosis column will be empty - data set contain about 1000 records) and then make predictions in testing part of data :/ I've never done anything similar so I'll appreciate any advice or information about solution to similar problem. I was thinking about Java Machine Learning Library or Java Data Mining Package but I'm not sure if it's right direction... ? and I'm still not sure how to tackle this challenge... Please advise. All the best!

    Read the article

  • Java 2D Game Frameworks

    - by Software Monkey
    I have been looking at frameworks for writing 2D games in Java - part of a growing desire to rediscover my roots in writing those simple but addictive video games. I have googled and found some possibilities, but it's hard to judge which is best without investing significant time in each. Does anyone out there have any recommendations from experience, preferably with a list of pro's and con's for the framework. NOTE: I am not looking so much for comparisons between frameworks but, rather, feedback on any given framework from actually having used it firsthand, or knowing someone who has. The other possibility I am considering is rolling my own, but would rather not. EDIT: I am targeting Java on the Desktop, and expect capable machines, though not state of the art. Some of the 2D engines I have found: Free PulpCore (License: BSD) Slick2D (License: BSD) GTGE - Golden T Game Engine JGame GAGE - Genuine Advantage Gaming Engine GameFrame for Java Basilisk (2D and 3D) Free for non-commercial use Genuts EasyWay - a high-level 2D engine

    Read the article

  • Open payment gateway libraries for Java, Python, Ruby, and PHP

    - by Tauren
    I'm looking for generic and open source payment libraries that support many different payment processor APIs. In other words, I'd like to develop an application using a single payment processing API, but be able to easily switch between payment gateways, such as Authorize.Net, Payflow Pro, Braintree, PayPal, Google, Amazon, etc. This question gives some Java solutions, but the suggestions all look horrible. Isn't there anything more like ActiveMerchant for Java? I really need a good Java solution, to the point of building my own if necessary. But I don't want to reinvent the wheel if it exists. Are there any solutions for Python or PHP? Ideally, I'd like to find something similar to Ruby's ActiveMerchant, which looks exceptionally complete. Are there any other Ruby solutions?

    Read the article

  • Java ThreadPoolExecutor getting stuck while using ArrayBlockingQueue

    - by Ravi Rao
    Hi, I'm working on some application and using ThreadPoolExecutor for handling various tasks. ThreadPoolExecutor is getting stuck after some duration. To simulate this in a simpler environment, I've written a simple code where I'm able to simulate the issue. import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.RejectedExecutionHandler; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class MyThreadPoolExecutor { private int poolSize = 10; private int maxPoolSize = 50; private long keepAliveTime = 10; private ThreadPoolExecutor threadPool = null; private final ArrayBlockingQueue&lt;Runnable&gt; queue = new ArrayBlockingQueue&lt;Runnable&gt;( 100000); public MyThreadPoolExecutor() { threadPool = new ThreadPoolExecutor(poolSize, maxPoolSize, keepAliveTime, TimeUnit.SECONDS, queue); threadPool.setRejectedExecutionHandler(new RejectedExecutionHandler() { @Override public void rejectedExecution(Runnable runnable, ThreadPoolExecutor threadPoolExecutor) { System.out .println(&quot;Execution rejected. Please try restarting the application.&quot;); } }); } public void runTask(Runnable task) { threadPool.execute(task); } public void shutDown() { threadPool.shutdownNow(); } public ThreadPoolExecutor getThreadPool() { return threadPool; } public void setThreadPool(ThreadPoolExecutor threadPool) { this.threadPool = threadPool; } public static void main(String[] args) { MyThreadPoolExecutor mtpe = new MyThreadPoolExecutor(); for (int i = 0; i &lt; 1000; i++) { final int j = i; mtpe.runTask(new Runnable() { @Override public void run() { System.out.println(j); } }); } } } Try executing this code a few times. It normally print outs the number on console and when all threads end, it exists. But at times, it finished all task and then is not getting terminated. The thread dump is as follows: MyThreadPoolExecutor [Java Application] MyThreadPoolExecutor at localhost:2619 (Suspended) Daemon System Thread [Attach Listener] (Suspended) Daemon System Thread [Signal Dispatcher] (Suspended) Daemon System Thread [Finalizer] (Suspended) Object.wait(long) line: not available [native method] ReferenceQueue&lt;T&gt;.remove(long) line: not available ReferenceQueue&lt;T&gt;.remove() line: not available Finalizer$FinalizerThread.run() line: not available Daemon System Thread [Reference Handler] (Suspended) Object.wait(long) line: not available [native method] Reference$Lock(Object).wait() line: 485 Reference$ReferenceHandler.run() line: not available Thread [pool-1-thread-1] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [pool-1-thread-2] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [pool-1-thread-3] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [pool-1-thread-4] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [pool-1-thread-6] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [pool-1-thread-8] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [pool-1-thread-5] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [pool-1-thread-10] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [pool-1-thread-9] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [pool-1-thread-7] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: not available AbstractQueuedSynchronizer$ConditionObject.await() line: not available ArrayBlockingQueue&lt;E&gt;.take() line: not available ThreadPoolExecutor.getTask() line: not available ThreadPoolExecutor$Worker.run() line: not available Thread.run() line: not available Thread [DestroyJavaVM] (Suspended) C:\Program Files\Java\jre1.6.0_07\bin\javaw.exe (Jun 17, 2010 10:42:33 AM) In my actual application,ThreadPoolExecutor threads go in this state and then it stops responding. Regards, Ravi Rao

    Read the article

  • Java Media Framework always generating multicast packets with TTL=1

    - by Liam
    I need to generate a G711 multicast audio stream, and came across the AVTransmit2 sample as part of the Java Media Framework. Fundementally this works, however the multicast packets all have TTL set to 1. I found some documentation that suggested the SessionAddress could specify a TTL value, so I've tried changing that i.e. destAddr = new SessionAddress( ipAddr, port, 255); I also found some comments that the problems might be due to java defaulting to IPv6, so I've tried to force it to ipv4 by starting it like this: java -Djava.net.preferIPv4Stack=true -classpath "." AVTransmit2 javasound://8000 239.1.10.65 20480 However looking in wireshark, the packets still have TTL=1 I'm using JMF2.1.1e Any suggestions how to resolve this?

    Read the article

  • How to throttle login attemps in Java webapp?

    - by Jörn Zaefferer
    I want to implement an efficient mechanism to throttle login attemps in my Java web application, to prevent brute-force attacks on user accounts. Jeff explained the why, but not the how. Simon Willison showed an implementation in Python for Django: That doesn't really help me along as I can't use memcached nor Django. Porting his ideas from scratch doesn't seem like a great either - I don't want to reinvent the wheel. I found one Java implementation, though it seems rather naiive: Instead of a LRU cache, it just clears all entries after 15 minutes. EHCache could be an alternative for memcached, but I don't have any experience with it and don't really want to intoduce yet another technology if there are better alternatives for this task. So, whats a good way to implement login throttling in Java?

    Read the article

  • java enterprise project

    - by darko petreski
    Hi All, All the time we are hearing that java is enterprise. We have read many books about jpa, entity beans and other stuff. All this books explain this technology with some dummy examples. I have not seen a book that explains real problems with enterprise beans, java clients and security! I mean real book not some imaginated stupid examples . Is there any book that describes completely some enterprise system, Its architecture, communication, security, of course the client that uses the distributed components ? I need a book that will cover the flowing: server side components (ejb, jpa) client side java desktop application security (authentication and authorization) web services with complete authentication clustering (we can find for all of this a book, but there is no book that covers all this things in one piece. Also all the books are with dummy samples.) Or may be some project that is documented. Regards, Darko

    Read the article

  • Java Classpath Problems in Ubuntu

    - by Travis
    First off I'm running Ubuntu 9.10 I've edited the /etc/environment file to look like this: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.20" CLASSPATH="/home/travis/freetts/lib/freetts.jar:/home/travis/freetts/lib/jsapi.jar:." I then run "source /etc/environment" to make sure the changes are included. Then I try compiling my simple test program using this: javac Test.java It throws out a few errors, but when I compile like this: javac -cp /home/travis/freetts/lib/freetts.jar:/home/travis/freetts/lib/jsapi.jar:. Test.java It works just fine, this leads me to believe that for some reason javac isn't seeing the CLASSPATH environment variable? I can echo it and everything in the terminal: echo $CLASSPATH gives me what I put in. Any help on this would be greatly appreciated.

    Read the article

  • Voice transmission over LAN using java?

    - by Ala ABUDEEB
    Hello I'm building a java application which works in a LAN environment, every computer on that LAN have this application installed on it, at some point i need this application to transfer voice simultaneously to all computer over the LAN (voice broadcasting) according to the following mechanism: Only one computer of the LAN can send voice using a microphone(the administrator) All computers receive that voice simultaneously (of course using my application) The voice should be recorded on the administrator computer after finishing the session. Could anyone give me an idea of how to use java in working with voice transmission? What java library can help me do that? Please help, thank you

    Read the article

  • What is a good Java crawler library?

    - by DrDee
    Hi, I am about to develop a crawler in Java but don't feel like reinventing the wheel. A quick Google search gives a whole bunch of Java libraries to build a web crawler. Besides that Nutch is of course a very robust package but seems a bit too advanced for my needs. I only need to crawl a handful websites a week containing a couple of 1000 pages each. Which open source Java library would you recommend considering: speed multithreading (or even distributed) extending it with new functionality active maintained and documentation?

    Read the article

  • Task queue java

    - by user268515
    Hi i'm new to Task queue java API i tried a simple Example for it. My idea is to redirect the queue file to a servlet and to print some statement in the servlet.But it doesn't work. i mapped web.xml and used default queue I didnt get any Error but the file is not redirected to servlet . this is the codee i followed taskq.java public class taskq extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp)throwsIOException { Queue queue = QueueFactory.getDefaultQueue(); System.out.println("taskqueue"); queue.add(url("/worker")); } worker.java public class worker extends HttpServlet { private static final long serialVersionUID = 1L; public String s; public void doGet(HttpServletRequest req, HttpServletResponse resp)throws IOException { String s="crimsom"; System.out.println(s); } } Please Help me on this issue. Regards Sharun.

    Read the article

  • MVC in a Google App Engine Java world

    - by thatismatt
    I'm coming to Java from C# & ASP.NET MVC, I'd love to find an equivalent in the Java world that I could use on the Google App Engine. I've already started to have a play with FreeMarker and even made the first steps towards writing a very simple framework. Ideally I wouldn't have to do all the hard work though, someone must have done this already! So my question is - what frameworks are there out there that would be familiar for me coming from ASP.NET MVC and I could use them on Google App Engine for Java. The key things I'd want are: Simple Routing - /products/view/1 gets mapped to the view action of the products controller with the productid of 1 Template Engine - some way of easily passing 'ViewData' to the view, and from the view easily accessing it, ideally I'd love to avoid anything that is too XMLy (thus why I like FreeMarker).

    Read the article

  • Web Service Client Java

    - by zeckk
    I generated java web service client from here -- http://api.search.live.net/search.wsdl.. I want to make search and listing the return values. How i can show result ? my code is : import java.rmi.RemoteException; import com.microsoft.schemas.LiveSearch._2008._03.Search.*; public class searchtry { public static void main(String[] args) throws RemoteException { LiveSearchPortTypeProxy client=new LiveSearchPortTypeProxy(); SearchRequest request=new SearchRequest(); SearchRequestType1 type1=new SearchRequestType1(); sorgu.setAppId("*****************"); //Windows Live gave this id for using that service sorgu.setSources(new SourceType[]{SourceType.Web}); sorgu.setQuery("Java"); aratip.setParameters(request); SearchResponseType0 answer= client.search(type1); System.out.println(answer.toString()); }

    Read the article

< Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >