Search Results

Search found 3 results on 1 pages for 'lamas'.

Page 1/1 | 1 

  • Regex to use each letter only once?

    - by gtcaz
    Is it possible to construct a PCRE-style regular expression that will only match each letter in a list only once? For example, if you have the letters "lrsa" and you try matching a word list against: ^[lrsa]*m[lrsa]*$ you're going to match "lams" (valid), but also "lamas" (invalid for our purposes because you only had one "a"). If your letter set was "lrsaa", you would want to match "lamas". Is this possible with regular expressions, or should I handle it programmatically?

    Read the article

  • Designing a general database interface in PHP

    - by lamas
    I'm creating a small framework for my web projects in PHP so I don't have to do the basic work over and over again for every new website. It is not my goal to create a second CakePHP or Codeigniter and I'm also not planning to build my websites with any of the available frameworks as I prefer to use things I've created myself in general. I have no problems in designing that framework when it comes to parts like the core structure, request handling, and so on but I'm getting stuck with designing the database interface for my modules. I've already thought about using the MVC pattern but thought that it would be a bit of a overkill. So the exact problem I'm facing is how my frameworks modules (viewCustomers could be a module, for example) should interact with the database. Is it a good idea to write SQL directly in PHP (mysql_query( 'SELECT firstname, lastname(.....))? How could I abstract a query like SELECT firstname, lastname FROM customers WHERE id=X Would MySQL helper functions like $this->db->get( array('firstname', 'lastname'), array('id'=>X) ) be a good idea? I suppose not because they actually make everything more complicated by requiring arrays to be created and passed. Is the Model pattern from MVC my only real option?

    Read the article

  • (For what) Are Fortran, Cobol and Co. used today?

    - by lamas
    I'm a relatively young programmer and so I don't really know much about languages like Fortran or Cobol that have their origins in the beginning of modern informatics. I'm a bit confused because it seems like there are many people out there saying that these two languages are still very alive and being used all over the world whereas others say the opposite. In addition, it seems like there are only very few questions tagged Fortran or Cobol here on stackoverflow. Can someone "demystify" the situation for me? Who uses these senior languages these days and are they even used anymore? Do you have any experiences with one of the languages or do you know something about their latest developments?

    Read the article

1