Separation of Business logic and Presentation logic for non OOP. Programming Web Development by veedeoo … template engine by way of business logic and presentation logic separation. **What are the requirements?** 1. Basic knowledge of OOP ( we… Recursion -- Degrees of Separation Programming Software Development by RM@Bowdoin …I reach my base case, which is 1 degree of separation (i.e. actor is in same movie as another…) but I use recursion to find all other degrees of separation, and I get "runtime error: maximum recursion depth…print base, "has ", dos, " degree(s) of separation from ", target return dos = dos+1 for actor in… What is Separation Compilation? Programming Computer Science by keroberos10 I searched all over the net about separation compilation but I'm really unsure of the resources I'… to machine code.... Something tells me that this is not separation compilation. I'd really appreciate it if someone can confirm… Re: What is Separation Compilation? Programming Computer Science by Rashakil Fol There is no such thing as separation compilation. Maybe you mean [i]separate[/i] compilation. It's where you compile things separately and then link object files together. Sentence separation.. Programming Software Development by singal.mayank … sentences?? can u provide me with a code of sentence separation.. Re: Separation of Business logic and Presentation logic for non OOP. Programming Web Development by veedeoo Just to let you know, I am planning to add a compile function to the Template class later. Although I am trying to not go very far from PHP doing the template rendering, I want to make sure that the class will be capable of something like this. business $fruits = $view->data(array('apple','banana','orange','grapes','pears')); … Re: Separation of Business logic and Presentation logic for non OOP. Programming Web Development by DJBirdi Well done veedeoo! Let's hope after reading this, people atleast realize how easy it is to implement PDO and stop using `mysql_*`. Everytime I see a question like "how do I make my code more secure" and see them using `mysql_*`, I die a little inside. Lol Re: Separation of Business logic and Presentation logic for non OOP. Programming Web Development by Gideon_1 Thumbs up, very very awesome, you just pin pointed my most hated thing in PHP, spaghetti codes. Separation of data in textbox Programming Software Development by yamini222 Hi all, I need some help here, The data in textbox looks like this: [CODE] M/z= 151.874862, P= 32.624691%, Rel. Int.= 78.220479% M/z= 152.878217, P= 0.352860%, Rel. Int.= 0.846011% M/z= 153.871912, P= 41.708632%, Rel. Int.= 100.000000% M/z= 154.875267, P= 0.451109%, Rel. Int.= 1.081573% M/z= 155.868962, P= 19.995706%, Rel. Int.= 47.… Re: Separation of data in textbox Programming Software Development by Momerath I can think of two ways to quickly do this, one using [URL="http://msdn.microsoft.com/en-us/library/system.string.split%28VS.71%29.aspx"]String.Split()[/URL] and the other using [URL="http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.aspx"]Regex[/URL]. Take a look at those and see what you can come up… Re: Separation of data in textbox Programming Software Development by rohand With the help of String.Split(), you can achieve it easily. The way you are doing right now is very time consuming and costly, if the file is too big and heavy. Try by below code.. [CODE] foreach(string line in richTextBox1.Lines) { string [] strLineSplit = line.Split(','); // line is comma seperated, so split line by comma. In … Re: Separation of data in textbox Programming Software Development by yamini222 Hi Rohand, Thanks for the reply, It worked. I added a new line for the code and it looks like this [CODE] foreach (string line in richTextBox1.Lines) { string[] strLineSplit = line.Split(','); // line is comma seperated, so split line by comma. In strLineSplit you will get array of string with having … Re: Separation of data in textbox Programming Software Development by Geekitygeek If the textbox holds other data as shown here then i would definitely recommend the [URL="http://msdn.microsoft.com/en-us/library/6f7hht7k.aspx"]regex[/URL] route. A regular expression like [iCODE]M/z= (?<Mz>\d*?\.\d*?), P= (?<P>\d*?\.\d*?)\%, Rel\. Int\.= (?<Rel>\d*?\.\d*?)\%[/iCODE] uses named capture groups to … Re: Separation of data in textbox Programming Software Development by rohand Yes definitely if your textbox contains data other than mentioned format ("M/z= 151.874862, P= 32.624691%, Rel. Int.= 78.220479%") then you must go with RegEx instead of string.Split(). Try by RegEx and let us know if you face any trouble... Re: Separation of data in textbox Programming Software Development by yamini222 Hi, I will try that and will let you know about it. thanks, Yamini [QUOTE=rohand;1323381]Yes definitely if your textbox contains data other than mentioned format ("M/z= 151.874862, P= 32.624691%, Rel. Int.= 78.220479%") then you must go with RegEx instead of string.Split(). Try by RegEx and let us know if you face any trouble… Separation between vertical menu graphics Digital Media UI / UX Design by showman13 I finally got it figured out how to use background images for a vertical CSS menu... I must be a slow learner. anyway... Could someone tell me the trick to getting some space between each of the menu links? I'd like them to be separated by about 5px or so. Thought it would be simple, but not so much... http://www.hctubs.com/index2.php And if… Re: Separation between vertical menu graphics Digital Media UI / UX Design by pritaeas I would set the background image on the `li` so you can add padding-top or margin-top to the `a`. Adding margin-bottom to the li will get your spacing between the blocks. Re: Separation between vertical menu graphics Digital Media UI / UX Design by showman13 Thank you for your reply, but I'm not sure how you would do that. My understanding was that the background image had to be on the anchor tag and on the anchor.hover tag to be able to utilize the rollover effect. Could you give me an idea how it would be accomplished? The CSS is above and here is the html that displays the menu: <div id… Re: Separation between vertical menu graphics Digital Media UI / UX Design by pritaeas The `:hover` works on most elements, not just on a link. <html> <head> <style type="text/css"> ul { margin-left: 0; padding-left: 0; } li { width: 240px; height: 35px; background-image: url(menu_blue.png); text-align: center; … Re: Separation between vertical menu graphics Digital Media UI / UX Design by showman13 Well, actually I think I finally got the spacing issue worked out. I added background-repeat: no-repeat; on the anchor and the hover and then created a li definition including a margin to separate the images NOW... If I can just figure out how to adjust the text within that space it will be great. This is really a learning experience. … Re: Separation between vertical menu graphics Digital Media UI / UX Design by JorgeM > NOW... If I can just figure out how to adjust the text within that space it will be great. which text is it that you want to adjust? Re: Separation between vertical menu graphics Digital Media UI / UX Design by showman13 I think I have it figured out.... but thanks for the response... http://www.hctubs.com/infinity.php What do you think about the look ? Re: Separation between vertical menu graphics Digital Media UI / UX Design by showman13 This is what I did in the css li.spaced{ margin: 10px 5px 10px 5px; background-repeat: no-repeat; background-position: 0px 5px; font-size:22px; color: #000; font-weight:bold; text-align: center; line-height: 40px; /* where the magic happens */ align:left } I'm not sure it all of it is necessary, … Re: Separation between vertical menu graphics Digital Media UI / UX Design by showman13 Actually, there are a few little alignment issues that I still need to address. the 3 column DIVs appear to be shifted a bit to the right from the body screen below it, which is centered, so I'm assuming that I need to clarify a little of the div border / margin / etc... and in the 3 columns, it appears that the slider in the middle is a bit … Re: Recursion -- Degrees of Separation Programming Software Development by TrustyTony Compare your approach with mine [url]www.daniweb.com/software-development/python/code/323868[/url] Shouldn't you return value in your recursive function, now you have only test print and return None? Re: Recursion -- Degrees of Separation Programming Software Development by Gribouillis I suggest a non recursive function [code=python] from collections import deque def getDegrees(target, base): "Return the distance from actor base to actor target (-1 on failure)" if target == base: return 0 else: enqueued = set([base]) fifo = deque(((base, 0),)) while fifo: actor, … Re: Sentence separation.. Programming Software Development by Luckychap hey its easy try it. read characters from file in a buffer until u encounter a dot(.) save that buffer which is your sentence. What say...? Re: Sentence separation.. Programming Software Development by Ancient Dragon [QUOTE=Luckychap;637192]hey its easy try it. read characters from file in a buffer until u encounter a dot(.) save that buffer which is your sentence. What say...?[/QUOTE] But what about other sentence separators such as ? and ! How about a sentence that spans lines. In the case of the second sentence, it is not terminated by . but by… Re: Sentence separation.. Programming Software Development by Luckychap hey that was the hint, [B]mayank[/B] can move forward with this. Re: Sentence separation.. Programming Software Development by jephthah your example is wrong, according to your own definition. if you want to separate sentences, then you need to also break on the exclamation point [code] [b][u]output:[/b][/u] Hello! This is MAYANK. I am a Student of "nitk." Working on a project.[/code] anyhow... time to repeat my earlier …