Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
pattern
- Page 1
How to Optimize RecyclerView performance by implementing the ViewHolder
Programming
Mobile Development
2 Months Ago
by Mikekelvin
When working with RecyclerView, always utilize the ViewHolder
pattern
to improve performance by minimizing the number of findViewById() calls. …(), resulting in smoother scrolling and improved efficiency. Context: The ViewHolder
pattern
is crucial in Android development, especially when dealing with RecyclerViews…
Re: ASUS Laptops - my experience
Hardware and Software
2 Months Ago
by toneewa
… and finding out it has a different lug nut bolt
pattern
on the rim. No recovery partition is going to work…
Pattern Help Please
Programming
Software Development
13 Years Ago
by Python_Doofus
… I have so far although it has an entirely different
pattern
to what I need. it also has to have graphics…
Pattern
Programming
Software Development
13 Years Ago
by aditi17
write a c program to print
pattern
1 2 3 8 9 4 7 6 5
Pattern help
Programming
Game Development
11 Years Ago
by Dann0
…, I'm trying to make an AI character perform a
pattern
movement when a certain action occurs rather than have him…
"*" Pattern
Programming
Software Development
10 Years Ago
by Purav_1
* * * * * * * * * * * * Can anyone write a program to print this type of
pattern
?
Pattern
Programming
Software Development
9 Years Ago
by harsh.khanna.37
I wanted to make a
pattern
in form- a b b c c c d d …
Pattern-matching
Programming
Software Development
14 Years Ago
by Hawkflame
…in quotation marks, and click a match
pattern
button, outputting where that
pattern
was found in the first textfield. …Example: abcdeee "abc"
Pattern
was found beginning at position 1. I need to… of char and finding the similar
pattern
, then outputting where the
pattern
was found via system.out.println.…
Pattern Finder
Programming
Software Development
12 Years Ago
by minimi
…text file and output lines that contain the
pattern
(which this in case is Bob - so…strindex(char source[], char searchfor[]); char
pattern
[MAXLINE] = "Bob"; //
pattern
to search for // find all lines… while (getline(line, MAXLINE) > 0) if (strindex(line,
pattern
) >= 0) { printf("%s", line); found++; …
Re: pattern problem??..need help fast
Programming
Software Development
16 Years Ago
by Duoas
Forgive the apparent pun, but you need to observe the
pattern
of your image. For illustration I'll supply my own…always be (number of lines - 1) red dots. The second
pattern
is the number of green dots. The first line contains…the alphabet. There are also seven lines. Now, consider each
pattern
. Put them all together into a single loop which prints…
Re: pattern selection.
Programming
Software Development
16 Years Ago
by Narue
I'm guessing that
pattern
isn't defined like this: [code=cplusplus] char
pattern
; [/code] If that's …the case, then you should probably be comparing
pattern
against 1 and 2 rather than '1' and …'2': [code=cplusplus] if (
pattern
== 1 ) { target1 = 1; target2 = 0; } if (
pattern
== 2 ) { target1 = 0; target2 = 1…
pattern selection.
Programming
Software Development
16 Years Ago
by 666kennedy
… in [CODE] cout << "please select which
pattern
: "; cin >>
pattern
; if (
pattern
== '1' ) { target1 = 1; target2 = 0; } if…
Re: pattern selection.
Programming
Software Development
16 Years Ago
by Sky Diploma
…. [code=cplusplus]cout << "please select which
pattern
: "; cin >>
pattern
; if (
pattern
== '1' ) { target1 = 1; target2 = 0; } else…
Pattern Searching
Programming
Software Development
18 Years Ago
by vicky_dev
Program to demonstrate
pattern
-searching of strings. This program interactively builds a list of … searches for words in the list that match a specified
pattern
. The
pattern
can include wildcard chars * and ?. Eg : The query s… heart of the program. It returns 1 if a string
pattern
matches another in input. The function has quite a few…
pattern match
Programming
Software Development
13 Years Ago
by m-e-g-a-z
…Scanner; import java.util.regex.Matcher; import java.util.regex.
Pattern
; public class sam { public static void main (String …String a=s.next(); //if it can find
pattern
if(a.matches("([a-fA-F0-9]*)")){…s.next(); //check if it matches
pattern
} //while it cannot find
pattern
in String or ineger value is higher…
Pattern returns only first occurence
Programming
Software Development
9 Years Ago
by nikk8a
… values. I am unable to get list of tokens via
Pattern
matching. Below is my code snippet. String str = …"test [text1] text [text2]";
Pattern
p =
Pattern
.compile("(\\[\\w+\\])"); Matcher m = p.matcher(str); if… me know what am I missing in the
pattern
that I am getting only the first occurence? Thanks…
Re: Pattern in a file
Programming
Software Development
11 Years Ago
by TrustyTony
…\t'.join(os.listdir('.')) def find(
pattern
, case_insensitive=True): if case_insensitive:
pattern
=
pattern
.lower() return '
Pattern
was %sfound.' % ('' if
pattern
in read_valid(case_insensitive) else 'not…
pattern problem??..need help fast
Programming
Software Development
16 Years Ago
by tech2chill
… ABCD DCBA ABC CBA AB BA A A [/code] the
pattern
is not showin up proper,,but hope u guys get…); m++; } ........moving on like this... i cld only get a
pattern
ABCDEFG ABCDEF ABCDE ABCD ABC AB A i know thers…
Re: pattern selection.
Programming
Software Development
16 Years Ago
by 666kennedy
this is a screen dump please select which
pattern
: 1 target 1 is: -1.#QNAN target 2 is: 9.…79083e+027 please select each pixel in the
pattern
: pixel1: as u can see the targets dont come up…
Re: pattern match
Programming
Software Development
13 Years Ago
by stephen84s
…/regex/quant.html"]quantifier[/URL] suggests that the mentioned
pattern
may occur zero or more times, so even a blank… "*" to a "+" which implies the given
pattern
appear at least once. [URL="http://java.sun.com…
Pattern matching in MySQL table and Python
Programming
Software Development
13 Years Ago
by acrocephalus
… to write a function that looks for a desired string
pattern
within a table (Countries). Look at the code. [CODE]def… I program it so that it search for any desired
pattern
? I know how to do it for a single…
Re: Pattern Finder
Programming
Software Development
12 Years Ago
by nezachem
At line 41, you always comparing t against s[1...], no matter how deep you are in the enclosing loop. If the string has a
pattern
at position 1, you'll match it many timers. Otherwise, you'll never match it. In other words, initialization [ICODE]j=1[/ICODE] is wrong.
Re: Pattern Finder
Programming
Software Development
12 Years Ago
by minimi
… are in the enclosing loop. If the string has a
pattern
at position 1, you'll match it many timers. Otherwise…
Re: Pattern in a file
Programming
Software Development
11 Years Ago
by snippsat
…file_in = raw_input("Insert file: ")
pattern
= raw_input("Insert
pattern
: ") try: with open(file_in) as…for file_content in a_file: if
pattern
in file_content: return '
Pattern
was found' return '
Pattern
was not found' except …
Re: pattern matching algorithm
Programming
Software Development
10 Years Ago
by deceptikon
Walk over the source once. Keep a reference to the first match and as long as the source matches the
pattern
, walk over the
pattern
too. If the
pattern
reaches the end of the string, you have a complete match. Otherwise, reset the
pattern
and start over.
Re: pattern selection.
Programming
Software Development
16 Years Ago
by Narue
It seems to work fine for me. Can you be more specific about how it's not working properly? Perhaps also tell us what the type of your
pattern
variable is?
Re: Pattern in a file
Programming
Software Development
11 Years Ago
by Lucaci Andrew
def find(): file = raw_input("Insert file: ")
pattern
= raw_input("Insert
pattern
: ") try: if any(iter for iter in open(file… iter): print "Patter was found." else: print "
Pattern
was not found." except: print "Invalid file."…
Re: pattern problem??..need help fast
Programming
Software Development
16 Years Ago
by Aia
Maybe it would be easier to think about it as an equilateral triangle in the middle filled with spaces. Here's an example of how to display an [URL="http://www.daniweb.com/forums/post458432-5.html"]equilateral triangle[/URL]. Then all you have to do is take care of the
pattern
of characters filling the surrounds.
Pattern Matching and Grouping
Programming
Software Development
15 Years Ago
by aru211285
… o get the string as group() or group(1).
Pattern
p =
Pattern
.compile("\b[0-9]{7,8}\b"); Matcher…
Re: Pattern Matching and Grouping
Programming
Software Development
15 Years Ago
by Lensva
provided the example you gave is normal and not just to illustrate the problem, couldnt you simply use: [code=java] String a = "1234567.txt";
Pattern
b=
Pattern
.compile("\\."); System.out.println(b.split(a)[0]); [/code]
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC