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 SparseMatrix: | |
# Create a sparse matrix of size numRows x numCols initialised to 0 | |
def init(self, numRows, numCols): | |
self._numRows = numRows | |
self._numCols = numCols | |
self._elementList = list() | |
# Return the number of rows in the matrix | |
def numRows(self): | |
return self._numRows | |
# Return the number of colums in the matrix |
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 threading | |
def count_operation(): | |
for i in range(100): | |
print(threading.current_thread().getName() + '-' + str(i)) | |
# this is sequential execution - operation right after each other | |
count_operation() |
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.*; | |
import java.util.*; | |
public class HierarchyConverter { | |
LinkedList<String> output = new LinkedList<>(); | |
int maxlength = 0; | |
class Node{ | |
String org; |
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.ttm.testswingmaven; | |
import org.assertj.swing.aut.getting_started.SimpleCopyApplication; | |
import org.assertj.swing.edt.FailOnThreadViolationRepaintManager; | |
import org.assertj.swing.edt.GuiActionRunner; | |
import org.assertj.swing.fixture.FrameFixture; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.BeforeClass; | |
import org.junit.Test; |
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.ttm.testswingmaven; | |
import static javax.swing.SwingUtilities.invokeAndWait; | |
import static org.assertj.swing.aut.util.swing.ButtonUtil.addActionToButton; | |
import static org.assertj.swing.aut.util.swing.ButtonUtil.newButton; | |
import static org.assertj.swing.aut.util.swing.LabelUtil.newLabel; | |
import static org.assertj.swing.aut.util.swing.TextFieldUtil.newTextField; | |
import java.lang.reflect.InvocationTargetException; |
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
/** | |
* | |
* @author teguhteja | |
*/ | |
import java.awt.*; | |
import javax.swing.*; | |
// Extend JPanel to override its paintComponent() method: | |
class NewPanel extends JPanel { |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package gui5shape.demo; | |
import java.awt.Color; | |
import java.awt.Graphics; |
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"?> | |
<!--Launch4j executor script generated by Launch4jInt module. Do not modify, modifications will be overwritten anyway.--> | |
<project basedir="." default="all" name="Launch4jExecutor"> | |
<property location="/home/teguhteja/Downloads/launch4j" name="launch4j.dir"/> | |
<property location="/home/teguhteja/NetBeansProjects/GUILaunch4j01/nbproject/launch4jconfig.xml" name="launch4j.config"/> | |
<echo>Configuring Launch4j and generating executable for GUILaunch4j01 project:</echo> | |
<target name="all"> | |
<taskdef classname="net.sf.launch4j.ant.Launch4jTask" classpath="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar" name="launch4j"/> | |
<launch4j> | |
<config dontWrapJar="false" headerType="gui" jar="<your jar files>" |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package email; | |
/** | |
* | |
* @author teguhteja |
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
<%-- | |
Document : send_email | |
Created on : Jan 31, 2020, 3:34:58 PM | |
Author : teguhteja | |
--%> | |
<%@page contentType="text/html" pageEncoding="UTF-8"%> | |
<!DOCTYPE html> | |
<html> | |
<head> |
NewerOlder