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 logging | |
SETTINGS = { | |
'filename': 'out.log' | |
} | |
def setup_logger(date_format='%m-%d-%Y %H:%M:%S', level=logging.INFO): | |
logging.basicConfig(filename=SETTINGS['filename'],encoding='utf-8',format='[%(levelname)s] %(asctime)s %(message)s ', datefmt=date_format, level=level) | |
def generate_logs(): |
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
class HelloWorld { | |
public static void main(String[] args) { | |
int[] arr = {3, 4, 11, 24, 34, 7, 5, 109, 45, 6}; | |
int key = 7; | |
for(int i = 1; i < arr.length; i++) { | |
if(arr[i] == key) { | |
System.out.println("The element is present a loc:" + i); | |
return; | |
} | |
} |
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
var heroes = [ | |
{name: “Batman”, franchise: “DC”}, | |
{name: “Ironman”, franchise: “Marvel”}, | |
{name: “Thor”, franchise: “Marvel”}, | |
{name: “Superman”, franchise: “DC”} ]; | |
var marvelHeroes = heroes.filter(function(hero) { | |
return hero.franchise == “Marvel”; | |
}); |
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
package com.sapient.aop; | |
import org.aspectj.lang.JoinPoint; | |
import org.aspectj.lang.annotation.After; | |
import org.aspectj.lang.annotation.AfterReturning; | |
import org.aspectj.lang.annotation.AfterThrowing; | |
import lombok.extern.slf4j.Slf4j; | |
@Slf4j |
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
package p1; | |
import p1.exceptions.EquationIncomplete; | |
import p1.exceptions.InvalidOperand; | |
import p1.exceptions.InvalidOperator; | |
import p1.runtimepoly.ArithmeticFactory; | |
import p1.runtimepoly.TrigonometricOp; | |
import p1.runtimepoly.ScientificOp; | |
public class ExpressionEvaluator extends Evaluator { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.sapient</groupId> | |
<artifactId>jpa-project</artifactId> | |
<version>0.0.1-SNAPSHOT</version> |
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
package com.sapient.service; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
public class Main { |
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
package com.sapient.util; | |
public class MyMath { | |
public static boolean isPalindromeNumber(int n) { | |
String s = String.valueOf(n); | |
StringBuilder sb = new StringBuilder(s); | |
int n1 = Integer.parseInt(sb.reverse().toString()); |
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
Sep 16 15:08:05 akhil-Aspire-A515-51G rsyslogd: [origin software="rsyslogd" swVersion="8.32.0" x-pid="1067" x-info="http://www.rsyslog.com"] rsyslogd was HUPed | |
Sep 16 15:09:07 akhil-Aspire-A515-51G wpa_supplicant[1090]: wlp3s0: WPA: Group rekeying completed with e4:ca:12:ad:fa:86 [GTK=TKIP] | |
Sep 16 15:09:37 akhil-Aspire-A515-51G chromium-browser.desktop[3524]: [1:18:0916/150937.772306:ERROR:data_channel.cc(44)] Accepting maxRetransmits = -1 for backwards compatibility | |
Sep 16 15:09:37 akhil-Aspire-A515-51G chromium-browser.desktop[3524]: [1:18:0916/150937.772439:ERROR:data_channel.cc(49)] Accepting maxRetransmitTime = -1 for backwards compatibility | |
Sep 16 15:09:43 akhil-Aspire-A515-51G chromium-browser.desktop[3524]: [1:1:0916/150943.865937:ERROR:render_media_log.cc(27)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"MediaSource endOfStream before demuxer initialization completes (before HAVE_METADATA) is treated as an error. This may also occur as consequence of other MediaSource errors before HAVE_METADATA."} | |
S |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<link rel="stylesheet" href="style.css"> | |
<title>Document</title> | |
</head> | |
<body> |
NewerOlder