Search Results

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

Page 163/269 | < Previous Page | 159 160 161 162 163 164 165 166 167 168 169 170  | Next Page >

  • Xcode 3.2 says the version of iPhone OS isn't supported when my iPhone OS is version 3.1.3

    - by fr0man
    I just went through the whole certificate/keychain/provisioning/appID/profile/DNA test process to get my app running on my iPhone. Turns out my iPhone OS was out of date (3.0.1 I think), so I updated it. Now it says The version of iPhone OS on “Stefanie's phone” does not match any of the versions of iPhone OS supported for development with this copy of Xcode. Please restore the device to a version of the OS listed below. If necessary, the latest version of Xcode is available here. OS Installed on Stefanie's phone 3.1.3 (7E18) Xcode Supported iPhone OS Versions 3.1.2 (7D11) 3.1.1 (7C146) 3.1.1 (7C145) 3.1 (7C144) 3.0.1 (7A400) 3.0 2.2.1 2.2 2.1.1 2.1 2.0.2 (5C1) 2.0.1 (5B108) 2.0 (5A347) But I have Xcode 3.2.1, which is supposed to support iPhone OS 3.1.3. What am I doing wrong? I have a cruddy internet connection (HughesNet), so I can't upgrade the Xcode SDK without it taking literally days.

    Read the article

  • regex and javascript, some matches disappear !

    - by dader51
    Here is the code : > var reg = new RegExp(" hel.lo ", 'g'); > > var str = " helalo helblo helclo heldlo "; > > var mat = str.match(reg); > > alert(mat); It alerts "helalo, helclo", but i expect it to be "helalo, helblo, helclo, heldlo" . Only the half of them matches, I guess that's because of the space wich count only once. So I tried to double every space before processing, but in some case it's not enough. I'm looking for an explanation, and a solution. Thx

    Read the article

  • RegEx - Remove HTML hyperlinks based on the link text

    - by Rob
    Hi, I have some text that has HTML hyper-links in it. I want to remove the hyperlinks, but only specific ones. e.g. I start with this: This is text <a href="link/to/somewhere">Link to Remove</a> and more text with another link <a href="/link/to/somewhere/else">Keep this link</a> I want to have: This is text and more text with another link <a href="/link/to/somewhere/else">Keep this link</a> I have this RegEx expression, <a\s[^>]*>.*?</a> ... but it matches ALL of the links. What do I need to add to that expression to match only the links with the link-text 'Remove' (for example) in it? thanks in advance.

    Read the article

  • what is wrong with this insert method in asp.net mvc?

    - by Pandiya Chendur
    My controller calls a repository class method on insert, [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create([Bind(Exclude = "Id")]FormCollection collection) { try { MaterialsObj materialsObj = new MaterialsObj(); materialsObj.Mat_Name = collection["Mat_Name"]; materialsObj.Mes_Id = Convert.ToInt64(collection["MeasurementType"]); materialsObj.Mes_Name = collection["Mat_Type"]; materialsObj.CreatedDate = System.DateTime.Now; materialsObj.CreatedBy = Convert.ToInt64(1); materialsObj.IsDeleted = Convert.ToInt64(1); consRepository.createMaterials(materialsObj); return RedirectToAction("Index"); } catch { return View(); } } and my repository class has this, public MaterialsObj createMaterials(MaterialsObj materialsObj) { db.Materials.InsertOnSubmit(materialsObj); return materialsObj; } But when i compile this i get The best overloaded method match for 'System.Data.Linq.Table<CrMVC.Models.Material>.InsertOnSubmit(CrMVC.Models.Material)' has some invalid arguments... cannot convert from 'CrMVC.BusinessObjects.MaterialsObj' to 'CrMVC.Models.Material'.. am i missing something?

    Read the article

  • SQL Server indexed view matching of views with joins not working

    - by usr
    Does anyone have experience of when SQL Servr 2008 R2 is able to automatically match indexed view (also known as materialized views) that contain joins to a query? for example the view select dbo.Orders.Date, dbo.OrderDetails.ProductID from dbo.OrderDetails join dbo.Orders on dbo.OrderDetails.OrderID = dbo.Orders.ID cannot be automatically matched to the same exact query. When I select directly from this view ith (noexpand) I actually get a much faster query plan that does a scan on the clustered index of the indexed view. Can I get SQL Server to do this matching automatically? I have quite a few queries and views... I am on enterprise edition of SQL Server 2008 R2.

    Read the article

  • Using Full-Text Search in SQL Server 2005 across multiple tables, columns

    - by crisgomez
    Hi, I have a problem, I created a full text search query which return a record(s), in which the paramater I have supplied match(es) in every fields(full-text indexed) of multiple tables. The problem is , when the user.id is equal to ceritification.AId it returns a records eventhough it was not satisfied with the parameter supplied. For this example I supplied a value "xandrick" which return an Id=184, but the problem is it returns two ids which is 184 and 154.What is the best way to return an ID(s) that satisfied of the supplied given value? User table Id Firstname Lastname Middlename Email AlternativeEmail 154 Gregorio Honasan Pimentel [email protected] [email protected] 156 Qwerty Qazggf fgfgf [email protected]. [email protected] 184 Xandrick Flores NULL [email protected] null Certification table Id AID Certification School 12 184 sdssd AMA 13 43 web-based and framework 2 Asian development foundation college 16 184 hjhjhj STI 17 184 rrrer PUP 18 154 vbvbv AMA SELECT DISTINCT Users.Id FROM Users INNER JOIN Certification on Users.Id=Certification.aid LEFT JOIN FREETEXTTABLE (Users,(Firstname,Middlename,Lastname,Email,AlternativeEmail), 'xandrick' )as ftUsr ON Users.Id=ftUsr.[KEY] LEFT JOIN FREETEXTTABLE (Certification,(Certification,School), 'xandrick' )as ftCert ON Certification.Id=ftCert.[KEY]

    Read the article

  • Does C# have an equivalent to JavaScript's encodeURIComponent()?

    - by travis
    In JavaScript: encodeURIComponent("©v") == "%C2%A9%E2%88%9A" Is there an equivalent for C# applications? For escaping HTML characters I used: txtOut.Text = Regex.Replace(txtIn.Text, @"[\u0080-\uFFFF]", m => @"&#" + ((int)m.Value[0]).ToString() + ";"); But I'm not sure how to convert the match to the correct hexadecimal format that JS uses. For example this code: txtOut.Text = Regex.Replace(txtIn.Text, @"[\u0080-\uFFFF]", m => @"%" + String.Format("{0:x}", ((int)m.Value[0]))); Returns "%a9%221a" for "©v" instead of "%C2%A9%E2%88%9A". It looks like I need to split the string up into bytes or something. Edit: This is for a windows app, the only items available in System.Web are: AspNetHostingPermission, AspNetHostingPermissionAttribute, and AspNetHostingPermissionLevel.

    Read the article

  • How to get List of results from list of ID values with LINQ to SQL?

    - by DaveDev
    I have a list of ID values: List<int> MyIDs { get; set; } I'd like to pass this list to an interface to my repository and have it return a List that match the ID values I pass in. List<MyType> myTypes = new List<MyType>(); IMyRepository myRepos = new SqlMyRepository(); myTypes = myRepos.GetMyTypes(this.MyIDs); Currently, GetMyTypes() behaves similarly to this: public MyType GetMyTypes(int id) { return (from myType in db.MyTypes where myType.Id == id select new MyType { MyValue = myType.MyValue }).FirstOrDefault(); } where I iterate through MyIDs and pass each id in and add each result to a list. How do I need to change the LINQ so that I can pass in the full list of MyIDs and get a list of MyTypes out? GetMyTypes() would have a signature similar to public List<MyType> GetMyTypes(List<int> myIds)

    Read the article

  • In C#, is there any way to try multiple Regexes on string to see which one matches first?

    - by Matt
    Let's say I have an arbitrary list of regexes (IList<Regex> lst; for example). Is there any way to find out which one matches first? Of course there is the straightforward solution of trying each one on the string and seeing which match has the lowest index, but this could be inefficient on long strings. Of course I can go back and pull the strings back out of each regex (Regex.ToString()) and concatenate them all together ("(regex1)|(regex2)|(regex3)"), but I find this to be an ugly solution, especially since it does not even indicate which regex was matched.

    Read the article

  • Using a RegEx in a SQL Query

    - by Jim B
    Hey Everyone, Here's the situation I'm in: We have a field in our database that contains a 3 digit number, surrounded by some text. This number is actually a PK in another table, and I need to extract this out so I can implement a proper FK relationship. Here's an example of what would currently reside in the column: Some Text Goes Here - (305) Followed By Some More Text So, what I'm looking to do is extract the '305' from the column, and hopefully end up with a result that looks something like this (pseudo code) SELECT <My Extracted Value>, Original Column Text, Id FROM dbo.MyTable It seems to me that using a Regex match in my query is the most effective way to do this. Can anybody point me in the right direction?

    Read the article

  • combining dynamic text with regular expressions in php

    - by pfunc
    I am experimenting with finding popular keywords using curl, php and regular expressions. I have an array of non-specific nouns that I am matching my keyword search up. So I am looking for words like "the", "and", "that" etc. and taking them out of the keyword search. so I have an array of words like so: $wordArr = [the, and, at,....]; and then running something like: && preg_match('(\bmyword\w*\b)', $key) == false how do I combine these two so it loops through the array finding out if any of the words in the array match the regular expression? I guess I could just do a for loop, but though maybe I could use in_array($wordArr, $key).. or something like that.

    Read the article

  • Problem Rewriting URL's from HTTPS to HTTP using IIS7 URL Rewriter, when using Webforms ReturnURL=

    - by theminesgreg
    I took Jeff's Re-write rules from this post and the HTTP to HTTPS conversion works great. However, going back to HTTP is giving me problems because of the ReturnUrl= in the URL (I'm using webforms). Here's an example of the url: https://localhost/Login.aspx?ReturnUrl=%2f Here's the rewrite rule I'm using: <rule name="HTTPS to HTTP redirect for all other pages" stopProcessing="true"> <match url="^login\.aspx$" ignoreCase="true" negate="true" /> <conditions> <add input="{SERVER_PORT}" pattern="^443$" /> </conditions> <action type="Redirect" redirectType="Found" url="http://{HTTP_HOST}{REQUEST_URI}" /> </rule> Here's the resulting re-written URL: http://localhost/,/ Has anyone found a work around for this?

    Read the article

  • What is the typical method to separate connected letters in a word using OCR

    - by Maysam
    I am very new to OCR and almost know nothing about the algorithms used to recognize words. I am just getting familiar to that. Could anybody please advise on the typical method used to recognize and separate individual characters in connected form (I mean in a word where all letters are linked together)? Forget about handwriting, supposing the letters are connected together using a known font, what is the best method to determine each individual character in a word? When characters are written separately there is no problem, but when they are joined together, we should know where every single character starts and ends in order to go to the next step and match them individually with a letter. Is there any known algorithm for that?

    Read the article

  • Password checking in dojo

    - by Richard
    I want to check that two passwords are the same using Dojo. Here is the HTML I have: <form id="form" action="." dojoType="dijit.form.Form" / <pPassword: <input type="password" name="password1" id="password1" dojoType="dijit.form.ValidationTextBox" required="true" invalidMessage="Please type a password" /</p <pConfirm: <input type="password" name="password2" id="password2" dojoType="dijit.form.ValidationTextBox" required="true" invalidMessage="This password doesn't match your first password" /</p <div dojoType="dijit.form.Button" onClick="onSave"Save</div </form Here is the JavaScript I have so far: var onSave = function() { if(dijit.byId('form').validate()) { alert('Good form'); } else { alert('Bad form'); } } Thanks for your help. I could do this in pure JavaScript, but I'm trying to find the Dojo way of doing it.

    Read the article

  • jQuery validate - how do I ignore letter case?

    - by Jamie
    Probably a goofy question, but I can't seem to find anything in google land. I simply need one of my methods to ignore the case of the entered field. I am doing a city name match, but need both "Atlanta" and "atlanta" to be valid. How should I edit this to get the validation love that I need? jQuery.validator.addMethod("atlanta", function(value) { return value == "Atlanta"; //Need 'atlanta' to work too }, '**Recipient must reside in Chicago City Limits**'); Pre thanks to any and all :)

    Read the article

  • Get all email addresses in a string with JavaScript

    - by Mickel
    So, I have this JavaScript function: ME.Utils = { RxEmail: new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i), ValidateEmail: function(email) { return ME.Utils.RxEmail.test(email); }, GetEmailAddresses: function(text) { return text.match(ME.Utils.RxEmail); }, HasEmail: function(text) { return ME.Utils.GetEmailAddresses != null; } }; ValidateEmail works very well. However, HasEmail and GetEmailAddresses is not working properly. GetEmailAdresses always returns null, except for when the string only contains an email address. In this case, GetEmailAdresses returns an array not only containing the email address, but the email address ([email protected]), just the id (test) plus some unidentified etc. etc... Can you help me figure out what's wrong in my expression?

    Read the article

  • Play 2.0 RESTful request post-processing

    - by virtualeyes
    In regard to this question I am curious how one can do post-request REST processing a la (crude): def postProcessor[T](content: T) = { request match { case Accepts.Json() => asJson(content) case Accepts.Xml() => asXml(content) case _ => content } } overriding onRouteRequest in Global config does not appear to provide access to body of the response, so it would seem that Action composition is the way to go to intercept the response and do post-processing task(s). Question: is this a good idea, or is it better to do content-type casting directly within a controller (or other class) method where the type to cast is known? Currently I'm doing this kind of thing everywhere: toJson( i18n("account not found") ) toJson( Map('orderNum-> orderNum) ) while I'd like the toJson/toXml conversion to happen based on accepts header post-request.

    Read the article

  • Compare values in each column of two Oracle Types

    - by colinjameswebb
    I've been playing around with the pluto-test-framework today, and I'd like to get some existing functions into a test harness with it. I have lots of functions with this type of specification. FUNCTION DO_SOME_STUFF (pOldSchedule IN SCHEDULE_OBJ, pNewSchedule OUT SCHEDULE_OBJ, pLoggerContext IN OUT LOGGER_CONTEXT_OBJ) RETURN NUMBER; It takes pOldSchedule, does some stuff to it, and then returns pNewSchedule. The logger_context just does logging. As part of a test, I'd like to be able to compare the values in each of the columns of the type, without having to write individual IF statements. It'll need to return boolean to signify whether or not pOldSchedule and pNewSchedule match. Any ideas?

    Read the article

  • SSRS and hiding other selections once a parameter is selected

    - by KristiLee
    I am learning SSRS so this is probably an extremely easy solution. I have a bunch of reports that were rebuilt to match some old Access reports. For each report, we have to be able to run Current, Last, Next or Adhoc dates. Is there an easy way if a user selects Adhoc to then show the parameters selections for Start and End Date for the Adhoc selection? Right now, I have people who select Current and then go and put in dates. WHERE (:AGNT='--AllNoFilter--' OR AGNT =:AGNT) AND (:DateRunOption <> 'CM' OR TO_CHAR(MONTH_END_DT, 'Month YYYY') = TO_CHAR(CURRENT_DATE, 'Month YYYY')) AND (:DateRunOption <> 'LM' OR TO_CHAR(MONTH_END_DT, 'Month YYYY') = TO_CHAR(ADD_MONTHS(CURRENT_DATE, -1), 'Month YYYY')) AND (:DateRunOption <> 'AD' OR MONTH_END_DT>= :BeginDateFrom) AND (:DateRunOption <> 'AD' OR MONTH_END_DT<= :BeginDateTo) Thank you for any assistance you can provide

    Read the article

  • Moving Webdav app from Win server 2k to Win server 2k3 now getting authentication issues.

    - by John
    I have an intranet web app that uses CSS httpFolder to map a webdav folder to an IFrame on a web page. The user then can drop files in the frame and the page processes them when the user presses the button. This works well on a Win 2k SP4 server running IIS 5. I have moved the app over to a Win 2k3 server running IIS 6. I have made sure the WebDAV extensions are allowed. I have set everything else in IIS to match the original installation on the old server. But when I try to access the WebDAV folder I am repeatedly prompted for my login credentials. I use my domain admin login but even that doesn't work. What am I missing? What differences are there between WebDAV on 2k vs 2k3? TIA John

    Read the article

  • How to Override a private set property

    - by David
    Hi, Im using the Microsoft.Office.Interop.MSProject.Resource assembly which has a "UniqueID" property, it has a get but not set. How can I actually set a value? An example would be very much appreciated. --Update-- Ok I can get the value for a property "Name" and set, but Im intersted in the "UniqueId" property that does not have a public set (get only): int ii = (int)resource.GetType().InvokeMember("UniqueID", BindingFlags.GetProperty, null, resource, new object[] { }); resource.GetType().InvokeMember("UniqueID", BindingFlags.SetProperty, null, resource, new object[] {iUid,}); I get the following error {"Number of parameters specified does not match the expected number."} anyway for me to work out how many paramters it needs?

    Read the article

  • Why does this regular expression fail?

    - by Stephen
    I have a password validation script in PHP that checks a few different regular expressions, and throws a unique error message depending on which one fails. Here is an array of the regular expressions and the error messages that are thrown if the match fails: array( 'rule1' => array( '/^.*[\d].*$/i', 'Password must contain at least one number.' ), 'rule2' => array( '/^.*[a-z].*$/i', 'Password must contain at least one lowercase letter' ), 'rule3' => array( '/^.*[A-Z].*$/i', 'Password must contain at least one uppercase letter' ), 'rule4' => array( '/^.*[~!@#$%^&*()_+=].*$/i', 'Password must contain at least one special character [~!@#$%^&*()_+=]' ) ); For some reason, no matter what I pass through the validation, the "Special Characters" rule fails. I'm guessing it's a problem with the expression. If there's a better (or correct) way to write these expressions, I'm all ears!

    Read the article

  • Rails 3 routing - what's best practice?

    - by Mattias
    Hi guys, I'm trying out Rails, and I've stumbled across an issue with my routing. I have a controller named "Account" (singular), which should handle various settings for the currently logged in user. class AccountController < ApplicationController def index end def settings end def email_settings end end How would I set-up the routes for this in a proper manner? At the moment I have: match 'account(/:action)', :to => 'account', :as => 'account' This however does not automagically produce methods like account_settings_path but only account_path Is there any better practice of doing this? Remember the Account controller doesn't represent a controller for an ActiveModel. If this is in fact the best practice, how would I generate links in my views for the actions? url_to :controller => :account, :action => :email_settings ? Thanks!

    Read the article

  • CImg compile problems in Codegear 2009

    - by Seth
    I wish to use the CImg library for image processing in my current project. I am using Codegear C++ Builder 2009. I include CImg.h in the source file and put in the following code: int rows =5; int cols = 5; CImg<double> img(rows,cols); I get the following error: [BCC32 Error] CImg.h(39159): E2285 Could not find a match for 'CImg<unsigned char>::move_to<t>(const CImg<unsigned char>)' Does anyone know if there is a #define I should be using when building in Codegear C++ Builder 2009. Or is it simply not compatible?

    Read the article

  • How to convert a function that returns a int to a function that returns a bool using boost::bind?

    - by user814628
    I have something like the following: struct A{ virtual int derp(){ if(herp()) return 1; else return 0; } void slurp(){ boost::function<bool(int x, int y> purp = /** boost bind derp to match lvalue sig **/; } } Any ideas? I want to create the function prup which basically calls derp and ignores the (x,y) passed in. I need something like bool purp(int x, int y){ return derp(); } but want to avoid creating it as a member function, and rather just create it locally if possible?

    Read the article

< Previous Page | 159 160 161 162 163 164 165 166 167 168 169 170  | Next Page >