Posts

Showing posts from June, 2014

Distracting Exception output in QtCreator when debugging Windows application -

i using qtcreator 4.1rc1 under windows msvc tool chain. debugger cdb windows 8.1 sdk. had same issue older versions of qtcreator. when debug application, there many messages output (and issues) pane in form exception @ 0x773596c2, code: 0xe06d7363: c++ exception, flags=0x1 (execution cannot continued) (first chance) in winscard!scardtransmit i understand, expected under windows , exceptions not problem. pollute output , issues pane , render them useless. so tried rid of messages. but failed after hours trying. tried following: use check box 'ignore first chance access violation' under tools->options->debugger->cdb specifying command line arguments cdb.exe: -xi create script file cdb.exe used @ startup avoid warnings. script contained commands 'sxi 8010000a; sxi 0000071a; sxi e06d7363'. tried placing script in several directories , specifying command line options -cf or -cfr. when run cdb.exe command line using startup script, works! no exce...

jquery - How to use Bootstrap JavaScript plugins (dropdowns, modals) in Emberjs -

i can't bootstrap javascript plugins dropdowns , modals work out of box in ember. command line: ember new test-app ember install ember-bootstrap ember generate route test ember generate component jquery-test app/templates/test.hbs: {{jquery-test}} app/templates/components/jquery-test.hbs (copied getbootstrap.com): <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#mymodal"> launch demo modal </button> <div class="modal fade" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="mymodallabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="close"><span aria-hidden="true...

Android: How to change the Mobile hotspot broadcast channel by programmatically? -

