use

Should I change my utilities.pl to a utilities.pm module?

In our product we have a big utilities file that we require (with do) at the beginning of a lot of our files. Is there a reason not to turn this into a module? For example, instead of doing this: do '../dbi_utilities.pl'; our ($db,$user,$pw,$attr); my $Data = DBI->connect($db,$user,$pw,$attr) or die "Could not connect to database: $DB...

How do I 'use' a Perl module in a directory not in @INC?

I have a module in the parent directory of my script and I would like to 'use' it. If I do use '../Foo.pm'; I get syntax errors. I tried to do: push @INC, '..'; use EPMS; and .. apparently doesn't show up in @INC I'm going crazy! What's wrong here? ...

How do I inherit subroutines in Perl with 'use base'?

How do I apply 'use base' in Perl to inherit subs from some base module? I'm used to C++ inheritance mechanics, and all the sites I googled for this caused more confusion then help. I want to do something like the following: #! /usr/bin/perl #The base class to inherit from use strict; use warnings; package 'TestBase'; #--------------...

Use Case Diagrams - Are arrows absolutely necessary?

Is it absolutely necessary to use "arrows" to show association between an actor and a use case in a use case diagram? I recently had to draw one for my Software Engineering assignment. But after doing a bit of research online on many articles, papers, online books and lecture notes from numerous other universities, it seemed that majori...

What's the purpose in hashing information?

After being taught how to create a hash table in class, I don't understand when hashing data would be useful. It seems to me that all hashing does is storing information in semi-random positions in an array. I want to know how any of the data can be made useful after it's stored. My question is this: what are some examples where hashi...

C#: Is there a way to check if a file is in use?

I'm writihg a program in C# that needs to repeatedly access 1 image file. Most of the time it works, but if my computer's running fast, it will try to access the file before it's been saved back to the filesystem and throw an error "File in use by another process". I would like to find a way around this, but all my Googling has only yie...

Drools related problem...

Hi I want to bring a little change in my site. So i have written a set of rules but I dont know how to fire them in the place that i want them to work i.e. the original code of my site.Can anyone plz help me on it? ...

Modelling the creation of an Actor in a use case diagram

Hi If you believe that a use case flow of events creates an actor, how would you model that? I have a use case that creates a windows service, which (in my mind) is another system with its own set of use cases and actors. At the moment it is not obvious from the use case diagram that an actor gets created as part of the flow of event...

What's a good way to handle development/production libs paths with Perl?

With Perl, what is an easy way to handle different development versus production libs paths? I want to use my local box path for testing, but when I launch I want it to automatically point to the production lib path. ...

try to use Module in Perl and print message if module not available

Hi, I wanted to be able to do this in Perl (the code below is Python lol) try: import Module except: print "You need module Module to run this program." Does anyone have any idea how to? ...

What happens in these Perl use lines?

I don't understand what happens here : use PAR { file => 'foo.par', fallback => 1 }; I think that's an anonymous hash. How is a module using it from the use line? Can you shed some light? EDIT: I'm not interested in the PAR module. I'm just interested in how that works behind the curtain. How can I configure my modules like that? ...

Use Application.Resources in Class

Hi. I do not know how to use a defined Application Style Resource in code. I have defined: <Application.Resources> <Style x:Key="OrangeButton" TargetType="{x:Type Button}"> I am using this resource in the XAML section of my application like: <Button Name="Button_Start" style="{StaticResource OrangeButton}" Margin="0"> and it is wor...

Videos - should I include them in my app?

Hey guys, Thanks to you, I got my working hours calculator on the App Store. :) Now for my next one - I want to make an app that includes video of my series of tutorials. However, I want to know whether it's good form to include the videos directly inside the app or not? If I do, the app size would be something in the region of 80mb as ...

How to use foreach() in any controller function of Codeigniter

Hey Guys, I’ve stucked with a problem. Can any body help me for….. “How to use foreach() in any controller function of Codeigniter”. Actually, i’ve a piece of codes which are placed in a Controller function in whihc i’m using foreach(). Here is the piece of code….. $this->load->model('board/dboard_members_model'); $data['query4'] = $thi...

No assemblies found on MoMA

Hi folks, Debian 5.0 32 bit Mono 2.4.2.3 Test Against Mono Version 2.6 After starting MoMA (Mono Migration Analyzer) On "Choosing assemblies to analysis" page I found no assemblies there. Please advise how to load/add assemblies there? TIA B.R. satimis ...

Use BDC column in list as multi-select column in sharepoint 2010

how to Use BDC column in list as multi-select column in sharepoint 2010 ...

USE CASE UML Modeling different ways to System access (SMS, IVR, WEB)

Hi, I’m working on a USE CASE diagram but I’m having problems modeling the following: A user wants to inquire his balance, but he can do it by phone, SMS or IVR. How should I represent the different ways? Each one has different flows. Should I model just one use case for each one, or should I represent the different ways as extended use ...

Same FOR Loop acts differently (WinXP)

I am trying to write a batch script with a section that ouputs your drive mappings to a text file, so i can restore it later once i wipe out the machine. I came up with this for loop to do it, but its acting differently when its a batch script versus running the command itself. This is the actual line of code: FOR /F "tokens=1,2" %i in...

import a library subroutine while using FindBin in perl

EDIT Sorry for the confusion, here is my updated question. I am using FindBin in my perl script like this: use FindBin qw($Bin); use lib "$Bin/../lib"; use multi_lib qw(say_hello_world); This works: multi_lib::say_hello_world(); but this does not: say_hello_world(); EDIT 2 This is how multi_lib.pm looks: package multi_lib; u...

how to use Dijkstra c++ code using array based version

I need to use (not implement) an array based version of Dijkstras algo .The task is that given a set of line segments(obstacles) and start/end points I have to find and draw the shortest path from start/end point.I have done the calculating part etc..but dont know how to use dijkstras with my code.My code is as follows class Point { pub...