Posts

Showing posts from July, 2014

html - text-decoration not working for visited state link -

i'm new on css , trying understand how links modified due changed state. on scenario, want change text-decoration line-through when link on visited state. however, neither on mozilla nor chrome browser, text-decoration of text content not updated line-through when link on visited state, shown below. did go wrong? please notify color updated (to green) when link state changed visited while text-decoration stays same (see. demo #1); note: there bug report mozilla same issue: mozilla bug #645786 , on bug report. problem reproduce tag.class:state selector (a.:visited) (see demo #2 ) demo #1 <!doctype html> <html> <head> <style> a:link { color: red; text-decoration: none; } a:visited { color: green; text-decoration: line-through; } a:hover { color: blue; ...

javascript - If statement only works on the first instance -

i have if statement similar fiddle here: http://jsfiddle.net/fz4wf/43/ what i'm wanting know is, how display alert() once divs .ccn class have value on 1000, not first instance. have tried each() function i'm not sure how use it. $(".ccn").keyup(function() { if ($(".ccn").val() >= 1000) alert('test'); }); <div class="cardnumber"> <input type="text" value="" maxlength="4" name="ccn" class="ccn"> <input type="text" value="" maxlength="4" name="ccn" class="ccn"> <input type="text" value="" maxlength="4" name="ccn" class="ccn"> <input type="text" value="" maxlength="4" name="ccn" class="ccn"> </div> <ul> <li class="checknumber">card number...

android - Getting java.lang.NullPointerException On simply populating spinner from string array or list or xml file(strings.xml) -

