Search Results

Search found 6715 results on 269 pages for 'preg match'.

Page 112/269 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • Java: JPQL search -similar- strings

    - by bguiz
    What methods are there to get JPQL to match similar strings? By similar I mean: Contains: search string is found within the string of the matches entity Case-insensitive Small mispellings: e.g. "arow" matches "arrow" I suspect the first two will be easy, however, I would appreciate help with the last one Thank you

    Read the article

  • How to search multiple columns in MySQL?

    - by George
    I'm trying to make a search feature that will search multiple columns to find a keyword based match. This query: SELECT title FROM pages LIKE %$query%; works only for searching one column, I noticed separating column names with commas results in an error. So is it possible to search multiple columns in mysql?

    Read the article

  • How do you access the Source Error, Source File and Line Number of an exception to use in a custom e

    - by Iain Fraser
    Basically I want to take the following: And make it match the styling of the rest of the application. I am creating a custom error page in my C# based project and I want it to be able to show the same information that is displayed in the ASP.NET default error page. From fiddling with reflector I can see that this is generated through HttpException.GetHtmlErrorMessage() but when I try to use this in my exception it returns null.

    Read the article

  • c++ class member functions instatiated by traits

    - by Jive Dadson
    I am reluctant to say I can't figure this out, but I can't figure this out. I've googled and searched stackoverflow, and come up empty. The abstract, and possibly overly vague form of the question is, how can I use the traits-pattern to instantiate non-virtual member functions? The question came up while modernizing a set of multivariate function optimizers that I wrote more than 10 years ago. The optimizers all operate by selecting a straight-line path through the parameter space away from the current best point (the "update"), then finding a better point on that line (the "line search"), then testing for the "done" condition, and if not done, iterating. There are different methods for doing the update, the line-search, and conceivably for the done test, and other things. Mix and match. Different update formulae require different state-variable data. For example, the LMQN update requires a vector, and the BFGS update requires a matrix. If evaluating gradients is cheap, the line-search should do so. If not, it should use function evaluations only. Some methods require more accurate line-searches than others. Those are just some examples. The original version instantiates several of the combinations by means of virtual functions. Some traits are selected by setting mode bits that are tested at runtime. Yuck. It would be trivial to define the traits with #define's and the member functions with #ifdef's and macros. But that's so twenty years ago. It bugs me that I cannot figure out a whiz-bang modern way. If there were only one trait that varied, I could use the curiously recurring template pattern. But I see no way to extend that to arbitrary combinations of traits. I tried doing it using boost::enable_if, etc.. The specialized state info was easy. I managed to get the functions done, but only by resorting to non-friend external functions that have the this-pointer as a parameter. I never even figured out how to make the functions friends, much less member functions. The compiler (vc++ 2008) always complained that things didn't match. I would yell, "SFINAE, you moron!" but the moron is probably me. Perhaps tag-dispatch is the key. I haven't gotten very deeply into that. Surely it's possible, right? If so, what is best practice?

    Read the article

  • SEO Google - Navigation Title vs. Page Heading

    - by louism
    Hi, i was wondering if anyone knows if theres a connection between what a navigation item is named and the page heading it goes to - does this have an impact on SEO? so for example, if i had in my navigation menu an item called About Us, but when you click it you come to a page with the heading Learn Who We Are (i.e. wrapped in [h1] heading tags) because there isnt an exact one-to-one match, is that a bad thing in terms of SEO? thanks

    Read the article

  • Loop through enumeration

    - by Germ
    What is best way to loop through an enumeration looking for a matching value? string match = "A"; enum Sample { A, B, C, D } foreach(...) { //should return Sample.A }

    Read the article

  • regular expression

    - by xyz
    I need regular expression to match braces correct e.g for every open one close one abc{abc{bc}xyz} I need it get all it from {abc{bc}xyz} not get {abc{bc} I tried this ({.*?})

    Read the article

  • Failure/Error: @user = User.create!(@attr)

    - by the_Saint
    I am following railstutorial.org on Chapter 7 and when running tests I get the error User password encryption has_password? method should be true if the passwords match Failure/Error: @user = User.create!(@attr) undefined method password' for #<User:0xa242d18> # ./spec/models/user_spec.rb:105:inblock (3 levels) in ' line 105 of user_spec.rb:105 is @u @user = User.create!(@attr)ser = User.create!(@attr)

    Read the article

  • How to construct a string based on regex and related parameters in PHP?

    - by user198729
    (?P<id>\d*)(/(?P<title>.*))? Most of the time,we use regex to match something,but how to generate the matching string if we have id and title already? Example,if id=4 and title='hello world',the result should be: 4/hello world But if we only have id=4,it should be: 4 Because as the regex indicates,title is optional. Two answers both misunderstood... There is no preg_match yet

    Read the article

  • Sql server 2000 -Space find

    - by Adu
    This is Query: CREATE TABLE #TempTable(datasize varchar(200)) INSERT #TempTable EXEC sp_spaceused 'Table1' When executing this query error message shown as below "Column name or number of supplied values does not match table definition" How can i solve this problem?

    Read the article

  • How do I make a form transparent while keeping the controls fully visible?

    - by Power-Mosfet
    I would like to have a form in which the controls on the form are fully visible but the form itself is invisible. If I change the form's Opacity, this makes both the form and the controls on it semi-transparent, so this doesn't work. I can't do this by setting the form's TransparencyKey, since I have a PictureBox on the form. If the image in the PictureBox happens to contain pixels that match the TransparencyKey, they appear as openings in the form, which I don't want.

    Read the article

  • Reverse regular expressions to generate data

    - by Anton Gogolev
    In one of the StackOverflow Podcasts (the one where guys were discussing data generation for testing DBs -- either #11 or #12), Jeff mentioned something like "reverse regular expressions", which are used exactly for that purpose: given a regex, produce a string which will eventually match said regex. What is the correct term for this whole concept? Is this a well-known concept?

    Read the article

  • Rails routes matching query parameters

    - by Harry Wood
    Rails routes are great for matching RESTful style '/' separated bits of a URL, but can I match query parameters in a map.connect config. I want different controllers/actions to be invoked depending on the presence of a parameter after the '?'. I was trying something like this... map.connect "api/my/path?apple=:applecode", :controller = 'apples_controller', :action = 'my_action' map.connect "api/my/path?banana=:bananacode", :controller = 'bananas_controller', :action = 'my_action' For routing purposes I don't care about the value of the parameter, as long as it is available to the controller in the 'params' hash

    Read the article

  • How to Filter ADO.NET data using a Full Text Seach (FTS) field?

    - by ActionFactory
    Hi All, We are using ADO.NET dataservices & are building URL based filters. Example: /Customers?filter=City eq 'London' We now need to filter on a Full Text 'tags' Field. WAS HOPING FOR: /Customers?filter=Tag like 'Friendly' PROBLEM: ADO.NET does not have a LIKE operator. ADO.NET does not seem to like FTS (It is not finding a match - because it is not parsing through the CSV's) Any ideas how to make this work? THX

    Read the article

  • Make: how make all hidden files in the current makefile?

    - by HH
    It traverses to bottom dirs for some unknown reason: Errorsome /bin/sh: .??*: not found make[23]: Entering directory `/m/user/files/dir' make clean Makefile all: make clean #The wildcard is the bug. I want to make all hidden files in the current makefile. #It should match .<some char><some char><any char arbitrary times> make $$(.??*) #I want to replace below-like-tihngs with a wildcard above # make .lambda # make .lambda_t clean: -rm .??* .lambda: #do something .lambda_t:

    Read the article

  • C#/.NET Project - Am I setting things up correctly?

    - by JustLooking
    1st solution located: \Common\Controls\Controls.sln and its project: \Common\Controls\Common.Controls\Common.Controls.csproj Description: This is a library that contains this class: public abstract class OurUserControl : UserControl { // Variables and other getters/setters common to our UserControls } 2nd solution located: \AControl\AControl.sln and its project: \AControl\AControl\AControl.csproj Description: Of the many forms/classes, it will contain this class: using Common.Controls; namespace AControl { public partial class AControl : OurUserControl { // The implementation } } A note about adding references (not sure if this is relevant): When I add references (for projects I create), using the names above: 1. I add Common.Controls.csproj to AControl.sln 2. In AControl.sln I turn off the build of Common.Controls.csproj 3. I add the reference to Common.Controls (by project) to AControl.csproj. This is the (easiest) way I know how to get Debug versions to match Debug References, and Release versions to match Release References. Now, here is where the issue lies (the 3rd solution/project that actually utilizes the UserControl): 3rd solution located: \MainProj\MainProj.sln and its project: \MainProj\MainProj\MainProj.csproj Description: Here's a sample function in one of the classes: private void TestMethod<T>() where T : Common.Controls.OurUserControl, new() { T TheObject = new T(); TheObject.OneOfTheSetters = something; TheObject.AnotherOfTheSetters = something_else; // Do stuff with the object } We might call this function like so: private void AnotherMethod() { TestMethod<AControl.AControl>(); } This builds, runs, and works. No problem. The odd thing is after I close the project/solution and re-open it, I have red squigglies everywhere. I bring up my error list and I see tons of errors (anything that deals with AControl will be noted as an error). I'll see errors such as: The type 'AControl.AControl' cannot be used as type parameter 'T' in the generic type or method 'MainProj.MainClass.TestMethod()'. There is no implicit reference conversion from 'AControl.AControl' to 'Common.Controls.OurUserControl'. or inside the actual method (the properties located in the abstract class): 'AControl.AControl' does not contain a definition for 'OneOfTheSetters' and no extension method 'OneOfTheSetters' accepting a first argument of type 'AControl.AControl' could be found (are you missing a using directive or an assembly reference?) Meanwhile, I can still build and run the project (then the red squigglies go away until I re-open the project, or close/re-open the file). It seems to me that I might be setting up the projects incorrectly. Thoughts?

    Read the article

  • A question mark within a @PathVariable in Spring MVC?

    - by sp00m
    Within the @Controller of a search engine: @RequestMapping(value = "/search/{query}", method = RequestMethod.GET) public String search(@PathVariable String query) {} If a user wants to search /search/w?rld (wich should match world, warld, whrld, etc.), the variable query equals w, because of the question mark which indicated a GET var. I tried "/search/{query:.+}", but still doesn't work. Any idea how to solve that problem?

    Read the article

  • Displaying Data on the Form with C#

    - by The.Anti.9
    I'm searching files and returning lines that include the search text, and I'm not really sure the best way to display the information I get. Every time I get a match, I want to show, in some sort of control, the File it came from, and the whole text line. (aka streamreader.ReadLine() result). First I tried just putting it all in a read-only text box, but it doesn't have a scroll bar. What is the best form control to help me display this data neatly?

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >