Posts

Showing posts from April, 2014

single sign on - Error CTJSO1501E from Bluemix SSO Web UI -

attempting set instance of bluemix sso service use in app. created service instance when click on tile open can configure settings get: com.ibm.sec.iam.platform.ui.dashboardexception: ctjso1501e have arrived @ page without valid parameters. must visit page via bluemix administration console. now, thought was in bluemix administration console. mean, i'm coming page: https://new-console.ng.bluemix.net/dashboard/all i tried coming @ other paths every time try open service error. would appreciate thoughts on wrong here or how might workaround failure. mike i not seeing problem. browser use? can try switching different browser, or cleaning current browser cache see if helps.

google maps - Can't translate some Javascript code I need for my C# App -

i'm trying build simple app locates restaurants nearby kinda lost since can't find how translate piece of code google guide c# , implement app since cannot find placesservice way try. var request = { location: pyrmont, radius: '500', types: ['store'] }; service = new google.maps.places.placesservice(map); service.nearbysearch(request, callback); function callback(results, status) { if (status == google.maps.places.placesservicestatus.ok) { (var = 0; < results.length; i++) { var place = results[i]; createmarker(results[i]); } } } chat conversation end try one: googlemapsapi nuget package it's 'google maps web services api wrapper .net' here github page can find examples, library pretty documented.

javascript - Youtube Api Auto Change Video Quality -

is there way automatically detect if user can handle higher video resolution? right i'm setting user playback quality 'default' in onplayerready. can check if there higher resolution available using getavailablequalitylevels()-1 in onplayerstatechange don't know if changing resolution cause issues. it seems there no direct way it. previous post suggests , can using 2 ways: use javascript method in post . use buffered video size quality estimate over suggested methods suggestion make slow process more kalman filter . hope helps.

r - shiny fluidrow column white space -

i have top banner want split 2 separate sections representing 2 different inputs. this, i've created fluidrow , 2 columns, 1 each input. however, there little bit of white space between columns, despite putting offset = 0. there way remove white space columns next 1 another? colors = c("green","blue","red") library(shiny) ui <- fluidpage( tabsetpanel( tabpanel("info", fluidrow( column(width = 6, offset = 0, div(style = "height:50px;width:100%;background-color: #999999;border-style: solid;border-color: #000000", tags$h3("section 1") ) ), column(width = 6, offset = 0, div(style = "height:50px;width:100%;background-color: #999999;border-style: solid;border-color: #000000", tags$h3("section 2") ...

For Loop never executing (Javascript / Jquery) -

