Posts

Showing posts from September, 2013

android - Change Kontakt SDK time frame for updating beacon distance -

i've been trying use kontakt.io's sample android app implement simple app connect kontakt beacon , show beacon details. noticed beacons updating slow i.e. after 2 seconds , want update after 400 or 500 milliseconds when beacon device move here , there android screen should show distance in more fast way. following code scan activity.here getting majors of beacons , distances phone. , on update updating first index i.e. first beacon detected , getting distance updating slow private ibeaconlistener createibeaconlistener() { return new ibeaconlistener() { @override public void onibeacondiscovered(ibeacondevice ibeacon, ibeaconregion region) { log.i(tag, "onibeacondiscovered: " + ibeacon.getmajor() + " " + ibeacon.getdistance()); } @override public void onibeaconsupdated(list<ibeacondevice> ibeacons, ibeaconregion region) { log.i(tag, "onibeaconsupdated: " + ibeacons.get(0).getdistance()); } @override public voi

javascript - Error on success form , no url call -

i'm having problems regarding following code, working (form validation) ajax call never used .find('[name="turmas"]') .multiselect({ onchange: function(element, checked) { $('#eventform').formvalidation('revalidatefield', 'turmas'); } }) .end() .find('[name="doc"]') .multiselect({ enablefiltering: true, includeselectalloption: true, onchange: function(element, checked) { $('#eventform').formvalidation('revalidatefield', 'doc'); } }) .end() .find('[name="dpt"]') .multiselect({ enablefiltering: true, includeselectalloption: true, onchange: function(element, checked) { $('#eventform').formvalidation('revalidatefield', 'dpt');

c++ - typedef and multi-dimensional array -

#include <iostream> using namespace std; typedef int array[2]; int sum(array a[], int n) { int sum = 0; for(int = 0; < 2; i++) for(int j = 0; j < n; j++) sum += a[i][j]; return sum; } int main() { int n = 2, sum; array a[n]; for(int = 0; < 2; i++) for(int j = 0; j < n; j++) a[i][j] = * n + j; cout << sum(a, n) << endl; return 0; } it use typedef in global scope? use typedef declare multi-dimensional array, instead of a[][]? wiki

Where shoud I fix a C++ code about the template? -

when wrote c++ code , compiled clang++ compiler, error: expected expression template <typename t> ^ was represented. why did error appeared , how fix it? #include<iostream> using namespace std; int main() { template <typename t> t sum(t a, t b) { return a+b; } cout <<"sum = " << sum( 2.1, 7.9 ) << endl; return 1; } you cannot define function within main . move definition outside #include <iostream> template <typename t> t sum(t a, t b) { return + b; } int main() { std::cout << "sum = " << sum(2.1, 7.9) << std::endl; return 0; } wiki

php - Select from 2 MySQL tables in same statement -

i need select data 1 mysql table , match id query email address second table. output results. current code is: $sql = "select fk_i_user_id, i_amount osei_t_payment_pro_wallet i_amount > 0 order i_amount desc"; $rows = mysqli_query($conn, $sql); while ($rs = mysqli_fetch_array($rows, mysqli_assoc)){ $uid = $rs["fk_i_user_id"]; $cash = $rs["i_amount"] / 1000000; echo "user id - ".$uid." wallet val - ".$cash.chr(10).chr(13); } i incorporate in query: "select s_email osei_t_user pk_i_id =".$uid; and output results: echo "user id - ".$uid." wallet val - ".$cash." - email: ".(value above query).chr(10).chr(13); you can use join. use outer join if second table's record may not present: select fk_i_user_id,i_amount, s_email osei_t_payment_pro_wallet left outer join osei_t_user on pk_i_id=fk_i_user_id i_amount > 0 order i_amount desc the outer

Upload Videos on WeChat is failed -

i've been working on couple of days , can't seem find straight answer or example anywhere. can upload videos on safari browser, process compressed , uploaded browser automatically, cant on wechat (a chinese app), , upload byte null. appreciated. wiki

python - request.method == 'POST' is not working in Django -

i created form in template insert data in database form not working.when submitted form nothing happened.please review code , give me suggestion. add.html template file: <h2>add article</h2> <form action="" method="post"> {% csrf_token %} <label>title</label> <input type="text" name="title" placeholder="enter title"> <label>category</label> <select name="cate"> <option value="">select category</option> {% cat in %} <option value="{{ cat.cate }}">{{ cat.cate }} </option> {% endfor %} </option> </select> <label>discription</label>

eclipse - WSO2 DAS Toolings -

i'm trying out wso2 das , i'm looking tooling eclipse (mars) i'm using esb , registry. didn't figure out how on wso2 website. using or not existing @ all? thanks there no tool such deployment. wiki

terminal - zsh: no matches found: push[dev1] -

i running script ./ci.sh push[dev1] , response zsh: no matches found: push[dev1] . have tried place alias .zshrc not jolly joy. my .zshrc file: alias push='noglob push' alias git='noglob git' alias jake='noglob jake' alias task='noglob task' alias branch='noglob branch' alias gp='git push'` also the task jakefile.js: desc('push commits integration machine validation.'); task('push', ['status'], (branch) => { if (!branch) { console.log( 'this command push code integration machine. pass your\n' + 'branch name parameter (e.g., \'push[workstation_name]\').\n' ); fail('no branch provided'); } run([ 'git push origin ' + branch ], () => { console.log('\nok. current branch has been copied integration machine.'); complete(); }); }, { async: true }); and file ci.sh contains: #!/bin/sh . build/scripts/ru

python - How to split Vector into columns - using PySpark -

context: have dataframe 2 columns: word , vector. column type of "vector" vectorudt . an example: word | vector assert | [435,323,324,212...] and want this: word | v1 | v2 | v3 | v4 | v5 | v6 ...... assert | 435 | 5435| 698| 356|.... question: how can split column vectors in several columns each dimension using pyspark ? thanks in advance one possible approach convert , rdd: from pyspark.ml.linalg import vectors df = sc.parallelize([ ("assert", vectors.dense([1, 2, 3])), ("require", vectors.sparse(3, {1: 2})) ]).todf(["word", "vector"]) def extract(row): return (row.word, ) + tuple(row.vector.toarray().tolist()) df.rdd.map(extract).todf(["word"]) # vector values named _2, _3, ... ## +-------+---+---+---+ ## | word| _2| _3| _4| ## +-------+---+---+---+ ## | assert|1.0|2.0|3.0| ## |require|0.0|2.0|0.0| ## +-------+---+---+---+ an alternative solution create udf: fr

Extracting tags from a HTML with data hidden using python -

i'm trying learn scraping different webpages. tried scrape data page containing tabs follows: url = "https://www.bc.edu/bc-web/schools/mcas/departments/art/people/#par-bc_tabbed_content-tab-0" page = requests.get(url) content = page.content tree = html.fromstring(page.content) soup = beautifulsoup(content,"html.parser") p = soup.find_all('div',{"id":'e6bde0e9_358d_4966_8fde_be96e9dcad0b'}) print p this returns empty result though inspecting element displays content source page doesn't display data. pointers on how extract content. this because of javascript rendering, means data want doesn't come original request, requests generated javascript of response. to check requests generated original request, you'll have use developer tools in chrome. for particular case actual request need site , give information need. wiki

html - Keep Div Centered -

how make div stay in middle of page. how change size of div? html: <div id="text"> <p id="insidet"> hello </p> </div> css: #text{ position: absolute; width: 50%; font-size: 60px; text-align: center; color: black; height: 50%; display: inline-block; transform: translatey(-50%); top: 50%; margin: 0 auto; color: black; right: 320px; background: white; use absolute positioning, , transform centre div . dimensions not matter, until window size smaller div . .centred { height: 50px; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); width: 200px; } <div class="centred">i in centre of page</div> wiki

osx - macOS auto-renewing subscription: how to handle expiration properly? -

i have premium feature unlock implemented auto-renewed subscription in-app-purchase on macos. able test of correctly in macos sandboxed application: validate receipt locally, , parse receipt in-app-purchases. of iaps, can determine expiration time. what struggle if current time past expiration time. if time has passed, can mean following: 1) system auto-renewed subscription app doesn't know yet. code should "soon" getting called via callback registered @ launch time transactions in pending queue, telling me renewal. point can parse receipt again , enable premium features if needed. or 2) there no auto-renew (the user cancelled, apple wasn't able charge user, etc). won't call it. then question is: if detect expiration @ launch time, user experience supposed be? how long wait call back? the thing can think of doing putting kind of dialog "checking subscription..." few seconds. , after timeout, if didn't update via callback, assume sub

Is it possible to have a constant valued through a Spring Service? -

we have web service 1 of parameters called origin , origin validated against code in database. for each 1 of our services have validate code. code not change want keep in constant, still have validate prevent clients sending wrong code. basically want this: @service public class service { @autowired private logbs logbs; // know cannot used in static context. public static final long code = this.logbs.retrievelogwebservicecode("webservicename"); public void validateorigincode(final long origin) { if (!origin.equals(code)) { throw new serviceexception("wrong origin code!"); } } } i know similar can done spring caching, possible constant? i rather go this: @service public class codevalidatorservice { private logbs logbs; private long code; @autowired public codevalidatorservice(logbs logbs){ this.logbs = logbs; code = this.logbs.retrievelogwebservicecode("

how to add a javascript function in jsp page by passing a hidden field variable to the function -

i have java script function: function viewjunction(siteid, name{ } i want include function in jsp page in siteid should pass through url query parameter. get siteid request assuming siteidparmeter query parameter, , send function <% string querysiteid = request.getparameter("siteidparmeter");%> viewjunction('<%=querysiteid%>', 'yourname'); to put inside input: <input type="hidden" id="siteidinput" name="siteidinput" value="<%=querysiteid%>"/> wiki

javascript - How to show more than one images within a circle? -

i want show user profile photo in 60x60 circle. can did using single photo. have faced challenge while group profile's picture show in above mentioned circle. here need show pictures collage. please share suggestion. in advance. i don't think it's front-end js question,putting back-end more reasonable. different program language,there different ways. python:the images understand ndarrays (numpy package) ,joining images equals joining array. java: canvas.drawbitmap() draw them together. wiki

Load remote assets into React-native app WebView -

can react-native application fetch remote html/js/css/img files, save local , load in webview ? context: take example following app structure: ├── app.js ├── /remote-assets │ └── /foo │ ├── index.html │ ├── app.js │ ├── styles.js │ └── logo.jpg └── /local-assets ├── util.js └── background.jpg the idea app.js fetches assets directoy remote-assets , later loads index.html webview . html reference files in same local path, like: <script src="app.js"></script> <img src="logo.jpg" /> and assets local, example: <script src="../../local-assets/util.js"></script> <img src="../../local-assets/background.jpg" /> wiki

Python: Combine array rows based on difference between prior row's last element and posterior row's first element -

as title, given (n, 2) numpy array recording series of segment's start , end indices, example n=6: import numpy np # x records (start, end) index pairs corresponding 6 segments x = np.array(([0,4], # 1st seg ranges index 0 ~ 4 [5,9], # 2nd seg ranges index 5 ~ 9, etc. [10,13], [15,20], [23,30], [31,40])) now want combine segments small interval between them. example, merge consecutive segments if interval no larger 1, desired output be: y = np.array([0,13], # cuz 1st seg's end close 2nd's start, # , 2nd seg's end close 3rd's start, combined. [15,20], # 4th seg away prior , posterior segs, # remains untouched. [23,40]) # 5th , 6th segs close, combined so output segments turn out 3 instead of six. suggestion appreciated! if we're able assume segments ordered , none wholly contained with

Check the User Agent of the user that triggers a Google Tag Manager event -

i have datalayer event push in js , wondering if possible learn user-agent of users triggering event. you need create variable return user agent 1) go variables -> new 2) name: user agent 3) type: custom javascript 4) code: function () {return navigator.useragent;} then can use variable in tags {{user agent}} wiki

using IF statement to check if, dataStream has some values in Apache Flink -

Image
i generating warnings in cep follows // generating warnings datastream<joinedstreamevent> warning = patternstream.select( (map<string, joinedstreamevent> value) -> { joinedstreamevent joinedstreamevent = (joinedstreamevent) value.get("start"); return new joinedstreamevent(joinedstreamevent.getpatient_id(), joinedstreamevent.getheartrate(),joinedstreamevent.getrespirationrate()); }// map ); then printing warnings later console, however, want add if statement check, if complex event has been detected or not , perform tasks in if statement for instance, want print complex events detected follows , show complex events detected following code if( warning.tostring() != null){ system.out.println("complex events detected follows : -"); warning.print(); } here complex event 10,71,71 , output shown follows i assume logic check if data stream has val

python sphinx - How can I include images in my master toc? -

i'm creating documentation website using sphinx , make master toc fancy use of images. i'd display icon next to, or above, each entry in main table of contents. how can this? i have managed customize appearance of toc because noticed in chrome's inspector main content on index page has div wrapper id seems come name of project, allows me write css that's specific section. example, have this: #welcome-to-the-redacted-documentation-site.section ul li { display: block; padding: 16px; } what i'd each of li elements in toc display unique image. i have tried using substitution in document headers, mentioned in this answer . image appears fine in document itself, gets stripped out of toc. i have considered ways of doing css, every entry in toc uses same style, can't target individual toc entries in unordered list. maybe there way assign id toc entries? i use nth child pseudoselector, feels hacky since relies on toc entries being in order. seems css shou

Java: Testing a method with iterator -

my testing method failing. i'm not sure place in iterators place. null. how test when there iterator? here full main class works, searching through array , returns index of given number: public class main { public static void main(string[] args) { final list<integer> numbers = arrays.aslist(3, 4, 6, 1, 9); final integer x = integer.valueof(1); system.out.println(findsame(numbers.iterator(), x, 0)); } public static final int findsame(iterator<integer> iterator, integer x, int idx) { if (!iterator.hasnext()) { return -1; } if (iterator.next().equals(x)) { return idx; } else { return findsame(iterator, x, idx+1); } } } here testing trial method, not functional. @test public void searchnumreturnsindex1(){ main instance = new main(); system.out.println("index"); iterator<integer> iterator = null; int x = 6; int expresult = 2; int result = main.findsam

javascript - MySQL: date format changed when retrieving it by node.js -

i have made table personal information dob "date" type. when select entire table in terminal, shows correct format(yyyy-mm-dd). however, when created connection through node.js , output console, printed json object dob has hh-mm-ss behind actual date? for example 1 of column has dob "1996-03-06". however, when passed node.js server , printe console log, became "1996-03-0605:00:00.000z" what more strange when send information ajax print web, output this: wed mar 06 1996 00:00:00 gmt-0500 (est), different both actual data , data shown in console just print or send in ajax whatever need date object console.log(dob.toisostring().slice(0,10)) wiki

email - The account name@example.com sends mail to name2@example.com, but is not received by name2@example.com -

we xxxx company. have sister company, xyz, of tiecokuwait.com mail being used. since yesterday, have problem domain mails. mails send within tiecokuwait.com not being received. like, account xxx@domain.com sends mail xx@domain.com, not received xx@domain.com. there problem within tiecokuwait.com. how can resolve this? kindly find attached domain health report checked in mxtoolbox.com. wiki

c# - Show localized display name for MetaTable and MetaColumn in ASP.NET Dynamic Data website -

i'm using visual studio 2017 asp.net dynamic data project template create website database crud operations models. i'm setting displayname in database model's metatable , , can shown in asp.net dynamic data website, this: [scaffoldtable(true)] [metadatatype(typeof(itemmetadata))] public class itemmodel { public guid id { get; set; } ... ... } [displayname("thisismyitemmodeldisplayname")] class itemmetadata { [scaffoldcolumn(true)] [display(order = 1)] public guid id; [scaffoldcolumn(true)] [display(name = "thisisitemname", order = 3)] public string itemname; ... } it's good, website can reflect , show string i've put in, website need support different locale languages, created customized attribute allow pass in resource string key , [attributeusage(attributetargets.class | attributetargets.field, allowmultiple = false)] public class localizedisplayname : attribute { public localizedispla

java - custom maven archetype: default value for version not used -

in maven archetype definition, set default version 0.0.1-snapshot when user doesnt enter anything. however, when create project based on archetype, prompted version , default 1.0-snapshot. how do correctly? i defined version property in archetype.properties file , when compile archetype, says correct version , when change value in archetype.properties, can see console output changes accordingly. just on creating project based on archetype, prompted version again. thanks , tips! (i'll provide code if necessary) you can define custom properties in archetype metadata. have @ archetype-metadata.xml in meta-inf/maven . example: my-archetype | + src | + main | + resources | + meta-inf | + maven | + archetype-metadata.xml a custom property version this: <requiredproperties> <requiredproperty key="version"> <defaultvalue>0.0.1-snapshot</defaultvalue>

html - How to give priority between 2 !important -

in order keep css rule want div have add: "padding-left:70px!important" apply generally. but mobile, padding-left:0px. add media query of mobile size "padding-left:0px!important" so thought automatically when switching mobile size take css style inside media query 1 use both have!important. not happen, still keeps 75px padding. thanks css styles take most specific rule supply, make sure padding-left:0px!important rule still more specific 1 declaring padding-left:70px!important . if specificity identical, css use last rule defined, ensure mobile override appears after initial padding-left rule. this can check , understand specificity: https://www.w3.org/tr/css3-selectors/#specificity bonus: calculate selector specificity: https://specificity.keegan.st/ wiki

How to play Video ad in background using IMA framework in android? -

is there way play video ad in background playing audio service video in background. using ima framework show video ad in player. ios have [[imasettings alloc] init].enablebackgroundplayback variable control background play. there method similar or other workaround this? wiki

c++ - Compare vector iterator with integer -

string str = cpy[i].second; itr = find(v.begin(), v.end(), str); auto pos = distance(v.begin(), itr); //auto pos = itr - v.begin(); if(pos >= v.size() / 2) cout << str << " "; else cout << "-" << " "; here cpy vector of int , string pair, i.e, vector<pair<int,string>>cpy . above part gives error " pos not name type. ". how resolve it? you can change type of pos int. think compiler doesn't support auto. wiki

c# - WCF TCP Shared Services Enable Service Fails to Start -

in short, when go start worker process service process, fails , returns: the cs.connector.protean service on local computer started , stopped. services stop automatically if not in use other services or programs i remove attribute portsharingenabled="true" service model in config file , worker process service starts , executes expected. add attribute config , worker process services won't start again. have include service model config @ bottom of post. the net.tcp sharing service running, should intercepting incoming net.tcp connection. i have read msdn article, must missing somewhere. could doe mex end point not using port sharing binding? tried adding binding mex end point, still no joy. :.( help! <system.servicemodel> <bindings> <nettcpbinding> <binding name="tcpsecure" portsharingenabled="true"> <security mode="message" /> </binding>

database - Storing data from R to DB2 doesn't work -

i have strange issue db2 , r connectivity. can access db, can query data can't store r. use rodbc package of r. followed guide written here https://www.ibm.com/developerworks/data/library/techarticle/dm-1402db2andr/index.html technically package creates "insert into" statement r object , executes on db2 store data r. (i have necessary credentials execute these operations on database.) what tried following (i use r , squirrel - http://squirrel-sql.sourceforge.net/ - test more 1 way): creating test table 3 columns , 25 records squirrel. query table r. try save first record resulting dataset (from 2) same table. query table r - appended row. query squirrel. issue occures here, while i'm connected r , after insert. @ (4) see added record, cannot query squirrel (5). seems r has locked whole table. doesn't solved when disconnect db r, 2 error messages (i suspect these related). when quit r solved , can query table squirrel, appended record disappears. i trie

expression for GroupBy in entity framework -

i have class named employee , 1 method returns list of employee; public class employee { public int id { get; set; } public string name { get; set; } public string course { get; set; } public string score { get; set; } } and method : public static list<employee> getemployees() { var list = new list<employee>(); list.add(new employee { id=1, name="xx", course="c1", score="16"}); list.add(new employee { id=2, name="aa", course="c1", score="17"}); list.add(new employee { id=3, name="bb", course="c1", score="16"}); list.add(new employee { id=4, name="dd", course="c2", score="12"}); list.add(new employee {id=5, name="ee", course="c2", score="13"}); list.add(new employee { id=6, name="ff", course="c3", score="15"}); list.add(new employee { id=7, name="gg", course

html - Border size as 0.667 when set the border width as 1px in FireFox -

Image
in firefox browser alone , border size 0.6667 when set border width 1px div or input element or html element. please find below screenshot. i have given border in css inline style , via separate class same result. have not provided box model element. if given border size 2px working fine. problem on providing odd number. if give 1px => 0.6667 if give 3px => 2.6667 due above problem, calculation breaks in css level. can please provide solution resolve issue? whether browser issue? or else provide work around solution on this? thanks, gobalakrishnan wiki

apache - How to fix .htaccess RewriteRule conflict? -

i have conflict rewriterule .htaccess. rewriteengine on rewritebase / rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule . /index.php [l] rewriterule ^unsubscribe.php$/template/adcf.org/newsletter/unsubscribe.php rewriterule ^(unsubscribe)/?$ /$1.php [l,nc] this rewriterule . /index.php [l] conflict with rewriterule ^unsubscribe.php$/template/adcf.org/newsletter/unsubscribe.php rewriterule ^(unsubscribe)/?$ /$1.php [l,nc] please me fix it. your unsubscribe rule needs space between pattern , target more importantly need place these rules before catch-all index.php rule. can combine 2 last rules one: rewriteengine on rewritebase / rewriterule ^unsubscribe(?:\.php)?$ /template/adcf.org/newsletter/unsubscribe.php [l,nc] rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule . /index.php [l] wiki

r - Randomly remove duplicated rows using dplyr() -

as follow-up question one: remove duplicated rows using dplyr , have following: how randomly remove duplicated rows using dplyr() (among others)? my command is data.uniques <- distinct(data, keyvariable, .keep_all = true) but returns first occurrence of keyvariable. want behaviour random: anywhere between 1 , n occurrences of keyvariable. for instance: keyvariable bmi 1 24.2 2 25.3 2 23.2 3 18.9 4 19 4 20.1 5 23.0 currently command returns keyvariable bmi 1 24.2 2 25.3 3 18.9 4 19 5 23.0 i want randomly return 1 of n duplicated rows, instance: keyvariable bmi 1 24.2 2 23.2 3 18.9 4 19 5 23.0 just shuffle rows before selecting first occurrence (using distinct ). library(dplyr) distinct(df[sample(1:nrow(df)), ], keyvariable, .keep_all = true) wiki

python - Django: How to translate the models' fields -

i'm using internationalization of django translate web app. tutorial http://www.marinamele.com/taskbuster-django-tutorial/internationalization-localization-languages-time-zones but want know how translate fields of models internationalization of django or how can translate models' fields thanks lot! wiki

ios - AeroGear - value of type Http has no member 'POST' -

i'm following tutorial oauth 2 authentication, , it's little bit old changes may have been made files uses. trying make http post request using aerogear module. here's how function looks like: @ibaction func share(_ sender: anyobject) { // todo: turn code it! let googleconfig = googleconfig( clientid: "removed", // [1] define google configuration scopes:["https://www.googleapis.com/auth/drive"]) // [2] specify scope let gdmodule = accountmanager.addgoogleaccount(config: googleconfig) // [3] add accountmanager self.http.authzmodule = gdmodule // [4] inject authzmodule // http layer object let multipartdata = multipartdata(data: self.snapshot(), // [5] define multi-part name: "image", filename: "incognito_photo", mimetype: "image/jpg") let multipartarray = ["

Android date picker error -

Image
i develop android app , unfortunately in old devices not working ... set click listener on textview , show datepicker dialogue , in date picker code, setting date same textview . in activity : feild_age.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { dialogfragment fragment = new datepickerfragment(); fragment.show(getfragmentmanager(), "date picker"); } }); my code date picker fragment .... code in single activity. public static class datepickerfragment extends dialogfragment implements datepickerdialog.ondatesetlistener { @requiresapi(api = build.version_codes.n) @override public dialog oncreatedialog(bundle savedinstancestate) { final calendar calendar = calendar.getinstance(); int year = calendar.get(calendar.year); int month = calendar.get(calendar.month); int day = cal

vba - MDT Shell does not function -

i'm building nice custom shell functional microsoft deployment toolkit (mdt) environment. shell built visual studio 2016, visual basics. seems work fine how meant be, except process.start line. process.start("x:\deploy\scripts\litetouch.wsf", "/debug:yes /tasksequenceid:img /skiptasksequence:yes /backupfile:backup.wim /computerbackuplocation:network /backupshare:" + settingsform.textbox1.text + "\" + " /backupdir:" + +form1.combobox1.text + "\" + form1.datetimepicker1.value.toshortdatestring + "\" + form1.textbox1.text) this line returns unhandled error: conversion string "/debug:yes /tasksequenceid:img /" type 'double' not valid. what doing wrong, , how can fix problem? thanks in advance! bram wiki

QT Moving entire window by clicking on the menubar python -

this need in python. this python code moving window click&drag everywhere in window expect menubar created of this guy: #make window draggable in init self.oldpos = self.pos() def mousepressevent(self, event): #make window draggable clicking anywhere , drag self.oldpos = event.globalpos() def mousemoveevent(self, event): delta = qpoint (event.globalpos() - self.oldpos) self.move(self.x() + delta.x(), self.y() + delta.y()) self.oldpos = event.globalpos() hope can me convert c++ code python wiki

javascript - Iterate through table and create an array in js/jquery -

i want iterate through dynamically created table , create array of elements project name, client name, , field rate @ each index populate , pass through json object here how table looks: <table id="project-table" class="table table-striped table-hover"> <thead> <tr> <th>project name</th> <th>client name</th> <th>field rate</th> <th>delete row</th> </tr> </thead> <tbody> <%--jquery append our data here... --%> </tbody> </table> <button type="button" onclick="projecttable()" class="btn btn-primary">add row</button> function projecttable() { projectrows = projectrows + 1; var $tbody = $('#project-table').find('tbody'); var $id = $(""); var $tr = $("<tr>"

r - JSONLITE parsing not working on large JSON file but works on smaller one -

i have small bit of code top import json data data frame. works fine: library(jsonlite) library(tidyr) ts01 <- fromjson({"ts01data.json"}, flatten = true, simplifydataframe = true) ts01 <- ts01[, c("sid", "t","lat","lon","alt","v","sat","brg","pa","pt","tprx","lnks")] ts01unnested <-unnest(ts01,lnks) when try , import small json file in format, works fine (4 mb). when import large json file (1 gb). following: error in parse_con(txt, bigint_as_char) : lexical error: invalid char in json text. tprx": 1452169.0, "sat": 7}, downloading... {"pt": 120, "lnk (right here) ------^ this doesn't make sense me format of both json datasets same. wiki

php - Get inaudible phrases in file_get_contents() -

Image
i'm going source code following page. http://www.yjc.ir/fa/rss/allnews i run code im server : $opts = [ "http" => array( "method" => "get", "header" => "accept-language: en\r\n" . "cookie: foo=bar\r\n" ) ]; $context = stream_context_create($opts); echo $file = file_get_contents('http://www.yjc.ir/fa/rss/allnews', false, $context); but gets source code below : this page when run in browser correct. when file_get_contents or curl incorrect. please me. thank you wiki

.net - Imports Error In Visual Basic ASP.NET Project -

i setting local environment of project given source code. having setup iis7 , site in it, following error when visit localhost in browser: compilation error description: error occurred during compilation of resource required service request. please review following specific error details , modify source code appropriately. compiler error message: bc30002: type xxxlibrary.xxx_objectmanager' not defined. source error: line 5: inherits system.web.ui.masterpage line 6: line 7: dim xxxmanager xxxlibrary.xxx_objectmanager line 8: line 9: protected sub page_load(byval sender object, byval e system.eventargs) handles me.load having looked resembling xxxlibrary.xxx_objectmanager name structure, found separate project(repository) called xxxlibrary following structure: xxxlibrary/objectmanager/xxx_objectmanagermain.vb there other .vb files there, xxx_objectmanagermain.vb contains following class partial public class xxx_objec

php - SQLSTATE [42000] when adding data -

when parsing xml file , adding database, displays error during script operation: $sql->exec("insert 'example' values('$id', '$title', '$link')"); sqlstate[42000]: syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mysql server version right syntax use near ''example' values('phpmysqljquery-przeciagnij-z-wy' @ line 1 can wrong? you're using wrong quoting style. database, table , column identifiers use different approach: insert `example` values (?,?,?) double , single quotes only strings. can't insert stuff string. wiki

javascript - react-redux with thunk - getState is not a function -

i'm receiving error typeerror: getstate not function i'm attempting similar example @ http://redux.js.org/docs/advanced/asyncactions.html action.js - error occurs here export const fetchcategoriesifneeded = (dispatch, getstate) => { if(shouldfetchcategories(getstate())){ return dispatch(fetchcategories()) } } app.js componentdidmount(){ this.props.dispatch(fetchcategoriesifneeded()) } ... const mapstatetoprops = (state, props) => { return { isfetching: state.isfetching, categories: state.categories } } reducer.js function data (state = initialstate, action){ switch(action.type){ case receive_categories: return { ...state, isfetching: false, categories: action.categories } case request_categories: return { ...state, isfetching: true } default: return

javascript - Remove "NaN" keyword from undefined object output -

please check code bellow. on modal opening output value displays "nan" until provide input. want display blank field on output until provide input. how can achieve that? possible? happy coding all. please add bootstrap , jquery test code. thanks. <!doctype html> <html> <head> <title>test</title> </head> <body> <!-- trigger modal button --> <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#mymodal">open modal</button> <!-- modal --> <div id="mymodal" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <

Exchanging array between Fortran and C -

i have following c , fortran code exchange data function exchange_data(data) bind(c,name='exchange_data') use iso_c_binding integer(kind=c_int) :: exchange_data real(kind=c_double), intent(inout), dimension(*) :: data end function exchange_data .... write(*,*), "sent data c" i=1,numbl j=1,windspeedcoordnr write(*, fmt2), global_coord_along_beam(i, j, :) end end cflag = exchange_data(global_coord_along_beam) write(*,*), "received data c" i=1,numbl j=1,windspeedcoordnr write(*, fmt2), global_coord_along_beam(i, j, :) end end and following test c code: int exchange_data(double* positions) { printf("received data fortran"); bladepositions = positions; (int = 0; < numbld; i++) { (int j = 0; j < datapointnr; j++) { printf("["); (int k = 0; k < 3; k++) { printf("%5.4f ", bla

javascript - dynamic svg in html5 -

i expected svg nodes first class citizen in html5 unexpected behavior (under firefox 55.0.2 , chrome 54.0.2840.71). in following html file, expect big circle dynamically added newly created svg element. instead : the inspector tells me dom correctly modified nothing displayed when copy paste dom (copy -> outer html, script deleted) in new file, resulting static html file fine. what miss ? why have discrepancy between dom , rendered version of ? how can correct ? re-draw ? when use ns suffixed versions of functions (ie. createelementns , setattributens) similar results , nothing rendered. here culprit: <!doctype html> <html> <head> <meta charset="utf-8"> <title>bug dynamic svg</title> <script type="text/javascript"> element.prototype.grow = function (tag, attribute_map) { var child = document.createelement(tag); if ( attribute_map !== undefined ) { (let key in attribute_map)

Android 8.0 Oreo crash on focusing TextInputEditText -

after updating of our devices android 8.0 , upon focusing on textinputedittext field inside of textinputlayout , app crashes exception : fatal exception: java.lang.nullpointerexception: attempt invoke virtual method 'void android.view.view.getboundsonscreen(android.graphics.rect)' on null object reference @ android.app.assist.assiststructure$windownode.(assiststructure.java) @ android.app.assist.assiststructure.(assiststructure.java) @ android.app.activitythread.handlerequestassistcontextextras(activitythread.java:3035) @ android.app.activitythread$h.handlemessage(activitythread.java:1807) @ android.os.handler.dispatchmessage(handler.java:105) @ android.os.looper.loop(looper.java:164) @ android.app.activitythread.main(activitythread.java:6541) @ java.lang.reflect.method.invoke(method.java) @ com.android.internal.os.zygote$methodandargscaller.run(zygote.java:240) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:767) when go android settings -> system -> l

javascript - Dropdown field that changes upon location -

first , foremost, know must simple not seeing how need do. need on 2 vanilla js form dropdown fields list array of locations, , dates pertain them. second drop-down need show selected group of 'course dates'. because of locations have varying dates of service, second drop-down need change upon first initial selection. i have html , js below, don't know how link 2 together. if 1 provide me operational drop-down fields change upon location selected, or jsfiddle, extravagant. the html of have far (im not sure how create dropdown 'dates') <select class="form-control" id="campus" name="campus" required="" title="campus"> <option value="aimnat" style="alignment-adjust:middle;" selected="selected">select nearest location</option> <option value="ama">atlanta, ga</option> <option value="amd">dallas, tx</