Posts

c# - LINQ Syntax for Selecting a Parameter to Be Copied -

i have code sort collection in linq in c#. want group housename sum on volumes, order collection, pass third parameter, pctvol, new sorted collection. doing wrong? know problem lies in pctvol = group.selecct(item => item.pctvol) line. var inbetween = this.groupby(item => item.housename) .select(group => new dataitem { housename = group.key, volume = group.sum(item => item.volume), pctvol = group.select(item => item.pctvol) }) .tolist(); observablecollection<dataitem> objsort = new observablecollection<dataitem>(inbetween.orderby(dataitem => dataitem.volume)); return objsort; what kind of value want pctvol have? code, looks dataitem.pctvol ienumerable containing pctvol values in group. if want single value, , pctvo...

windows vista - What is the simplest library to download files in C++ -

i want download files have full url address using c++ program, library best this? i wondering command like: system("download [url] [destination]"); or download(url,destination); i using windows, sorry forgot mention. have @ curl from curl site curl command line tool transferring data url syntax, supporting dict, file, >ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, scp, >sftp, smtp, smtps, telnet , tftp. curl supports ssl certificates, http post, http put, ftp uploading, http form based upload, proxies, cookies, user+password authentication (basic, digest, ntlm, negotiate, kerberos...), file transfer resume, proxy tunneling , busload >of other useful tricks. its best client side library available http://curl.haxx.se/

How do you modify Ionic colors in Meteor? -

i'm using official ionic package meteor. working directly ionic, there way write sass theme. how in meteor set up? add fourseven:scss package download repo https://github.com/nickw/meteor-ionic-scss-import , copy files /client/stylesheets/ionic in main scss file, import ionic.import.scss: @import "./ionic/ionic.import.scss"; overwrite colors in _variables.import.scss go have beer.

log4j - Logging user interactions with a program -

we have app , want log how user interacting it. example using pages expect them to. dont want log via app hard me information device. each page interacts webservices planning log interaction. i have had thoughts on * webservice being called add logging table database - problem here performance impact * use log4j async mode log these details. does have other suggestion on how this? im reading lean startup @ moment (very far) , sort of thing seems fundamental im wondering if there other tips this. thanks since no 1 answered couple months, thought couple pointers might you... use mobile analytics tools fabric.io google analytics mobile apps flurry amazon mobile analytics appsee have server record users access (that's approach you're considering). offload overhead, there couple tactics employ (mix 'n match will): use async mechanisms (async operations in server, such futures; log4j async mode; async databases; etc). use separate database. use...

javascript - Calculating BST time from Date object? -

i've reviewed few questions on similar topics already, none of them address calculating destination timezone, taking its dst (daylight savings time) account. i'm trying write simple widget displays live local time of specific timezone visiting page. timezone of interest bst ( what bst? ), if possible i'd love see generic implementation locale. here's attempt, using vanilla javascript: function getbst() { var date = new date(), utc = date.gettime() + date.gettimezoneoffset() * 60000, local = new date(utc), // gmt, not bst day = local.getdate(), mon = local.getmonth() + 1, year = local.getfullyear(), hour = local.gethours(), minute = ('0' + local.getminutes()).slice(-2), second = ('0' + local.getseconds()).slice(-2), suffix = hour < 12 ? 'am' : 'pm'; hour = (hour - 24) % 12 + 12; return mon + '/' + day + '/' + ye...

how to increase font size in Jqgrid(free version )/Free jqGrid -

need on how increase font size in jqgrid(free version )/free jqgrid effect in parts of grid. ( add,edit,delete, search,view etc) you can use following css change font-size of ( add, edit, delete, search, view). .ui-jqdialog { font-size: 20px !important; // use font size here }

osx - Running Multiple PHP SSH2 Script -

i have shop having 10 macs. current able shutdown/restart them remotely through php ssh2 function using code <?php include('net/ssh2.php'); $server = "hostname"; $username = "user"; $password = "pwd"; $command = "sudo shutdown -r now"; $ssh = new net_ssh2($server); if (!$ssh->login($username, $password)) { exit('login failed'); } echo $ssh->exec($command); echo "sucessfully restarted blah blah blah"; ?> but in order shutdown/restart 10 of terminals, have run 10 different script achieve that. there methods can connect multiple server , run same command? you store hostnames , credentials in multi-dimensional array . allow iterate through each item using foreach , execute required command on each host....