Posts

Showing posts from August, 2012

ios - Where can I download older version AWS-Mobile-SDK -

i need aws sns 2.5.5 sdk ios, can download 2.5.9 version @ official page https://aws.amazon.com/tw/mobile/sdk/ i have read release notes there no link different version sdks. so try build source code in github https://github.com/aws/aws-sdk-ios , xcode settings may not same ci of aws using. does know how download older version mobile sdk ios? i able download using : http://sdk-for-ios.amazonwebservices.com/aws-ios-sdk-2.5.5.zip

r - Creating a unique ID variable as combination of variables -

i have data frame ( df ) or data table ( dt ) with, let’s 1000 variables , 1000 observations. checked there no duplicates in observations, dt[!duplicated(dt)] has same length original file. i create id variable observation combination of of 1000 variables have. differently other questions don’t know variables more suitable create id , need combination of, @ least, 3 or 4 variables. is there package/function in r me efficient combination of variables create id variable? in real example struggling create id manually, , not best combination of variables. example mtcars: require(data.table) example <- data.table(mtcars) rownames(example) <- null # delete mtcars row names example <- example[!duplicated(example),] example[,id_var_wrong := paste0(mpg,"_",cyl)] length(unique(example$id_var_wrong)) # wrong id, there 27 different values variable despite 32 observations example[,id_var_good := paste0(wt,"_",qsec)] length(unique(example$id_var_good)) #

javascript - Validation disappears on autopostback -

i validating control using javascript function. cannot use validators available in asp. s working fine when radio button postback rest of validation disappear. here validation code function validateform() { var validate = true; var summary = document.getelementbyid("<%=summary.clientid%>"); if (summary.value == "") { summary.style.backgroundcolor = "yellow"; validate = false; } if (validate == false) { alert('please fill highlighted fields'); } return validate; here button code validate <asp:button id="button1" runat="server" onclick="button1_click" text="submit" onclientclick="return validateform();" /> here radio button code <asp:radiobutton id="submitter" text="submitter&quo

scala - How to print last n lines of a dstream in spark streaming? -

spark streaming dstream print() displays first 10 lines val filedstream = ssc.textfilestream("hdfs://localhost:9000/abc.txt") filedstream.print() there way last n lines considering text file large in size , unsorted ? if this, simplify to: filedstream.foreachrdd { rdd => rdd.collect().last } however, has problem of collecting data driver. is data sorted? if so, reverse sort , take first. alternatively, hackey implementation might involve mappartitionswithindex returns empty iterator partitions except last. last partition, filter elements except last element in iterator. should leave 1 element, last element. or can try filedstream.foreachrdd { rdd => rdd.top(10)(reverseordering) }

java - How to dependency inject runtime arguments from static main method -

i have cucumber jvm + selenium scripts. main method this, public static void main (string args[]) { environment.environmentvalue = args[0]; path.pathvalue = args[1]; username.superuser = args[2]; returncode = main.run( new string[] { "-g", "com.sanity.step.definition","-t", "@" +path , featurefile.replace("\\", "\\\\") }, separateclassloadertestrunner.class.getclassloader()); } i have constructor class, i.e public class cucumberrunner; private classutility environment; private classutility pathval; private classutility username; public cucumberrunner(classutility environment , classutility pathval, classutility username) { this.environment = environment; this.pathval=pathval; this.username= username; } this classutility class, public class classutility { public string environme

javascript - Gulp livereload SyntaxError: Unexpected token . how to fix? -

when run gulp command error blow up if have ideas how fix this, i'm ready listen)) ! if have ideas how fix this, i'm ready listen)) > c:\users\p.a.n.d.e.m.i.c\desktop\try\gulpfile.js:19 > .pipe(livereload()); > ^ syntaxerror: unexpected token . > @ createscript (vm.js:56:10) > @ object.runinthiscontext (vm.js:97:10) > @ module._compile (module.js:542:28) > @ object.module._extensions..js (module.js:579:10) > @ module.load (module.js:487:32) > @ trymoduleload (module.js:446:12) > @ function.module._load (module.js:438:3) > @ module.require (module.js:497:17) > @ require (internal/module.js:20:19) > @ liftoff.handlearguments (c:\users\p.a.n.d.e.m.i.c\appdata\roaming\npm\node_modules\gulp\bin\gulp.js:116:3) there full code of gulpfile.js var gulp = require('gulp'); var concatcss = require('gulp-concat-css'); var cleancss = require('gulp-clean-css'); var conca

How to refresh data from view without refreshing the whole page? angular -

