This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
Delimiter = " --> " | |
def addSecs(tm, secs): | |
fulldate = datetime.datetime(100, 1, 1, tm.hour, tm.minute, tm.second) | |
fulldate = fulldate + datetime.timedelta(seconds=secs) | |
return fulldate.time() | |
with open("E:\TLOR2002.srt") as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when creating SOAP Request, in Stub class | |
for which method you want to add header, Under this method just add this hashmap and fill that hashmap with a key value pair if you want to send details in the form of key value. We can create a list also if we want to send List values in Header. | |
This is an example to send Headers in Http Request. Here I am sending client ID and Password to INDUSIND Bank at the time of sending SOAP Request. | |
Hashtable headers=new Hashtable(); | |
headers.put("User-Id", "KapilrajChouhan"); | |
headers.put("Password", "password"); | |
_setProperty(HTTPConstants.REQUEST_HEADERS, headers); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<!-- saved from url=(0093)https://10.72.12.63/cgi-bin/WebObjects/CSA.woa/16/wo/x7voSlseu4se2Pgxr532W5PvP0P/10.10.1.3.83 --> | |
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta name="generator" content="Adobe GoLive"> | |
<title>InstaPago Receipt Reprint / Reimpresion Del Recibo</title> | |
<link name="stylePage" rel="stylesheet" type="text/css" href="./receipt_style.css"> | |
<link name="stylePrint" href="./receipt_style_print.css" rel="stylesheet" type="text/css" media="print"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem :- Error Occured when compilling my code which gives error - | |
Method parseDouble(java.lang.String) not found in class java.lang.Double. | |
double _contractNett = Double.parseDouble(_contractNet); | |
Solution :- After Reaserch I found that the runtime environment I was using belongs to an older version of Java, a pre-1.2 release for sure. The method 'parseDouble' was first introduced in Java 1.2. So if enyone is using Older version or Java 1.1 then he can Solve this Problem like this ....... :-- | |
double _contractNett = Double.valueOf(_contractNet).doubleValue(); | |
That's It.... Problem solved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.json.JSONObject; | |
import org.json.XML; | |
import java.io.*; | |
public class ConvertXMLToJson{ | |
public static void main(String[] args) throws Exception | |
{ | |
String fileName = "D:\\temp.json"; | |
try | |
{ | |
File file = new File ("D:\\example.xml"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
public class CandidateCode | |
{ | |
private static int cadbury(int m,int n,int p,int q) | |
{ | |
if (m>n){ | |
int temp=m; | |
m=n; | |
n=temp; | |
}if (p>q){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class FindDuplicateNumberInSeries | |
{ | |
public static void main(String[] args) | |
{ | |
Scanner scan= new Scanner(System.in); | |
int n = scan.nextInt();//Enter last number (Must have greater then 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Convert our ".jks" file to ".p12" (PKCS12 key store format): | |
keytool -importkeystore -srckeystore oldkeystore.jks -destkeystore newkeystore.p12 -deststoretype PKCS12 | |
1.1. To List out new keysrore File : | |
keytool -deststoretype PKCS12 -keystore newkeystore.p12 -list | |
2. Extract pem (certificate) from ".p12" keysotre file: | |