Science topic

Java Programming - Science topic

Java programming and java programmers
Questions related to Java Programming
  • asked a question related to Java Programming
Question
12 answers
Uncontrolled development of AI - artificial intelligence is a very dangerous thing!
👉 Dangerous to humanity, really, I say that as a person from the IT sector, as someone who spent the first half of his life (39 years) well, the last 25, spent in IT, passed all levels of formal education, passed university teaching positions... etc. .
To learn robots write and walk, and not our children, or gave them smartphones instead of time in nature? So sad ... and most people doesn't have time really?!
‼️ I think most people are not aware...
• One does not need to be overly intelligent to see what is happening, that we need to react and slow down or indeed put a moratorium on the uncontrolled (I will add insane) development of AI.
Of course, such development (if it is development at all?!) humanity does not need, except for those with a bad ultimate intention for all of us as a human species.
Imagine if, as a side effect of all this, it would be the "end of the world", and we would then call ourselves the most intelligent beings on Earth? We!? 😡
"Should we allow machines to flood our information channels with propaganda and untruths? Let chaos ensue.
Should we automate all jobs, including those that fill people's lives with meaning?
Should we develop non-human minds that could eventually outnumber, outsmart, outdate and replace us?
Should we risk losing control of our civilization?
👉 The letter has so far been signed by more than 27,500 people, including the author of several bestsellers such as Sapiens Yuval Noah Harari, Apple co-founder Steve Wozniak, Skype co-founder Jaan Tallinn and numerous artificial intelligence researchers such as Stuart Russell, Yoshua Bengio, Gary Marcus and Emad Mostaque." IndexHr
‼️ Personally, I would sign this letter and topics without thinking, because we are not even aware that at some point even that will be impossible.
👉 This is not a conspiracy theory, these are the facts today!
Also, take part in discusion and thank you. 🙏
💕 Let's think about the future in time, please. 🙏
Relevant answer
Answer
Mr Duodu, thank you.
Also, mr Amin, can I kindly ask you not to leave URL and ypur email after every comment of yours, its not professional, really.
  • asked a question related to Java Programming
Question
10 answers
I'm trying to write a java programme that will solve the system of ordinary differential equations using the Runge-Kutta fourth-order (RK4) technique. I need to solve a system of five equations. Those are not linear.
And determining all of the equilibrium solutions to this system of differential equations also requires.
Can someone help me? Thank you in advance.
Relevant answer
Answer
Hereby attached is a system of three Ordinary Differential Equations (ODE). We have to use numerical methods such as RK4 and Euler to obtain the results using Java. I think RK4 is better for this kind of problem. In this thread, Dudley J Benton has already mentioned C programming for this. It is really amazing.
For the parameter values, you can use your own values for your convenience.
  • asked a question related to Java Programming
Question
27 answers
I've been using Eclipse rather than netbeans, but with so many development for desktop programming some of my friend prefer to use netbeans.
Based on your experience what software do you use to teach java and what is the great thing about it?
Relevant answer
Answer
JCreator, BlueJ, NetBeans etc
  • asked a question related to Java Programming
  • asked a question related to Java Programming
Question
3 answers
Hello,
I'm currently enrolled in my last M.S. Renewable Energies & Intelligent Networks trimester before I need to work on my master thesis. My prior degree is a B.E. in Applied Computer & Communication Technology (focus: Software Engineering) and an A.S. in Computer Engineering Technology. I'm looking for some master thesis topic suggestions in the area of Smart Grids which would ideally prepare me for (an engineering) remote job in the field. We had to take a class called automation which covered some topics about smart grids and we had to program using PLC and I enjoyed it. As I'm unfamiliar with all of the smart grid topics that would lead to my goal, I would like your opinions about suitable topics for my master thesis. Btw: Assuming that most remote jobs are probably programming related, I have to note that while I've had a lot of java programming classes, I'm not very interested in it but would prefer PLC, C, Embedded Systems or similar.
There is also a project we need to work on which can be part of our master thesis. For this topic, I would like to connect a few electrical devices (loads and generators) in an electrical circuit and create a program algorithm which decides when to store energy in a battery, when to switch off electrical devices or when to feed back excessive energy to the grid. I'd also welcome some ideas for that.
Finally, I'm wondering which types of remote jobs exist for engineers that are not software engineering?
Thank you.
Relevant answer
Answer
(1) Connecting building, building-integrated renewables and waste energy and mobility sectors. Think beyond e-cars, e.g. commercial micromobility docks, or even public transport on larger scale.
(2) Design commercial entities that are like ESCO-s for the carbon market. The upcoming ETS expansion will include buildings and mobility fuels, dig into how it works and come up with a model that can reap the benefits.
(3) Thermal smart grids, 5th generation district heating/cooling microgrids.
(3) Pogram energy communities, which can have a los of use-cases (For more info:
  • asked a question related to Java Programming
Question
5 answers
In my b.tech course i solved few civil engineering problems by using c-language. for example calculation of bending moments, matrix multiplecations, hydrographs etc. like wise apart from these simple programs is there any complex programs that we can write by using java programming for civil engineering or structural engineering problesm?
Relevant answer
Answer
Intresting questions
  • asked a question related to Java Programming
Question
8 answers
Hi,
I want to prioritize test cases using CI, I need to generate test cases for a simple java programme, Please suggest me the easiest way to generate test cases.
Relevant answer
Answer
I recommend the previous answer Kapila Asanga Dias but handwritten test cases can't really be replaced if you want to trust your suite of tests.
Especially if it is a small Java program, I'd recommend adding some handwritten tests using JUnit etc.
  • asked a question related to Java Programming
Question
3 answers
I am critiquing a paper that has done a case study of 5 systems (4 of them in java) and their domains are: embedded systems (2 of them), IDE (Netbeans), and whatever JRefractory is, some sort of code editing utility. I was wondering if these are representative of the most common use cases for java programs, and if not, if I could find proof for it and link a source. It would be an issue since the generalizability of the findings would be weaker. I always felt like java was the most often used for simple applications and games, as well as commercial suites for institutions like banks and insurance companies and a back-end to web apps, but I might be wrong. I don't know exactly how to research something that is seemingly so simple, and whatever search terms I use give me very cluttered and useless search results.
I'm very new at researching and writing papers so I hope this isn't a bad question
Relevant answer
Answer
There is a difference between low-end and high-end applications development. Therefore, while numerous people would likely use a given language for simple applications at less demanding skill levels, larger companies may demand expert level knowledge. A job advert would make that very clear. There are many job advertising sites out there, many of which require sign-on privileges. Jobs are listed by category. IMHO that would be a most useful way to tackle your question.
  • asked a question related to Java Programming
Question
3 answers
send the some IEEE papers for radio frequency and microwave design using interactive simulation using java applet program.
Relevant answer
Answer
Nowadays, It is rarely used of Java applets, an alternative for them is Java Servlet.
Servlets are placed into JAVAEE stack as an standard.
  • asked a question related to Java Programming
Question
8 answers
I’m trying to implement semantic similarity based on Normalized Google Distance and i have many problems to obtain correct data. I tried to simulate browser, get data via Google API (PHP, Java, R, Google Docs) and every time i had different results. Is there any proper way to get accurate and current data?
Relevant answer
Answer
1) They do not provide in their API the same results as in Google Live.
2) The results are just an estimate of the total. If you navigate through the results pages you will see that for some queries there are actually less results than the number they show you.
3) Another point is that it is very difficult to compute NGD, you can check this thesis (chapter 4 (also 3)) as an alternative (method CBM): http://www.dbd.puc-rio.br/pergamum/tesesabertas/1012681_2014_completo.pdf
  • asked a question related to Java Programming
