Profile

Cover photo
Brandon Fischer
Works at Rosedale Union School District
Attends Rogue Community College
Lives in Bakersfield CA
20 followers|434,609 views
AboutPostsPhotosYouTubeReviews

Stream

Brandon Fischer

Shared publicly  - 
1
Add a comment...

Brandon Fischer

SysAdmin\NetAdmin  - 
 
 Does anyone have a moment to answer some questions about group policies and pushing .MSI files out for adobe reader? 
1
Brandon Fischer's profile photoMichael Steadman's profile photoMatthew Cobley's profile photoJosh Frye's profile photo
8 comments
 
Sign up for a Adobe distribution license, when I find the URL for the sign up I will make a main post to share with everyone. The sad thing about Adobe reader is you will get a exe file, not a msi file.
Last time I did some experimenting on trying to make a package for Adobe reader, you had to use their software to make a custom package. I got disgusted and handed everything I had off to our SCCM specialist. So I am not sure how he or the SCCM group is doing it right now.
Add a comment...

Brandon Fischer

Dev\Code\Script  - 
 
Can anyone help me figure how to get this code to display correctly in a JTextArea? I'm using JDBC, we are able to get the code to send over the string buffer to the main class but the format will not display correctly. The first column will display straight as well as the second but after that the format is all sloppy. The strange thing is that we checked the code output into the command line output area and it will format it correctly when you display it in that area but not in the text area. If anyone can help that would be amazing! 

package pkgfinal;
import java.sql.*;

public class connectURL {
    // Declare the JDBC objects.
private Connection con = null;
private Statement stmt = null;
private ResultSet rs = null;
private String URLQuery;
private ResultSetMetaData rsmd;
private StringBuffer sbf;

 public connectURL(String queryString) throws Exception{
              sbf = new StringBuffer();
            //  sbf.delete(0, sbf.length());
                // URLQuery = query;
// Create a variable for the connection string.
String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
"databaseName=Final;integratedSecurity=true;";

       
        // Establish the connection.
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            con = DriverManager.getConnection(connectionUrl);
            String t =queryString;
            // Create and execute an SQL statement that returns some data.
            stmt = con.createStatement();
                       
            rs = stmt.executeQuery(t);
                        rsmd = rs.getMetaData();
       
            int columnCount = rsmd.getColumnCount ();
            String[] columnLabels = new String[columnCount];
            int[] columnWidths = new int[columnCount];
            for (int i = 1; i <= columnCount; ++i) { 
                columnLabels[i-1] = rsmd.getColumnLabel (i);
                columnWidths[i-1] = Math.max (columnLabels[i-1].length(),
                                              rsmd.getColumnDisplaySize (i)+10);
            }           
                             
                  // Output the column headings.
            for (int i = 1; i <= columnCount; ++i) {
                 sbf.append(format (rsmd.getColumnLabel(i), columnWidths[i-1] ));
                 sbf.append("\t");
                 
            }           
                  sbf.append("\n");           
                // Output a dashed line.
            StringBuffer dashedLine;
            for (int i = 1; i <= columnCount; ++i) {
                for (int j = 1; j <= columnWidths[i-1]; ++j)
                    
                 sbf.append("-");
                 sbf.append("  \t");
                 
            }
                  sbf.append("\n");   
                       
              // Iterate throught the rows in the result set and output
            // the columns for each row. 
            while (rs.next ()) {
                for (int i = 1; i <= columnCount; ++i) {
                    String value = rs.getString (i);
                    if (rs.wasNull ())
                        value = "<null>";
                     sbf.append(format (value, columnWidths[i-1]));
                     sbf.append("     \t \t \t        ");
                }
                sbf.append("\n");
            }      
            
}
       public String toString(){
      
         return  sbf.toString();     
       }  

  // Format a string so that it has the specified width.
  
       private static String format (String s, int width)
    {
        String formattedString;

        // The string is shorter than specified width,
        // so we need to pad with blanks.
        if (s.length() < width) {
            StringBuffer buffer = new StringBuffer (s);
            for (int i = s.length(); i < width; ++i)
                buffer.append (" ");
            formattedString = buffer.toString();
        }

        // Otherwise, we need to truncate the string.
        else
            formattedString = s.substring (0, width);

        return formattedString;
    }
         
}
1
skooter Martin's profile photoBrandon Fischer's profile photo
10 comments
 
It's java II at my college. 
Add a comment...

Brandon Fischer

