Posts

Showing posts from February, 2013

Response rows: [ anonymous { today: 2017-08-14T00:08:52.643Z } ] - Node version v8.2.1 -

i'm working node-postgres , try make first example and create class called postgres method today const conn = new pg.pool({ user: 'user', host: 'localhost', database: 'test', password: 'pass', port: 5432, }); class postgres { today() { conn.query("select now() today",(err,res)=>{ if (err) throw err //console.log(json.stringify(res.rows[0])); return json.stringify(res.rows[0]); conn.end(); }) } } the result rows: [ anonymous { today: 2017-08-14t00:08:52.643z } ] , try json.stringify(res.rows[0]) not working can't field result { command: 'select', rowcount: 1, oid: nan, rows: [ anonymous { today: 2017-08-14t00:08:52.643z } ], fields: [ field { name: 'today', tableid: 0, columnid: 0, datatypeid: 1184, datatypesize: 8, datatypemodifier: -1, format: 'text' } ], _parsers:...

php - FPDF class extend not working -

i'm having problem fpdf because class extend it's not working. i'm creating class footer , call with: $pdf = new pdf2(); i have code in external file include above code, this: include"fpdf.php"; class pdf2 extends tfpdf { // page footer function footer() { // mb logo 30cm before end of page $y = $this->sety(-65); // arial italic 8 $this->addfont('dejavu','','dejavusanscondensed.ttf',true); $this->setfont('dejavu','',10); //mb logo $this->image('img/multibanco.jpg',20,$y,30); } } //pdf begins // cliente info encomenda $pdf = new tfpdf(); $pdf = new pdf(); $pdf = new pdf2(); $pdf->addpage(); // arial bold 15 $pdf->addfont('dejavu','','dejavusanscondensed.ttf',true); $pdf->setfont('dejavu','',11); // title $pdf->cell(190,10,'ordem nº '.$maxi.'',0,0,'c...

python - Data Validation in Hive -

in our application migrating huge volume of data teradata hive. need validate data between source , target.we planning using python & pandas dataframe. queries 1.will pandas data-frame can handle around 15 million of data ? 2.is there other way ? what best way achieve above using python ? thanks in advance

r - Nested list to data frame and back to nested list -

consider nested list data rectangular. mylst1 <- list( "system" = list( "subjectid" = c(101,102,103), "procedureid" = c(202,202,203) ), "demographics" = list( "demo_age" = c(12,22,32), "demo_gender" = c(1,0,1) ), "items" = list( "n" = list( "n001" = c(1,2,3), "n002" = c(3,2,1) ), "e" = list( "e001" = c(1,2,3), "e002" = c(3,2,1) ) ) ) since nested lists awkward work with, let's create data frame: mydf <- data.frame(mylst1) so far good, can perform operations on mydf . let's assume filtered observations. problem need return same nested list structure required web application want send data to, data of course looks this: > str(mydf) 'data.frame': 3 obs. of 8 variables: $ system.subjectid : num 101 102 103 $ system.procedureid ...

Azure B2B Loggin issues -

i experiencing issues azure b2b logging. during last week, have created 15 guest users on azure ad. now, trying filter audit logs can inspect events related invited guest users. , problem is, if select either category "invited users" or activity "invite external user" 0 logs. went manually through logs , discovers invitations lists generic "add user". know how isolate logs related azure b2b?

firebase - Push notifications not received when sent over FCM but do when sent over APN on IOS -

i have problems sending push notifications cordova app in ios devices through fcm, on android works fine. use phonegap-plugin-push handle them. when notifications sent server or fcm console don't arrive , no error arises. when manually send notifications using pusher, apn token plugin output arrive correctly. the apn certificates put fcm correct because apn token obtained in plugin correct. seems problem fcm-apn integration. any ideas? in case wonders, problem plugin. fix replacing cordova-plugin-firebase

sharepoint - How to link a "file://" to a document library -

i'm trying create link document in sharepoint i've enabled other content types , added 'link document' content type document library in question. the document i'm trying link in "file://" pathway "link document" content type requires "http://" pathway. there anyway around requirement?

stringtemplate - Filter out empty strings in ST4 -

consider following example: <["foo", "", "bar"]; separator=","> this gives result: foo,,bar but need: foo,bar is there way filter out empty string values before formating separator in st4? (in real code values come template, has <if> condition , returns empty result undesired data model, , don't whant move condition out of template keep templates incapsulated/isolated.) i've found workaround 2 auxilary things. creepy... dropempty ::= ["": [], default: key] separated(l, s, w=false) ::= "<if (dropempty.(first(l)))><if (w)><s><endif><first(l)><separated(rest(l), s, true)><else><if (rest(l))><separated(rest(l), s, w)><endif><endif>" mytemplate() ::= << <separated(["", "foo", "", "bar", "", "", "goo", "", ""], ",...

zpl ii - FN fields not in Label showing up as default text -

we print zebra labels using templates , dynamic fields, simplicity have fixed fn fields being sent controler, , cherry pick fields want on label example fn1 = unit price fn2 = weight fn3 = qty fn4 = length fn5 = width fn6 = bulk price so if want bulk price , qty label template has fns 3 , 6, product may need other fields the problem this, new customer creates own label templates , sends them us, reason fn fields not in label printed @ origin point in small font size, there way disable via settings?

.net - The 'Version' attribute is not declared in nuspec file -

when try pack .net core solution using vsts, the 'version' attribute not declared error. nuspec file looks this: <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minclientversion="3.3.0"> <id>yyy.aspnetcore.custommapper</id> <version>0.0.1</version> <authors>build@yyyyyy.com</authors> <owners>yyy yyy</owners> <requirelicenseacceptance>false</requirelicenseacceptance> <description>yyy.aspnetcore</description> <tags>yyy</tags> <contentfiles> <files include="wwwroot\**" buildaction="embeddedresource" copytooutput="true" /> <files include="areas\custommapper\readme.txt" buildaction="embeddedresource" copytooutput="true" /> </con...

Accessing Liberty log files from the Bluemix Liberty docker image running locally -

my goal develop application run on websphere liberty hosted in docker , running on bluemix. during development, have installed docker on local linux pc , downloaded ibm base docker image containing configured liberty. image called: registry.ng.bluemix.net/ibmliberty i start image in docker locally in pc , attach shell can see going on. find there liberty server located at /opt/ibm/wlp/usr/servers/defaultserver now here comes puzzle. in liberty servers used working upon, messages produced server written "logs/messages.log" file relative server. mean have expected find liberty message files here: /opt/ibm/wlp/usr/servers/defaultserver/logs/messages.log however, when start server, there nothing there. how can access logs of liberty server obtained bluemix base image ( registry.ng.bluemix.net/ibmliberty ) running under docker natively on linux environment on local pc? if examine ibm liberty/bluemix documentation page: https://console.bluemix.net...

c# - async and await code behaving differently if we run it from different processes -

please bear me long question. scenario: have filesystemwatcher on root-directory watching lastwrite change on control-file each inside control-directory . looks this:- root-directory ( filesystemwatcher instance watching root directory) | |----- control-directory_0 \ control-file \ data-file |----- control-directory_1 \ control-file \ data-file |----- control-directory_2 \ control-file \ data-file |----- control-directory_3 \ control-file \ data-file .........more similar structure (but 1 root-directory ) sorry creative drawing. the problem facing, there can many control-directories inside root-directory (approx 200-500) , along control-directory's control-file , have data-file in (in each of them) continuous writes happening. i watching notifyfilter.lastwrite , filter = control-file . internalbuffersize set 4kb (pleas...

c# - Accessing DLLs from different folders even after deploying without dynamic loading -

my windows application resides in path "c:\program files\test" , dlls in different location "c:\program files\thirdpartyapplication". when test application executes, dlls must retrieved third party folder after deploying , local copy should not maintained. can achieved without dynamic loading? note : dlls gets updated in third party application folder, requirement not build project every time happens. the following microsoft doc comprehensively answers question , offers 3 different methods. https://support.microsoft.com/en-gb/help/837908/how-to-load-an-assembly-at-runtime-that-is-located-in-a-folder-that-is how load assembly @ runtime located in folder not bin folder of application method 1: install assembly in global assembly cache (gac) method 2: use application configuration (.config) file tags method 3: use assemblyresolve event

windows - naming IP scan results with unique file name -

i found ip scanner can run in batch file , saves results of scan csv file. need naming file. goal have ssid (currently connected to), date, , time part of file name. hyphens/dashes fine, prefer no spaces in file name. the command below works fine , saves results same file every time, overwriting previous scan results. wnetwatcher.exe /scomma scan-results.csv thank help. a basic framework how craft filename batch files -- you'll need magic ensure filename results. i'd recommend investigating text replacement feature of set command. @echo off set wnw_curdat=%date% wnetwatcher.exe /scomma "scan-results-%wnw_curdat%.csv" good luck, , holler if stuck.

node.js - Increase node memory using npm package.json script -

if want increase memory limit in node, option passed be: node --max-old-space-size=4096 yourfile.js but in scenario using yarn, package.json looks this: { "name": "myapp", "productname": "myapp", "version": "1.0.0", "main": "app/main.js", ... "scripts": { "package-win": "npm run build && build --win --x64", "package-mac": "npm run build && build --mac", ... }, ... i execute yarn package-win on windows machine invoke electron-builder electron app built react.js. npm err! code elifecycle due out of memory. in mac got fatal error: call_and_retry_last allocation failed - javascript heap out of memory error still got packages generated (how? don't know) when invoking yarn package-mac . i search lot on how use --max-old-space-size=4096 option, haven't found works. i tried "package-win...

node.js - When I try to install any module with npm, it throws error EMAXREDIRECT -

i'm trying install modules via npm , i'm getting error: npm err! code emaxredirect npm err! maximum redirect reached at: https://registry.npmjs.org:443/ this happening every module had tried install. also, had reinstalled node + npm, , it's not working yet. didn't found people similar issue... know , how solve it? error_img @haysa try setting registry , running these commands. npm config rm proxy npm config rm https-proxy

javascript - Routing not working for bundled (webpack) Angular 2 project -

i have simple angular application 2 components (appcomponent , tester) webpacked single app.bundle.js file. problem once app bundled routing no longer works. have tried few different methods seen online working no luck, can help? have seen mention of bundling , routing via modules, rather keep entire angular project single file if possible <!doctype html> <html> <head> <title>routing webpack test</title> <base href="/"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="slate.css"> </head> <my-app>loading...</my-app> <body> <script type="text/javascript" src="app.bundle.js"></script> </body> </html> app.component.ts import { component, input, output } '@angular/core'; import { route } ...

ffmpeg: extracting images from video together with their frame numbers? -

i'm extracting images (variable framerate) .avi file with ffmpeg -i movie.avi -r 25 %05d.png (the -r option should equivalent filter -vf='fps=fps=25' ), know frame number in original video stream each generated image corresponds to. there easy way that? if use ffmpeg -i movie.avi -vsync 0 %05d.png no frames duplicated or dropped, each frame serial no. should correspond index in video.

mpi - What is Segmented Ring Allreduce in OpenMPI (V2.0.2)? How is it pipelined? -

i have been trying understand segemented ring allreduce in openmpi (v2.0.2). failed figure out pipelined ring allreduce, how phases pipelined. (i.e. computation phase 1 (b) seems perform 2 phases concurrently instead of "pipelinely".) mpi experts provide motivation behind segmented ring allreduce , details pipeline? really appreciated, leo i think has been asked , answered @ https://github.com/open-mpi/ompi/issues/4067 very specific questions regarding internals of open mpi, better asked directly open mpi mailing list(s) or github repository

vb.net - Find all nodes that contain punctuation marks -

i have extremely large xml file , within each main node there child node <term>text, text</term> some of these child nodes have punctuation marks shown above, punctuation mark not known. need list of of punctuation marks used in these child nodes can visually inspect them , later replace them 1 punctuation mark. i've tried using regex /<term>[[:punct:]]<\/term> finds no matches in regex tester. how can copy of punctuation marks used in child node text file? how can replace punctuation marks in child node semi-colon? here sample node, there 2 occurrences of in each node. <conceptgrp><descripgrp><descrip type="subjectfield">6821</descrip></descripgrp><languagegrp><language lang="de" type="german" /><termgrp><term>betonkanal be;betonkanal breites ei</term><descripgrp><descrip type="termtype">phraseologicalunit</descrip></d...

node.js - How does one serve a folder on Heroku? -

just title says, how 1 serve public folder on heroku? heroku very inflexible , express framework must this, or heroku always spit out errors, code below, how can 1 send "/public" folder? right now, if check source of heroku page, has "index". const express = require('express'); //for heroku! const socketio = require('socket.io'); const path = require('path'); const victor = require('victor'); const port = process.env.port || 3000; const index = path.join(__dirname + '/public/'); const server = express() .use((req, res) => res.sendfile(index) ) .listen(port, () => console.log(`listening on ${ port }`)); const io = socketio(server); with code, heroku sending index.html file within public folder.

java - LocalDate inconsistency -

i trying produce date object ( java.util.date ) localdate object ( java.time.localdate ) in have following criteria: allow parameter can subtract number of days date object have date & time date , time in utc have time @ beginning of day i.e. 00:00:00 the timezone stamp (i.e. cdt or utc) irrelevant remove string to meet criteria, have created test program, getting interesting results when modify property of localdate . see code below: public static void main (string args[]) { long processingdaysinpast = 0l; localdate createddate1 = localdate.now(clock.systemutc()).minusdays(processingdaysinpast); localdate createddate2 = localdate.now(clock.systemutc()).minusdays(processingdaysinpast); system.out.println(createddate1); system.out.println(createddate1.atstartofday().toinstant(zoneoffset.utc)); system.out.println(date.from(createddate1.atstartofday().toinstant(zoneoffset.utc))); system.out.println((createddate2.atstartofday().atzone(zon...

java - Using SunPKCS11 security provider on Solaris SPARC 11.3 shoots up JVM CPU consumption -

we have solaris sparc system (oracle solaris 11.3 sparc) running apache tomcat 8.0.41. on system, observing high cpu consumption under small web server load. specifically, running 10-15 concurrent https requests threads causes cpu consumption on 64 vcpu machine reach 80-90%. however, when change security provider ordering in java.security file moving sunpkcs11 provider bottom of list, cpu consumption goes lower (below 5%) in same scenarios. we ran similar tests on older solaris 10 sparc system (oracle solaris 10 1/13 sparc), there not see problem though java.security settings sunpkcs11-solaris.cfg files same on both systems. java version being used same (1.8.0_131). my questions: 1. there known issues 11.3 version of solaris sparc w.r.t. sunpkcs11 security provider? 2. there workaround/solutions problem other changing security provider order in java.security file? here logs output using -djava.security.debug=sunpkcs11 option: sunpkcs11 loading /opt/java/jre/lib/security/s...

javascript - Kendo UI Default Grid Filter value -

i trying default kendo ui grid filtered on page load. have column boolean values need display ones "false" on page load allow user see them if clear filters. example: http://www.telerik.com/forums/adding-filters-to-grid-s-source function updatesearchfilters(grid, field, operator, value) { var newfilter = { field: field, operator: operator, value: value }; var datasource = grid.data("kendogrid").datasource; var filters = null; if ( datasource.filter() != null){ filters = datasource.filter().filters; } if ( filters == null ) { filters = [newfilter]; } else { var isnew = true; var index = 0; for(index=0; index < filters.length; index++) { if (filters[index].field == field) { isnew = false; break; } } if ( isnew){ f...

javascript - How to load and stop Ajax based vertical scroll function + gif image loader -

i have not been able achieve this. problem function works once , stops. missing loop here? i have tried move else { } block everywhere, doesn't help. have tried put condition else if (data=='') didn't helped. if move function if($(window).scrolltop() + $(window).height() > $("#load_data").height() && action == 'inactive') { outside of if(data !=='') my scroll function , gif image doesn't stops after last raw been fetched database. any appreciated. thanks! <script> var limit = 20; var start = 0; var action = 'inactive'; var timeoutid; function load_city_data(limit, start) { $.ajax({ url:"ps_load_data.php", method:"post", data:{limit:limit, start:start}, cache:false, success:function(data) { $('#load_data').append(data); if(data !== '') { $('#imgloader').html('<img...

javascript - Detect Close windows event by Jquery -

could please give me best way detect only window close event all browsers jquery? i mean clicking x button on browser or window.close(), not meaning f5, form submission, window.location or link. looking many threads have not found right way. thanks support. there no specific event capturing browser close event. you can capture on unload of current page. by method, effected while refreshing / navigating current page. even calculating of x y postion of mouse event doesn't give result.

swift - Sorting Tableview Rows By Multiple Arrays -

i trying sort tableview words on labels in each row. each row have 3 things: color, animal type, , name animal. have specific order in mind on how want organize table, depending on how items loaded, order of rows can (the problem). i want sort these tables color array: colorarray = ["red", "blue", "yellow", "green", "orange", "purple"] . mean red animals first while green ones in middle etc. first problem not know how sort array string array . second problem need other 2 arrays (animal , animal name) change order in accordance color array right animal , names' correct color. example: if color array loaded in blue, green, orange, red , animal array loaded in dog, cow, cat, monkey , need need these 2 array sorted red, blue, green orange , monkey, dog, cow, cat . animals right color. how fix these 2 problems? have copied current code @ bottom: func loadanimals() { let animalquery = pfquery(cla...

Making synchronous call in Angular 2 with Firebase -

i have service needs upload image firebase storage first , return downloadurl. after getting download url need store firebase realtime database. but problem here firebase calls asynchronous. this code : addcategory(category){ let storageref = firebase.storage().ref(`category/${category.img_name}`); //upload file storageref.put(category.url) .then((snapshot) => { // here download url var downloadurl = snapshot.downloadurl; category.category_icon = downloadurl.tostring(); }) //problem occurs here return executed before .then statement , download url becomes undefined. return this.http.post('https://app_name.cloudfunctions.net/api/products',body,{headers:headers}) .map(res =>res.json()); } so need know there possibility stop making call (storageref.put()) synchronous return statement should trigger after completion of .put() call. thanks in advance!! when want wait while execution com...

monaco editor - How to implement custom language with function overrides? -

i'm aware of registercompletionitemprovider , , autocomplete. i'm aware of setmonarchtokensprovider provide color tokens. right display functions using registercompletionitemprovider , duplicate functions different parameter types shown in autocomplete. what implement display function overrides. example, custom language, have function: abs(x,y,z) abs(a,b) when type abs autocomplete should show abs , when press ( should start showing parameter function. i'm sure there api not sure is?

Randomizing priority in Prolog predicates -

one of main differences between prolog , first order logic in strict rule priority of right parts in predicate. know if there way randomize priority without renouncing @ normal backtracking behaviour. in particular i'm working swi-prolog solution works interpreter. although there no built-in way use randomness search strategy in prolog theorem prover, there native functions there generate random numbers used (in roundabout way) randomize instance of predicate chosen consideration next. to elaborate, might include each instance of predicate path/n 2 additional tests represent range within 0 , 1 predicate holds. range (lo, hi) should chosen such hi - lo = 1 / k, k total number of instances predicate path/n has in knowledgebase. path(n, ...) :- n >= 0.0, n < 0.2, ... path(n, ...) :- n >= 0.2, n < 0.4, ... path(n, ...) :- n >= 0.4, n < 0.6, ... path(n, ...) :- n >= 0.6, n < 0.8, ... path(n, ...) :- n >= 0.8, n <= 1.0, ... with embedd...

r - ggpairs : Colouring the geoms by a Factor -

Image
i trying replicate ggpairs can accomplished in pairs -- i.e. colour geoms (e.g. scatter points etc) binary factor (which represents class). can not. below reproducible example using dataset smarket library islr: library(islr) data(smarket) pairs(smarket, col = smarket$direction) this returns following graph: now, using ggpairs without specifying colour class following plot: smarket$class <- ifelse(smarket$direction == "up", 1, -1) ggpairs(smarket %>% select(-9) , lower = list(continuous = wrap("points", color = "red", alpha = 0.5), combo = wrap("box", color = "blue", alpha = 0.3), discrete = wrap("facetbar", color = "orange", alpha = 0.3) ), diag = list(continuous = wrap("densitydiag", color = "yellow", alpha = 0.5) )) but attempts colour geoms class fail: > color_by_class <- as.factor(ifelse(smarket...

why does conda downloads python again, when i have anaconda already -

i using anaconda python $ python --version python 2.7.13 :: anaconda 4.4.0 (64-bit) $ python /home/vimal/anaconda2/bin/python $ conda create -n myjunkproject python=2 fetching package metadata ......... solving package specifications: . package plan installation in environment /home/vimal/anaconda2/envs/siraj-regression: following new packages installed: openssl: 1.0.2l-0 pip: 9.0.1-py27_1 python: 2.7.13-0 readline: 6.2-2 setuptools: 27.2.0-py27_0 sqlite: 3.13.0-0 tk: 8.5.18-0 wheel: 0.29.0-py27_0 zlib: 1.2.8-3 proceed ([y]/n)? n why install python 2.7.13 again?????? isnt there? same pip conda treats python same other package, it’s easy manage , update multiple installations. according conda documentation here: https://conda.io/docs/py2or3.html looks conda intentionally it's easier update/manage multiple installations of python. hope helps.

ios - Getting 'A valid provisioning profile for this executable was not found' after transferring app -

Image
i transferred app account , first time see error app installation failed. valid provisioning profile executable not found. the app build , runs fine in simulators when test in iphones ( 2 iphones) error. account hasn't expired , think when it's keychain because transferring app removed keychain when check in developer.apple.com active , key fine.

ruby - Best approach to testing methods run from initialize with rspec -

i have following code (chess implementation, i'm going through theodinproject.com path): class move def initialize(player, board) @player = player @board = board @from = ask_for_move_details("from") @from_sq = @board[@from.to_sym] @from_piece = @from_sq[:piece] @to = ask_for_move_details("to") @to_sq = @board[@to.to_sym] make_a_move if move_allowed? end def ask_for_move_details(from_or_to) begin msg_ask_for_move_details(@player, from_or_to) chosen_address = gets.chomp.to_s raise unless address_valid?(chosen_address) rescue msg_move_not_allowed retry end chosen_address end ... end i need test ask_for_move_details("from"/"to") methods run when object instance being created. the goal e.g. make @from variable value of "a1" , @to variable "a6" value. far have came this: allow(move).to receive(:gets).and_return("a1...

javascript - Text clustering: chosing the k in k means -

Image
after eliminating stop words , applied stemming process in set of documents, applied bisecting k-means in javascript in order cluster set of documents received web pages finding similarity between them. what should method finding how many cluster should created when having text-based clusters? saw methods such elbow, silhouette, or information criterion approaches, assuming don't have information of clusters create, other methods seem better fit numeric clustering, not on text-based clusters. can entropy measure in helping me find right number of clusters after applying bisecting k-means in text clustering? or f-measure ? mean stop dividing cluster after value reached? large sets of data? short answer: you can use termfequency- inversedocument-frequency (tf-idf). emphasises rare words used in single document, , penalizes words when found in documents. if applied pca tfidf on dataset, might use "scree plot" (~ elbow method) find suitable number of cl...

jquery - WordPress plugin - Fundraising Thermometer -

i wondering if there existing plugin out there wordpress fundraising thermometer (as button below clicked, fills up), need 1 populate specific icon (of gift or dollar sign) depending on of button options beside clicked. open suggestions of plugin when button clicked, image above fills button's related icon.

Creating a client server app using c# that allows user to configure the server to which the app can connect -

i degree student , working on final year project. it's app connects remote server in order manage sql database created on server. i have completed functionality app except part connects database\server. want user able specify, in setting menu of app, ip address of server want connect. , login database using login credentials. i have searched on keep seeing videos developer connects database through visual studio want user of app have control specifying server want connect since machine hosting database may change in future. please need guidelines on how go this. using c# , wpf project. thanks if using sqlserver, can use sqlconnectionstringbuilder class in system.data.sqlclient generate connection string based on login credentials , server user input. var builder = new sqlconnectionstringbuilder(); builder.datasource = <your server address>; builder.userid = <id>; builder.password = <password>; builder.initalcatalog= <inital db query>; ...

javascript - how do I read data(object) from params in express? -

i trying read object being sent parameter in delete request. router.delete('/deletebranch/:id',(req,res)=>{ console.log(req.params.id); }); //what [object object] //what need { schoolid:03746, branchid:23231 } i getting [object object] in console. instead of , want print key-values in console . can me? in advance!

To to get the sum of conditional aggregates in an Access form -

i have table tblbudget, contains id   expensetype   year   month   amount 11     hardware      2017    sep    5000 11     software       2017    oct     2000 11     hardware      2016   jan     1000 12     software       2017   feb     1500 i need display expenses id, expensetype, year, month. hence created group query select id,expensetype,year,month,sum (amount) sumofamount tblbudget group id,expensetype,year,month this query works fine, need sum total total amount @ bottom of screen. on access form tried setting control source "=sum([amount])" gives me #error. i guess due fact have sums of amount in datasheet. there way grand total in foote...

listview - Android: findViewById on Fragment Item returns null -

i cant figure out. when clicks on item in listview, want open fragment , set 1 edittext , 3 radiobuttons according values of list item clicked. public void openedittask(int position) { if (newtaskfragment != null) closenewtaskfragment(); if (edittaskfragment != null) closeedittaskfragment(); edittaskfragment = new edittaskfragment(); transaction = getsupportfragmentmanager().begintransaction(); transaction.setcustomanimations(r.anim.enter_from_right, r.anim.exit_to_right); transaction.replace(r.id.edit_task_frame_xml, edittaskfragment); //set edittext , radiobuttons according clicked item edittext edittaskname = (edittext) findviewbyid(r.id.edit_task_name_xml); radiobutton easybutton = (radiobutton) findviewbyid(r.id.edit_radio_button_easy_xml); radiobutton mediumbutton = (radiobutton) findviewbyid(r.id.edit_radio_button_medium_xml); radiobutton hardbutton = (radiobutton) findviewbyid(r.id.edit_radio_button_hard_xml); //edit tex...

javascript - variable is not getting defined even though the code works somwhere else -

so building game in 3 js , trying make multiplayer throught socket.io loading of characters array called players on server side and pass each client when connect socket.on('addplayer', function(username) { players.push(username) console.log(username + " joined") console.log("online users " + players) socket.broadcast.emit('syncplayers', players) socket.emit('syncplayers', players) }) and on client syncplayers looks socket.on('syncplayers', function(players) { players.foreach(function(value) { if (value == username) { console.log("not adding " + value + " thats ") loadplayerdata(username) } else { console.log("player online " + value); newplayer = value; loadplayerdata(newplayer) addplayer(newplayer) } }); }) then calls wich sends server data function loadplayerdata(pl...

Can a plain Ruby object instance return a primitive? -

how can define class instance without method call returns string representation of itself, without instance.to_s or similar being called? is there method defines native return instance when invoked without method, can strip object handling , return primitive? the same way string behaves: >> str=string.new('abc') >> s "abc" str doesn't return #<string abc> or it, , it, console extracting value? how can make class('abc') same thing class.new('abc') string ? sub-classing string option, i'd know alternatives. if enter following in irb should see expected result: class foo def inspect "foo" end end foo.new #> "foo" but how displayed. i'm not sure want achieve. creating string s = string.new('abc') is constructing 2 strings: 1 literal 'abc' , 1 call new , pointless unless want create duplicate. perhaps if tell bit more want achieve can b...

javascript - jquery .each() function taking effect on browser "go back" button only -

i have webpage i'm loading div page using .load(). after loading run jquery code append specific url existing hrefs. issue first time click on hyperlink/href redirected old href. after click "go back" button on browser, , try same hyperlink/href, href works , takes me new appended href. i see if there anyway have hrefs change when first load page. here code: 1st initialize container loading container second page. <pre> <code id="iframe-fragment"></code> </pre> 2nd load second page's container current webpage. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> <link href="https://roboticsys.com/support/plugins/servlet/docs/c1001-d1003/rapidcode/rsi_stylesheet.css" rel="stylesheet" type="text/css"> <script> $('#iframe-fragment').load('https://roboticsys.com/support/plugins/servlet/docs/c1001-d1003/rap...

PowerShell foreach loop with embedded if statement yields "cannot accept 'True' as positional parameter" -

i'm trying write simple ps line take exported .csv of ad groups in particular "regions" have set up, take groupscope (universal vs. global), , depending on scope of group, write "department" attribute either "universal" or "global." reason doing identify between 2 scopes within sharepoint. $uni="universal" import-csv \\usershare\user\me\output\groups.csv | foreach {get-adgroup -identity $_.name -properties * | set-adgroup if($_.groupscope -eq $uni){-replace @{department=$uni}}} this returning following error message though: "a positional parameter cannot found accepts argument 'true.'" i'm missing simple here started out , i'm self-teaching trial , error mostly. can provide! you're use of if block not valid trying accomplish, return true or false , set-adgroup not know hence error. try this: $uni="universal" $csv = import-csv -path '\\usershare\user\me\output\groups....

appmaker - How to dynamically populate the accordian widget -

i have accordian widget has calculated table data source. in detail of each row display records aggregated in calculated table. eg. source table (timesheet) has date, hours , project. calculated table has date, total hours. in accordian displayed date, total hours in rows , records given date in tables details of accordian row. attempting pass date query parameter on data source defined on timesheet table. however; error saying connect 2017 com.google.apps.appmaker.client.runtime.runtimeappview severe: cannot read property 'children' of undefined @ timesheetintake.project.projectrow.onclick:1:37 thank in advance. maria.

python - How to iterate through a pygame 3d surfarray and change the individual color of the pixels if they're less than a specific value? -

i'm trying iterate pygame 3d surfarray, more pygame.surfarray.array3d("your image") . i'm receiving video captured webcam converting them 3d array, displaying onto window code. def camerasee(self): while true: self.cam.query_image() self.image = self.cam.get_image() self.imagearr = pygame.surfarray.array3d(self.image) pygame.surfarray.blit_array(self.screen,self.imagearr) os.system("clear") pygame.display.update() event in pygame.event.get(): if event.type == pygame.quit: sys.exit() my problem i'm trying have camera display pixel has amount of blue > 200 (ranging 0 - 255) , change color value of other pixels 0. i've tried using if statement array error stating should using any() or all() . all code: try: import pygame import pygame.camera import pygame.surfarray import numpy import os import sys import time except: ...