i tried change mobile hotsport broadcast channel in android programmatically using following code not changing value/channel. note: able change ssid , password programmatically. tried set channel 11, still not working... thanks in advance my code is public void hotspotchannelwrite() { wifimanager wifimanager = (wifimanager)getsystemservice(wifi_service); if(wifimanager.iswifienabled()) { wifimanager.setwifienabled(false); } netconfig = new wificonfiguration(); netconfig.ssid = "tipturinfo"; netconfig.presharedkey = "sharath"; netconfig.allowedauthalgorithms.set(wificonfiguration.authalgorithm.open); netconfig.allowedprotocols.set(wificonfiguration.protocol.rsn); netconfig.allowedprotocols.set(wificonfiguration.protocol.wpa); netconfig.allowedkeymanagement.set(wificonfiguration.keymgmt.wpa_psk); netconfig.allowedgroupciphers.set(wificonfiguration.groupcipher.tkip); netconfig.allowedgroupcipher...

elasticsearch - dynamic mapping for nested type -

i have index/type of test1/all looks follows: { "test1": { "mappings": { "all": { "properties": { "colors": { "properties": { "h": {"type": "double"}, "s": {"type": "long"}, "v": {"type": "long"}, "color_percent": {"type": "long"} } }, "file_name": { "type": "string" }, "id": { "type": "string" }, "no_of_colors": { "type": "long" } } } } } } i make colors field nested, trying following : ...

arrays - Does joined() or flatMap(_:) perform better in Swift 3? -

i'm curious performance characteristics of joined() , .flatmap(_:) in flattening multidimensional array: let array = [[1,2,3],[4,5,6],[7,8,9]] let j = array(array.joined()) let f = array.flatmap{$0} they both flatten nested array [1, 2, 3, 4, 5, 6, 7, 8, 9] . should prefer 1 on other performance? also, there more readable way write calls? tl; dr when comes flattening 2d arrays (without transformations or separators applied, see @dfri's answer more info aspect), array.flatmap{$0} , array(array.joined()) both conceptually same , have similar performance. the main difference between flatmap(_:) , joined() (note isn't new method, has just been renamed flatten() ) joined() lazily applied (for arrays, returns special flattenbidirectionalcollection<base> ). therefore in terms of performance, makes sense use joined() on flatmap(_:) in situations want iterate on part of flattened sequence (without applying transformations). example: let ar...

java - How to enable --no-reset if appium server is started by AppiumServiceBuilder -

i have started appium server using appiumserverbuilder service = appiumdriverlocalservice .buildservice(new appiumservicebuilder() .usingdriverexecutable(new file(nodejsexecutable)) .withappiumjs(new file(appiumjsexecutable)) .withipaddress(appiumserveraddress) .usingport(appiumserverport)); now appium server gets started default --full-reset capability, causing app reset every time on each run. need set --no-reset appium server appium doesn't re install app everytime . how can here? you can explicitly set "noresetvalue" appium capability accepts boolean value, true/false when set true , prevents app re-installing each time, java example: capabilities = new desiredcapabilities(); capabilities.setcapability("noresetvalue","true");

How to install module from another python installation -

i using winpython. simple distribution, want use winpython zero. possible install package winpython folder winpython 0 folder? in theory, possible way to: download packages https://sourceforge.net/projects/winpython/files/winpython_source/do_it_yourself/winpython_2016-03/ unzip them in d:\toto then pip install the_package_i_want --no-index --find-links=d:\toto --trusted-host=none

OMNET++ 5 GUI nodes overlapped -

Image
omnetpp 5, gui nodes overlapped each other! i new in omnetpp environment , working omnet++ 5. while developing first network, created tic-toc network , find okay. but after while, when again run it, found nodes overlapped each other (see attached pic) , happen every times. it happening of own projects, not sample projects. does have clue please? check doctrine configuration. maybe xml mapping overrides annotations , that's why it's not working. fh overlapped nodes: i'm having same issue. in omnet 5 networks looked yours. changed 4.6 colleague didn't seem have problem , he's running 4.6. in 4.6 tic/toc examples , runs fine, custom network doesn't. the screen attached shows how network looks in editor vs how looks in simulation environment (in 4.6). @edit: found problem: omnet decided zoom out 0.01x without telling me. zooming in revealed, supposed be...

html5 - Passing values from one html to another html without extra script -

i have registration form such below: <form action="res.html" method="get"> firstname :<input type="text" name="first" /><br /> lastname :<input type="text" name="last" /><br /> gender :<input type="radio" name="gender" />male <input type="radio" name="gender" />female<br /><br /> <input type="submit" value="register" name="submit" /> </form> i want display firstname & lastname in res.html file. know can use javascript, php or jsp, without of script's can pass values res.html. thanks in advance. you can't pass data file have extension .html should change file name res.html res.php

amazon web services - User is sometimes not authorized to perform action on AWS Elasticsearch -

{ "message": "user: anonymous not authorized perform: es:eshttpget on resource: $my-elastic-search-domain" } is message when get aws elasticsearch instance actual result permitted user get. it's pretty 50/50. i updated access policy , have 2 nodes - propagating changes other node or something? there caching going on? maybe because i'm behind corporate proxy?

reactjs - Rendering JavaScript Object in React -

i have react project set fetch object firebase database , render page. not know how render data properly. the data fetching looks this: { "projects": { "0": { "title": "test", "function": "test2" }, "1": { "title": "test3", "function": "test4" } } } in chrome react debugger see this: <div> <message key="0" data={function: "test2", title: "test", key: "0"}>...</message> <message key="1" data={function: "test4", title: "test3", key: "1"}>...</message> </div> but in elements view seeing 2 empty divs: <div> <div></div> == $0 <div></div> </div> currently passing <message key={index} data={message} /> messag...

c# - How I can make transparent blurred border? -

Image
how can put border blurred , transparent in uwp project can see in picture? this sample should you. key thing render ui under panel image , blur it. render ui element image: rendertargetbitmap rtb = new rendertargetbitmap(); await rendertargetbitmap.renderasync(uielement); image.source = rtb; make image blured using uwp community toolkit: await image.blur(duration: 10, delay: 0, value: 10).startasync(); or, yes, @mzetko answered use new anniversary sdk

Convert a list `[1, 2, 3]` to a string '{1, 2, 3}' in Javascript -

i need convert lists [1, 3, 2] or [1,3] or [1,4,5] strings of form '{1, 3, 2}' , '{1, 3}' '{1, 4, 5}' . i can think of couple of ways this, not elegant one. wondering how solve this. there elegant solution possible? you can this. var result = '{'+ input[0]; for(var index = 1; index < input.length; index++) { result = result + ' '+ input[index]; } result = result + '}'; or var result = '{' + input.join(', ')+ '}'; remember give space after ','.

ios - How to reduce memory usage in collection view? -

i have app consist of collectionview 30 cell. cell consist of image , label. problem is, when load image memory use going 87 mb. if didn't set image, memory use 30 mb. i using moa load image asynchronously. , here cell init: import uikit import moa class productlistitemcell: uicollectionviewcell { @iboutlet var imgproductitem: uiimageview! @iboutlet var titlleproductlist: uilabel! @iboutlet var priceproductlist: uilabel! @iboutlet var boldpriceproductlist: uilabel! func updatecontent(product: item) { // if let imgurl = product.picurl { // self.imgproductitem.moa.url = "http:\(imgurl)" // } if let title = product.title { self.titlleproductlist.text = title } if let price = product.pricetag { self.priceproductlist.setstrikethrough(price) } if let boldprice = product.price { self.boldpriceproductlist.text = boldprice } } } an...

xamarin - How to integrate the new AD B2C and the C# Azure Mobile Client lib? -

i have secured api app , have tested adb2c flow sample app found here: https://github.com/azure-samples/active-directory-b2c-xamarin-native . using structure, can trigger sign-in process, , access protected api calls. however wanted use windowsazure.mobile sdk convenience. hinted @ here: https://cgillum.tech/2016/08/10/app-service-auth-and-azure-ad-b2c-part-2/ can trigger b2c flow loginasync in class nothing when call in way. i found https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-how-to-use-client-library/ (scroll "authenticate users active directory authentication library") substituted msal calls getting token. triggers sign-on flow, token , claims back, put in json , pass so: authenticationresult ar = await app.pcapplication.acquiretokensilentasync(app.scopes, "", app.authority, app.signupsigninpolicy, false); jobject payload = new jobject(); payload["access_token"] = ar.accesstoken; user = await app.mobile...

javascript - render components with user selected colors -

i have form ask users color specific project, being stored string in model represents hex value (e.g: #fff ). what i'd able render page components using color , avoid using inline styles this: <h2 style="color: <%= project.color %>;"><%= project.client.upcase %></h2> as colors predefined (there might list of 10 predefined colors) thinking store class names instead. however, doing have maintain list of colors in more 1 place: i have validate color class specified user in list, i'd need list in backend code i need list of colors defined in sass and need list of colors in javascript color picker another problem have when storing hex values when want use different shade of color: <div class="progress" style="background-color: <%= project.color %>"> <div class="progress-bar" style="width: 40%; background-color: <%= project.color %>;"> </div> </div> ...

android - Changing background color in a activity. -

Image
i used android studio create basic activity using new -> activity -> basic activity. activity background colour black. know reduce battery consumption. there way change white colour, without changing style. i tried change background colour of root layout, won't show hint text of edit text field. because it's colour white. then tried change theme material material lite, wouldn't show change when run app in device. here activity declaration in androidmanifest.xml <activity android:name=".searchbus" android:label="@string/title_activity_search_bus" android:parentactivityname=".mapsactivity" > <meta-data android:name="android.support.parent_activity" android:value="uk.co.stableweb.iroute.mapsactivity" /> </activity> in styles.xml set android:windowbackground attribute whatever theme using application or activity. can find theme using in andro...

For Loop at Python -

my goal create for-loop code return output following: list(indicator.values())[0], list(indicator.values())[1], list(indicator.values())[2], list(indicator.values())[3], ... ... list(indicator.values())[98], list(indicator.values())[99], however when run code below, receive error message 'typeerror: 'int' object not iterable'. how can fix can intended result? x = 100 item in x: list(indicator.values())[item] use code: x = 100 item in range(x): print(list(indicator.values())[item])]

linux kernel - How to disable a hardware from being grabbed by hid-multitouch driver -

i have kortek touch screen hardware following info: vendorid = 2965 productid = 5023 this hardware driven hid-multitouch driver default. not require multitouch functionality of now. i want use hardware in single touch mode , therefore want use hid-generic driver. to stop hid-multitouch driving touch screen hardware commented out following lines in linux kernel driver code drivers/hid/hid-multitouch.c /* generic mt device */ //{ hid_device(hid_bus_any, hid_group_multitouch, hid_any_id, hid_any_id) }, since kortek hardware entry not listed in device table disabled driver generic devices commenting out generic device entry. but not work , hid-multitouch still grabs hardware. i know changes need make disable 'hid-multitouch driver grabbing hardware.

javascript - Bing Image Search API request using Ajax -

i'm attempting use bing image search api according this article . i need make ajax request https://api.cognitive.microsoft.com/bing/v5.0/images/search attached image of test code i've written attempt work. app.js file linked html file has button on it. screenshot of code on imgur i receive error app.js:7 uncaught syntaxerror: unexpected token - i believe ajax syntax off. me set request properly? huzzah! a friend helped me out! ill uploaded revised code got me success part of request. resolved

c# - Redirect to external URI, even if it's not valid -

general info: i working on asp.net mvc 5 application sends emails , tracks link-clicking within each email. when user follows link, performs query web server query parameters. meanwhile, application saves information click , redirects user initial (target) site. closer point: the links in mails may arbitrary (e.g. http://www.google.com , //google.com , www.google.com ) or not valid (e.g. ab//cd ). application doesn't care string values of urls (even if it's \asdf//sadg: ) , paste them directly address bar. for purpose tried use redirect , redirectpermanent methods, , uribuilder class. redirect , redirectpermanent may combine addresses , try redirect local path if url specified without scheme. uribuilder manages add scheme if needed, throws exceptions when url invalid. javascript location.replace has same behavior c# redirect , way. the issue: how can redirect arbitrary urls asp.net mvc controller without validations , redirects local paths? you s...

cassandra - GraphFactory message: GraphFactory could not instantiate this Graph implementation [com.thinkaurelius.titan.core.TitanFactory] -

i'm trying make graph queries via gremlin-shell cassandra backend (locally or remotely). i downloaded stock gremlin server distribution , installed titan (as described here in manual-installation). http://s3.thinkaurelius.com/docs/titan/0.9.0-m1/server.html i added property settings , classpath : ~/gremlin-server-3.0.0.m6$ cat conf/titan-cassandra.properties gremlin.graph=com.thinkaurelius.titan.core.titanfactory storage.backend=cassandrathrift storage.directory=../db/cassandra ~/gremlin-server-3.0.0.m6$ cat conf/gremlin-server.yaml host: localhost port: 8182 threadpoolworker: 1 gremlinpool: 8 scriptevaluationtimeout: 30000 serializedresponsetimeout: 30000 channelizer: com.tinkerpop.gremlin.server.channel.websocketchannelizer graphs: { g: conf/titan-cassandra.properties} #g: conf/tinkergraph-empty.properties} plugins: - aurelius.titan when bring gremlin server, following errors (even though gremlin server comes up) : bin/gremlin-server.sh [info] gremlinse...

junit5 - What's the equivalent of org.junit.runner.JUnitCore.runClasses in Junit 5? -

the following code started in junit4 , has been translated junit5 except main() . reason i'm writing way i'm demonstrating tdd , have multiple versions of stringinverter implementation, each of implements more features , passes more tests. here stringinverter interface: interface stringinverter { public string invert(string str); } and here's almost-compiling-with-junit5 class: import java.util.*; import org.junit.jupiter.api.*; import static org.junit.jupiter.api.assertions.*; import org.junit.platform.runner.junitplatform; public class stringinvertertest { static stringinverter inverter; @test public final void basicinversion_succeed() { string in = "exit, pursued bear."; string out = "exit, pursued bear."; assertequals(inverter.invert(in), out); } @test public final void basicinversion_fail() { expectthrows(runtimeexception.class, () -> { assertequals(inverter.invert("x"), "x"); ...

Mysql ASC function ORDER only first ID's -

i have line: $query = mysql_query(" select * livechat type='public' order id asc limit 15") ; and chat, asc takes first id comments, shows 15 old comments (id1, id2 , on). if use "desc" instead of asc, shows new comments, in bad way - newest @ top, since chat, newest comments must @ bottom. try this: $query = mysql_query("select * ( select * livechat type='public' order id desc limit 15 ) t order t.id") ;

c - Error 234, more data is available, with RegQueryInfoKey and RegEnumValue -

Image
i trying use regqueryinfokey longest value , data´s size , regenumvalue show values, getting 234 error value, means "more data available" when run app. i using malloc allocate lpvaluename , lpdata can use sizes regqueryinfokey gave me. if set lpcchvaluename 16383, example, app works fine, no idea why doesn't lpcmaxsubkeylen value returned regqueryinfokey . the registry key has 2 string values: what doing wrong? apologize noob errors might see. here code: int wmain() { //regopenkeyex hkey hkey = hkey_current_user; lpcwstr subkey = l"winside"; dword options = 0; regsam samdesired = key_query_value; hkey hkopenresult; //opening hkey_current_user\winside subkey long openkey = regopenkeyex(hkey, subkey, options, samdesired, &hkopenresult); if (openkey != error_success) wprintf(l"error code: %li\n", openkey); else { wprintf(l"key opened!\n...

javascript - Upgraded angular material and now alert dialogs turn into a giant black area -

Image
i running old angular-material version (v0.9.0). i wanted upgrade because needed use new htmlcontent alert $mddialog. when did replace angular-material.min.js version here ( https://ajax.googleapis.com/ajax/libs/angular_material/1.0.7/angular-material.min.js ) dialogs shown giant black area what happening? the problem updating angular-material.min.js , not angular-material.min.css. overworte angular-material.min.css , black screen went away

javascript - Styling a link on hover - with Radium in React -

i've been looking answer here , in documentation, can't seem find it. here's radium documentation . i'd know if there's way style links in react? a, a:hover, a:visited etc. example: var react = require("react"); var radium = require('radium'); var link = require('react-router').link var header = react.createclass({ render: function(){ var styles={ links: { ":hover": {color: "red", textdecoration: "none"} } } return( <div style={[styles.links]}> <link to="/photos">photos</link> </div> ); } }); module.exports = radium(header); you can't react's style property can't standard html inline styles. includes using css pseudo classes. instead, assign class react component via classname property , apply styles class in css sty...

scala - Executing sbt in command line via python script and outputting to file -

i have set of json files in directory /desktop/jsons , , have scala script takes in json , outputs stuff. can run manually in terminal cd ing directory of scala script ( /me/dev/scalastuff ) , running sbt --error "run /desktop/jsons/jsonexample.json" , which outputs stuff want in terminal. i want write python script automatically , additionally outputs json file "stuff" thats outputted scala script. my issues right using subprocessing. when try run basedir = '/me/dev/scalastuff' p = subprocess.popen(['sbt --error "run /desktop/jsons/jsonexample.json"'], cwd = basedir, stdout = subprocess.pipe) out = p.stdout.read() print out i oserror: [errno 2] no such file or directory . i'm stumped why occurring. i'm new subprocess, light on me! popen in python takes list of shell arguments. you're passing one! so it's trying execute file named wholly 'sbt --error "run /me/desktop/jsons/jsonexample....

batch file - installing windows service from command line "The specified service has been marked for deletion" -

i trying create batch file automate uninstalling, building , reinstalling windows service. after uninstalling when try reinstall error: specified service has been marked deletion. here batch script: @echo off set filepath=<myfilepath> set servicename=<myservicename> sc query %servicename% > nul if %errorlevel% equ 0 net stop %servicename% & sc delete %servicename% c:\windows\microsoft.net\framework64\v4.0.30319\msbuild.exe c:\users\christopher\desktop\tfs\moc\laneupdateservice\laneupdateservice.sln /property:configuration=debug c:\windows\microsoft.net\framework64\v4.0.30319\installutil.exe %filepath% sc start %servicename% i not have task manager, services or event viewer open, there no other users logged in. have tried deleting reg key service, no luck. if run script again after failing install correctly. there way manually make sure service deleted? the problem after stopping service there still process running. altered onstop method make sure ...

java - XPrinter XP58-IIH printer cutting issue -

i got 58mm pos xprinter 58-iih. work fine esc/pos commands not of them though. printer has cutter, have not been able cut. have printed stuff java program, lot of stuff really, have not been able paper cutter work. i have tried using following pos commands {27,105}, {27,109}, {27,121}, {27,12}, {27,118}, {27,100,48) {29,86,48,0}, {29,86,66} i have tried searching cant more codes try. please can me solution. mode of connection pc via usb cable, , installed drivers printer xprinter website. after research found out xprinter 58-iih not support auto cutter feature. decided post in case runs trouble , find useful...

python - Count how often a specific string occurs in a list -

i want pairwise compare several lists in kind of "bag of words" approach. have strings in lists. unfortunatelly, have bug in script cannot fix. code works if there numbers in lists have strings in lists doesn't run anymore. appreciate help. i receive following error message: traceback (most recent call last): file "test.py", line 21, in <module> bow_matrix[0, p] = list_words_ab[p] valueerror: not convert string float: 'd' my code: a = ["a", "b", "c", "d"] b = ["b", "c", "d", "e"] p = 0 if len(a) > len(b): max_words = len(a) else: max_words = len(b) list_words_ab = list(set(a) | set(b)) len_bow_matrix = len(list_words_ab) bow_matrix = numpy.zeros(shape = (3, len_bow_matrix)) while p < len_bow_matrix: bow_matrix[0, p] = list_words_ab[p] p = p+1 p = 0 while p < len_bow_matrix: bow_matrix[1, p] = a.count(bow_matrix[0, p]) bow...

android - ADB over Wi-Fi is extremely slow on one PC, great on another -

i'm trying learn how develop android, , i'd able test on device instead of emulator. usb port on phone getting pretty loose, , i'd rather not mess scores of hours i'll using test. i enabled adb on wi-fi on desktop, , worked flawlessly. desktop runs windows 7 , on home network. i installed android studio , enabled adb on wi-fi on laptop, runs windows 10 , on work network (which has no secondary login , faster). works, it's extremely slow. when hit "run" button in android studio, thought had frozen. used adb install, , worked - slowly. took 5 minutes install apk. i've done lot of searching seems seems dismiss problem "a problem device" or "a problem cable (even though it's on wi-fi?)". or in 1 case, solution applied mac. does know how fix this? i'm not sure whether fluke, guide online told me use command adb usb before connecting via wi-fi. did while setting desktop, laptop assumed redundant since phon...

c# - Entity Framework 6 Async DBContext Access with Enums -

i'm utilizing ef 6's ability utilize enum's properties in entity object. when try querying datasource asynchronously using enum property part of criteria, query never returns. however, if make query synchronously completes successfully. sql generated ef identical both cases, , correct. here simplified version of entity object : public class rolegroup { public int id { get; set; } [column("requestsubtypeid")] public subtypeenum? subtypeid { get; set; } } here's simplified version of enum : public enum subtypeenum { accountspayableinquiry = 1, payrollinquiry = 2, billinginquiry = 3 } here's method i'm using retrieve role group database, based on subtypeid parameter: public async task<rolegroup> getrolegroupbysubtype(subtypeenum subtypeid) { return await context.workflowrolegroups .firstasync(rolegroup => rolegroup.subtypeid == subtypeid); } using context.database.log = s =...

ios - Swift Network Calling: Latency keeps increasing and finally request timeout -

i working on swift project requires lot of consumption of apis. working fine sometimes, code=-1001 "the request timed out." error while calling api. test properly, using loop , iterating 1000 times, calling same api. i using public api. api let apistring = "https://oc-index.library.ubc.ca" and loop is for in 0 ..< 1000 { alamofire.request(.post, apistring).responsejson { response in print(response.debugdescription) if response.result.isfailure { print("failure") } } } now while checking print responses, see latency increased on every new api response , goes 60.14 secs , request timeouts. first time while calling api, latency 2.225 secs , in timeline in logs, latency of last successful api 60.14 secs. timeline of api when being hit first time in loop (when = 1). [timeline]: timeline: { "request start time": 493671593.424, "initial response time": 493671595.649, "requ...

c# .NET Active Directory user retrieval throws exception when user password is in the expiry warning period -

when checking if user in role, typically use following type of code. however, code throws exception if user warned password expire in next 10 days (for example). know way prevent happening? using system.security.principal; . . . public userdto getcurrentuser() { userdto u = new userdto(); // grab windows information windowsidentity currentuseridentity = windowsidentity.getcurrent(); windowsprincipal currentuserprincipal = new windowsprincipal(currentuseridentity); u.isauthorized = currentuserprincipal.isinrole("mydomain\\myrole"); u.name = currentuseridentity.name; if (u.isauthorized) { u.id = 1; } else // user isn't authorized { u.id = 0; } return u; } // current user i'm using .net framework 4.5 code. thanks! ray

d3.js - DC.js Line Chart - no line being displayed -

Image
need display line in line-chart , ability move tiles, see max bitrate value line, see labels , axis pointers on hover, grouped table , time slider.y dimension needs display "bitrate total" or "bitrate avg" (as defined in code). x dimension needs display 15 min interval in scope of weeks. i can upload data table not line graph. can see points on graph using .renderdatapoints() no lines. checked data - not find null/nan values being returned, not using old version of colors. the code can found in https://jsfiddle.net/dani2011/bu2ag0f7/8/ . tried replace csv var data nothing being displayed @ moment in fiddle. code whole displayed in https://groups.google.com/forum/#!topic/dc-js-user-group/meslyf2rwri any appreciated. here's go-to-answer how put data jsfiddle . it's easiest stick in unused tag in html. bl.ocks.org / blockbuilder.org easier this. here's fork of fiddle data loaded way: http://jsfiddle.net/gordonwoodhull/bu2ag0f7/17/ ...

wpf - best practise for connecting to a database server in c# -

i have been doing research , wondering best approach is, imagine scenario have wpf application being distributed many users, application has connect database server. connecting database not problem how secure connection external users have access application. within app.config file connection strings can pointed server, releasing password , server ip address not idea. research, other people recommended encrypting data, sure still got degree of vulnerability. the next approach use wcf, have limited knowledge on , not sure if approach correct. am safe in encrypting connection strings or there more that, want careful when dealing sensitive data. a common way add server layer between wpf app , database. can rest api or other web services like. in terms of technologies can choose, wcf one. wcf not easy started if not have experience of dealing services. suggest try asp.net's web api project establish rest service ( http://www.asp.net/web-api/overview/data/using-web-ap...

algorithm - Listing(or counting) files in .tar/.tar.gz archives: What is the time complexity? -

what time complexity listing file names in .tar archive? o(size(file)) or o(# of files in archive) ? according wikipedia article ( https://en.wikipedia.org/wiki/tar_(computing) ), tar archives not support random access , in order list file names "one has read through entire archive" , understand o(size(file)) . other hand, each file in tar has header specifies length of file, can 1 hdd seek each file in there, in case time complexity o(# of files in archive) . and .tar.gz archives, suppose in case not able perform multiple seeks without uncompressing take o(size(file)) anyway? depends on storage! uncompressed tar for tape archives (you know, "tar"s), linear byte length, in case, because fast-forwarding still linear in time length need fast-forward. for small files on modern storage: same; don't ask ssd 20 bytes of storage. 4kb @ once; in theory, means pretty instantly skip on 1gb file. in practice, experience tells me doesn't happen...

c# - Insert Double In Sql Server -

i using sql server 2008 , c#. i'm declaring variable of type double , want insert in database. have error: data type conversion error varchar numeric. how insert value of type double in sql server using c#? this code: double variable = 13.2; con.open(); cmd=con.createcommand(); cmd.commandtext = "insert etudient (idetudient, [nom etudient], value) values('" + convert.toint16( text_id.text) + "' , '" + text_name.text + "','" + variable + "')"; cmd.executenonquery(); con.close(); messagebox.show("success"); since, variable of type double not string, should inserting variable in format: " + variable + " , not '" + variable + "' further, insert query goes this: cmd.commandtext = "insert etudient (idetudient, [nom etudient], value) values('" + convert.toint16( text_id.text) + "' , '" + text_name.text + "...

Angular 2 form validation not working -

i have angular 2 application (rc.4) , i'm having issues form validation. i have below form code in template. <div class='modal'> <form #modalform='ngform'> <div class='heading'> <h4>{{_title}}</h4> <div class='close-icon' (click)='close()'></div> </div> <div class='body'> <input type='text' name='projectname' [(ngmodel)]='projectname' required placeholder='give project name...' id='focusonme'> </div> <div class='controls'> <button class='btn btn-secondary' (click)='close()'>cancel</button> <button type='submit' class='btn' (click)='sendaction()' [disabled]='!modalform.form.valid'>{{_action}}</button> </div> </form> </div> as can see n...

Aggregate Rating Schema Issue in Home Page -

Image
i have website, in structure & formating & other factors. added "aggregate rating schema" code displays 5 star ratings below url's in google search results page [serp]. but issue rating displayed internal pages & directories not home page/index page.. i have attached screenshot query both internal & home page.. there issue code or should further configuration.. please help.. kind support appreciated... thank you google may display aggregate ratings, won't every page, ratings/reviews specific items only. in case homepage not specific item, , not makes sense have ratings, because specific items : provide review and/or rating information specific item, not category or list of items also find ratings not " readily available users marked-up page. should obvious users page has review or ratings content ." these hints google won't show them in serp.

java - Can I access the "secondary this" from an inner class? -

this question has answer here: getting hold of outer class object inner class object 8 answers i have basic classes abstract class unit { unit target; abstract class unitai {/*...*/} } from these, have derived class infantry extends unit { class infantryai extends unitai {/*...*/} } can class infantryai somehow secondary ( implicit ) this used accessing members of it's surrounding class infantry ? specifically, needs determine if surrounding class infantry being targetted target, this: if (/*secondary_this.*/target.target == secondary_this) or, generally, unit . you can access outer this prepending classname: infantry.this.target; //"this" of infantry class inside infantryai unit.this.target; //"this" of unit class inside unitai this doesn't work static nested classes though don't belong ins...

sql server - How to calculate running total column which has more than one date where criteria -

i'm using sql server 2012 , have query need convert running total per month. the current query expect input parameter of date , outputs groups total per group input month date declare @inputdate datetime set monthenddate = '2016/07/31' select p.groupid,count(p.personid) grouptotal persondata p p.starteddate not null , p.starteddate < @inputdate , ( p.outcomedate > @inputdate or p.outcomedate null ) group p.groupid using same query logic need repopulate historic data per month need use running total months e.g. (2016/01/01,2016/02/01,2016/03/01 etc) , not specific month i can if there 1 date criteria e.g. starteddate e.g. select p.*, sum(grouptotal) on (partition groupid order startedmonth) runningtotal ( select p.groupid,left(convert(varchar, p.starteddate, 112), 6) startedmonth,count(p.personid) grouptotal persondata p p.starteddate not null group p.groupid,left(convert(varchar, p...

Spring - Create bean based on Annotation field -

update: used different approach problem. side-question: know how spring exclude in springbootapplication the springbootapplication: @target(elementtype.type) @retention(retentionpolicy.runtime) @documented @inherited @springbootconfiguration @enableautoconfiguration @componentscan(excludefilters = @filter(type = filtertype.custom, classes = typeexcludefilter.class)) public @interface springbootapplication { so when context loaded, , enableautoconfiguration executed, excludes available. thats same want. at bean-creation want know if annotation has field (for example boolean) old question: i have annotation: @target(elementtype.type) @retention(retentionpolicy.runtime) @import(taskspringcontext.class) public @interface tasktest { class<? extends databaseservice> db() default databaseservice.class; } this annotation used at: @tasktest(db = databaseserviceextended.class) @springbootapplication() public class taskserver { public static void main(st...

php - Woocommerce rearrange checkout fields -

i have rearranged order fields on woocommerce checkout page function: //reorder checkout add_filter( 'woocommerce_checkout_fields', 'reorder_woo_fields' ); function reorder_woo_fields( $fields ) { $fields2['billing']['billing_first_name'] = $fields['billing'] ['billing_first_name']; $fields2['billing']['billing_last_name'] = $fields['billing']['billing_last_name']; $fields2['billing']['billing_company'] = $fields['billing']['billing_company']; $fields2['billing']['billing_address_1'] = $fields['billing']['billing_address_1']; $fields2['billing']['billing_city'] = $fields['billing']['billing_city']; $fields2['billing']['billing_postcode'] = $fields['billing']['billing_postcode']; $fields2['billing']['billing_coun...

How to install PHP 7 extension "memcached" on Windows -

i'm having huge problems installing memcached extension php. currently using: os: windows 10 x64 php: 7.0.1 via xampp apache: 2.4.18 (win32) i have installed memcached in c:/memcached service running. but problem starts when trying add memcache php extension. i've tried numerous versions of php_memcache.dll , non seem working. i did include extension in php.ini extension=php_memcache.dll when run php -m memcache not listed , @ top recieve error: php startup: unable load dynamic library 'c:\xampp\php\ext\php_memcache.dll' - specified module not found. and when try running test.php memcache initialization recive class not found exception this huge problem, because need running selenium tests. the memcached service doesn't install php memcached extension you. installs memcached server used store cache. you'll need download windows dll pecl repository first ( click on blue windows dll link ). must add extension=php_memcache....