this question has answer here: how return response asynchronous call? 25 answers why variable unaltered after modify inside of function? - asynchronous code reference 6 answers so loop runs if replace $.get('/preceed_with_an.txt', function(data){var ans = data.split('\n')}); ans = ["filler","more filler"] when $.get line in refuses execute loop , nothing ever written console. context, writing code tells if should use or before word. words use on separate lines in preceed_with_an.txt have checked $.get functions , file written array fine. $(document).on('input',$('#givenword'),function(){ var ans = new array; $.get('/preceed_with_an.txt', function(data){var ans = data.split('\n')}); (var = 0;...

scala - how to use spark streaming + kafka with streamingListener -

i have 1 situation here. i want aplication connect 1 time kafka, read offset, make action , stop application. i reading streaminglistener detect when first iteration occurs. i don´t know how use streaminglistener stop mi application. can me? i using spark 1.4 example code bellow: val lines = kafkautils.createstream(ssc, zkquorum, group, topicmap).map(_._2) lines.foreachrdd( rdd => { rdd.saveastextfile("......") }) sys.shutdownhookthread { println("gracefully stopping spark streaming application") ssc.stop(true, true) println("application stopped") } ssc.start() ssc.awaittermination() thanks!

java - Sorting an array in ascending order that contains null values -

i need sort array contains null values , null values represent invalid data have set null cannot removed array represent invalid piece of data null values must kept in place i.e sort other values except null values error thrown nullpointerexception on call arrays.sort(); public static double getmedian(double[] values) { double[] copy = arrays.copyof(values, values.length); arrays.sort(copy); double median; if (copy.length % 2 == 0) median = (copy[copy.length / 2] + copy[copy.length / 2 - 1]) / 2; else median = copy[copy.length / 2]; return median; } all and/or suggestions appreciated. add comparator , return appropriate sign, indicate less than, equal or greater than. example: class mycomparator<double> implements comparator { // change value -1 inverse sort direction. var direction = 1; public int compare(double o1, double o2) { int sign = 0; if (o1 == null) { sign = -1...

c# - .NET Core - Trying to add a repository to my API controller, but when I do every controller method returns a 500 error -

as title says. i'm creating web api , in api controller, i'm trying declare repository in constructor. declare it, every api method try call in controller returns 500 error. when remove constructor/repository variable, have no issues. controller [route("api/[controller]")] public class testcontroller: controller { private itestrepository _testrepository; public testcontroller(itestrepository testrepository) { _testrepository= testrepository; } [httpget] public ienumerable<string> get() { return new string[] { "value1", "value2" }; } } startup.cs public void configureservices(iservicecollection services) { // add framework services. services .addmvccore() .addjsonformatters() .addapiexplorer(); services.addscoped<itestrepository , testrepository >(); services.addswaggergen(); } am missing something? short answer i'm trying declare r...

lucene.net - Differences in Umbraco cache structure? -

ok, have spent last 6-8 weeks in weeds of umbraco , have made fixes/improvements our site , environments. have spent lot of time trying correct lower level umbraco caching related issues. reflecting on experience , still don't have clue conceptual differences between following: examine indexes umbraco.config cached xml file in memory (supposedly similar umbraco.config) cmscontentxml table thanks again, devin examine indexes index of umbraco content so when ever create/update/delete content, current content information indexed this index use searching - under hood, lucene index umbraco backend use these index searching you can create own index if want more info checkout, overview & explanation - "examining examine peter gregory" umbraco.config , cached xml in memory same thing. the front end umbracohelper api content cache not database - cache umbraco.config cmscontentxml contains each content's information xml so xml r...

javascript - Set an image to fill the canvas using Paper.js -

i have image has same aspect ratio canvas different resolution. know can make use of view size, view.viewsize , trouble setting dimensions of image. have tried setting width using raster.width = 2000; , example, not seem work. use raster.bounds instead (for width) raster.bounds.width = 2000; or (for height) raster.bounds.height = 2000; so, right, should able canvas size with: paper.view.viewsize and assign raster proper with/height

javascript - Providing suggestions via Typeahead.js -

i have app uses bootstrap, jquery, typeahead.js , azure search. i'm trying use suggestions feature. in attempt this, have following: var engine = new bloodhound({ datumtokenizer: bloodhound.tokenizers.whitespace, querytokenizer: bloodhound.tokenizers.whitespace, remote: { url: 'https://my-app.search.windows.net/indexes/my-index/docs/suggest?api-version=2015-02-28', prepare: function (settings) { settings.type = 'post'; settings.contenttype = 'application/json; charset=utf-8'; settings.data = { search: query, suggestername: 'mysuggestions', top: 10 }; return settings; } } }); $('#searchfield').typeahead([{ minlength: 5, name: 'suggestions', source: engine }]); when enter text searchfield, never see requests fired off azure search service in fiddler. @ same time, not see errors in console window. doing wrong? a c...

Navigation bar is not visible in my app Android (Eclipse) -

Image
when create android app in eclipse, navigation bar not displayed in activity_main : does know how fix? you have sure android:theme in android manifest this: <style name="apptheme" parent="theme.appcompat.light.darkactionbar"> </style> and since android 5 actionbar not used, recommended use toolbar. activity has extend appcompatactivity import android.support.v7.app.appcompatactivity; //... public class mainactivity extends appcompatactivity { //... @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); toolbar toolbar = (toolbar) findviewbyid(r.id.appbar); setsupportactionbar(toolbar); } } you can custom toolbar: <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="matc...

awk - ORS refuse to separate output record to new line -

hello guys have file: paumic@os:~/l26$ cat p1 cat dog cow cat dog mouse dog cow cat so want first 2 columns , have them this: cat dog cat dog dog cow when use script is: paumic@os:~/l26$ cat skript #!/bin/sh output=$(cat $1 | awk 'begin{ors="\n"} {print $1, $2}' ) echo $output i answer: paumic@os:~/l26$ ./skript p1 cat dog cat dog dog cow if use else instead of \n works. example: paumic@os:~/l26$ cat skript #!/bin/sh output=$(cat $1 | awk 'begin{ors="()"} {print $1, $2}' ) echo $output paumic@os:~/l26$ ./skript p1 cat dog()cat dog()dog cow() paumic@os:~/l26$ thank you time , help. always quote variables. may not required, it's safer habit in. also, can streamline use of awk , include error handling missing options implicitly: output=$(awk 'begin{ors="\n"} {print $1 ors $2}' "${1:?no file provided}" ) echo "$output" though better explicit error handling: #!/bin/...

java - Unable to find any JVMs matching version "1.7" -

i have been setting java_home "/usr/libexec/java_home -v 1.7" on osx(el capitan). after recent update jdk jdk1.8.0_66 jdk1.8.0_91, error unable find jvms matching version "1.7". does know how still use jvm 1.7 java_home after update ?

c# - Is it possible to open regedit and navigate to straight to a specific key using process.start? -

i'm making small tool can write key in registry, , tiny part of convenience navigate key instantly click of button. know how open regedit.exe there way instantly navigate key need? i'm trying system.diagnostics.process.start("regedit.exe" + "c/ hkey_local_machine"); but think it's trying write key registry. thanks in advance! edit: @arran -actually tool myself mainly. i'm still newb @ c# or programming in general, , learning on own. program 1/2 test of can , 1/2 utility later work. goal able write key registry , after able navigate , delete in seconds out having manually search through regedit. edit: @hans passant thank information! guess if it's hard implement, it's not worth time , effort. this thread bit old bit if else ends here googling works. set lastkey path want regedit open in launch regedit. example: var registrylocation = "your key here"; var registrylastkey = @"hkey_current_u...

date - How to get correct UTC time in javascript? -

i want current date utc midnight: var d = new date(); d.setutchours(0,0,0,0); console.log(d.toisostring()) this returns me: 2016-04-21t00:00:00.000z is utc time? think not , should be: 2016-04-20t22:00:00.000z if want have midnight of time zone in utc time code following: var d = new date(); d.sethours(0,0,0,0); console.log(d.toisostring());

Jhipster - how to manage jwt revocation? -

very nice talk on @devoxx fr ! have question release 3.0... there revocation jwt token ? how manage ? thanks in advance no token not persisted. can block user not token, token valid 1 day per default. if want revoke token before expires, must persist generated tokens in database , implement either white list or black list.

osx - How can I connect to Redis server in a Docker Container from Redis Desktop Manager in Mac? -

i have configured macbook docker , docker-compose, configuration in docker-compose.yml redis following: redis: image: redis:3.0.6 container_name: cache redis working, want access them redis desktop manager (or similar) host (the macbook). ip of virtual machine is: 192.168.99.100 , tried configure ip , 6379 port without success. knows how can have configure redis desktop manager access redis server in docker container? thanks in advance. you need expose port 6379 on docker-machine add docker-compose.yml redis: image: redis:3.0.6 container_name: cache ports: -6379:6379 you should able access on (docker-machine ip (your machine id)):6379

regex - How to use regular expression in Notepad++ to insert comma in sequence of space and digit -

i trying insert delimiters in text file. in 1 case, want insert comma before digit. can uniquely specify points want insert comma in each row space , digit. briefy, data looks follows: row1 data etc etc 1234 row2 data etc 825 row3 data etc 719 and on. note there bunch of various characters, , @ end of line there space , digit of sort. want use regular expression specify pattern of digit space, , replace space, comma, digit. so: row1 data etc etc ,1234 row2 data etc ,825 row3 data etc ,719 i believe have come find field:"\s[0-9]" however, don't know put in replace field. tried "\s,[0-9]", literally replaces regular expression string "\s,[0-9]". how go having generically leaving space , digit, , putting in comma? i appreciate advice can provide. thanks. you should use capturing groups in search pattern , replace backrefenreces these groups (and comma) so: search: (\s)(\d) replace: $1,$2 you might want change search pattern...

reactjs - Update reducer A based on reducer B -

goal: update favorite colors based on filters. setting: there 2 reducers: filters , colors . export function filters(state = { nored: false, noblack: false, }, action) { ... }) export function colors(state = { red: true, black: true, blue: true }, action) { ... }) i want update colors based on filters . can dispatch setfilter , setcolor @ same time, doesn't work because setcolor should happen after filters reduced completely. can think of combining filters , colors together, i'd keep them separated. what's best way achieve goal? need following: export function colors(state = [], action) { switch (action.type) { case constants.set_filter: // assume can access filters reducer here var filters = filtersreducer var colors = applyfilters(state.colors, filters) return colors case constants.set_color: return action.colors default: return state } } or can dispatch action inside filters reduc...

android - UI Changes made in fragment layout is not reflected in emulator.(using page Viewers to create Fragment) -

Image
i using pageviewers create fragments. have defined pageviewer in mainactivity layout. mainactivity.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" tools:context="com.rakesh_kr.fullclass.branchfeed"> <android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width=...

In JavaFX-8, can a controller be dynamically added to a node not created using FXML/FXMLLoader? -

this may case of newb-swimming-upstream, but... in fxml file, 1 of attributes identifies controller. assuming controller , identified methods bound node during load (i.e., controller instance instantiated , methods bound listeners identified in fxml). is there way programmatically associate controller instance javafx node (e.g., tableview) created procedurally vice via fxmlloader? if understand correctly, want define controller instance in java code, instead of letting fxmlloader instantiate it. you can calling setcontroller on fxmlloader before call load() . note means must create fxmlloader instance , invoke instance load() method, , must not call static load(url) method: mycontroller controller = new mycontroller(); fxmlloader loader = new fxmlloader(getclass().getresource("path/to/fxml")); loader.setcontroller(controller); parent root = loader.load(); if use technique, must not use fx:controller attribute in root element of fxml file. no...

perl - How can I plot p-values for SNPs that are spread across thousands of scaffolds on a single continuous axis? -

i have association mapping derived p-values snps scattered across thousands of scaffolds in non-model organism. plot p-value of each snp on manhattan-style plot. not care order of scaffolds, retain relative order , spacing of snp positions on respective scaffolds. want visualize how many genomic regions associated phenotype. example: my data looks this: scaffold position 1 8967 1 8986 1 9002 1 9025 1 9064 2 60995 2 61091 2 61642 2 61898 2 61921 2 62034 2 62133 2 62202 2 62219 2 62220 3 731894 3 731907 3 731962 3 731999 3 732000 3 732050 3 732076 3 732097 i write perl code create third column retains distance between snps on same scaffold, while arbitrarily spacing scaffolds number (10...

java.lang.UnsatisfiedLinkError: Native method not found in Android -

could me locate error, have looked @ looked can't seem find it, trying run code keeps giving me error java.lang.unsatisfiedlinkerror: native method not found: nemo.lungu.receiptor.scanlibrary.scanactivity.getpoints:(landroid/graphics/bitmap;)[f below activity method getpoints() : public native float[] getpoints(bitmap bitmap); the header version of method getpoints() : jniexport jfloatarray jnicall java_nemo_lungu_receiptor_scanlibrary_scanactivity_getpoints (jnienv *, jobject, jobject); and implementation of method getpoints() in .cpp file: jniexport jfloatarray jnicall java_nemo_lungu_receiptor_scanlibrary_scanactivity_getpoints (jnienv *env, jobject thiz,jobject bitmap) { __android_log_print(android_log_verbose, appname, "scaning getpoints"); int ret; androidbitmapinfo info; void* pixels = 0; if ((ret = androidbitmap_getinfo(env, bitmap, &info)) < 0) { __android_log_print(android_log_verbose, appname,"androidbitmap_getinfo() faile...

php - why is jquery not passing a post value -

i have page 2 forms on it. shouldn't problem, not working. jquery looks this: $(document).ready(function() { $("table.jobs tbody tr td#ejob").click(function() { var $this = $(this); var col = $this.text(); var leftcelltext = $this.prev().text(); $('#jobid').val(leftcelltext); if (col == '') alert("please pick column"); else $('#jobupdate').submit(); }); var = new date(); var month = now.getmonth()+1; var day = now.getdate(); var year = now.getfullyear(); if (month<10){month='0'+month} if (day<10){day='0'+day} var = month +"/"+ day + "/" + year; var calendarbox = $('#caldate'); //$('#caldate').val(c...

ruby on rails - How to assign a variable the current output of a select tag -

i'm having trouble select tag. i want assign value variable depending on name shown on select tag: <%= select('product', 'name' , @products.map { |s| [s.name, s.id] }, {}, {:class => "form-control"}) %> the values display correctly, want assign selected value variable can used later on same page display content relevant details of selected product. for example: @product = currently_displayed_name is possible rails , how it? or might need use resource? props comments, answer rails does not give way that . depending on need manipulate when user changes select value, might able find javascript library it. otherwise, can load default variable on page, , handle rest onchange handler: $('#product_name').change(function() { // perform actions on page javascript });

bash - diff command + how to use + how to interpret results -

file1 $ cat datatable-code-export-serverside/index.php <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>how export jquery datatable data pdf,excel,csv , copy</title> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.css"/> <script type="text/javascript" src="https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.js"></script> <div class="container" style="padding:20px;20px;"> <div class=""> <h1>data table export features using php server-side</h1> <div c...

angular - Angular2 select with ngValue null -

here's i'm trying do: want select list bound array of objects ngvalue, first option needs "none" option null value. model: this.managers = [ { id: null, name: "(none)" }, { id: 1, name: "jeffrey" }, { id: 2, name: "walter" }, { id: 3, name: "donnie" } ]; this.employee = { name: "maude", managerid: null }; view: <select [(ngmodel)]="employee.managerid"> <option *ngfor="#manager of managers" [ngvalue]="manager.id">{{ manager.name }}</option> </select> on load, list correctly binds "none" element. if change different item , back, model value switches string of 0: null . pretty inconvenient; means have intercept value , change null manually before attempt save server. here's plunker demo: http://plnkr.co/edit/bh96rwzmvbbo63zaxgnx?p=preview this pretty done in angular 1 <option value="">none</option...

php - Navigation Menu not working Bootstrap -

hi getting error in wordpress bootstrapped menu first of there submenu in when hover mouse not open. secondly on mobile screen responsive button not working , displaying menu list without clicking here site: http://www.abiglittlebiz.com/trevelle/ here code: <nav class="navbar navbar-inverse"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <?php wp_nav_menu( array ( 'theme_location' => ...

utf 8 - Get difference between two character codes in Ruby -

although might not readable, hoping can tell me if possible - , if how - make following code work true if (string1 - string2) == predefined_distance i hope might possible using ruby's open classes, looking @ documentation utf-8 , encoder::converter i'm not sure if it's possible do more <=> isn't @ precise. perhaps can convert ascii , compare values? an example of use might compare 2 opening closing brackets, see if match instead of defining separate lists or containers each type of bracket, , instead can define distance 2 arbitrary characters. built-in method ord of string class can return number of character: true if (string1.chars.first.ord - string2.chars.first.ord) == predefined_distance http://ruby-doc.org/core-2.2.0/string.html#method-i-ord

python - examining memory in gdb pretty-printer -

i'm trying figure out how gdb pretty printing works in order create pretty printers display data structures in more compact, readable form, documentation seems pretty thin. starting exercise, tried create pretty printer sockaddr_in -- instead of printing umpteen different union variations in unreadable form, print in normal dotted notation. i put following in .gdbinit file: python class sockaddr_in_printer(object): "print sockaddr_in" def __init__(self, val): self.val = val def to_string(self): addr = self.val['sin_addr'].address().cast(gdb.lookup_type("unsigned char *")) port = self.val['sin_port'].address().cast(gdb.lookup_type("unsigned char *")) rv = "" + addr.dereference() x in range(0,3): addr += 1 rv += "." rv += addr.dereference() pnum = port.dereference() * 256 port += 1 pnum += port.dere...

unix - Grep two lines with unique keyword -

i take txt file , sort of grep command , save output file used in r. consider have following log file: current_t: 178.027 (filename: c:/buildslave/unity/build/artifacts/generated/common/runtime/unityenginedebugbindings.gen.cpp line: 37) rv: -8.421698e-06 (filename: c:/buildslave/unity/build/artifacts/generated/common/runtime/unityenginedebugbindings.gen.cpp line: 37) nullreferenceexception: object reference not set instance of object @ modelactions.update () [0x00000] in <filename unknown>:0 (filename: line: -1) current_t: 179.7662 (filename: c:/buildslave/unity/build/artifacts/generated/common/runtime/unityenginedebugbindings.gen.cpp line: 37) rv: -8.413203e-06 (filename: c:/buildslave/unity/build/artifacts/generated/common/runtime/unityenginedebugbindings.gen.cpp line: 37) i want able grab each line has current_t , rv. preferably have output as: 178.027 -8421698e-06 179.7662 -8.413203e-06 where times placed in column , rv placed in following column. t...

javascript - How to load saved google app script file in script editor? -

Image
so..i know sounds stupid, have saved script file on drive , when went editor , did file -> open.., taken drive , able find script file saved. download json file couldn't reopen in google script editor. please help! there several ways open stand alone projects of google apps scripts. note: issue 5963: cannot open standalone google app scripts in drive fixed now. if preview shown, go http://drive.google.com navigate or search project file double clic. @ time file preview open. click open in new window button in top right corner.

recursion - write and test a method PrintSquare -

write , test method printsquares has integer parameter n, , prints squares of integers 1 n, separated commas. should print squares of odd integers in descending order first , following squares of integers in ascending order. not print newline character. should throw illegalargumentexception if specified integer less 1. example: printsquares(4) should print 9, 1, 4, 16 printsquares(1) should print 1 printsquares(7) should print 49, 25, 9, 1, 4, 16 there go, hope teacher ok (this throw exceptions if enter negetive numbers , adds useless comma @ end can fix if bothers you) public static void printorder(int n) { decorderodd(n); acsordereven(1, n); } public static void decorderodd(int n) { if (n > 0) { if (n%2 == 1) { system.out.print(n*n + ", "); decorderodd(n-2); } if (n%2 == 0) decorderodd(n-1); ...

precision - comparison float rounding fails System.Math.RoundTo C++ XE7 -

i've been trying round float value 4 precision without success. float fconv = 1.0f; float fdata = 39.934543423412f; float fres = roundto(fdata*fconv, -4); if(fres <= 39.9345f){do something;} //<-- unwanted behavior wanted result 39.934500000000 actual result 39.934543423412 i've tried many methods including round float given precision without success. i'm working on amd fx83xx 64bit. program built in 32bit debug using xe7 thanks your desired precision of 6 decimal digits near precision limits float data type. epsilon, or delta between consecutive representable floating point values, number around 40f 7.63e-6, there's couple of bits different between 'best' value , you're getting. possibly due rounding close limit, i'm not sure.

c# - How to put multiple xml data in datagridview -

lets have multiple xml data this: <entry> <url><![cdata[http://triada.kh.ua/made/?email=abuse@example.com]]></url> <phish_id>3779980</phish_id> <phish_detail_url>http://www.phishtank.com/phish_detail.php?phish_id=3779980</phish_detail_url> <details> <detail> <ip_address>93.190.41.34</ip_address> <cidr_block>93.190.40.0/21</cidr_block> <announcing_network>6849</announcing_network> <rir>ripencc</rir> <detail_time>2016-01-24t01:00:58+00:00</detail_time> </detail> </details> <submission> <submission_time>2016-01-22t22:42:56+00:00</submission_time> </submission> <verification> <verified>yes</verified> <verification_time>2016-03-28t14:15:01+00:00</verification_time> </verification> <status> <online>yes</online> </status> <target>internal revenue service</...

c# - Logout doesnot return to the proper view -

in layout page have used request.isauthenticated method show login , logout link.login link poppup modal login form.( modal popup in partial page). after logged in logout link show up. when hit logout l goes logoff method , redirect index action doesn't goes view instead shows same view. pleaseadvise me. have spend lots of hour fixed this layout page <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">toggle navigation</span> <span class="icon-bar"></span> <span class=...

excel - Copying Cells from Workbook to Workbook Results in "Subscript Out of Range" -

good day. i trying write code select cells (left right) "a - m" , (downwards) until last used row. then, once selected, copy them workbook. this code tried use: activeworkbook.worksheets("sheet1").range("a1:m" & lastrow).copy _ workbooks("converter.xlsm").worksheets("sheet1").range("a1").currentregion everything else in code works except line. , result this: run-time error '9': subscript out of range thanks. ps. "lastrow" variable used, pulled out of tutorial. that's not personal user-defined variable, not sure if that's vba's documentation. you mentioned not have calculation lastrow. always put option explicit @ top of module. forces declare variables , recognize if got coder "built-in" or not. see this post determining last row in range. from post, should have calculation such following before line of code ... lastrow = sheets("shee...

Difference between String[] (with square brackets) and String (without square brackets) in Java -

this question has answer here: how declare , initialize array in java? 17 answers just starting learn java, found " string " in function has 2 square brackets beside: public static void main (string[] parameter){ system.out.println("hello world"); } but 1 has not: public void setname(string name){ this.name = name; } what diference? [] signifies array, or list of many strings, whilst string 1 string.

java - Is it ok if a worker thread that pulls from a BlockingQueue never exits in android? -

i have thread looks this: public void run() throws interruptedexception { while(true) { string cururl = taskqueue.take(); ... } } i know can change true volatile variable, , set false when no longer need it, used throughout application, difficult tell when no longer needed. i wondering if having infinite loop have visible effect on performance of rest of android vm, if left in blocked state when app not running. edit 1: code starts thread start if not running. as taskqueue blocking queue, no. leaving thread running throughout application's life not cause noticeable effect. if taskqueue wasn't blocking would. application consume near whole core of processing power looping fast can. a blocking queue cause thread invoking method 'take' halt until there result available return. non-blocking queue return null or throw exception.

ios - Integrate Yelp API into Swift Application -

i trying build iphone application capabilities of searching yelp's database using api. have never used api before (i'm student- not professional development experience), need simple walkthrough on how pull data overall, filter, , authenticate myself data. i'd learn how save location's identifier plist app can store places user visited. appreciated. thank you! i found online, can't make sense of it. can explain? class yelpclient: bdboauth1requestoperationmanager { var accesstoken: string! var accesssecret: string! required init(coder adecoder: nscoder) { super.init(coder: adecoder) } init(consumerkey key: string!, consumersecret secret: string!, accesstoken: string!, accesssecret: string!) { self.accesstoken = accesstoken self.accesssecret = accesssecret var baseurl = nsurl(string: "http://api.yelp.com/v2/") super.init(baseurl: baseurl, consumerkey: key, consumersecret: secret); var token = bdboauthtoken(token: accesstoke...

android - ViewPager and Fragment not attached -

i trying implement tab view fragment fragment didn't appear. had linked viewpager.but still didn't work. this mainactivity package com.example.minkhantlu.timetableapp; import android.support.design.widget.tablayout; import android.support.v4.content.contextcompat; import android.support.v4.view.viewpager; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.view.layoutinflater; import android.widget.tablelayout; import com.example.minkhantlu.timetableapp.fragment.viewpageradapter; public class homeactivity extends appcompatactivity { private tablayout tablayout; private viewpager viewpager; private viewpageradapter viewadapter; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_home); tablayout = (tablayout) findviewbyid(r.id.tab_layout); viewpager = (viewpager) findviewbyid(r.id.my_view_pager); viewadapter = new viewpageradapter...

javascript - jquery not working in PyQt -

i writing small desktop app in pyqt python has qweb view browser. adding functionality browser when user select text using mouse , right click , press show xpath javascript executed find xpath. here code : @pyqtslot() def slotshowxpath(self): text = self.selectedtext() if not text: qmessagebox.information(self,"information","no text selected") else: frame = self.page().mainframe().documentelement() #print frame.tohtml() #abc = frame.document() #abc.evaluatejavascript("alert('"+self.page().selectedhtml()+"');") frame.evaluatejavascript("""var data = window.getselection().anchornode.parentnode; getxpath(data); function getxpath( element ){ alert(element); var xpath = ''; ( ; (element && element.nodetype) == 1; element = element.parentnode ) { var id = $(element.parentnode).children(element.tagname).index(element) + 1; id > 1 ? (id = '[' + i...

Set screen size for simulation of smaller screen on Android tablet? -

from question , know possible set screen size of each layout simulate smaller screen size on android tablet. how can set "global" screen size across whole app simulate smaller screen size? i have sony xperia z tablet (10"), , simulate 7" tablet resolution 768 x 1024. at top of layout file when viewing in android studio see button drop down second left top , looks 2 phones on top of each other. click on , should simulate either or can use geny motion , emulate phones resolution

javascript - Calculating angular velocity after a collision -

i've got linear component of collision resolution down relatively well, can't quite figure out how same angular one. i've read, it's like... torque = point of collision x linear velocity . (cross product) tried incorporate example found code don't see rotation @ when objects collide. other fiddle works rudimentary implementation of seperating axis theorem , angular velocity calculations. here's i've come with... property definitions (orientation, angular velocity, , angular acceleration): rotation: 0, angularvelocity: 0, angularacceleration: 0 calculating angular velocity in collision response: var pivota = this.vector(bodya.x, bodya.y); bodya.angularvelocity = 1 * 0.2 * (bodya.angularvelocity / math.abs(bodya.angularvelocity)) * pivota.subtract(iscircle ? pivota.add(bodya.radius) : { x: pivota.x + boundsa.width, y: pivota.y + boundsa.height }).vcross(bodya.velocity); var pivotb = this.vector(bodyb.x, bodyb.y); bodyb.angularvelocity = 1 * ...