Posts

Showing posts from January, 2012

c# - ModSecurity default installation running on IIS 10.0 with CRS rule set generating a lot of errors -

i have installed modsecurity on iis 10.0 running on windows 10. "clean" install generates lot of errors visiting default iis site. by looking @ eventvwr , making single request total of 14 new errors request localhost . every event has following description: the description event id 1 source modsecurity cannot found. either component raises event not installed on local computer or installation corrupted. can install or repair component on local computer. if event originated on computer, display information had saved event. the following information included event: eventdata: [client ] modsecurity: ipmatch: bad ipv4 specification "". [hostname "hostname"] [uri "/"] [unique_id "18158513704000290822"] [client ] modsecurity: rule processing failed. [hostname "hostname"] [uri "/"] [unique_id "18158513704000290822"] [client ] modsecurity: rule 15448555590 [id "981172&

winapi - FindFirstFile/FindNextFile with long running operations -

is ok enumerate large directory long running operation performed on each file using findfirstfile/findnextfile api? it may take application 10-30 minutes process files returned directory search in directory 10,000+ files @ same time there file creation/deletion activity in directory. i'm concerned windows might not happy usage pattern under covers have not been able find recommendations 1 way or other.

machine learning - Misunderstanding of the gradient calculation -

i'm trying understand how loss_metric class in dlib calculates gradient. here code( full version ): // should noted derivative of length(x-y) respect // x vector unit vector (x-y)/length(x-y). if stare // @ code below long enough see it's // application of formula. if (x_label == y_label) { // things same label should have distances < dist_thresh between // them. if not experience non-zero loss. if (d2 < dist_thresh-margin)//d2 - distance between x , y samples. { gm[r*temp.num_samples() + c] = 0; } else { // whole objective function multiplied scale loss // relative number of things in mini-batch. // scale = 0.5/num_pos_samps; loss += scale*(d2 - (dist_thresh-margin)); //r - x sample index, c - y sample index gm[r*temp.num_samples() + r] += scale/d2; gm[r*temp.num_samples() + c] = -scale/d2; } } else { // things different labels should have distances > dist_thresh between /

Cucumber Java - How to use returned String from a step in next step? -

i need automate webservices, create methods , want use cucumber can't figure how use returned value in next step. so, have feature: feature: create client , place order scenario: syntax given create client type: "66" , create client: "outputvaluefromgiven" account type "123" , create client: "outputvaluefromgiven" account type "321" , want place order for: "outputvaluefromand1" and have steps: public class createclientsteps { @given("^i create client type: \"([^\"]*)\"$") public static string icreateclient(string clienttype) { string clientid = ""; system.out.println(clienttype); try { clientid = util.createclient(clienttype); } catch (ioexception e) { e.printstacktrace(); } return clientid; } @and("^i create client: \"([^\"]*)\" account type \"([^\"]*)\"$") public static stri

excel vba - DELETE from ListObject table rows meeting condition using VBA -

is possible in vba delete rows meeting condition excel listobject table? looking similar sql statement: delete mylistobjecttable mycolumn='some condition' try this: .- break connection, .- sort listobject per condition (optional have results of condition in 1 range.area deletion), .- autofilter listobject per condition, .- delete visible rows of listobject.databodyrange .- clear autofilter

javascript - Cordova - button for Hold to record audio - sometimes stops -

let me explain thoroughly. building chat app using cordova, , want sound recording function in messenger, hold button, changes appearance, after time release button, , sound file sent server. tried it, works, stops unexpectedly, or button's appearance changes unclicked, when move finger 1 pixel. frameworks using: onsen ui , jquery now here html of button <ons-button id="btnrecordsound" modifier="large" disable-auto-styling>hold record</ons-button> and here javascript let soundrecord = ''; let isrecording = false; function setrecordsoundbutton() { $('#btnrecordsound').on('touchstart touchend', (event) => { if (event.type == 'touchstart') { startsoundrecording(); } else if (event.type == 'touchend') { stopsoundrecording(); } }); } function startsoundrecording() { soundrecord = new media(/*some file path here*/, () => { //

differences between .sage and .spyx in numerical evaluation -

the question seems basic, i'm sorry not find answer in documentation. the content of both files test.sage , test.spyx identical; it's just a = 1/sqrt(2) print if run test.sage with $ sage test.sage i get 1/2*sqrt(2) but outcome different if run file test.spyx with $ sage test.spyx where get compiling test.spyx... 0.707106781187 how can prevent sage numerically evaluating 1/\sqrt(2) in .spyx mode? (i asked question on ask.sagemath.org got no answer yet...)

c# - How to access a server side method from a dynamicaly generated html button by innerhtml of a div -

i want access c# method html button dynamicaly generated innerhtml of div. code using system; using system.collections.generic; using system.linq; using system.web; using system.web.ui; using system.web.ui.webcontrols; public partial class demo2 : system.web.ui.page { private string dynamictextboxvalue; protected void page_load(object sender, eventargs e) { if (!ispostback) { textpreview.innerhtml ="<input type=\"submit\" name=\"btnsubmit\" id=\"btnsubmit\" value=\"click here\" runat=\"server\" onclick=\"get_data\"/>"; } } public void getdata() { response.write("clicked."); } } i want access getdata() method html button..help.plz we can not call server side function directly client (without registering on server, refer @fubo answer below this), if can security threat. call function browser adding raw html web page, case. however can postback , in pa

Advice on Laravel access right depending on entity status -

i've built management platform small business , working on v2 laravel 5.4. the context following: main managed entity mandate. it has several items may managed(crud) users can invited mandate , have different roles: responsible, main broker, sub broker. some users "global" rights may have access mandates, secretary or ceo. and part tricky part, access rights change depending on mandate status. regarding global access rights, i've got covered activity/role based access. mandate access rights stored in dedicated table storing following : mandate_status_id role_identifier action_identifier is_authorized the way i'm handling access right on main entity bugging me , refactor it. what's bothering me on every access check have determine current user role regarding mandate being "touched". mandate acces rights table loaded singleton on every request. i went @ first caching approach of rights/role showed limit when rights did not chang

java - How to access generated classes in build folder of Gradle project from src folder in Intellij -

Image
i generated classes wsdl file in build folder of gradle project in intellij. have compilation errors when try create object generated classes. because obvious cannot give reference in src folder classes outside of src folder. how can this? edit-1: project has root module has 2 inner modules placed on src folder of root module. "gen" class has generated classes , want use them in "main" module in src folder. but, how? edit-2: peter's recommendation, sharing print screen. cannot reach outside of src folder! go project structure (ctrl+alt+shift+s or file->project structure), select module , select module of concern. then click sources tab , turn generation folder source code folder. there row of buttons: mark as: i expect build folder marked excluded can have source folder inside excluded folder.

Unicode for registered trademark not displaying properly in Android string? -

Image
i want display symbol ® in string, have added unicode in string file. not have expected symbol should small , power application string. have tried same in poc in hello world string , there working fine, difficult investigate while line of code same both application. this have written in strings: <string name="helloworld">hello world <sup><small>&#174;</small></sup></string> hello world ® got result expected 1 in different. p.s expected result give below : make textview this: <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/helloworld" android:textstyle="bold" android:textsize="25sp"/> and string below: <string name="helloworld">hello world <sup><b>&#xae;</b></sup></string>

android - AdMob No Live-Ads appearing -

i have made application android studio, , have finished app. added adview application, , used testad-unitid, , got test ads. on emulator , on mobile phone. worked, , had test ads running. created admob account, , added app in there, created bannner ad, had in application, , used adunitid, admob page. when ran application on phone got no ads @ all. in case matters: app isn't on play store. i read have wait several hours, until live-ads, have been waiting on 12h, , im still not getting ads on phone. if need it, here code: my adview: <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintbottom_tobottomof="parent" ads:adsize="banner" ads:adunitid="@string/banner_ad_unit_id" android:layout_marginbottom="16dp" android:layout_marginleft="8dp" app:layout_constrai

android - fabric crashlytics and firebase push notification in single app(multiple google-service.json) -

Image
i have implemented fabric crashlytics in app try add firebase push notification. now issue have 2 google-service.json in project , @ time single google-service working. how rectify issue?

python - Robot Framework with Excel Library erroring: "local variable 'my_sheet_index' referenced before assignment" -

i have issue excellibrary proof of concept. when try save data new excel file returns error unboundlocalerror: local variable 'my_sheet_index' referenced before assignment on put number cell sheetname=${mysheetname} column=1 row=1 value=90 do know can prevent getting please? here easy test file: *** settings *** library excellibrary library collections *** variables *** ${excel_file_path} c:\\python27\\excelrobottest\\ ${mysheetname} userimport *** test cases *** excel test lubos test *** keywords *** lubos test create excel workbook newsheetname=${mysheetname} put number cell sheetname=${mysheetname} column=1 row=1 value=90 save excel current directory filename=mynewexcel.xls *** settings *** library excellibrary *** variables *** ${path} c:\\python27\\excelrobottest\\ ${name} test.xls *** test cases *** excel test create *** keywords *** create create

How to disable TYPO3 backend logout screen -

i want disable logout feature. want stay logged in lifetime. tried : set [fe][lifetime] = 86400 (at least 1 day) set [fe][permalogin] = 2 set [be][lockip]=0 set [be][sessiontimeout] = 3600 but system quicks me out in few min. try use below typoscript. ['be']['sessiontimout'] 3600*24*7

documentation - Replicate Bootstrap Code Examples Indentation -

i writing documentation platform runs on bootstrap 4. want code examples inserted automatically <pre> tags , shown in documentation pages, done in bootstrap documentation pages. far i've manageged copy behavior including jekyll plugin "highlight_alt.rb" in own plugin folder. runs excep code isn't indented. does know should indent code?

java - Volatile and ArrayBlockingQueue and perhaps other concurrent objects -

i understand (or @ least think do;) ) principle behind volatile keyword. when looking concurrenthashmap source, can see nodes , values declared volatile , makes sense because value can written/read more 1 thread: static class node<k,v> implements map.entry<k,v> { final int hash; final k key; volatile v val; volatile node<k,v> next; ... } however, looking arrayblockingqueue source, it's plain array being updated/read multiple threads: private void enqueue(e x) { // assert lock.getholdcount() == 1; // assert items[putindex] == null; final object[] items = this.items; items[putindex] = x; if (++putindex == items.length) putindex = 0; count++; notempty.signal(); } how guaranteed value inserted items[putindex] visible thread, providing element inside array not volatile (i know declaring array doesnt have effect anyhow on elements themselves) ? couldn't thread hold cached copy of array? thank

