12 Topics

Member Avatar for
Member Avatar for nouth
Member Avatar for nouth
0
155
Member Avatar for Geli19

Hello everyone. I am building a small database that will hold information about volunteers and their talents. I have created a search form, in which the user can enter a keyword and it will search the tables for any match. Currently I am using a criteria of: Like "*" & …

Member Avatar for Geli19
0
821
Member Avatar for rahul.ch

List<? extends Integer> list = new ArrayList<Integer>(); for (Integer element : list) { System.out.println(element); List<? super Integer> list = new ArrayList<Integer>(); for (Integer element : list) { System.out.println(element); For the first three lines as Case 1 using extends it compiles fine. But for Case 2 of next three lines, it …

Member Avatar for rahul.ch
0
2K
Member Avatar for rahul.ch

<? super Animal> means animal or it's superclass only. Then why inside the method it's allowing to add Dog object even though it's a subclass of Animal? This program compiles and runs! import java.util.*; class Cat {} class Animal{Animal() {System.out.println("Animal constructor");}} class Dog extends Animal{Dog() {System.out.println("Dog constructor");}} public class GenericDemo5 …

Member Avatar for rahul.ch
0
335
Member Avatar for rahul.ch

import java.util.*; class SampleA { } class SampleB extends SampleA{ } class SampleC extends SampleA{ } class VectorDemo { public static void main(String r[]) { Vector<SampleA> v = new Vector<SampleA>(); v.add(new SampleB()); v.add(new SampleC()); SampleC rect = v.get(2); } } The output says "Incompatible types. Found SampleA, required SampleC. SampleC …

Member Avatar for rahul.ch
0
225
Member Avatar for TrustyTony

Here slightly edited code from one of my earliest posts to DaniWeb. Limitted by recursion limit of Python as it uses recursion, but interesting for me.

Member Avatar for TrustyTony
0
1K
Member Avatar for Clarkeez

Hello I'm not sure how this is possible but I want to enter a wildcard(?) into a php variable.. like this, <?php if($_SERVER['HTTP_HOST'] == '*.domain.com') { //do something } ?> Notice the * I basically need it to match if its any subdomain of domain.com Possible?

Member Avatar for Biiim
0
354
Member Avatar for SAM2012

I am new to this forum. I need help in defining the same kind of function according to my requirements. as [url]http://www.codeproject.com/Articles/1088/Wildcard-string-compare-globbing[/url] I hope, I 'll get good response. Words are strings which are separated by dots. Two additional characters are also valid i.e:The *, which matches 1 word and …

Member Avatar for deceptikon
0
199
Member Avatar for cooket3

Hi I have a macro in excel that, creates an email in outlook. The issue I have is, this spreadsheet can be used by multiple people and I want their corresponding email signature in the email when they send it The signature code I have is : SigString = "C:\Documents …

0
134
Member Avatar for JamesCherrill

The sort methods for collections specifies that the parameter must be a collection of objects that implement Comparable for their own class or superclass, eg [CODE]public static <T extends Comparable<? super T>> void sort(List<T> list)[/CODE] Can anyone tell me how to define an ArrayList that will only accept such objects? …

Member Avatar for ~s.o.s~
0
183
Member Avatar for daudiam

Consider the following code : [CODE]class R2<E> { E a; E get() { return a; } void set(E a) { this.a=a; } } class R3 { void doit(R2 a) // (1) { a.set(new Integer(5)); } }[/CODE] When I compile the file containing class R3, it rightly gives an unchecked warning …

Member Avatar for daudiam
0
161
Member Avatar for Excizted

Hi people, I'm trying to match strings from a pattern containing[B] wildcards[/B]. Basically I need to be able to go through a stack of strings, and see which of them matches my pattern. Fx [B]My*.txt[/B] will match only one of these. [U]MyFile.txt[/U] [I]MyFile.php[/I] I'm aiming to end up with a …

Member Avatar for NathanOliver
0
5K

The End.