i want populate spinner through string array or through xml file(strings.xml). getting java.lang.nullpointerexception: error. have searched lot on google worthless. have tried below. secondactivity.java package com.example.android02.personalityinsight; import android.os.bundle; import android.support.design.widget.tablayout; import android.support.v4.app.fragment; import android.support.v4.app.fragmentmanager; import android.support.v4.app.fragmentstatepageradapter; import android.support.v4.view.viewpager; import android.support.v7.app.appcompatactivity; import android.view.view; import android.widget.arrayadapter; import android.widget.button; import android.widget.spinner; public class secondactivity extends appcompatactivity implements view.onclicklistener { tablayout tabs; viewpager viewpager; mypageradapter pageradapter; spinner sp1, sp2; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate...

python - Sqlalchemy: Purpose of .all() -

this question has answer here: sqlalchemy - difference between query , query.all in loops 1 answer what use of .all(). when following function def showrestaurants(): restaurants = session.query(restaurant) return render_template('restaurant.html',restaurants=restaurants) returns same result function def showrestaurants(): restaurants = session.query(restaurant).all() return render_template('restaurant.html',restaurants=restaurants) for restaurant.html file <html> <body> <h1> restaurants </h1> {% x in restaurants %} </br> {% endfor %} </body> </html> first example returns query object , can apply additional methods on it, such all() - return results represented query list. query object works on each row before give it, while second works on rows, before starting give them.

javascript - SignalR: Wait for connection to be re-established before invoking methods -

i have hubproxy many client triggered methods described below: proxy.invoke('hub_subscribe'); proxy.invoke('triggeronserver'); proxy.invoke('datatoserver',somemodel); now if signalr not connected server , try invoke of above methods, give me connection must started before data can sent. or connection disconnected before invocation result received. error. i aware 1 can utilize connection.statechanged confirm whether signalr connected or not , invoke methods accordingly. there need log these events can invoked once signalr connection up. so, there simple way log these methods in case connection disconnected? , later once signalr connection , running, invoke methods? something proxy.invoke('datatoserver',somemodel).waitforsignalrtobeconnected(); note: continuously connect server after client gets disconnected using this what need promises using $q service. i'm assuming have initialize hub connection first, invoke 3 othe...

android imageview programatically change color -

if have grayscale image displayed in imageview, can programatically change color? if matters, image has background transparency need remain transparent. want change color of actual image part. i write simple custom imageview before below code reference only: public class colorimageview extends imageview { private context context; private boolean showcolor; private paint mpaint; private colormatrix cm; private bitmap mbitmap; private float[] color = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; private float[] normal = { 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0 }; public colorimageview(context context) { super(context); init(context); } public colorimageview(context context, attributeset attrs) { super(context, attrs); init(context); } public colorimageview(context context, attributeset attrs, int defstyle) { super(context, attrs, defstyle); init(context); } private void init(context contex...

SoftLayer API : How to get NetScaler list in Softlayer -

i developing cloud portal using softlayer java client lib. regarding n/w part, i'm looking api can retrieve list of load balance. i succeeded through, softlayer_network_application_delivery_controller_loadbalancer_service /[service_id]/getobject?objectmask=status -425437/getobject?objectmask=object with service id from softlayer_account/getadcloadbalancers? objectmask=adcloadbalancers.virtualservers.servicegroups.services.id however couldn't retrieve list of lb regarding global lb or lb appliance, netscaler vpx. the question is, how can list local/global/netscaler per each? these api requests can you: to global balancing list: https://[username]:[apikey]@api.softlayer.com/rest/v3/softlayer_account/getgloballoadbalanceraccounts method: to local balancing list, execute: https://[username]:[apikey]@api.softlayer.com/rest/v3/softlayer_account/getadcloadbalancers?objectmask=mask[loadbalancerhardware[datacenter],ipaddress] method: to netscaler li...

javascript - Execute a function on currently non-existing ID -

i have button on page, calls jquery function this: $('[id^=edit]').one('click',function (){ id = $(this).attr('id') changedid = id.replace('edit', '') // cut off word 'edit' oldvalue = $('#' + changedid).text() $('#' + changedid).html("<input class='myinput' type='text' value='" + oldvalue +"'/>"); $(this).addclass('success'); $(this).attr('id', changedid+'button'); $(this).text("save it") }); basically, click creates input element in paragraph, , adds class button, , changes it's id. i write second function executed when button new id clicked. example: $('[id$=button]').click(function(){ alert("it works"); }); is possible? new function trigger ajax call django app, that's irrelevant. if want event delegated not yet existing element, use on : $(document.bo...

security - bound sw library on specific platform on linux -

if want bound 1 software library on specific platform, means sw lib can run on specific platform, there method this? we have ideas this: specific-platform <--> driver <--> sw-library specific-platform <--> driver: can add hw checking in driver, driver can not moved other platform. but, in driver <--> lib path, if hacker use 1 fake driver can install on other platform , return fake system calls, lib can run on other platform. i have no idea, how make sure driver , lib can bound together? rsa signsture this? any recommendations helpful, thanks.

c# - Client Socket not getting reponse bytes in .NET -

i creating , sending message on server socket , not getting response in return , know possible reasons same. below sample code client socket static void main() { int _dcpport = 9090; iphostentry iphostinfo = dns.gethostentry("hostname"); console.writeline("got ip host info" , iphostinfo.tostring ()); ipaddress ipaddress = iphostinfo.addresslist[0]; console.writeline("got ip hadress info"); //end point of host socket connected ipendpoint remotedapendpoint = new ipendpoint(ipaddress, _dcpport); // create clientsocket connects host socket clientdap = new socket(addressfamily.internetwork, sockettype.stream, protocoltype.tcp); clientdap.connect(remotedapendpoint); console.writeline("client socket connected remote end point"); #region input variables string requeststring = "hello"; string responsestring = ""; byte[] requestbyte = system.text.encoding.utf8.getbyte...

openerp - How to add new text box fields on check out web page odoo -

i want add add new text box fields remarks on checkout webpage odoo. how should , want show remarks on payment page also. thanks you have inherit website_sale.checkout template. <template id="checkout_custom" inherit_id="website_sale.checkout"> <xpath expr="//input[@name='city']" position="after"> <input type="remarks" name="remarks" class="form-control"/> </xpath> </template>

android - In a fragment implementation, the ListView below EditText disappears after setting keypad element (of EditText view) to hide -

this image while useing keypad and image after keypad hidden i use edittext below there listview . after typing text inputs in edittext , press done or click hide keypad. part of listview behind keypad disappeared , replaced white area (cleared), why ? note: fragment under tablayout , viewpager , fragment contain edit text , listview launched main fragment main fragment public class friendsfragment extends fragment { public friendsfragment() { // required empty public constructor } private fragmentactivity mycontext; private toolbar toolbar; private tablayout tablayout; private viewpager viewpager; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); } @override public void onattach(activity activity) { mycontext=(fragmentactivity) activity; super.onattach(activity); } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view rootview=inflater...

javascript - Make lightbox work even before all images are loaded -

i'm using featherlite lightbox , problem is, have lot of images (thumbnails) load on page , when it's loading , click 1 of loaded image, lightbox doesn't work. therefore, go jpeg file on other page instead of modal window. how can make lightbox after images loaded. way, i'm putting on wordpress don't want use plugin. i'm using foundationpress. here's code use initiate lightbox $(document).ready(function(){ $('a.gallery').featherlight({ targetattr: 'href' }); }); i have images loaded script i'm using on masonry. how can put lightbox scripts inside images loaded plugin? (function() { // main content container var $container = $('.grid'); var $grid = $('.grid').masonry({ // options columnwidth: '.grid-sizer', itemselector: '.grid-item', percentposition: true }); // layout masonry after each image loads $grid.imagesloaded().progress( function() { $grid.masonry('layout...

jboss - How to store new .drl file to BRMS rule engine server? -

i have scenario in project make dynamic rule , store brms rule server. i've try using kiefilesystem write string object become drl file, still cannot store rule rule engine server when open business central. here code java main class : // called artifact repository brms server string url = "http://192.168.0.1:8080/business-central/maven2/com/test/1.0/test-1.0.jar"; kieservices ks = kieservices.factory.get(); kierepository kr = ks.getrepository(); urlresource urlresource = (urlresource) ks.getresources().newurlresource(url); urlresource.setusername("username"); urlresource.setpassword("password"); urlresource.setbasicauthentication("enabled"); inputstream = urlresource.getinputstream(); kiemodule kmodule = kr.addkiemodule(ks.getresources().newinputstreamresource(is)); kiefilesystem kfs = ks.newkiefilesystem(); string rule = "package com.test; \n" + "rule \"rule_1\" \n" + "when \n" + "then...

How can matlab be unable to find an anonymous function? -

i strange error when running script: unable find function @(x) exp(x) within h:\blabla\myclass.m. when debug get: 34 b=myanonymousfunction(a) k>> myanonymousfunction(3) unable find function @() exp(x) within hh:\blabla\myclass.m. k>> class(myanonymousfunction) ans = function_handle a minimal example trying produce worked fine. do have idea error comes , means? because can find definition of insanity...ahh... myanonymousfunction. bug? read something on matlabcentral 7 years old , doesn't give explanation. further explanation: i'm running matlab 2012 b under windows 8 64 bit. source files written under 64 bit linux. i don't think it's relevant myanonymousfunction parameter function in myclass , stored within cell array. it's this: file myclass.m: classdef myclass < handle properties x=1337; myanonymousfunctions; end methods function new = myclass(myanonymousfunctions) new.myanonymousfunction=myanonymousfunc...

amazon web services - iOS AWS SDK - Why only Presigned-URL requests for background transfers? -

i'd benefits of multipart transfers isn't possible background transfers because require use of pre-signed urls. documentation says because you'd have have separate pre-signed urls every part. do know why background uploads/downloads can achieved using pre-signed urls ios aws sdk? i'm guessing it's limitation of background nsurlsessions. do know of way (using sdk) multipart goodness background transfers?

javascript - Passing eventOption as argument to function -

module calls function other module registering , de-registering events on elements. i'm passing eventtype argument. getting error uncaught typeerror: elementobject.element.eventoption not function elementobject = { element: document.getelementbyid("elemid"),... } eventregisterer(elementobject, addeventlistener) function event registration: function eventregisterer(elementobject, eventoption){ elementobject.element.eventoption('change', changefunction) } function changefunction() { .... } why storing addeventlistener argument not working? found solution: function eventregisterer(elementobject, eventoption){ elementobject.element[eventoption('change', changefunction)]; } using array-like notation instead of directly using property name did work.

ios - Background and NSThread -

i'm trying understand how nsthread working when app going background. have following code in appdeligate: - (void)applicationdidenterbackground:(uiapplication *)application { [self backgroundhandler]; } - (void)backgroundhandler { nsinteger counter=0;int scontinue=true; while(scontinue){ nslog(@"counter:%d",counter++); sleep(1) } } when go background prints out every 1second value. have kept open 5min , gave me: counter:1 counter:2 ... counter:300 and keeps going. if try foreground backgroundhandler doesn't exit while loop , app doesn't respond anything. now change applicationdideenterbackground , instead i'm using thread, i.e. - (void)applicationdidenterbackground:(uiapplication *)application { [nsthread detachnewthreadselector:@selector(backgroundhandler) totarget:self withobject:nil]; } - (void)backgroundhandler { nsinteger counter=0;int scontinue=true; w...

CakePHP 1.3: getting authError message on successful login -

i'm trying implement login feature user can use username or email address. i've worked out login both, when user logs in email address, autherror still flashes (user logged in). i've put comment "here" down in login action, , i'm not sure happens after redirect. here relevant bits of code: app controoler: public $components = array( 'auth' => array( 'authorize' => 'controller', 'loginredirect' => array( 'controller' => 'users', 'action' => 'welcome_page' ), 'loginerror' => 'invalid user name/password', 'autherror' => 'you don\'t have permission' ), 'session', ); user controller: public function beforefilter() { parent::beforefilter(); $this->auth->allow('add'); } public function login() { // @ point, auth co...

swift - How can numberOfRowsInSection function of TableView return multiple values for the same section? -

Image
here, have tableview 1 section. however, have 2 cells. want numberofrowsinsection return 2 different values different rows of same section. but, can't access row in numberofrowsinsection function. can please tell me how attain this? numberofrowsinsections should return count of cells in section, if want display 2 different type of cell (ex. celltype1 , celltype2), should logic inside - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath{ if (indexpath.section == 0) { if(indexpath.row == 0){ return celltype1; } if (indexpath.row == 1) { return celltype2; } } } you can't return multiple values method, apple has not written method return multiple values

r - Rblpapi BDH: How to output a single frame using security as a column? -

Image
i use following codes historical information 2 stocks bloomberg. library(rblpapi) opt <- c("periodicityselection"="monthly") out1 <- bdh(securities = c("1 hk equity", "2 hk equity"), fields = "tot_return_index_gross_dvds", start.date = as.date("2015-01-01"), end.date = "", options = opt, overrides = null) out1 write.csv(out1, "c://r data//test.csv") resulting csv file looks this: is there way output file looks this?

opengl - Can we render to screen while also extracting the points? -

i have 2 streams, 1 of point clouds , 1 of fullscreen textures. want colour points using texture , render them, want store resulting coloured pointclouds later analyzes , usage. can somehow without sending data unit, colour points on gpu, extract host , send unit again in order render it? mean can done using gpu computing , store data allocated memory on unit, later extract, sending data unit processing , later sending same data unit rendering seems redundant. have never done other rendering screen before not sure. if possible, need cuda or can without? how done? edit: example of hope achieve. arrows indicate moving data , | symbolizes wall between 2 sides. unit | host ------------------------------------------------------------------------------------------- ← pointcloud , texture //input data colour points | wait //colour points using gpu coloured points → //extract coloured points...

ios - Core Data Relationship Mappings: Double Quotes in Value Expression are automatically turned into single quotes -

after generating mapping model core data migration, value expressions relationship mapping generated correctly except 1 value expression, arguments have single quotes (') instead of double quotes ("). results in parsing error. this expect: function($manager ,"destinationinstancesforentitymappingnamed:sourceinstances:" , "matchtomatch" , $source.matches) but how function expression generated: function($manager ,'destinationinstancesforentitymappingnamed:sourceinstances:' , 'matchtomatch' , $source.matches) a specific value expression generated single quotes when change "source fetch" option in right sidebar "use custom(...)" , enter expression manually, double quotes turned single quotes. when change value expression directly in mapping editor table, following error message: unable parse format string "function($manager >,"destinationinstancesforentitymappingnamed:sourceinstances:" ...

python - PySide crash when displaying pixmaps -

Image
i programming gui application data visualization using python , qt via pyside. experience occasional crashes ('python.exe has stopped working') think narrowed down following problem: when creating pixmap numpy array, somehow memory freed python (?) when pixmap exists. this not happen if image format used qimage.format_argb32. (why not?). check out code example below, hope can reproduce problem. edit: clarify - if numpy array not deleted python, works expected. however, in application, new data generated , have find way track dataset displayed pixmap, , delete not displayed anymore. find correct way qt take care of (image-) data , store in memory until not required anymore. as far understood documentation of qt , pyside , pixmap should hold data of image, qt should responsible memory management. is bug in qt, pyside, or did not understand something? not find details on memory management in regular documentation. background: need regularly update data display...

Ruby on Rails : upload file to server -

i'm using android device upload file server using post method. don't know how make rails handle event. means, after android device sends file server method post link : http://localhost/upload_file , rails server can handle event, , put file database, example. i have google , results tell me use additional plugin. exist pure method use rails ? please tell me. thanks :) rails can handle file uploads pretty easily. here relevant guide should read: http://guides.rubyonrails.org/form_helpers.html here's small snippet guide: 5.1 gets uploaded the object in params hash instance of subclass of io. depending on size of uploaded file may in fact stringio or instance of file backed temporary file. in both cases object have original_filename attribute containing name file had on user’s computer , content_type attribute containing mime type of uploaded file.

database - Microsoft access validation -

i need allow only alphanumeric characters entered field. data type 'short text'. what 'validation rule' using expression builder? you can find lots of useful examples validation rules here: http://allenbrowne.com/validationrule.html in case - digits , letters only is null or not "*[!((a-z) or (0-9))]*" accepts z , 0 9, no punctuation or other characters.

javascript - How to get value text as result for result button after clicking Show button? -

i'm here ask question regarding javascript. i'm new javascript please forgive if i'm going wrong. me values result. after select state drop down list, show button should give me value of states result. possible? <h1>please select state</h1> <select id = "district"> <option value = "tiruvanandapuram">kerala</option> <option value = "chennai">tamil nadu</option> <option value = "new delhi">delhi</option> </select> <input type = "button" value = "show" onclick = "" /> <input type="text" id="add" id="txtresult" name="result" value=""> ` this it: var sel = document.getelementbyid("district"); function show(){ var txt = document.getelementbyid("add"); txt.value = sel.options[sel.selectedindex...

c# - Entity Framework: best practice to filter data inside multiple "one-to-many" relationships -

in scenario: public class software { [key] public int id { get; set; } // properties public virtual icollection<release> releases { get; set; } } public class release { [key] public int id {get; set;} public int version {get; set;} public virtual software software {get; set;} public virtual icollection<report> reports{get; set;} } public class report { [key] public int id {get; set;} // properties public virtual release release {get; set;} } if have filter report software.id , release.version it's better use query: from report in context.reports report.release.version == filterversion && report.release.software.id == filterid select report or use query instead? from software in context.softwares software.id == filterid release in software.releases release.version == filterversion report in release.reports select report it's better "filter fi...

php - For each loop to display input arrays set -

html: <input type="date" name="employment_companyname[]"> <input type="date" name="employment_datefrom[]"> <input type="date" name="employment_dateto[]"> <input type="date" name="employment_mainduties[]"> php: foreach( $employment_companyname $m => $employmentcompanyname ) { echo $employment_datefrom[$m]; echo $employment_dateto[$m]; echo $employmentcompanyname; foreach( $employment_mainduties[$m] $n =>$employmentmainduties) { echo $employmentmainduties; } } job1 date - date to company name list of duties unique company name (depending on how many have added) job2 date - date to company name list of duties unique company name (depending on how many have added) job3 etc. it prints out like: job1 unique duties job1 , job2 job2 unique duties job1 , job2 rather than: job1 ...

What is the Azure product lifetime -

if build application based o azure today, there guarantee microsoft azure still supported , living after 15 years? product lifetime of azure? guarantee don't have additional cost of migrating new azure api new feature every few years? it depends on service of azure want use. overall microsoft informs changes. informat month before service changed or dropped. take @ microsoft azure cloud lifecycle faq . it depends if want use paas, iaas or saas elements. no saas host provides years same version. software has lifecycle. in azure pay on other platforms usage. if migrate vm 1 vm 2 , both running 3 days in parallel, have pay that. not have addition fee use newest service. from provided link can cite guest os: when guest os family retired? in future whenever new guest os family introduced, microsoft azure provide 12 months of notice retire oldest guest os family list of supported os families. what can expect after 12 months of notification period? a...

javascript - MySQLi If condition alert msg not showing the output -

below given code working perfect. db table values inserted. echo message not showing in output <?php define('db_server', 'localhost'); define('db_username', 'root'); define('db_password', ''); define('db_database', 'admin'); $db = mysqli_connect(db_server,db_username,db_password,db_database); if(isset($_post["register"])) { $id = $_post["id"]; $name = $_post["user_name"]; $password = $_post["password"]; $query = mysqli_query($db, "insert user (id, user_name, password)values ('$id', '$name', '$password')"); $result = mysqli_query($query); if($result) { echo "thank you! registered."; } } ?> you called mysqli_query 2 times , second time in wrong way, need call once instead // change $query = mysqli_query($db, "insert user (id, user_name, password)values ('$id', '$name', ...

performance - MongoDB Index definition strategy -

i have mongodb-based database 100k 500k text documents inside , collection keeps growing. system should support queries different fields of documents, e.g. title, category, importance etc. the system near real-time system, got new documents every 5-10 minutes. my question: idea, in order boost queries' performance, define separate index each frequently queried field (field types: small text, numeric, date) of document? or there best practices queries' performance boosting in mongodb? you should use/make indexes depending on result trying find . it's idea have different indexes different field trying find @ different times. but keep in mind indexes occupies ram. more make indexes more use ram. consider ordering of index while making better search. when developing indexing strategy should have deep understanding of application’s queries. before build indexes, map out types of queries run can build indexes reference fields. indexes come performance cost,...

c++ - Qt Object deleted but signal is not disconnected -

in topic told when qobject deleted active connections deleted. have case below: work* work = new work();//->work derived qobject worker* worker = new worker(work);//->worker derived qthread , has ownership of work connect(work, signal(percentagecomplete(int)), progressdialog, slot(setvalue(int))); connect(worker, signal(finished()), worker, slot(deletelater())); progressdialog->show(); worker->start(); in worker's destructor have : worker::~worker(void){ if(work != nullptr){ work->deletelater(); } } i %100 sure work deleted. can see breakpoint. can see qobjects desctructor call. but how deleted work object still receiving signal "percentage complete". , because deleted ,causing crush. i want ask why signals not disconnected object deleted? a second question in worker's destructor work->deletelater(); or delete work; correct? why dont use disconnect() disconnect connected slots/signals ? can call fu...

ruby on rails drawing failed but how come -

Image
in below code, trying draw bunch of chart. database has model person have attribute of "name,weight,height,color,age" objective draw chart each row, weight x-axis, height y-axis. , color color each chart, eg person 1 have color yellow, chart should yellow (this tricky implmented) anyway, using lazy_high_chart implement this, no luck, failed no error. but consistent, here comes code: people_controller.rb class peoplecontroller < applicationcontroller #get /people/index #get /people def index @people = person.all end #get /people/show/id def show @person = person.find(params[:id]) end #get /people/new def new @person = person.new end #post /people/update def create @person = person.new(person_params) @person.save redirect_to :action => :index end #get /people/edit/:id def edit @person = person.find(params[:id]) end #post /people/update...

Codeigniter PHP time constraint -

i creating article sharing application using codeigniter php. every article has 3 text boxes including name,email , comment. need block comments come within 1 minute of previous comment same user.how can so? can me? simply add timestamp last_updated field each user ( it's user related, , not each comment related ), , select last update_time user, compare , if time less period want, in case minute. if constraint not critical, can control javascript in client ( having same mark variable, , comparing time elapsed last update ). for php: $last_update = $db->get_var("select last_updated time_comments user_id='$uid'"); $elapsed = time() - $last_update; if($elapsed < 60){ echo 'cannot comment'; } //process comment

php - CakePHP 3 - Use saved data inside afterSave() -

i have submitted form in view processed in controller. happens controller saves edits doing this: if ($this->requests->save($request)) { // request have been saved. } now created insert query follow activity of editor aftersave() statement so: public function aftersave() { // here need data submitted $this->request->save($request)); // how can use data in query? // insert query here. } i want use aftersave() because want use changes made requests, can't seem find way access posted data. the documentation says aftersave() contains following parameters: aftersave(event $event, entityinterface $entity, arrayobject $options) do need these accomplish want? if so, how use properly? because can't seem debug information see contains of save action. the question follows: how can access data saved $this->requests->save($request) in beforesave() or aftersave() statement use data in query? how can access data saved $thi...

javascript - When I click on next button page number ascending by unknown order. -

i'm creating simple survey , said, when select language, , clicking on "next", page number ascending unknown order. cant find error is. logic of ascending pretty random. can 1 me? $(document).ready(function(){ // declare main variables var step = 0, runed = false; var db = [{ question: "question 1" },{ question: "question 2" },{ question: "question 3" },{ question: "question 4" },{ question: "question 5" },{ question: "question 6" },{ question: "question 7" }]; var tot = db.length; var lang; function restep() { $('.pg .tot').html(tot); $('.pg .cur').html(step); if(step == 0) { $('footer').hide(); } else { $('footer').show(); } run(); }; ...

php - Select from MySQL based on HTML form -

a html form contain 4 fields (first name, last name, mobile , attendid). search form find record in attend mysql table. of these fields optional intention being more fields enter in form, narrowing down search. know issue first sql not taking account variables. the second bit confuse in more... results echoed in table, last field of echoed table should contain data selected second sql statement data in table. sorry if vague have no idea how approach this, been looking @ long! thanks help! <html> <body> <table> <table border="1"> <tr><th>attendeeid</th><th>wristband</th><th>firstname</th><th>lastname</th><th>telephone </th><th>mobile</th><th>address 1</th><th>address 2</th><th>town</th><th>postcode</th><th> e-mail</th><th>medical notes</th><th>last reader tap</th></tr> <?p...

c# - Microsoft Graph Client not specified resource in requiredResourceAccessList -

i following error when try retrieve accesstoken. /microsoftgraph/authorise?error=access_denied&error_description=aadsts65005%3a+the+client+application+has+requested+access+to+resource+%27https%3a%2f%2fgraph.microsoft.com%2f%27.+this+request+has+failed+because+the+client+has+not+specified+this+resource+in+its+requiredresourceaccess+list.%0d%0atrace+id%3a+7cd46ad3-d294-41ad-98ec-6ef06db7a0db%0d%0acorrelation+id%3a+4e2a6d3b-b3dd-4a98-b36d-550d8f8c3382%0d%0atimestamp%3a+2016-01-27+10%3a40%3a12z which is... graph.microsoft.com request has failed because client has not specified resource in requiredresourceaccess list it multitenant application in azure active directory. able login 1 of email ids not one. where going wrong? missing? code snippet: public actionresult login() { .... uri authuri = authcontext.getauthorizationrequesturl( microsoftgraphsettings.o365unifiedapiresource, microsoftgraphsettings.clientid, loginredirecturi, ...