Discussion  - 
 
Can anyone help me figure how to get this code to display correctly in a JTextArea? I'm using JDBC, we are able to get the code to send over the string buffer to the main class but the format will not display correctly. The first column will display straight as well as the second but after that the format is all sloppy. The strange thing is that we checked the code output into the command line output area and it will format it correctly when you display it in that area but not in the text area. If anyone can help that would be amazing! 

package pkgfinal;
import java.sql.*;

public class connectURL {
    // Declare the JDBC objects.
private Connection con = null;
private Statement stmt = null;
private ResultSet rs = null;
private String URLQuery;
private ResultSetMetaData rsmd;
private StringBuffer sbf;

 public connectURL(String queryString) throws Exception{
              sbf = new StringBuffer();
            //  sbf.delete(0, sbf.length());
                // URLQuery = query;
// Create a variable for the connection string.
String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
"databaseName=Final;integratedSecurity=true;";

       
        // Establish the connection.
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            con = DriverManager.getConnection(connectionUrl);
            String t =queryString;
            // Create and execute an SQL statement that returns some data.
            stmt = con.createStatement();
                       
            rs = stmt.executeQuery(t);
                        rsmd = rs.getMetaData();
       
            int columnCount = rsmd.getColumnCount ();
            String[] columnLabels = new String[columnCount];
            int[] columnWidths = new int[columnCount];
            for (int i = 1; i <= columnCount; ++i) { 
                columnLabels[i-1] = rsmd.getColumnLabel (i);
                columnWidths[i-1] = Math.max (columnLabels[i-1].length(),
                                              rsmd.getColumnDisplaySize (i)+10);
            }           
                             
                  // Output the column headings.
            for (int i = 1; i <= columnCount; ++i) {
                 sbf.append(format (rsmd.getColumnLabel(i), columnWidths[i-1] ));
                 sbf.append("\t");
                 
            }           
                  sbf.append("\n");           
                // Output a dashed line.
            StringBuffer dashedLine;
            for (int i = 1; i <= columnCount; ++i) {
                for (int j = 1; j <= columnWidths[i-1]; ++j)
                    
                 sbf.append("-");
                 sbf.append("  \t");
                 
            }
                  sbf.append("\n");   
                       
              // Iterate throught the rows in the result set and output
            // the columns for each row. 
            while (rs.next ()) {
                for (int i = 1; i <= columnCount; ++i) {
                    String value = rs.getString (i);
                    if (rs.wasNull ())
                        value = "<null>";
                     sbf.append(format (value, columnWidths[i-1]));
                     sbf.append("     \t \t \t        ");
                }
                sbf.append("\n");
            }      
            
}
       public String toString(){
      
         return  sbf.toString();     
       }  

  // Format a string so that it has the specified width.
  
       private static String format (String s, int width)
    {
        String formattedString;

        // The string is shorter than specified width,
        // so we need to pad with blanks.
        if (s.length() < width) {
            StringBuffer buffer = new StringBuffer (s);
            for (int i = s.length(); i < width; ++i)
                buffer.append (" ");
            formattedString = buffer.toString();
        }

        // Otherwise, we need to truncate the string.
        else
            formattedString = s.substring (0, width);

        return formattedString;
    }
         
}
1
Brandon Fischer's profile photo
 
Figured it out! Thanks. Just changed the font to MONOSPACED. For some reason those other fonts mess up the format output. 
Add a comment...

Brandon Fischer

commented on a video on YouTube.
Shared publicly  - 
 
Thanks! Best video that I could find. 

Brandon Fischer

Shared publicly  - 
 
Check out this video on YouTube:
1
Add a comment...

Brandon Fischer

Shared publicly  - 
1
Add a comment...
 
Can anyone help me figure how to get this code to display correctly in a JTextArea? I'm using JDBC, we are able to get the code to send over the string buffer to the main class but the format will not display correctly. The first column will display straight as well as the second but after that the format is all sloppy. The strange thing is that we checked the code output into the command line output area and it will format it correctly when you display it in that area but not in the text area. If anyone can help that would be amazing! 

package pkgfinal;
import java.sql.*;

public class connectURL {
    // Declare the JDBC objects.
private Connection con = null;
private Statement stmt = null;
private ResultSet rs = null;
private String URLQuery;
private ResultSetMetaData rsmd;
private StringBuffer sbf;

