Java

99K

Solutions

33K

Contributors

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

Share tech news, updates, or what's on your mind.

Sign up to Post

Record
I am using the "each statement" with the handlebars template engine in node.js.  Unfortunately, each record is being tabbed to the right of the previous one, as the attach image shows. I would like each record to line up evenly.
Please see the code:

Here is the file:gigs.handlebars

{{#each gigs}}
<section id="gigs" class="container">
<!--<h1>All Gigs</h1>-->
<h1>{{equipment_area}}</h1>
<div class="gig">
      <h3>{{title}}</h3>
      <!--<p>{{manufacturer}}</p>-->
      <ul>
        <!--<li>Budget: {{budget}}</li>-->
        <!--<li><a href="mailto:{{contact_email}}" class="btn btn-reverse">Apply Now</a></li>-->
        <li>Equipment Type: {{equipment_type}}</li>
        <li>Manufacturer: {{manufacturer}}</li>
        <li>Model Number: {{model_number}}</li>
        <li>Serial Number: {{serial_number}}</li>
        <li>Condition: {{severity}}</li>
        <li>Comments: {{general_comments}}</li>
                
      </ul>
      <!--
      <div class="tech">
        <small>Technologies Needed: <span>{{technologies}}</span></small>
      </div>
      -->
    </div>
    {{else}}
     <p>No gigs available</p>
    {{/each}}
</section>

Open in new window


Please also see the css file:
@import url('https://fonts.googleapis.com/css?family=Lato');

:root {
  --primary-color: #568c9b;
  --primary-hover-color: #64a5b7;
  --bg-color: #333;
  --box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Lato',

Open in new window

0
CompTIA Security+
LVL 13
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

i have a code below where i am traversing a list in jsp containing employee_id and employee_name
<tr>
                                                <td align="top"><INPUT class="inputtext" name="chkBox" type="checkbox" value="<%=employee.get(0)%>" size="50"></td>
                                                <td><label><%=employee.get(0)%></label></td>
                                                <td><label><%=employee.get(1)%></label></td>
</tr>

along with each and every row there is a checkbox when i am selcting chekboxes and click on submit button presently on employee_id (value="<%=employee.get(0)%>") is going along with
checkbox value i want both employee_id and employee_name will go with checkbox value to servlet . in servlet there is a query run and employee_id and
employee_name should be entered into specific table. please help me out on this .please let me know if not clear.
0
HI Team ,

I am retrieving value from database through JDBC statement  my plsql query is below -

Select * from A union Select * from B.

but when i am retrieving value through JDBC statements its give null . when i am individually running query like Select * from A without using Union  its working fine and giving results but when i am using 2 query via Union its give Null. Please tell me where i m wrong .
0
Hello,
in Java Strings are immutable.
If so, why is this possible?

String s = "abc";
s="def";

Open in new window

0
I am rewrite an java app. The original is a jar file.  In the project it is calling http URL connections. Do I need to  generate a dynamic web project or just a simple java project?

Thanks
0
Hi,
 
 The "NVWatchDogService" service on our Windows 2012 R2 server stopped working,
task manager status shows this service "Starting" even after reboot.

There are two Event Viewer errors when stopping and restarting this service:

  Event Error 1.
Description:
Service cannot be started. System.ApplicationException: Failed to start java Service.
   at ShunraBootstrapperService.JavaStarter.StartService()
   at ShunraBootstrapperService.BootstrapperService.OnStart(String[] args)
   at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

   Event Error 2.
Description:
Error while creating file: Access to the path 'C:\Program Files\HPE\NV\OpenJRE\bin\NVServicesJ.exe' is denied.

Suggestions are greatly appreciated.

Thanks,
0
How can i refresh a div only once i got a response from popup.my scenario is below -

i have a Parent JSP page . in parent.jsp page there is a button which opens a popup when popup is open it fetch the table data from database . table data contains Employee_ID, Employee_Name . in popup jsp when displaying data each and every row contains a checkbox . after multiple selection of checkbox there is a submit button in popup.jsp , after submitting the page comes back to the parent.jsp page and display the popup.jsp submitted Emplyee_ID and Employee_Name.

my problem is when i m getting response back from popup.jsp to parent.jsp file my specific table is not refreshing , when i am debugging parent.jsp , list are coming with data but not displaying because it is not refresh at the moment when response are coming back from popup.jsp t parent.jsp .

Please let me know the solution.
0
Hi Team ,

i have a problem but i did't get any solution for it . i have a parent jsp from where a search icon is there when i click on search icon a popup jsp is open . in popup jsp i retrieve values form database and display.
there is 2 column in database Employee_ID and Employee_Name. all values come row by row and display on popup jsp . in each row there is a checkbox no my problem comes and i did't get any solution for it please help me out.there is two case -

1 Case - when i check multiple check boxes in popup.jsp and click on submit button(popup.jsp) the value of Employee_ID and Employee_Name   should display on parent.jsp.

2 Case - when i check multiple check boxes in popup.jsp and click on submit button(popup.jsp) the value of Employee_ID and Employee_Name should go to a servlet and after that servlet send that data to parent.jsp.


please let me know both of the above solutions.
0
HI

one of my applications suddenly hang...

it is runing thorugh java ... i tried to end the task using take manager

when i clicked the shortcut  for the applciations it asked what application to open only was there internet explorer

i clicked explorer  then all  exe files now not opened

i cant even run task manager

please have a look

is this virus or somo modifications neded
1
Hello Experts,

We do have enough  free space  to start the JAVA process but getting error like below:

Error: Could not create the Java Virtual Machine
Error : A fatal exception has occurred, Program will exit.

 The same program was running since 3 years with java version :
JAVA Version :
C:\Users\.......>java -Xms512m -Xmx1536m -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

Open in new window


HeapSize:

C:\Users\*********>java -XX:+PrintFlagsFinal -version | findstr /i "HeapSize
PermSize ThreadStackSize"
    uintx AdaptivePermSizeWeight                    = 20              {product}

     intx CompilerThreadStackSize                   = 0               {pd produc
t}
    uintx ErgoHeapSizeLimit                         = 0               {product}

    uintx HeapSizePerGCThread                       = 87241520        {product}

    uintx InitialHeapSize                          := 2147483648      {product}

    uintx LargePageHeapSizeThreshold                = 134217728       {product}

    uintx MaxHeapSize                              := 2061500416      {product}

    uintx MaxPermSize                               = 85983232        {pd produc
t}
    uintx PermSize                                  = 21757952        {pd produc
t}
     intx ThreadStackSize                           = 0               {pd produc
t}
     intx VMThreadStackSize                         = 0               {pd produc
t}
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

Open in new window


Can anyone help to what is wrong here ? If we remove the condition on the max and min size then the program runs fine and also on java version 1.8
0
Learn SQL Server Core 2016
LVL 13
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Hi
I have been directed to a javascript example housed in the Tryit editor, where example javascript code was pasted in for me to run. I modified it. But, I like the editor.

Is this a sterile and indifferent editor? Need I be concerned about what I run in it? Lame question, but it was a minuscule concern that undesirables could be gifted my code in the future.

here

Thanks
0
Hi,
Since I'm making a board game engine..

For a phone game, wouldn't dragging and dropping chess pieces, for example, be infuriatingly uncertain / complicated for players on a smaller phone screen?
If only legal moves are considered playable, what is best for a game like this? what is the current expected / standard?

thanks
0
Hi

If I am making a WORDSCAPES type .io game, my own thing

is there any point?
How difficult is publicity?
Will the big boys drown me out?
Thanks
0
Hi Experts,

I am facing the below issue.
teamjavax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name

i have migrated from 1.5 to 1.7 while calling the webservice facing the this issue,it is working with java 1.5 version.

can suggest how to resolve this issue.
0
I installed a Java file that was needed for our computers to view a feature on our VOIP phone system.   I no longer need the file.   How do I stop it from loading?
0
how to define remote kakfa server in spring boot  application.yml file
0
Hi Experts,

String msg = "<notify:Header><notify:uuid>c364a2143e1f4fb58a87b1530c5007cd</notify:uuid><notify:SystemCode>DTP</notify:SystemCode><notify:countryCode>AE</notify:countryCode><notify:Identifier>SYSTEM</notify:Identifier></notify:Header>";

how to get the notify:uuid tag value from the above string

String value will not be static but it will have same tag notify:uuid
0
Hi
Considering my other game-server question, a rep from Amazon called me a little while back and said the server I had acquired for my project is being unused. I accepted an upgrade deal for it. - anticipating my awesomeness.
(This is the one I got before I became interested in playerIO.com as a game server.)
It is a bare metal dedicated server, I think, on its own, that's what she said, and I read that recently that that is faster/more reliable  than cloud servers.
Should I let playerIO out to pasture and do the entire job myself on my dedicated? Luckily, I haven't committed any money to the other.
playerIO servers must be written in C, not Java, (only clients can be in Java) and based on the ridicule, and spiteful comments I've received for wanting to do a server in Java ;D is that a hint!?
Why is minecraft java okay, then?
Does playerIO seem practical?

Thanks again for the time.
0
java invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=0

we are using docker swarm for deploying docker containers that run java application.   Recently the containers are getting stopped frequently and we have observed the above-metioned log in system logs.
0
Introduction to R
LVL 13
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

I am new to HSQLDB and want to create a persistent database so that when opening HSQLDB, the already created tables with their contents exist. I read about HSQLDB in the documentation, but cannot find the information. My current HSQLDB.bat is the following:
cd %HSQLDB%
java -cp ../lib/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing

Open in new window

When running the batch, the following dialogue opens:
Opening dialogue of HSQLDBNote that the URL filed contains jdbc:hsqldb:mem:..
After [OK], I call two scripts, one creating two tables, the other filling them with test data. But reopening HSQLDB does not read the tables with their data.
What is missing, what is wrong? A SHUTDOWN does not change anything. I also replaced mem with file in the URL, but could not make the database persistent. What did I oversee in the HSQLDB guide?

Edit: Thank you, David! I started the database with the line you proposed & got the following reply:
C:\Program Files\hsqldb-2.5.0\hsqldb\lib>java -cp ../lib/hsqldb.jar org.hsqldb.server.Server --database.0 file:hsqldb/mydb --dbname.0 xdb
[Server@77a567e1]: Startup sequence initiated from main() method
[Server@77a567e1]: Could not load properties from file
[Server@77a567e1]: Using cli/default properties only
[Server@77a567e1]: Initiating startup sequence...

Open in new window

0
Hi, getting this error in Android Studio.

 error: failed linking references.

I have no idea what to look for next. Please help
0
Hi
This is it's own question, not something I want to confuse with my other questions.

The options for professional housing of game servers (multiplayer and single player online games, esp io games, in my case)
are
playerio.com  here

and amazon gameLift here

They are both definitely adequate and worthy of my usage in my games.

I'd like some opinions for my situations. Some of my games are both multiplayer or single player, but need my own server to run them.
The closest game requirement comparisons I can think of are: i) large forum/community chess type game. ii) single player platform, ii) MM platform. iii) single player turn based v AI