VS2017 C++ Android Folder Handling -

i using c++ in vs2017 write app android. using windows 7 64bit, , debugging using real life samsung s7 pc can't handle google emulator. i have got basic app working changes screen colour either red green or yellow. want display full screen texture using opengl. however falling @ first hurdle. have load bmp function takes char * file path, , @ moment trying use "./my_texture.bmp". no matter put bmp file on phone or in folders on pc itself, software cannot find file. i've copied multiple places on phone , never gets found. i need texture in folder not part of apk file software write require this. so not understanding how file handling works in android. where "./" direct to? how can change that? what path use specify static folder? android use "c:\" it's main hdd or work differently? i have tried googling not know enough looking ask right questions.

Android User Login with Wordpress Credentials -

how possible send request wordpress-server, passing username , password , getting user data response? took json api wich receive blogposts, cant find solution user authentication. there api or plugin wich can install, without writing php code?

Google script to Save open Sheet to file -

i'm in process of learning google scripts , javascripts, love coding solutions need know lot more apologies being little slow. i know how use script in google docs not sure yet on how construct many things, learning examples , trying understand find. i have scenario have google sheet use template user can enter in data in fields click button save whole sheet file (the same going file > save as) use id number in field name of document when saving , place these in folder within same directory master template. after clicking save button sheet need reset original ready entry. the user can open saved document , make changes if required. i haven't been able find examples can quite understand make them work assistance great, pointers resources make easier me learn thanks. first @ all, create folder in drive named mytargetfolder . put template spreadsheet in, fill " id " first row filed, number value second row. all script need below : // create

r - Hypothesis testing on GLM estimates -

i have model defined follows m1 <- glm(t2d ~ bmi.groups, family = "binomial") where bmi.groups factor levels "normal", "overweight", "obese" . using summary(m1) can see effect estimates of different factors , associated p-values. if have hypothesis effect of obese 3 times higher of overweight . how can test in r? i've tried recode factors numeric values 0, 1 , 4 respectively, i'm not sure if approach correct. thanks!

React Native Dev Menu on Android Nexus 5 Device -

i have basic react-native app running on real nexus 5 , cannot find way enable developer menu present ios , emulated devices. https://facebook.github.io/react-native/docs/debugging.html https://facebook.github.io/react-native/docs/running-on-device.html method 1: using adb reverse (recommended) can use method if device running android 5.0 (lollipop), has usb debugging enabled, , connected via usb development machine. run following in command prompt: $ adb reverse tcp:8081 tcp:8081 can use reload js react native in-app developer menu without additional configuration. when run react-native run-android see line in terminal running adb -s 06adb216 reverse tcp:8081 tcp:8081 but see no react native in-app developer menu i running: windows 10 react-native-cli: 2.0.1 react-native: 0.42.0 my index.android.js file looks this: import { appregistry } 'react-native'; import welcome './src/modules/onboarding/components/welcome'

python - Pandas: Pivot a DataFrame, columns to rows -

i have dataframe defined this: from collections import ordereddict pandas import dataframe import pandas pd import numpy np table = ordereddict(( ('year', [1900, 1900, 1900, 1900, 1901, 1901, 1901, 1901]), ('variable',['prcp', 'prcp', 'tavg', 'tavg', 'prcp', 'prcp', 'tavg', 'tavg']), ('month', [1, 2, 1, 2, 1, 2, 1, 2]), ('first_day', [5, 8, 7, 3, 9, 2, 4, 1]), ('second_day', [5, 8, 7, 3, 9, 2, 5, 8]), ('third_day', [1, 7, 5, 7, 3, 5, 8, 9]) )) df = dataframe(table) the dataframe this: year variable month first_day second_day third_day 0 1900 prcp 1 5 5 1 1 1900 prcp 2 8 8 7 2 1900 tavg 1 7 7 5 3 1900 tavg 2 3 3 7 4 1901 prcp 1 9 9 3 5 1901

SQL Server : conditional (IF-ELSE) on Left Outer Join -

i have scenario want put condition on join, i.e if = b join on 1 set else join on another. tables in both scenario same conditions different. have tried using case syntax error. select * [table1] cup left outer join table2 cp on cup.statecode = cp.statecode , (cup.clientid = cp.clientid or cp.clientid = 0) what have tried select * [table1] cup left outer join table2 cp on case when cup.clientid = cp.clientid cup.statecode = cp.statecode , cup.clientid = cp.clientid else cup.statecode = cp.statecode , (cup.clientid <> cp.clientid or cp.clientid = 0) @juan on cup.statecode = cp.statecode , ((cup.clientid = cp.clientid or cp.clientid <> 0) or (cup.clientid <> cp.clientid or cp.clientid = 0)) you'll have use coalesce select clause note cp1.clientid null removes gordon solution's limitation regarding nulls select ...

ios - Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread -

i getting crash after converting existing uiviewcontroller auto layout , can't figure out causing it. did search dispatch_async(dispatch_get_global_queue(...)) calls none changes layout. the stack trace unhelpful: * thread #18: tid = 0x73617, 0x0000000183aa8524 libobjc.a.dylib`objc_exception_throw, stop reason = breakpoint 3.1 * frame #0: 0x0000000183aa8524 libobjc.a.dylib`objc_exception_throw frame #1: 0x0000000185071100 corefoundation`+[nsexception raise:format:] + 116 frame #2: 0x0000000185c83894 foundation`_assertautolayoutonallowedthreadsonly + 192 frame #3: 0x0000000185c835d4 foundation`-[nsisengine _optimizewithoutrebuilding] + 76 frame #4: 0x0000000185aceddc foundation`-[nsisengine optimize] + 112 frame #5: 0x0000000185c82270 foundation`-[nsisengine performpendingchangenotifications] + 112 frame #6: 0x000000018af23e18 uikit`-[uiview(hierarchy) layoutsubviews] + 220 frame #7: 0x000000018b15fff8 uikit`-[uislider layoutsubviews] + 192

Ansible: access json field and use it as variable -

i have send put requests server, @ url: https://xxxx.com/id , , passing body json files (item1.json, item2.json ...). - name: invoke service uri: url: "https://xxxx.com/{{ item.id }}" method: put return_content: yes body_format: json headers: content-type: "application/json" x-auth-token: "xxxxxx" body: "{{ lookup('file', item) }}" with_items: - item1.json - item2.json - item3.json the id parameter of url within respective json file. structure of json files following: { "address": "163.111.111.111", "id": "ajsaljlsaaj", "server": "dnnwqkwnlqkwnldkwqldn" } the code have written seems not work, , 'ansible.vars.unsafe_proxy.ansibleunsafetext object' has no attribute 'id'. how can field been accessed?

linux - Trying to install Quandl on Python -

i changed os windows 10 linux, , i'm trying install quandl packages using pip install method. did googling , found following command: $ pip install quandl but wasn't installed. i guess due lack of pip in new linux computer. follow instruction install pip first, https://pip.pypa.io/en/stable/installing/ if have pip , installed quandl, can't access in python. maybe due path problem , think have edit it. export path=/usr/local/bin:$path

html - How can TO ovrride css custom class above by bootstrap btn class? -

i have css file in project, , global css class: input[type=text], input[type=password], input[type=button], input[type=submit] { margin: .2em .05em; border: 1px solid #333333; color: #333333; } in css imported bootstrap. @import url('../bootstrap.min.css'); my question how can ovrride css class above bootstrap btn class? take @ submit button if don't add custom css after bootstrap css white text color inside button . custom css overriding hence red. with custom css @import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'); input[type=text], input[type=password], input[type=button], input[type=submit] { margin: .2em .05em; border: 1px solid #333333; color: red; } <input class="form-control" type="text"> <input type="password"> <input type="button"> <input class="btn btn-info" type="submit"

java - Android app to display video from Raspberry Pi via Netcat -

i'm writing android app supposed display video made available raspberry pi. using netcat send video, live stream camera, directly client app available little latency. have little experience video encoding/decoding, don't know how handle inputstream raspberry pi. how go displaying video generic inputstream? hopefully question isn't open-ended. reiterate, i'm trying use inputstream display video.

HighCharts zoom in selection event -

how make ajax call when graph zoomed in. tried chart.events.selection javascript error. selection: function(event) { // log min , max of primary, datetime x-axis console.log( highcharts.dateformat('%y-%m-%d %h:%m:%s', event.xaxis[0].min), highcharts.dateformat('%y-%m-%d %h:%m:%s', event.xaxis[0].max) ); } gives error "uncaught typeerror: cannot read property '0' of undefined". function gets called when graph plotted infinite no of times. how prevent that? http://api.highcharts.com/highcharts/chart.events.selection says should fired when area under graph selected. here jsfiddle https://jsfiddle.net/dhptnfkt/36/ (you need un-comment code highlighted error). in example have: events: { selection: getselection(event) } when not define function on spot need pass function reference, or else passing parameter event in case undefined variable. instead should ( jsfiddle ): events: { selection:

How to solve depedency with ndk-build in Android? -

i've googled solution, no 1 of them has solved problem. i have downloaded tess-two , tried ndk-build downloaded ndk15r https://developer.android.com/ndk/downloads/index.html nothing happens, same issue: error:(687) android ndk: module pngt depends on undefined modules: z error:(700) *** android ndk: aborting (set app_allow_missing_deps=true >allow missing dependencies) . stop. error:execution failed task ':tess-two:ndkclean'. process 'command '/users/archimedia/library/android/sdk/ndk-bundle/ndk-build'' finished non-zero exit value 2 i've tried ignore error when terminal i'm gone in tess-two directory, , i've typed "ndk-build", , i've imported project directly. android studio console has logged same error. how can save life??? i had similar (though not same) error. able fix downgrading ndk-bundle 13b .. can older versions here . just extract , copy $android_home/ndk-bundle .

android - Placing TextureView inside FrameLayout -

i inherited code of recording app. preview of camera uses half of screen, , can used in landscape mode. user records himself, , play video recorded (again, using half of screen, in landscape). this layout of recording: <framelayout android:layout_weight="1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_toendof="@+id/textview" android:layout_above="@+id/framelayout" android:layout_alignparenttop="true" android:id="@+id/framelayout3" android:background="@color/negro"> <framelayout android:id="@+id/videoresultlayout" android:layout_width="match_parent" android:background="@android:color/black" android:layout_height="match_parent" /> </framelayout> in videoresultlayout preview of camera goes. and layout of playing activit

javascript - Google calendar events not showing up on FullCalendar -

i trying calendar on website syncs data on google calendar , displays on webpage. to so, i've used fullcalendar , followed steps on documents. calendar not displaying events googlecalendar.it's blank. i've got api, id, , not set private. <html> <head> <title>calendario fiscal</title> <!--fullcalendar dependencies--> <link href='fullcalendar/fullcalendar.css' rel='stylesheet' /> <link href='fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print'/> <script src='fullcalendar/gcal.js'></script> <!--jquery--> <script src='jquery/jquery-1.9.1.min.js'></script> <script src='jquery/jquery-ui-1.10.2.custom.min.js'></script> <!--fullcalendar--> <script src='fullcalendar/fullcalendar.min.js'></script> <script type="text/javascript"> $(document).ready

javascript - jQuery each-loop access every index text element -

i have below snippet. if run snippet able see output correct need store each span's text element in variable process further. if possible prefer solution without recursive function. $(document).ready(function () { $('li').click(function (e) { let fo; let foo; let fooo; $(e.currenttarget).children('span').each(function() { console.log($(this).text()); // expected output // fo = li1(2) +span1 // foo = li1(2) +span2 // fooo = li1(2) +span3 }); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div> <ul> <li> <span style="display: block;">li1 + span1</span> <span style="display: block;">li1 + span2</span> <span style="display: block;">li1 + span3</span> </li> <li>

javascript - iFrame issue "Https security compromised" -

i'm following advice add iframe in order open pdf (blob) i'm sending. require to work on ie 8 / 9 (horrible know), i'm running issues (please note i've posted relevant iframe code, have working code chrome / edge / firefox) html code: <iframe name="downloadframe" style="display:none"></iframe> javascript: else { // if need fallback we're on ie8/9 // passed arg, can confirm https call theurl = "https://xxxx/getpdfrequest" window.open(theurl, 'downloadframe'); } response headers: x-frame-options sameorigin errors receive: sec7111: https security compromised res://ieframe.dll/errorpagetemplate.css sec7111: https security compromised res://ieframe.dll/errorpagestrings.js sec7111: https security compromised res://ieframe.dll/httperrorpagesscripts.js does know wrong code, should able load iframe header i've set if i'm correct? also advice on whether there better ways

android - Current Location input in LatLng causing crash -

i'm trying put marker @ current location (using google maps api). while direct input values in latlng working, indirectly calling currentlocation.getlatitude() , currentlocation.getlongitude() crashing application reason, know it's line because app doesn't crash until add line. here's mapsactivity class- package com.example.shreyass.tourist; import android.manifest; import android.content.pm.packagemanager; import android.location.location; import android.location.locationmanager; import android.support.annotation.nonnull; import android.support.annotation.nullable; import android.support.v4.app.activitycompat; import android.support.v4.app.fragmentactivity; import android.os.bundle; import android.support.v4.content.contextcompat; import com.google.android.gms.common.connectionresult; import com.google.android.gms.location.locationservices; import com.google.android.gms.maps.cameraupdatefactory; import com.google.android.gms.maps.googlemap; import com.goo

Interfacing C with Java on Linux -

for project need able use c programs through java. our teachers have told can use mingw seems work on windows, , machine running linux (mint 18). saw posts using javah, when attempt use it, following message > javah hellojni program 'javah' can found in following > packages: * gcj-4.8-jdk * openjdk-7-jdk * gcj-4.6-jdk * > openjdk-6-jdk try: sudo apt-get install <selected package> so try sudo apt-get install javah , get > sudo apt-get install javah [sudo] password jess: reading package > lists... done building dependency tree reading state > information... done e: unable locate package javah what doing wrong? can give me pointers on how this? x javah part of jdk (java development kit). you can here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html after installing jdk, able use javac, javah, , lots more software related java development. if want start sample code, suggest go here

javascript - how to change language of retrieved content using language api in wikipedia? -

i want 2 api call 1 content , other 1 language change. some experimentation shows getting content links 1 or more page titles, , specifying required language content part of same api query. specific language can requested providing lllang parameter in query string suitable language code value . for example url of page title "albert einstein" translated egyptian arabic (code "arz") in api's sandbox: https://en.wikipedia.org/wiki/special:apisandbox#action=query&format=json&prop=langlinks&titles=albert+einstein&llprop=url&lllang=arz depending on application , query volumes, can improve efficiency request data multiple titles and/or languages in 1 call , search through results, opposed making many separate, individual calls. fwiw. api documentation seems lack instructions provide specific parameters "langlinks` or other query types adding them key-value pairs query string.

export to excel - RDLC Local Reports KeepTogether does not work -

i’m having problems rdlc local report. when exporting excel, want keep table on 1 page, , if doesn’t have enough space entirely move next page. i have tried keeptogether property, doesn’t work. have tried other suggestions putting table inside list or rectangle, nothing helps. forcing page breaks dynamically not easy, , in case excel report contains 2 sheets, not want. have idea how solve this? windows form project.

c# - Setup Entity Framework 6 with Mysql - Code first -

i trying setup existing project use entity framework. have never used before , want learn on personal project. i have solution many projects, related. login wanna querys. model model is. main program starts. i have installed entityframework onto mysolution.model. this app.config model: <connectionstrings> <add name="aldatabasecontext" providername="mysql.data.mysqlclient" connectionstring="server=localhost;port=3306;database=aldatabase;uid=root;password=root"/> </connectionstrings> <entityframework> <defaultconnectionfactory type="system.data.entity.infrastructure.sqlconnectionfactory, entityframework"/> <providers> <provider invariantname="mysql.data.mysqlclient" type="mysql.data.mysqlclient.mysqlproviderservices, mysql.data.entity.ef6"/> <provider invariantname="system.data.sqlclient" type="system.data.entity.sqlserve

python - Control individual linewidths in seaborn heatmap -

Image
is possible widen linewidth sepcific columns , rows in seaborn heatmap? for example, can heatmap import numpy np; np.random.seed(0) import seaborn sns; sns.set() uniform_data = np.random.rand(10, 12) ax = sns.heatmap(uniform_data, linewidths=1.0) be transformed this: it's possible, may lot of work. possible solution might shown below. involves plotting 6 different heatmaps , adjusting spacings such looks okish. 1 needs synchronize colorscaling , manually set colorbar. import matplotlib import matplotlib.pyplot plt import numpy np; np.random.seed(0) import seaborn sns; sns.set() data = np.random.rand(10, 12) asp = data.shape[0]/float(data.shape[1]) figw = 8 figh = figw*asp cmap = plt.cm.copper norm = matplotlib.colors.normalize(vmin= data.min(), vmax= data.max()) gridspec_kw = {"height_ratios":[9,1], "width_ratios" : [4,5,3]} heatmapkws = dict(square=false, cbar=false, cmap = cmap, linewidths=1.0, vmin= data.min(), vmax= data.max() ) t

c++ - Template class calling template function - Linker Error -

i'm experimenting template classes , functions, , ran following error. i'm trying call template function class vertex template class class relationshipexpander. mwe below yields following linker error: undefined symbols architecture x86_64: "typeinfo pipetype", referenced from: typeinfo relationshipexpander<in> in main.cpp.o "vtable pipetype", referenced from: pipetype::pipetype() in main.cpp.o note: missing vtable means first non-inline virtual member function has no definition. ld: symbol(s) not found architecture x86_64 #include <iostream> #include <vector> #include <forward_list> using namespace std; // abbrr class vertex; typedef forward_list<const vertex*> edge_list; /* * matching */ struct match_first { match_first(unsigned value) : value(value) {}; template<class a> bool operator()(const pair<const unsigned, a> &a) { return a.first == value; }

swift3 - Viewcontroller won't run after segue is performed, no errors -

i trying prepare , perform segue in xcode. there aren't errors in code , in simulator segue performs properly. can see segue happen in simulator when click on button. but there simple test code on second viewcontroller, print statement see if code on next viewcontroller run, , doesn't. i've spoken assistant instructor , when segue viewcontroller, code on should run.. here code segue on first viewcontroller: func prepare(for segue: uistoryboardsegue, sender: any?) { let destinationvc = segue.destination as! albumsegue destinationvc.albumsongarray = selectedalbumarray } //performe segue performsegue(withidentifier: "albumsegue", sender: self) and here second viewcontroller: class albumsegue: uiviewcontroller { var albumsongarray: [array<string>] = [] // empty array hold songs album , file paths, etc override func viewdidload() { super.viewdidload() print(&

Sql timeout. Camel-context Bean fails for multiple files -

i run automatic route when files dropped in folder <route id ="automatic-route"> <from uri="file:c:/pathtofolder?noop=true"/> <to uri="bean:automaticbean"/> <to uri="activemq:startflow.q"/> </route> i move file in subfolder called "done" java methods in bean automaticbean.java. then start route process file. <route id ="process-route"> <from uri="direct:process"/> <to uri="bean:processbean"/> </route> when move multiple files in folder correctly moved subfolder (through bean. use java method move them). second bean (file processing , sql queries) has timeoutexception because files moved , processed @ same time. for example when move 5 files 3 of them correctly processed last ones have timeoutexception. possible run second route each files 1 one (schedule them or that)? , start second route file when

Is it possible to use Google Sheets instead of/with an Node.JS/ASP.NET application? -

building realtime management system sales team rest api wordpress site. functionality want google sheets custom connections/communication. looked in google sheets api 4, me looks non customizable extend want be.
 https://developers.google.com/apps-script/guides/sheets/functions thinking of building scratch node.js or asp.net core , looking framework alternatively google sheets customizable. yes, it's possible. for example can use 1 of these module: https://www.npmjs.com/package/google-spreadsheet https://www.npmjs.com/package/google-sheets read tutorial - node.js quickstart google sheets api: https://developers.google.com/sheets/api/quickstart/nodejs

c++ - modifying values in pointers is very slow? -

i'm working huge amount of data stored in array, , trying optimize amount of time takes access , modify it. i'm using window, c++ , vs2015 (release mode). i ran tests , don't understand results i'm getting, love optimizing code. first, let's have following class: class foo { public: int x; foo() { x = 0; } void inc() { x++; } int x() { return x; } void addx(int &_x) { _x++; } }; i start initializing 10 million pointers instances of class std::vector of same size. #include <vector> int count = 10000000; std::vector<foo*> fooarr; fooarr.resize(count); (int = 0; < count; i++) { fooarr[i] = new foo(); } when run following code, , profile amount of time takes complete, takes approximately 350ms (which, purposes, far slow): for (int = 0; < count; i++) { fooarr[i]->inc(); //increment elements } to test how long takes increment inte