 public connectURL(String queryString) throws Exception{
              sbf = new StringBuffer();
            //  sbf.delete(0, sbf.length());
                // URLQuery = query;
// Create a variable for the connection string.
String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
"databaseName=Final;integratedSecurity=true;";

       
        // Establish the connection.
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            con = DriverManager.getConnection(connectionUrl);
            String t =queryString;
            // Create and execute an SQL statement that returns some data.
            stmt = con.createStatement();
                       
            rs = stmt.executeQuery(t);
                        rsmd = rs.getMetaData();
       
            int columnCount = rsmd.getColumnCount ();
            String[] columnLabels = new String[columnCount];
            int[] columnWidths = new int[columnCount];
            for (int i = 1; i <= columnCount; ++i) { 
                columnLabels[i-1] = rsmd.getColumnLabel (i);
                columnWidths[i-1] = Math.max (columnLabels[i-1].length(),
                                              rsmd.getColumnDisplaySize (i)+10);
            }           
                             
                  // Output the column headings.
            for (int i = 1; i <= columnCount; ++i) {
                 sbf.append(format (rsmd.getColumnLabel(i), columnWidths[i-1] ));
                 sbf.append("\t");
                 
            }           
                  sbf.append("\n");           
                // Output a dashed line.
            StringBuffer dashedLine;
            for (int i = 1; i <= columnCount; ++i) {
                for (int j = 1; j <= columnWidths[i-1]; ++j)
                    
                 sbf.append("-");
                 sbf.append("  \t");
                 
            }
                  sbf.append("\n");   
                       
              // Iterate throught the rows in the result set and output
            // the columns for each row. 
            while (rs.next ()) {
                for (int i = 1; i <= columnCount; ++i) {
                    String value = rs.getString (i);
                    if (rs.wasNull ())
                        value = "<null>";
                     sbf.append(format (value, columnWidths[i-1]));
                     sbf.append("     \t \t \t        ");
                }
                sbf.append("\n");
            }      
            
}
       public String toString(){
      
         return  sbf.toString();     
       }  

  // Format a string so that it has the specified width.
  
       private static String format (String s, int width)
    {
        String formattedString;

        // The string is shorter than specified width,
        // so we need to pad with blanks.
        if (s.length() < width) {
            StringBuffer buffer = new StringBuffer (s);
            for (int i = s.length(); i < width; ++i)
                buffer.append (" ");
            formattedString = buffer.toString();
        }

        // Otherwise, we need to truncate the string.
        else
            formattedString = s.substring (0, width);

        return formattedString;
    }
         
}
1
Brandon Fischer's profile photo
 
Figured it out! Thanks. Just changed the font to MONOSPACED. For some reason those other fonts mess up the format output. 
Add a comment...

Brandon Fischer

Discussion  - 
 
Can anyone help me figure how to get this code to display correctly in a JTextArea? I'm using JDBC, we are able to get the code to send over the string buffer to the main class but the format will not display correctly. The first column will display straight as well as the second column in the JTextArea but after that the format is all sloppy. The strange thing is that we checked the code output into the command line output area and it will format it correctly when you display it in that area but not in the text area. If anyone can help that would be amazing! 

package pkgfinal;
import java.sql.*;

public class connectURL {
    // Declare the JDBC objects.
private Connection con = null;
private Statement stmt = null;
private ResultSet rs = null;
private String URLQuery;
private ResultSetMetaData rsmd;
private StringBuffer sbf;

 public connectURL(String queryString) throws Exception{
              sbf = new StringBuffer();
            //  sbf.delete(0, sbf.length());
                // URLQuery = query;
// Create a variable for the connection string.
String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
"databaseName=Final;integratedSecurity=true;";

       
        // Establish the connection.
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            con = DriverManager.getConnection(connectionUrl);
            String t =queryString;
            // Create and execute an SQL statement that returns some data.
            stmt = con.createStatement();
                       
            rs = stmt.executeQuery(t);
                        rsmd = rs.getMetaData();
       
            int columnCount = rsmd.getColumnCount ();
            String[] columnLabels = new String[columnCount];
            int[] columnWidths = new int[columnCount];
            for (int i = 1; i <= columnCount; ++i) { 
                columnLabels[i-1] = rsmd.getColumnLabel (i);
                columnWidths[i-1] = Math.max (columnLabels[i-1].length(),
                                              rsmd.getColumnDisplaySize (i)+10);
            }           
                             
                  // Output the column headings.
            for (int i = 1; i <= columnCount; ++i) {
                 sbf.append(format (rsmd.getColumnLabel(i), columnWidths[i-1] ));
                 sbf.append("\t");
                 
            }           
                  sbf.append("\n");           
                // Output a dashed line.
            StringBuffer dashedLine;
            for (int i = 1; i <= columnCount; ++i) {
                for (int j = 1; j <= columnWidths[i-1]; ++j)
                    
                 sbf.append("-");
                 sbf.append("  \t");
                 
            }
                  sbf.append("\n");   
                       
              // Iterate throught the rows in the result set and output
            // the columns for each row. 
            while (rs.next ()) {
                for (int i = 1; i <= columnCount; ++i) {
                    String value = rs.getString (i);
                    if (rs.wasNull ())
                        value = "<null>";
                     sbf.append(format (value, columnWidths[i-1]));
                     sbf.append("     \t \t \t        ");
                }
                sbf.append("\n");
            }      
            
}
       public String toString(){
      
         return  sbf.toString();     
       }  

