Search Results

Search found 6569 results on 263 pages for 'specification pattern'.

Page 146/263 | < Previous Page | 142 143 144 145 146 147 148 149 150 151 152 153  | Next Page >

  • Screen lock customization for android

    - by deaviator
    Hi frens I'm planning to explore the possibilities on how to make a screen lock better (like pattern based). It will be great help if someone points out the difficulty level or where to actually start digging. This is going to be my project idea for minor research paper. What do u guys think or if anyone has more ideas worth exploring, I would like to consider it. reagrds

    Read the article

  • Java regular expression: how to include '-'

    - by changed
    I am using this pattern and matching a string. String s = "//name:value /name:value"; if (s.matches("(//?\\s*\\w+:\\w+\\s*)+")) { // it fits } This works properly. But if I want to have a string like "/name-or-address:value/name-or-address:value" which has this '-' in second part, it doesn't work. I am using \w to match A-Za-z_, but how can I include - in that?

    Read the article

  • decorating a function and adding functionalities preserving the number of argument

    - by pygabriel
    I'd like to decorate a function, using a pattern like this: def deco(func): def wrap(*a,**kw): print "do something" return func(*a,**kw) return wrap The problem is that if the function decorated has a prototype like that: def function(a,b,c): return When decorated, the prototype is destroyed by the varargs, for example, calling function(1,2,3,4) wouldn't result in an exception. Is that a way to avoid that? How can define the wrap function with the same prototype as the decorated (func) one? There's something conceptually wrong?

    Read the article

  • Adding an inheritance to an Qt designed object

    - by Jaguar
    Hello, I have a problem and I want to implement the MVC pattern to my QT application, that's why I need for example to inherite in my QTableWidget about another class like myClass { myMethod(); } but our QTableWidget is contained by our Mainwidows that is designed by the QT designer and generate an ui_MainWindow class ! Do you know how to do that ? Is that a method inside the Qt Designer to do that ? or another method ? Thank you for your answer !

    Read the article

  • UNIX Programs (Shell Scripting) [closed]

    - by atif089
    Hi, I have an exam tomorrow and I need some help with these programs. Or if you can tell me where I can get these. Write a program which uses grep to search a file for a pattern and display search patterns on standard output Write an awk program to print only odd numbered lines of a file. Write a program to open the command ls and give the output to the command through which we count the number of files Thank You :)

    Read the article

  • File structure for PHP-based website.

    - by John Berryman
    I'm building a PHP-based web app for the first time and I haven't found anything to pattern it after. At this point I'm mostly curious about how the files should be arranged into directories so that development of the website can be manageable. This includes javascript scripts, images, stylesheets, cgi scripts, html files, pure php files that define common functions, etc. Question: Can someone point me to an explanation about how such a website is typically organized on the server?

    Read the article

  • Delayed instantiation with c# using statment

    - by fearofawhackplanet
    Is there any way to write a using statement without instantiating the IDisposable immediately? For example, if I needed to do something like: using (MyThing thing) { if (_config == null) { thing = new MyThing(); } else { thing = new MyThing(_config); } // do some stuff } // end of 'using' Is there an accepted pattern for cases like this? Or am I back to handling the IDisposable explicitly again?

    Read the article

  • preg_match() find all values inside of table?

    - by mathiregister
    hey guys, a curl function returns a string $widget that contains regular html - two divs where the first div holds a table with various values inside of <td>'s. i wonder what's the easiest and best way for me to extract only all the values inside of the <td>'s so i have blank values without the remaining html. any idea what the pattern for the preg_match should look like? thank you.

    Read the article

  • Is there an open source MVP framework for C++?

    - by morpheous
    I am looking for a lightweight set of C++ classes that implement/show how to use the MVP design pattern, so that I can refactor some legacy code I am working on. A library/framework would be nice to get me started. A quick google search seems to bring up only C# examples - is anyone aware of any C++ ones out there? [Edit] I am particularly interested in a Passive viewer, as I want to completely decouple the view from the model.

    Read the article

  • need help me in excel-vba

    - by aos
    Private Sub cmdClear_Click() Dim Confirm As Integer Confirm = MsgBox("Are you sure you want clear this Sheet?", vbYesNo, "WARNING: Date Changed") If Confirm = 6 Then Sheets("OPV").Activate 'Sheets("OPV").Activate Sheets("OPV").Range("B4:BZ1000").ClearContents Sheets("OPV").Range("B4:BZ1000").Interior.Pattern = xlNone Sheets("OPV").Activate Sheets("OPV").Range("B4").Activate MsgBox " Done .. ", vbInformation, "Clear ......" End If End Sub

    Read the article

  • Avoiding dependency injection

    - by dotnetdev
    When coding, I often come across the following pattern: -A method calls another method (Fine), but the method being called/callee takes parameters, so in the wrapping method, I pass in parameters. Problem is, this dependency carrying can go on and on. How could I avoid this (any sample code appreciated)? Thanks

    Read the article

  • General question about Ruby Eigenclass/Singleton

    - by Dex
    module MyModule def my_method; 'hello'; end end class MyClass class << self include MyModule end end MyClass.my_method # => "hello I'm unsure why "include MyModule" needs to be in the eigenclass in order to be called using just MyClass. Why can't I go: X = MyClass.new X.my_method How is this type of pattern useful if I can't call it from an instance?

    Read the article

  • is there a proper way to handle multiple errors/exceptions?

    - by toPeerOrNotToPeer
    in OO programming, is there some conceptual pattern, ideas, about handling multiple errors? for example, i have a method that performs some checks and should return an error message for each error found ['name is too short', 'name contains invalid unicode sequences', 'name is too long'] now, should i use an array of exceptions (not thrown exceptions)? or something like this is better: class MyExceptionList extends Exception{ public Void addException(Exception e){} public Array getExceptions(){} } any theory behind this argument will be appreciated! (this isn't a request about a specific programming language, but a pure theoretical one) thank you in advance

    Read the article

  • Replace Entity Framework object

    - by majkinetor
    In MVC app, I am having this big object that is used in classic view/edit/create pattern. When user edits the object I save it as: public bool SetMyObject(MyObject newObject) { MyObject current = GetObjectById(newObject.Id); current.Prop1 = newObject.Prop1 ... current.PropN = newObject.PropN db.SaveChanges(); } MyObject is pretty big so I am wondering is there any better way to do this, not involving per-property assignments. For instance something along the lines db.MyObject.UpdateObject(current, tnew). Ty.

    Read the article

  • How would one go about adding (minor) syntactic sugars to Java?

    - by polygenelubricants
    Suppose I want to add minor syntactic sugars to Java. Just little things like adding regex pattern literals, or perhaps base-2 literals, or multiline strings, etc. Nothing major grammatically (at least for now). How would one go about doing this? Do I need to extend the bytecode compiler? (Is that possible?) Can I write Eclipse plugins to do simple source code transforms before feeding it to the standard Java compiler?

    Read the article

  • Why is the recursion idiom in Haskell "'n+1' and 'n'" and not "'n' and 'n-1'"?

    - by rulfzid
    I'm working my way through Graham Hutton's Haskell book, and in his recursion chapter, he often pattern-matches on "n+1", as in: myReplicate1 0 _ = [] myReplicate1 (n+1) x = x : myReplicate1 n x Why that and not the following, which (1) seems functionally identical and (2) more intuitive in terms of understanding what's happening with the recursion: myReplicate2 0 _ = [] myReplicate2 n x = x : myReplicate2 (n-1) x Is there something I'm missing here? Or is it just a matter of style?

    Read the article

  • callback function for php preg_replace_callback not getting called on linux CentOS 5.4

    - by user105165
    I have used the preg_replace_callback as $string = preg_replace_callback($pattern,'CreateTemplatesController::callbackhandler',$string ); I have called the callbackhandler function with the class name as this function is a private static function. Problem is "callbackhandler" function is not getting called. Please post if any one know the reason for the same. Thanks in Advance

    Read the article

  • In C# VS2008 how to replace new SqlParameter("@values", SqlDbType.SomeType, 1500)) to ("@values", Sq

    - by CodeYun
    In C# VS2008 how to replace new SqlParameter("@Description", SqlDbType.NChar, 1500) or new SqlParameter("@IsRequired", SqlDbType.Bit) to "@Description", SqlDbType.NChar, 1500 or "@IsRequired", SqlDbType.B the idea is to remove new SqlParameter() and leave the parameters inside it. I have thounds of lines code have this pattern. I just want to pass compile by using some regular expression.

    Read the article

< Previous Page | 142 143 144 145 146 147 148 149 150 151 152 153  | Next Page >