Question
7 answers
I'm looking for toy system dynamics models that have been translated into Java. Thanks for your support. Best, Lukas
Relevant answer
Answer
Thanks for the update Sotiris. Curious to see your results referring the application of XCS on a small system dynamics model. Cheers, Lukas
  • asked a question related to Java Programming
Question
3 answers
I am new in the field of speech signal processing. Given a speech signal,. wav file consisting of single utterance, how can fundamental frequency is determined. I am usin Java programming language. Please suggest a book or online article to read further
  • asked a question related to Java Programming
Question
4 answers
We are launching a new application for international market. There would be slight changes based on the country in terms of the dynamic content from web-services. We are confused whether we should go with application for all countries which will be customized based on user country selection or multiple apps with respect to countries.
I would really appreciate an intellectual and best help from the expert.
Relevant answer
Answer
Creating multiple applications to handle language and cultural variations would result in a maintenance nightmare. Your application future would have a very short horizon as success will demand more applications which require more maintenance which eats up your developer time leaving nothing for new features. The calculus is simple. All credible development environments will provide language independence and the ability to control page navigation based on a language key that you can read from your users web or device profile.
On the other hand, if you are considering a web application I would avoid a generic mobile development environment unless you plan to go beyond the 98% of the market held by Apple and Android. In discussing this with vendors of such systems, they universally have agreed that unless you are looking to support a range of platforms beyond just Apple and Android you'd be better of writing two applications. These systems were conceived to write applications to support Apple, Android, Blackberry, Windows Phone, Windows Universal, etc. The problem is that there are only two vendors left standing after the phone wars. The overhead of working in a generic solution saturated with "if apple then do this" and "if android then to this" will add about 50% to your code and still curtail your ability to take full advantage of the device. This is a reasonable compromise if you are supporting 5 targets, but not for just 2.
You might want to consider coding your application in either Android or Apple depending on your target market and then outsourcing the other. Outsourcing can have challenges, but this represents the simplest case. Given the Android/Apple code create the Apple/Android code to do the identical thing taking advantage of best practices for the second device. The core logic will be the same and it will be easy to QA.
  • asked a question related to Java Programming
Question
5 answers
I have a java program that want to send and receive data from MAtlab model. I would like to synchronize between them. when the java program find the optimal values; it should send them to the simulink model to see how it behave and this should be done for 96 data.
Thank you;
FZ Harmouch
Relevant answer
Answer
Hi , Matlab provides built-in support for execution of Java methods,
instantiation of Java objects, access to fields, catching exceptions,
and more. Data type conversion of method parameters
passed from M to Java and of primitive types passed
from Java to M is done implicitly. Conversion of arrays and
strings passed from Java to M must be done explicitly by
means of conversion functions 
Good Luck 
  • asked a question related to Java Programming
Question
2 answers
1) I need to extract the movie genre from dbpedia with Sparql, can anyone provide me with links or materials on this code?
2) I want a user- feature matrix  with genre as data points (18) and users as observations (6040). I need the procedure to get this done. Relevant links and documents will be appreciated.
Thks
Relevant answer
Answer
1) EXAMPLE
movie x genre 
SELECT * WHERE {
}
EXAMPLE
movie x genre for all italian movies:
SELECT * WHERE {
}
2) In Java? A 2-dim. array of Genre objects?
  • asked a question related to Java Programming
Question
3 answers
can anyone please guide me to obtain the code, and also suggest that DET-ABE API can be used to implement KP-ABE
Relevant answer
Answer
I already read this paper sir, also gone through the API. but this API is for CP-ABE and i want to develop KP-ABE
  • asked a question related to Java Programming
Question
3 answers
Machine learning 
Relevant answer
Answer
Hi 
I think you can find more info if you follow this question
Also, this paper will give you some interesting information
  • asked a question related to Java Programming
Question
3 answers
data security in cloud
java programming in cloud computing execution in free cloud
Relevant answer
Answer
Wannacry and ransomware attacks have made security first priority.
  • asked a question related to Java Programming
Question
1 answer
For establishing IOT concept, Sensors data are processed in MATLAB, I need to feed run-time (dynamic) data from MATLAB to google excel sheet. Kindly, suggest me some of the options. 
Relevant answer
Answer
You can use goodle script as server for recieve data from matlab through Internet (eg HTTP request) and posting recieved data to google spreadsheet
for addind data from google script to table you can use code as:
var sheet = SpreadsheetApp.openById("FILE_ID"); //Открытие таблицы с ID
var n=sheet.getLastRow()+1; // last+1 row
var d = new Date(); // eg add current time
sheet.getRange("A"+n).setValue(d); // In (A,n) set d
  • asked a question related to Java Programming
Question
1 answer
I am interested in storing my directory (LDAP Server) in a relational database engine, such as MySQL or Oracle, how can one install iODBC2 for database backend support.
Relevant answer
Answer
OpenLDAP server has an abstraction layer for its database back end, allowing it to be replaced to handle not only different databses, but synthetic directory operations such as proxying, redirection, and filtering.   There are many available back ends, one of them is back-sql which, as the name implies, will translate LDAP queries into SQL so you can use MySQL or MSSQL to persist the directory.   Depending on the platform, and back end database, you will find how-tos on the web detailing how to build an OpenLDAP server fronting a SQL database.
-- Bob
  • asked a question related to Java Programming
