Posts

Showing posts from August, 2014

javascript - Empty and broken pdf file downloaded from UI using spring mvc and apache pdf box -

the following code works fine no error able download file name specified in code issue there no content printed , when open file error saying file damaged. while save file somewhere proper file contents. from ui: var jsonstrtosend = json.stringify( jsonobjtosend ); jsonstrtosend = jsonstrtosend.replace(/"/g, "&quot;"); var url = '/'+apppath+'/reportgeneration' ; var $form = $('<form enctype=\'application/json\' action="' + url + '" method="post">').append($('<input type="hidden" name="data" id="data" value="' + jsonstrtosend + '" />')); $form.appendto("body").submit(); in controller: @requestmapping(value = "/reportgeneration", method = requestmethod.post) public @responsebody void reportgeneration(httpservletrequest request, httpservletresponse response){ map returnmapm

ios - Perform action button in uitableview cell to perform delete functionality -

i have 1 table view, , in each cell have x button delete particular cell . have done iboutlet of button custom table view cell. , in cell row @ index path have done add target button. when press button in table view cell. app crash. if put braekpoint. showing in target added code line. here code : func followbutton(sender: anyobject) { if let button = sender as? uibutton { print("button clicked: \(button.tag)") let item = addtocartdata[button.tag] print("name: \(item.cartid!)") let headers = [ "cache-control": "no-cache", "postman-token": "4c933910-0da0-b199-257b-28fb0b5a89ec" ] let jsonobj:dictionary<string, any> = [ "cartid" : "\(item.cartid!)", "carttype" : "3" ] if (!jsonserialization.isvalidjsonob

jquery - Input mask should accept five digits also -

i using jquery input mask plugin like: var s = jquery.noconflict(); s(document).ready(function () { s(".zipmask").mask('99999-9999'); }); it accepts numbers 12345-1111 , works fine. want should support 5 digits if enter "12345" only, should accept it. you must use way: after '?' optional. s(function(){ s(".zipmask").mask("99999?-9999"); });

Translate relative layout and get the changed height in Android Animation -

i want translate relative layout bottom , want continuously changed height of layout. what's right way of doing? animation animation = animationutils.loadanimation(getactivity(), r.anim.slide_up); animation.setduration(333); view.startanimation(animation); right now, using above code don't know how listen changed height. thanks, colin use library : androidviewanimations it has listeners , nice animations, highly reccommended example : refer using android own implemntaion fadeinanimation.setanimationlistener(new animation.animationlistener() { @override public void onanimationstart(animation animation) { } @override public void onanimationend(animation animation) { } @override public void onanimationrepeat(animation animation) { } });

datomic join query execution and metadata -

in java (through jdbc driver) when execute sql join query t1(a, b) , t2(x, y) output contains joined record j(a, b, x, y). along metadata tells me in joined record j fields "a" , "b" came table t1 , fields "x" , "y" came table t2. my question is, when run datomic join query in java, kind of metadata information tells me field in joined record belongs input table? datomic not have tables. triple store. time axis built in. the triple entity-attribute-value. so, can include matched entities in output, along attributes , values. for example, in database triples: [joe :likes :pizza] [joe :favorite-color :gray] [joe :name "joe"] [jane :likes :pizza] [jane :favorite-color :blue] [jane :name "jane"] joe , jane entities (which things having unique identifier , attach attributes), :likes, :name , :favorite-color attributes , :pizza, :grey , :blue values. a query find likes pizza , has favorite-color gray (d/q

amazon web services - Policy to block s3 upload based on ec2 instance tag -

is there way apply restriction in s3 buckets using ec2 instance tag. we have couple of ec2 instances. want allow upload s3 ec2 instances have specific tag. no, not possible write policy restricts upload amazon s3 come amazon ec2 instances have specific tag. the reason request amazon s3 comes user or role identified access key. amazon s3 check permissions against user or role. cannot check details of amazon ec2 instance 'sent'. one option assign amazon ec2 instances specific role includes permissions amazon s3, while other instances have different role.

php - WooCommerce Normal Product -> Subscription Product -

i working on , coming website, , interested in allowing consumers - @ checkout - choose if wish subscribe products (and sent them each month). but cannot figure out how can transform normal product subscription product programmatically. have ideas of snippets of code, can me out?

Gulp Sass with files in folders and subfolders -

i not quite familiar gulp need use project. folder structure this - project -- src --- sass ---- css ----- ..many .sass files here ----- partials ------ ...many .sass files here -- www --- css ----- ....css files should go here (working) ------ partials ------- ...subfolder files should go here (not working) my attempt looks this var config = { sass: { src: [ './src/sass/css/**/**.scss', './src/sass/css/partials/**/**.scss ], paths: [ './src/scss' ] }, } gulp.task('sass', function () { return gulp.src(config.sass.src).pipe(sass({ paths: config.sass.paths.map(function(p){ return path.resolve(__dirname, p); }) })) .pipe(gulp.dest(path.join(config.dest, 'css'))); }); what right way of doing this? need separate sass tasks destination directories different? appreciated!

sql server - SQL Index selection not Returning multiple Results -

i want know how obtain lowest index number / indno if record contains multiple references (lets got contract containing same metadata, difference index number), several records in same table. i used distinct / min selections or combination of 2 on indno selection unsuccessful. this gets lowest indno record, 1 record, instead of them : select min(indno) lowestindexes tablename indno matches criteria in other columns example : indno col 1 col 2 col 3 1 peanut butter jelly 2 peanut butter jelly 3 peanut butter jelly 4 milk oreo infinitejoy 5 milk oreo infinitejoy 6 love sql 7 love sql 8 love sql 9 love sql 10 love sql for set of results must able return smallest index number / indno of each of records : 1 4 6 try using group this select indno `test` col1 "your crite

osx - Brew install docker does not include docker engine? -

trying setup docker brew, engine not seem included in of of official formulas. brew install docker-machine docker-compose so these installs clients? there no keg engine/daemon? please try running brew install docker this install docker engine, require docker-machine (+ virtualbox) run on mac. if want install newer docker mac , can install through homebrew's cask: brew cask install docker

c# - What is the right and efficient way to retrieve data using Entity Framework 6 -

i have 2 tables: t1 { columns: **a**, b, c } t2 { columns: d, e, f, **a** } t1 has 1 many connection t2 using foreign key (column a ). i'm trying retrieve list of f in case a=1,b=2,e=3 . what right , efficient way retrieve data? is join statement? is retrieving t1 (where a=1,b=2) including t2 , looping on result (and eliminate irrelevant t2 )? some other way? var lst = (from t1 in context.t1 join t2 in context.t2 on t1.a equals t2.a t1.a == 1 && t1.b == 2 && t2.e == 3 select t2.f).tolist(); join tables filter in clause select 1 property interested in

python - Tensorflow: Can't extract the feature vector from the penultimate layer -

i want extract feature vector image pre-trained network penultimate layer. when ran: from neural_network import net x = tf.placeholder(tf.float32, shape=[1, 144, 144, 3]) net = net({'data': x}) sess = tf.interactivesession() sess.run(tf.initialize_all_variables()) net.load('inference.npy', sess) feature = sess.graph.get_tensor_by_name('fc7:0') i received error message: keyerror: "the name 'fc7:0' refers tensor not exist. operation, 'fc7', not exist in graph." on other hand, if replace last line with: feature = sess.graph.get_tensor_by_name('global_pool:0') then works. the end of neural_network.py file is: (self.feed('inception_3b_pool', 'inception_3b_3x3', 'inception_3b_double_3x3_2') .concat(3, name='inception_3b_output') .avg_pool(9, 4, 1, 1, padding='valid', name='global_pool') .fc(256, relu

c - Static analyser to detect two post/pre increment operators -

i have huge code base. has statement shown below: int = ( (unsigned int) ((unsigned char) buffer[offset++]) << 8) | (unsigned int) (unsigned char) buffer[++offset]; recently migrated higher version of compiler. compiler migration, evolution of complex statements shown above resulted in inconsistent results. i know bad coding practice , want correct it. looking static analyser can flag these errors. pointers perticular static analyser appreciated. it's not bad coding practice. it's dreadful. introducing absolute truck load of undefined behaviour program. | , unlike || , not sequencing point . increasing offset twice, conceptually @ same time. c standard not define behaviour. you need fix immediately. shelve static analyser now. compiler warning flag suite might able you. if in position, i'd in panic mode , i'd search code base ++ , -- , , check every expression.

javascript - Get share like count with facebook api graph -

i tried number of on share post js. can on original post : https://graph.facebook.com/v2.8/?ids={post_id}1&fields=reactions.type(like).limit(0).summary(true).as(reactions_like),reactions.type(love).limit(0).summary(true).as(reactions_love) do know if it's possible total of ? mean on original post + on shared post ? thanks ;)

python 2.7 - IDLE 2.7.11/12 "NameError: global name 'Toplevel' is not defined" -

i ran apt-get update on debian based os on oracle vb. while running messed around python code in idle 2.7.12 (i opened terminal). after finished updating, tried saving code. in terminal opened idle got error. says this: root@kali:~# idle idle opens, load code, edit code, click [file] [save] this happens exception in tkinter callback traceback (most recent call last): file "/usr/lib/python2.7/lib-tk/tkinter.py", line 1545, in __call__ return self.func(*args) file "/usr/lib/python2.7/idlelib/scriptbinding.py", line 140, in run_module_event filename = self.getfilename() file "/usr/lib/python2.7/idlelib/scriptbinding.py", line 205, in getfilename self.editwin.io.save(none) file "/usr/lib/python2.7/idlelib/iobinding.py", line 345, in save if self.writefile(self.filename): file "/usr/lib/python2.7/idlelib/iobinding.py", line 378, in writefile chars = self.encode(self.text.get("1.0", &quo

javascript - react native router flux: override left or right button inside component and access local function -

i able override button inside compononent not able call local function, example when press "refresh", nothing happen. correct way override button text , perform function. appreciate. thanks. import { webview } 'react-native' import react, { proptypes, component } 'react'; import { view, text } 'react-native'; import styles '../src/styles/home' var webview_ref = 'webview'; class webviewcomponent extends component { static righttitle = "refresh"; static onright() { this.reload; } static proptypes = { url: proptypes.string, scalespagetofit: proptypes.bool, startinloadingstate: proptypes.bool, }; static defaultprops = { url: 'http://google.com', scalespagetofit: true, startinloadingstate: true, }; render() { return ( <webview ref={ webview_ref } style={ { flex: 1, margintop: 50 } } source={ { uri: this.props.url } }

xamarin.forms - Xamarin Forms ContentPage background image tiling -

Image
im trying set contentspage backgroundimage on large screened devices image keeps tiling. does here know how stop images tiling? edited here image of whats happening on ipads. this looks on phone: mainpage.cs namespace application.views { public partial class mainpage : contentpage { registerdevice registerdevice; menuanimations menuanimations; private double width; public mainpage() { initializecomponent(); registerdevice = new registerdevice(); menuanimations = new menuanimations(); toolbaritems.add(new toolbaritem { icon = "menubtn.png", order = toolbaritemorder.primary }); } protected override void onsizeallocated(double width, double height) { backgroundimage = "bg_portrait.png"; } } } mainpage.xaml <?xml version="1.0" enc

c# - I cannot change the excel number format when is generated by SSIS -

i generating excel file ssis, when file generated open , try set columns specific number format not work, nothing happens. but if after set format change value manually, new value formatted properly. every file , sheet generated dynamically, not want use excel templates. plan modify formats open xml after generation cannot modify formats manually. any idea?

css - Scroll option only works for medium and large screen sizes in Bootstrap -

i new bootstrap, have used information websites , implemented responsive screen setup code library. have 2 div tags: 1 intended display sidebar, when click link there next div tag appears details... sidebar , main block have same height... information on main screen more height.. used scrollbar... the main code scrollbar follows.. <div class="contact-form-right-wrap well-sm pre-scrollable col-sm-7 col-md-7 col-lg-7" style="padding-right: 0px;max-height: 310px; padding-left: 0px;padding-top:0px;padding-bottom:0px; margin-top:7px;margin-bottom:20px;"> now issue use scrollbar, if decrease screen size want main screen appear , under , after sidebar screen, because when screen size decreased scroll bar shrinks such data not visible when side side sidebar... is there solution when screen size decreased scrollbar property overridden responsive system. (minimum screen size should cause scrollbar property disappear). i feel responsive system not work

html - Angular Tags disrupting CSS stylings -

i have project being built angular 2 framework. custom angular tags ( <my-app> , <my-whatever-component> etc.) keep disrupting css output. when html directly on index.html file (not in component whatsoever) css loads alright. i have debugged , have come conclusion custom angular tags cause of issue. what do change behavior? how can make custom html tags vanish after view rendered ? prevent hierarchical css rules breaking. edit 1 : forgot mention css custom (free bootstrap admin template thingy) can't (more don't want to) tweak it. you need set view encapsulation types, more information here @component({ moduleid: module.id, selector: 'my-zippy', templateurl: 'my-zippy.component.html', styles: [` .zippy { background: green; } `], encapsulation: viewencapsulation.none //no shadow dom @ all. therefore, no style encapsulation. }) edit as workaround can use attribute selector in component like s

Insert a property from a JavaScript object into a string -

why js window.location not accept variable assigned json, hava checked json, , json exist console.log(myjsoncallback) object { status=1, action="update", id=90} the code this, if(response.action === "update"){ var id = response.id;window.location.href= "/index.php?r=kasir%2ftransaction%2fview&id=id"} in browser, little funny coz gives me : http://10.60.36.79/index.php?r=kasir%2ftransaction%2fview&id=id please advice update my original code : . 'if(response.action === "update"){' . ' var id = response.id;' . 'window.location.href= "' . url::toroute(['view']) . '&id=${id}"' . '}' see, use dot(.) cos code string on php please advice if expected work interpolate variable, this: /index.php?r=kasir%2ftransaction%2fview&90=90 but string not contain variables. try instead: if(response.action === "update") {

How to use DynamoDB with CakePHP 3.x -

i have started application cakephp 3.x , amazon dynamodb. know, cakephp doesn't have built-in support dynamodb (nosql). so, how can use dynamodb cakephp 3.x? if there not plugin/library work, please guide me cakephp classes must customize make works. thank you.

MySQL How to automatically insert different values into a table -

let me describe problem. let´s have attribute_id´s id (82, 93, 284, 343, 432, 537). table has columns (id, rule_id, attribute_id, _position, required) now, want insert few more rows got specifics: -id change automatically - no issue -rule_id same, defined variable - no issue -attribute_id change, (82, 93, 432 - 3 rows) or (343, 284, 537, 82, 93 - 5 rows) - here main problem -_position start 1 , end 1 + number of rows. - no issue -required value 0. -no issue i dont want write: insert ind_rule_attribute (rule_id, attribute_id, _position, required) values (rule_id_"var", 82, 1, 0); insert ind_rule_attribute (rule_id, attribute_id, _position, required) values (rule_id_"var", 93, 2, 0); insert ind_rule_attribute (rule_id, attribute_id, _position, required) values (rule_id_"var", 432, 3, 0); rather use somehow loop fill let´s 82, 93, 432 - variable - code work me. first question here sorry if made mistakes in description couldn't find answer he

java - Jersey - @Consumes doesn't constraint request - IllegalStateException @FormParam -

i'm using jersey, , have resource @consume(mediatype.application_form_urlencoded) annotation. however, when making request endpoint, json body (and content-type application/json), i'm seeing following exception: "the @formparam utilized when content type of request entity not application/x-www-form-urlencoded" anyone knows missing? or perhaps code in jersey validates request content-type matches @consumes annotation, can debug it? p.s. i'm using jersey 2.22.1 the exception stacktrace: java.lang.illegalstateexception: unable perform operation: resolve on com.jive.services.jiveid.auth.oauth.models.authorizeparams @ org.jvnet.hk2.internal.clazzcreator.create(clazzcreator.java:386) @ org.jvnet.hk2.internal.systemdescriptor.create(systemdescriptor.java:471) @ org.glassfish.jersey.process.internal.requestscope.findorcreate(requestscope.java:162) @ org.jvnet.hk2.internal.utilities.createservice(utilities.java:2072) @ org.jvnet.hk2.internal.servicehandleimpl

angularjs - angular-chart.js 1.0.3 - how to show tooltips after animation completes -

Image
i'm trying make doughnut or pie chart values on each piece or tooltips active after animation complete, this: but couldn't make work far - other answers worked older versions of angular-chart.js. far have this(please see full page): (function(){ angular.module('chartapp',['chart.js']) .config(['chartjsprovider', function (chartjsprovider) { // configure charts chartjsprovider.setoptions({ //custom colors chartcolors : [ '#803690', '#00adf9', '#dcdcdc', '#46bfbd', '#fdb45c', '#949fb1', '#4d5360'], responsive: true }); }]) .controller('doughnutchartcontroller', ['$scope', '$timeout',function ($scope, $timeout) { /*********************************** doughnut chart *****************/ $scope.labels = ["download sales", "in-store sales", "mail-order sales"]; $scope.data = [300, 500, 100]

swift3 - Nil Error While Running -

i working on todo app,it completed , running begins give error "fatal error: unexpectedly found nil while unwrapping optional value".need guide! class viewcontroller: uiviewcontroller, uitableviewdatasource, uitableviewdelegate{ @iboutlet weak var tableview: uitableview! var tasks : [task] = [ ] override func viewdidload() { super.viewdidload() tableview.datasource = self tableview.delegate = self // additional setup after loading view, typically nib. } override func viewwillappear(_ animated: bool) { getdata() tableview.reloaddata() } func tableview(_ tableview: uitableview, numberofrowsinsection section: int) -> int { return tasks.count } func tableview(_ tableview: uitableview, cellforrowat indexpath: indexpath) -> uitableviewcell { let cell = uitableviewcell() let task = tasks[indexpath.row] if task.isimportant{ cell.textlabel?.text = " ★ \(task.name!)" }else{ cell.textlabel?.

python - "\r\n" is ignored at csv file end -

import csv impfilename = [] impfilename.append("file_1.csv") impfilename.append("file_2.csv") expfilename = "masterfile.csv" l = [] overwrite = false comma = "," f in range(len(impfilename)): open(impfilename[f], "r") impfile: table = csv.reader(impfile, delimiter = comma) row in table: data_1 = row[0] data_2 = row[1] data_3 = row[2] data_4 = row[3] data_5 = row[4] data_6 = row[5] dic = {"one":data_1, "two":data_2, "three":data_3, "four":data_4, "five":data_5, "six":data_6} in range(len(l)): if l[i]["one"] == data_1: print("data, 1 = " + data_1 + " has been updated using data " + impfilename[f]) l[i] = dic overwrite = true break if overwrite == fals

excel - How to run macro if based on other cells which automatically changes by formula -

as per subject, need run macro based on other cells. here case : cells g3 until end of row contains data used formula =if(b3="";"";(sumif('incoming goods'!$f$3:$f$1048576;'current stock'!b3;'incoming goods'!$m$3:$m$1048576)-(sumif('outgoing goods'!$d$4:$d$1048576;'current stock'!b3;'outgoing goods'!$j$4:$j$1048576)))) --> need convert formula vba cells h3 should contain : if g3.value = 0 "out of stock", else " " and sheet must calculate every time data in g3 change automatically or additional data on sheet. already tried code : private sub worksheet_calculate() dim current worksheet dim rng1 range dim target range set current = worksheets("current stock") set rng1 = current.range("g:g") set target = range("h:h") each rng1 in target if rng1.value2 = "0" target.value2 = "out of stock&qu

ios - Is there a framework or function for turning emoji into words? -

this question has answer here: get description of emoji character 3 answers i'm making app reads text aloud. want able convert emoji speech using names. so 😀 -> grinning face 😄 -> smiling face open mouth , smiling eyes 🙊 -> speak-no-evil monkey and on. is there framework or function achieve this? cheers. this links repository containing mapping emoji unicode description. check this answer . to read out, familiar avspeechsynthesizer

r - How to conditionally combine data.frame object in the list in more elegant way? -

i have data.frame in list, , intend merge specific data.frame objects conditionally merge second, third data.frame objects without duplication, merge first data.frame objects. however, used rbind function task, approach not elegant. can me out improve solution ? how can achieve more compatible solution can used in dynamic functional programming ? how can desired output ? idea ? reproducible example: dflist <- list( df.1 = data.frame(red=c(1,2,3), blue=c(na,1,2), green=c(1,1,2)), df.2 = data.frame(red=c(2,3,na), blue=c(1,2,3), green=c(1,2,4)), df.3 = data.frame(red=c(2,3,na,na), blue=c(1,2,na,3), green=c(1,2,3,4)) ) dummy way it: rbind(dflist[[1l]], unique(rbind(dflist[[2l]], dflist[[3l]]))) apparently, attempt not elegant apply in functional programming. how can make happen elegantly ? desired output : red blue green 1 1 na 1 2 2 1 1 3 3 2 2 11 2 1 1 21 3 2 2 31 na 3 4 6 na na 3 how can improve

java - Method to sum 2 numbers and return the value -

so i'm trying finish off java corse in school i'm having problem understanding 1 of tasks. the task in question is: create method sums 2 numbers , returns sum. methodhead should this; public static double sum(double nr1, double nr2) , problem i'm running in not understand how solve task. the way of solving task code. import java.util.scanner; class addnumbers { public static void main(string args[]) { int x, y, z; system.out.println("enter 2 integers calculate sum "); scanner in = new scanner(system.in); x = in.nextint(); y = in.nextint(); z = x + y; system.out.println("sum of entered integers = "+z); } } but solution i'm not solving task this may you import java.util.scanner; class addnumbers { public static void main(string args[]) { double x, y, z; system.out.println("enter 2 numbers calculate sum "); scanner in = new s

Better opensource tools for profiling .Net based desktop application -

net based desktop application understand how application behaving on memory perspective. please let me know opensource tool start profiling , capturing information. if use visual studio 2015 it's possible launch diagnostic tools. with button 'take snapshot' in tab "memory usage' can analize memory. for more info: https://blogs.msdn.microsoft.com/visualstudioalm/2015/01/16/diagnostic-tools-debugger-window-in-visual-studio-2015/

CSS3 Animations , Individual section Animation length -

i using css3 animation script works great issue have want set custom slide lengths couple of them instead of 2 of them being 6 seconds may want them 2 seconds example. does know if possible in css3? have searched , searched struggling. figure:nth-child(1) { animation: xfade 48s 42s infinite; } figure:nth-child(2) { animation: xfade 48s 36s infinite; } figure:nth-child(3) { animation: xfade 48s 30s infinite; } figure:nth-child(4) { animation: xfade 48s 24s infinite; } figure:nth-child(5) { animation: xfade 48s 18s infinite; } figure:nth-child(6) { animation: xfade 48s 12s infinite; } figure:nth-child(7) { animation: xfade 48s 6s infinite; } figure:nth-child(8) { animation: xfade 48s 0s infinite; } http://codepen.io/leemark/pen/vzcdo thanks much. the animation (in codepen) referring uses approach had described in 1 of earlier answers here . animation achieved making each element animate 6s period while remain idle remaining 42s period (the time taken

What's wrong with this code(JavaScript, buttons, HTML)? -

<!doctype html> <html> <head> <title>question 2</title> <meta http-equiv="x-ua-compatible" content="ie=9"/> </head> <body> <button onclick="myfunction()">alphabetical order</button> <button onclick="countfunction">count</button> <p id="i"></p> <p id="ii"></p> <script> var products = ["printer", "tablet", "router", "keyboard"]; document.getelementbyid("i").innerhtml = products; function myfunction() { products.sort(); document.getelementbyid("i").innerhtml = products; } function countfunction() { document.getelementbyid("i").innerhtml = products.length; } </script> </body> </html> i think it's spelling or formatti

How to open contact form 7 by using wordpress ajax -

i using contact 7 plugin , question open contact form 7 in popup via wordpress admin ajax code not working. popup open contact form 7 not submitting. redirecting in admin ajax url , returns 0. here code doing in functions.php <?php add_action('wp_head', 'my_action_popup_cf7_javascript'); function my_action_popup_cf7_javascript() { ?> <script type="text/javascript" > jquery(document).ready(function($) { $('.myajaxcarrer').click(function(){ //alert(1); var mydata = $(this).data(); $(".overlay").fadein('slow'); var data = { action: 'my_action_popup_cf7', //whatever: 1234, id: mydata.id }; // since 2.8 ajaxurl defined in admin header , points admin-ajax.php //console.log(ajaxurl); $('.item').removeclass('active'); $('[data-id=' + mydata.id + ']').parent().addclass(

javascript - D3.js Highlight an element when hovering over another -

i have donut chart made using d3.js. change color of arc when hovering on corresponding text. i know how change color of first, or all, corresponding one. here 's code far. lines highlighting following: .on("mouseover", function(d,i){ //d3.select(".donutarcslices").transition().style("fill", "#007dbc"); //d3.selectall(".donutarcslices").transition().style("fill", "#007dbc"); div.transition() .duration(200) .style("opacity", .9); div .html(d.name) .style("left", (d3.event.pagex) + "px") .style("top", (d3.event.pagey - 28) + "px"); }) .on("mouseout", function(d) { d3.select(".donutarcslices").transition().style("fill", "#3e47

oracle - Execution of Multiple procedures one after another is not working -

i trying execute procedure in turn should execute 4 other procedures 1 after other. how acheive this? create or replace procedure mainproc begin tack(400); phno_insert; address_insert; academics_insert; commit; end; error report: pls-00905: object phno_insert invalid. pl/sql: statement ignored. pls-00905: object address_insert invalid. pl/sql: statement ignored. pls-00905: object academics_insert invalid. pl/sql: statement ignored. the problem seems in fact have procedure doing ddl on object statically referenced in procedure; example, if define: create table runtimetable select 1 one dual; create or replace procedure createtable begin execute immediate 'drop table runtimetable'; execute immediate 'create table runtimetable select 1 one dual'; end; create or replace procedure usetable vvar number; begin select 1 vvar runtimetable; -- dbms_output.put_line(vvar); end; create or replace procedure createanduset

html - Bootstrapped webpage has input disabled due to position:relative -

Image
hello 1 simple annoying problem. managed use css , bootsatrap create responsive webpage wanted. however, when used position:relative input (text field) got disabled. idea why? <div class="col-md-offset-2 col-md-8 text-center"> <div class="container-fluid"> <div id="logo"> <img class="img-responsive" src="uv.png"> </div> <div class="login-form"> <h1>united volunteers</h1> <div class="form-group"> <label class="input-title">username</label> <input type="text" class="form-input" placeholder="username"> </div> <div class="form-group"> <label class="input-title">password</label> <input type="password" class="form-input

uiview - Angularjs : ui-sref state change in url not showing submenu -

in angularjs show/hide dynamic submenu, adding , removing dynamic classes in js file. every time when state changes in url (i.e ui-sref={{mymenu.url}}) sub menu not visible. if there no state change sub menu working properly. can please suggest. html <li ng-repeat='mymenu in menuitems' ng-click="showhidemenu($event);" > <a class="iconsize" ui-sref={{mymenu.url}}> <i class={{mymenu.image}}></i> <strong>{{mymenu.menuname}}</strong> <span class="fa fa-chevron-down"></span> </a> <ul class="submenuhide"> <li class="" ng-repeat='submenu in mymenu.submenu'> <a>{{submenu.submenuname}}</a> </li> </ul> js $scope.showhidemenu = function(event) { var classname = event.target.parentelement.parentelement.children[1].classname; if(classname == 'submenuhide'){ $(event.target.parentelement.p

java - IBM DB2 select query not getting executed -

whenever try execute bellow query : select * vehicle_info i'm getting bellow exception ... physical database connection acquired for: stagbig 07:19:11 [select - 0 rows, 0.002 secs] 1) [code: -551, sql state: 42501] db2 sql error: sqlcode=-551, sqlstate=42501, sqlerrmc=hyuser;select;fni.vehicle_info, driver=4.19.49. 2) [code: -727, sql state: 56098] db2 sql error: sqlcode=-727, sqlstate=56098, sqlerrmc=2;-551;42501;hyuser|select|fni.vehicle_info, driver=4.19.49 ... 1 statement(s) executed, 0 rows affected, exec/fetch time: 0.002/0.000 sec [0 successful, 1 errors] can me please? the current user wan't having sufficient privileges. why facing error. got required privilege , access no more error.

liquid - Shopify Variant checkbox instead of dropdown -

Image
i'm trying make variants display following image instead of default dropdown shopify provides. i'm using following code, throws error when trying add basket. error states "parameter missing or invalid: required parameter missing or invalid: id" <form action="/cart/add" method="post" enctype="multipart/form-data"> {% variant in product.variants %} {% if variant.available == true %} <fieldset class="group"> <ul class="checkbox"> <li> <input type="checkbox" value="{{variant.id}}"> <label>{{ variant.title }} {{ variant.price | money_with_currency }}</label> </input> </li> </ul> </fieldset> {% else %} <option disabled=

javascript - How can I override the OnBeforeUnload dialog and replace it with my own? -

i need warn users unsaved changes before leave page (a pretty common problem). window.onbeforeunload=handler this works raises default dialog irritating standard message wraps own text. need either replace standard message, text clear, or (even better) replace entire dialog modal dialog using jquery. so far have failed , haven't found else seems have answer. possible? javascript in page: <script type="text/javascript"> window.onbeforeunload=closeit; </script> the closeit() function: function closeit() { if (changes == "true" || files == "true") { return "here can append custom message default dialog."; } } using jquery , jqmodal have tried kind of thing (using custom confirm dialog): $(window).beforeunload(function() { confirm('new message: ' + this.href + ' !', this.href); return false; }); which doesn't work - cannot seem bind beforeunload event.

r - Reverse legend in raster -

Image
while plotting raster image, example: library(raster) r <- raster(nrow = 3, ncol = 3) values(r) <- 1:9 plot(r, col = terrain.colors(255)) how can legend being in ascending order, i.e. 1 (top) 9 (bottom)? i thought of legend.args , couldn't find right arguments. i tried bit , think i've found solution myself, though not elegant way. library(raster) r <- raster(nrow = 3, ncol = 3) values(r) <- 1:9 par(mar = c(3, 3, 4, 3)) plot(r, col = terrain.colors(255),legend = false, xlim = c(-200,200), ylim = c(-200,200)) vz = matrix(1:100, nrow = 1) vx = c(185, 195) vy = seq(-10, 10, length.out = 100) par(new = true, mar = c(3, 3, 4, 3)) plot(1, xlab = "", ylab = "", axes = false, type = "n", xlim = c(-200, 180), ylim = c(-20, 20)) image(vx, vy, vz, col = rev(terrain.colors(255)), axes = false, xlab = "", ylab = "", add = true) polygon(c(185, 195, 195, 185), c(-10, -10, 10, 10)) axis(4, @

Python Convert a list of list to list of tuples -

this question has answer here: how convert nested list of lists list of tuples in python 3.3? 3 answers i want convert list of list list of tuples using python. want without iterating through nested list increasing execution time of script. there way can workout me? thanks in advance converted_list = [tuple(i) in nested_list]

c# - Slow execution of USQL -

i have created simple script score between 2 strings. please find usql , backend .net code below cn_matcher.usql: reference assembly master.fuzzystring; @searchlog = extract id int, input_cn string, output_cn string "/cn_matcher/input/sample.txt" using extractors.tsv(); @cleanscheck = select id,input_cn, output_cn, cn_validator.trial.cleanser(input_cn) input_cn_cleansed, cn_validator.trial.cleanser(output_cn) output_cn_cleansed @searchlog; @checkdata= select id,input_cn, output_cn, input_cn_cleansed, output_cn_cleansed, cn_validator.trial.hamming(input_cn_cleansed, output_cn_cleansed) hammingscore, cn_validator.trial.levinstiendistance(input_cn_cleansed, output_cn_cleansed) levinstiendistance, fuzzystring.comparisonmetrics.jarowinklerdistance(input_cn_cleansed, output_cn_cleansed) jarowinklerdistance