Posts

php - Yii2 Export redirects to destination page -

i'm implementing export function our yii2 based application. (an humhub module) use "kartik-v/yii2-export" module. the action contains: $gridcolumns = [ ['class' => 'yii\grid\serialcolumn'], 'id', 'language', 'time_zone', ['class' => 'yii\grid\actioncolumn'], ]; $dataprovider = new sqldataprovider([ 'sql' => 'select * user status=:status' ]); return $this->render('export',[ 'dataprovider' => $dataprovider, 'gridcolumns' => $gridcolumns ]); the view contains: echo exportmenu::widget([ 'dataprovider' => $dataprovider, 'columns' => $gridcolumns ]); when klick on export function new popup windows opens information creates file now. after few seconds should start download, redirects destination page. do need add controller or did else wrong? thanks help. it's not defined if n...

c# - Login url gets changed on redirection with authorize attribute -

i using owin custom authentication , asp.net identity , have login url this: http://localhost:1927/ now after login user redirected dashboard page , url this: http://localhost:1927/dashboard/index now after user logout redirecting user login page , url still fine below: http://localhost:1927/ but when enter url http://localhost:1927/dashboard/index directly in browser again redirecting login page , url changes below url: http://localhost:1927/authentication/login?returnurl=%2fdashboard%2findex i know because have decorated both authentication , dashboard controller authorize attribute . code: [authorize] public class authenticationcontroller : controller { } [authorize] public class dashboardcontroller : controller { } public partial class startup { // more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?linkid=301864 public void configureauth(iappbuilder app) ...

javascript - jQuery Status change True false Image Button -

this jquery code bind html table.i have 2 image...how can check when true 1.jpg show , when false 2.jpg show. $(function () { debugger $.ajax({ type: "post", contenttype: "application/json; charset=utf-8", url: "webform5.aspx/binddatatable", data: "{}", datatype: "json", success: function (dt) { debugger; (var = 0; < dt.d.length; i++) { $("#example1 > tbody").append("<tr><td> <input type='checkbox' class='chk' id=" + dt.d[i].categoryid + " /></td><td>" + dt.d[i].categoryid + "</td><td>" + dt.d[i].name + "</td><td><input type='image'if() src='images/1.png'title='deactivate this' value=" + dt.d[i].status + " alt='submit' width='18' height='18'> </t...

python - Create new record with the self rererenced Foreignkey relation -

below models.py , made self reference foreignkey relationship. class emp_details(models.model): emp_id = models.autofield(primary_key = true) emp_first_name = models.charfield(max_length = 50,null = false) emp_manager_id = models.foreignkey('self') a1 = emp_details(emp_first_name = "ramesh",emp_manager_id = 2) a1.save() here trying create new record. got following error: valueerror: cannot assign "'2'": "emp_details.emp_manager_id" must "emp_details" instance. how can create new record self rererenced foreignkey relation? in case, emp_manager_id foreign key field, should assign id emp_manager_id_id . a1 = emp_details(emp_first_name = "ramesh", emp_manager_id_id=2) it better change field name emp_manager . note it's recommended use camelcase model name, empdetail better emp_details . putting together, have: class empdetail(models.model): emp_i...

amazon web services - Different output in AWS PHP SDK than in AWSCLI -

the primary goal i'm trying achieve iterate on running ec2 instances in php. it's easy data using bash script, shown below: bash script: #!/bin/bash export aws_access_key_id="akidexample" export aws_secret_access_key="wjalrxutnfemi/k7mdeng+bpxrficyexamplekey" aws ec2 describe-instances --region="eu-west-1" --filter "name=instance-state-name,values=running" bash output: { "reservations": [ { "ownerid": "58728357357", "reservationid": "r-0e0283649826935", "instances": [ { "securitygroups": [ { "groupid": "sg-2fe333148", "groupname": "web" } ], "publicdnsname": "ec2-53-13-121-72.eu...

javascript - Why is it returning undefined? -

i want store following method, , constant value, querying using key find value or value find key function my_reference() { return { 30:'', 31:'err591', 32:'err761', 33:'err671', 34:'err551', }; } console.log( my_reference[31], my_reference.31, my_reference().31, my_reference()[31] ); my_reference[31], trying read property (which doesn't exist) of function. property on object return value of calling function. my_reference.31, trying use number identifier. isn't allowed. my_reference().31, trying use number identifier. isn't allowed. my_reference()[31] this works

Wix install location -

i have wix setup allows user select install location. when uninstalling, need run custom action should activate file in install location. tried getting install location session["installdir"] results in default path , not 1 given user. how can reach location? i've done in own installer - following should work. this adds property retrieve install location value registry. <property id="installdir"> <registrysearch id='registry' type='raw' root='hkcu' key='software\$(var.manufacturer)\$(var.productname)' name='location' /> </property> this sets install location in registry. <component id="registry" guid="*"> <registrykey root="hkcu" key="software\$(var.manufacturer)\$(var.productname)"> <registryvalue name="location" type="string" value="[insta...