Posts

c# - ASP.Net MVC Login Method -

i have problem asp.net mvc application on hosting . when use login page on local machine worked without problem if upload website on hosting ( plesk windows ) , called login method, show error : an error occurred while trying encrypt provided data. refer inner exception more information. innerexception : access path `c:/windows/system32/configsystemprofile/appdata/local/asp.net/dataprotection-keys` denied. source file : //file header private readonly usermanager<mak_users> _usermanager; private readonly signinmanager<mak_users> _signinmanager; //login method var quser = db.users.where(a => a.username == model.usr_natcode).singleordefault(); await _signinmanager.signinasync(quser, model.rememberme); please me fix problem :((

html - PHP While loop to display information in groups of four -

i want make slider displays 4 boxes @ time information in it. connect database , information output using while loop. possible output in groups of four, seeing have 4 boxes , repeat process many times takes. far can output 4 boxes 1 person... <?php include '../pinflow/configuration.php'; session_start(); $sql = "select * pin pin_profession = 'engineering' order pinid desc"; $result = mysqli_query($database,$sql) or die(mysqli_error($database)); while($rws = mysqli_fetch_array($result)){ ?> <figure> <img src="../pinflow/userfiles/avatars/<?php echo $rws['pin_avatar'];?>" class="active" /> <figcaption><?php echo $rws['name'];?></figcaption> <img src="../pinflow/userfiles/avatars/<?php echo $rws['pin_avatar'];?>" class="active" /> <figcaption><?php echo $rws['name'];...

html - MySQL - How can i remove specific part of a string? -

i have html embed codes inside database. want remove height , width values them. values not same can't use "replace" method. embed codes <iframe width="560" height="315" src="***" frameborder="0" allowfullscreen></iframe> . are there methods can replace 'width="{any value}"' "" (emptiness)

bash - Get rid of "warning: command substitution: ignored null byte in input" -

i'm getting -bash: warning: command substitution: ignored null byte in input when run model=$(cat /proc/device-tree/model) bash --version gnu bash, version 4.4.12(1)-release (arm-unknown-linux-gnueabihf) with bash version 4.3.30 it's ok i understand problem terminating \0 character in file, how can suppress stupid message? whole script messed since i'm on bash 4.4 there 2 possible behaviors might want here: read until first nul. more performant approach, requires no external processes shell. checking whether destination variable non-empty after failure ensures successful exit status in case content read no nul exists in input (which otherwise result in nonzero exit status). ifs= read -r -d '' model </proc/device-tree/model || [[ $model ]] read ignoring nuls. gets equivalent behavior newer (4.4) release of bash. model=$(tr -d '\0' </proc/device-tree/model) you implement using builtins follows: model="" while if...

bash - Does the the order of command line flags matter? -

this question has answer here: is there established order 'ls' arguments? 1 answer i testing hugo static blog generator comes themes , example sites within them. in order use examplesite, copy content it's content hugo project root. while did this, noticed where, put -flag args seems important. is normal bash behavior or introduced zsh? this command didn't work cp themes/hugo-theme-bootstrap4-blog/examplesite/* . -r this command worked! cp -r themes/hugo-theme-bootstrap4-blog/examplesite/* . cp own command, provided os vendor. neither bash nor zsh controls behavior of cp . the posix standard requires cp accept options before arguments. given in posix utility syntax guidelines , entry #9: all options should precede operands on command line. gnu tools go beyond requirement, accepting options after arguments unless...

c# Where does a path with no beginning default to? -

stream stream = new filestream("my file", filemode.create, fileaccess.write, fileshare.none); if have code this, path of stream defaults bin\debug .exe located. if .exe in directory, path default there? default same directory .exe is? the root current working directory application. doesn't have same exe location, , can change during execution. for example if in command line in directory c:\foo , run application c:\boo\my.exe path relative c:\foo you can find or change working directory using enviroment.currentdirectory property

c# - Open WPF Application from Excel VSTO project -

i have vsto excel tool written in c# , use wpf form display data. wpf form in different project, in same solution excel vsto project. if open wpf form in same thread excel, somehow damage excel , starts doing strange things. if run wpf form in different thread, works perfectly. code below should ok: if (app != null) { // when click button again , wpf form opened already, bring on top. bringdatabasetofront(); } else { t = new thread(() => { app = new app(_synchronizationcontext, currentcaller); app.resourceassembly = app.gettype().assembly; app.initializecomponent(); app.shutdownmode = system.windows.shutdownmode.onmainwindowclose; /* makes thread support message pumping * dispecher context of wpf db form */ dispatcher.run(); }); // wpf must on single-threaded apartment t.setapartmentstate(apartmentstate.sta); t.start(); } the problem starts when shut-down tool (excel). freezes , stays ...