Amazon pays only for usage, playerio is fixed rate. Amazon seems better suited. Servers on Amazon's cloud can be deployed anywhere. I'm not certain if playerIO does that also?

I'm happy with either.
Can I build my gameLift server in Java?

Thanks
0
Hi ,
Advance thanks
I need to convert below java code to C#. Please help me with either tips or links .

Java code:
========
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.CookieSpecs;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.json.JSONObject;

private static String SSOUrl = "url1/token.oauth2";

public static void main(String[] args) throws Exception
      {
                  IAToken iatf = new IATokeniatf (SSOUrl )
                  String accessToken = iatf.get();      
                  HttpHost target = new HttpHost("url1", 443,"https");
                  HttpHost proxy = new HttpHost("url2", 80, "http");
                  RequestConfig config = RequestConfig.custom().setProxy(proxy).build();
                  HttpClient httpClient = HttpClientBuilder.create()
                              .setDefaultRequestConfig(RequestConfig.custom()
                                          .setCookieSpec(CookieSpecs.STANDARD).build())
                              .build();
                  URI uri = new URIBuilder().setScheme("https").setHost(APIUrl)
                              .build();
                  HttpPost postRequest = new HttpPost(uri);
                  …
0
Hi,
Any idea to convert this java code to C# format.

HttpClient httpClient = HttpClientBuilder.create()
					.setDefaultRequestConfig(RequestConfig.custom()
							.setCookieSpec(CookieSpecs.STANDARD).build())
					.build();

Open in new window


Kind regards,
Pooja
0
while trying to use BCP of SQL Server (https://docs.microsoft.com/en-us/sql/connect/jdbc/using-bulk-copy-with-the-jdbc-driver?view=sql-server-2017)

one issue we are facing here is it is giving the below error for datetime field , eventhough the data is proper

com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting date and/or time from character string.
      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)
      at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:256)
      at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:108)
      at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:28)
      at com.microsoft.sqlserver.jdbc.SQLServerBulkCopy.doInsertBulk(SQLServerBulkCopy.java:1611)
      at com.microsoft.sqlserver.jdbc.SQLServerBulkCopy.access$200(SQLServerBulkCopy.java:58)
      at com.microsoft.sqlserver.jdbc.SQLServerBulkCopy$1InsertBulk.doExecute(SQLServerBulkCopy.java:709)
      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478)
      
Data giving the error
      
      <header>
             <id>1</Account_ID>
             <name>NULL</name>
             <firstName>NULL</firstName>
             <middleName>NULL</middleName>
             <lastName>NULL</lastName>
             <idType>AAA</idType>
             <excemptionLevel>NULL</excemptionLevel>
             <riskRating>NULL</riskRating>
             <isMinor>NULL</isMinor>
             …
0

Java

99K

Solutions

33K

Contributors

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.