Posts

Showing posts from February, 2011

ios - get data from combination of dictionary and array from plist in swift 2.2 -

i hava plist file configuration this. its root dictionary has 3 item, item1,item2,item3 item 3 array . when values of root_dict, item3 returns value array . item3 has item (item4) dictionary . item 4 has item(item5) i want value of item5 root_dict item1 --- string item2 --- dict item3 --- array | ------ item 4 ---- dic | -------------item5----array i using below code: var mydict: nsdictionary? if let path = nsbundle.mainbundle().pathforresource("info", oftype: "plist") { mydict = nsdictionary(contentsoffile: path) //mydict has 3 item } var dicdata = mydict!["item3"] as! dictionary<string, anyobject> (key, value) in dicdata{ print(key) } its not working. any kind of highly appreciated. i totally agree @nirav follow might work you. var mydict: nsdictionary? if let path = nsbundle.mainbundle().path

plugins - Allow only single attachments to notes for a specific entity in ms crm 2013 -

i need allow single attachment specific entity's note section. need develop plugin same. message should displayed user informing him single document allowed per audit rules , user should contact production services remove unwanted documents. please me understand on entity , event need fire plugin. thanks in advance!!! register pre-operation synchronous plugin on create message of annotation . in plugin see if there exists other annotations related same record (using objectid field) attachments (using boolean isdocument ). in case another note attachment exists, throw exception message user, result in note not being created.

EmEditor Highlight row with matching symbol -

how can make emeditor highlight or mark whole line when when there "£" symbol in second column of row. in find dialog can change default "select all" "bookmark all". bookmark selects whole line. you?

Dictionary inside dictionary in javascript -

i have data sets. example, a,b , c. there sets of these values. example:- [a:asd, b:ajs, c:aknd], [a:sdf, b:gss, c:fdss], [a:ijq, b:cba, c:jqwd] etc. now want make dictionary containing these values separate dictionaries. example:- { { a:asd, b:ajs, c:aknd }, { a:sdf, b:gss, c:fdss }, { a:ijq, b:cba, c:jqwd } } can me out this. tried doing it's not making dictionary. for( var i=0; i< n; i++) { data += { "a":value1, "b":value2, "c":value3 } } any inputs? this not make sense in javascript: { { a:asd, b:ajs, c:aknd }, { a:sdf, b:gss, c:fdss }, { a:ijq, b:cba, c:jqwd } } if intend have object (dictionary) integer keys, so: var data = {}; for( var i=0; i< n; i+

algorithm - Connect an even number of nodes without intersection -

Image
i have 2 sets of n nodes. want connect each node 1 set node other set. resulting graph should have no intersections. i know of several sweep line algorithms ( bentley-ottmann-algorithm check intersections occur, couldn't find algorithm solve intersections, except brute-force approach. each node 1 set can connected other node within other set. any pointers (an efficient) algorithm solves problem? no implementation needed. edit1 : here 1 solution problem n=7 : the black dots set of nodes , red dotes set. each black node has connected 1 red node lines connecting them not crossing. edit2: to further clarify: positions of nodes fixed , resulting graph have n edges. don't have proof solution exists, couldn't create example there no solution. i'm sure there proof out there somewhere creating such planar graph possible. also, one solution needed, not possible solutions. when solution exists (see comment giving example instance not), can found fi

php - Mails bounce due to Google IPv6 standards -

i using mail() function in php in order send mails using smtp , noticed not getting lot of mails suppose get. a quick view @ /var/log/maillog in server have shown lot of emails getting bounced message: "our system has detected message not meet ipv6 sending guidelines regarding records , authentication. please review https://support.google.com/mail/?p=ipv6_authentication_error more information" is there standard mailing process should follow satisfy google? this example of 1 of mails fail most of times: mail('my_email_goes_here', 'some title', 'my html message, including html tags such <ul> , <li>', 'mime-version: 1.0\r\n content-type: text/html; charset=utf-8\r\n'); for record, of emails getting sent, majority bounce, maybe it's not structure of mail content? a few month ago, had same problem. response google didnt much, means: "there wrong, find out whats problem". have c

java - Using NOT_CONTAINS in conditional write via DynamoDBMapper -

i want update record in dynamodb table based on below condition states "update record when attribute value belongs none of values specified in list". code snippet: attributevalue inprogressstatus = new attributevalue("in_progress"); attributevalue successstatus = new attributevalue("success"); expectedattributevalue expectedattributevalue = new expectedattributevalue(); expectedattributevalue.setattributevaluelist(arrays.aslist(inprogressstatus, successstatus)); expectedattributevalue.setcomparisonoperator(comparisonoperator.not_contains); while executing conditional update receiving following exception: com.amazonaws.amazonserviceexception: 1 or more parameter values invalid: invalid number of argument(s) not_contains comparisonoperator (service: null; status code: 400; error code: validationexception; request id: null). please let me know how can achieve functionality using not_contains operator. not_contains can have single at

java - Gradient descent for linear regression is not working -

i tried making program linear regression using gradient descent sample data. theta values not give best fit data. have normalized data. public class onevariableregression { public static void main(string[] args) { double x1[] = {-1.605793084, -1.436762233, -1.267731382, -1.098700531, -0.92966968, -0.760638829, -0.591607978, -0.422577127, -0.253546276, -0.084515425, 0.084515425, 0.253546276, 0.422577127, 0.591607978, 0.760638829, 0.92966968, 1.098700531, 1.267731382, 1.436762233, 1.605793084}; double y[] = {0.3, 0.2, 0.24, 0.33, 0.35, 0.28, 0.61, 0.38, 0.38, 0.42, 0.51, 0.6, 0.55, 0.56, 0.53, 0.61, 0.65, 0.68, 0.74, 0.87}; double theta0 = 0.5; double theta1 = 0.5; double temp0; double temp1; double alpha = 1.5; double m = x1.length; system.out.println(m); double derivative0 = 0; double derivative1 = 0; { (int = 0; < x1.length; i++) { derivative

Magento SSL connect error -

Image
when try install plugin through magento connect or try upgrade magento through ssh, ssl connect error. can't find proper solution. can me out?

unity3d - IAP in iOS stopped working -

we using unibill in unity make in-app purchases ios have been working more 1 month , testing , works fine on ios (we have android , it's working) the items added on waiting app submission , because haven't submitted new version of app itunes connect after submitted new version review accepted , in app items status changed accepted . at point stopped being able purchase items either sandbox or testflight , storekit returning no items @ all i'am 99% sure error not related code because haven't changed more month , able purchase perfectly the 2 changes are: * app accepted , consumable items status changed accepted * not sure if related renewed our developer account in member center 2 days ago , not sure if related problem in anyway any ideas problem?? can not test purchase after it's accepted anymore? thanks in advance i have no idea solved problem , seems apple's side it wasn't working 3 days, , started working fourth day without

javascript - keypress event not capturing target value in ES6 -

i've been refactoring small javascript project es6 , noticed keypress event listener applied text input not including pressed character in target value event. behaviour can seen in fiddle: http://jsbin.com/yayinalato/edit?js,console,output $input = document.queryselector('.input') $input.addeventlistener('keypress', (e) => { console.log(e.target.value) }) the keyup event works captures non-text input keypresses arrow keys etc undesirable this. why i'm confused why keypress event not work under impression keyup had happen keypress. how can value of target include key pressed event? explanation of how these events captured helpful. e.target refers element triggered event, input field. if check e.target.value value of input field @ moment keypress event fired. happens before text entered in field. what need use e.keycode check key pressed. $input.addeventlistener('keypress', (e) => { console.log("keypressed "

javascript - How to use Redux Framework Text Field option for Simple Weather JS -

hello using simple weather js ( http://simpleweatherjs.com/ ) in wordpress theme showing live weather , options using redux framework. i've create text field "name of city" , option unique id > " cpv-hm-cat-op-8 ". preview of redux framework option below. array( 'id' => 'cpv-hm-cat-op-8', 'type' => 'text', 'title' => __( 'name of city', 'redux' ), 'desc' => __( 'write city want show in weather', 'redux' ), 'default' => 'new york', ), now want use option in simple weather js file , want output, when input name of city show in weather of city. simple weather js option => $.simpleweather({ location: 'new jersey', woeid: '', unit: 'c', success: function(weather) { html = '<h2><i class="symbol-weather icon-'+weather.code+'"></i> '+w

jquery - Wait untill nested functions complete to continue next .each() -

how can make .each() wait until nested functions completed? heres code html: <div> <p>text 1</p> <p>text 2</p> <p>text 3</p> </div> jquery: function function1(){ $.get(geturl, function(data) { if(data == "false"){ postlog("error: not product number or description", "error");`//postlog adds new line on page log` }else if(data == "true"){ postlog("retrieved product number , description", "proccess"); postlog("completed crawl", "success"); } }); } function function2(){ //do stuff } $('p').each(function() { function1(); function2(); }); basically functions 1 & 2 text 1, once functions complete functions 1 & 2 text 2... if has ideas great. edit sorry forgot mention few details.. in function 1 calls external ph

c - dynamic and stack memory allocation done by the compiler? -

i know there several types of memory allocation. taking c language example, have static allocation, stack allocation, heap allocation. i understand static allocation done compiler, other 2 takes place on run time. responsible that, compiler, process or operating system? i'm asking if compiler involved in running program? os responsible stack , heap memory allocation. the os allocate stack memory every thread , language runtime calls os allocate heap memory.

Search invisible characters in mysql -

there columns in mysql table contain values such "sbeed pharmaceuticals åÊ" . 2 questions: how prevent getting these characters getting table in first place ? how find rows containing these characters ? here table: create table `drugs` ( `drug-id` int(10) unsigned not null auto_increment, `th-class` varchar(512) default null, `division` varchar(512) default null, `name` varchar(512) default null, `brand-name` varchar(64) default null, `pack` varchar(512) default null, `rx-type` varchar(16) default null, `pack-form` varchar(128) default null, `available-in` varchar(512) default null, `mrp` double default '-1', `mrp-per-unit` double default null, `manufacturer` varchar(512) default null, `schemes` text, `drug-status` varchar(64) default 'new', `created-by` varchar(512) default null, `created-at` datetime default current_timestamp, `approved-at` datetime default null, `approved-by` varchar(512) default null, `dos

winforms - Refreshing a specific instance of a form from another form in vb.net -

ok, google-fu may weak, i'm having issue seems should pretty easy past, try not working. , have special case makes many examples not relevant application. here's i'm trying do: have listbox on form1 populated database. have button on form1 opens form2 user can enter date , time. date , time, plus additional info, written database, , form2 closes. what i'm wanting have write or close event on form2 cause refresh of info in listbox in form1. the 1 major consideration user might have 20+ instances of form1 opened @ 1 time. want refresh form1 spawned it. i have many buttons on form1 correctly refresh listbox following code: private sub refreshtimeline() timelinelistbox.items.clear() try myconnection.connectionstring = connstring myconnection.open() dim str string str = "select tleventtime,tleventnotes timeline eventid = '" & eventid & "'" dim cmd5 oledbcommand = new oledbcomm

angular - Webpack generated file error : "t.replace is not a function" -

Image
i'm working on sample angular 2 app webpack generates js , css files. ran app web application on jboss 7.1 successfully, when tried use portlet application on websphere portal 7, following error occurred: my guess replace function not called on string variable (as should), have no idea, why happening (only on portal). can me understand stacktrace above? here's webpack configuration if helps: var webpack = require('webpack'); var htmlwebpackplugin = require('html-webpack-plugin'); var extracttextplugin = require('extract-text-webpack-plugin'); var helpers = require('./helpers'); module.exports = { entry : { 'polyfills' : './src/polyfills.ts', 'vendor' : './src/vendor.ts', 'app' : './src/main.ts' }, resolve : { extensions : [ '', '.js', '.ts' ] }, devtool: 'source-map', output: { path: helpers.

c# - Awaiting multiple tasks in a loop -

i need call webservice multiple times because has limit of 100 objects returned per call, , want in parallel. i'm making task each web service call , stop when task returns less limit of items, means there no more items get. public static async task<list<space>> getspacesbytypeparallel(spacetype type, string ticket, int degreeofparallelism) { int offset = 0; int batchsize = degreeofparallelism * return_limit; list<space> spaces = new list<space>(); task<list<space>>[] tasks = new task<list<space>>[degreeofparallelism]; bool shouldcontinue = true; while(shouldcontinue) { for(int = 0; < degreeofparallelism; i++) { tasks[i] = task.run<list<space>>( () => getspacesatoffset(offset + (i * return_limit), return_limit, ticket, null, type.tostring()) ); //getspacesatoffset synchronous method } list<space>[] result = await task.whenall(tasks

javascript - Esri MAP Showing ARE.StreetName instead of Actual street name or address. -

i using esri map geocodes method retrieve addresses of particulars pointer. e.g if person clicked on streets of map, there info window open these informations. adress, city , address. other informations retrieving in streets section showing usa.pointaddress. don't know why ${loc_name} not showing proper street , city showing location. @ fiddle reference. any regarding issue appriciated. // add location map code star here // /* esri map geolocation */ var map, gsvc, pt; var o; function getaddress() { $("#txtincidentlongitude").val(o.location.x); $("#txtincidentlatitude").val(o.location.y); $("#txtincidentstreet").val(o.address.loc_name); $("#txtincidentarea").val(o.address.neighborhood); $("#txtincidentcity").val(o.address.city); $("#txtincidentemirate").val(o.address.region); };

angularjs - how to load all user js files after @RenderBody() complete in MVC single page application -

when generate mvc5 app using angularjs, _layout.cshtml has @scripts.render @ end of file after @renderbody(), @scripts.render contains animation related script, these script should execute after @renderbody() elements loaded. scripts included page before @renderbody() elements loaded completely, script not applying dom elements. i'm new mvc & angularjs single page application. please me achieve this. what correct approach? thanks in advance!

matlab scatter plot using colorbar for 2 vectors -

Image
i have 2 columns of data. x = model values of nox concentrations , y = observations of nox concentrations. now, want scatter plot x, y (markers varying colors) colourbar show me counts (i.e. number of data points in range). x , y daily data year, i.e. 365 rows. please me. appreciated. have attached sample image. if understand correctly, real problem creating color information, is, creating bivariate histogram . luckily, matlab has function, hist3 , in statistics & machine learning toolbox. syntax is [n,c] = hist3(x,nbins) where x m -by-2 matrix containing data, , nbins 1-by-2 vector containing number of bins in each dimension. return value n matrix of size nbins(1) -by- nbins(2) , , contains histogram data. c 1-by-2 cell array, containing bin centers in both dimensions. % generate sample data x = randn(10000, 1); y = x + rand(10000, 1); % generate histogram [n,c] = hist3([x,y], [100,100]); % plot imagesc(c{1},c{2},n); set(gca,'ydir','normal&#

r - Xgboost, max number of cores -

i running xgboost in r on windows server 2008 r2. i have 4 xeon e7 10 cores each. (80 threads total) i run xgboost nthread = 80 r uses 40 . xgboost somehow reduces number of threads, depending on input data? does had similar problems? i think doesn't work hyperthreading x2 thread from xgboost site https://github.com/dmlc/xgboost/blob/master/doc/how_to/external_memory.md performance note the parameter nthread should set number of real cores modern cpu offer hyperthreading, means can have 4 core cpu 8 threads set nthread 4 maximum performance in such case

android - Creating a custom menu using a layout inflator, how do I reference each component? -

this item i'm inflating: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="100dp" android:background="@drawable/background_border" android:padding="10dp" > <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="account name" android:textsize="25sp"/> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="balance: £61.43" android:textsize="25sp" android:paddingtop="40dp"/> <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_keyboard_arrow_right

beagleboneblack - Add tcpdump in yocto build (Beaglebone Black) -

i want add tcpdump yocto build i found need add meta-networking bblayers.conf . meta-networking apart of meta-openembedded following steps followed : downloaded complete meta-openembedded : git clone git@github.com:openembedded/meta-openembedded.git checked out jethro branch , confirmed meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb present added meta-networking , dependent packages bblayers.conf bblayers /home/linux/work/yocto/poky/meta-openembedded/meta-oe \ /home/linux/work/yocto/poky/meta-openembedded/meta-networking \ /home/linux/work/yocto/poky/meta-openembedded/meta-python \ triggered full build , copied images onto sdcard. i still unable see tcpdump binary after booting bbb(beaglebone black). pretty sure missing something. new yocto. guidance helpful. you need add tcpdump image recipe. quick test, add following line conf/local.conf : image_install_append = " tcpdump" (note leading space in assignment). adding layer

assembly - invalid instruction suffix for `mov' (movw %ax, %ebx) -

when try compile following program: .globl _start .section .text _start: movw $-23, %ax movl $-1, %ebx # -1 = $0xffffffff movw %ax, %ebx movl $1, %eax movl $0, %ebx int $0x80 i error message: demo.s: assembler messages: demo.s:7: error: invalid instruction suffix `mov' so, root of proglem lies here: movw %ax, %ebx but thing don't think i'm doing totally wrong plus that's example used in book i'm reading: professional assembly language richard blum (2005) you didn't write, want program. first put -23 ax , -1 ebx , try move ax ebx , not valid on x86 processor, ax 16bit, , ebx 32bit register. mov can't convert width of data during processing. to make work there 2 basic options. if want lower 16b of ebx modified (by 16b ax ), can mov %ax, %bx , keeping upper 16b of ebx intact. (in case result -23 in

jquery - Is it possible to use php to write in the tables and already use datatable to make tables optimize? -

Image
i have more 1 table in 1 view , use jquery make them hide , show.i have array $works contains arrays of works.each array contains data rows of each table. use datatable optimize tables using pagination , able search. but seems datatables doesn't know blade language , php . set datatable show me in each page 10 row of table.but when table has more 10 rows shows me rows , shows: showing 1 1 of 1 entries the above expression. <div class="col-md-offset-1 col-md-7"> <?php $i = 0 ?> @foreach($works $work) <!--<div class="panel navbar-inverse"> <div class="panel-heading panel-amir"> <p href="#">current works</p> </div>--> <?php $i+=1; ?> <div id="{{$dep->id}}" class="panel-body testimonial" data-index="{{$i}}"> <table cellpadding="0" cellspacing="0" border="0"

postgresql - calling functions in pg_temp schema without prefix -

in postgres pg_temp schema default on search path. explained tom lane here functions in pg_temp schema not callable default without prefix security reasons. however states in order call functions in pg_temp schema without prefix have explicitly add temp schema search path. unfortunately of postgresql 9.4 doesn't seem work anymore. set search_path pg_temp,public; -- create function in temp schema create function test_fun() returns int $$ select 1; $$ language sql; -- results in "function test_fun() not exist" select test_fun(); -- works select pg_temp.test_fun(); is there way call functions in pg_temp schema without prefixing them? this highly convenient developing new functions. looks tome lane not 100% precise on 1 – checked 9.2 9.5, , in each of these need qualify function pg_temp . setting search_path not enough. see postgresql commit aa27977fe21a7dfa4da4376ad66ae37cb8f0d0b5 : support explicit placement of temporary-table schema within

javascript - Toggle element on selection from dropdown menu in Bootstrap 3.0 -

i'm using bootstrap 3.0 ruby on rails 4.2.5 , , need make in form when user selects option "no" drop down menu, next text field shown them, otherwise, text field remains hidden. i've found similar question solution, couldn't implement bootstrap form, attempt @ : dropdown input: <%= f.select :answer, [["yes", 1], ["no", 0]], label: "do wish bla bla? ", class: "selectpicker", id: "selectpicker" %> toggled input (should show when "no" picked) : <%= f.text_area :explain , label: "please explain why not", id: "sdd"%> javascript: ` ("selectpicker").change(function changetextbox()); function changetextbox() { if (document.getelementbyid("selectpicker").value === 0 ) { document.getelementbyid("sdd").disable='true'; } else { document.getelementbyid("sdd").disable='false';

security - How to have HTTPS on Github page with custom domain -

i stumbled across page , wonder how have https custom domain on github page https://github.com/2factorauth/twofactorauth https://twofactorauth.org/ there's bunch of solutions centered around using free cloudflare account. here's link instructions: https://blog.cloudflare.com/secure-and-fast-github-pages-with-cloudflare/

r - Dygraph legend time-date format change to include day of week -

hello using r dygraphs package, , able change legend time-date format include day of week (i.e. "%a") i have looked in dyoptions , dylegend cannot see me this... below simple example...but ideally in shiny app... library(dygraphs) library(xts) dygraph(xts(rnorm(100),sys.time()+seq(100)),main='random_graph')

ms access - Autonumber combo box field up to value from record? -

i have table sets attributes part assemblies, each assembly gets number of parts. have form new table parts each assembly entered. have combo box fill number of part numbers, control input user has. if assembly has entry "#parts" in record in "tblassembly" combo box "cbopartnumber" in form "parts" fill 1:#parts each entry. in order attribute number of constant values combo box, first set combo box's row source type property value list . (the default table/query ). now can enter list of values in row source property "1;2;3;4;5". if list variable, can in loop this: private sub setpartnumbers(byval n long) dim long dim s string s = "1" = 2 n s = s & ";" & next me!combo1.rowsource = s end sub

sql - when one column null then get data from other column -

hope can help. not showing whole query because don't think required want try , query see there null value in 'street' in 'free address' , put result in there. i'm guessing involves case expression or concat current result select idnum street free address id idnum street free address 1 stack on flow null 2 null stack exchange 3 downing street null required result - note free address column doesn't need on display, purpose of demonstration. idnum street free address 1 stack on flow null 2 stack exchange stack exchange 3 downing street null many help the coalesce() function this: select idnum, coalesce(street, free_address) street, free_address id; note: id strange name table , free address

java - Why does my query performance drastically drop? -

Image
using following criteriabuilder returns results within 1 second when have map of 1 or 2 entries, when reaches 3 performance of query drops. adding 4th entry drops performance more point i've not seen return result set. i have tried use sub-queries instead seems come across similar issue 2 exists sub-queries return data within reasonable time 3 or more result in large performance hit. i have noticed without order query works great 3 entries ( 1 second or less ), add on same 3 entries search takes on 30 seconds. here builder: criteriabuilder builder = em.getcriteriabuilder(); criteriaquery<study> q = builder.createquery(study.class); root<study> rootstudy = q.from(study.class); list<predicate> plist = new arraylist<predicate>( searchmap.size() ); q.select(rootstudy); join<study, demographics> dem = rootstudy.join( "demographics" ); join<study, metadata> met = rootstudy.join( "metadata" ); // add conditions (map.en

javascript - JXA NSFileManager createDirectoryAtPathWithIntermediateDirectoriesAttributesError exception -

i'm using following jxa (javascript automation) code on os/x 10.11.5: function createfolder(path, createintermediatedirectories) { var error = {} $.nsfilemanager.defaultmanager .createdirectoryatpathwithintermediatedirectoriesattributeserror( $(path).stringbystandardizingpath, createintermediatedirectories, null, error); if (error) throw error("could not create folder '" + path + "'"); }; i error when running this, although create folder. here's error: error: exception raised object: -[nsnull objectforkey:]: unrecognized selector sent instance 0x7fff7b69b780 (-2700) judging fact folder created, , text of error message, i'm assuming issue "attributes" parameter, null (nil). figure creates folder, goes assign attributes, , that's when fails. anyone got ideas how fix this? haven't had trouble calling of other nsfil

sql - Find all ERDs containing table with specified name -

is possible can query names of erds (entity relationship diagram) contain table name like '%mytable%' something this: select * <erd objects> tablename '%%' actually, have large database lots of erds . so, understand scope of table want browse erds of specific table. as understand need list of tables contained in database diagrams. there can article . add part of here: the diagram stored in binary field. , can not convert readable form without difficulties. deserializing field (called definition ) need 2 functions: create function [dbo].[tool_varbinarytovarchar_text] ( @varbinaryvalue varbinary(max), @bitasciionly bit = 0 ) returns varchar(max) begin declare @numberofbytes int set @numberofbytes = datalength(@varbinaryvalue) -- part 1 -- if (@numberofbytes > 4) begin declare @firsthalfnumberofbytes int declare @secondhalfnumberofbytes int set @firsthalfnumberofbytes = @numberofbytes/2 set @secondhalfnum

Watson Dialog service on BlueMix: Forwarding error -

i have created instance watson dialog service on bluemix. i'm authenticating dialog api through mobilefirst adapter using basic authentication specified in ibm watson dialog api reference . i'm providing username , password provided in service credentials service instance in bluemix. when call adapter response: { "code": 500, "issuccessful": true, "message": "forwarding error", "responseheaders": { "connection": "keep-alive", "content-type": "application\/json", "date": "tue, 12 jul 2016 13:41:04 gmt", "server": "-", "set-cookie": "watson-dpat=zrbng044chnee09pm0uoakxqvby4fzhxwj6%2bb4mweykg56h873g%2f0a1jktbh8zwk7njjgytkx1saekclhk4cozhad0pwuorrrdwkixhauh03ueneqydwh6n0wbivxnwooaaoxumaqtdxfw%2bmhtwngxyze47tzyk7idsvsv%2f0bhloaf6gs8yewaamx7b7tfqchtfoq3%2fif7tbktyfj9l8tuiqrwzylljcwv5typn93j1k

angularjs - Angular: how to close a sidenav with the BACK button -

developping angular application left sidenav, of our users find usual close sidenav when press button of mobile, or left swipe. for left swipe, ok (with md-swipe-right=...). find nothing using button. there nice way it? how should location changed event catched , prevented (or that)?

Who created UWSGI? -

even if banned after posting question! have people considering error message such [emperor] unloyal bad behaving vassal found: web2py.ini throttling it... informative , @ same time targeting software enterprise, should not have access keyboard! as not allows work!!! our civilization depends critically on software, , have dangerously low degree of professionalism in computer fields - bjarne stroustrup here am, guilty 1 should never touch keyboard :) frankly speaking idea nerd culture (in area) can considered unprofessional, scares me lot. (badly, obviously) work because nerd, because sci-fi, game , (me , company) stupid , unprofessional release free tons of line of codes, in additional hours of free support given other companies , people. funny thing have joined irc channel or mailing-list, or post standard request stack overflow, , dozens of people have helped you. by way, here note loyalty , throttling (nothing in deep should start): http://uwsgi-docs.rea

ruby on rails - How do I create a self join item when it also belongs to another model? -

i’m trying make self join relation model named: subsystem. in case subsystem represents java package, class or method. i’ve read rails documentation saw use this: class subsystem < activerecord::base has_many :child_subsystems, class_name: "subsystem", foreign_key: "parent_id" belongs_to :parent, class_name: "subsystem" end i looked @ couple examples in cases “create part” not described. problem i’m looking best way create subsystems, because: subsystem model belongs project. right create subsystems like: project.subsystems.create(params) i hope image make’s better understand. project, can have 0 multpiple subsystems, , every subsystem can have 0 multiple subsystems. subsystems i’ve seen examples of making self join, people created item relation build, i’m not sure how combine existing create: project.subsystems.create. can me out? in advance! the way created self join association spot on. if

javascript - How to access image pixel data in react-native -

i have image loaded camera roll or other source, local one. how can access pixel data map perform calculations or measurements? there way of getting information using native modules, have android implementation @ moment. tested on rn 0.42.3. first of all, you'll need create native module in app. assuming application initialized name sampleapp , create new directory in react native project android/app/src/main/java/com/sampleapp/bitmap 2 files in it: android/app/src/main/java/com/sampleapp/bitmap/bitmapreactpackage.java package com.sampleapp; import com.facebook.react.reactpackage; import com.facebook.react.bridge.javascriptmodule; import com.facebook.react.bridge.nativemodule; import com.facebook.react.bridge.reactapplicationcontext; import com.facebook.react.uimanager.viewmanager; import java.util.arraylist; import java.util.collections; import java.util.list; public class bitmapreactpackage implements reactpackage { @override public list<class<?

c# - Convert a Collection of Strings into Collection of GUID -

i reading collection of strings (of guid format) excel , want store them in database collection of guids . wondering there clean way convert list<string> list<guid> using linq . not interested in looping through. either linq: list<guid> guids = guidstrings.select(guid.parse).tolist(); or list.convertall little bit more efficient because knows size: list<guid> guids = guidstrings.convertall(guid.parse);

Digitally signing PDF's using certificate in my webpage -

i have own webpage www.kasperikoski.fi is, way see it, trusted, , have ability digitally sign pdf-documents using kind of sertificate put webpage people know me signing these documents. at first thought maybe share "public key" @ bottom of webpage, heard openssl. used in needs? how carry out 1 use pdf's integrated "sign digitally"-option? assuming read question right, want let web site visitors way download documents, created or maintained web site, , want documents digitally signed. if document pre-created, it's possible sign during creation (either tool generates them, or create separate piece of code signing). if documents generated on-the-fly, web site should include signing capabilities. to perform signing need certificate private key. not every certificate work. certificate need should suitable data signing, rather ssl/tls. can try obtain certificate site ca , use signing documents. whether users' software accept such certifica

java - Sigining a PDF using USB driver in server client condition -

i doing project need sign pdf using usb based digital signature. have tried following code locally , able sign pdf. problem weather following code work in client server based senerio. my code is: import com.lowagie.text.documentexception; import com.lowagie.text.pdf.pdfreader; import com.lowagie.text.pdf.pdfsignatureappearance; import com.lowagie.text.pdf.pdfstamper; import java.io.fileinputstream; import java.io.filenotfoundexception; import java.io.fileoutputstream; import java.io.ioexception; import java.security.keystore; import java.security.keystoreexception; import java.security.nosuchalgorithmexception; import java.security.privatekey; import java.security.security; import java.security.unrecoverablekeyexception; import java.security.cert.crl; import java.security.cert.certificate; import java.security.cert.certificateexception; import javax.servlet.requestdispatcher; import org.bouncycastle.jce.provider.bouncycastleprovider; import sun.security.mscapi.sunmscapi; publi