[perl] Writing my first module (IPTables::Rule); Looking for feedback

Well pretty much as the subject says... I've been hacking away with perl for a while, but this is the first time I've tried writing a module.
I think (hope) I'm on the right track in terms of doing it the "right" way (or one of the X "right" ways perl lets you!).
If you're bored and have time to have a glance over and tell me how I'm doing, that would be great
https://github.com/fukawi2/IPTables-Rule

juster wrote:This looks nice and seems to be very complete. Creating modules is a thankless art and I wish you the best. I skimmed through it and noticed a few things that stood out to me:
Thanks for your time and input
juster wrote:You use empty prototypes for all your functions. These are not necessary and I think you have picked up this habit from somewhere else. Most likely from shell scripting. I also only mention this because prototypes can be misleading to programmers because they almost always do the unexpected and cause subtle confusion.
Sure, let's say shell scripting............
Removed them all.
juster wrote:I see you call private functions, preceded by the ampersand (&). This is the old perl 4 syntax for calling functions. Luckily this ugliness is behind us. The only practical reason to use it now is to disable argument checking which has been previously enforced by prototypes. If you remove the empty prototypes you won't have to call your "private" subs by prefixing their names with ampersands.
I was actually aware the ampersands are not required, but I like them... They're just a little hint when skimming code that it's a function... Just like $, @ or % on variables. Having a Google around, I didn't actually know there was a difference between using it and not using it, so I'm removed them too. I'll get used to it
juster wrote:The setters in your docs use assignment instead of passing the new values as arguments to methods.
Doh, that's why an extra set of eyes is useful... The test module can't pick that up
Fixed also.
juster wrote:Lastly, and maybe most important, why not put this on CPAN? Join us in the chaos! Anyways... have fun and merry xmas.
I was thinking about it... Wanted to make sure it's not a complete dogs breakfast first though

