A new camera security system has been purchased by my employer and I will be the primary on its technical support. First and foremost, this system should not require too much of my time, but I will need to know how it is set up, troubleshoot and administer rights to different accounts. The vendor who we purchased the hardware (cameras) and service from is called Genetec. Look at
We have a couple centers in our organization where high school students attend the building at regular intervals, hence the need to put security cameras in different locations. The software is avail. two ways. Within our firewall there is a client program that we install on the person who wishes to monitor the cameras. This would be a couple people. Option 2 is a web client, that does not need to be installed on the computer. This is for customers outside of our firewall. I think the second group of customers are police, perhaps school administrators SRO’s and other agencies who care about this. They will use cameras to view shenenigans….
My colleague, who is retiring in 6 months is heading this up at the moment. She has signed up fora technical assistance newsletter (which my enthusiam is about a 1 on a scale of 5), to see if anything useful appears here. My experience says, “nope, nothing useful here, for any useful piece of information that may appear, it will certainly be lost in a canopy of sales propaganda….”
The gentec online tech ass portal at,
We have a guy names Sean Patton, who is our POC for the company who supports/builds the software. The software company is called front runner networks. Sean is the guy who gave my colleague a training session on how to install, configure etc the client and web client for the camera system (genetec).
- Genetec (hardware security cameras)
- Front runner network FRN (software company)
- Sean Patton – POC for FRN email@example.com
We have another internal person named Deb G who will be responsible for adding new users to the system and initial training session on how to use…..My colleague, Shirley and I will be responsible for setting up user account hierarchy (whatever that means). Probably means establishing what the account names and passwords should be…Shirley may set up a brief cheat sheet for Deb G to use.
A couple technical points from Shirley training with Sean Patton
there is a limit of 5 people that can log into the internal client software.
there is no limit on the web client (makes sense, it is a web interface – this is where our customers – police, SROs, administrators )
system with installed client needed to be at 2GB RAM (this is video processing)
There is an App avail. for mobile devices that does allow camera viewing from portable device. Which better also handle image processing and have a lot of avail. memory.
Reading through my Teach yourself C book and coming across “ahas and oh yeas”…..and just points that strike me that I would like to try to remember, so, write it down!!!
The latest version of C is ANSI 11 (2011)
The ANSI standard for C provides for portability across platforms.
C is modular.
Code is written in modules or functions (I wonder how different that is from a class)? I think I know…
This is old school, functional language, everything is not object oriented, which to me overcooks things a little anyway.
Code is organized into functions or routines that can accept parameters or arguments that allow the function to be reusable. Old school concept…well, at least a very will know and understood concept.
Know your problem. If you cant state the problem clearly, you wont be able to solve it cleanly. So, it seems obvious, but be able to state what you are writing your program to do. Like
read numbers from a file and create a total and average
count the number of times a value greater than 100 is read from a data file
accept a number from a console and write it to a data file
Once you have stated your problem, then you can begin creating an outline to solve the problem. You can start to see the high level steps needed to solve the problem. Problem solving is often times a linear process.
In C, create the source code, that’s the commands you type and save in the actual C language. That source code is then compiled into machine code to be run.
Choose an editor. You will need a editor where you could write your C code. Most editors come with tools that help you to write the code better and with help in using the language syntax. You could even write the code using notepad or a very basic editor. In Unix systems, you could use the VI editor. In a Windows system, you could use notepad.
Save the C source code as filename.c C source code must end in .c, that is what a C compiler is expecting.
When C source code compiles successfully, it create object code. The object code is what runs at the machine level. Don’t confuse object code with object oriented programming, very different concepts.
Like all good mature language, C has lots of pre-written functions stored in a *library that you can access and include in your programs. This is very standard protocol for high level languages like C, Java, PHP and others. You do not have to write every piece of code that you wish to use. Many of the things you want to do are already solved and stored in a file that is part of the pre-existing library of code. You simply have to include that library file in your program.
Creating the Helloworld.c file. I am using he Dev-C++ V 4.9 editor to create my source code. Here is a glimpse of my helloworld source code.
I can compile and run this source code file using the Execute menu provided by the IDE. I used the command prompt to run the executable file.
The better the IDE, the better the error reporting when you inevitably make mistakes in your syntax. A semi colon indicates the end of line, removing one from the end of a line produces a predictable error message when you attempt to compile the code.
Note that even in our initial hello world program, we include a reference to a library file. #include <filename>.
I bought a book at Borders this past weekend titled Teach yourself C programming in One Hr. a day. That sounds about how much time I can provide during my lunch hr while at work.
More to follow…
I know, not a very exciting title, and probably not a very exciting topic to most people, but to me, this is a little exciting. But first, a little backdrop story.
As a programmer, one of the things that provides pleasure and satisfaction is looking at code and improving it. Now improving is subjective, which believe it or not, much of programming *improvement is subjective. One of the not so subjective markers of good programming is re-using code. In other words, when code is replicated, over and over and there is very little difference in it, that is prime fodder for refactoring or improvement.
I have been working on an Access DB that is about 13 years old and has a lot of refactoring potential….
My customer emailed me and said “James, the kits are not showing on the check in form, can you look at?”. So, I get to play investigator, because most of the time, my customers do not provide good detailed explanations about problems in their code or application.
When I opened the form in question, I noticed the SQL statement executed in the Form_Load() event was missing the current year identifying in the WHERE clause. Nothing to complex here. Update the WHERE clause, check the result, as my customer to verify and i am done. Just before I was about to email my customer for the check, I noticed the sort buttons on the bottom of the form. There were 3 of them. When I clicked any of them, they all resulted in the same way, no records. When I looked a little harder, I saw the same SQL repeated 3 additional times, in each of the sort buttons click event, like btnDistrict_sort_click() or btnKit_sort_click(). Well, I started to change the WHERE clause in the additional code, but my inner programmer was yelling at me, maybe even a whisper like this “James, it does not matter if this is MS-SQL, MySQL, coldfusion, php or any other language, the code is still stinky and needs to be streamlined. James, there are 4 separate versions of almost identical SQL statements, the only difference is the sort statement., you know you should refactor that.”
So, I set off to create one master routine that was called by each of the events in the form. The events would be
- form load
- district sort
- kit sort
- teacher sort
- date sort ( I added this one)
I created a master function called getRecs and added parameters for the sort option to be passed in from the calling function. Like this
In the event for the button click or form load, I removed all the redundant SQL and replaced it with a couple lines like this:
Private sub btnDate_sort_click()
Dim stype as string
stype = “date”
And then in the next button click event, did the same, removing all the lengthy SQL and replacing with a couple statements, like this:
Private sub btnKit_sort_click()
Dim stype as string
stype = “kit”
In the getRecs() function, I added arguments to accept the parameters being passed in from the calling functions and used them in the SQL statement like this:
Private Sub getRecs(ByType sortval as String)
Dim x As String
x = “SELECT DISTINCTROW tblBookings.BookingID, [District] & ‘ ‘ & [Building_Name] AS Expr1, “
x = x & “[Teacher_LN] & ‘, ‘ & [Teacher_FN] AS Expr2, [Kit_Number] & ‘ ‘ & [Kit_Title] AS Expr3, “
x = x & “tblBookings.Booking_Box, tblBookings.Booking_Returned, tblBookings.Booking_BeginWeek, “
x = x & “tblBookings.Booking_EndWeek, tblSchoolYears.SchoolYear, tblSchoolYears.SchoolYearID”
x = x & ” FROM tblSchoolYears”
x = x & ” INNER JOIN (tblTeachers INNER JOIN ((tblDistricts”
x = x & ” INNER JOIN (tblBuildings INNER JOIN tblTeacher_Building ON tblBuildings.BuildingID = tblTeacher_Building.BuildingID) ON tblDistricts.DistrictID = tblBuildings.DistrictID)”
x = x & ” INNER JOIN (tblKits INNER JOIN tblBookings ON tblKits.KitID = tblBookings.KitID) ON tblTeacher_Building.Teacher_BuildingID = tblBookings.Teacher_BuildingID) ON tblTeachers.TeacherID = tblTeacher_Building.TeacherID)”
x = x & ” ON tblSchoolYears.SchoolYearID = tblBookings.SchoolYearID”
x = x & ” WHERE (((tblBookings.Booking_Returned) = No) AND ((tblBookings.Deleted) = No) “
x = x & ” AND ((tblSchoolYears.SchoolYearID) IN(16) AND tblBookings.Booking_BeginWeek < ” & whichrecs & ” )) “
‘what order – sortval,
If sortval = “k” Then
x = x & “ORDER BY [Kit_Number] “
ElseIf sortval = “t” Then
x = x & “ORDER BY [Teacher_LN] “
ElseIf sortval = “date” Then
x = x & “ORDER BY tblBookings.Booking_BeginWeek “
x = x & “ORDER BY [District] “
In the future, like next year, or when someone else looks at this code, they will only have to update 1 SQL statement, not 4 or 5.
Here is a little snapshot of the controls I added to the form and what the form result looks like.
Now that I am making regular updates to the code of this DB. I need to identify an intelligent way to track and manage the changes. A quick recap. This application has two DBs. One stores the code, the other stores the tables/data. I think it a good design. I am updating the code DB, not the data.
I have made several updates / fixes to the code and have been renaming the code DB appending the date to the end of the file name, like this:
After I make an update, and my customer agrees, I change the properties of the shortcut on their desktops. They have 2 workstations where they use the application from. Each has a shortcut on its desktop that points to the code DB that is stored on a network server.
As I discovered this am, only one of the workstations can have the application open at a time.
After I make a new update, I move the old version into a folder called estecDBs. This way, I have all the old DBs on the network still and could go back to a previous *build if necessary.
I also keep a document synched with the updates that says what was changed on each update. I store that document in the same folder as the old dbs.
When I open my MS access 2007 DB, I get greeted by a prompt that requires we to Trust a macro running in the database. I am not sure why it thinks it not trustworthy, but its a little inconvient to have to enable the macro each time I load the DB. I tried to persist the setting by saying always trust the content, which worked great when I loaded the DB the next time, EXCEPT, the macro did not run nor did the application prompt me to allow or enable it. Stupid, stupid. Now I get it, its probably me not understanding the options correctly, but ….
I had to find the Trust Center contents again so I could enable the prompting again….. which I did and all is fine, except I still have to allow the macro to run each time I open the DB.
On another note. I tried to load the same DB from my tower when I already had it open on my laptop. Initially, it just sat there. I thought, do you have access loaded on the tower? Of course I do, its part of the annoying MS suit. Why would it not load? I tried a second time and same thing, no load. Then I realized, this is not MS SQL or MySQL or a large scale enterprise wide application. this is little ole access running on a single workstation. At least that is the expectation. The application can only run a single thread or user. Clearly, it is not allowing two open sessions at once on the DB. I guess that makes sense when I think about it. It would be nice if access prompted me and said something like, “there is already a session open on this DB, can only have a single session, close the other” or something like that.
Finding the Trust Center option.
BTW, I found the options by clicking on the MS office icon (the main icon for file operations) and in the footer of the dialog was the Access options link, which brought up the trust center settings.
I have been getting some strange errors in a couple places in the access application. I mostly ignored the errors for the first few days, but eventually followed the recommendation to see if a reference to a file that was missing was causing the other problems.
The error message looked like this:
Following this error lead me into the VB editor under Tools | References, where I found the reference to the missing file (which had been refactored in the newer version of access 2007 which i was using).
Once I removed the reference to the missing utility.mda file, the errors cleared right up.