Posts

Showing posts from June, 2012

sql server - Stored Procedure result into temp table in Azure Data Warehouse -

in azure data warehouse , have stored procedure return result of select command. how push stored procedure result temp table? i tried below query , returning error message. create table #temp (name varchar(255), created_date datetime) go insert #temp exec sp_testproc output message: msg 103010, level 16, state 1, line 3 parse error @ line: 2, column: 1: incorrect syntax near 'exec'. azure sql data warehouse not support insert ... exec per here . however, temp tables have different scope means can viewed outside stored procedures create them. create temp table inside stored proc, , can viewed once stored proc has executed, eg: if object_id('dbo.usp_gettablenames') not null drop proc dbo.usp_gettablenames; go create proc dbo.usp_gettablenames -- drop table if exists if object_id('tempdb..#tables') not null drop table #tables; -- create temp table viewing outside stored procedure create table #tables ( ...

extjs4 - Extjs 6 Define a chained store using Ext.define -

can chained store define using ext.define statement? tried following code i'm getting errors: ext.define('myproject.store.relfiltered', { extend: 'ext.data.chainedstore', source:'myproject.store.rel', alias: 'store.releasesfiltered' }); the errors receive are: ext.data.chainedstore.applysource(): invalid source "myproject.store.rel" specified ext.data.chainedstore and ext.mixin.bindable.applybind(): cannot use bind config without viewmodel i got idee this post, seems code incomplete. thank you can chained store define using ext.define statement? definitely yes. source config of chained store says should either store instance or id of existing store. so code this: ext.define('myapp.store.mychainedstore', { extend: 'ext.data.chainedstore', storeid: 'mychainedstore', //source using storeid source: 'originalstore' }); ext.define('myapp.sto...

javascript - Edit XML using JSON? -

i'm customising web-based tool allows sccm functionality via web console, can found here . i can see following code in javascript file, using json "get" function read values of file @ url "/api/computer/getreportsinfo", , assigning values couple of variables: $.get("/api/computer/getreportsinfo", function (items) { computervm.reportsviewmodel.sitecode = items["sitecode"]; computervm.reportsviewmodel.reportserver = items["reportserver"]; }, "json"); this xml(?) looks @ url: <arrayofkeyvalueofstringstring xmlns:i="http://www.w3.org/2001/xmlschema-instance" xmlns="http://schemas.microsoft.com/2003/10/serialization/arrays"> <keyvalueofstringstring> <key>sitecode</key> <value>mysitecode</value> </keyvalueofstringstring> <keyvalueofstringstring> <key>reportserver</key> ...

c++ - Age output not calculating -

