Posts

Playing multiple videos on the same player using html and php -

i have code playing multiple videos in single folder don't know error is page1.php <html> <body> <head> <title>video tests</title> </head> <h5>video list: </h5> <ul> <?php $filelist = scandir("videolibrary"); foreach($filelist $key=>$video){ if($key >1){ echo '<li><a href="page2.php?video='.$key.'" >'.$video.'</a </li>'; } } ?> </ul> </br> </body> </html> page2.php <html> <body> <?php $current_video = $_get['video']; $filelist = scandir("videolibrary"); foreach($filelist $key=>$video){ if($key >1){ if($key==$current_video){ $current_video_src = $video; $next_video = $key+1; $previous_video = $key-1; } } } ?> <center> <video id="myvideo" width="720" height="480" ...

solr - Apache Tomcat Environment Variables -

when deploy .war file tomcat ide define that: -dsolr.solr.home=/home/vicita/desktop/lucene-solr/solr/solr_h -dsolr.data.dir=/home/vicita/desktop/lucene-solr/solr/solr_h/data however when deploy remote machine have define parameters. book follow says have define $tomcat_home/conf/catalina/localhost within xml file: <context path="/solr" docbase="/usr/share/tomcat/webapps/solr.war" debug="0" crosscontext="true"> <environment name="solr/home" type="java.lang.string" value="/usr/share/solr_h/" override="true"/> </context> by way: /usr/share/solr_h is directory should mention. first thing want know didn't define variable solr.solr.home @ here? second thing .war not find folder , throws error. tried create setenv.sh , put: -dsolr.solr.home=/usr/share/solr_h -dsolr.data.dir=/usr/share/solr_h/data however when tomcat starts says: /usr/share/tomcat/bin/setenv.sh: l...

split not working on app engine java and yet works on my Android client -

the split method returns spaces , need return elements of string can pick values want. works fine on android not on app engine. please need html array of strings no spaces. no not duplicate of other question. using right regex "\s+" import com.google.api.server.spi.config.api; import com.google.api.server.spi.config.apimethod; import com.google.api.server.spi.config.apinamespace; import org.jsoup.jsoup; import org.jsoup.nodes.document; import org.jsoup.select.elements; import java.util.arraylist; import java.util.list; import java.util.logging.logger; import javax.inject.named; /** * endpoint class exposing */ @api(name = "myapi", version = "v1", namespace = @apinamespace(ownerdomain = "backend.abokiforex.greatcallie.com", ownername = "backend.abokiforex.greatcallie.com", packagepath = "")) public class rateendpoint { string[] html; private static final logger log = logger.getlogger(rateendpoint....

arduino - Store array of arrays in array -

it possible store bitmap in array in wiring programing language (arduino)? boolean trianglemap[display_height][display_width] = { {0,0,0,1,1,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {1,1,1,1,1,1,1,1} }; boolean squaremap[display_height][display_width] = { {1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1} }; boolean symbols[] = {trianglemap, squaremap}; ??? symbols[] = {trianglemap, squaremap}; error: invalid conversion ‘boolean ( )[8] {aka unsigned char ( )[8]}’ ‘boolean {aka unsigned char}’ [-fpermissive] i not know whether possible store trianglemap , squaremap bitmap in symbols array? thanks lot. you not using correct type. boolean symbols[] means "i want array of booleans", while want "an array of booleans matrices. this boolean symbols[][display_he...

php - Prestashop 1.6 - How I can get the admin directory name dynamically? -

i want put module in prestashop market place, , make standard can use it. plugin needs know admin directory name dynamically service. i have searched on internet lot of times, didn't find solution issue. you can use _ps_admin_dir_ witch set in [your_admin_dir]/index.php : if (!defined('_ps_admin_dir_')) { define('_ps_admin_dir_', getcwd()); } this constant set when you're on admin context. frontoffice doesn't have knowledge of directory , should not obvious security reason. there's getadminlink method in class link : /** * use controller name create link * * @param string $controller * @param bool $with_token include or not token in url * @return string url */ public function getadminlink($controller, $with_token = true) { $id_lang = context::getcontext()->language->id; $params = $with_token ? array('token' => tools::getadmintokenlite($controller)) : array(); return dispatcher::getinstanc...

android - Sync the two mpandroidcharts graphs dragging and zomming -

Image
i using mpandroidchart , have requirement have sync dragging , zooming of 2 graphs, if zoom out, zoom in or drag 1 of 1 graph other graph should zoomed out, zoomed in or dragged same extent on x-axis. example: if drag upper graph 12th point on x-axis lower graph should dragged 12th point on x-axis automatically. guys need need idea how this, enough familiar mpchartandroid library. i wrote function this, calling function of drag , scale listener. working perfectly. private void synccharts(chart mainchart, linechart[] othercharts) { matrix mainmatrix; float[] mainvals = new float[9]; matrix othermatrix; float[] othervals = new float[9]; mainmatrix = mainchart.getviewporthandler().getmatrixtouch(); mainmatrix.getvalues(mainvals); (linechart tempchart : othercharts) { othermatrix = tempchart.getviewporthandler().getmatrixtouch(); othermatrix.getvalues(othervals); othervals[m...

.htaccess rewrite rule confusion/conflicts -

i have below rewrite rules setup on site. i' trying set have below different urls. current .htaccess options +followsymlinks rewriteengine on rewritebase / rewriterule ^([^-]*)/$ ?action=$1 [l] rewriterule ^([^-]*)-([^-]*)/$ ?action=$1&id=$2 [l] required urls www.site.com www.site.com/page/ www.site.com/product-1234/ www.site.com/privacy-policy/ the problem second rewrite rule affecting privacy-polcy url shouldn't second rewrite rule specific product pages have product id in it. i'm trying ignore directories exist structure of site under root have below directories don't want rewrite rules affect user shouldn't know these directories. /system/ /tasks/ # catch more specific urls: rewriterule ^product-([0-9]*)/$ ?action=product&id=$1 [l] # ignore requests want files or directories exist: rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d # continue less specific: rewriterule ^([^/]*)/$ ?action=$1 [l]