Posts

Showing posts from February, 2011

ios - awakeFromNib method is getting called twice UITableViewCell -

Image
i using xib create uitableviewcell in view controller. registered cell class table view follows: self.tableview.register(uinib(nibname: "thisweekcell", bundle: nil), forcellreuseidentifier: "thisweekcellidentifier") in cellforrowat indexpath method dequeuing cell follows: tableview.dequeuereusablecell(withidentifier: "thisweekcellidentifier") as! thisweekcell when dequeuing cell, cell's awakefromnib method getting called twice. in first call outlet properties set in second call nil. the problem facing is: none of constraints set in xib file getting reflected when displaying cell.

node.js - How to index a JSON document directly from memory -

i'm trying index json document, isn't working; far, have tried solutions posted in https://developer.ibm.com/answers/questions/361808/adding-a-json-document-to-a-discovery-collection-u/ , not work; if try: discovery.adddocument({ environment_id: config.watson.environment_id, collection_id: config.watson.collection_id, file: json.stringify({ "ocorrencia_id": 9001 }) }, (error, data) => { if (error) { console.error(error); return; } console.log(data); }); it returns me error: media type [text/plain] of input document not supported. auto correction attempted, auto detected media type [text/plain] not supported. supported media types are: application/json, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/pdf, text/html, application/xhtml+xml . on other hand, if try: discovery.adddocumen...

bash - Ubuntu script language doesn't work as expect -

this question has answer here: why doesn't “cd” work in bash shell script? 27 answers as beginner of bash script, wrote simple script change directory. here source code: #!/bin/bash set -x echo "---------------------start-----------" cd /home/cocadas/workspace/carnd/carnd-behavioral-cloning-p3 i save "start" in /root folder. change property of file executable, , run below. problem execution command cd doesn't work. did miss? cocadas@cocadas-thinkpad-w540:~$ ./start + echo ---------------------start----------- ---------------------start----------- + cd /home/cocadas/workspace/carnd/carnd-behavioral-cloning-p3 cocadas@cocadas-thinkpad-w540:~$ cd /home/cocadas/workspace/carnd/carnd-behavioral-cloning-p3 cocadas@cocadas-thinkpad-w540:~/workspace/carnd/carnd-behavioral-cloning-p3$ your ./start call creates sub shell. run sou...

python - chalice helloworld deployment issue -

i learning deploying basic helloworld app in chalice of https://media.readthedocs.org/pdf/chalice/latest/chalice.pdf error unable parse config file .aws/config need in resolving error

asp.net - Showing the error "A previous catch clause already catches all exceptions of this or a super type `System.Exception' " in my C# code -

showing error "a previous catch clause catch clause catches exceptions of or super type `system.exception' " in c# code using system; class test { static void main() { try{ int a=10,b=0,c=0;c=a/b ; console.writeline(c); } catch(system.exception e) { console.writeline(e.message); } catch(system.dividebyzeroexception ex) { console.writeline(ex.message); } } } exception handlers processed in order top bottom , first matching exception handler invoked. because first handler catches system.exception , , exceptions derive system.exception , it'll catch everything, , second handler never execute. the best practice multiple exception handlers order them specific general, this: using system; class test { static void main() { try{ int a=10,b=0,c=0;c=a/b ; console.writeline(c); } ...

unicode - Escaped Characters Outside the Basic Multilingual Plane (BMP) in Prolog -

for reference, i'm using prolog v7.4.2 on windows 10, 64-bit entering following code in repl: write("\u0001d7f6"). % mathematical monospace digit 0 gives me error in output: error: syntax error: illegal character code error: write(" error: ** here ** error: \u0001d7f6") . i know fact u+1d7f6 valid unicode character, what's up? swi-prolog internally uses c wchar_t represent unicode characters. on windows these 16 bit , intended hold utf-16 encoded strings. swi-prolog uses wchar_t nice arrays of code points , supports ucs-2 on windows (code points u0000..uffff ). on non-windows systems, wchar_t 32 bits , complete unicode range supported. it not trivial thing fix handling wchar_t utf-16 looses nice property each element of array 1 code point , using our own 32-bit type means cannot use c library wide character functions , have reimplement them in swi-prolog. not work, replacing them pure c versions looses optimization typicall...

