Posts

c# - How can i have multiple GET methods in single Controller -

namespace employeeapi.controllers { public class employeedetailscontroller : apicontroller { // api/employeedetails public ienumerable<employee> get() { } public ienumerable<details> get(int id) { } public ienumerable<team> getteammember() { } public ienumerable<details> gettid(int id) { } } have webapi this: 1) ienumerable<employee> get() -> api/employeedetails 2) ienumerable<details> get(int id) -> api/employeedetails/id 3) ienumerable<team> getteammember() -> api/employeedetails/id/teammember 4) ienumerable<details> gettid(int id) -> api/employeedetails/id/teammember/tid i tried making changes routing, new it, could'nt understand much.so, please can 1 me understand , guide me on how should done. in advance..:) you attribute routing . prefere use them give easy ov...

pandas - Group by of a Column and Sum Contents of another column with python -

i have dataframe merged_df_energy: merged_df_energy.head() act_time_aerateur_1_f1 act_time_aerateur_1_f3 act_time_aerateur_1_f5 class_energy 63.333333 63.333333 63.333333 low 0 0 0 high 45.67 0 55.94 high 0 0 23.99 low 0 20 23.99 medium i create each act_time_aerateur_1_fx ( act_time_aerateur_1_f1 , act_time_aerateur_1_f3 , act_time_aerateur_1_f5 ) dataframe wich contains these columns : class_energy , sum_time for example dataframe corresponding act_time_aerateur_1_f1 : class_energy sum_time low 63.333333 medium 0 high 45.67 i thing should use group this: data.groupby(by=['class_energy'])['sum_time'].sum() any idea me please? you can add columns [] aggregating: print (df.groupby(by=['class_energy'])['act_time_aerateur_1_f1', 'act_time_aerateur_1_f3','act_time_aerateur_1_f5'].sum()) act_time_aerateur_1_f1 act_time_aerateur_1_f3 \ class_energy ...

c# - IdentityServer - Using Hybrid Flow -

i implemented identityserver3 , try use new asp.net core mvc application. i want use hybrid flow don't seem working. my client on identityserver3 setup this: new client { clientname = "test", clientid = "test", clienturi = "http://localhost:59528/", flow = flows.hybrid, allowedscopes = new list<string>() { constants.standardscopes.openid, constants.standardscopes.profile }, redirecturis = new list<string> { "http://localhost:59528/signin-oidc", }, postlogoutredirecturis = new list<string> { "http://localhost:59528/", }, enabled = true } asp.net core mvc application setup this: public void configure(iapplicationbuilder app, iloggerfactory loggerfactory, iconfigurationservice configurationservice, applicationdbcontextseeddata seeder) { jwtsecuritytokenhandler.defaultinboundclaimtypemap.clear(); /* logging co...

How to use maven in android studio -

Image
i want use bottombar library in project. when add proper gradle command in build.gradle file , sync , error: failed resolve: com.roughike:bottom-bar:2.0 i have searched lot reason. solution use jcenter(), not accessible in country , syncing lasts 1 or in cases 2 hours. use maven instead. in case how can use maven commands recommended on library home page? should put following code? <dependency> <groupid>com.roughike</groupid> <artifactid>bottom-bar</artifactid> <version>2.+</version> <type>pom</type> </dependency> gradle dependencies { compile 'com.roughike:bottom-bar:2.+' } if error sync gradle run proxy( host=127.0.0.1 , proxyport=8580 ) , type command in cmd gradlew -dhttps.proxyhost=127.0.0.1 -dhttps.proxyport=8580

Send message from an Azure ServiceBus Topic after a specific delay with node.js -

basically, within azure service bus, have topic , subscription. if message arrives in topic between 11:00am, subscriber should not handle yet. however, @ 14:00pm, expect subscriber treat it. is there way achieve natively topic filters? i don't find mention of kind of use case in official documentation regarding filters. indeed, presented samples about: " subscriber handling kind of message, or never ". i'm looking for: " subscriber expecting handling kind of message but, later @ specific time ". sounds want defer message ? don't know azure sdk node.js msdn documentation can set scheduledenqueuetimeutc on message : the scheduled enqueue time in utc. value delayed message sending. utilized delay messages sending specific time in future. only sample send message queue : var message = { body: 'test message', customproperties: { testproperty: 'testvalue' }}; ser...

c# - Generating Update and cancel buttons on clicking edit button in asp.net -

i've content page dynamically binds grid view. i've added edit , delete buttons also. on clicking edit button, how generate update , cancel link buttons. i know must handled in rowediting event. please me in detail how buttons. here ap.net webpage <%@ page title="" language="c#" masterpagefile="~/managesms.master" autoeventwireup="true" codebehind="webform10.aspx.cs" inherits="sms_mod2.webform10" %> <asp:content id="content1" contentplaceholderid="head" runat="server"> </asp:content> <asp:content id="content2" contentplaceholderid="contentplaceholder1" runat="server"> <asp:dropdownlist id="dropdownlist1" runat="server" autopostback="true" onselectedindexchanged="dropdownlist1_selectedindexchanged"></asp:dropdownlist> <asp:panel id="panel1" visible="f...

c++ - programmatically check if desktop experience is installed or not windows server 2016 -

as know windows server 2016 comes option install desktop experience during os instllation timing , if done below program snippet fails detect though desktop experience installed. ienumwbemclassobject* penumerator = null; hr = psvc->execquery( bstr_t("wql"), bstr_t("select id win32_serverfeature"), wbem_flag_forward_only | wbem_flag_return_immediately, null, &penumerator); hr = penumerator->next(wbem_infinite,1,&pclsobj,&ureturn); if(0 == ureturn) { break; } variant vtprop; hr = pclsobj->get(l"id",0,&vtprop,0,0); this penumerator variable not contain desktop experience feature id 35. is expected behavior in windows server 2016 ? if not how value in windows server 2016 ?