this question has answer here: what special numbers starting zero? 4 answers patientdemographicinformation patientjones("123456789", "jones", 'a', "mary", "mc donalds department, 555 elm street, apt 2, "666 west side", "san diego", "ca", "76032", "3899", "360", "89054392012", 'f', 02031934); patientjones.printpatientdemographicinformation(); int patientdemographicinformation::getpatientage( ) { time_t t = time(0); // time struct tm * = localtime( &...

rust - What is the best way to get a `*const c_char` from a const array via FFI? -

i trying interface c api in rust. define couple of string constants macros: #define kofximageeffectpluginapi "ofximageeffectpluginapi" and struct const char *pluginapi; constant supposed used: typedef struct ofxplugin { const char *pluginapi; // other fields... } ofxplugin; bindgen (servo) creates following rust equivalent: pub const kofximageeffectpluginapi: &'static [u8; 24usize] = b"ofximageeffectpluginapi\x00"; #[repr(c)] #[derive(debug, copy)] pub struct ofxplugin { pub pluginapi: *const ::std::os::raw::c_char, // other fields... } what best way *const c_char const array? tried both as_ptr , cast, types don't match because array u8 , c_char i8 ... let's start minimal example , work our way through: const k: &'static [u8; 24usize] = b"ofximageeffectpluginapi\x00"; #[derive(debug)] struct ofxplugin { plugin_api: *const ::std::os::raw::c_char, // other fields... } fn main() ...

excel - Invert/reverse columns that don't have a set range using a command button -

i know question has been asked can't seem make find work me. i want take data starting in column , going column j row 2 whatever end of data might , reverse order(inverse data) i stumbled upon the code below freezes , don't want have make selection. private sub commandbutton2_click() dim vtop variant dim vend variant dim istart integer dim iend integer application.screenupdating = false istart = 1 iend = selection.columns.count while istart < iend vtop = selection.columns(istart) vend = selection.columns(iend) selection.columns(iend) = vtop selection.columns(istart) = vend istart = istart + 1 iend = iend - 1 loop application.screenupdating = true end sub to clear, want make last row first row, , last row first row. continuous block of data. cheers before after another version of code - see if works. private sub commandbutton2_click() dim v(), long, j long, ...

javascript - vue-i18n dynamic locale with promise doesn't update -

i testing vue-i18n in order implement future projects. have separate system handle translations, got remote json files. vue-i18n have system fetch locale using promise, explainations here . i cannot use fetch method because files outside got cross-origin troubles. instead vue-resource , don't know why, when set new set of locale, doesn't update automatically. bescause default lang en , when load en locale file, nothing. have change 2 times config.lang force update. several things: a jsfiddle test > http://jsfiddle.net/t4kdoqj7/3/ uncomment line 19 reproduce fix maybe it's due bad using of vue-resource i couldn't create vue-i18n tag... thank ! ok, found hack : set vue.config.lang = '' before loading anything here fiddle (l9) > http://jsfiddle.net/t4kdoqj7/4/

Java - Problems with understanding inheritance -

i facing problems inheritance in java. can't understand why following 2 programs have outputs! me? :) 1) public class { int foo() { return 1; } } public class b extends { int foo() { return 2; } } public class c extends b { int bar(a a) { return a.foo(); } } c x = new c(); system.out.println(x.bar(x)); // output:2 2) public class { int e=1; } public class b extends { int e=2; } public class c extends b { int bar(a a){ return a.e; } } c x= new c(); system.out.println(x.bar(x)); // output:1 in both cases, you're passing in object of type c print function. bar function asks object of type a , it's still acceptable pass in object of type c since subclass of a . first of all, it's important keep in mind a.foo() , a.e being called on c object. so happening in both cases it's searching lowest attribute or method in list. here simplified version of java doing in p...

MySQL datetime to convert Date.UTC -

i have array database. this: [ { "tarih": "2016-11-15 10:28:49", "guc": "0" }, { "tarih": "2016-11-15 14:25:38", "guc": "0" }, { "tarih": "2016-11-15 14:25:44", "guc": "0" }, { "tarih": "2016-11-15 14:27:10", "guc": "17" }, { "tarih": "2016-11-15 18:32:39", "guc": "54" }, { "tarih": "2016-11-15 18:32:57", "guc": "54" }, { "tarih": "2016-11-15 18:33:10", "guc": "93" }, { "tarih": "2016-11-15 18:33:24", "guc": "34" }, { "tarih": "2016-11-15 18:34:49", "guc": "34" } ] i want make graph highcart.js. http://www.highcharts.c...

php - Failed to connect to accounts.google.com port 443: Connection timed out -

i trying integrate google calendar api in wordpress site, shows: failed connect accounts.google.com port 443: connection timed out the hosting server , domain in hostgator when type curl command via ssh access: curl -v https://accounts.google.com following: about connect() accounts.google.com port 443 (#0) trying 216.58.220.173... connection timed out trying 2404:6800:4009:801::200d... failed connect 2404:6800:4009:801::200d: network unreachable success couldn't connect host closing connection #0 curl: (7) failed connect 2404:6800:4009:801::200d: network unreachable what should do?

rx java - RxAndroid download multiple files, max 3 concurrent thread -

i have api download single mp3 file server,which consumed using rxjava bellow. observable<responsebody> observable = audioservice.getfile(filenamewithextension); observable.subscribeon(schedulers.newthread()) .observeon(schedulers.newthread()) .subscribe(somecallbackclass<responsebody>); this downloads single file , callback saves file on disk. want download list of files save each file on disk , wait till download completes , @ max 3 calls should executing in parallel. how rxandroid , tried flatmap not able understand fully. edit new code list<observable<response<responsebody>>> audiofiles = new arraylist<>(); (string filenamewithextension : filenameswithextension) { observable<response<responsebody>> observable = restfactory.getaudioservice().getfile(filenamewithextension); audiofiles.add(observable); } observable.from(audiofiles).flatmap(audiofile -> ...

php - Amazon s3 unable to fetch images even though its public -

i have ovh vps , i'm using php curl fetch images. it's showing errors, [automattic\woocommerce\httpclient\httpclientexception] error: error getting remote image http://s3.ap-south-1.amazonaws.com/productimages1234/images/elegantayeshav5-01.jpg error: curl error 28: operation timed out after 9775 milliseconds 440188 out of 3573589 bytes received. [woocommerce_api_invalid_remote_product_image] i have made bucket public , it's folder public , images getting error. i can open image on browser , can wget on vps it's not working curl. link : http://s3.ap-south-1.amazonaws.com/productimages1234/images/elegantayeshav5-01.jpg thank !

Apache Flink: Window Functions and the beginning of time -

in windowassigner , element gets assigned 1 or more timewindow instances. in case of sliding event time window, happens in slidingeventtimewindows#assignwindows 1 . in case of window size=5 , slide=1 , element timestamp=0 gets assigned following windows: window(start=0, end=5) window(start=-1, end=4) window(start=-2, end=3) window(start=-3, end=2) window(start=-4, end=1) in 1 picture: +-> beginning of time | | +----------------------------------------------+ | size = 5 +--+ element | | slide = 1 | | | v | | t=[ 0,5[ window 1 xxxxx | | t=[-1,4[ window 2 xxxxx | | t=[-2,3[ window 3 xxxxx | | t=[-3,2[ window 4 xxxxx | | t=[-4,1[ window 5 xxxxx | | ...

scikit learn - _SOLVED_ Impossible to set the gamma parameter for the spectral_clustering function in sklearn 0.18.1 -

i doing clustering using scikit-learn (aka sklearn) , worked fine until tried play gamma parameter of spectral_clustering function. i using sklearn (0.18.1) python (3.5.2) in virtual environment manage anaconda (1.5.1). in official documentation of function , there mention of parameter gamma : class sklearn.cluster.spectralclustering(n_clusters=8, eigen_solver=none, random_state=none, n_init=10, gamma=1.0 , affinity='rbf', n_neighbors=10, eigen_tol=0.0, assign_labels='kmeans', degree=3, coef0=1, kernel_params=none, n_jobs=1) however, on machine when try pass parameter gamma function, following error : typeerror: spectral_clustering() got unexpected keyword argument 'gamma' and then, when display page of function help(spectral_clustering) , got different information on official documentation : spectral_clustering(affinity, n_clusters=8, n_components=none, eigen_solver=none, random_state=none, n_init=10, eigen_tol=0.0, assign_labe...

angular - Angular2, Property 'map' does not exist on type 'Observable' -

the imports: import { component,oninit } '@angular/core'; import { formgroup, formcontrol, validators, formbuilder } '@angular/forms'; import { application } './application'; import { http, response } '@angular/http'; import { ngmodule } '@angular/core'; import { headers } '@angular/http'; import 'rxjs/add/operator/map'; import 'rxjs/rx'; the method: saveapplcation() { var application = new application(); application.ssnr = this.form.value.ssnr; application.loanamount = this.form.value.amount; application.email = this.form.value.email; application.phonenumber = this.form.value.phonenumber; application.repaymenttime = this.form.value.time; var body: string = json.stringify(application); var headers = new headers({ "content-type": "application/json" }); this._http.post("api/application/", body, { headers: headers }) .map(returndata => ...

flash - Referring stage from the class Action Script 3 -

Image
basically coding switch between scenes clicking buttons. giving frame label sand scene names arguments. movieclip(root).gotoandstop(framelabel, scenename); works fine on stage. when use same on class throws warning typeerror: error #1009: cannot access property or method of null object reference. know happens there no root class.is there way fix it. please find code below. //class code package { import flash.events.keyboardevent; import flash.events.mouseevent; import flash.display.simplebutton; import flash.display.*; import flash.text.*; import flash.events.event; import flash.display.movieclip; public class clickbutton extends simplebutton { public var flabel:string; public var sname:string; public var snumber:number; public function clickbutton() { } public function gotosession(sesbut:simplebutton, framelabel:string, scenename:string):void { sesbut.addeventlistener(mouseevent.click, gotoses)...

python - Building upon existing function -

i playing around functions in order further understanding of them , curious, @ possible return users first name , last initial using following function without adding additional functions? name = raw_input("please enter full name: ") def username(a): print(a[0:6]+a[-1]) username(name) if length of input names can vary , number of names have use function split , index . if user can enter single name need add if or try...except . a[:a.index(' ')]) first name, beginning of input first space index returns valueerror if character isn't found if might enter first name surround try...except a.split()[-1][0] first letter of last name if enter more 2 names (billy bob joe -> billy j) name = raw_input("please enter full name: ") def username(a): print(a[:a.index(' ')]+' '+a.split()[-1][0]) username(name)

c# - XSD validation not failing trailing newline -

xml validation not touch except when have to, there's stupid i'm missing , far i've been unsuccessful in googling help. issue have type restriction says can letters or spaces. element leading newline fails validation, trailing newline passes. how trailing newline fail? i've created stripped down test case follows: validation code: public list<xsdvalidationerror> validatexmlagainstxsd(string xml, string xsdfilepath, boolean processschemalocation = false) { var ret = new list<xsdvalidationerror>(); var xss = new xmlschemaset(); var xmlurlresolver = new xmlurlresolver(); xmlurlresolver.cachepolicy = new requestcachepolicy(requestcachelevel.default); xss.xmlresolver = xmlurlresolver; var xsdxelement = xelement.parse(file.readalltext(xsdfilepath)); var targetnamespaceattribute = xsdxelement.attribute("targetnamespace"); xss.add(targetnamespaceattribute != null ? targetnamespaceattribute.value : "", ...

php - Testing a pre-loaded Laravel Eloquent model with a query scope -

i've started using laravel's query scopes 1 thing feel i'm missing ability test existing eloquent object defined scope. say i've set 'published' scope post model public function scopepublished($q){ return $q->wherenotnull('published_at'); } if have queried list of posts , want put symbol beside published ones, ideally want write like if($post->ispublished()){ /* insert symbol */ } ...using 'published' scope test each post, there way can (without running additional query each post)?

Issue while reading Raw Request in SOAPUI from "${=Math.random()}" or ${=java.util.UUID.randomUUID()} for Rest API Post Method -

i trying read raw request rest api post request using "${=math.random()}" or ${=java.util.uuid.randomuuid()} , trying store generated value in project level property when see raw request , stored value in project level property different. here problem able see 1 value in raw request , different value storing in project level property. please let me know why giving this, function executing twice? regards, saikirangarapati.

php - Query to generate Excel Report Userwise -

i making report quiz application in codeigniter. there 3 tables tbl_users,tbl_answers , tbl_qbank. tbl_users t_id | t_name -------------- tbl_qbank qid | ques | ans_1 | ans_2 | ans_3 | ans_4 | correctans ---------------------------------------------------------------- tbl_answers ans_id | user_id | q_id | ans_attempted --------------------------------------------- i want create report displays user information, correct answers , answer attempted him. using phpexcel i have gotten of things done, need correct query not able figure out. getting answers tbl_answers, showing each row 1 one single user. i can answers users dont know how them in single row. i have tried following query query -> returns answers user information single user $this->db->select('*'); $this->db->from('tbl_users,tbl_qbank'); $this->db->where('tbl_users.t_id',$uid); $this->db->where('tbl_qbank.qid=tbl...

Running a service(started inside a batch file) in background even after closing the parent batch file -

on windows, have batch file starts cassandra , other stuff. when batch file terminated cassandra terminated. but have keep on running cassandra in background , have terminate manually. can guide me same? in advance. have tried start command? start "title" [/d path] [options] "command" [parameters] so .bat file might this: @echo off echo starting cassandra... start "c:\program files\cassandra\cassandra.exe" echo continuing process code... rem more code here

javascript - Is it possible to use more then one AR.ClientTracker in Wikitude SDK? -

i'm creating mobile app , using wikitude sdk make ar feature. want create big target collection, i've read there limitation number of targets in 1 collection. it's 1000 targets. have 1500 targets, desided split targets 2 collections: 1000 , 500 targets. the question how make search through both collections? who knows? you may use 1 ar.clientracker @ time. highly recommend using wikitude's cloudrecognition , allows recognize unlimited amount of target-images. fallback may categorize targets , let user pick right set of targets search on ar-scene start, e.g. discover "book-covers" or "magazine pages", each of them holding 1k of target images offline use. in js can define global ar.clienttracker , set 1 of both active. more details find in js api of clienttracker . please ensure use latest wikitude ar sdk android, ios, unity, xamarin, titanium, phonegap cordova .

sql - Spring Boot JPA Query for not null -

i'm using spring boot jpas , want return values status id not null. what's best way query this? domain @manytoone @joincolumn(name = "entity_status_id") private entitystatuslookup entitystatuslookup; entitycontroller public interface entityrepository extends crudrepository<batch, string> { public page<entity> findbyuploaduserorderbyuploaddatedesc(string userid, pageable page); public entity findbyentityid(string entityid); } api @requestmapping(value="/entity/user", method=requestmethod.get) public httpentity<pagedresources<entity>> getentitybyuser(pageable page, pagedresourcesassembler assembler) { string user = securitycontextholder.getcontext().getauthentication().getname(); page<enity> entityitems = entityrepository.findbyuploaduserorderbyuploaddatedesc(user, page); return new responseentity<>(assembler.toresource(entityitems), httpstatus.ok); i realiz...

mysql - SQL import CSV file with PHP -

i'm trying import pretty big csv file database (locally) file 230mb , 8.8 million lines problem have isn't opening csv or dont know how import it, file opens, imports 500,000 lines , quits , trows no error or timeout or anything, see webpage. this code: try { $conn = new pdo("mysql:host=$servername;dbname=adresses_database", $username, $password); // set pdo error mode exception $conn->setattribute(pdo::attr_errmode, pdo::errmode_exception); echo "connected successfully"; $row = 1; if (($handle = fopen("bagadres.csv", "c+")) !== false) { while (($data = fgetcsv($handle, '', ";")) !== false) { if (!isset($write_position)) { // move line previous position, except first line $write_position = 0; $num = count($data); // $num 15 $row++; //i dont need this? $stmt = $conn->prepare("insert adresses (openbareruimte, huisnummer, ...

Why can't Swift infer base string with specific indexing string methods? -

here's don't understand: swift soooo @ "inferring things" ... yet, syntax of strings, say: hello[hello.index(after: startindex)] requires second hello! no "other string" makes sense! why can't language updated work this? hello[ .index(after: startindex) ] there times when must retype base string name 3 or 4 times in single line of code! you this let red: uicolor = uicolor.red that can written as let red: uicolor = .red however in case .red type property of uicolor . .red belong uicolor type, not particolar instance. that's why can omit uicolor in second snippet. because swift knows .red inside uicolor class. let's example here hello.index(after: hello.startindex) cannot become hello.index(after: .startindex) because in case startindex not type property. it's property related specific value hello .

javascript - Converting check boxes to drop downs with placeholder 1st item (wp job manager) -

firstly though found answer looking in following threat - convert-checkbox-to-dropdown-using-php however following solution had 1 fatal flaw, when loading page have on of options selected show jobs 1 specific options. if option empty show nothing. <script> (function($) { "use strict" $(function() { var $job_types_select = $('<select class="job_types_select"></select>'); var $job_types_ul = $('form.job_filters ul.job_types'); var $job_type_hidden = $('<input type="hidden" name="filter_job_type[]"/>'); $job_types_ul.find('li').each(function() { var $li = $(this); var label_text = $li.find('label').text(); var value = $li.find('input:checkbox').val(); var $option = $('<option></option>'); $option.text(label_text); $option.attr({value: value}); $job_types_select.append($option); }); $job_types_select.change(funct...

Is there a way to dynamically define and register new Dgraphs in Endeca -

as far knowledge of endeca goes, time want add new dgraph definition in endeca configuration, have run initializeservices.sh set updated configuration on eac. i wondering if there way can without running initalizeservices.sh (since lot more update list of dgraph registered in eac, , want prevent that). i found command ./runcommand.sh --update-definition allows configuration changes dgraph, has been registered eac, if add new dgraph in config , run command fails below error: [11.17.16 16:00:07] info: setting definition host 'mdexlivehost2'. [11.17.16 16:00:07] severe: caught exception while checking provisioning caused com.endeca.soleng.eac.toolkit.exception.eaccommunicationexception com.endeca.soleng.eac.toolkit.host.host setdefinition - caught exception while setting host definition. caused com.endeca.eac.client.provisioningfault sun.reflect.nativeconstructoraccessorimpl newinstance0 - null i can't find detailed logs of error being generated anywhere in plat...

mysql - How to migrate data from ExpressionEngine to Rails App -

right have system using expressionengine, rebuilding scratch using ruby on rails. i'm trying figure out how existing data in expressionengine database , migrate new ruby on rails app. i have read ee supports exporting data wordpress. i'm not looking tool recommendation (though if 1 exists great). i'm asking rather, "what best way this?" first time migrating data non-rails app. ee version: 2.9.2 what need migrate: data, example post, users, content in tables. but, don't need template or html since webapp re-created in rails. note: rails database postgresql or maybe mongodb. thanks

Linking to images from assets/img folder in bigcommerce stencil -

im building bigcommerce stencil theme , need way link images in assets/img folder... tried following... <img src="{{cdn "webdav:assets/img/logo-bug.svg"}}"> , <img src="/assets/images/logo-bug.svg"> neither worked in both after bundling , uploading theme. http://***.mybigcommerce.com/assets/images/logo-bug.svg failed load resource: server responded status of 404 (not found) ive tried several other combinations nothing seems work. to call images inside theme's assets/img folder , use cdn handlebar helper below. <img src="{{cdn 'img/filename.jpg'}}"> to call images inside webdav content folder , use cdn helper webdav prefix. webdav file structure content/img/filename.jpg <img src="{{cdn "webdav:img/image.jpg"}}"> to call images inside projects assets/scss files , use following structure. background: #fff url("../img/filename.jpg") no-repeat 50% 50%; ...

Using Liquibase with OSGI and Hibernate -

i integrate liquibase project. first idea use blueprint's bean starts liquibase update oninit method. there problem hibernate, because have "hbm2ddl.auto" set "validate" , validation executed before bean's oninit. (we use container managed persistence persistence.xml in meta-inf). second attemp use bundletracker , when entry in manifest exists, liquibase performs db update. working enforce bundle won't start if update of database won't successful. don't have idea how bundletracker method addbundle. there way how prevent starting bundle bundletracker event? i have possible idea doing create addition bundle performs update , other bundle persistence.xml depend on bundle. have lot of bundles persistence.xml that`s why solution bundletracker seems better me. in cases these kind of dependencies should modeled services. starting/stopping bundles may sound easy in horrendously suckable morass on time. once dynamic dependency services, ...

osx - Info.plist indicates an iOS app, but submitting .pkg -

i'm getting error trying use application loader upload packaged electron app. i use electron-packager package app mas (mac app store) platform. zipped output directory. when try select .zip file application loader, gives me error. you need pack .app file signed .pkg , can upload using application loader . use following command create signed .pkg file: productbuild --component yourappname.app/ /applications --sign "3rd party mac developer installer: yourcompanyname (yourteamid)" --product yourappname.app/contents/info.plist yourappname.pkg for work, you'll need mac installer certificate, can generate apple developer website. when creating certificate choose mac app store , mac installer distribution .

angularjs - Uncaught ReferenceError: ytcfg is not defined even though I won't use that as I am using yt player -

i have been using youtube iframe player api without problem months , started see exception when player loads: uncaught referenceerror: ytcfg not defined when see console. also error app crashes. this question asked in uncaught referenceerror: ytcfg not defined (also __ytril not defined) - there not mention issue site/app crashes. the worth noting same code worked on android os(app developed using cordova) on other os app crashes. how can prevent crashing app? in advance. this google api bug. can see bug confirmed here: https://code.google.com/p/gdata-issues/issues/detail?can=2&start=0&num=100&q=&colspec=api%20id%20type%20status%20priority%20stars%20summary&groupby=&sort=&id=8668

html - display: table-cell causing image to overflow its parent div IE11 only -

Image
i'm displaying images of a4, a5, quarto etc sized products in responsive grid , and using max-width: 70%; (and other percent values) able take arbitrarily sized images , display them in correct scale. working in 10 browser/os combos - except win 10/ie11 good display: here each cell in grid ( <div class="product"> ) has black outline , contains image wrapper in red ( <div class='productimage'> ) plus other wrapper divs the text , price. using jquery solution here have made grid cells same height. in ie11 images seem refuse scale , want render full size instead of percent of container's width: removing display: table-cell; .productimage class wraps image gives on ie11: so size correct again, image @ top of div. tried this , similar solutions based on position: relative / position: absolute cannot work, as, think, divs not have fixed height, and/or height set jquery. codepen http://codepen.io/anon/pen/ennvbz functi...

excel - This workbook is currently referenced by another workbook and cannot be closed -

Image
i getting error when closing "add-in" workbook (.xla) using workbook.close() method: error 1004: "this workbook referenced workbook , cannot closed." i closed every other workbook visible vba editor. "add-in" workbook open workbook, still error thisworkbook.close(). resetting project in vba editor "stop button" did not help. why excel thinking workbook referenced workbook ? (edit: there no other workbook, closed them all. @ point there 1 workbook open, , 1 vba project appearing in vba editor) it seems somehow reference has been leaked. there way avoid bug ? i able replicate error when file ( addin \ workbook ) self referenced (see fig below). suggest terminate excel, rename addin file , open it. `addin shall closed whitout problem (see fig below) .

datatable - Misaligned headers in Richfaces ScrollableDataTable -

i facing issue headers mis-aligning after being sorted on.i have scrollabledatatable has fixed size (850px) , n columns (adding >850px). initial table render looks good. problem starts when scroll right , try sort columns hidden sight. the first few columns fall within 850 px tend sort , re-render table fine. when scroll right , try sort rest of columns, sort works fine column , data below tends misaligned. re-render focuses onto sorted column, data below tends anchor original columns. i did see if has encountered issue... no solutions in sight. feedback appreciated. <rich:scrollabledatatable id="idmydatatable" value="#{dataentities}" var="row" style="width:850px; height:390px;" rowkeyvar="rkv" rendered="#{not empty dataentities}" columnclasses="nopadding" headerclass="nopadding" selectionmode="single" eventsqueue="default" enablecontextmenu=...

javascript - word won't print on button press [JS, HTML] -

i'm confused why on button press not outputting word. if me solve this, appreciated. i've tried searching in other places don't know if unique problem have (not likely) or if i'm not @ searching stuff on google. <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title> seth's pictionary word generator </title> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-bvyiisifek1dgmjrakycuhahrg32omucww7on3rydg4va+pmstsz/k68vbdejh4u" crossorigin="anonymous"> <script> function numgen() { num = return math.floor((math.random() * 43) + 1) window.num = nnum; } var ewords = ["cat"...

mysql - Purging incomplete records from data files -

i'm attempting convert few thousand .txt files database through mysql workbench. i've encountered problem original data interrupted partway through records. how go writing code read through of data, find incomplete records, , delete them files?

python - Trajectory of acceleration 2D vector of a spaceship in order to collide with a moving 2D object -

i making bot (in python) controls spaceship in 2d game xpilot. should able accelerate towards moving object , collide it. both ship , object has xy-position , xy-velocity. ship has acceleration. there no other forces such friction. the bot knows magnitude of vectors: selfx, selfy, selfvelx, selfvely, targetx, targety, targetvelx, targetvely, selfacceleration. the solution find correct direction of acceleration in order collide object , not how properly. i using guide shoot bullets @ moving objects , works perfect. using ship "bullet" works (especially when ship still) more bad. this badly drawn illustration of problem.

ios - Add Virtual Credit/Debit card directly to Apple Wallet -

i have app users sign , in process take picture of credit/debit card , fund account balance card , balance have created virtual card. question is, there way can add virtual card wallet without giving physical card? know not possible , may need contact apple directly access, wanna know if new came in ios 10 allows now. regarding high appreciated. thanks, rk

python - How to solve permission errors when deploying flask app on apache using wsgi? -

i having issue deploying flask app on apache2 using wsgi. apache2 restarts if running fine, when try access browser "403 forbidden" error. here code. webroombooker.wsgi #!/usr/bin/python import sys import logging logging.basicconfig(stream=sys.stderr) sys.path.insert(0,"/home/pi/website/webroombooker.py") webroombooker import app application here directory tree of directory flask application , wsgi file in. /home/pi/website ├── hellotest.py ├── hellotest.pyc ├── index.html.en ├── index.html.en~orig.html ├── main.html ├── poweredbymacosx.gif ├── poweredbymacosxlarge.gif ├── templates │   ├── profile.html │   ├── registration2.html │   ├── registration.html │   ├── seleniumtemplate2.html │   └── seleniumtemplatetime.html ├── test ├── webroombooker.py ├── webroombooker.pyc └── webroombooker.wsgi and here apache virtual host file. <virtualhost *:80> servername localhost wsgiscriptalias / /home/pi/web...

numpy - Implementing Discrete Gaussian Kernel in Python? -

Image
i'm looking implement discrete gaussian kernel defined lindeberg in work scale space theory. it defined t(n,t) = exp(-t)*i_n(t) i_n modified bessel function of first kind . i trying implement in python using numpy , scipy running trouble. def discrete_gaussian_kernel(t, n): return math.exp(-t) * scipy.special.iv(n, t) i try plotting with: import math import numpy np import scipy matplotlib import pyplot plt def kernel(t, n): return math.exp(-t) * scipy.special.iv(n, t) ns = np.linspace(-5, 5, 1000) y0 = discrete_gaussian_kernel(0.5, ns) y1 = discrete_gaussian_kernel(1, ns) y2 = discrete_gaussian_kernel(2, ns) y3 = discrete_gaussian_kernel(4, ns) plt.plot(ns, y0, ns, y1, ns, y2, ns, y3) plt.xlim([-4, 4]) plt.ylim([0, 0.7]) the output looks like: from wikipedia article, should like: i assume i'm making trivial mistake. :/ thoughts? thanks! edit: wrote equivalent scipy.special.ive(n, t) . i'm pretty sure it's supposed modified bessel fun...

jquery - Issue with waitforimages plugin -

a draganddrop website builder (weebly) i'm using using waitforimages plugin: https://github.com/alexanderdickson/waitforimages the background image on homepage of site loads intermittently (and rarely). i found uncaught type error waitforimages not function related to: $(document).ready(function() { $('.top-background-image').css('display', 'none') $('.top-background-image').waitforimages({ finished: function() { $(this).fadein(2000); } }); }); i'm out of depth thoughts on source of issue appreciated.

android - Return to app after requesting SYSTEM_ALERT_WINDOW permission -

my app requires permission draw on other apps work correctly, @ start of application check permission and, if needed, ask user grant it, start request via following code: intent intent = new intent(settings.action_manage_overlay_permission, uri.parse("package:" + activity.getpackagename())); activity.startactivityforresult(intent, request_overlay_permission); this requires user press button after enabling permission, i've noticed apps able automatically return or go activity after user enables it. how accomplished? there service listening in background periodically checking see if user has enabled something? it appears there no way observe setting, there no elegant solution this. what can check setting once per second using handler after send user settings screen. you can't "go back" programmatically settings screen, option re-launch activity , clear previous ones (otherwise go settings screen on press afterwards). with exampl...

node.js - require("electron").app is undefined. I npm installed fresh modules. Unsure what to do -

yesterday, developing on electron fine. hop onto computer realize electron isn't working @ now. i removed node_modules , did fresh npm install package.json: ... "devdependencies": { "devtron": "^1.4.0", "electron": "^1.4.7" }, "dependencies": { "electron-debug": "^1.1.0" } ... this error got. i followed suggestions used of previous issues of problem. nothing resolving it. electron not installed globally. should self contained in directory. npm list most of code taken electron boilerplate edit: main process: 'use strict'; const path = require('path'); const electron = require('electron'); const app = electron.app; // adds debug features hotkeys triggering dev tools , reload require('electron-debug')({ showdevtools: true }); // prevent window being garbage collected let mainwindow; function onclosed() { // dereference ...

unicode - Java Scanner Class bad character "®" -

i have scanner class reading file string. file character "®" causes fail. i'm new java, there better way read file character accepted? public void readfile(string filename) { filetext = ""; try { scanner file = new scanner(new file(filename)); while (file.hasnextline()) { string line = file.nextline(); filetext += line +"\r"+"\n"; } file.close(); } catch (exception e) { system.out.println(e); } } by default scanner uses platform default character encoding, might not match character encoding of file. javadoc states: constructs new scanner produces values scanned specified file. bytes file converted characters using underlying platform's default charset. first determine character encoding file in, can done linux command line utility file -i . pass correct encoding scanner. java 7 contains predefined constan...