sub

Hiding Subreports in SQL Report (RDL)

I have a bunch a reports that are printed out and mailed to clients. At the top of the report is the return address, left aligned. I was asked to add an optional logo to the report. This logo should be left of the return address. (The logo and all other info is stored in the database). So if the logo exists, you SHOULD see: <someimage> ...

have a select and want to also retrieve count of the records

Dim db2 As New NewsDataContext Dim filter As String = "System" Dim Msg = From m In db2.Blog_Messages _ **From c In db2.Blog_Comments _** Join u In db2.users On m.userID Equals u.userid _ Where m.userID.Equals(filter) _ **Where c.MessageID.Equals(myRec) _** Group c By c.MessageID I...

Delete digits in Python (Regex)

I'm trying to delete all digits from a string. However the next code deletes as well digits contained in any word, and obviously I don't want that. I've been trying many regular expressions with no success. Thanks! s = "This must not b3 delet3d, but the number at the end yes 134411" s = re.sub("\d+", "", s) print s Result: This...

Can I use re.sub (or regexobject.sub) to replace text in a subgroup?

I need to parse a configuration file which looks like this (simplified): <config> <links> <link name="Link1" id="1"> <encapsulation> <mode>ipsec</mode> </encapsulation> </link> <link name="Link2" id="2"> <encapsulation> <mode>udp</mode> </encapsulation> </link> </links> My goal is to be able to change parameters specific to a ...

hw search substring in a list of indexed strings?

i am implementing dictionary in which key is a string keyword.suppose i have following keys in dictionary. mat**hon** sat**hon** lat**hon** now if i serach single keyword suppose mathon it will search it in constant time.but if i am to search hon i want all of three words to be retreived in constant time or minimum time possible like...

Software Development Analysis

What do you think of Mr. King's software development analyst at http://devadept.com/? I ask because reading his blog has made me rethink how I should be coding software. I mean, I used to concern myself with just getting a project done, but I think I may be missing something and his blog makes me feel that way. Am I just a programmer ...

Union as sub query MySQL

I'm wanting to optimize a query using a union as a sub query. Im not really sure how to construct the query though. I'm using MYSQL 5 Here is the original query: SELECT Parts.id FROM Parts_Category, Parts LEFT JOIN Image ON Parts.image_id = Image.id WHERE ( ( Parts_Category.category_id = '508' OR Parts_Categ...

Making php includes work in a sub-directory.

Ok, I am creating an admin interface for my custom blog at the url /admin. Is it possible for me to be able to use the same includes (including autoload), as the root directory. If possible, I would also like to be able to automatically correct the links in the navigation so that they go that index.php in / changes to ../index.php when...

nhibernate table pr hierarchy fetching specific class with LINQ

I have a class hierarchy mapped into one table. There is one superclass and 8 different sub classes. A lot of my queries needs to fetch e.g. 2 of the sub classes only for a specific date. The table has a discriminator column that nhibernate itself uses. But when using LINQ for querying it is not possible to use this discriminator as ther...

How can I list files under a directory with a specific name pattern using Perl?

I have a directory /var/spool and inside that, directories named a b c d e f g h i j k l m n o p q r s t u v x y z And inside each "letter directory", a directory called "user" and inside this, many directories called auser1 auser2 auser3 auser4 auser5 ... Every user directory contains mail messages and the...

Create Sub-directories based on the file names in the folder & move each file into the corresponding sub-folder

Hi, I have about 600 files in a single directory and to meet the requirement of a cataloging application I use - the files need to be in separate folders named after them. For example: filename1.jpg filename2.zip filename3.png ..............and so on...(files have various file exts - folders can have this info or not - doesn't matter if...

How do I dereference a hash that's been returned from a method of a class?

I have a class with a method that returns a hash. Ordinarily, I would get the result like so: %resp = $myclass->sub($foo); And then access members of the returned hash like this: $resp{key}{subkey}; in the case of a 2d hash. I figure there must be a way to combine this into a single, elegant line, something like this: $myclass->...

Languages made in C#

Hi All Does anybody know of any languages written in C# that I can play around with and learn from? Thank you P.S. I have searched for them but I couldn't find anything. ...

Why does my Perl max() function always return the first element of the array?

I am relatively new to Perl and I do not want to use the List::Util max function to find the maximum value of a given array. When I test the code below, it just returns the first value of the array, not the maximum. sub max { my @array = shift; my $cur = $array[0]; foreach $i (@array) { if($i > $cur) { ...

Howto UML: sub methods / calls / operations / procedures

I'm not sure how to model sub-methods in UML sequence diagram. When in the execution of one method another method is called (from the same class). I tried to give an example below: How would you guys model this in UML (in a sequence diagram)? .. car1.drive(); .. ... in Car class: .. drive(){ this.startEngine(); } startEngine(){ ...

How do I pass a Range to a Sub in Word VBA?

I know this sounds simple, but seemingly it is not. If I write this in Word VBA, it always says "incompatible types" - why? And how do I make it work? Thank you very much for your help! Sub GetRange() Dim r As Range Set r = ActiveDocument.Paragraphs(5).Range ProcessRange (r) End Sub Sub ProcessRange(r As Range) Debug.Pr...

Access VBA sub with form as parameter doesn't alter the form

I have a Microsoft Access 2003 file with various tables of data. Each table also has a duplicate of it, with the name '[original table name]_working'. Depending on the user's choices in the switchboard, the form the user choose to view must switch its recordsource table to the working table. I refactored the relevant code to do such a...

Create Global ASP.NET Function?

I think this is a pretty easy question...How do I make a asp.net function global? e.g. If I have a function GetUserInfo() defined on default.aspx how do I call this function from mypage2.aspx? ...

How can I profile a subroutine without using modules?

I'm tempted to relabel this question 'Look at this brick. What type of house does it belong to?' Here's the situation: I've effectively been asked to profile some subroutines having access to neither profilers (even Devel::DProf) nor Time::HiRes. The purpose of this exercise is to 'locate' bottlenecks. At the moment, I'm sprinkling pri...

redirect external subdomain traffic

Hi, I have apache installed on one of my server on two different ports, all http requests are handled by the apache on the default (80). Now I have a subdomain for a domain and I want the request for the sub domain to be handled by the apache on the other port (10024). I've tried using RewriteEngine On RewriteCond %{HTTP_REFERER} ^sub...