android - how can i remove a particular item from recyclerview list -

i'm using retrofit parse json array server. want user customize json input in recyclerview tap few sec , remove option pop particular json object! in recyclerview , pass activity through intent , here intent activity incomplete . in advance public class mainactivity extends appcompatactivity { private static final string tag = mainactivity.class.getsimplename(); private view vm; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); final recyclerview recyclerview = (recyclerview) findviewbyid(r.id.places_recycler_view); recyclerview.setlayoutmanager(new linearlayoutmanager(this)); apiinterface apiservice = apiclient.getclient().create(apiinterface.class); call<placeresponse> call = apiservice.getdd(); call.enqueue(new callback<placere...

Polar decompotision in MATLAB -

Image
is there built-in function in matlab returns polar decomposition of square (real) matrix , e.g. returns 2 matrices (unitary) , (positive semi-definite symmetric/hermitian) such ? i'm not aware of builtins, can use singular value decomposition [u,s,v] = svd(a) matrices a = u*s*v' . in order polar decomposition compute b = u*v' , c = v*s*v' . easy see b unitary , c hermitian positive semidefinite properties of u , s , v .

Capture GET and POST with Javascript or Jquery -

is there way capture and/or post request being sent browser server? i have web app full page refreshes after requests made, , of pages have long response times server due long running queries on database. so after 1 of these requests made, view made stays visible while browser "waiting response server". i want add can applied globally capture whenever request made server, , trigger loading spinner run. like: ​window.onclick = function (e) { if (e.isgetorpost) { startloadingspinner(); } }​ update: not using ajax , post. requests coming hrefs , forms. since using mvc (the story tagged mvc), easy way see http method of current action, following way easy do: var httpmethod = "@viewcontext.httpcontext.request.httpmethod"; request.httpmethod returns string get, post, delete, etc. text rendered during view rendering only; won't change in ajax scenario, unless update variable. then can in js: if (httpmethod == "get...

javascript - how to pass default event argument and an argument in react? -

