Posts

Showing posts from January, 2011

Fatal error: Class 'PMA_Util' not found in C:\xampp\phpMyAdmin\libraries\insert_edit.lib.php on line 2319 -

i'm using php version: 5.5.33 via local server name xampp , problem when im trying insert new record table , use 1 of function "current_date" or "year" it's return "fatal error: class 'pma_util' not found in c:\xampp\phpmyadmin\libraries\insert_edit.lib.php on line 2319" enter image description here enter image description here [solve] answer have fix file 'phpmyadmin/libraries/insert_edit.lib.php' , relevant code link. enter link description here copy , paste code 'insert_edit.lib.php' file instead of previous code.

asp.net - ELMAH get user info from request in anonymous website -

i'm using elmah log errors asp.net website anonymous access. because of this, "user" in log blank , want populate information request. user info in request header of page , want pass information elmah can record current user. tried using formsauthentication.setauthcookie(userinfo.username, true); still showing blank in log. thanks in advance.

How to create x-axis breaks in a CDF in R? -

Image
using following data, total number of seconds: $head date-subtraction_total_seconds.csv 15806856.0 15806970.0 190922.0 860863.0 33441.0 15806835.0 84041.0 17197453.0 17195029.0 -48.0 i pull data r: df<-read.delim("date-subtraction.csv",sep=",",header=f) df<-data.frame(seconds=df$v1,days=df$v1/86400) i create cdf: ggplot(df, aes(x=df$days, y=ecdf(df$days)(df$days)))+ geom_step(size=2.2,color="red")+geom_step(color="cyan",size=1.5)+ scale_y_continuous(labels = percent_format(), limits=c(0,1))+ labs(x="time (days)", y="% total")+ ggtitle("cumulative distritubtion function")+ xlim(-1,8) when try make x-axis labels break @ specific points, receive odd message adding scale, graph changes , lables seem stack on top of each other: ggplot(df, aes(x=df$days, y=ecdf(df$days)(df$days)))+ geom_step(size=2.2,color="red")+geom_step(color=...

R shiny: multiple select choices. selectize and dropdownbutton setting, when multiple choices made, aggregate data collapsed -

hi i'm using both selectize , dropdownbuttons build multiple choices select widget user. works fine when single choice made, when make multiple choices, aggregate data showed incorrect. here code: ui: library(shiny) shinyui(fluidpage( dropdownbutton( label = "country", status = "default", width = 400, checkboxgroupinput(inputid = "var", label = "country", choices = c("all", "null", "a2", "ae", "af"), selected = c("all") ) ), hr(), dropdownbutton( label = "platform ", status = "default", width = 400, checkboxgroupinput(inputid = "plat", label = "platform ", choices = c("all", "android","ios"), selected = c("android")) ...

r - ggplot: how to add direct labels to each curve -

i trying add direct label each curve in density plot. label plots in tutorial , can't worked. here data frame: values <- runif(1200, 35, 60) ind <- as.factor(rep(c(1:6), each=200)) inout <- as.factor(rep(c(1:2), each =600)) df <- data.frame(values,ind,inout) here density plot: ggplot(df) + geom_density(aes(x=values, group=interaction(ind,inout), colour=factor(inout)), alpha=1) + geom_density(aes(x=values, group=inout, fill=factor(inout)), alpha=.4) + theme(text = element_text(size=25)) + theme(legend.justification=c(1,1), legend.position=c(1,1)) + guides(colour=false) + scale_fill_discrete(name="ave.",breaks=c("1", "2"),labels=c("s1", "s2")) how can add direct labels (i.e., 1 6) each curve 2 groups (i.e., s1 , s2)? 2 averaged curves don't need labeled. thanks lot.

google app engine - Index Disadvantages -

according new update in pricing policy, there no more difference, cost wise, in making properties indexed or not. disadvantages of putting properties indexed? you can search indexed properties - did not change. if make every property indexed whether need them indexed or not, slow down performance of app when new entities added datastore. indexes take storage space. making properties unnecessarily indexed result in higher costs, though writing indexes free.

PHP Call to undefined nameless function () on elseif statement -

the following if/elseif/else statement returning call undefined function () ... on line 111 error don't understand: <?php if ( $this->next_payment_date < date('y-m-d') ) : ?> <?php elseif ( ($this->loan_status == 'v') && ($this->extra_payment == '0.00') ) : ?> <?php elseif ( ($this->loan_status == 'v') && ($this->extra_payment > '0.00') ) : ?> <?php elseif ( $this->loan_status == 'c' ) : ?> <?php else : ?> <?php endif; ?> line 111 matches first elseif statement. $this-> accesses object keys simple string data. no fields null

opencv - How to create video from frames using python? -

i have 10000 frames want convert video. these frames 640x384 , video needs 25 fps. i got these frames video of duration 20 mins (same res , fps) , consisting of 30000 frames. use videowriter you can define video codec type, frame rate , on.

sql server - SQL First Time In Last Time Out (Transact-SQL..preferrably) -

i have following table contains time in , time out of people: create table test ( timecardid int , trandate date , employeeid int , trantime time , trantype varchar(1) , projcode varchar(3) ) the task earliest trantime trantype (perhaps using min) , latest trantime trantype z (using max), of in trandate (ie. trantype july 17 8:00 , trantype z july 17 7:00pm). the problem is, output should in same format table it's coming from, meaning have leave data , filter out rest (that aren't earliest , latest in/out date, per employee) my current solution use 2 different select commands earliest, latest. combine them both. i wondering though, there simpler, single string solution? thank much. edit (i apologize, here sample. server sql server 2008): timecardid | trandate | employeeid | trantime | trantype | projcode 1 2013-04-01 1 8:00:00 sample1 2 2013-04-01 1 9:00:00 ...

