Posts

android - How to create a clickable Listview and go to new page where the user can add items within the list -

i guidance on how create clickable listview , go new page user can add items within list creating list, , want user able create multiple lists, , tap list, , enter multiple items within list. thanks. update - added .java code reference. may explain have implemented far better text above. public class actionbarmenudemoactivity extends sherlocklistactivity { private static final string[] items = { }; private arraylist<string> words = null; @override public void oncreate(bundle icicle) { super.oncreate(icicle); initadapter(); registerforcontextmenu(getlistview()); } @override public boolean oncreateoptionsmenu(menu menu) { new menuinflater(this).inflate(r.menu.option, menu); edittext add = null; if (build.version.sdk_int >= build.version_codes.honeycomb) { view v = menu.finditem(r.id.add).getactionview(); if (v != null) { add = (edittext) v.findviewbyid(r.id.title); } } if (add != null) { ...

OpenCV: Searching for pixels along single-pixel branches -

Image
i'm trying find neat way of storing separate "branches" in binary image. little animation explains it: as go along branches need collect pixel indices makes single-pixel wide branch. when hit junction point should split , store new branches. one way of going maybe create 3x3 subregion, find out if there white pixels inside it, move accordingly, create junction point if there more two. store previous subregion 1 can use making sure don't move regions scanned. it's bit tricky figure out how go though. i need reorder pixels based on "line/curve" hierarchy. part of application redraw figures, internally works creating lines between points hence need have them "ordered". i don't know if apply in case should take @ cv::findcontour. vector of points ordered. http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html

php - ErrorException: Warning: Header may not contain more than a single header, new line detected -

i having trouble redirecting after function sends emails! function is: public function emailaction($emails, $url) { foreach($emails $email) { $message = \swift_message::newinstance() ->setsubject('updates in symfony blog') ->setfrom(array('blog@symfonyblog.com' => 'symfony blog')) ->setto($email["email"]) ->setbody( $this->renderview( 'newsblogbundle:default:email.txt.twig', array('url' => $url) ) ) ; $this->get('mailer')->send($message); } return $this->redirect($this->newpostaction()); //return $this->redirect($this->generateurl('newsblogbundle_homepage')); } it sends emails ok, when redirecting, gives error: errorexception: warning: header may not contain more single header, new line detected in c:\path\to\webr...

orchardcms - Orchard CMS - Text visible on every page & editable in CMS -

i add in top right of every page - contact phone & email link. they styled uniquely on page css - based on containing div's class. what best practice way make visible on every page - , editable in cms? would have have html markup editable (the client non technical)? thanks. you want add html widget on default layer. can give custom classes etc. , style within theme.

How to supply command line argument to perl script through Java -

i running perl script through java. code shown below. try { process p = runtime.getruntime().exec("perl 2.pl"); bufferedreader br = new bufferedreader( new inputstreamreader(p.getinputstream())); system.out.println(br.readline()); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } my perl script in such way when run directly through command line ask me supply input file. question how supply file name perl script through java? if don't want add command line argument script (which cleaner , more robust) need write script's stdin. this snippet should work (test.java): import java.io.*; public class test { public static void main(string[] args) { processbuilder pb = new processbuilder("perl", "test.pl"); try { process p=pb.start(); bufferedreader stdout = new bufferedreader( new input...

java - Linking renderer that displays a jComboBox to a cell in the jTable -

the problem is, when user clicks on cell style of line, , chooses 1 of 4 options , after clicks on other cell line style, after that, other cell displays line style, choosen in previous selected cell. how to, make line style unique every cell (different line styles in different cells) in "line style" column? cells in "line colour" column works fine , implemented similarly. here sscce: main class: import javax.swing.jframe; public class panelmain { public static void main(string[] args) { string[] tab = { "abc", "cde", "efg" }; panel panel = new panel(tab); jframe frame = new jframe(); frame.add(panel); frame.setvisible(true); } } panel: import java.awt.basicstroke; import java.awt.color; import java.awt.dimension; import javax.swing.jpanel; import javax.swing.jscrollpane; import javax.swing.jtable; import javax.swing.table.abstracttablemodel; @suppresswarnings("serial...

php - joomla user registered through CB is not assigned to k2 user group -

in 1 of joomla 2.5 site using community builder registration form.when registration completed user clicked confirmation link in email, user not assigned k2 user group. i set k2 user group in k2 parameters->advanced setting->select default k2 user group new registrations dropdown new registered user assigned group. but it's not working.i have required plugins enabled while searching through google.com solution any solutions , suggestions experts welcome. i came across when searching similar problem: gavick's facebook login didn't assign k2 usergroup. suspect solution same. edit: /plugins/users/k2/k2.php replace in function "onloginuser": // user id $db = jfactory::getdbo(); $db->setquery("select id #__users username = ".$db->quote($user['username'])); $id = $db->loadresult(); with: // user id $db = jfactory::getdbo(); $db->setquery("...