i'am new angular 4 , i'm trying make website can show users logs. problem how can new data database , show angular page without refreshing page. friends told me use ajax, there built in solution in angular can solve problem? code on service import { injectable } '@angular/core'; import {http,headers} '@angular/http'; import * _ 'underscore'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/do'; import 'rxjs/add/operator/topromise'; import {tokennotexpired} 'angular2-jwt'; @injectable() export class pagerservice { authtoken:any; constructor(private http:http) { } getzip(){ //gets data matches users zipcode var headers = new headers(); this.loadtoken();//access token headers.append('authorization',this.authtoken); headers.append('content-type','application/json'); return this.http.get('http://localhost:3000/logs/getbyname'

extjs5 - Disable text drag in a Textfield using ExtJS -

Image
my requirement have disable text drag , drop 1 textfield other.however, manual copy , paste should allowed. me.commentstext = ext.widget('textfield',{ maxlength: 40, enforcemaxlength:true, selectonfocus : true, fieldstyle: { 'font': 'normal 13px roboto' } } please kindly advise. you can prevent drag , drop copy pasteing removing data passed along drag , drop series of events. extjs doesn't expose these events form fields, have grab ext.dom.element textfield , attach there. should give option of discarding data transported via drag before dropped new field. see below example: me.commentstext = ext.widget('textfield',{ maxlength: 40, enforcemaxlength:true, selectonfocus : true, fieldstyle: { 'font': 'normal 13px roboto' } }); me.commentstext.getel().on('drop', function(event) {

visual studio code - VSCode. Run integrated terminal with command like autorun -

i use atom editor 'terminal plus' package, , autorun command terminal (powershell): cd .venv\scripts\; .\activate; cd ../../src this command activates virtual environment , return src folder. i don't find option autorun in vscode, how can this? i'm not familiar virtualenv following command worked me. cd src; code index.js; cd public; cd ../..; you don't need extension performing autorun command.vscode terminal has feature in built. you can check here features of integrated terminal in vscode

python - Calculating number of black pixels per row and column of an image -

i new opencv , python.i want calculate total number of black pixels per row , per column of image.can give hint or help? as miki suggests, can take advantage of cv2.reduce . use numpy.where create mask containing 1 black pixel was, , 0 other intensity. now call cv2.reduce twice (once per axis), performing reduce_sum , , setting output data type 32 bit integer. code: import cv2 import numpy np # make random image img = np.zeros((128,128),np.uint8) cv2.randu(img, 0, 256) mask = np.uint8(np.where(img == 0, 1, 0)) col_counts = cv2.reduce(mask, 0, cv2.reduce_sum, dtype=cv2.cv_32sc1) row_counts = cv2.reduce(mask, 1, cv2.reduce_sum, dtype=cv2.cv_32sc1) print "column counts: ", col_counts.flatten().tolist() print "row counts: ", row_counts.flatten().tolist() sample output: column counts: [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 1, 1, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0,

java - Textfields inside table cells losing textproperty in Javafx -

Image
i inserted textfields in table cells shown below, and gave textproperty qty,sqf,rate columns(see image). each row inserted pressing enter button keyboard. when enter values in qty,sqf etc. doing calculations , result shown in last column. when inserted first row, .textproperty working correctly , getting calculated value in last column. same thing working other rows too... but problem that, after inserting row2 textproperty of row1 not working. similary textproperty of row1 , row2 not working when inserted row3.means textproprty working last inserted row. why? , how can correct that. calling textproperty function in initialize() function.

I need advice how to structure database for storehouse management with C# MySQL Server -

this question focused on getting idea how structure database. there not going code posted. please don't mark questions "too broad" since case specific , need answer specific case. i trying make software managing stores. lets have storehouse can keep lots of products different types. lets focus on types tech (laptops, mobile phones, pcs) , clothes ( jackets, dresses, shoes). i have different sections in storehouse storing tech products , clothes. since have lots of different types of products , think 1 table wont satisfy needs. if create new table every type need hold products location. means have lots of tables check products when collecting data storehouse , doesnot seem best solution. if use mongodb create 1 table product , not worry since can add properties wish , have collection called storehouse sections have products. in mysql database don't think having big tables lots of properties best solution. the biggest problem have full freedom create databas

php - Retrieve data from pivot table in laravel -

i new laravel. want show category a,b,c article id(1). showing id numbers 1,2,3 article id(i). spend few hours solution failed. want know how code correctly. , question is right way insert array db using implode(). category table -------------------- | id | category | | 1 | | | 2 | b | | 3 | c | | 4 | d | | 5 | e | -------------------- article_category ( pivot table ) ---------------------------- | article_id | category_id | | 1 | 1 | | 1 | 2 | | 1 | 3 | | 2 | 1 | | 2 | 5 | ---------------------------- html @foreach( $categories $category ) <input type="checkbox" name="category[]" value="{{ $category->id }}" checked>&nbsp;{{ $category->category }}&nbsp;&nbsp; @endforeach laravel store public function store(request $request) { $validator = validator::make($req

reactjs - Store does not have a valid reducer. react redux -

i'm having problem above, tried this , no luck. here's store: import { compose, combinereducers, applymiddleware, createstore } "redux"; import thunkmiddleware "redux-thunk"; import * activities "../reducers/activities"; import * location "../reducers/location"; const configurestore = railsprops => { const composedstore = compose( applymiddleware(thunkmiddleware), window.__redux_devtools_extension__ && window.__redux_devtools_extension__() ); const combinedreducers = combinereducers({ location, activities }); return composedstore(createstore)(combinedreducers, railsprops); }; export default configurestore; here's location reducer: import { combinereducers } "redux"; import * actions "../constants/constants"; const coordinates = (state = {}, action) => { switch (action.type) { case actions.get_location_success: case actions.get_location_request: c

Open PDF saved in the device using a webview inside the application in android -

i trying open created pdf ( saved @ specified folder in device). able show in external pdfviewers using intents. based on requirement have show inside application can through webview or other method. far have tried open google docs , open pdf using pdf.js nothing working me. pdf viewer seemed nice solution, covers full activity screen , need show pdf in small part of whole screen. need help.thanks in advance.

performance - How to setup Selenium webdriver in Eclipse and Linux -

i try code (web driver every thing , update java also). try code in windows , it's working fine, linux can't. how can fix error? import java.util.concurrent.timeunit; import org.openqa.selenium.webdriver; import org.openqa.selenium.firefox.firefoxdriver; public class openfire { public static void main(string[] args) { webdriver driver = new firefoxdriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlywait(25, timeunit.seconds); driver.get("https://www.easybooking.lk/"); } } the output is: exception in thread "main" java.lang.illegalstateexception: path driver executable must set webdriver.gecko.driver system property; more information, see https://github.com/mozilla/geckodriver. latest version can downloaded https://github.com/mozilla/geckodriver/releases @ com.google.common.base.preconditions.checkstate(preconditions.java:738) @ org.openqa.selenium.remote.service.d

java - How to set Retrofit response body data in Listview -

in daata function try fetch data server. fetched, data cant set in arraylist list<flowerlistmodel>flowerlistmodels=new arraylist<>(); cause want set flowerlistmodels data in floweradapter , show in listview public void daata() { call<list<flowerlistdata>>listcall=apiinterface.getflowers(); listcall.enqueue(new callback<list<flowerlistdata>>() { @override public void onresponse(call<list<flowerlistdata>> call, response<list<flowerlistdata>> response) { log.d("datacheck",new gson().tojson(response.body())); list<flowerlistmodel>flowerlistmodels=new arraylist<>(); floweradapter floweradapter = new floweradapter(getapplicationcontext(),flowerlistmodels); listview.setadapter(floweradapter); } @override public void onfailure(call<list<flowerlistdata>> call, throwable t) { toast.

c++ - cpp: catch exception with ellipsis and see the information -

i know can catch "all exceptions" , print exception try { //some code... }catch(const std::exception& e) { cout << e.what(); } but exceptions derived std::exception. wondering if there way information ellipsis catch try { //some code... }catch(...) { // ?? } if mechanism same ellipsis functions should able casting argument of va_list , trying call what() method. i haven't tried yet if knows way i'd excited know how. sorry, can't that. can access exception object in catch block specific exception type.

php - Missing Required Parameter in Yii2 Gridview Action Button -

Image
i'm trying add own action button in yii2-kartik gridview. custom button: this code in index.php [ 'class' => 'yii\grid\actioncolumn', 'template' => '{edit}', 'buttons' => [ 'edit' => function ($url, $model) { return html::a('<button type="button" class="btn btn-edit-npwp"><i class="glyphicon glyphicon-plus-sign"></i></button>', $url, [ 'title' => yii::t('app', 'edit'), 'data-toggle' => "modal", 'data-target' => "#mymodal", 'data-method' => 'post', ]); }, ], 'urlcreator' => function ($action, $model, $key, $index) { if ($action === 'edit') { $url = url::toroute(['vatout-faktur-out/add-data', 'id' => $mod

python - django - aggregate json field specific keys and order by the aggregation -

have model field data of type jsonfield django.contrib.postgres.fields . json structure so: {'aa': 1, 'bb': 2, 'cc': 4} i want aggregate sums of aa , cc keys - in case, 5. - cannot promise either aa or cc in json. possible? if - want order aggregated data. example: id: 1, data = {'aa': 1, 'bb': 2, 'cc':4} id: 2, data = {'aa': 3, 'bb': 2} id: 3, data = {'cc': 7} id: 4, data = {'bb': 7} i want query, like: mymodel.objects.aggregate(my_sum).order_by(my_sum) after aggregation ordered rows in queryset be: id: 3 id: 1 id: 2 id: 4 thanks! yourmodel.objects.annotate(aa=rawsql("((data->>'aa')::int)", (0,)), cc=rawsql("((data->>'cc')::int)", (0,))) \ .aggregate(total=sum('aa')+sum('cc')).order_by('total')

javascript - How to use two ng-modal in one input type in Angular js? -

i using angular js. , implementing input checkbox, checkbox checked default angular controller using ng-model: controller: var checkboxval = true; $scope.checkboxmodel = { value : checkboxval, } $scope.call = function(){ alert("--comes--"); if($scope.checkboxmodel== false) { } if($scope.mycheckbox== true){ } } html: <input type="checkbox" ng-model="checkboxmodel.value" data-ng-change="call();"/> but when call function "call()" not coming in if condition because $scope.checkboxmodel undefined. when use ng-model="checkboxmodel" coming in if condition true , false. want use both set true value in ng- model="checkboxmodel.value" , compare checkbox value after calling call() function. you don't need 2 ng-models. change condition since want evaluate based on ng-models value if($scope.checkboxmodel.value )

go - golang leveldb get snapshot error -

i leveldb's key-val map[string][]byte, not running expection. code below package main import ( "fmt" "strconv" "github.com/syndtr/goleveldb/leveldb" ) func main() { db, err := leveldb.openfile("db", nil) if err != nil { panic(err) } defer db.close() := 0; < 10; i++ { err := db.put([]byte("key"+strconv.itoa(i)), []byte("value"+strconv.itoa(i)), nil) if err != nil { panic(err) } } snap, err := db.getsnapshot() if err != nil { panic(err) } if snap == nil { panic("snap shot nil") } data := make(map[string][]byte) iter := snap.newiterator(nil, nil) iter.next() { key := iter.key() value := iter.value() data[string(key)] = value } iter.release() if iter.error() != nil { panic(iter.error()) } k, v := range data { fmt.println(st

javascript - Highchart x and y axes data from json -

here js fiddle : demo i plotting differences of timestamps in multiple series reading data json. how plot "timestamp","timestamp2","timestamp3" against "tempersensordata" instead of steps? var processed_json = new array(); //ts1 var processed_json1 = new array(); //ts2 // populate initial series (i = 0; < data.length; i++){ processed_json.push(data[i].timestamp/1000); processed_json1.push(data[i].timestamp2/1000); }

xcode9 beta - How to mark methods to be invoked only from the main thread in Obj-C? -

i'm experimenting new xcode 9 main thread checker this pretty neat. i'd mark / annotate obj-c methods invoked main thread main thread checker can kick-in automatically when attached debugger. can't find way this. you can't (see update). use assert manually (like pspdfkit example ) assert(thread.ismainthread, "method must called mainthread only!") update: there's no way. tweet employee : unfortunately not; cannot teach main thread checker apis (cc @kubamracek) by @zaks_anna (program analysis @apple) update2: there's open radar being tracked apple, id#32659599. hopefully, implemented soon™.

java - PrintWriter append method not appending -

the following method writes out latest item have added, not append previous entries. doing wrong? public void addnew() { try { printwriter pw = new printwriter(new file("persons.txt")); int id = integer.parseint(jtextfield.gettext()); string name = jtextfield1.gettext(); string surname = jtextfield2.gettext(); person p = new person(id,name,surname); pw.append(p.tostring()); pw.append("sdf"); pw.close(); } catch (filenotfoundexception e) {...} } the fact printwriter 's method called append() doesn't mean changes mode of file being opened. you need open file in append mode well: printwriter pw = new printwriter(new fileoutputstream( new file("persons.txt"), true /* append = true */)); also note file written in system default encoding. it's not desired , may cause interoperability problems, may want specify file encoding explicitly.

android - How to prevent the app from getting paused when killed in ionic 2 -

i have app in function called every minute (calling function every minute done through setinterval method).i have implemented local notificaiton inside function.so after every minute call function , show notification.i able see notification after every minute , happens when app running or when minimized ,but when close app function not getting called. i've used background mode plugin not working when app killed or cleared. code : import { component } '@angular/core'; import { navcontroller } 'ionic-angular'; import { localnotifications } '@ionic-native/local-notifications'; import {backgroundmode} '@ionic-native/background-mode'; import {http,requestoptions,headers} '@angular/http' @component({ selector: 'page-home', templateurl: 'home.html' }) export class homepage { count:any; content= "yashwanth" constructor(public navctrl: navcontroller,public http: http,public backgroundmode: backgroundmode,pr

javascript - SelectBoxIt only works on first instance of class -

i using selectboxit style selects , works fine if used id's them if use classes, although styles them ok, of options affect first element class. i trying when form submitted selects reset first 1 does. i have tried using jquery reset element $("input[name=positioning]").val($("input[name=positioning] option:first").val()); but reset orignal select hiding beneath styled version value showing not value selected. i've tried... $(".exposure, .patient, .equip, .unit, .taken, .pathology, .pathway").selectboxit('selectoption', 0); only targets first element $(".exposure").selectboxit('selectoption', 0); $(".patient").selectboxit('selectoption', 0); again targets first element $(".exposure, .patient, .equip, .unit, .taken, .pathology, .pathway").each(function(){ selectboxit('selectoption', 0); }); doesn't work @ error selectboxit not defined everything wor

php - My post falls between two If statements, what can I do? -

currently i'm trying filter out various things meta portion of wordpress website, , i've found issue, using following code working until needed bit more specific. if (is_singular('post')) { $title = get_the_title (); print '<title>'.$title.'</title>'; $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->id) ); print '<meta property="og:image" content="'.$feat_image.'"/>'; print '<meta name="description" content="" />'; } else { print '<title></title>'; print '<meta name="description" content="" />'; } note edited meta descriptions above they're empty, sake of posting on stack. then wanted start filtering based on tags post has, , going conflict declared (is_singular('post')) function above. however, used

java - Prepared statement execute query error (com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException) -

i have written simple method string out of database: public string getuserstring(int id, string table, string column) { string output = null; try { string sql = "select ? ? id=?;"; preparedstatement preparedstatement = getconnection().preparestatement(sql); preparedstatement.setstring(1, column); preparedstatement.setstring(2, table); preparedstatement.setint(3, id); resultset resultset = preparedstatement.executequery(); while (resultset.next()) { output = resultset.getstring(column); } } catch (sqlexception e) { e.printstacktrace(); } return output; } but when try use this: coremysql.getuserstring(1, "economy", "balance"); i error: https://pastebin.com/bmamn4xh you can't set table name , column names setxxx method(s) preparedstatement . can used set values. however, can simple string replace substitute table names , colum

podio - The app with id 18773310 does not have the right view on embed with id 236341360 -

the app id 18773310 not have right view on embed id 236341360 trying sent images podio directly error. the following snippet of error receive podioforbiddenerror array ( [error_parameters] => array ( ) [error_detail] => [error_propagate] => [request] => array ( [url] => http://api.podio.com/item/app/18773310/ [query_string] => [method] => post ) [error_description] => app id 18773310 not have right view on embed id 236341360 [error] => forbidden ) any of indication helpful.

jquery - Best practice for event handling with JavaScript -

what's best practice event handler? i'm unsure if should put buttons function trigger or if should, jquery, wait button's on click event. usually can this: $('.buttonok').on('click', function(){ alert('ok'); }); or add on button javascript:buttonaction(). which should prefer? short answer: first way. event delegation way more performant, requires conditionals in code, it's complexity versus performance tradeoff. longer answer: small number of elements, adding individual event handlers works fine. however, add more , more event handlers, browser's performance begins degrade. reason listening events memory intensive.

sftp - Using python's pysftp package, I receive an OSError when trying to upload a file -

i using python 3's paramiko package establish sftp connection , upload files. i able establish connection server following code. import paramiko key_file_test = './path_to_key_file/key_file.pub' download_uat = { "username": "xxxxxxxx", "password": "xxxxxxxx" } uat_ftp_site = 'sftp-test.site.com' transport = paramiko.transport((uat_sftp_site,22)) transport.connect(username=download_uat['username'], password=download_uat['password']) transport.add_server_key(key) sftp = paramiko.sftpclient.from_transport(transport) print(sftp.listdir()) ''' ['archiv'] ''' sftp.put('test_sftp_upload_file.txt', remotepath='./') however, when run last line above following error output. --------------------------------------------------------------------------- oserror traceback (most recent call last) <ipython-input-69-bec3

Override CMD+N or CTRL+N shortcuts in javascript/jquery? -

i'm working on web app , want override ctrl+n (windows) cmd+n (mac) shortcuts don't open new windows. want custom events trigger. $(window).bind( 'keydown', function(e) { if(e.ctrlkey && e.keycode === 'n'.charcodeat(0)){ e.preventdefault(); // custom trigger } }); thanks help! plz try 1 <script> window.addeventlistener('keyup', function(e) { if (e.keycode === keycode.key_return) { console.log('it return key.'); } else { console.log('it other key.'); } }); <script> or <!doctype html> <html lang="en"> <head> <title>bootstrap example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https:/

jquery - How to use json array in ajax ? (java) -

this question has answer here: how use servlets , ajax? 7 answers i have servlet returns json data : {"type1":"value1","type2":"value2"}{"type1":"value3","type2":"value4"} and want data draw table inside html, using ajax: function showtable() { $.ajax('../json', { method: 'get', success: function (users) { var result = "<tr>" + "<th>type1</th>" + "<th>type2</th>" + "</tr>"; (var = 0; < users.length; i++) { result += "<tr>" + "<td>"+users[i].type1+"</td>" + "<td>"+users[i].type

Excel VBA: Can't create sheets on called another Excel file -

the goal open excel file parameters first / main file , call macro creates 1 or n new sheets data database, excel won't create new sheets in second file , other logic fails. you can find sample code 2 files below. when b file opened manually , called tst() sub, works, not when first file opens second file. workbooks not protected, i'm using ms excel 2010. a_file.xlsm main file user calls getfile open file , run readparams macro. code located in modules. sub getfile(filename string) dim filepath, par1, par2, currentuser string dim targetfile workbook currentuser = createobject("wscript.network").username filepath = "c:\users\" & currentuser & "\documents\excel_apps\" par1 = "use_r_one" par2 = "some_val" application.screenupdating = false set targetfile = workbooks.open(filepath & "b_file.xlsm") application.run "'" & targetfile.name & "

screen readers - skip link accessibility - alternate solutions for dynamic pages -

i trying build our site accessible. means needs skip link screen-readers can use effectively. the usual way build skip link intra-page anchor, wit: <div id="skip-to-content"> <a href="#content-start" class="">skip main content</a> </div> ... <div class="content-body" id="#content-start"> this links url mysite/thispage#content-start . unfortunately, because of way server-side implemented (which won't bother going into) hard links won't work. hitting mysite/thispage reloads page , not scroll. rather trying negotiate back-end guys re-engineer how site built. i'd find way back-end independent. and has supported screen-readers. i'm pretty sure using jquery's scrollto or scrollintoview document.queryselector('.hello').scrollintoview({ behavior: 'smooth' }); will not work in screen readers. can suggest alternate ways of linking content within pa

java - Oracle WebCenter Content Remote Intradoc Client 12.2.1 -

i have been looking on oracle website library(jars) oracle webcenter content remote intradoc client (12.2.1) , can find api reference not jar files download. upgrading application using 11g version of ridc prefer use newer version rather older one. can find references 12.2.1 version in lot of oracle documentation it. any appreciated. i maintain maven repo here . can download jar file directly there via files tab.

Dart and RabbitMQ bind exchange -

Image
i use stomp package , , wrote test: test('can subscribe , send events mq server', () async { stompclient client2 = await serverclient.connect(mqip, port: mqport, login: login, passcode: password); client2.sendjson('domain changed', {'a':'b'}); client2.disconnect(); streamcontroller controller = new streamcontroller(); stream<string> stream = controller.stream.asbroadcaststream(); stompclient client1 = await serverclient.connect(mqip, port: mqport, login: login, passcode: password); client1.subscribestring("entity changed", 'domain changed', (map<string, string> headers, string message) { controller.add(message); }, ack: auto); await (string message in stream) { string expectedentity = '{\"a\":\"b\"}'; expect(message, equals(expectedentity)); break; } client1.unsubscribe("entity changed"); client1.disconnect();

c# - How can I get form parameters from HttpListenerRequest? -

i using httplistener implement simple http server, accepting post java client. when client calls httplistenerrequest , contains form parameters. how can extract form parameters? seem have access content stream.... httplistener low-level component, httplistenerrequest object each request. form data sent via post contained within body, have process stream , extract form data yourself. querystring data available because part of request address, , not require stream processing extract. differentiates form data, processing stream required.

wordpress - Remove niceScroll to enable default browser scroll -

i got ember pro theme , came built in nicescroll . want remove can't find way how it. the reason because want remove there issue: when mouse cursor on iframe content, can't scroll, tried same iframe other page, , all's good. here links: http://exe4um.lv/biletes/ , http://valmierashk.lv/biletes/ the iframe api ticket service. question how can disable nicescroll on exe4um.lv page enable browser's default scrollbar? add below function in function.php file <?php function myscript() { ?> <script type="text/javascript"> $(document).ready(function() { /* $('html').getnicescroll().remove();*/ $(".page-template-default").getnicescroll().remove(); }); </script> <?php } add_action( 'wp_footer', 'myscript' ); ?>

emulation - 6502 cycle timing per instruction -

i writing first nes emulator in c. goal make understandable , cycle accurate (does not have code-efficient though), in order play games @ normal 'hardware' speed. when digging technical references of 6502, seems instructions consume more 1 cpu cycle - , has different cycles depending on given conditions (such branching). plan create read , write functions, , group opcodes addressing modes using switch . the question is: when have multiple-cycle instruction, such brk , need emulate happening in each cycle: #method 1 cycle - action 1 - read brk opcode 2 - read padding byte (ignored) 3 - store high byte of pc 4 - store low byte of pc 5 - store status flags b flag set 6 - low byte of target address 7 - high byte of target address ...or can execute required operations in 1 'cycle' (one switch case ) , nothing in remaining cycles? #method 2 1 - read brk opcode, read padding byte (ignored), store high byte of pc, store low byte of pc, store status flags b flag

ios - Cocoapods is installing old Pod version -

i'm using rxswift , other rx-pods in app, according podfile.lock use rxswift (3.2.0) , want update pods latest versions. so remove 4 rx..-pods use podfile , , run pod install , removed pods project , podfile.lock . re-add 4 rx..-pods , run pod instal again. installs rxswift 2.6.1 ... why? - i'm expecting install newest stable version of rxswift , 3.6.1.. i tried removing listed by: gem list --local | grep cocoapods , reinstalling cocoapods running: gem install cocoapods i tried running pod repo update without success. i tried running pod update , without uninstalling pods first, same outcome. i suspect issue cocoapods -gem, not rx-pods.. edit added podfile : source 'https://github.com/cocoapods/specs.git' # uncomment line define global platform project platform :ios, '9.0' # uncomment line if you're using swift use_frameworks! target 'myapp' pod 'brightfutures' pod 'alamofire' pod 'mbprogresshu

html - Anchors with fixed navigation and sticky header -

as can see in this jsfiddle , have navbar , sticky header per div. if click on anchors scrolled down right position, header overlaps text of div. i want header positioned above div when scrolling down, can accomplished setting .header { margin-bottom: 40px; } if offset, don't want @ all, can see here: margin bottom is there way accomplish avoiding overlapping , having no margin? thank in advance! i tried offsetting adding padding-top anchor, suggested in answers of question , did not work either (still overlapping) check snippet: .navbar { position: fixed; height: 40px; background: green; top: 0; width: 100%; z-index: 5; } .nav_holder{ position:absolute; top:40px; } .content { margin-top: 60px; } .one, .two, .three { height: 1000px; padding-top:40px; } .header { position: sticky; top: 40px; background: white; } <div class="navbar"> navbar </div> <div class="co

c# 7.0 - C# Interactive not recognizing ValueTuple reference -

i cannot use tuples in c# interactive window; following error: (1,15): error cs8137: cannot define class or member utilizes tuples because compiler required type 'system.runtime.compilerservices.tupleelementnamesattribute' cannot found. missing reference? (1,15): error cs8179: predefined type 'system.valuetuple`2' not defined or imported (2,9): error cs0103: name 'isliteraltypename' not exist in current context (2,47): error cs8179: predefined type 'system.valuetuple`2' not defined or imported (5,12): error cs8179: predefined type 'system.valuetuple`2' not defined or imported this after i've added reference valuetype assembly: #r "d:\myproject\packages\system.valuetuple.4.3.1\lib\netstandard1.0\system.valuetuple.dll" how can make use of value tuples c# interactive window? remove /r:system.valuetuple.dll from c:\program files (x86)\microsoft visual studio\2017\<edition>\common7\ide\commonextensions\micro

javascript - Using Google analytics, Is it possible to create Custom dimension using API (programatically) -

i working on saas application, let user(s) use own google analytics account tracking site. while tracking, wants take benefit of custom dimensions. not possible telling/educating each client( most of them non-technical ) " how create custom dimension/metric using google analytic interface ". is there way, can create custom dimension using code. ga('<command>','<dimension name>', '<index>', '<scope>') you can create custom dimensions in google analytics management api, see: https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtreference/management/customdimensions/insert there example code working api here: https://github.com/google/google-api-java-client-samples/tree/master/analytics-cmdline-sample good luck :)

javascript - React contentEditable and cursor position -

i have simple component class contenteditable extends react.component{ constructor(props){ super(props); this.handleinput = this.handleinput.bind(this); } handleinput(event) { let html = event.target.innerhtml; if(this.props.onchange && html !== this.lasthtml){ this.props.onchange({target:{value: html,name: this.props.name}}); this.lasthtml = html; } } render(){ return (<span contenteditable="true" oninput={ this.handleinput } classname={ 'auto '+this.props.classname } dangerouslysetinnerhtml={ {__html: this.props.value} }> </span>); } } export default contenteditable; <contenteditable value={this.state.name} onchange={(e)=>{this.setstate({name:e.target.value});}} /> component works cursor time on first position instead after rendered text. i tested examples form forum doesn't work me. i use react 15.

Excel - Search from range, not specific cell? -

Image
i have range of cells in column i2:i8: wiley elsevier springer taylor sage oxford cambridge i want use search function on column g, it'll search 1 of values in range, , return true/false column h if finds anything. problem is, values in column g longer, , string in column substring of column g text. column g contains (for example): blackwell publ ltd israel medical assoc journal pergamon-elsevier science ltd pergamon-elsevier science ltd mosby, inc oxford univ press cell press amer coll physicians nature publishing group cold spring harbor lab press, publications dept amer coll physicians massachusetts medical soc wiley-blackwell blackwell publishing inc amer assoc advancement science oxford univ press massachusetts medical soc oxford univ press academic press inc elsevier science academic press ltd- elsevier science ltd so examples, each time word wiley, oxford, elsevier etc appear in column g (such in oxford univ press or wiley-blackwell or academic press inc elsevier

r - Unable to install 'rstats-db/bigrquery' from ipython notebook -

i'm trying query google big query r ipython notebook. i'm following post here: https://cloud.google.com/blog/big-data/2017/04/google-cloud-platform-for-data-scientists-using-r-with-google-bigquery it breaks when run line: devtools::install_github("rstats-db/bigrquery", force = true) the full error message isn't clear me, i'll paste below. when run interactive r environment this: sh: /usr/bin/gnutar: no such file or directory sh: /usr/bin/gnutar: no such file or directory installation failed: error in running command trying url 'https://cran.rstudio.com/src/contrib/readr_1.1.1.tar.gz' content type 'application/x-gzip' length 233793 bytes (228 kb) ================================================== downloaded 228 kb it seems unable unpack files. i've tried installing gnutar brew, error still occurs. how can passed error? full error message: installing package ‘/users/user/library/r/3.3/library’ (as ‘lib’ unspecified) do

Concatenate Worksheets in Google Spreadsheet to new worksheet -

i have google spreadsheet contains multiple worksheets. worksheets have same columns have additional columns. concatenate worksheets single, newly created worksheet in same workbook. differences in columns should contain blank values. bonus points if adapted use on multiple workbooks. preferable if select sheets concatenate. i have tried write script struggling. the mother of sheets you of spreadsheets in drive , of them well. i'm not doing it. allows include sheets want concatenated adding them array includedsheet. function concatallsheets() { var includedsheet=['sheet1','sheet2','sheet3']; var ss=spreadsheetapp.getactive(); var allsheets=ss.getsheets(); var sheetname='motherofallsheets-' + utilities.formatdate(new date(), session.getscripttimezone(), "yyyymmddhhmm") var mother=ss.insertsheet(sheetname); for(var i=0;i<allsheets.length;i++) { var sht=allsheets[i]; if(includedsheet.indexof(sht.

Install Java EE Developer Tool on Eclipse Luna in a virtual machine -

Image
i trying install java ee developer tool(for dynamic web project) in eclipse luna onto virtual machine unable see selection options. here image showing struggling with: if want solve problem in easy way should download eclipse ide java ee developer. can links below. http://www.eclipse.org/downloads/eclipse-packages/ if want eclipse marketplace have search webtools platform. refer link below more information. https://eclipse.org/webtools/ http://download.eclipse.org/webtools/updates/ to install it, add following url http://download.eclipse.org/webtools/repository/luna/ if want eclipse oxygen repository, add same above url replace version name like. http://download.eclipse.org/webtools/repository/oxygen/