identify the correct CSS selector of a url for an R script -

i trying obtain data website , helper following script: require(httr) require(rvest) res <- httr::post(url = "http://apps.kew.org/wcsp/advsearch.do", body = list(page = "advancedsearch", attachmentexist = "", family = "", placeofpub = "", genus = "arctodupontia", yearpublished = "", species ="scleroclada", author = "", infrarank = "", infraepithet = "", selectedlevel = "cont"), encode = "form") pg <- content(res, as="parsed") lnks <- html_attr(html_node...

java - Cancellation of CompletableFuture controlled by ExecutorService -

i have executorservice forwards computed data completablefuture : class dataretriever { private final executorservice service = ...; public completablefuture<data> retrieve() { final completablefuture<data> future = new completablefuture<>(); service.execute(() -> { final data data = ... fetch data ... future.complete(data); }); return future; } } i want client/user able cancel task: final dataretriever retriever = new dataretriever(); final completablefuture<data> future = retriever().retrieve(); future.cancel(true); this not work, cancels outer completablefuture , not inner future scheduled in executor service. is somehow possible propagate cancel() on outer future inner future? completablefuture#cancel serves purpose of marking completablefuture cancelled. nothing notify executing task stop, because has no relationship such task. the javadoc hints @ this ...

java - Editing JLabel from JTextField in another class -

i've looked around nothing seems me out. i'm writing multithreaded chat program gui. user inputs name in textfield in login class , hits login button directs him clientgui class. in client gui class theres jlabel @ top says "welcome chatsystem (username)" . user input in textfield in login class should appear in jlabel after "welcome chatsystem" can't figure out why doesn't work. here's code: login class: loginb = new jbutton("login"); main.add(loginb); loginb.addactionlistener(new actionlistener(){ @override public void actionperformed(actionevent e) { clientgui clientgui = new clientgui(); clientgui.setvisible(true); } } clientgui class: public clientgui(){ login login = new login(); string username = login.usernametf.gettext(); welcome = new jlabel("welcome chatsystem "+username, swingconstants.center); } i understand username should jlabel , not string have tri...

javascript - Columns child equal per row -

i have product gallery needs equal in height parent , child div. i need calculate per row. i'm getting tallest child , applying on div. want highest div , apply row. $(document).ready(function() { var item_title_height = 0; var item_details_height = 0; $('.item-title').each(function(i, obj) { if($(this).height() > item_title_height) { item_title_height = $(this).height(); } }); $('.item-details').each(function(i, obj) { if($(this).height() > item_details_height) { item_details_height = $(this).height(); } }); $(".item-title").height(item_title_height); $(".item-details").height(item_details_height); }); this fiddle fiddle hope can me not sure how in jquery. find largest div vanilla. use window.getcomputedstyle styling info elements may not have explicit css or html style declarations. var heights = array.prototype.slice.call(document.getelementsbyclassname('item-title')).map(f...

r - RCPP generated DLL files triggering Bit9 errors -

i attempting use rcpp package , rstudio build c++ functions. main roadblock dealing agency's bit9 system. each time attempt compile, resulting dll file (i running windows) triggers bit9 error. in order prevent dll file triggering bit9 error, need provide department names of dll files want use (i cannot install packages). have noticed rcpp generates dlls incremental file names (e.g., sourcecpp_1.dll , sourcecpp_3.dll ). has encountered issue before? if so, how did deal it? i'm bit9 employee tell truth. the bit9 admin, using event stream in bit9 console, can see process writing dlls disk , mark process installer. means process promoted such "interesting" files (exe, dll, driver file, system file, script) writes disk approved. can specific enough limited particular directory , it's subdirectories. if bit9 administrator doesn't know how write such rule, or concerned security implications of such rule have them go bit9 ( we've changed our nam...

ruby on rails - Create a Post_category for a Post a choose my post with collection post_category -

i created post_category table add category specifics posts. for example created post_categories countries, japan or china. , want create post come culture or mode countries japan or china. focused on post_categories countries , below code did. i created postcategory , here migration , model create_table "post_categories", force: :cascade |t| t.string "name" t.string "description" t.datetime "created_at", null: false t.datetime "updated_at", null: false end class postcategory < activerecord::base has_many :posts, dependent: :destroy names = ["japon", "chine", "corée du sud", "moyen orient", "indien"] validates :name, inclusion: { in: postcategory::names, allow_nil: false } end and created post postcategory foreign key, here migration , model create_table "posts", force: :cascade |t| t.string "cover" t.stri...

python - Optimizer selection for Multi-Disciplinary Problems -

i trying solve problems in mdo test suite using openmdao means of validation. issue facing selecting optimizer/algorithms given problem. following code propane combustion problem suite formulated through idf method. tried solving using slsqp & nsga2 available in pyoptsparsedriver . both optimizer giving sub-optimum solution. __future__ import print_function, division import numpy np import time openmdao.api import * class propanedis1(component): def __init__(self): super(propanedis1, self).__init__() self.add_param('z1', 1.0) self.add_param('y3', np.ones(3)) self.add_output('y1', val=np.ones(2)) def solve_nonlinear(self, params, unknowns, resids): z1 = params['z1'] y31 = params['y3'][0] y12 = 3.0 - z1 y11 = z1*y31/y12 unknowns['y1'] = np.array([y11, y12]) class propanedis...

deployment - Place concatenated js directly into html script tag using grunt? -

right grunt build places of concatenated js , css scripts.xxx.js, vendor.xxx.js, main.xxx.cs , vendor.xxx.cs. there way have grunt not put code these files, rather put them directly html? so end with: <html> .... <style> // of stuff in main.xxx.cs , vendor.xxx.cs </style> .... <script type="text/javascript"> // of stuff in scripts.xxx.js , vendor.xxx.js </script> .... </html> i'm writing custom module existing tool , make lot easier deploy single html file embedded right in it. can done grunt or else? thoughts on approach?

html - Setting Minimum Value to a Substraction (AngularJS) -

i know how possible set minimum value of "0" substration ( 100 - message.length ). don't want negative values returned when minimum number of caracteres (100) verified (for instance: "number of caracteres left: -55"). thank you. <tr> <td colspan="2" align="center"> <textarea rows="10" cols="50" name="message" ng-model="message"></textarea> </td> </tr> <tr> <td align="center">number of caracteres left: {{100 - message.length}} </td> </tr> <tr> <td align="center" colspan="2"> <button type="submit" class="btn btn-success" ng-disabled="(!message || message.length < 100)">send</button> </td> </tr> you try {{100 - message.length>0?100 - message.length:0}}

cmd - Using start command to open new window with /V:ON enabled and also run a batch file -

i trying start new window enabled /v:on , run batch file. start "window title" /d c:\workspace cmd '/v:on & something.bat' i can't work though. dont use single quotes: start "window title" /d c:\workspace "cmd /v:on /c something.bat"

cfengine - CFE syntax errors -

trying write cfengine3 promise take entire directory , move down 1 level. i've used policy hub distribute promise, i've not yet folded active promise.cf here's promise: body common control { bundlesequence => { dirstructure }; } #find out existance of directories if filesystem old structure or new #set classes each instance. if old, copy down 1 level. #if new file system already, pat on bundle agent dirstructure { classes: "oldfilestructure"expression => isdir("/old/dir/structure/"); "newfilestructure" expression => isdir("/new/dir/structure/"); reports: oldfilestructure:: "system has old file structure.."; newfilestructure:: "system has new file structure.."; methods: oldfilestructure:: "migratedirectories" usebundle => movedirectories } bundle agent movedirectories { files: "/new/dir/" c...

linux - shared library not found during compilation -

so got several shared libraries trying permanently install on ubuntu system having difficulty it. i want install libraries , headers in separate folder under /usr/local/lib , /usr/local/include (for example folder named agony ) clean , removing them require delete folders. looks this: /usr/local/lib/agony/libbtigpio.so /usr/local/lib/agony/libbtidsp.so ... /usr/local/include/agony/gpio.h /usr/local/include/agony/dsp.h ... and added file here /etc/ld.so.conf.d/agony.conf include line describing path library folder: $ cat /etc/ld.so.conf.d/agony.conf /usr/local/lib/agony and perform sudo ldconfig update library database. double check if library found ldconfig -p | grep bti* , see following result: $ ldconfig -p | grep bti ... libbtigpio.so (libc6,x86-64) => /usr/local/lib/agony/libbtigpio.so libbtidsp.so (libc6,x86-64) => /usr/local/lib/agony/libbtidsp.so ... at point should able use libraries without specifying library path. when attempt co...

java - How can I align all my swing components to the top left of JPanel/JFrame -

Image
hey guys i'm new swing in java ive created simple program has 1 jlabel says continue , 2 jbuttons 1 says yes , 1 says no. i'm using gridbaglayout organize jpanel / jframe. program compiles , runs fine gridbaglayout centers components in center of jframe. since i'm new swing can show me how may possible align components top left of jframe? thanks! :) it might not real answer, anyway: stop using gridbaglayout. has many pitfalls , brittle use, please don't use it. use better alternative such miglayout , , learn that. don't bother learning of java's default layout managers, except if really, need to. an example using miglayout: jpanel panel = new jpanel(new miglayout("","","")); panel.add(myjbutton1, "wrap"); panel.add(myjbutton2, "wrap"); panel.add(myjbutton3, "wrap"); panel.add(myjbutton4, "wrap"); panel.add(myjbutton5, "wrap"); panel.add(myjbutton6, "wrap...

java - Unweighted graphs using Adjacency lists -

i'm new programming , trying learn data structures on own. trying implement unweighted graph class using adjacency lists, having trouble implementing getadjacentvertices method , don't know how addedge method working specially how implement insertatthebeginning method.please me, book using doesn't explains topics.* enter code here public class graph { private arraylist<integer> vertices; private listnode[] edges; private int vertexcount = 0; public graph(int vertexcount){ this.vertexcount = vertexcount; vertices = new arraylist<integer>(); edges = new listnode[vertexcount]; for(int = 0; < vertexcount; i++){ vertices.add(i); edges[i] = new listnode (); } } public void addedge(int source, int destination){ int = vertices.indexof(source); int j = vertices.indexof(destination); if(i != -1 || j != -1){ edges[i].insertatbeginning(destination...

spring batch - Disable Retry When commitInterval = 1 -

the behavior batch processing of our business entities rollback failed transaction , not try again. have read through forum , appears not possible. have set commitinterval=1 , tried never retry policy special case no avail. have read rational writer not know if list of items received initial or subsequent processing in case of failure. have summarized correctly , spring batch not support behavior looking for? sounds candidate skip logic https://docs.spring.io/spring-batch/reference/html/configurestep.html check out these 2 sections in particular: 5.1.5 configuring skip logic 5.1.7 controlling rollback

c++11 - Read csv column names in C++ -

i new object oriented programming. firstly, trying read following data structure csv file , parse through first line (header) , push strings vector. secondly, read customer information on first row (usa) , extract name , integer value(14400000). far, existing code read columns. however, there spaces within of strings , trim them. +------------------------------------------------------+ |,abb llc,phil manu ,products north america inc.,mapn, | +------------------------------------------------------+ | usa-14400000,,,, | | quantity,14155572,14435598,14298563,14311206 | | index,us-gc,eu-ht,as-ir,us-pt | | period(weeks),3,3,3,3 | | cost,6278,5341,7394,7069 | +------------------------------------------------------+ here code. #include <iostream> #include <fstream> #include <sstream> using namespace std; void readtest() { string filenam...

makefile - Getting a list of all dependencies in make -

i'm trying write etags target in make based on dependency information generated gcc. there way of getting @ dependencies in 1 go? or, failing that, how write rule executed when "tags" target made , passes source , header files etags? want index files compiled (including headers). i'm aware can sed around in .d files myself i'm trying find more elegant , less brittle solution. i have following (excerpt) depfiles = $(objfiles:.o=.d) %.o : %.c @echo "compiling $<" $(no_echo) $(cc) $(cflags) -mmd -mf $(@:.o=.d) -o $@ -c $< %.o : %.s @echo "compiling $<" $(no_echo) $(cc) $(asflags) -mmd -mf $(@:.o=.d) -o $@ -c $< $(target) : $(objfiles) @echo "linking $@" $(no_echo) $(ld) $(ldflags) -o $@ $(objfiles) $(libs:%=-l%) .phony: clean # order-only dependency make dep/obj-directories if not # present $(objfiles) : | $(allpaths) $(allpaths): $(no_echo) mkdir -p $(allpaths) # depend on makefiles...

WPF DataGrid 'Select All Button' followed by Control-C -

right after loading wpf datagrid, hit 'select button' (upper left hand corner) followed control-c. but sequence not copy datagrid items clipboard. how can make work? it seems data grid not focus when button clicked, have fix yourself: datagrid.commandbindings.add(new commandbinding(applicationcommands.selectall, ondatagridselectall)); and then: private void ondatagridselectall(object sender, executedroutedeventargs e) { var grid = (datagrid)sender; grid.focus(); grid.selectall(); } you can add command binding in xaml if want so.

asp.net mvc - Can .NET Web Api serve both Web and Mobile apps? -

i'm starting on new application , looking build reusable middle tier can serve both web , mobile app. build web app (running on desktop browsers) first native mobile apps (running on ios , android). my question should build our middle tier using web api throughout entire application? great if can have our web views use custom view models , our mobile apps use json values. there give here best of both? is valid scenario/common scenario modern applications? advice appreciated. mattdavey's answer spot on. wanted add few more things think when trying create cross channel reusable services. reusable services across channels (web, mobile, desktop etc) subjective , hotly debated. on surface looks pretty straight forward. same business capability exposed via different view interfaces/devices. business functionality shouldn't change @ right? well, same capability offered devices regardless of form factor? not. e.g. if have 10 column grid bunch of user controls, ...

php - Selenium browsers not recognized if using phpunit.xml -

i've created test case extending \phpunit_extensions_selenium2testcase , specifiying browsers using $browsers, in phpunit 3.7.21: class seleniumtest extends \phpunit_extensions_selenium2testcase { public static $browsers = array( array( 'name' => 'explorer on windows', 'browsername' => 'explorer', 'host' => 'localhost', ) ); } but if remove $browsers , try configure browsers in phpunit.xml putting following in tags, per docs , settings not read: <phpunit bootstrap="../../testmodule/test/modulebootstrap.php" backupglobals="false"> <testsuites> <testsuite name="manager"> <directory>./test</directory> </testsuite> </testsuites> <selenium> <browser name="firefox on windows" browser="firefox" ...

javascript - jQuery check if element has a class -

i trying check see if html element has class , if so, run function jquery. code works if element doesn't have multiple classes. believe need use .hasclass() method, couldn't figure out. var pageclass = $("body").attr('class'); switch (pageclass) { case ("page1"): $('h1').html('heading1'); break; case ("page2"): $('h1').html('heading2'); break; default: $('h1').html('default'); } fiddle: https://jsfiddle.net/9o70dbzz/2/ this can solved selectors: $('h1').html('default'); $('body.page1 h1').html('heading1'); $('body.page2 h1').html('heading2');

Create object with part of interface. Typescript -

i have problem, please help. we have 2 interfaces: interface iuserentity { id: number; firstname: string; lastname: string; } interface iuserentitymethods { getfullname(): string; } i create object have type iuserentitymethods , within method getfullname through this in webstorm (for example) dropped autocomplete ability use properties of interface iuserentity . what want in end: var userentitymethods: iuserentitymethods = { getfullname: function() { return this.firstname + " " + this.lastname; // have no errors @ line. } } is possible? or there other option? i'm not sure why divided methods properties 2 interfaces, need have 1 extend other, so: interface iuserentity { id: number; firstname: string; lastname: string; } interface iuserentitymethods extends iuserentity { getfullname(): string; } then instances of iuserentitymethods should have methods , properties. you'll need have them i...

c# - Create App to download Changeset in TFS -

im not sure if possible looking able create app (vb or c#) replicate behaviour of 'view history' of selected tfs project. want able browse changeset, select 1 , download solution specified location. i have not had chance take proper yet, assume straight forward changeset history sql database, not sure next able download associated solution/project. similar filestream? if has covered in past, love hear how got project files. try following code (i assume using tfvc version control): using system; using microsoft.teamfoundation.client; using microsoft.teamfoundation.versioncontrol.client; namespace api { class program { static void main(string[] args) { string vsuri = "http://xxx.xxx.xxx.xxx"; tfsteamprojectcollection tpc = new tfsteamprojectcollection(new uri(vsuri)); tpc.ensureauthenticated(); versioncontrolserver vcs = tpc.getservice<versioncontrolserver>(); ...

Declaring 3 sets in GLPK->syntax error in literal set -

i have small code: param n, integer, > 0; # number of clients param m, integer, > 0; # number of facilities param g, integer, > 0; set := 1..n; set j := 1..m; set g := 1..g; param d{i in i, j in j};/* distance client factory j*/ param w{i in i, j in j};/* distance client factory j*/ param l{j in j}; # distance factory j factory 1 param f{j in j}; # cost of open factory in j param s{i in i, g in g}; the problem on s, says drdrd.mod:13: syntax error in literal set , if change g in g j in j, ok. not possible have 3 differents sets? and question not solve, if put instead of in i, 2 in (because want take account first 2 numbers ) says same error message. thanks time. g defined parameter in param g, integer, > 0; so can't use index name in param s{i in i, g in g}; to fix rename index (or parameter): param s{i in i, gg in g};

c# - How create groups with evenly sizes -

i have table car information dates. car_id date <aditional info> 1 20160101 2 20160102 1 20160103 2 20160104 1 20160105 1 20160106 1 20160107 1 20160108 1 20160109 1 20160110 if car has <= 5 records have 1 group. case car_id = 2 if car has <= 10 records have 2 evenly group. case car_id = 1 order date 20160101 - 20160106 group 1 20160107 - 20160110 group 2 if car has '> 10' have 3 evenly distributed groups. desire output. car_id date group_id 1 20160101 1 1 20160103 1 1 20160105 1 1 20160106 1 ------------------------ 1 20160107 2 1 20160108 2 1 20160109 2 1 20160110 2 ------------------------ 2 20160102 1 2 20160104 1 i try ntile() cant make group number dinamic. sql fiddle demo select car_id, "date", ntile(3) on (partition c...

java - Hibernate, OneToMany relationship and unwanted update -

Image
i'm developing spring-hibernate java application following entities (the unnecessary lines of code have been removed make reading code easier): @entity public class useraccount extends identityentity { ... @onetomany(cascade = cascadetype.all, fetch = fetchtype.lazy) @joincolumn(name = "user_account_id", nullable = false) protected list<userdevice> devices = new arraylist<userdevice>(); ... } and @entity public class userdevice extends identityentity { ... @manytoone(fetch = fetchtype.lazy) @joincolumn(name = "user_account_id", nullable = false, insertable=false, updatable=false) protected useraccount useraccount; ... } the generated tables are: i wrote junit test (the unnecessary lines of code have been removed make reading code easier) : @test @transactional public void testmainscenario() { useraccount user=useraccountcreate("dummy"); useraccountsaveorupdate(use...

Jasper in Grails 3.x -

using grails 3.0.12 , need generate pdf report, preferably using jasperreports, haven't found plugin works. i've used compile "org.grails.plugins:jasper:1.11.0" grails documentation didn't work. what plugin should use? or there alternative generate pdf's reports in grails 3.x? i using grails 3.2.4, , after googling , searching how install jasper reports on grails 3.x version without compilation error, int oficial grails plugin page version 3.x there grails-jasper plugin, problem have create plugin archive using source code , use plugin created grails project said in documentation. other solution , 1 used, use same plugin dependencies in code of grails-jasper plugin, code in file build.gradle of plugin source code, , have use necessary dependencies, following used , working perfectly. dependencies { ... compile('com.lowagie:itext:2.1.7') compile('net.sf.jasperreports:jasperreports:5.6.1') { exclude m...

javascript - EventListener UpdateReady not showing confirm on load when an update is actually there -

eventlistener updateready not showing confirm on load when update there. skips confirm alert , updates without notifications. doesn't reload. window.addeventlistener('load', function(e) { window.applicationcache.addeventlistener('updateready', function(e) { if (window.applicationcache.status == window.applicationcache.updateready) { confirm('an update available, install it?', function() { window.location.reload(); }); } }, false); }, false); what have done wrong? try doing this: window.addeventlistener('load', function(e) { window.applicationcache.addeventlistener('updateready', function(e) { if (window.applicationcache.status == window.applicationcache.updateready) { if(confirm('an update available, install it?')) { window.location.reload(); } }else { // no update happened } ...

python - Can't calculate compound interest correctly -

here code: def calculate(*args): try: value = float(income.get()) expenses.set("$"+str(value * .60)) longterm.set("$"+str(value * .10)) vacation.set("$"+str(value * .04)) cardown.set("$"+str(value * .04)) homedown.set("$"+str(value * .02)) guiltfree.set("$"+str(value * .20)) projection.set("$"+str(value * .10 * 1 + 0.05/4 ** 4*10)) except valueerror: pass for reason, output when pass in 100 $100.001953125 what doing wrong in projection.set section of code math? i'm not 100% sure trying do, want implement formula a = p(1+r/m)^mt you need projection.set("$"+str(value * .10 *( 1 + 0.05/4) ** (4*10))) rather than projection.set("$"+str(value * .10 * 1 + 0.05/4 ** 4*10)) (remember pemdas )

c# - how to consume php webservice which return multidimensional array in .net -

i have created 1 web service in php returns me data in multidimensional array, problem how consume in .net. know consume web service return data in 1 dimensional arrays don't know multidimensional array, have included code below please me server side php file <?php require_once('lib/nusoap.php'); $server = new soap_server(); $server->configurewsdl('servcarrent', 'urn:servcarrent'); $server->wsdl->addcomplextype('getallkeydata','complextype','array','all','', array( 'keyid'=> array('name'=>'keyid', 'type' =>'xsd:int'), 'keyname'=> array('name'=>'keyname', 'type' =>'xsd:string'), 'isavailable'=> array('name'=>'isavailable', 'type' =>'xsd:int'), 'noofkeys'=> array('name'=>'noofkeys', 'type' =>'...

javascript - IE permission denied -

i getting permission denied error on ie (firefox works fine) i making ajax call (local domain) , result of call assigning div. on debugging came know there no issue ajax call , variable 'result' has result data. error thrown when data being assigned div. error line: 2 jquery-1.8.1.min.js error: permission denied javascript code: $.get('administration.htm', function (result) { $('#admindiv').find('#content').html(result); }); any idea why error coming. the permission denied error coming trying manipulate dom before document ready. as events , formatting no longer working, using javascript , jquery select things can cause issues. when use document.getelementbyid update dom , rendered page not update associated jquery objects. solve either need re-generate jquery object (using $('selector') ) , reattach handlers or try $(document.getelementbyid('objectid')).html('result'); use javascript find dom eleme...

android - Getting 404 error in phonegap/cordova with whitelist installed -

i have whitelist plugin installed however, im getting build discrepancy between compiled in android studio , compiled using cli. when compile application in android studio runs fine , can access webpages needed app. however when use command: cordova build android --release i getting 404 errors if whitelist plugin isnt installed. we using remote machine dependent on cli tools build. im hoping on here has run issue , has advice on it. thank you.

java - Android date with added milliseconds not at the correct time -

what trying store date, represented long of milliseconds, next midnight current time. so, posting @ 10:11 pm, want date representing 12:00 tomorrow morning. task, wrote line of code (knowing there 86400000 milliseconds in 1 day): long time = system.currenttimemillis() + (86400000 - (system.currenttimemillis() % 86400000)); the line designed calculate milliseconds last midnight, substract 1 whole day find time until next midnight, add current time new value value of next midnight. whatever reason though, date object using debug spits out "wed apr 20 20:00:00 edt 2016" when calling #tostring() method. current time said "tue apr 19 22:08:34 edt 2016" @ same time other date being calculated. this means long of milliseconds representing 8:00 pm next day, while want represent 12:00 am. can me spot flaw in logic? i missing obvious, bear me. note: tried calculating time this: long time = system.currenttimemillis() - (system.currenttimemillis() % 86400000) + ...

ruby - Jekyll is not detecting when a new folder is added -

i'm using jekyll create new site. i'm using command jekyll serve --watch automatically rebuild site each time change made. this working great long make change existing file. however, if add new folder, jekyll not notice it. have stop jekyll watching, restart notice new folder , include in _site directory. is expected behaviour or there problem setup? the same thing happens jekyll. believe jekyll serve --watch command looks in current directories changes, not newly created ones.

android - Flip ViewPager like a ViewFlipper, possible? -

i want add flipping animation viewpager, able swipe views need flip view. any pointer? use jazzyviewpager instead of regular viewpager. lot of cool built-in animations including flip animation. you can go through source , implement flip animation using pagetransformer .

.htaccess not get variablas that not set on external -

i have set category type getcategorytype1 , getcategorytype2 , getcategorytype3 i write code in .htacces rewriterule ^getcategorytype1/(.*) category.php?getcategory=type1&q=$1 rewriterule ^getcategorytype2/(.*) category.php?getcategory=type2&q=$1 rewriterule ^getcategorytype3/(.*) category.php?getcategory=type3&q=$1 if pass url mysite.com/categorytype1/ work fine getcategory=type1 but if want pass other variables mysite.com/categorytype1/?var=123 var not getting how possible variables ? you need parse request through ... for example: rewriterule ^getcategorytype1/(.*) category.php?getcategory=type1&q=$1 [qsa,l] qsa solution

javascript - Div not performing slideToggle() when clicking on image -

i want set portfolio when click on picture of "3dbanners", div id "firstbanners" opens up. essentially, go this: http://prntscr.com/aufua6 this: http://prntscr.com/aufups slide down , up, hence slidetoggle(). here code: #thumbnails { position:absolute; top:460px; -webkit-filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.70)); filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.70)); } .thumbs { cursor:pointer; } .bannercaptions { font-family: impact, haettenschweiler, "franklin gothic bold", "arial black", sans-serif; text-transform:capitalize; font-size:26px; color:#ffffff; padding:5px 0px 20px 0px; } .stillbanners { width:1500px; } #dayzsnowy { padding-top:15px; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <center> <div id="thumbnails" style="display:none;"> <a id="firstbannersthumb...