Search Results

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

Page 118/269 | < Previous Page | 114 115 116 117 118 119 120 121 122 123 124 125  | Next Page >

  • Error exposing event througt interface

    - by carlos
    I have this interface Interface IProDataSource Delegate Sub DstartingHandler(ByVal sender As Object, ByVal e As EventArgs) Event starting_Sinc As DstartingHandler End Interface Trying to use the intarce like this Public Class DataSource : Implements IProDataSource Public Event starting_Sinc As DstartingHandler Implements IProDataSource.starting_Sinc Public Delegate Sub DstartingHandler(ByVal sender As Object, ByVal e As EventArgs) End Class Gives me the next error Event 'starting_Sinc' cannot implement event 'starting_Sinc' on interface 'IProDataSource' because their delegate types 'DstartingHandler' and 'IProDataSource.DstartingHandler' do not match.

    Read the article

  • pluralize function in ruby NOT RAILS!

    - by DJTripleThreat
    Writing some ruby code (not rails) and I need to handle something like this: found 1 match found 2 matches I have rails installed so maybe I might be able to add a require clause at the top of the script, but does anyone know of a RUBY method that pluralizes strings? Is there a class I can require that can deal with this if the script isn't rails but I have rails installed? Thanks in advance!

    Read the article

  • Adding a Image to UITable View Cell

    - by Graeme
    Hi, I have a table in which I want a dynamic image to load in at the left-hand side. The table needs to use an IF statement to select the appropriate image from the "Resources" folder, and needs to be based upon [dog types]. The [dog types] is extracted from an RSS feed, and so the image in the table cell needs to match the each cell's [dog types] tag. I suspect I need to use - (UIImage *)imageForTypes:(NSString *)types { to do such a thing. Thanks.

    Read the article

  • Not Equal two Generic Lists

    - by David Johnson
    I have two generic lists, both containing different data, except 4 fields, which I want to compare to another list and find items that do not match in either list. I need to basically replace where it says equals below, with not equals! var unMatchedData = from liveLines in liveList join oldList in comapreSnapshotList on new {liveLines.ClientNo, liveLines.SequenceNo, liveLines.LineNo, liveLines.Text} equals new {oldList.ClientNo, oldList.SequenceNo, oldList.LineNo, oldList.Text} select new KNOWTXTS { ClientNo = liveLines.ClientNo, SequenceNo = liveLines.SequenceNo, LineNo = liveLines.LineNo, Text = liveLines.Text };

    Read the article

  • how to do reverse fulltext search in MySQL?

    - by Shore
    By default it's like this: select * from main_table where match(col1,col2) against('search_item'); but what I want to fetch is the reverse, say,I've restored all the search_item(1000 records,for example), and I want to see which of them matches a specified row in main_table. Is that doable?

    Read the article

  • XCode: Function argument indentation

    - by user343317
    I was unable to find any solution of my specific issue. I'm using Xcode 3.2. I'd like to indent the next line of function argument just one step in from the previous line: somevariable = pow( a, b); However, Xcode's syntax-aware indenting insists on converting the above into: somevariable = pow( a, b); Where the arguments are aligned with opening parenthesis of the function. How can I make indenting be configured to match my preference?

    Read the article

  • Bi-partitle matching in Python

    - by vailen
    Does anybody know any module in Python that computes the best bi-partite matching? I have tried the following two: munkres hungarian However, in my case, I have to deal with non-complete graph (i.e., there might not be an edge between two nodes), and therefore, there might not be a match if the node has no edge. The above two packages seem not be able to deal with this. Any advise?

    Read the article

  • find: What's up with basename and dirname?

    - by temp2290
    I'm using find for a task and I noticed that when I do something like this: find `pwd` -name "file.ext" -exec echo $(dirname {}) \; it will give you dots only for each match. When you s/dirname/basename in that command you get the full pathnames. Am I screwing something up here or is this expected behavior? I'm used to basename giving you the name of the file (in this case "file.ext") and dirname giving you the rest of the path.

    Read the article

  • How would I write this shell script as a Windows batch script?

    - by Jeremy Banks
    I haven't had a chance to test this script, I'm just using it as a suitable pseudocode. It's just supposed to copy all files in the current directory into a timestamped subdirectory. ID="$(date +%Y%b%d%H%M%S)" COMMITABLE="$(ls | egrep --invert-match ^(STATES|PARENT)\$)" STATE_PATH="$(pwd)/STATES/$ID" mkdir --parents "$STATE_PATH" cp $COMMITABLE "$STATE_PATH" ln -s "$STATE_PATH" PARENT

    Read the article

  • Money vs. Decimal vs. Float Performance issues (SQL data types for Currency value)?

    - by urz shah
    What data type should be selected in case of Currency value column in SQL server. I have read some where on web Working on customer implementations, we found some interesting performance numbers concerning the money data type. For example, when Analysis Services was set to the currency data type (from double) to match the SQL Server money data type, there was a 13% improvement in processing speed (rows/sec). Is it true??

    Read the article

  • Split a string by two characters

    - by David
    Hi, Firstable i want to match if a string has the following format: $abc #xyz or $abc .xyz. The abc and xyz mean only alphanumeric string. If it's matched then i need to extract the first $abc and the last #xyz, all that using pure javascript and maybe regex. The pattern is in the following order: Dollar Sign Unlimited alphanumeric string space a hash or point Unlimited alphanumeric string Thanks in advance for any help.

    Read the article

  • Help needed in writing regular expression using TCL

    - by user330727
    Hello Everyone, Just seeking a favour to write a regular expression to match the following set of strings. I want to write an expression which matches all the following strings TCL ( XYZ XZZ XVZ XWZ ) Clue : Starting string is X and Z ending string is same for all the pairs. Only the middle string is differs Y Z V W. My trial: [regexp {^X([Y|Z|V|W]*)Z$}

    Read the article

  • Is There A Way To Apply CODE Formatting To A VB.Net TextBox?

    - by Jeff
    I'm playing with a simple string replacement editor for editing VB.Net functions outside of VB. Is there a way to apply VB.Net code formatting to a string? For example. The txtboxCodeEntry looks like this: If strVar="dummy" then 1 else 0 Endif I would like it to "autoformat" to: If strVar = "dummy" Then 1 Else 0 End If The formatting would match whatever formatting VB.Net does when you're editing code in the Visual Studio IDE. Thanks.

    Read the article

  • How Do I Hide wpf datagrid row selector

    - by Tim Almond
    I'm using the WPF DataGrid control to show some details and a select button, and I don't need the grey selector column down the left hand side. It's also ruining the beauty of my design ;) Is there a way to remove it, or how can I style it to match if not?

    Read the article

  • How to: compare array with string and create hastags before tweeting

    - by krike
    Let's say I have the following array (which is the returned value of a database query): Array ( [0] => PHP [1] => Webdesign [2] => Wordpress [3] => Drupal [4]) And the following string: Working With Wordpress Shortcodes How can I compare the array with the string to see if the string contains any word stored in the array? (hopefully that made sense to you :d ) When he finds a match (eg: Wordpress) it should create a hashtag like so: Working With #Wordpress Shortcodes

    Read the article

  • Flex, continuous scanning stream (from socket). Did I miss something using yywrap()?

    - by Diederich Kroeske
    Working on a socketbased scanner (continuous stream) using Flex for pattern recognition. Flex doesn't find a match that overlaps 'array bounderies'. So I implemented yywrap() to setup new array content as soon yylex() detects < (it will call yywrap). No success so far. Basically (for pin-pointing my problem) this is my code: %{ #include <stdio.h> #include <string.h> #include <stdlib.h> #define BUFFERSIZE 26 /* 0123456789012345678901234 */ char cbuf1[BUFFERSIZE] = "Hello everybody, lex is su"; // Warning, no '\0' char cbuf2[BUFFERSIZE] = "per cool. Thanks! "; char recvBuffer[BUFFERSIZE]; int packetCnt = 0; YY_BUFFER_STATE bufferState1, bufferState2; %} %option nounput %option noinput %% "super" { ECHO; } . { printf( "%c", yytext[0] );} %% int yywrap() { int retval = 1; printf(">> yywrap()\n"); if( packetCnt <= 0 ) // Stop after 2 { // Copy cbuf2 into recvBuffer memcpy(recvBuffer, cbuf2, BUFFERSIZE); // yyrestart(NULL); // ?? has no effect // Feed new data to flex bufferState2 = yy_scan_bytes(recvBuffer, BUFFERSIZE); // packetCnt++; // Tell flex to resume scanning retval = 0; } return(retval); } int main(void) { printf("Lenght: %d\n", (int)sizeof(recvBuffer)) ; // Copy cbuf1 into recvBuffer memcpy(recvBuffer, cbuf1, BUFFERSIZE); // packetCnt = 0; // bufferState1 = yy_scan_bytes(recvBuffer, BUFFERSIZE); // yylex(); yy_delete_buffer(bufferState1); yy_delete_buffer(bufferState2); return 0; } This is my output: dkmbpro:test dkroeske$ ./text Lenght: 26 Hello everybody, lex is su>> yywrap() per cool. Thanks! >> yywrap() So no match on 'super'. According to the doc the lexxer is not 'reset' between yywrap's. What do I miss? Thanks.

    Read the article

  • Nested Resource - How to pass needed keys, and attribute to update?

    - by Jason B
    My nested resources are working for form_for updates, but I have a few toggles that I need to setup to change a status field. So I am using link_to, and accessing the url helper. link_to "toggle", edit_project_expense_path(@project[:id],expense_item[:id]) routes.rb resources :projects do resources :expenses end match '/submit_expense/:id' => 'expenses#submit_expense', :as => 'submit_expense' rake routes edit_project_expense GET /projects/:project_id/expenses/:id/edit(.:format) expenses#edit My question is: How can I also send along :approval_status = "1", with my link_to?

    Read the article

  • Syntax highlighting Abbreviations

    - by Nimbuz
    I'm using Google prettify for syntax highlighting and I'd like to modify the colors to match my website theme, but I don't understand some of the abbreviations from these: str = string atw kwd = keyword tag = tag com = comment typ = type? atn dec = declaration? lit pun = punctuation? like colons, braces? pln prettyprint

    Read the article

  • Help needed in writing regular expression -- TCL

    - by user330727
    Hello Everyone, Just seeking a favour to write a regular expression to match the following set of strings. I want to write an expression which matches all the following strings TCL i) ( XYZ XZZ XVZ XWZ ) Clue : Starting string is X and Z ending string is same for all the pairs. Only the middle string is differs Y Z V W. My trial: [regexp {^X([Y|Z|V|W]*)Z$}] I want to write an another regexp which catches/matches only the following string wherever comes ii) (XYZ) My trial: [regexp {^X([Y]*)Z$}]

    Read the article

  • What happens in memory when calling a function with literal values?

    - by Drise
    Suppose I have an arbitrary function: void someFunc(int, double, char); and I call someFunc(8, 2.4, 'a');, what actually happens? How does 8, 2.4, and 'a' get memory, moved into that memory, and passed into the function? What type of optimizations does the compiler have for situations like these? What if I mix and match parameters, such like someFunc(myIntVar, 2.4, someChar);? What happens if the function is declared as inline?

    Read the article

< Previous Page | 114 115 116 117 118 119 120 121 122 123 124 125  | Next Page >