Search Results

Search found 4934 results on 198 pages for 'finding'.

Page 36/198 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • finding character in string C language

    - by iSight
    Hi, I am searching a character at first occurence in string using the following code. But, it is taking some time when the character is too long or the character that i am searching is at far extend, which makes delay in other operations. How could i tackle with this problem. The code is below here. Note: attrPtr is a char* which holds a reference to a string containing '"' character at far extend. int position = 0; char qolon = '"';//character to search while (*(attrPtr + position++) != qolon); char* attrValue = NULL; attrValue = (char*)malloc(position * sizeof(char)); strncpy(attrValue, attrPtr, position-1);

    Read the article

  • Finding C#-style unescaped strings using regular expressions

    - by possan
    I'm trying to write a regular expression that finds C#-style unescaped strings, such as string x = @"hello world"; The problem I'm having is how to write a rule that handles double quotes within the string correctly, like in this example string x = @"before quote ""junk"" after quote"; This should be an easy one, right?

    Read the article

  • Finding the closest match

    - by doublescorpio
    I Have an object with a set of parameters like: var obj = new {Param1 = 100; Param2 = 212; Param3 = 311; param4 = 11; Param5 = 290;} On the other side i have a list of object: var obj1 = new {Param1 = 1221; Param2 = 212; Param3 = 311; param4 = 11; Param5 = 290;} var obj3 = new {Param1 = 35; Param2 = 11; Param3 = 319; param4 = 211; Param5 = 790;} var obj4 = new {Param1 = 126; Param2 = 218; Param3 = 2; param4 = 6; Param5 = 190;} var obj5 = new {Param1 = 213; Param2 = 121; Param3 = 61; param4 = 11; Param5 = 29;} var obj7 = new {Param1 = 161; Param2 = 21; Param3 = 71; param4 = 51; Param5 = 232;} var obj9 = new {Param1 = 891; Param2 = 58; Param3 = 311; param4 = 21; Param5 = 590;} var obj11 = new {Param1 = 61; Param2 = 212; Param3 = 843; param4 = 89; Param5 = 210;} What is the best (easiest) algorithm to find the closest match for the first obj in the listed objects?

    Read the article

  • Finding the count of characters and numbers in a string

    - by Aspirant
    Hi I have a table test as below NAME --------- abc1234 XYZ12789 a12X8b78Y9c5Z I try to find out the count of number of numbers and characters in the string as select name,length(replace(translate(lower(name),'abcdefghijklmnopqrstuvwxyz',' '),' ','')) as char_count, length(replace(translate(name,'1234567890',' '),' ','')) as num_count from test6; Its executing fine giving the output NAME CHAR_COUNT NUM_COUNT abc1234 4 3 XYZ12789 5 3 a12X8b78Y9c5Z 7 6 But my question is there any option by not giving the abcdefghijklmnopqrstuvwxyz and 1234567890 manually

    Read the article

  • Finding folders

    - by gedO
    Hello. I want to find how much folders are in folder or I should say how much SubFolreds are in folder. So, how I should do that??? P.S. I'm programing with Delphi

    Read the article

  • Finding Links on a Webpage with Java

    - by alan
    Using Java have the source code of a webpage stored in a string. I want to extract all the urls in the source code and output them. I am awful with regex and the like and have no idea how to even approach this. Any help would be greatly appreciated.

    Read the article

  • finding the value of radio button with jquery

    - by oo
    i have this code below to show different divs when i choose certain radio buttons: if ($("input[@name='exerciseRB']:checked").val() == 'New') { $("#newExercise").show(); $("#existingExercise").hide(); } else { $("#newExercise").hide(); $("#existingExercise").show(); } at first, i just had two radio buttons (both named exerciseRB and everything works fine. Now, later in my web page i added two new radio buttons (with the name lessonRB). The issue is that once i added these other new radio buttons when i look up this in firebug: $("input[@name='exerciseRB']:checked") i actually get an array back with both the exerciseRB item as well as the lessonRB item. Its almost as if the @name='exerciseRB' is being ignored. any ideas here?

    Read the article

  • finding specific immediate children of an element using prototype

    - by tatilans
    Following DOM structure: <ul> <li class="item">yes</li> <li>no</li> <li class="item">yes</li> <li> <ul> <li class="item">no</li> </ul> </li> </ul> Assuming I have the outer <ul> in $ul. How do I get the two immediate children which have the item-class? In jQuery I would write something like this: $ul.children().filter(".item") $ul.children(".item") $ul.find("> .item") How do I to this with Prototype? I tried the following ... $ul.select("> .item") //WRONG ... but it does does exactly the opposite and returns the one inner <li>

    Read the article

  • Finding all properties of a javascript class

    - by uzay95
    I have classes looks like below: function Student(name, surname, lossons){ this.Name = name; this.Surname = surname; this.Lessons = lessons; } function Lesson(){ this.Name = name; this.studentCount = count; } And i want to write ToString method to them. But i don't want to write and add them one by one. Is there any way to do this like reflection in C# or Java ? Any help would be appreciated...

    Read the article

  • Finding all the URL requests from a firefox extension

    - by user303052
    I am building a firefox extension. In this extension, I want to see the URLs of any new webpage that the user visits. The webpage can be in a different tab or window than the current tab that the user is viewing (this should also catch the URL of pop-ups). Is there a way to find when firefox makes a GET or POST request and grab the URL? An alternative that I am trying to avoid is going through all the tabs and manually check to see if they have loaded a new page. Thanks

    Read the article

  • Finding employees specific to department in SQL SERVER 2000(SET BASED)

    - by xyz
    Suppose I have a table (tblEmp) whose structure is like as under Dept Emp d1 e1 d1 e2 d1 e3 d2 e4 d2 e5 d3 e6 If I need to bring the output as Dept DepartmentSpecificEmployees d1 e1,e2,e3 d2 e4,e5 d3 e6 I will write the query as select Dept, stuff((select Emp + ',' from tblEmp t2 where t1.Dept = t2.Dept for xml path(''),1,1,'')DepartmentSpecificEmployees from tblEmp t1 group by Dept But this will work in Sql Server 2005+. How can I achieve the same in Sql Server 2000 without any variable declaration or loop or cursor? If I use COALESCE as an alternative, then I need to use a variable which will defeat the purpose Please help

    Read the article

  • Finding Most Recent Order for a Particular Item

    - by visitor
    I'm trying to write a SQL Query for DB2 Version 8 which retrieves the most recent order of a specific part for a list of users. The query receives a parameter which contains a list of customerId numbers and the partId number. For example, Order Table OrderID PartID CustomerID OrderTime I initially wanted to try: Select * from Order where OrderId = ( Select orderId from Order where partId = #requestedPartId# and customerId = #customerId# Order by orderTime desc fetch first 1 rows only ); The problem with the above query is that it only works for a single user and my query needs to include multiple users. Does anyone have a suggestion about how I could expand the above query to work for multiple users? If I remove my "fetch first 1 rows only," then it will return all rows instead of the most recent. I also tried using Max(OrderTime), but I couldn't find a way to return the OrderId from the sub-select. Thanks! Note: DB2 Version 8 does not support the SQL "TOP" function.

    Read the article

  • finding elements in python association lists efficiently

    - by user248237
    I have a set of lists that look like this: conditions = [ ["condition1", ["sample1", "sample2", "sample3"]], ["condition2", ["sample4", "sample5", "sample6"], ...] how can I do the following things efficiently and elegantly in Python? Find all the elements in a certain condition? e.g. get all the samples in condition2. Right now I can do: for cond in conditions: cond_name, samples = cond if cond_name == requested_cond: return samples but that's clunky. Find the ordered union of a list of conditions? E.g. ordered_union(["condition1", "condition2"], conditions) should return: ["sample1", "sample2", "sample3", "sample4", "sample5", "sample6"] How can I do this efficiently in Python? There are probably clever one liners?

    Read the article

  • Python finding n consecutive numbers in a list

    - by lost_in_code
    I want to know how to find if there is a certain amount of consecutive numbers in a row in my list e.g. For example if I am looking for two 1's then: list = [1, 1, 1, 4, 6] #original list list = ["true", "true", 1, 4, 6] #after my function has been through the list. If I am looking for three 1's then: list = [1, 1, 1, 4, 6] #original list list = ["true", "true", "true", 4, 6] #after my function has been through the list. I have tried: list = [1, 1, 2, 1] 1,1,1 in list #typed into shell, returns "(1, 1, True)" Any help would be greatly appreciated, I mainly would like to understand whats going on, and how to check if the next element in the list is the same as the first x amount.

    Read the article

  • Mongo: Finding from multiple queries

    - by waxical
    New to Mongo here. I'm using the PHP lib and trying to work out how I can find in a collection from multiple queries. I could do this by repeating the query with a different query, but I wondered if it can be done in one. I.e. $idsToLookFor = array(2124,4241,5553); $query = $db->thisCollection->find(array('id' => $idsToLookFor)); That's what I'd like to do. However it doesn't work. What I'm trying to do is find a set of results for all the id's at one time. Possible or just do a findOne on each with a foreach/for?

    Read the article

  • Python: Problems finding string in website source code

    - by j00niner
    I open a website with urlopen. I then put the website sourcecode into a variable like so source = website.read() When I just print the source it comes out formatted correctly, however when I try to iterate through each line each character is it's own line. for example when I just print it looks like this <HTML> title</html> When I do this for line in source: print line it looks like this < H T M L ... etc I need to find a string that starts with "var" and then print that entire line.

    Read the article

  • Python finding repeating sequence in list of integers?

    - by tijko
    I have a list of lists and each list has a repeating sequence. I'm trying to count the length of repeated sequence of integers in the list: list_a = [111,0,3,1,111,0,3,1,111,0,3,1] list_b = [67,4,67,4,67,4,67,4,2,9,0] list_c = [1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,23,18,10] Which would return: list_a count = 4 (for [111,0,3,1]) list_b count = 2 (for [67,4]) list_c count = 10 (for [1,2,3,4,5,6,7,8,9,0]) Any advice or tips would be welcome. I'm trying to work it out with re.compile right now but, its not quite right.

    Read the article

  • finding elements with text using jQuery

    - by Tim Sheiner
    I want to create an array of all the html elements within a div that contain text strings, such as <p>some string</p>. I don't want to get hold of the strings, I want the array items to be the elements (in the example, would be the p node). I do not know before hand what the strings will be, so I can't look for string values to match. I also don't want empty text nodes to end up in the array. Thanks!

    Read the article

  • r -- finding difference between business days

    - by acesnap
    I have several years of data (only for business days (no weekends or holidays)) in an [r] data frame and would like to find the difference between the data on the 2nd and 5th business day of each month. So the solution needs to go thru the list, determine the 2nd and 5th business day, get the data for the corresponding dates and then find the difference. the data looks like: 1/19/1990 1.22 1/20/1990 1.25 1/23/1990 1.26 (Gap in date is weekend) ... 2/1/1990 1.34 2/2/1990 1.36 2/5/1990 1.22 (Gap in date is weekend) I have tried using dateTime() but it doesn't handicap for weekends and holidays. Any suggestions would be appreciated, thanks.

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >