Neha Sud

Greenhorn
+ Follow
since Jun 24, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Neha Sud

Thanks a lot Stephan for clear and useful information!!
7 years ago
Hi all,

I wish to calculate months between two dates as written in code below


Could anyone explain this output or indicate if there is any error since no. of months should be 19 months.  along with certain no. of days

[code
7 years ago
To answer questions

1. I am using JPL.jar  that comes along with SWIPL(freely available prolog implementation)).
2. I have tried to run this sample code on 2 value function and code is


This code runs successfully and returns output


After running different options, have found that exception is on new Atom("_")..i was thinking that may be in java also, same "_" may be used for unknown values as in SWIPL but that does not work.  
7 years ago
Hi All,

I am trying to learn java connectivity with prolog using Eclipse IDE. I am successful in connectivity but not able to access required data. Here is sample code



In this code i want to access brand name of laptop in query but nullpointerexception arrive when i run this code for value X. I have tried to run same command in swipl


Anyone having information about this, please share and also any good reference to learn about java with prolog.

7 years ago
Thanks again Rob!!

Actually, being new to topic , it took time to understand concepts that were highlighted. I made few changes in code like added authentication and gmail settings updated, lowering down security of my gmail account so that my device could connect to gmail. Thankfully these changes worked and code is working at my end too.

Updated code



Thanks again for explanations of queries!!
Thanks a lot for quick response!!

I made change in default port setting as highlighted by Ron  and code is running but no result is coming on console now.



I suppose this line is not executing since next  line after this send message does not print text on console. So i suppose code enter into certain deadlock as eclipse shows application is running but no response is recorded on console.

Also , i have few other doubts in this sample code like , i have not entered password for mail authentication  So how this code works on authentication part. Also, IP  172.31.1.6
is proxy address of network..SO this also needs to bypassed to connect to gmail and send mail but this code doesn't ask for that credentials also.. SO this code will work then.

I found gmail alerted me when i tried to run this code by send warning mail in inbox but didn't receive email from java code..SO how to tackle this.
Hi all,

i am using JDK 1.8 and Eclipse Mars IDE .
I have added Javamail api in build path and also tried to enter proxy details in Window-> Preference-> Network settings-> Proxy settings. In proxy setting , i set proxy ip and other details to connect to internet.But when i run below code, exception is thrown. Please guide me , how to set up smtp server in eclipse so that i could send mail from java code in eclipse.

I run this sample code to send email from my system:

But this code gave exception