Question
42 answers
For many years C++ has been the dominating language to start with.  Recently Python is getting an edge over C++ and Java as the most popular programming language.  Is it a good idea to switch to Python as a start instead of C++?
Relevant answer
Answer
I think it's a good idea, because as bloody beginner there is no benefit in learning most of the features of C++. In my opinion C is preferrable to C++ and Python is preferrable to C.
It is frustrating to learn things like pointers, references, headers, compiling stuff etc. and their sense theoretically without understanding in practice why we really need them.
Concluding, I think it makes more sense to get started with some simple and funny programming instead of hard work.
  • asked a question related to Java Programming
Question
3 answers
I am trying to learn DL with an example.However, running the following code (attached in image) results in an error :
Undefined function 'categories' for input arguments of type 'double'.
I understand that categories in the original example is string based labels. But mine is int values. Not sure why it isn't working. Kindly help
Relevant answer
Answer
in your case looks like the variable is double, so you can use unique() instead of categories(), another way to do this is to convert the double array to a cell array of strings and then use categories() on it e.g.
a1=[1,2,3]'
unique(a1)
%%% OR
categories(categorical(cellstr(num2str(a1))))
  • asked a question related to Java Programming
Question
2 answers
Hi,
I want to develop a system that detects the emotions with various sensors. One of them is an IR+RGB camera. I'm looking for an API that give me differents emotions from the face.
Does anyone know where to find some one free?
Thanks in advance!
Relevant answer
Answer
Hi Yeshe,
I was looking for an offline software. If I'm not wrong, microsoft's software send calls to obtain the emotion data. The free version has limitations:
Images: 30K calls per month
Video (uploads): 300 per month
Video (query status): 3000 per month
But thanks for the help!
  • asked a question related to Java Programming
Question
9 answers
What programming language Should I use? I need the code which execute this results?
web service, response time, hmm model
Relevant answer
Answer
I think scala is fastest in distributed computations.
  • asked a question related to Java Programming
Question
16 answers
Hi, i there anyone to help me to explain the implementation of LBP here i am attaching one sample image. i need how the feature are extracted from that image.
Relevant answer
Answer
Thank you, Saimunur. 
  • asked a question related to Java Programming
Question
3 answers
Dear all!
I am looking for sample projects to be able to verify my master's thesis project.
I would like to give a brief information related to the project. In this project, I am aiming to display the UML model and source code in a synchronized of way. For example, you are creating a UML model for your project by using OctoUML tool (https://github.com/Imarcus/OctoUML) and you can view the source code in a bubble form like Code Bubbles project (http://cs.brown.edu/~spr/codebubbles/) by just clicking one of the classes on the model.
Additionally, you can modify the source code, which was shown inside the bubble, and the UML model will be updated automatically or vice versa.
Right now, I am making some tests to be able to perform matching between a UML model and an existing source code. However, I could find few Java projects which contain UML models so I would be so glad if I could have more sample projects to see the accuracy of the current matching algorithm. By the way, your project might not be implemented fully according to its UML model, it is also acceptable for me.
Thank you for your time and interests!
Relevant answer
Answer
Umple project can be useful (umple.org).
Umple is written by Umple which has UML as modeling elements and Java as an action language. You can use Umple itself to get what you need for your project.
Just as a notice: Umple supports what you mentioned as your project. It establishes a solid connection between code and Model. However, its philosophy is that there is no need to modify the code because Umple models can have both model and code at the same time. Therefore, developers can change their code even at the modeling level. 
  • asked a question related to Java Programming
Question
3 answers
Can any Researcher support me wih source code of (Aspect-Oriented Design Pattern Implementation)
As an initial experiment we chose to develop and compare Java and AspectJ implementations of the 23 GoF patterns. We are not discovering new patterns, but simply working out how implementations of the GoF patterns can be handled using a new implementation tool. Our results indicate that using AspectJ improves the implementation of many GoF patterns. The observed benefits are related to improved modularity of the code: localized implementation, (un)pluggability of pattern code, transparent composition of multiple pattern instances, and even reusable pattern impelmentations.
Relevant answer
Answer
  • asked a question related to Java Programming
Question
3 answers
I am getting cracking noise with my multimedia project, I have hardware limitation that support only 16 bit integar value , where as incoming data is in float,
So i want to convert float to short with minimum precision losing i have used multiplication technique that is giving much lose, can any body help me for same?
Relevant answer
Answer
Not enough info for a definitive answer.  So following may apply (or not).
If you are talking about "playing" the media on hardware that supports only 16 bit ints, then scaling, quantizing, etc., probably  won't work UNLESS you can "tell" the hardware that the data has been scaled/quantized (and HOW it has been), OR if it already expects the data to be scaled/quantized (in which case, you'd have to scale or quantize the way that the hardware expects...)
In general, it would seem to me (again, not knowing the actual specifics involved in this case) that the best you'll be able to do when converting float to int is to "round" - as an integer has no fractional part (unless the hardware accepts scaling of some sort).
  • asked a question related to Java Programming
