Posts

Conditional formatting on multiple rows with different names in Excel -

i have 4 names in column segment - adult org segment - core segment - light segment - proactive health i want use conditional formatting each time finds 1 of them colors entire row, each row should different colored eg segment - adult org - red, segment - core - blue etc. please

php - Respect\Validation - validate string if not empty, otherwise return true -

i'm using respect\validation validate fields. of fields not mandatory, phone number, if not empty must validated. following current code: v::phone()->validate($phonenumber); // should return true if $phonenumber empty how it? based on the docs , looks should be: v::optional(v::phone())->validate($phonenumber);

Angular - Call parent method from child modal created by service -

i have parent component displaying list of records in table. each record has button can click , calls method called newversioncheck() , seen below. // creates new version target createnewversion(){ alert('create new version flow'); } /** * if draft exists, prompt user load , modify existing * or discard , create new draft. if no draft exists, * use createnewversion flow * * @param {any} ruleid * @memberof versionscomponent */ newversioncheck() { let versionhasdraft = false; // check see if target has draft. // if dont, take them new version flow if (!_.find(this.mapversionsdata, { isdraft: '1' })) { this.createnewversion(); }else{ // our draft version object let versionobj = _.find(this.mapversionsdata, { isdraft: '1' }); // tell our subject data sending modal this._mapsservice.updateconfirmexistingversionmodaldata({ targetid: this.targetid, createdbyqid: ...

layout - libGDX: Fade in and out between two Screens without Scene2D -

it's me again :) i'm trying libgdx game completion. however, have been stuck transitions of 2 screens, want e.g. fade out menu screen when start game , fade in game screen. not use scene2d , not know me stages , actors. glad if me , solve problem. thanks in advance! :) don't worry, can achieve aim without using scene2d . anyway, there's more work build building block system it's worth @ end. concept the concept have game screen manager manage game screen(s) operating in game. that's being said. when transition 1 screen another, need such game screen manager control game screen able draw , , able update . normally have such manager manage game screen anyway. can further make use of achieve screen transition effect. such ability control play major role when transition effect kicks in. fading in/out effect, let's define t total time complete when 1 screen transitions another, a starting screen, b target screen, , m game scree...

c# - How to get scalar value from a SQL statement in a .Net core application? -

the following code in .net core console application (ef core 2.0/sql server). var sql = _context.set<string>() .fromsql("select dbo.functionreturnvarchar({0});", id); got following exception? cannot create dbset 'string' because type not included in model context. is way without defining class property of string? .set<tentity>() entities backed context. you can try workaround dbcommand cmd = _context.database.getdbconnection().createcommand(); cmd.commandtext = "select dbo.functionreturnvarchar(@id)"; cmd.parameters.add(new sqlparameter("@id", sqldbtype.varchar) { value = id }); var value = (string) await cmd.executescalarasync();

Git revert to point to specific commit/revision history with Git bash console -

Image
i trying go commit point history via git log , push point repo new head pointed reverted commit without removing commits prior. what did git log retrieve commit history. did git revert (log version) instead of git reset (log version) since safer 'git revert`. but when git revert , weird screen in git bash console unable it: this weird screen text editor called vim . need edit commit message, save , exit: https://stackoverflow.com/a/11828573/7976758 edit text, press esc exit edit mode, press : enter command line mode, press x , enter save , exit.

linux - finding a process ID and listing the command name and any network connections -

i've been trying create script take process id number (pid) , identify process id name , list network connections connected to. i understand should use netstat this. here code far doesn't seem anything, can explain im going wrong , need do? echo 'please enter process id: ' read pidn echo 'you entered process id: ' $pidn pid= pgrep -fl "^(/.*)?${pidn}\s" echo $pid if use command below (ex: ssh) netstat -nalp | grep -i ssh follow result: [root@localhost ~]# netstat -nalp | grep 1055 tcp 0 0 0.0.0.0:22 0.0.0.0:* listen 1055/sshd tcp6 0 0 :::22 :::* listen 1055/sshd unix 3 [ ] stream connected 20308 1055/sshd