I'm trying to modify this code to take advantage of classes and some other oop features. However, I'm struggling with getting beyond the basics. This is the code that I started with which I am trying to change and make more class absed. import glob import os import sys print(os.getcwd()) dir= raw_input(["Please enter directory location of dcp_inspect output"]) print (dir) os.chdir(dir) print(os.getcwd()) cpl = [] content = [] errors = [] contentkind = [] summary = [] for file in glob.glob("*"): try: print (file,'\t Was Successfully Opened') #file = DcpParse() newfile = file print('Scanning...', newfile) data = open(newfile) for each_line …

Member Avatar
+0 forum 0

package edu.edusys.demo.jdbc.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import edu.edusys.demo.jdbc.bean.Customer; public class CustomerDAO { private Connection connection; public CustomerDAO(Connection connection) { super(); this.connection = connection; } public boolean addCustomer(Customer customer) throws Exception { String sql = "INSERT INTO Customer" + "(name,address,phone)" + "VALUES (?,?,?)"; PreparedStatement ps = connection.prepareStatement(sql); ps.setString(1, customer.getName()); ps.setString(2, customer.getAddress()); ps.setString(3, customer.getPhone()); int n = ps.executeUpdate(); ps.close(); return n > 0; //Manage Customer servlet } public String deleteCustomer(String id) throws Exception { String sql = "DELETE FROM Customer WHERE customer_id = ?"; PreparedStatement ps = connection.prepareStatement(sql); ps.setString(1,id); System.out.println(ps.toString()); ResultSet rs = ps.executeQuery(); int n …

Member Avatar
+0 forum 0

Hi everyone My intention is to enable NTLM authentification when using the native PHP SOAP client, Most of the code is copied from an php.net manual example and it is said to be working. I'm trying to override the __doRequest function in the SoapClient class and let it use cURL. But I can't get the overriding part to work. __doRequest is never called, What am I doing wrong? Any suggestions ? [CODE]class ExtSoapClient extends SoapClient { private $proxy_login; private $proxy_password; ... public function __construct($wsdl, $options = array()) { $this->proxy_login = $options['proxy_login']; $this->proxy_password = $options['proxy_password']; $this->proxy_host = $options['proxy_host']; $this->proxy_port = $options['proxy_port']; …

Member Avatar
+0 forum 0

Would anyone be able to provide pointers / comments on this object-oriented PHP program? You can take a look at it on [URL=http://github.com/codejoust/PHPContactForm/]http://github.com/codejoust/PHPContactForm/[/URL] It's still a work in progress.

Member Avatar
+0 forum 0

The End.