How to search for a string in an arraylist

List <String> list = new ArrayList(); list.add(“behold”); list.add(“bend”); list.add(“bet”); list.add(“bear”); list.add(“beat”); list.add(“become”); list.add(“begin”); List <String> listClone = new ArrayList<String>(); for (String string : list) { if(string.matches(“(?i)(bea).*”)){ listClone.add(string); } } System.out.println(listClone);

Live search through table rows

I’m not sure how efficient this is but this works: $(“#search”).on(“keyup”, function() { var value = $(this).val(); $(“table tr”).each(function(index) { if (index != 0) { $row = $(this); var id = $row.find(“td:first”).text(); if (id.indexOf(value) != 0) { $(this).hide(); } else { $(this).show(); } } }); });​ DEMO – Live search on table I did add … Read more

Tagging CALayers in iPhone

You can also use the name property of the CALayer. [layer setName:@”myKey”]; To look it up, – (CALayer *)myLayer { for (CALayer *layer in [superLayerOfMyLayer sublayers]) { if ([[layer name] isEqualToString:LabelLayerName]) { return layer; } } return nil; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)