Question
8 answers
I am on Linux platform with MySQL NDB 5.7. I am trying to monitor all traffic related to MySQL clustering – between data nodes, management node and sql nodes. To that end, I used netstat to list all open ports listening on my machine before starting MySQL cluster. Then, I started MySQL cluster and ran netstat again. I assumed that the ports that were listening the second time around, but not the first time, were related to MySQL clustering.
But there are two problems with this. First, there could be ports opened by other processes between the two netstat runs. Second, MySQL might open other ports after I ran the netstat command the second time.
What is the best way to go about finding all ports being used by MySQL for clustering purposes?
I believe ephemeral ports are picked dynamically, so perhaps if I knew all the MySQL clustering related processes that would be running, I can figure out every port that they are using. Pointers will be very welcome.
Relevant answer
Answer
Hi,
I'm not sure to fully understand your question, but it wonder if you are not mixing several concepts.
Indeed, unless a an application runs with root privileges, it cannot open or close a port itself. Ports can be opened or closed at the OS level, for instance using its firewall UI. In other words, MySQL (or any other app) doesn't need to run for its related ports being open or close. In fact, MySQL will not be able to run properly if the port(s) it uses are not open before it is launched. Thus, checking if ports are open or close will probably not be a solution for you. If I'm right (but again, I'm not sure to have fully understood your question), you need to check the traffic on the (open) ports. A right tool to do this is tcpdump. You'll find several examples around, for instance at http://superuser.com/questions/604998/monitor-tcp-traffic-on-specific-port
Hope this helps.
  • asked a question related to Java Programming
Question
4 answers
I want to learn android development. Which course is best for learning android development. I have tried developing apps (simple sms app). But i am facing problem while designing user interface and in backend coding. I have knowledge of java and programming. I want to learn it professionally. Please suggest course whether it is premium course in which i would learn from designing app to complete development with sample apps development. 
Relevant answer
Answer
I suggest the MIT App Inventor for simple apps: http://www.appinventor.org/book2
I found the develpoment should fast. If you have knowledge of Java you can improve the emvironment with your own blocks.
  • asked a question related to Java Programming
Question
6 answers
What are the steps to using karatsuba multiplication?  I have 2 rather large integers and they are crashing my java program. Using long(s) for ints and it still throws and exception error.  Any thoughts of doing this manually?
Relevant answer
Answer
You got an exception because something went wrong.  To avoid the exception, don't do that.
Please understand that there is no such thing as "an" exception.  Each exception has a detailed description, which includes a reference to the source line involved.
If you expect help, you have to ask a meaningful question.  This means that you WILL include all the details: the description of the exception, as displayed by the Java runtime,  the actual source line involved, ideally the values of all the variables participating in that line, and that's just in the hope somebody recognizes the conditions.  Better still, give us a snippet of code in a static main() that produces the same exception in a "one line" example (excluding the syntactic saccharine required for boilerplate or setting up the values used).  If not "one line", then the smallest example that exhibits the failure.
Without knowing what has been done to represent the multiprecision integer, and without any knowledge of what the exception was or the line of code that caused it, there is no way to suggest what might be wrong.  
How many bits do you need?  64? 256? 
Maybe you can help me.  A couple hours ago I got a syntax error from the compiler.  What did I do wrong?  How can I fix it?
Would it help if I told you that it was in a for-each construct on a subclass of a generic collection?
I spent fifteen years in one newsgroup and I found two to five questions per day that looked like yours.  I answered them the same way.
  • asked a question related to Java Programming
Question
1 answer
I implemented the FCM and KFCM in java for clustering of dataset. However I obtained same results for Obj Function:Code in KFCM:
object += 2*(Math.pow(u[i * pattern+j], m) * K(v1, v2, dimension) * K(v1, v2, dimension));
Distance code:
b= (v1[i] - v2[i]) * (v1[i] - v2[i]);
result+=(1-Math.exp(-b/4) )
Relevant answer
Answer
Dear Lokesh,
I suggset for you a links and attached files in topics.
-Comparison of K-Means and Fuzzy c-Means Algorithm Performance ...
https://www.ncbi.nlm.nih.gov › ... › PubMed Central (PMC)
- Comparative Study of Different Clustering Algorithms | Open Access ...
- ]A Comparison Study between Various Fuzzy Clustering Algorithms
Best regards
  • asked a question related to Java Programming
Question
4 answers
I want to learn about OpenMP implementation in JAVA. If anybody know please let me know (refer any link or text book)
Relevant answer
Answer
Here is a short tutorial: http://www.omp4j.org/tutorial
regards,
Bogdan
  • asked a question related to Java Programming
Question
6 answers
I want to convert the audio file to a text file in java i.e first the audio file will be played and after it is played it will copy the lyrics into a text file, and vice versa, in java. But, I don't know from where I will start it, so, can anyone tell me how to do that?
Relevant answer
Once you have your Base64 encoded string audio file, you can decode it to a byte array using Base64 Java class as follows:
String content = new String(Files.readAllBytes(Paths.get("path_to_your_base64_encoded_audio")));
byte[] decoded = Base64.decode(content);
From now on your byte array stores all the required info to be played if you want so.
  • asked a question related to Java Programming
Question
4 answers
Need the Dataset of bug reports in CSV format. I have read many research papers, they mentioned that, they had taken bug report dataset from bugzilla but i am not able to generate reports. From where I get the dataset??
Relevant answer
Answer
Dear Nishi Madaan,
You may use software bugs data of software Terapromise repository for your analysis. Here you can find different software log file in .csv format. 
  • asked a question related to Java Programming
Question
3 answers
I using easyRDF library to communicate with fuseki server in codeigniter. I want to execute CRUC operation, but 
I used below code to select data and to fetch query result:
$this->load->library('rdf');
EasyRdf_Namespace::set('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns');
EasyRdf_Namespace::set('srt', 'http://persuratan-semweb.dev/ontologies/surat.owl');
$sparql = new EasyRdf_Sparql_Client('http://localhost:3030/surat_single/sparql');
$query = "SELECT * WHERE { "
. "?surat rdf:type srt:Surat . "
. "?surat srt:sifat_surat ?sifat_surat . "
. "?surat srt:nomor_surat ?nomor_surat . }";
$result = $sparql->query($query);
echo "jumlah data: " . $result->numRows() . "<br>";
echo "<br>";
foreach ($result as $row) {
echo $row->sifat_surat . " " .$row->sifat_surat . " " . $row->nomor_surat ."<br>";
}
print_r($result);
But, The output I got are (zero row):
jumlah data: 0
EasyRdf_Sparql_Result Object (
[type:EasyRdf_Sparql_Result:private] => bindings
[boolean:EasyRdf_Sparql_Result:private] =>
[ordered:EasyRdf_Sparql_Result:private] =>
[distinct:EasyRdf_Sparql_Result:private] =>
[fields:EasyRdf_Sparql_Result:private] => Array (
[0] => surat
[1] => sifat_surat
[2] => nomor_surat
)
[storage:ArrayIterator:private] => Array ( )
)
Where as if I tried my query in Fuseki endpoint, I got such as in file I attached. I'm completely beginner in semantic web. Does anyone know how to select data and fetch it in PHP, insert, delete, and update data as well?
  • asked a question related to Java Programming
Question
2 answers
Thanks..
Relevant answer
Answer
It depends on the recommender system that you needs but  you can visits  eBOOK at boonbook for more informations
  • asked a question related to Java Programming