this function want invoke in input type: _handleonenterpress = (e, receiveruserid) => { if (e.keycode === 13) { // guess keycode 13 enter? console.log("pressed enter. user id = ",receiveruserid) } }; and input type want invoke when enter pressed, used onkeydown <input classname="popup-input" onkeydown={this._handleonenterpress(chatfriendpoppup.id)} onchange={this._handlemessagetextchange} type='text' /> when press enter, it's not logging on console. used e(event) default arg can detect keycode 13 (enter) guess if fails? since receiveruserid on 2nd index, not have pass e (event) arg on onkeydown when function invoked? have tried onkeydown={(e) => this._handleonenterpress(e, chatfriendpoppup.id)} ?

node.js - blocked user Json Query for mongodb -

i have 3 post in collection of 3 different user trying fetch post in views session (html, css) part need filter other 2 post posted other 2 user because have block functionality in view section. post allowed user have blocked her/his post not visible me , mine him. blockedbyuser : (this post json data) { "_id" : objectid("591729b52bb30a19afc9b89d"), "createdtime" : isodate("2017-05-13t15:43:49.381z"), "isdeleted" : false, "message" : "message two", "postedby" : objectid("598adbefb3bf0b85f92edc3b"), "recipient" : [ objectid("598ae453b3bf0b85f92ee331"), objectid("5910691ae2bcdeab80e875f0") ], "updatedtime" : isodate("2017-05-20t09:24:39.124z") } below 2 user post data have blocked , in recipient array key stores id recipient [598adbefb3bf0b85f92edc3b] block user 1 : { "_id" : objectid("591729b52bb30a19afc9b89d...

encryption - Check if zip or gzip is password encrypted (Node.JS) -

i've had bad time trying see if zip or gzip has password protected files. i'm used dotnetzip seeing in .net in node.js can't seem find equivalent. i'm able see if file gzip or zip checking lead bytes not if contain encrypted files, may gpg, traditional or aes. i've tried using packages unzip , unzip2 , adm-unzip haven't solved issues. i'm looking pure node.js implementation. at point, i'm considering writing own module solve issue. i'm using https://github.com/thejoshwolfe/yauzl#isencrypted @ current moment in time if else can find can pdf's , .docx files, that'd great!

sql - Aging - Calendar and Business Days Different Records of Data -

i using sql server 2012 , have aging question. tried include sample data below 4 records. filenumber filetype completeddate 90440 internal 8/11/2017 90440 strategy null 90441 internal 8/10/2017 90441 strategy null a strategies' aging calculated internal filetype's completed date way strategy filetype's completed date. every filenumber can have multiple filetypes associated it. if strategy's completed date null, internal filetype's completed date way today's date or getdate(). so i'm trying show count of pending strategies , current aging in business , calendar days...so want data return this. file number filetype agebusiness agecalendar 90440 strategy 2 4 90441 strategy 3 5 any clue on how go this? appreciated. something may work i'm not 100% sure since depends on sort of filetypes in table, whether accounting holid...

php - Magento Installation loops forever -

i have existing magento project , after following set of configurations steps supposed kick off magento project , running locally, failed. on browser accessing local server url, bypass localization , configurations steps (where specify db user , pwd , blah blah). when installation supposed take me admin creation page, went infinite loop(the page keeps redirecting me 'too many redirects on page' ). after digging hours, call responsible loop: in app/code/core/mage/core/model/app.php mage_core_model_resource_setup::applyallupdates(); what here have project , running.

data structures - Can we assign address of two nodes as a next of a one LinkedListNode in C#? -

i solving 1 program linked list data structure in c#, need check given linked list null terminated or ends cycle. want check different test cases, not able pass cyclic linked list input. how pass cyclic linked list input? problem hackerrank give idea, trying achieve? here code achieve linked list showed in image private static linkedlist<int> initializelinkedlist () { linkedlist<int> linkedlist = new linkedlist<int>(); linkedlistnode<int> item1 = new linkedlistnode<int>(1); linkedlistnode<int> item2 = new linkedlistnode<int>(2); linkedlistnode<int> item3 = new linkedlistnode<int>(3); linkedlistnode<int> item4 = new linkedlistnode<int>(4); linkedlistnode<int> item5 = new linkedlistnode<int>(5); linkedlistnode<int> item6 = new linkedlistnode<int>(6); linkedlist.addlast(item1); linkedlist.addlast(item2); ...

How to filter data and apply specific tags in R -

i filtering lowspenders master data file called "newdata" below. lowspenders = filter(newdata, monetary >= 0 & monetary <=91) how i: create additional column in r called "segment" name in segment of entries of filter(newdata, monetary >= 0 & monetary <=91) lowspender? i think dplyr verb looking mutate . tie in if_else , , get: mutate(newdata, segment = if_else(monetary >= 0 & monetary < 91, "lowspender", "not lowspender")

debugging - Reference - What does this error mean in PHP? -

what this? this number of answers warnings, errors , notices might encounter while programming php , have no clue how fix. community wiki, invited participate in adding , maintaining list. why this? questions "headers sent" or "calling member of non-object" pop on stack overflow. root cause of questions same. answers questions typically repeat them , show op line change in his/her particular case. these answers not add value site because apply op's particular code. other users having same error can not read solution out of because localized. sad, because once understood root cause, fixing error trivial. hence, list tries explain solution in general way apply. what should here? if question has been marked duplicate of this, please find error message below , apply fix code. answers contain further links investigate in case shouldn't clear general answer alone. if want contribute, please add "favorite" error message, warning or notic...

Checking state of NSButton Checkbox on Xcode for macOS apps swift 3 -

i have nsbutton checkbox on xcode using swift 3 making macos applications. i'm trying check state (whether on or off). options have found, such : if ([switch1 state] == nsonstate) { //code} when this, tells me inout comma after "switch 1". right, or version of code old swift 3? `@iboutlet weak var switch1: nsbutton! override func viewdidload() { super.viewdidload() if ([switch1 state] == nsonstate) { print("on") } }` update: looking @ later reference, correct line if (switch1.state == nsonstate) {//code}

c# - Why dont I see folder containing the minified files in ASP.NET MVC application -

i following this link bundle , minify js , css files in asp.net mvc application. most of suggestions available out of box. this how code looks: public static void registerbundles(bundlecollection bundles) { bundles.add(new scriptbundle("~/bundles/bundleone").include( "~/js/jquery-3.1.1.min.js", "~/js/bootstrap.min.js", "~/js/bootstrap-suggest.js", "~/js/internal.js", "~/js/abc.js")); bundles.add(new scriptbundle("~/bundles/bundletwo").include( "~/js/common.js")); } this how global.asax file looks: public class mvcapplication : system.web.httpapplication { protected void application_start() { arearegistration.registerallareas(); filterconfig.registerglobalfilters(globalfilters.filters); routeconfig.registerroutes(routetable.routes); bundleconfig.r...

javascript - JS: Correct require syntax instead using import -

normaly i'm using es6 syntax import things file: target.js import { articles } '/imports/fixtures.js' console.log(articles.main) fixtures.js export const articles = { main: { _id: '1234', title: 'anything' } } now need use fixtures.js file in testing modules, needs require syntax. but not work: var { articles } = require('/imports/fixtures.js') what correct syntax this? destructuring assignement recent feature, if version of javascript (i guess of nodejs) prior es2015, use: var articles = require('/imports/fixtures.js').articles n.b : nodejs supports of desctructuring assignment start v6 .

syntax - Starting a Background Process for a Python code -

i running python code command line command: python filename.py myuserid mypassword > logfile_date is there similar command can use either run process in background or spawn process run in background? thanks, ramani you can use cronjob run script in background. can specify run @ intervals or @ times (here's ubuntu documentation ) for example, here's cronjob might like: */10 * * * * /your/path/to/python /path/to/filename.py >> /path/to/logfile_date.txt this run script every 10 minutes , have output saved logfile_date.txt, in background.

android - Leak on ViewHolder and Recycler view with MVVM -

i'm having issue viewholder leaking reference context via simple toast this adapter (dummy data) public class changelanguageadapter extends recyclerview.adapter<languageviewholder> { @override public languageviewholder oncreateviewholder(viewgroup parent, int viewtype) { layoutinflater layoutinflater = layoutinflater.from(parent.getcontext()); itemlanguagebinding itembinding = itemlanguagebinding.inflate(layoutinflater, parent, false); return new languageviewholder(itembinding); } @override public void onbindviewholder(languageviewholder holder, int position) { string language = "dummy language"; holder.setlanguage(language); holder.bind(language); } @override public int getitemcount() { return 20; } } this viewholder public class languageviewholder extends recyclerview.viewholder { private itemlanguagebinding binding; private string language; public languageviewholder(itemlanguagebinding itemlan...

MySQL: Select one of each option cartesian product -

i have table like product name option type option value color red color green size m size l now need list of possible option combinations, i.e. product name options color: red, size: m color: red, size: l color: green, size: m color: green, size: l is doable in mysql?

ios - Using Objective-C framework in Swift project -

i want include objective-c framework in swift project. followed instructions append existing pod file , executed pod update the files downloaded without problems have trouble use new classes in project. know have create -bridging-header.h , there placed line #import "ssziparchive.h" but classes not found compiler.

python - cleanest way to glue generated Flask app code (Swagger-Codegen) to backend implementation -

i have: a library [stuff] a swagger api definition, #1 minor differences map cleanly rest service a flask app generated #2 using swagger-codegen - eg results in python controller functions one-to-one #1. my intent flask app (all generated code) should handle mapping actual rest api , parameter parsing match api spec coded in swagger. after parameter parsing (again, generated code) should call directly on (non-generated) backend. my question is, how best hook these without hand-editing generated python/flask code? (feedback on design, or details of formal design pattern accomplishes great too; i'm new space). fresh generator, end python functions like: def create_task(mytaskdefinition): """ comment specified in swagger.json :param mytaskdefinition: json blah blah blah :type mytaskdefinition: dict | bytes :rtype: apiresponse """ if connexion.request.is_json: mytaskdefinition = mytasktypefromswagger....

windows - Programmatically Determine Version of Office 2016 After Reverting to Previous Version C# -

i'm developing program needs confirm version of office 2016 user running, , ensure version compatible. in order compatible, user may need downgrade version of office 2016 (16.0.xxxx.xxx) previous version (16.0.yyyy.yyyy). according microsoft documentation , can programmatically revert previous version. after doing this, can open 1 of office programs, >file >account , see if version has reverted or not. however, when run program confirm newly reverted version of office (16.0.yyyy.yyyy), returns original version before reverting (16.0.xxxx.xxxx). since i'm searching registry, have tried restarting machine set , update changes in registry, has not helped. programmatically, i'm still returning wrong version (but in office program, shows me reverted version want.) how can determine version of office 2016 running right on computer, if it's previous, reverted version? my code of right ( determine if app installed ): string currentversion = string.empty; str...

c# - SQL VS EF VS LDAP Connection string TYPE testing -

i have 3 types of connection strings in webconfig, use them various parts of application such ldap login, db status of related non integrated db, , ef db first connection strings (edmx) i looking parse connection string data in economical way system wise. <add name="adconnectionstring" connectionstring="ldap://something.somewhere.something:389" /> <add name="dev" connectionstring="data source=source;initial catalog=test;integrated security=false;multipleactiveresultsets=true;app=entityframework;user id=tech;password=*********;" providername="system.data.sqlclient" /> <add name="configentities" connectionstring="metadata=res://*/data.config.csdl|res://*/data.config.ssdl|res://*/data.config.msl;provider=system.data.sqlclient;provider connection string=&quot;data source=source;initial catalog=catalog;persist security info=true;user id=user;password=*********;multipleactiveresultsets=true;applicatio...

wenzhixin Bootstrap-Table nested tables/sub-table -

i trying make existing bootstrap table neasted detail-views, have regular detailview add 1 layer on top of detailed view... first list taken database, when expanding + sign, 2 options , have expansion well.. below first option on second layer detailed view , second 1 should have table taken database. not getting work, have been using https://github.com/wenzhixin/bootstrap-table-examples/blob/master/options/sub-table.html base not getting detailformatting recive items (rows) on second layer of table, top layer. second table possible add , existing table sub-table? this .js code # ` $('#table').bootstraptable( {detailview: true, onexpandrow: function (index, row, $details) { expandtable1(index, row, $details); } }); function detailformatter1(index, row) { var input = ({ "title": row.title, "document id": row.hvcdocumentid, "part id": row.hvcdocumentpartid, ...

node.js - Disable automatic population of models in sails v1.0 -

i using sailsjs v1.0.0-36 . want disable model population. so when send request http://my-app/pets : [ { id: 1, breed: 'wolves', type: 'direwolf', name: 'ghost', owner: 1, //user id }, { id: 2, breed: 'wolves', type: 'direwolf', name: 'summer', owner: 1, //user id }, ] and when send request http://my-app/users : [ { id: 1 firstname: 'john', lastname: 'snow', pets: [ //array of pets id 1, 2, ] } ] where user model defined as // myapp/api/models/user.js // user may have many pets module.exports = { attributes: { firstname: { type: 'string' }, lastname: { type: 'string' }, // add reference pets pets: { collection: 'pet', via: 'owner' } } }; and pet model defined as // myapp/api/models/pet.js // ...

javascript - Scroll list with fixed position -

Image
i use pagepiling.js , want ja navbar sections. see example picture. if scroll down, want entry 3 jump in place of entry 2 , entry 4 comes bottom. thanks is css or jquery trick?

android - How to disable Crashlytics and Answers during DEBUG -

this question has answer here: detect if in release or debug mode in android 5 answers i want disable crashlytics , answers executed on debugging environment. i found many solutions on web, none describe how disable answer module. right now, i´m using following code. however, crashlytics disabled. crashlyticscore core = new crashlyticscore.builder().disabled(buildconfig.debug).build(); fabric.with(this, new crashlytics.builder().core(core).build(), new answers()); how about: crashlyticscore core = new crashlyticscore.builder().disabled(buildconfig.debug).build(); crashlytics crashlytics = new crashlytics.builder().core(core).build(); if (buildconfig.debug) { fabric.with(this, crashlytics); } else { fabric.with(this, crashlytics, new answers()); }

android - Is Facebook In-app Browser blocking Google Analytics E-commerce? -

it's bit curious. google analytics installation seems working fine e-commerce shop working on. visits , purchases being recorded properly. however, have noticed few purchases not being recorded google analytics e-commerce. , purchases have in common traffic came facebook. facebook pixel installed properly, , sending transaction data 100% of purchases, regardless of traffic source, per data in facebook analytics / facebook ads manager. sooo ... suspecting facebook in-app browser preventing google analytics registering purchases while facebook pixel registering purchase normal. seems case traffic being generated facebook ads links , subsequent purchases facebook in-app browser. has experienced same thing? there explanation google analytics e-commerce malfunctioning small portion of purchases? facebook , google tracking services somehow interfering each other scenario? it weird because can see traffic facebook ads, problem purchase data. i have't published code here si...

Small hint for making query in Mariadb -

how can make query practice.i have 2 tables, 1 football clubs , other players. football clubs have next atributes: (id, name,stadium,president, founding year) , players(id,club_id,name,surname,date of birth,position) want make query show me clubs , players founded after 1902 example. select c.name, p.surname, p.name, p.position clubs c join players p on p.club_id = c.id c.founding_year = 1902;

spring - Same endpoint, with and without @RequestParam -

in spring boot possible have same endpoint , without @requestparam a this: @getmapping(value = "/billing-codes") public responseentity getbillingcodes( @authenticationprincipal user loggedinuser, @requestparam(name = "billingcodeid") string billingcodeid, @requestparam(name = "direction") string direction, @requestparam(name = "limit") string limit) { b this: @getmapping(value = "/billing-codes") public responseentity getbillingcodes( @authenticationprincipal user loggedinuser) { the requests different a request /billing-codes?billingcodeid=&direction=&limit b request /billing-codes it possible test if name s of request parameters part of request? testing if request parameters null or empty won't work since have case , should still processed in a . no, can have 1 method couple of url , http method in same controller . you'll need use 1 method...

python - Document plotting using Pyplot and sklearn -

i looking gain insight layout of document set. casting them numbers array using following approach sklearn. pipeline = pipeline([("vect", countvectorizer()), ("tfidf", tfidftransformer()),]) matrix = pipeline.fit_transform(docs).todense() if cluster them use kmeans = kmeans(n_clusters=2).fit(matrix) data2d = kmeans.transform(matrix) then plot them using pyplot plt.scatter(data2d[:,0], data2d[:,1], c = categories) however, generates kmeans representation of dataset. there anyway of summing values in matrix , plotting them can see how relative each other, without using kmeans. representation consistent eveytime. for coming after me. principle in question known multidimensional scaling. here useful blog explains principles behind it. https://de.dariah.eu/tatom/working_with_text.html

sql server - Error with my fact table: converting numeric to data type varchar -

Image
i'm doing datawarehouse , need fill fact table, query when run code returns error: msg 8115, level 16, state 5, line 98 arithmetic overflow error converting numeric data type varchar. does know how solve it? insert dbo.hechos_ventas select da.cod_artkey, dt.cod_fechakey, dz.cod_zonakey, dc.cod_idkey, fl.factura, case when f.tipo_documento = 'd' fl.precio_unitario * - 1 else fl.precio_unitario end precio_unitario, convert(varchar(10), fl.fecha_factura, 101) fecha_fact, f.tipo_documento, f.tipo_cambio, case when f.tipo_documento = 'd' fl.desc_tot_linea * - 1 else fl.desc_tot_linea end descuento, case when f.tipo_documento = 'd' fl.cantidad * - 1 else fl.cantidad end cantidad, case when f.tip...

sql - adding missing dates in mysql data set -

i have mysql query this.... select cast(created_at date) 'created_date', dayname(cast(created_at date)) 'day', sum(order_type_id=1) 'pickup', sum(order_type_id=2) 'delivery' orders created_at >= curdate() - interval 7 day , created_at < curdate() , order_status_id != 3 group cast(created_at date); which returns data below date | day | pickup | delivery ----------------------------------------------- 2017-08-08 | tuesday | 02 | 01 2017-08-09 | wednesday | 01 | 01 2017-08-10 | thursday | 01 | 00 2017-08-11 | friday | 01 | 01 2017-08-13 | sunday | 01 | 00 2017-08-14 | monday | 01 | 01 what i'm trying summery of delivery orders , pickup orders past 7 days excluding today. my prob : if closely observe above, you'll notice dont have output 2017-08-12 (saturday) since there no operations done in same date. ide...

shapefile - R: Counting how many polygons between two -

Image
i trying recreate map showing how many municipals away cracow: and change city cracow wrocław. map done in gimp . i got shapefile (available here: http://www.gis-support.pl/downloads/powiaty.zip ). read shapefile documentation packages maptools , rgdal or sf , couldn't find automatic function count it, because wouldn't manually. is there function that? credits: map done hubert szotek on https://www.facebook.com/groups/mapawka/permalink/1850973851886654/

node.js - LESS @plugin Debugging (node) -

does know how debug less plugin when using node compile? able see value of console.log() within custom less functions. i using gulp-less. have tried run gulp way: node --inspect --debug-brk /usr/local/bin/gulp compilecss this ran gulp task don't see console within function inside javascript @plugin. the above mentioned method worked, issue plugin wasn't set correctly. in shoes worked: follow instructions on answer getting inspector in gulp task. enter link description here then if plugin installed should see logs in console less custom plugin or it's functions.

design - iOS screen size in code, is this optional? -

in apps theres settings screen sizes. vs regular constraint settings, whats advantage vs disadvantage? example: struct setting { struct small { static let phonese: cgfloat = 11.0 static let phone: cgfloat = 13.0 static let phoneplus: cgfloat = 14.0 } struct medium { static let phonese: cgfloat = 12.0 static let phone: cgfloat = 14.0 static let phoneplus: cgfloat = 15.0 } struct large { static let phonese: cgfloat = 13.0 static let phone: cgfloat = 15.0 static let phoneplus: cgfloat = 16.0 } these values specific font size values. the values change purpose, values might font size or img sizes. practice or overkill? it usually isn't "good practice" code against specific devices. or in other words, is "good practice code against size classes (using auto layout constraints) , use dynamic type...

Emacs auto-hscroll with vertical split windows -

i have set emacs config file way : (global-linum-mode t) (setq-default truncate-lines t) (setq scroll-margin 0) (setq scroll-step 1) (setq hscroll-margin 0) (setq hscroll-step 1) but when split verticaly terminal ( c-x 3 ) windows not directly touching right side off screen lose auto-scrolling feature, ie when cursor go caracter off screen doesnt scroll, how can configure emacs when split screen still continu scroll have specified? c-x > , c-x < still work, prefer not use this.

Android studio 3: Could not find the AndroidManifest.xml file -

after migrating android studio 3 i'm unable compile i' have folowing errors: error:could not find androidmanifest.xml file, using generation folder [/home/salacr/git/evotech/app/build/generated/source/apt/debug]) error:parceler: code generation did not complete successfully. more details add compiler argument -aparcelerstacktrace error:execution failed task ':app:compiledebugjavawithjavac'. > compilation failed; see compiler error output details. it might connected usage of android anotation app/build.gradle looks this: apply plugin: 'com.android.application' apply plugin: 'realm-android' def aaversion = '4.3.1' def parcelerversion = '1.1.9' android { compilesdkversion 26 buildtoolsversion '26.0.1' defaultconfig { applicationid "com.my.app" minsdkversion 16 targetsdkversion 26 versioncode 1 versionname "1.0" multidexenabled true ...

writeWorkSheet function in R not pasting values into Excel -

i trying copy data r data frame ( shipments ) excel file using writeworkbook function in xlconnect package. however, not copying excel file. execution doesn't result in error/warning appearing in console. doesn't copy. i have loaded library xlconnect , made sure not loading library xlsx. column copied has been type-casted dataframe thought might issue. wbnames additional thing. directly wrote sheet name in writeworkbook , should have worked fine. wbnames there hasn't been change in result. i intended copy content macro file , run macro file r wasn't working. thought may because of macro file function not working on .xlsx itself. so, not sure issue. grateful if can here. missing something? library(xlconnect) library(rdcomclient) xlapp <- comcreate("excel.application") xlwbk <- xlapp$workbooks()$open(filepath+filename.xlsx) xlwb <- loadworkbook(filepath+filename.xlsx) wbnames <- as.vector(getsheets(xlwb)) # copy column ex...

Grab data from another sheet based on values matching in Excel with VBA -

the goal have second worksheet (calcvalues) lookup values (if fielda = x, fieldb = y, fieldc = z, value = a). the skeleton of have (i don't work in vba, may wrong): dim calcarray calcarray = array(fielda, fieldb, fieldc, fieldd, fielde) if calcarray.contains(target.column) dim fieldaval, fieldbval, fieldcval, fielddval, fieldeval fieldaval = target.worksheet.cells(target.row, fielda) ... fieldeval = target.worksheet.cells(target.row, fielde) end if with fielda-e being lookup fields column indexes. not functional, goal if set 1 of fields check done, in pseudo-c# entity framework mixed in little know excel's vba like: var data = worksheets("calcvalues").where(c => c.columna == fieldaval); data = data.where(c => c.columnb == fieldbval); ... data = data.where(c => c.columne == fieldeval); ' ideally, grabbing row number data. or row itself, either or. ' grabbed_row = last remaining 'data' object's row numbe...

python - Seamlessly solve square linear system that could be 1-dimensional in numpy -

i solving linear system of equations ax=b . known a square , of full rank, result of few matrix multiplications, a = numpy.dot(c,numpy.dot(d,e)) in result can 1x1 depending on inputs c,d,e . in case a float . b ensured vector, when 1x1 one. i doing a = numpy.dot(c,numpy.dot(d,e)) try: x = numpy.linalg.solve(a,b) except: x = b[0] / i searched numpy's documentation , didn't find other alternatives solve , dot accept scalars first or output arrays second. numpy.linalg.solve requires dimension @ least 2. if going produce a = numpy.array([5]) complain too. is there alternative missed? in result can 1x1 depending on inputs c,d,e. in case float. this not true, 1x1 matrix, expected x=np.array([[1,2]]) z=x.dot(x.t) # 1x2 matrix times 2x1 print(z.shape) # (1, 1) which works fine linalg.solve linalg.solve(z, z) # returns [[1]], expected

javascript - display input in divs doesn't work -

i trying populate divs based on input. works fine (i tried it.) @ http://jsfiddle.net/2ufnk/2/ when implemented @ http://communitychessclub.com/cccr-pairing/test.html didn't work. wonder why... <div class = "ui-widget white"><input id = "w01" name = "w01" type = "text" onchange="screen_w01()" class = "automplete-2" autofocus></div> <div class = "ui-widget black"><input id = "b01" name = "b01" type = "text" onchange="screen_b01()" class = "automplete-2" ></div><br /> <div class = "ui-widget white"><input id = "w02" name = "w02" type = "text" onchange="screen_w02()" class = "automplete-2"></div> <div class = "ui-widget black"><input id = "b02" name = "b02" type = "text" onchange="screen_...