Similar Messages

  • ITunes DJ suggestion (looking for feedback)

    Firstly, I HAVE sent this in as a suggestion already, but I am looking for feedback and suggestions from any of you to improve this.
    I just got into using iTunes DJ, and I think it is great. The only problem I have is the lack of simplicity to request songs. Not dealing with the wireless aspect (iPhones), DJ seems like it could be simplified rather than searching around different sections of iTunes, right clicking, dragging/dropping, whatever. This problem can arise when you are using this application for a party, and just anyone can walk up to request a song. Not everyone will know how it works, so they could easily search around and accidentally double click a song, defeating the purpose of DJ. Instead, why not just have a "view browser" option inside DJ, but with a few tweaks to go along with this specific application. The main change would be viewing "songs" in the browser along with "artist", "album", etc. Another difference, would be that these songs cannot be double clicked in order to solve the double clicking issue. Once the song is selected, there is a "request" button that, once pushed, it goes right into the queue just like any other meathod. This route, there is no leaving DJ. It can always stay right on the same page. Now, while some might not run into these kind of problems, it will still streamline the request feature a lot smoother for everyone. Lastly, Since DJ can have a selected source, such as a specific playlist, the browser should have one as well. This would be nice if you want to allow your guests to select any song, but have the main source of DJ play from a certain playlist. I have taken the liberty to edit a quick version of what I think it could look like. I would appreciate any feedback.
    Oh, and i thought of a random button as well, but didnt know what it should look like or how it would work specifically.
    http://i13.photobucket.com/albums/a257/kaptnsassypants/iTunes.jpg
    I can post a higher quality if needed.

    I thought I might give some updated information based on my current findings. It seems like it is actually a proximatey problem. Taking my computer closer to the unit seems to resolve the problem, but it is definately not out of range where I was trying to transmit from. I was still getting almost a full signal. Has anyone else had the same problem with the range not being very good?

  • Looking for feedback from those who have installed Windows

    I have an Intel iMac - brilliant machine, I love it. I have not installed Windows : I just don't have the need to justify doing it, but I'm glad to know I can if I do need, or just want to.
    Having a Mac is almost like being immune to viruses (almost - I'm not careless). Everytime I use a PC there are message about viruses - it must drive them crazy! And to install Windows on my iMac would render it vulnerable.
    I'm just looking for feedback from those who have taken the plunge: how's it working for you? I'm not so concerned about the speed...more so about .exe files running amok.
    There is no way I will install Windows without a valid need and hearing at least a couple of first hand user experiences

    I HAVE SPENT 1 HOUR TODAY AT THE APPLE SHOP ASKING THE GENIUS GUY - WHY ARE APPLE COMPUTERS IMMUNE TO VIRUS AND HOW DO I PROTECT MY PERSONAL INFORMATION FROM BEING INTERROGATED AND TRANSMITTED TO THE OUTSIDE WORLD.
    MY QUERY STEMS FROM EMAILS - IF THEY HAVE A PICTURE ATTACHED THE MACHINE WILL NOT OPEN THE PICTURES - THE MESSAGE SAYS TO PROTECT MY IDENTITY CLICK HERE IF YOU WISH TO DOWNLOAD. I HAVE TO MAKE A JUDGEMENT TO TRUST THE SITE WHICH SEEMS ODD AND SO WHEN I ALLOW THE DOWN - I DO WONDER WHAT IS GOING ON.
    I DO RUN A SEPARATE PC AND WHEN I DOWN LOAD THE MAILS ONTO THAT COMPUTER MY NORTON ENGAGES AND WARNS OF INFORMATION OF PRIVATE NATURE BEING ATTEMPTED TO BE TRANSMITTED - AT THAT STAGE I CAN STOP THE TRANSMISSION - ON THE MAC I HAVE NO MEANS - THE GENIUS GUY SAYS DON'T WORRY.
    HELP - CAN ANYONE TELL ME WHAT IS IT ABOUT MAC THAT WOULD SETTLE MY CONCERNS AND ALLOW ME TO DOWN LOAD IMAGES CONTAINED IN EMAIL WITHOUT WORRY OF THE COMPUTER BEING FRISKED FOR DATA AND IT BEING TRANSMITTED INTO THE OUTSIDE WORLD.

  • Looking for feedback on Photoshop web compatibility tool

    We initially build https://www.oss-usa.com/psd-parser?promo=psd-parser as internal tool for validating Photoshop artwork against known web compatibility issues and recently made it available as a free online service.  Looking for feedback from folks actively using Photoshop on web design projects.

    Hello otechcomputing. is this how you want to setup your network?
    If so, Guest Networks cannot be " extended" since it has Website Authentication encryption which the RE1000 does not support. Here are my suggestions:
    1. Main Network WiFi password should be WPA2 Personal (more secured)
    2. Enable Guest Access (password protected)
    3. Reconfigure the RE1000 to connect to the EA6500 (main network) and change the extender's network name and password (still WPA2 Personal). You can name it with "EXT" at the end to designate it as such.

  • MOVED: Looking for feedback on K8N Neo NF4 Platinum SLI, LUV THIS BOARD

    This topic has been moved to Overclockers & Modding Corner.
    Looking for feedback on K8N Neo NF4 Platinum SLI, LUV THIS BOARD

    Im no pro but with your raid setup you need to stay with bios 3.0, 3.1 or 3.2.  I understand that 3.3 & 3.4 causes problems but the new 3.53 beta bios fixes the problems in 3.3 & 3.4.  See below:
    https://forum-en.msi.com/index.php?topic=80933.120
    Regarding your pcie clock, if you are using coolbits and nvidia drivers only (no MSI drivers at all), then I have used nvidia's ntune to help set the clock.  For my x1 msi 6600gt, working backwards from the bus speed optimization it equalled to 106...but I am really not good at this and you should post your question under the VGA portion of this forum for a better answer to that 1 question.
    However, using MSI's DOT works well too and its automated.
    Btw, the pcie setting has nothing to do with your cpu/memory overclock.

  • Improving ASR9k resilience - Looking for feedback.

    Asking all our customers.  
    Looking for some other examples where we had an issues on the a9k where we might have some gap in system resiliency.  Looking for issues where we might have seen a HW or SW issue and the router didn't handle it in a way you would have preferred to allow network redundancy to take over.  Please provide as much information about the situation as you can.  As well as what behavior you believe should take place?  If you have SRs or bug IDs please include as well. 
    Here are some examples of the past that we have already addressed. 
    CSCuc04493 - Disable LC interfaces if online-diags reports datapath error
    This allows us to shutdown ports where datapath errors occur to allow network redundancy to kick in.
    CSCun00493 - Need recovery mechanism for Punt/FPGA CRC errors in RSP440 
    This has the RSP perform a failover or reload when it loses communication to the fabric.  
    Thanks,
    Bryan Garland 
    Bryan Garland  CCIE#1942
    Technical Leader, Engineering
    HERO BU- Deployment & Escalation

    Hi Bryan,
    I see the NP performance as an area for improvements. There are certain NP lock conditions where automatic action is taken to recover from this situation, but there is no such thing when it comes to an NP overload scenario. There are certain NP counters which indicate an NP performance overload, but it is cumbersome for the customers to monitor these values. So it would be nice to at least have logging entries if the NP is overloaded or the ability to have actions taken. A typical example would be netflow, which is intensive for the NP because it needs to create frame copies for netflow. There is a punt policer that protects the line card CPU, but with very low sampling rates and small packets at a high rate the NP might get overloaded, leading to intermitting packet loss (rare but possible).
    Cheers,
    Florian

  • Considering buying a 6D looking for feedback from someone who has one

    Looking for reviews of the Canon 6D from users of same

    I have t2i and bought 6d about two weeks ago.
    I'm still learning about 6d but 6d is better in every aspects.
    Worth for the money? Not sure.
    My t2i is good enough for my purpose.
    If I had no camera, I would buy t2(3,4,5)i over 6d(too much money).
    But I would pick 6d over 7d, if I have enough money.
    Again, 6d is very solid, powerful camera (for me) .

  • Iptables rule needed for DHCP client?

    For a long time I've had a rule in my iptables ruleset which explicitly allows replies from DHCP servers:
    -A INPUT -p udp -m udp --sport 67 --dport 68 -j ACCEPT
    Now I'm wondering if I actually need this. I don't filter any outgoing packets and I do have the usual "accept related and established packets" rule before this one. DHCP is really odd and exposes some edge-cases in network setup. In this case, there will be times when I don't have an IP (fresh start for an interface), or when I ask to renew a lease from one DHCP server but get a reply from a totally different one (yeah, our network is weird). I wonder if netfilter is smart enough to see those replies as "established" or "related". Does anybody know for sure? Do you use DHCP and iptables, without such a rule?

    I took the time to test various DHCP scenarios and found that indeed, it doesn't look like I need this rule. I originally started using it because I did need such a rule with ipfw on OS X - it would block the replies since it didn't know how to deal well with situations where you have to transmit with a 0.0.0.0 source IP.

  • How's this for a first attempt? Looking for feedback.

    I previously created a database in MS Excel for my Son's business.  It was "normalized" with lots of Application.Vlookup... commands building Listviews.  Everything was working fine until I upgraded my Office 2003 to Office 2010. 
    Since I got the 64-bit version of Office I can no longer use Treeview or Listview controls in Office forms.  Office will not allow both versions to be on the same computer.  So, I figured I'd convert the whole thing over to VB.NET.
    Anyway, I'm part of the way done with converting ONE of my userforms to VB.Net and I wanted to see if I was headed in the write direction or if I am moving toward a train wreck.
    I started with the Customers form because the table it connects too doesn't have any foreign keys.  The difficulties I ran into along the way were:
    trying to learn how to navigate through a dataset (used to be easy with the Recordset)
    Virtually all the references I found teach you to use the Wizard to connect to a database then drop it into a grid control.
    trying to populate the treeview control without being able to use "Keys".  This was an incredible nightmare.
    There were many other small hurdles along the way
    Oddly enough one of the most helpful books I found was for learning VB.NET 2005.  It was old enough so that the author made comparisons of .NET to VB6, highlighting the functionality lost with .NET.  Don't get me wrong, he wasn't bashing .NET but
    his book was where I discovered that the Treeview no longer uses "Keys".  I'm dreading the Listview struggle yet to come. </End Whining>
    Here is the form.  As it stands right now, the treeview on the left gets populated, when the user clicks on a node, the textboxes on the right are populated.
    Below is the Code I've written so far.
    Public Class frmCustomers
    Dim con As New OleDb.OleDbConnection
    Dim ds As New DataSet
    Dim da As OleDb.OleDbDataAdapter
    Dim inc As Integer
    Dim dbProvider As String
    Dim dbSource As String
    Dim sql As String
    Private Sub frmcustomers_load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    dbProvider = "PROVIDER=Microsoft.ACE.OLEDB.12.0;"
    dbSource = "Data Source = E:\TW DB Development\TWDB.accdb"
    con.ConnectionString = dbProvider & dbSource
    con.Open()
    sql = "SELECT * FROM Customers ORDER BY Customer_Name"
    da = New OleDb.OleDbDataAdapter(sql, con)
    da.Fill(ds, "Customer_List")
    con.Close()
    PopulateTreeview()
    End Sub
    Private Sub PopulateTreeview()
    Dim objLetterNode As TreeNode
    Dim objFirstNameNode As TreeNode
    Dim objCustomerTable As DataTable
    Dim iLastRecord As Integer
    Dim iRecordCount As Integer
    Dim sCustomerFullName As String
    Dim sCurrentAlpha As String
    Dim sCurrentFirstName As String
    Dim sNewAlpha As String
    Dim sNewFirstName As String
    objCustomerTable = ds.Tables("Customer_List")
    iLastRecord = objCustomerTable.Rows.Count - 1
    iRecordCount = 0
    ' Get Fullname, Firstname, and First Letter for first row of table
    sCustomerFullName = objCustomerTable.Rows(iRecordCount).Item("Customer_Name")
    sCurrentAlpha = FirstLetter(sCustomerFullName)
    sCurrentFirstName = GetFirstName(sCustomerFullName)
    tv.Nodes.Clear()
    ' Create Nodes for first letter, first name
    With tv.Nodes
    objLetterNode = .Add(sCurrentAlpha)
    With objLetterNode.Nodes
    objFirstNameNode = .Add(sCurrentFirstName)
    With objFirstNameNode.Nodes
    .Add(sCustomerFullName)
    End With
    End With
    End With
    ' Process remainder of table
    For iRecordCount = 1 To iLastRecord
    With tv.Nodes
    sCustomerFullName = objCustomerTable.Rows(iRecordCount).Item("Customer_Name")
    sNewAlpha = FirstLetter(sCustomerFullName)
    sNewFirstName = GetFirstName(sCustomerFullName)
    ' Is first letter the same
    If sNewAlpha = sCurrentAlpha Then
    ' Is first name the same
    With objLetterNode.Nodes
    If sNewFirstName = sCurrentFirstName Then
    With objFirstNameNode.Nodes
    .Add(sCustomerFullName)
    End With
    Else
    ' first name changed
    With objLetterNode.Nodes
    objFirstNameNode = .Add(sNewFirstName)
    With objFirstNameNode.Nodes
    .Add(sCustomerFullName)
    End With
    End With
    sCurrentFirstName = sNewFirstName
    End If
    End With
    Else
    ' first letter changed, therefore so did first name
    objLetterNode = .Add(sNewAlpha)
    sCurrentAlpha = sNewAlpha
    With objLetterNode.Nodes
    '.Add(sNewFirstName)
    objFirstNameNode = .Add(sNewFirstName)
    sCurrentFirstName = sNewFirstName
    With objFirstNameNode.Nodes
    .Add(sCustomerFullName)
    End With
    End With
    End If
    End With
    Next iRecordCount
    End Sub
    Private Function FirstLetter(str As String)
    ' Returns first letter of first name
    FirstLetter = Strings.Left(str, 1)
    End Function
    Private Function GetFirstName(str As String)
    ' Returns text before first space in fullname as First name
    GetFirstName = Strings.Left(str, Strings.InStr(str, " ") - 1)
    End Function
    Private Sub DisplayRow(r As DataRow)
    txtCustomerName.Text = r.Item("Customer_Name")
    txtAddressLine1.Text = r.Item("Address_Line_1")
    txtAddressLine2.Text = "" & r.Item("Address_Line_2")
    txtAddressLine3.Text = "" & r.Item("Address_Line_3")
    txtCountry.Text = "" & r.Item("Country")
    txtCity.Text = "" & r.Item("City")
    txtState.Text = "" & r.Item("Region")
    txtPostalCode.Text = "" & r.Item("Postal_Code")
    txtCustomerEmail.Text = "" & r.Item("email_Address")
    txtCustomerPhone.Text = "" & r.Item("Phone_Number")
    txtCustomerComments.Text = "" & r.Item("Comments")
    txtCustomerID.Text = r.Item("Customer_ID")
    End Sub
    Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
    Me.Close()
    End Sub
    Private Sub tv_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles tv.AfterSelect
    Dim sNodeText As String
    Dim table As DataTable = ds.Tables("Customer_List")
    Dim dr As DataRow()
    sNodeText = tv.SelectedNode.Text
    dr = table.Select("Customer_Name = '" & sNodeText & "'")
    If dr.Length > 0 Then
    DisplayRow(dr(0))
    End If
    End Sub
    End Class
    Previously I could populate the treeview in whatever random order the records were in the table.  With the new treeview I had to devise a way to add, Letters, First Names, and Full Names all in sorted order.
    Thanks,
    Ken

    Thanks :).
    This is essentially a "local" database as only one person will access it at a time.  We are placing the file in an area where it can accessed from more than one computer, but never more than one at a time.
    To be honest I would use SQL Express (mainly to bring myself into the 21st century) if I wasn't already finding VB.NET so frustrating.
    Ken,
    I thought that I’d "give you a taste" of this alternate. It’s a long route, but you might want to consider it because
    everything you do is very much tailored to what you want it to do. As it stands right now, it’s very simple - too much so - but this might give you food for thought.
    If you want to pursue it, I’m happy to help.
    I set up the beginnings of a namespace that I’m calling “Ken”. The main class in that namespace is a class named “CustomerInfo”.
    It needs a LOT of embellishing, including the ability to disallow duplicate entries (we’d need to discuss just how it should detect a duplicate entry – it’s not as straightforward as you might think) and other things, but it’s a start and it’ll do ok for this
    example.
    Before I get started here, I have the project folder zipped up and uploaded for you. I hope you’ll download it and take a look
    at the code that it’s that namespace.
    I have that
    uploaded
    to my website here.
    You’ll see that it’s about 700 lines of code so far and I’d venture to say that by the time we finished, it would be many THOUSANDS
    of lines of code. I bring this up because I want to emphasize that it’s a lot of work - but - it would be all customized to do what you want and it would be reusable by simply adding the namespace into another program.
    All of this is based around your screenshot from a few days ago:
    I only have, so far, the ability to “Add” via a method in the main class named “AddNewCustomer” which is overloaded; that is,
    there are several implementations of it, varying in the parameters used. I’ll demonstrate some of them in the examples that follow shortly.
    When you open the project in Visual Studio you’ll be asked to convert it because I use a much older version than you have. Just
    follow the prompts and it should convert fine. Once that’s done, it should open to the code view of Form1:
    Option Strict On
    Option Explicit On
    Option Infer Off
    Public Class Form1
    Private customerList As New List(Of Ken.CustomerInfo)
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    ' Example01()
    ' Example02()
    ' Example03()
    ' Example04()
    ' Example05a()
    ' Example05b()
    ' Example05c()
    Stop
    End Sub
    End Class
    Hey, where are those subs??
    Actually I broke Form1 apart so that I could show you the start of it above, and I have the subs mentioned in a Partial Class
    Form1 (partial just means that it will compile as all one). I’ll step through each sub below and explain what it’s demonstrating:
    I have the “Address” set up somewhat special. I have it so that you can’t have a second address line unless there’s a first
    line and you can’t have a third address line unless there’s both a first AND a second line. I think you agree with that thinking?
    Example01 is a demonstration of just one single line for the address:
    Private Sub Example01()
    Try
    Ken.CustomerInfo.AddNewCustomer(customerList, _
    "ABC Hardware Company", _
    "123 Main Street", _
    Ken.CountryName.USA, _
    "Charleston", _
    "South Carolina", _
    "29412", _
    "8138992347")
    MessageBox.Show(customerList(0).ToString, _
    "Example01")
    Stop
    Catch ex As Exception
    MessageBox.Show("An exception was thrown:" & _
    vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    Notice above that the parameters for the sub give you an idea about how it’s set up. This includes the use of an Enum (enumerator)
    for the country. This may or may not be a good idea, it really just depends on how many countries there could be. I have it currently set up with just three countries. I also have it set up for what I’m regarding “minimum required” – you’ll notice that there’s
    no place for the customer’s e-mail address or a comment. They are there though – set up as options (and I’ll demonstrate that in a bit also).
    Give thought about the countries to include, in particular questions about what the minimum required needs to be.
    For example, currently it REQUIRES a postal code. Do all of the countries you’ll be dealing with always have that? Further,
    the phone number MUST be ten (exactly ten) digits. For other countries maybe it should include the country code? Maybe some of them aren’t digits? I don’t know – but certainly you need to know this even if you stick with the database route.
    At any rate I had to start with some assumptions so that’s what I used.
    Example 2, below, shows using two lines for the address:
    Private Sub Example02()
    Try
    Ken.CustomerInfo.AddNewCustomer(customerList, _
    "ABC Hardware Company", _
    "123 Main Street", _
    "Building 'E'", _
    Ken.CountryName.USA, _
    "Charleston", _
    "South Carolina", _
    "29412", _
    "8138992347")
    MessageBox.Show(customerList(0).ToString, _
    "Example02")
    Stop
    Catch ex As Exception
    MessageBox.Show("An exception was thrown:" & _
    vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    Example 3, below, shows using three lines for the address:
    Private Sub Example03()
    Try
    Ken.CustomerInfo.AddNewCustomer(customerList, _
    "ABC Hardware Company", _
    "123 Main Street", _
    "Building 'E'", _
    "Suite 4", _
    Ken.CountryName.USA, _
    "Charleston", _
    "South Carolina", _
    "29412", _
    "8138992347")
    MessageBox.Show(customerList(0).ToString, _
    "Example03")
    Stop
    Catch ex As Exception
    MessageBox.Show("An exception was thrown:" & _
    vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    If you’re wondering about how all of those textual outputs shown in the MessageBox got formatted like that, look through the
    code of the namespace. Any “work” like that which the class can do, the class
    should
    do – that way it’s replicated when you reuse the class and it’s code that your form’s code doesn’t have to perform.
    Example 4, below, shows adding a comment BUT skipping the option for the e-mail:
    Private Sub Example04()
    Try
    Ken.CustomerInfo.AddNewCustomer(customerList, _
    "ABC Hardware Company", _
    "123 Main Street", _
    Ken.CountryName.USA, _
    "Charleston", _
    "South Carolina", _
    "29412", _
    "8138992347", _
    comments:="Customer pays slowly - be careful with credit!")
    MessageBox.Show(customerList(0).ToString, _
    "Example04")
    Stop
    Catch ex As Exception
    MessageBox.Show("An exception was thrown:" & _
    vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    Note the use of “comments:=”
    in the code above. That’s a very handy way of selecting the options that you want and leaving the other options as they default to (all options have to have a default).
    Example 5a, below, shows what happens if the e-mail is used but it’s malformed:
    Private Sub Example05a()
    Try
    Ken.CustomerInfo.AddNewCustomer(customerList, _
    "ABC Hardware Company", _
    "123 Main Street", _
    Ken.CountryName.USA, _
    "Charleston", _
    "South Carolina", _
    "29412", _
    "8138992347", _
    "[email protected]")
    MessageBox.Show(customerList(0).ToString, _
    "Example05a")
    Stop
    Catch ex As Exception
    MessageBox.Show("An exception was thrown:" & _
    vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    I am a strong advocate of data validation – on any and all levels that it can be done. Look at the code in the namespace to
    see how it was able to detect that what was entered wasn’t in correct format.
    Example 5b, below, shows entering the e-mail correctly:
    Private Sub Example05b()
    Try
    Ken.CustomerInfo.AddNewCustomer(customerList, _
    "ABC Hardware Company", _
    "123 Main Street", _
    Ken.CountryName.USA, _
    "Charleston", _
    "South Carolina", _
    "29412", _
    "8138992347", _
    "[email protected]")
    MessageBox.Show(customerList(0).ToString, _
    "Example05b")
    Stop
    Catch ex As Exception
    MessageBox.Show("An exception was thrown:" & _
    vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    Lastly, example 5c, below, shows entering both a comment and an e-mail address:
    Private Sub Example05c()
    Try
    Ken.CustomerInfo.AddNewCustomer(customerList, _
    "ABC Hardware Company", _
    "123 Main Street", _
    Ken.CountryName.USA, _
    "Charleston", _
    "South Carolina", _
    "29412", _
    "8138992347", _
    "[email protected]", _
    "Customer pays slowly - be careful with credit!")
    MessageBox.Show(customerList(0).ToString, _
    "Example05c")
    Stop
    Catch ex As Exception
    MessageBox.Show("An exception was thrown:" & _
    vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    Try it out. Download the project folder, let VS convert it and run it. Try entering something invalid in, for example, characters
    in the phone number, things like that. It needs a lot of improvement, but this might give you an idea of what I mean by “customized to what you want it to be”.
    For instance, your TreeView – have one or more methods in the class to build that and hand you (the consumer of the class) back
    the data to use to be able to quickly generate the TreeView showing anything you want it to show, any way you want it to show it.
    That’s the power of all of this.
    Also do know that “database or classes” isn’t accurate; they’re not mutually exclusive and in fact, most really involved programs
    which use a database back-end have many classes right along with it.
    Food for thought and I hope you found this helpful. :)
    Still lost in code, just at a little higher level.

  • Create custom rule: Looking for ORA errors in the alert log

    I would like to create a rule to notify me when ORA errors are generated to the alert log. When I try to create a rule, I seem to only be able to choose from predefined lists. Has anyone configured a rule for this?

    Grrr. This is for 10.2 Grid:
    Go to databases --> select your database
    Under Diagnostic summary, you'll see:
    Alert Log 28-Dec-2006 09:19:48
    The date part is a clickable link, click on it. Scroll to the bootom of the next page and click on:
    "Generic Alert Log Error Monitoring Configuration"
    Now read the page very carefully, its all self explanatory. The reason who haven't had some errors reported is because of that filter. Now set it up the way you want it.
    Good luck
    Bazzza

  • Just got my first macbook pro 15''2.4, was looking for feedback on parellels bootcamp and instaling windows 7

    ?

    Parallels and boot camp are two different approaches for installing Windows.
    I can tell you Parallels is a piece cake to install, and runs trouble free.
    What is your question?

  • Haskell State Monad Tutorial: looking for feedback

    I've written a tutorial of sorts for the Haskell state monad because I found it hard to grok at first (at least as a Haskell noob coming from an imperative background) and none of the explanations that I've found dissect it this way.
    You can find it here.
    If you know your way around Haskell,  take a look and let me know if I've made any mistakes.
    If you're learning Haskell and you're ready to take on the state monad, let me know if you find the tutorial useful.

    I'm thinking about your suggestion but so far I can't decide whether or not to implement it.
    Looking through the text, I agree that "transition" works in most cases (e.g.  "state transformer" -> "state transition function", stateTransformer -> stateTransitionFunction). At the same time, I see the function inside the state monad as a function which takes a state and changes (transforms) it, yielding a new state. I would say that the application of the function leads to a transition of state. My first instinct is to say that it's a matter of perspective. If you focus on the function, it's a transformation. If you focus on the state, it's a transition.
    I want to give it a bit more thought before I decide.
    Do you really think there's any risk of confusion with monad transformers? Also, what did you think of the tutorial in general?

  • Looking for feedback using Power Sync cart and apple configurator

    I am looking at mass deploying iPads using the Bretford PowerSync Cart and Apple Configurator.  Need information on how long it takes to fully power and sync units?

    You might try a Google search. Here's one I found.
    http://www.markrepp.com/2012/03/apple-configurator.html
     Cheers, Tom

  • New Hiphop/Rap/R&B Playlist ! Looking for feedback/followers

    Just created my first public playlist! Added it on to my website (www.questionnoir.com/pressplay)  Would love to hear what the spotify community has to say about it!  Any feedback is greatly appreciated!Any suggestions to add on some more music? Hows the order of the songs? Would love to hear your opinon :)   https://open.spotify.com/user/questionnoir/playlist/6yfcGJzd7aDx2k1QuobaSW www.questionnoir.com/PressPlay 

    Many of these songs are from early 90s files haring and so there are doubtless incorrect id3 tags, and many hundreds are from CDs I ripped at times when I had no internet connection so was entering data by hand in the fields I cared about.
    I think you can fix some of that by using the Advanced>Get Track Names function in iTunes. But, be warned, the people who upload to the Gracenotes Db seem to be more concerned about speed than accuracy. That's where a lot of my incorrect compilation problems came from. If that doesn't work, you can try this script:
    http://dougscripts.com/itunes/scripts/ss.php?sp=cddbsafarikit
    So if I were to go through (ugh) these thousands of files and uncheck the part of a compilation box on each one (I noted this is unavailable if more than one track is selected), would I then reConsolidate to get iTunes to reorganize the library?
    If you select more than one track and click "get info", you need to go the "options" tab instead of the "info" tab to modify this field. I know, what's up with that? I would suggest you try the script referenced in my 1st post, it's free and it will probably save you lots of time.
    No, iTunes will automatically reorganize the music files in finder as you change the information in iTunes. If you want to see it, just keep your music folder open and change something that affects folders in iTunes.

  • Looking for feedback, for a "premiere CC tutorial" video

    http://youtu.be/bPCI_3YQ1Us

    You did not do a bad job, but there are a lot of things you might want to do differently.
    First of all, the name of the product is Premiere Pro. The name Premiere was used by Adobe for their original video editing program, and it was changed to Premiere Pro over a decade ago.
    Second, the auto save files can take up quite a bit of room on a hard drive, so saying that they don't is incorrect.
    Third, keeping your media and your cache on the OS drive is not optimum. But then again, editing on a laptop is not exactly optimum, although sometimes necessary.
    Your accent is pretty think. While native English speakers can probably understand most of it OK, I think non-native speakers will have a tough time.
    Most tutorials start with the standard editing workspace. Yours has been modified without an explanation as to how or why. You briefly explain how later.
    You jump from topic to topic very quickly and without enough detail to be useful to beginners.
    If you want to produce short tutorials, pick a topic and cover it in detail. If you want to make a long series of tutorials, it is even more important to take your time and teach it in great detail, or at least in a way that beginners can find it useful.
    Good luck,
    -- Steven

Maybe you are looking for

  • Can i have 2 users on one iTunes instillation

    Thank you for reading my question, i would like to explain my situation properly. I have a PC and my father has a MAC at a different address in the UK. We both have iPhones and both struggled with iTunes to the point where we didn't use it. My brothe

  • Having a problem with HP Solution Center seeing my hp6940 printer

    So here's the environment, windows XP, ip address 192.168.50.2, hp 6940 at 10.9.26.100.  These two networks are connected by a router.  I can ping the printer, I can browse to the printer address and see the printer web pages.  If I bring up HP Solut

  • Digital audio SPDIF suddenly quit working

    I was watching a video yesterday on our home theater connected to my Macbook. The audio was connected using a SPDIF to toslink cable and everything was working fine until suddenly the audio stopped. Analog out still works and the internal speakers st

  • Active business function RE_GEN_CI_1

    Hi experts, I have installed SAP ERP 6.0 EHP4 Ready - Support Release 1, ABAP-based I want to active business function RE_GEN_CI_1. But I cannot find RE_GEN_CI_1 in T-code SFW5, what wrong? Please help me, Thanks so much

  • With All These New Feature Packs........

    With all the new feature packs that have been introduced here is a list of features that i would like to see introduced also..... 1. A password protected folder for all media files as well as document files 2. Better use of the gallery/albums....if a