Question
3 answers
In my research i developed an android application that save the frames from mobile camera to a buffer. So, i need receive these frames in fixed delay(Periodicity) in 40msec. but I've Problem in FPS_range(30000,30000) is returning frames with random delay of 30 or 40 msec 
Relevant answer
Answer
I am not sure if you can achieve this on Android using standard developement tools. I have some experience from game development and the solution is to take into account variable delay (dt). My colleagues tried to force Android to loops with fixed frequency, but unsuccessfully (same problem as yours). If you do not find solution with JAVA, you may try Android Native Development Kit (NDK) if it is still supported by Google. But expect lot of complications from significantly lower community support to deployment on Google Play.
  • asked a question related to Java Programming
Question
2 answers
Hi all,
i'm currently fiddling around with hashfunctions in JavaScript. Allthouth there are some implementations for Blake512 and Blake32, i could not find any implementation for Blake256. 
After comparing the definition of Blake256 with some Blake32 implementations, i'm wondering if there is any difference between those two at all. Or is this just two names for the same thing?
Best,
  Marc
Relevant answer
Answer
  • asked a question related to Java Programming
Question
5 answers
Please can any one help with the following: I am planning to use GA for function optimization using Java, and I believe I should use real encoding. However, I thought I could implement real encoding with the knowledge of binary encoding. But unfortunately, I am having difficulty implementing real coding.
Relevant answer
Answer
Thank you very much. Your suggestions were very helpful.
  • asked a question related to Java Programming
Question
5 answers
trying to implement a bot in java that will act as virtual assistant between teacher and student. bot can learn anything from teacher teaches it regarding course and its schedule and student can ask anything from bot about teacher's course and schedule .
i have read three research papers regarding this :
  • Automatic SQL Query Formation from Natural Language
Query
  • Ripple Down Rules for Question Answering
  • Research of Automatic Question Answering System in Network Teaching
and came to conclusion that i have following challenges:
  • Understand what is typed and decide whether it is query or casual sentence.
  • Learn answer of such type of questions for future reference ,so if same type of question asked in future , bot answers automatically , and if answer not present bot will send query to teacher to answer it.
Problem i am facing is during implementing and hard time understanding the steps to overcome my challenges , it would be great help if someone would guide me to right direction regarding implementation in java.
Relevant answer
Answer
Actually, I do not agree with Joachim's comment above - rule-based systems, including regexp-pattern-based ones, will ON THEIR OWN not be able to deliver a satisfactory performance. Reason is that language is too variable to be captured in these patterns (a lot of mateial will just not be matched) and adding patterns gets increasingly difficult since matching regions start to overlap and interact with each other. Do this only if you have only very little time and you want to show the general feasibility in the short term.
Much more promising is machine learning, as impressively demonstrated by IBM Watson's Jeopardy game in 2011. This system used some pattern based rules, but also a plethora of other signals, and was trained on correct question-answer pairs.
There is an open source implementation in java of a similar system called YodaQA, and I would recommend to take a look:
best, Chris
  • asked a question related to Java Programming
Question
3 answers
I researched on data clustering in PSO and came to know that PSO has many variants..I implemented the gbest PSO whose pseudocode is in image PSO_Impl.jpeg. Now I came across the FCM-PSO algorithm (Image PSO_FCM). Does anyone have idea that both the PSO variants are same or different.How it is different with parameters.Another variant is also given in PSO_FCM1 image.
Combination of Fuzzy C-Means and Particle Swarm Optimization for Text Document Clustering, Springer, 2012(PSO_FCM1)
Particle Swarm Optimization for Fuzzy c-Means Clustering, IEEE, 2006 (PSO_FCM)
SNAPSHOT OF CODE(PSO):
g2[0] = fun(gbest[j], gbest[j + 1], gbest[j + 2], gbest[j + 3], gbest[j + 4], gbest[j + 5], gbest[j + 6], gbest[j + 7], gbest[j + 8], gbest[j + 9], gbest[j + 10], gbest[j + 11], gbest[j + 12], gbest[j + 13], gbest[j + 14], gbest[j + 15], gbest[j + 16], gbest[j + 17], gbest[j + 18], gbest[j + 19], gbest[j + 20], gbest[j + 21], gbest[j + 22], gbest[j + 23], gbest[j + 24], gbest[j+25]);
System.out.println("Intra cluster distance ...... ....." + g2[0]);
Relevant answer
Answer
I could not get it..sorry...I was asking are these variants of PSO are same or different?
Thanks
  • asked a question related to Java Programming
Question
3 answers
I want to modify a TCL script for Jsim simulator... can it be done ???
Relevant answer
Answer
you can check this link for more detail.
  • asked a question related to Java Programming
Question
8 answers
I am trying to make a project with word embedding. However, the first step is to extract word features from passages. Thus I need to apply word2vec into my material. As I am a student in statistics, I just master java and python. Can you give me some links about word2vec in java or python? Thank you very much!
Relevant answer
Answer
Hi, in https://pypi.python.org search the word2vec.
pip install word2vec
  • asked a question related to Java Programming
Question
1 answer
Hi,
As part of a project, I am trying to write a OPC UA specification for an IoT system in an industry. The question is what exactly a OPC UA specification means and how does it look like for a given application and how do we proceed in writing the required specification. Does anyone has a sample template of OPC UA specification for any application as in such for just a rough sketch to plan my work.
Thank you!!
Relevant answer
Answer
Hi ,
What is your use case exactly? could you please describe more while it differs widely?
  • asked a question related to Java Programming
Question
1 answer
I have to train the images to calculate the weight for text and non-text regions in AdaBoost classifier. I have doubt about loading an image dataset using java.
Relevant answer
Answer
Dear Researcher
please refer to these attachments if it is helpful for you.
Reagards
  • asked a question related to Java Programming
Question
3 answers
For a project in netbeans I have to integrate weka for supervised learning analysis? Although Jar files for weka are getting added in netbeans classes are not being created. Kindly help
regards
anu
Relevant answer
Answer
You will have to provide more information or a screenshot since there are several reasons that could cause such a problem (e.g. you may miss a JAR file from the imported library, or you have not imported the necessary object in java class file). However, a very good tutorial about Weka and Netbeans can be found on the link attached below.
  • asked a question related to Java Programming
