Posts

android - FCM - Get Message Label -

Image
to send message fcm backend, have view : i wanna message label ( libellé du message ) remotemessage . when debug field, content in message labeled google.c.a.c_l , think internal field. first, wonder same question. after read document here , played around it, found that: you cannot message label on client device, because label display on firebase console only. to title @ client side, have use advanced options auto collapse @ bottom. advanced options, can send data payload client key/value. then remotemessage.getnotification().getbody() notification's message body (from message text/texte du message), remotemessage.getnotification().gettitle() notitifcation's title (from advanced options), remotemessage.getdata() data payload (from advanced options).

excel vba - Replacing strings in a column sequentially -

i naive macros. have data in column 500 rows of data. note rows blank in between. data image files names (x0011@00.jpg). need rename them sequentially user input. user input must 400500. new name must (400500_image-1.jpg). _image-1, _image-2 , on must generated automatically in sequence omitting blank rows. see below how data displayed in column , how want in column b. i appreciate if can provide macro this. col col b x0011@00.jpg 400500_image-1.jpg x0021@00.jpg 400500_image-2.jpg x0041@00.jpg 400500_image-3.jpg x0071@00.jpg 400500_image-4.jpg x0051@00.jpg 400500_image-5.jpg x0031@00.jpg 400500_image-6.jpg x0061@00.jpg 400500_image-7.jpg x0091@00.jpg 400500_image-8.jpg thanks sub naming() rowstoprocess = range("a" & rows.count).end(xlup).row j = 1 userinput = inputbox("give me text") = 1 rowstoprocess if not cells(i, 1).value = "" cells(i, 2).value = userinput & "_image-...

linux - Can tmux save commands to a file, like .bash_history? -

does tmux support saving file commands typed in "c-b :" mode ? i'd rather through ones typed have each command in man page. there history-file option looking for. history-file path if not empty, file tmux write command prompt history on exit , load on start. add .tmux.conf set -g history-file ~/.tmux_history note added in 2.1 version. if have older version of tmux read https://unix.stackexchange.com/questions/26548/write-all-tmux-scrollback-to-a-file

javascript - Angular2 bind ngModel from ngFor -

Image
so i'm rendering textarea dynamically using ngfor i'm not sure how can pass ngmodel bind in function. <div *ngfor="let inputsearch of searchboxcount; let = index" [ngclass]="{'col-sm-3': swaggerparamlength=='3', 'col-sm-9': swaggerparamlength=='1'}"> <textarea name="{{inputsearch.name}}" id="{{inputsearch.name}}" rows="3" class="search-area-txt" attr.placeholder="search product {{inputsearch.name}}" [(ngmodel)]="inputsearch.name"></textarea> </div> textarea example: textarea render based on length of response api call in case searchboxcount searchboxcount.length , if length = 1 render 1 textarea if 3 show 3 textareas . objs have different names (example: id/email/whatever), ngmodel based on obj name json object. how bind inputsearch.name function getquerystring() getquerystring() { this.isloading = true; ...

JavaScript: Module architecture suggestions -

i wanna create website have left side search filter option panel, sort through data on website. i thinking using revealing module pattern. but should create module each filter options have there own filter logic -and create init module render selected filters? what best module architecture in situation ? ? thanks in advance. no need use modules that. keep simple. just use simple functions implement same "interface" (though there no concept of "interface" in js unless use typescript or similar language). you can use library such lodash give lot tools define such kinds of functions , manipulate , compose them. that implementation of filter functions though. application bit more complex that, may want check out how structure code of application if new you. mvc pattern start, bigger applications there other architectures may more suitable , want use framework react/redux or angular implement them properly.

Server 2012 r2 and mysql -

Image
i have dell power edge t630 machine server 2012 r2 installed. trying install mysql 5.5 win 32. server instances configured except "apply security settings" fol screen appears whats wrong? try changing root password: mysqladmin -u root password [newpassword] and login new password.

c# - How to catch a custom FaultException in WCF -

i testing wcf potentially implementing api remote controlling device runs our controller-software (c#/.net 4.6.1) on windows. i trying figure out how throw , catch faultexception service , catch .net client. the problem having when running code (in debug-mode on vs 2015), exception not caught client, vs ends showing me exception inside vs @ code-location of service ( service.cs ), being thrown. exception message is: an exception of type 'system.servicemodel.faultexception`1' occurred in wcfservice.dll not handled in user code additional information: argument value not 1 where the argument value not 1 custom message provide me. here relevant parts of code. hope can spot, doing wrong: iservice.cs : [servicecontract(callbackcontract = typeof(imyevents))] public interface iservice { [operationcontract] [faultcontract(typeof(invalidvaluefault))] string throwsfaultifargumentvalueisnotone(int value); ... } [datacontract] public class inval...