  // Format a string so that it has the specified width.
  
       private static String format (String s, int width)
    {
        String formattedString;

        // The string is shorter than specified width,
        // so we need to pad with blanks.
        if (s.length() < width) {
            StringBuffer buffer = new StringBuffer (s);
            for (int i = s.length(); i < width; ++i)
                buffer.append (" ");
            formattedString = buffer.toString();
        }

        // Otherwise, we need to truncate the string.
        else
            formattedString = s.substring (0, width);

        return formattedString;
    }
         
}
1
Electric Vez's profile photoBrandon Fischer's profile photoMarco Dörfliger's profile photo
3 comments
 
Yeah you need to use a fixed-width font. 
Add a comment...

Brandon Fischer

Service Questions  - 
 
Has anyone had this problem before? It feels like it's locking up on one side and the tires are skidding when I put the truck in 4Lo or 4ish. The damn wheels feel like they are going to fall off on that side. 
4
Mike B's profile photo
2 comments
Mike B
 
Umm the diff, I just watched the vid
Add a comment...
Collections Brandon is following
Education
  • Rogue Community College
    present
    BS/ Transfer - SOU (Computer Network Security and System Information Assurance)
  • Grants Pass High School
    1999 - 2003
Basic Information
Gender
Male
Looking for
Networking
Work
Occupation
Network Administration/ Systems Support
Skills
Computer Network Security, Database Management, Computer Hardware, Java, Java Script, HTML, CSS, SQL.
Employment
  • Rosedale Union School District
    Systems Support Specialist, 2014 - present
  • VA
    Work Study, 2012 - 2013
    Receptionist • Answered, screened and directed inbound phone calls. • Handled general requests for information and data. • Maintained and organized sensitive client files.
  • USN
    Operation Specialist, 2007 - 2012
    Operations Lead Project Manager • Managed and directly supervised a division of 26 while at 80% manning. • Scheduled all short and long term company maintenance; conceived, developed, and instituted a robust schedule using calculated combinations of logistics, personnel and maintenance resources to optimize output. • Sought as top mentor within company; goal-oriented team player recognized for strong communication skills. Fitness Director and Trainer • Lead weekly fitness sessions for over 300 company employees; directly managed fitness standards and personally entered and verified accuracy of database for 55 employees. • Ambassador of America hospitality and culture during joint operations with foreign nations. Data Exchange Specialist • Utilized advanced communications technology to build and coordinate massive tactical data exchange and networking between over a dozen nations in support of deployment counter-piracy missions. • Provided identification data critical to national security to top decision-makers… • Organized and briefed top company executives and their staff of 30+ tacticians daily to direct company coordination while performing in multi-national deployment operations; critical to data exchange between over a dozen nations in support of counter-piracy operations. • Managed Complicated Multi-Network Architectures, including directing, trouble shooting of 20+ warships.
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Bakersfield CA
Previously
Medford OR - Grants Pass OR - Everett WA
Links
Her students love her. She really carefully crafts teaching plans for each student and works very hard to make sure they understand the concepts of music theory.
Public - 8 months ago
reviewed 8 months ago
Tim is the man!
Public - 11 months ago
reviewed 11 months ago
Selection is minimal.
Public - a year ago
reviewed a year ago
5 reviews
Map
Map
Map
Best pizza I've had in Bakersfield.
Public - a year ago
reviewed a year ago
Expensive but they usually have all the good techie stuff.
Public - a year ago
reviewed a year ago