Question
34 answers
It is true that the sample size depends on the nature of the problem and the architecture implemented. But, on average, what is the typical sample size utilized for training a deep learning framework?
For instance, in a convolutional neural network (CNN) used for a frame-by-frame video processing, is there a rough estimate for the minimum no. of samples required to train the model?
Relevant answer
Answer
It really is pretty hard (if not impossible) to give a 'one size fits all' answer.  The amount of training data you require is dependent on many different aspects of your experiment:
  • how different are the classes that you're trying to separate?  e.g. if you were just trying to classify black versus white images then you'd need very few training examples!  But if you're trying to solve ImageNet then you need training data on the order of 1000 examples per class.
  • how aggressively can you augment the training data?  (Sander Dieleman's blog post on 'Classifying plankton with deep neural networks' gives a great introduction to data augmentation; and he talks a little about the question of 'how much data do deep neural nets require')
  • can you use pre-trained weights to initialise the lower layers of your net? (e.g. using weights trained from ImageNet)
  • do you plan to use batch normalisation? It can help reduce the amount of data required.
  • There are loads of other 'tricks' discussed in the literature on ways to squeeze maximum advantage from a small training dataset.
  • asked a question related to Java Programming
Question
3 answers
I am considering using Java for some research works and I would like to know if someone has used ROS with Java (rosjava?) rather than C/C++ or Python, and whether it was a good experience or if the required tools were clunky or not user-friendly
Relevant answer
Answer
Hello !
One option to have very flexible development enviroment for robotics is using domain-specific modeling tool for specification of robot topology, joints and segment features, control logic and robot actions. Models can be directelly transformed to any target language. If you use soft SPS run-time system (PLC, IEC 61131-3) as "operating system for robot" then everything can be done easy. The only thing that should be programmed (if targer framework does not have it already) is algorithm for calculating rotations and elevations.In MainModel.jpg this algorithm is represented as function block "ArmAction", top right.
Some video examples are available in:
  • asked a question related to Java Programming
Question
1 answer
I am working on Fuzzy min max neural network for classifier(PK Simpson), Is there any source from where I get the implemented code for this algorithm. Preferably in Java as I am familiar with this language, If not any other language source code will be ok. please help me out.
  • asked a question related to Java Programming
Question
9 answers
I am taking project from image processing area using java..I am new to image processing operations using java..So anyone suggest which material i want to study for that and how to convert gray scale image to binary image.
Relevant answer
Answer
1) Transform the image to GrayScale
2) Generate one image to each component color (R/G/B)
3) Transform the GrayScale image to binary
To transform RGB to GrayScale we need to use this expression:
Y = 0.3R + 0.59G + 0.11B;
And them, to convert the GrayScale to Binary
if (Y > 127) {b = 1; } else { b = 0; }
public static BufferedImage criaImagemCinza(BufferedImage imgJPEG) {
                // Create a new buffer to BYTE_GRAY
                BufferedImage img = newBufferedImage(imgJPEG.getWidth(), imgJPEG.getHeight(),BufferedImage.TYPE_BYTE_GRAY);
                WritableRaster raster = img.getRaster();
                WritableRaster rasterJPEG = imgJPEG.getRaster();
                // Foreach pixel we transofrm it to Gray Scale and put it on the same image
                for(int h=0;h<256;h++)
                        for(int w=0;w<256;w++) {
                                int[] p = new int[4];
                                rasterJPEG.getPixel(w, h, p);
                                p[0] = (int) (0.3 * p[0]);
                                p[1] = (int) (0.59 * p[1]);
                                p[2] = (int) (0.11 * p[2]);
                                int y = p[0] + p[1] + p[2];
                                raster.setSample(w,h,0,y);
                        }
                return img;
        }
Binary Image method, receive a Bufferedmage and convert it to Binary.
public static BufferedImage criaImagemBinaria(BufferedImage imgJPEG){
                // Create a new Binary Buffer
                BufferedImage img = newBufferedImage(imgJPEG.getWidth(), imgJPEG.getHeight(),BufferedImage.TYPE_BYTE_BINARY);
                WritableRaster raster = img.getRaster();
                WritableRaster rasterPB =criaImagemCinza(imgJPEG).getRaster();
                // Foreach pixel  check if the new one must be white or black
                for(int h=0;h<256;h++)
                        for(int w=0;w<256;w++) {
                                int[] p = new int[1];
                                rasterPB.getPixel(w, h, p);
                                if(p[0] > 127) {
                                        raster.setSample(w, h, 0, 1);
                                } else {
                                        raster.setSample(w, h, 0, 0);
                                }
                        }
                return img;
        }
RGB Image method, receive a Bufferedmage and a Type (0 - red, 1 - green, 2 - blue) and convert it to RGB Component that is used as parameter.
public static BufferedImage criaImagemRGB(BufferedImage imgJPEG, inttipo) {
                // Create a new RGB Buffer
                BufferedImage img = newBufferedImage(imgJPEG.getWidth(), imgJPEG.getHeight(),BufferedImage.TYPE_INT_RGB); 
                WritableRaster rasterT = img.getRaster();
                WritableRaster raster = imgJPEG.getRaster();
                // Foreach pixel just use the component that is passed as parameter.   
                for(int h=0;h<256;h++)
                        for(int w=0;w<256;w++) {
                                int[] p = new int[4];
                                raster.getPixel(w,h,p);
                                rasterT.setSample(w,h,tipo-1,p[tipo-1]);
                        }
                return img;
        }
  • asked a question related to Java Programming
Question
1 answer
I need to design a web/mobile java application for personal health management. Can anyone help with tips/guideline/hints, especially with the database design?
Relevant answer
Answer
Hi Emmanuel,
I did such thing before, as I've designed a mobile application for patient monitoring. I've used the following to achieve my system:
1- Java for android: this is for mobile app and will be used by patients to send their data.
2- PHP and MySQL database for back-end system, which is responsible for collecting data and visualise it, managing patients, search and alerts, adding new patients, writing notes and sending messages.
You will need to have a good skills and experiences in Java and PHP MySQL or you can use another web based environment. 
Kind regards
Ahmed
  • asked a question related to Java Programming
Question
10 answers
I am designing a document reccommender system, where i need to use maching learning algorithm for document classification and PHP language do not have libraries available to do this task. as i have to play with user behaviours as well that's why i have designed my application in PHP. Is it possible to use python/java for document classification (using machine learning algorithm such as SVM, Naive byes) and use its results in PHP application?
Relevant answer
Answer
If your application is enterprise, the best way is to use general integration patterns like Web Services or Messaging. This way you can integrate PHP to Java, Python or every other programming language. Also you can decouple the implementations of front-end (PHP) & back-end (Java/Python) in a very clean manner.
There are a lot of Web Service (SOAP/REST) libraries or Messaging libraries for either PHP, Java, Python or other languages. You can find the best option which is proportionate for your application by searching in google.
  • asked a question related to Java Programming
Question
14 answers
I have converted a leaf image from rgb to hsv. I would like to remove the green component/color from the image so I could focus on other features of the leaf. I am trying to achieve this using the OpevCV package. Insights would be appreciated. Different approaches welcome.
Relevant answer
Answer
Hi Vishal,
I played around with the example image that Kumarguru Poobalan posted since you mentioned it was comparable to your images - thanks Kumaguru! I ended up having great success opening the image with a channel operation of (red-255)*-1+green*2. This permitted a very simple recipe to find and separate the disease spots. I've attached a screen recording of MIPAR running through the recipe after the image was opened. The sequence was:
An Ostu-optimized global threshold to roughy identify the spots
A reject features step which eliminated false features under 100 pixels
Another reject features step which eliminated holes under 100 pixels
A smooth features step to reduce artificial spot roughness
A watershed step which separated artificially connected spots
The final visualization in the movie is just to show the separate features as different randomly assigned colors.
Please let me know what you think. The trick with an image like this I believe lies with a proper operation for the color to grayscale conversion - then the feature extraction is fairly straight forward. Even a "color segmentation" tool like those available in ImageJ or Photoshop are, I believe, essentially performing color-to-gray (i.e. vector-to-scalar) conversions behind these scenes. I'd be happy to make and send a similar recipe file for your images.
Cheers,
John
  • asked a question related to Java Programming
Question
1 answer
Any stemmer which can be implemented and the advances available in this area.
Relevant answer
Answer
I didn't understand your question that much but as I understood I found this link you can look at it and tell me if that what are you looking for :)
  • asked a question related to Java Programming
Question
3 answers
I'm looking for a better understanding on how good/ill optimized is the native Oracle JVM regarding the usage of processor/architecture specific features (eg: Cache layout, SIMD instructions, OOO Execution Pipelines, etc ... ).
Also. Which would be a good example of a processor-optimized JVM implementation ?
Relevant answer
Answer
I would add the following to Peter's answer. 
Historically, the "native" JVM (from Sun) is based on HostSpot just-in-time compilation.  Alternative JVM's could be found around, such as JRockit. It was known that  Hotspot JVM is better suited for UI desktop applications whereas JRockit is designed for best performance and fast executions.
Nowadays, Oracle is the owner of both Sun's JVM (HostSpot) and JRockit. The first one is shipped with the standard JRE, the latest is shipped with Oracle fusion. So, both are "native Oracle JVM's".  
Note that Oracle is merging the best of the two worlds since Java 8.
An interesting discussion on both implementations can be found at http://blog.dbi-services.com/a-comparison-of-java-virtual-machines-hotspot-jvm-vs-jrockit-jvm/
  • asked a question related to Java Programming
Question
14 answers
I have developed an ontology and I am trying to query owl ontology data property assertions using OWL API in java. I have tried to query the definitions for namedIndividuals through data property assertions but I am not succeeding. Can somebody assist out there?
Relevant answer
Answer
Hello with owl-api jar and PelletReasoner
first you import : org.semanticweb.owlapi.model.OWLDataProperty;
and uses this code
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLOntology ontology = manager.loadOntologyFromOntologyDocument (new File (file));
// DataProperty
OWLDataProperty name = manager.getOWLDataFactory().getOWLDataProperty(IRI.create("URI_of your DataProperty "));
// Ind contains information about the individual (and all other individuals that were inferred to be the same)
OWLNamedIndividual ind = sameInd.getRepresentativeElement();
// get the info about this specific individual: dataProperty
Set<OWLLiteral> names = reasoner.getDataPropertyValues( ind, name );
  //  we can get the value directly
String nameInd = names.iterator().next().getLiteral();
I hope that is usful
  • asked a question related to Java Programming
Question
2 answers
Does anybody know how I include the Encog library to use in my own project? An example would be great.
Relevant answer
Answer
I found the following tutorial:
I hope it helps.
All the best.
  • asked a question related to Java Programming
Question
10 answers
Need to start with spring and maven.
Relevant answer
Answer
Check this..
It give an detailed outline/steps required to Create a MVC project using maven and struts2 in eclipse IDE..
very helpful for beginners..
  • asked a question related to Java Programming
Question
3 answers
I am working on a symmetric key algorithm based program. I want to generate a key (e.g. AES) with a keyGenerator and store in a file (then put file into a folder). Then retrieve it from a client and a server programs.
This is not a real life scenario. In real life symmetric is exchanged between two parties and there is no third party to hold the key. But for my programming convenience, I want to run this in my host computer where I have set up two programs as client and server for demonstration purposes.
Can somebody give me a link or reference or can write a short reference program for this?
Relevant answer
Answer
you can use openssl as a  shell command  c code and store the the key file
  • asked a question related to Java Programming
Question
2 answers
I am traying tonimplement an anfis in java. i know the architecture of anfis but i dont know how to implememnt it in java. I have 5 inputs and one output in excel document. Do I have to use it for the training set? What are the stept for implementing in java?
Relevant answer
Answer
  • asked a question related to Java Programming
Question
4 answers
I have heard about JPyp and Pyjnius but not sure these are stable or not. If someone already use them please respond so I can confidently select one for my research implementation.
Relevant answer
Answer
Jython
  • asked a question related to Java Programming
Question
3 answers
I am a PhD student in software engineering,
Every java class  belong to stereotypes classification based on the responsibility and activity such as  control class, boundary class  and entity class
I need a help to classify java classes into  mix  categories such as entity-control   or boundary control.
Relevant answer
Answer
Khalid,
This is the approach taken by Jacobson for conceptual class stereotypes in OOA in the Unified Process, which you may or may not want to use. See the "Unified Software Development Process" book for all the detail. Summaries can be found online. Jacobson recommends using use cases to find the different types of conceptual class, e.g.  one boundary class per use case.
Best regards,
  • asked a question related to Java Programming
