Search Results

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

Page 177/269 | < Previous Page | 173 174 175 176 177 178 179 180 181 182 183 184  | Next Page >

  • Return cell reference as result of if statement with vlookups.

    - by EMJ
    I have two sets of data in excel. One contains a set of data which represents the initial step of a process. The other set of data represents the additional steps which take place after the first step is completed. Each of the data records in the "additional step data" has an id in a column. I need to find the identifying codes of the "additional step data" which correspond with the initial step data records. The problem is that I have to match the data in 4 columns between the two data sets and return the id of the "additional step data". I started by doing a combination of an if and vlookup functions, but I got stuck when I tried to figure out how to get the if statement to reference the id of the matching "additional step data". Basically I am trying to avoid having to search by manually filtering between two sets of data and finding corresponding records. Does anyone have any idea about how to do this?

    Read the article

  • Apache file caching

    - by danp
    How does apache handle caching of certain files, and is it possible to explicitly say that certain files should be aggressively cached more than others, through the standard config files for a given host or virtualhost? To put it in context, I keep a lot of site content in various XML files, and I'd like to be able to say that this file will be used a lot, and therefore cache it as much as possible..? Does apache do this kind of thing intelligently and on the fly..? Will it observe which files are more popular than others and try to match cache hits appropriately..? Lots of questions in one, but the basic idea should be clear enough. edit: to be clear, these are resource files which are loaded and interpreted by PHP - but php as a process is spawned inside apache.. right? Please help!

    Read the article

  • My Java regex isn't capturing the group

    - by Geo
    I'm trying to match the username with a regex. Please don't suggest a split. USERNAME=geo Here's my code: String input = "USERNAME=geo"; Pattern pat = Pattern.compile("USERNAME=(\\w+)"); Matcher mat = pat.matcher(input); if(mat.find()) { System.out.println(mat.group()); } why doesn't it find geo in the group? I noticed that if I use the .group(1), it finds the username. However the group method contains USERNAME=geo. Why?

    Read the article

  • If and only if condition SQL -- SQL server 2008

    - by user494901
    I'm writing a SQL statement to select a user on a table if that user does not exist on another table, then I want to pull in all their data from another table then I'll be outputting all that in Coldfusion. How do I do this? I have tried, my atempt is below: pro_profile == All employees mod_userStatus == All Professional Staff members I am doing the not exists to remove professional stuff to just get our student staff. mod_StudentCertifications is a listing of the certifications they (students) hold. If we do an AND statement between the where statements it returns no users, or only users that meet both conditions, if we do an OR it will return users with only 1 condition. I need it first Match the not exists then proceed to the exists statement. Is that do able? Here's my Statement: SELECT profileID, firstName, lastName FROM pro_Profile WHERE not exists ( SELECT profileID FROM mod_userStatus WHERE mod_userStatus.profileID = pro_Profile.profileID ) OR exists ( SELECT cprAdultExp, cprInfantChildExp, cprFPRExp, aedExp, firstAidExp, emtExp, waterSafetyInstructionExp, bloodPathogensExp, oxygenAdminExp, lifegaurdingExp, wildernessResponderExp, notes FROM mod_StudentCertifications WHERE mod_StudentCertifications.profileID = pro_Profile.profileID );

    Read the article

  • negative look ahead to exclude html tags

    - by Remoh
    I'm trying to come up with a validation expression to prevent users from entering html or javascript tags into a comment box on a web page. The following works fine for a single line of text: ^(?!.(<|)).$ ..but it won't allow any newline characters because of the dot(.). If I go with something like this: ^(?!.(<|))(.|\s)$ it will allow multiple lines but the expression only matches '<' and '' on the first line. I need it to match any line. This works fine: ^[-_\s\d\w"'.,:;#/&\$\%\?!@+*\()]{0,4000}$ but it's ugly and I'm concerned that it's going to break for some users because it's a multi-lingual application. Any ideas? Thanks!

    Read the article

  • MySQL Query, Date Range From "Blacklist"

    - by erbaker
    I have 2 databases. One is properties and the other is dates. In dates I have associated the land_id and a date (In YYYYMMDD format) which means that the date is not available. I need to formulate a query that a user can specify a start and end date, and then choose a property for which dates are available (not in the date database). How do airline and hotel websites do this kind of logic? I was thinking about taking the date range and picking all days in between and doing a query where the dates do not match and ordering it by number of results, but I can see how that could easily turn into an intense query. CREATE TABLE IF NOT EXISTS `dates` ( `id` int(11) NOT NULL AUTO_INCREMENT, `land_id` int(11) NOT NULL, `date` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=44 ; -- -- Dumping data for table `dates` -- INSERT INTO `dates` (`id`, `land_id`, `date`) VALUES (43, 1, '20100526'), (39, 1, '20100522'), (40, 1, '20100523'), (41, 1, '20100521'), (42, 1, '20100525');

    Read the article

  • Comparing two images by corr2 function

    - by user3696860
    I'm trying to compare two images by corr2 function on Matlab, it's not necess getting 1 end of function so I am using a treshold to find best images among template images. But sometimes it evaluate wrong image. How can I process them to find best match? ` temp=[]; for i=1:10 res=sprintf('%d.png',i) yol=fullfile('cember\taslak_cember\',res); a=imread(yol); b=imread('30_1.png'); a=rgb2gray(a); b=rgb2gray(b); a=im2bw(a,0.4); b=im2bw(b,0.4); c=corr2(a,b); temp=[temp c]; end max(temp) `

    Read the article

  • Is there an easier way to reconcile a list of files and a directory with subfolders/files to find ch

    - by rwmnau
    I have a SQL Server table with a list of files (path + filename), and a folder with multiple layers and files in each layer. I'm looking for a way to reconcile the two without having to process the list twice. Currently, I'm doing this: For Each f as FileInfo In FileListFromDatabase If f.Exists is False, mark it as deleted in the database Next For Each f as FileInfo In RecursiveListOFFilesOnDisk If Not FileExistsInDatabase, then add it Next Is there a better way to do this? I'd like to avoid converting all the matching files (of which most will be) to FileInfo objects twice. Since I'm a T-SQL developer first, I'm picturing something like an OUTER JOIN of the two lists where they don't match. Something LINQ-ish?

    Read the article

  • c# EnumerateFiles wildcard returning non matches?

    - by Sam Underhill
    As a simplified example I am executing the following IEnumerable<string> files = Directory.EnumerateFiles(path, @"2010*.xml", SearchOption.TopDirectoryOnly).ToList(); In my results set I am getting a few files which do no match the file pattern. According to msdn searchPattern wildcard is "Zero or more characters" and not a reg ex. An example is that I am getting a file name back as "2004_someothername.xml". For information there are in excess of 25,000 files in the folder. Does anyone have any idea what is going on?

    Read the article

  • Results from two queries at once in sqlite?

    - by SF.
    I'm currently trying to optimize the sluggish process of retrieving a page of log entries from the SQLite database. I noticed I almost always retrieve next entries along with count of available entries: SELECT time, level, type, text FROM Logs WHERE level IN (%s) ORDER BY time DESC, id DESC LIMIT LOG_REQ_LINES OFFSET %d* LOG_REQ_LINES ; together with total count of records that can match current query: SELECT count(*) FROM Logs WHERE level IN (%s); (for a display "page n of m") I wonder, if I could concatenate the two queries, and ask them both in one sqlite3_exec() simply concatenating the query string. How should my callback function look then? Can I distinguish between the different types of data by argc? What other optimizations would you suggest?

    Read the article

  • HTTP Response 412 - can you include content?

    - by Gandalf
    I am building a RESTful data store and leveraging Conditional GET and PUT. During a conditional PUT the client can include the Etag from a previous GET on the resource and if the current representation doesn't match the server will return the HTTP status code of 412 (Precondition Failed). Note this is an Atom based server/protocol. My question is, when I return the 412 status can I also include the new representation of the resource or must the user issue a new GET? The HTTP spec doesn't seem to say yes or no and neither does the Atom spec (although their example shows an empty entity body on the response). It seems pretty wasteful not to return the new representation and make the client specifically GET it. Thoughts?

    Read the article

  • asp.net impersonation identity: Where does it come from?

    - by Rising Star
    Here's a simple question I've been stuck on for a while. When I set < identity impersonate=true > in my web.config so that asp.net impersonates the logged on user automatically (or the anonymous account if not using Windows Authentication), where does the identity that asp.net impersonates come from? This document: http://msdn.microsoft.com/en-us/library/ff649264.aspx shows three places you can retrieve information about the logged on user: Httpcontext.Current.user System.Threading.Thread.Current System.Security.Principal.WindowsIdentity.GetCurrent It seems that none of these locations consistently match the identity that gets impersonated when I set < identity impersonate=true > in web.config. I would like to know where the impersonated identity comes from.

    Read the article

  • XPath 1.0 to find if an element's value is in a list of values

    - by user364902
    Is there a way to construct an XPath that evaluates whether an element's value is in a predefined list of values? Something akin to this: /Location/Addr[State='TX or AL or MA'] Which would match nodes whith State elements for Texas, Alabama, or Massachusetts? I know that I can unpack the expression: /Location/Addr[State='TX] or /Location/Addr[State='AL'], etc... But this is a bit cumbersome since the xpaths are quite long, as is the list of values. My google-fu isn't turning up much on the issue...

    Read the article

  • Firing events in script task

    - by Anonymouslemming
    I've got an SSIS project where I am constructing an SQL command based on some variables. I'm constructing the command in a script task, and want to output the constructed SQL to the 'Execution Results' window. I am trying to do this using a FireInformation line from inside my script as follows: Dts.Events.FireInformation(99, "test", "Make this event appear!", "", 0, true); However, in the script editor when editing ScriptMain.cs, that line is underlined in red, and on mouseover, I get the following message: Error: The best overloaded method match for 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.EventsObjectWrapper.FireInformation(int, string, string, string, int, ref bool') has some invalid arguments As a result, my script does not compile and I cannot execute it. Any idea what I'm doing wrong here, or what I need to change to be able to see the values of my variables at this point in the Execution output?

    Read the article

  • element height after content change

    - by Neph
    I have a snippet of code that alters the contents of a DIV to match the contents of a textarea and then applies the height change in the DIV to the textarea element. function growTextArea(parameter) { $('div').find("[data-fieldid='1_description']").text($(parameter).val()); // No Works height = $('.hiddenDiv').find("[data-fieldid='1_description']").outerHeight(); alert(height); // Works heightDiv = $('.hiddenDiv').outerHeight(); alert(heightDiv); $(parameter).css('height', $('div').find("[data-fieldid='1_description']").outerHeight()); } The DIV contents change properly, so the search function is working properly, however the search function always returns the original height of the DIV. The function is called by onKeyUp in the textarea. If the .find is swapped out for a .hiddenDiv the height change is reflected properly.

    Read the article

  • How to understand the output of the PHP regex matching below?

    - by smarty
    $file = '{include file="{$COMMON_TPL_PATH}common/header_admin.tpl"} {include file="{$mainPage}"} {include file="{$COMMON_TPL_PATH}common/footer_admin.tpl"}'; preg_match('/^(\{\})|^(\{\*([\S\s]*?)\*\})|^(<\?(?:php\w+|=|[a-zA-Z]+)?)|^([ ]*[ ]+[ ]*)|^(\{strip\})|^(\{\/strip\})|^(\{literal\})|^(\{\s{1,}\/)|^(\{\s{1,})|^(\{\/)|^(\{)|^(([\S\s]*?)(?=([ ]*[ ]+[ ]*|\{|<\?)))|^([\S\s]+)/', $file, $matches); var_dump($matches); Why the output is: array(13) { [0]=> string(1) "{" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(0) "" [4]=> string(0) "" [5]=> string(0) "" [6]=> string(0) "" [7]=> string(0) "" [8]=> string(0) "" [9]=> string(0) "" [10]=> string(0) "" [11]=> string(0) "" [12]=> string(1) "{" } It seems to me that ^([\S\s]+) can match the whole string..

    Read the article

  • Word filter that groups words?

    - by Legend
    Is there any library that achieves the following: Convert Microsoft Windows 98 Microsoft Windows XP Windows 7 Windows Ultimate Desktop Windows to Windows 4 The complicated part here is to recognize that "Desktop Windows" is an anomaly here and not count it. If nothing is added before the word "Windows", perhaps it can be counted but if there is something else and the suffix does not match any popular suffix, it can still be counted. Maybe I am a little vague here but perhaps someone could have an idea about what I am talking about here. Any suggestions?

    Read the article

  • Javascript syntax error

    - by Mel
    Hello, I'm wondering if anyone can help me with a syntax error in line 14 of this code: The debugger says expected ')' after argument list on var json = eval('(' + content ')'); I tried adding a bracket, but it doesn't seem to be working. // Tooltips for index.cfm $(document).ready(function() { $('#catalog a[href]').each(function() { $(this).qtip( { content: { url: 'components/viewgames.cfc?method=fGameDetails', data: { gameID: $(this).attr('href').match(/gameID=([0-9]+)$/)[1] }, method: 'get' }, api: { beforeContentUpdate: function(content) { var json = eval('(' + content ')'); content = $('<div />').append( $('<h1 />', { html: json.TNAME })); return content; } }, }); }); });

    Read the article

  • Testing for the presence of a character in an string in C

    - by Prab
    What's wrong with this? #include <stdio.h> void main(){ char *s="some text"; printf("%d",is_in(s,'t')); } int is_in(char *s, char c){ while(*s){ if(*s==c) return 1; s++; } return 0; } I get the following compile time error with GCC: test.c:9: error: conflicting types for ‘is_in’ test.c:9: note: an argument type that has a default promotion can’t match an empty parameter name list declaration test.c:5: note: previous implicit declaration of ‘is_in’ was here

    Read the article

  • XSL - How to tell if element is last in series

    - by Chris
    I have an XSL template that is called (below). What I would like to do is be able to tell if I am the last Unit being called. <xsl:template match="Unit[@DeviceType = 'Node']"> <!-- Am I the last Unit in this section of xml? --> <div class="unitchild"> Node: #<xsl:value-of select="@id"/> </div> </xsl:template> Example XML <Unit DeviceType="QueueMonitor" Master="1" Status="alive" id="7"> <arbitarytags /> <Unit DeviceType="Node" Master="0" Status="alive" id="8"/> <Unit DeviceType="Node" Master="0" Status="alive" id="88"/> </Unit>

    Read the article

  • strip version from package name using Bash

    - by cd1
    hi, I'm trying to strip the version out of a package name using only Bash. I have one solution but I don't think that's the best one available, so I'd like to know if there's a better way to do it. by better I mean cleaner, easier to understand. suppose I have the string "my-program-1.0" and I want only "my-program". my current solution is: #!/bin/bash PROGRAM_FULL="my-program-1.0" INDEX_OF_LAST_CHARACTER=`awk '{print match($0, "[A-Za-z0-9]-[0-9]")} <<< $PROGRAM_FULL` PROGRAM_NAME=`cut -c -$INDEX_OF_LAST_CHARACTER <<< $PROGRAM_FULL` actually, the "package name" syntax is an RPM file name, if it matters. thanks!

    Read the article

  • Need data on disk drive management by OS: getting base I/O unit size, “sync” option, Direct Memory A

    - by Richard T
    Hello All, I want to ensure I have done all I can to configure a system's disks for serious database use. The three areas I know of (any others?) to be concerned about are: I/O size: the database engine and disk's native size should either match, or the database's native I/O size should be a multiple of the disk's native I/O size. Disks that are capable of Direct Memory Access (eg. IDE) should be configured for it. When a disk says it has written data persistently, it must be so! No keeping it in cache and lying about it. I have been looking for information on how to ensure these are so for CENTOS and Ubuntu, but can't seem to find anything at all! I want to be able to check these things and change them if needed. Any and all input appreciated.

    Read the article

  • How to post on Facebook with Android using the latest SDK

    - by user645402
    All the samples I have seen so far seem to be using an earlier version of the SDK and the parameters and calls don't match. Using the latest SDK, I'm trying this: String access_token = facebook.getAccessToken(); Bundle bundle = new Bundle(); bundle.putString("access_token", access_token); bundle.putString("app_id", FACEBOOK_APP_ID); bundle.putString("message", "My First Post"); bundle.putString("description", "My First Description"); asyncrunner.request("me/feed", bundle, new RequestListener() { And i get back a call to onComplete() with response = "{"data":[]}. And nothing ever gets posted to my wall on FB. Perhaps I'm not waiting long enough? How long should I need to wait before it shows up?

    Read the article

  • Read Core data in Serial Queue for iPhone app

    - by user1277209
    I have an app which uses Core data and the values are fetched from a link on internet. This runs absolutely fine when I am creating a serial queue in AppDelegate and I am not facing any problem with the same. Now, when I am trying to re-create similar scenario in a UITableViewController and executing the same in a serial queue but when the control reaches NSError *error; NSArray *match = [context executeFetchRequest:fetchRequest error:&error]; execution control disappears and then this code remains in the execution till eternity. Can anyone help me with what exactly is wrong here? FYI, I am passing the same ManagedObjectContext to the serial queue.

    Read the article

  • Offline navigation software for Android - what is out there?

    - by Ted
    Im looking for navigation software for the Android platform and I have a few requirements: Offline maps. The maps should be stored on the device/memory card so no Internet-connection is required There should be some way to interact with the application "through code"; sending route requests, getting current location perhaps, bringing app to foreground/background, etc. An API so it can be controlled from another application. No monthly fees The only one I found so far to match the above is Sygic Navigation. However, I havent yet been able to communication with the app even though they say that it can be done. Still investigating that...

    Read the article

< Previous Page | 173 174 175 176 177 178 179 180 181 182 183 184  | Next Page >