Question
5 answers
I am trying to find the overhead. I know how I can calculate in c++ (using sizeof () method) but not in java.
Relevant answer
Answer
import java.lang.instrument.Instrumentation;
public class ObjectSizeFetcher {
private static Instrumentation instrumentation;
public static void premain(String args, Instrumentation inst) {
instrumentation = inst;
}
public static long getObjectSize(Object o) {
return instrumentation.getObjectSize(o);
}
}
public class C {
private int x;
private int y;
public static void main(String [] args) {
System.out.println(ObjectSizeFetcher.getObjectSize(new C()));
}
}
  • asked a question related to Java Programming
Question
5 answers
Thanks in advance for your replies.
Relevant answer
Answer
It is enough for most cases to use jconsole tool from JDK  bin directory.
  • asked a question related to Java Programming
Question
4 answers
Why equals() method must be compatible with compareTo in java ?
Relevant answer
Answer
There is a "contract" that objects being equals() -> true must have the same hash code value. However two objects having the same hash code value are not obligatorily equals() -> true. Default implementations of equals() and hashCsode() compares memory adresses not field values of your object and that is what you want if you Let's say you override equals() by using fields of your object a business model object. If equals() is overridden in a manner that it checks object fields for equality but hashCode() still has the default implementation youmight face trouble storing and retreivig objects in a HashMap. Let's say you put a Person in a HashMap. The name variable's value is "John". If you look for a person named John in your HashMap it will look for the hash value first. If the value is not found it returns a NULL value hence it doesen't work correctly. If you override both method the shoulb be overridden correctly. If your hashCode() alsways returns an int=9 it is worth nothing.
  • asked a question related to Java Programming
Question
7 answers
I have 3 linear functions that I want to minimize with many variables and contraints . I know we can't talk about optimal solution in multi objective problem. But How can I get a best compromise ? i want to implement the solution in JAVA. is there an API that I can use ?
Relevant answer
Answer
Hi Zakaria,
Depending on what kind of optimisation you want:
-1- mono-objective: if you want to optimise a trade-off (a compromise ) of all the objectives, then, you can use a linear solver (e.g. (commercial) CPLEX , (free) COIN-OR / GLPK ) with a weighted-sum objective (i.e. w1*obj1 + w2*obj2 + w3*obj3 | wi>0 and w1+w2+w3=1).
=> The expected result here is a unique solution.
-2- multi-objective: you optimise each objective "separately". There are many techniques which transform the multi-objective problem into several mono-objective problems that you have to solve one after the other (e.g. epsilon-Constraint, Aneja&Nair (two steps method))
=> The expected result here is a set of non-dominated solutions (each solution is better than the others on a least one objective).
I hope that this gonna help you to decide where your problem fits most and what tools/technique to use.
Takfarinas.
  • asked a question related to Java Programming
Question
9 answers
Is there any tool which can visualize object oriented programs in terms of data and control dependencies. I need to visualize pure object oriented programs in Java using data and control dependencies which may be better way to understand the object oriented programs and can help to software maintenance.
Relevant answer
Answer
Safeeullah, what is the source of visualisation you have? Do you want to develop code and visualise it during the development (see answer of Chad Frederick). Or do you have written code bases that you want visualise?
What format are they in? Do you have a snapshot? Do you have a whole history (e.g., in form of a repository [git, svn, ...] including all logs)?
  • asked a question related to Java Programming
Question
14 answers
So a friend and I will probably get into a project where we try to make mathematical and scientific libraries for Java, possibly in native code.
So a few quick questions that come to mind include:
1. Are there any hardware-instruction-level libraries that link to Java for matrix math, and so on?
2. Does Java have any comprehensive, easy-to-use plotting libraries? If yes, are they fast?
3. As a scientist in general, what features would you like to see?
A small postscript: I have an obsession with speed, so the idea here is to make a very fast, efficient library taking advantage of hardware instructions, which means there will be native code involved.
Relevant answer
Answer
Just one thought : Java was created in order to make applets/apps portable. A java application is therefore supposed to be "independent" from the hardware (beside the fact that the JVM is obviously compiled for a given architecture, but the API remains the same across architectures). You can use/call native code through the JNI interface, but this makes often your app non portable.
Beside this, I agree with Thomas. I personally wrote several traffic assignment algorithms on very large networks using parallel threads in Java. I agree that before 2002/2003 this would not have been possible, but modern JVM/HotSpot has comparable performances to C++.
This being said, did you have a look to Apache Common Math ? http://commons.apache.org/proper/commons-math/
This library is well written and supported...
  • asked a question related to Java Programming
Question
8 answers
I have been researching for months now and have looked deep into image processing but I'm think that the way to change a shape or an image in Java Programming language is more of an Animation now. I need to create pixel points that lie over facial features of an image and then be able to change these features by relocation of the pixels. Morphing/Animation. Any tips here or links that could be useful for my research on this subject appreciated.
Relevant answer
Answer
Thanks Aleksandar, yes this is on my mind a lot. I looked at OpenCV but not in depth and thought this was more image processing again like the Marvin project I looked at, but will look at this again in more depth now.
And yes, when I was doing my Foundation Degree we drew objects using pixel points. I think my mind is starting to think the right way but all words of advice and information helps me think much more. Thankyou for this.
  • asked a question related to Java Programming
Question
3 answers
I am trying to analyze java classes to a stereotypes such as control, entity, test, exception, interface and model. How can I classify the classes to multivalued stereotypes such as control-test or others.
Relevant answer
Answer
Do you want to do this in some specified way? E.g. with annotations or something like that? Otherwise, you could use bitmasks I guess.
  • asked a question related to Java Programming
Question
5 answers
I am wondering if anyone has called Fortran models from Python or Java. We are currently using a fortran scientific model that we need to call from a workflow. The native Fortran is very difficult to interface with, I thought I would ask if anyone has done it in the past. Thanks!
Relevant answer
Answer
It depends on what you mean by that. If it is just a function written in Fortran that you want to call Sina's approach will work. Most people would try to call the function directly. In Java you would need JNI for this task. Python has something similar. You can find how to call C functions in general. Then look in the manual of your Fortran compiler to figure out the final function name which is then C-compatible.
If, however, you have an entire program written in Fortran that you used to call from the command line you should keep it as a separate program. Use the exact same command line with Popen in Python, for example. I would guess that Java also has something similar.
  • asked a question related to Java Programming