Posts

Showing posts from August, 2015

javascript - Bootstrap accordian style table - show/hide all -

i have table set accordion when row clicked displays div underneath row. clicked again hides it. i create button allows user expand or hide all. var showing = true; $('#expandlist').click(function () { if(showing) { $(".collapse").collapse("hide"); showing = false; } else { $(".collapse").collapse("show"); showing = true; } }); the hide portion works, show not. how detect if collapsed keep showing variable updated.

Does ColdFusion support REST API URIs with a dynamic token in the middle of the URI? -

i've been playing coldfusion 11's rest api support , wondering if it's possible have support uri dynamic token in middle of uri instead of @ end. is, supports uris like: /rest/users/12345 where 12345 dynamic (in case, user's userid ). haven't been able find way (without tremendous amount of uri hacking) support uris like: /rest/users/12345/emailaddresses so, possible in coldfusion (11 or 2016)? if not, supported in taffy (i didn't see wrong)? tia it's been while , wanted provide answer in case else has same question... coldfusion, when defining cfc rest endpoint, allows specify wildcards/variable names in restpath attribute both <cfcomponent> , <cffunction> tags. define <cfargument> tags each 1 of these variables can access them within function. example: <cfcomponent rest="true" restpath="/users/{userid}/pets" ... > <cffunction name="getpets" access="remot

Java Swing DefaultListModel containing storing more information -

Image
i created class store 2 properties public class mailentry { private string mail; private mailformat format; // enum public mailentry(string mail, mailformat format) { this.mail = mail; this.format = format; } public string getmail() { return mail; } public mailformat getformat() { return format; } } the jlist created me netbeans gui declared by private javax.swing.jlist<string> jlist1; and initialized defaultlistmodel private defaultlistmodel<mailentry> listmodel = new defaultlistmodel<>(); and set model jlist1.setmodel(listmodel); but error: incompatible types: defaultlistmodel<mailentry> cannot converted listmodel<string> jlist1.setmodel(listmodel); it seems jlist expects model of strings. i'd store more item-specific information, accessible through gui. how can work around? the problem you've decleared jlist1 as... private javax.swin

python - Getting error 403 (CSRF token missing or incorrect) -

i'm need email form , i'm trying this: views.py def send_email(request): if request.method != 'post': form = emailform() return render_to_response('mail_form.html', {'email_form': form}) form = emailform(request.post, request.files) if form.is_valid(): subject = form.cleaned_data['subject'] message = form.cleaned_data['message'] email = form.cleaned_data['email'] attach = request.files['attach'] try: mail = emailmessage(subject, message, settings.email_host_user, [email]) mail.attach(attach.name, attach.read(), attach.content_type) mail.send() return render(request, 'mail_form.html', {'message': 'sent email %s'%email}) except: return render(request, 'mail_form.html', {'message': 'either attachment big or corrupt'}) return

c# - Add Columns to Custom DGV User Control through Designer -

i creating custom user control holds datagridview. datagridview has custom functionality of events used in 3-4 different forms. ideally i'd able drop customdgv in form using designer , add columns through designer via right click -> edit columns regular dgv. however, option not available using customdgv. can add columns programmatically, keeping things visual possible. my guess @ reason dgv private inside of customdgv hence reason edit columns option not show. there way make protected/public without going .designer.cs file? hunch , may way off. you have expose these properties designer in custom user control using design time attributes.

Updating to android studio 2.0 -

my current android studio version in 1.3.2. want update 2.0 stable build. there way automatically? when go help->check updates, says new version of android studio available. the options gives me @ bottom download, release notes, ignore update, , remind me later. hitting download not download it, rather takes me canary channel of android studio , says beta there. want update 2.0 stable. why android studio not updating me?

c++ - Storing and Searching Large Data Set -

i'm relatively new programming in c++ , i'm trying create data set has 2 values: id number , string. there 100,000 pairs of these. i'm not sure data structure best suit needs. the data set has following requirements: -the id number corresponding string 6 digits (so 000000 999999) -not id values between 000000 , 999999 used -the user not have permission modify data set -i wish search id or words in string , return user id , string -speed of searching important so i'm wondering should using (vector, list, array, sql database, etc) construct data set , search it? the id number corresponding string 6 digits (so 000000 999999) good, use int , or more precisely int32_t id -not id values between 000000 , 999999 used not problem... -the user not have permission modify data set encapsulate data within class , go -i wish search id or words in string , return user id , string good, use boost.bimap -speed of searching

Selenium hangs when starting new remoteWebDriver session using Microsoft Edge web browser on Windows 10 VM -

we getting error when starting session of remote web driver microsoft edge on windows 10 vm. have selenium grid configured multiple nodes have various os/browser combinations. nodes exception of our new windows 10 node working expected. have configured windows 10 vm microsoft edge browser version=21.10586.0.0 , added microsoftwebdriver on vm. path web driver on vm set system property - -dwebdriver.edge.driver="c:\selenium\microsoftwebdriver.exe" in selenium test instantiate selenium web driver configured microsoftwebdriver on windows 10 vm. during initialization set capabilities remote driver , have log output set: 08:57:32.932 info - executing: [new session: capabilities [{platform=windows, javascriptenabled=true, browsername=microsoftedge, applicationname=win10_edge, version=21.10586.0.0}]]) 08:57:32.948 info - creating new session capabilities [{platform=windows, javascriptenabled=true, browsername=microsoftedge, applicationname=win10_edge, version=21.1058

angularjs - Set variable when object changes in Angular -

i'm using angular , attempting show button form when object changes form manipulates. html: <input ng-model="form.field1" /> <input ng-model="form.field2" /> <div ng-show="formchanged">show button</div> controller: $scope.form = { field1: 'hello' } $scope.$watch('form', function(){ $scope.formchanged = true; }); i under impression $watch fire whenever part of object changed. seems, however, $watch called @ beginning , once after object changes. i have plunker here: http://plnkr.co/edit/hv8ollviozslmug2ibxt parenthetical information: have found if set $watch explicitly @ each property $watch functions expect to, though still run @ beginning. to stop being called @ beginning i've tried use newvalue , oldvalue variables follows: $scope.$watch('form', function(newval, oldval){}); but doesn't work either. use $dirty property formcontroller , or set third parame

c# - I don't understand why this constructor does not work -

i have simple finitestatemachine, , states fsm classes inherit fsmstate abstract class, wich forces implementation of methods , fields, ownerclass field generic type, each state holds reference class owns instance of fsm public abstract class fsmstate<t> { /// <summary> /// reference owner class of state. /// </summary> protected abstract t ownerclass { get; set; } /// <summary> /// id name of state. /// </summary> public abstract string name { get; set; } //constructor public fsmstate(t owner, string name) { ownerclass = owner; name = name; } } so state class this public class movingstate : fsmstate<ai> { protected override ai ownerclass { get; set; } public override string name { get; set; } //contructor. public movingstate(ai owner, string name) { ownerclass = owner; name = name; } } but constructor not works, these 2 errors

java - Get all TreeItems in an SWT Tree -

i want array of treeitems swt tree. however, method included in tree class, getitems() returns items on first level of tree (i.e. aren't children of anything). can suggest way of children/items? the documentation of tree#getitems() specific: returns (possibly empty) array of items contained in receiver that direct item children of receiver . these roots of tree. here sample code trick: public static void main(string[] args) { display display = new display(); final shell shell = new shell(display); shell.settext("stackoverflow"); shell.setlayout(new filllayout()); final tree tree = new tree(shell, swt.multi); treeitem parentone = new treeitem(tree, swt.none); parentone.settext("parent 1"); treeitem parenttwo = new treeitem(tree, swt.none); parenttwo.settext("parent 2"); (int = 0; < 10; i++) { treeitem item = new treeitem(parentone, swt.none); item.settext(parent

Elasticsearch/Lucene: Query to Find a Word Near the Start or End of a Document -

is there way build elastic search query matches documents if given term appears within x spaces of start of document? i understand can use span_near , slop find instances of term within x spaces of term, don't know how find instances term near start or end of document. the motivation here because have set of documents start particular set of words, , want able query based on first word. understand can re-index documents, pull out first word field, , query separately, prefer not have re-index this. have tried span_first ? looks need.

javascript - Why would babel-register results differ from babel (pre-transpiled)? -

with same source code, different runtime results pre-transpiling babel vs. transpiling babel-register on fly. when pre-transpiled code runs, operates correctly. when code transpiles babel-register fails. same results in node 4.2 , 5.10 working: babel ./ --ignore='node_modules/*,output/*' -d output mocha output/tests/unit --recursive --reporter spec not working: mocha tests/unit --recursive --reporter spec --compilers js:babel-register 347 tests @ moment. when fails, 2 of tests fail, , fail exact same way - trying require file (different files). afaict, failing test suites , files require ing don’t have special or differentiating them. more detail the test suite uses mockery hook loader substitute mocks @ require time. the test suite uses mockery in same fashion 21 times total, fails 2 uses. the test suites still in es5. at line of error, module 'require`d not mocked , es6. mocks subsequently required es6 file in es5. es5 requires es6 requires es

jvm - How do I write a correct micro-benchmark in Java? -

how write (and run) correct micro-benchmark in java? i'm looking here code samples , comments illustrating various things think about. example: should benchmark measure time/iteration or iterations/time, , why? related: is stopwatch benchmarking acceptable? tips writing micro benchmarks from creators of java hotspot : rule 0: read reputable paper on jvms , micro-benchmarking. 1 brian goetz, 2005 . not expect micro-benchmarks; measure limited range of jvm performance characteristics. rule 1: include warmup phase runs test kernel way through, enough trigger initializations , compilations before timing phase(s). (fewer iterations ok on warmup phase. rule of thumb several tens of thousands of inner loop iterations.) rule 2: run -xx:+printcompilation , -verbose:gc , etc., can verify compiler , other parts of jvm not doing unexpected work during timing phase. rule 2.1: print messages @ beginning , end of timing , warmup phases, can verify there no output ru

Passing any array type to a function in C -

i trying write function makes ordenations on numeric array given it. problem c needs know data type iterate through array properly, because of "pointer nature". there way can pass array without knowing type? maybe using void type? void ordenation (void *array, ...) {} here's how understand question, please reply below if that's not it. trying create function in c can accept arrays of multiple numeric types (float, int, etc.). this called function overloading. possible in c11 via _generic operator. see function overloading in c another option create functions different name, different parameter list. so: void ordenation_i(int *array); void ordenation_f(float *array); another way using void* type. mean can pass pointer , may not looking for. have cast void* pointer else, float. if operation fails, may have problems. void ordenation(void *array){ float* array_casted = (float*) array; // stuff } the problem in code a

php - add capabilitie to customer based on product categorie -

my website using wordpress, "the events calendar" plugin , "woocommerce" , manage roles , capabilities "advanced access manager" plugin. i try add function add capability role of buyer based on product category have bought. so try product (just bought) or event category user id, going wrong , it's impossible test step step, because process need finish let function work. here code: add_action('woocommerce_payment_complete', 'custom_process_order', 10, 1); function custom_process_order($order_id) { $order = new wc_order( $order_id ); $myuser_id = (int)$order->user_id; $user_info = get_userdata($myuser_id); $items = $order->get_items(); // need test : $beta= str_replace( ':', '', tribe_get_event_categories($event->id, array( 'echo' => false, 'label' => '', ' label_befo

javascript - format date with bootstrap datepicker -

i'm getting data coming ajax call , format before inserting input field. however, i'm getting mysql in format 1978-03-94 00:00:00 i've tried bunch of things javascripts new date() no luck. have bootstrap datetimepicker plugin can use, tried var duedate = $.datepicker.formatdate('mmmm d, yyyy', new date(taskdata.due_date)); but says cannot .formatdate of undefined. think doesnt i'm feeding time well. i format date format april 21, 2016 or 'mmmm d, yyyy' - in datepicker. any appreciated!

SQL Server query IF equal username -

using sql server 2008, have ssrs report data of employers's projects. report has filter of employer's name. in sharepoint when user open report, system check name , put in employer_name filter. user see information projects only. select [employee name], project, level1, level2, level3 table_1 [employee name] in (@reportparameter_employer_name) but need insert in query 1 user not in table. user must see employer's projects , other information. so query should like: if (@reportparameter_employer_name) = alexander50 select [employee name], project, level1, level2, level3 table_1 if (@reportparameter_employer_name) ≠ alexander50 select [employee name], project, level1, level2, level3 table_1 [employee name] in (@reportparameter_employer_name) hope correct syntax of query if such query possible. or mb solution. you looking simple or operator: select [employee name], pro

Android NoClassDefFound when referencing class from external libraries (IntelliJ IDEA 12) -

i'm having issue intellij's dependency handling in regards external modules. here's context: i'm writing android app implements google maps. current feature set, require 2 external libraries-- google's play services library , mapex (a third party google map extension library located here https://code.google.com/p/mapex/ ). built of project in android studio before recommended move intellij due easier dependency handling. i'm here , still having problems. my error when trying build object class located in mapex package (com.androidnatic.maps), error when starting activity view contained in (object has not been created yet): 07-03 11:40:35.837: error/dalvikvm(3585): not find class 'com.androidnatic.maps.simplemapview', referenced method com.example.myproject.mapactivity.showheatmap and then, upon creation, app force closes , leaves behind in logcat: 7-03 11:40:45.467: error/androidruntime(3585): fatal exception: main java

c# - DotNetOpenAuth OAuth2 for Basecamp API -

i'm having difficulties getting oauth2 working basecamp api dotnetopenauth, here's have far, asp.net mvc 4 web app. public actionresult basecamp() { var server = new dotnetopenauth.oauth2.authorizationserverdescription(); server.authorizationendpoint = new uri("https://launchpad.37signals.com/authorization/new"); server.tokenendpoint = new uri("https://launchpad.37signals.com/authorization/token"); var client = new dotnetopenauth.oauth2.webserverclient( server, "my-basecamp-id", "my-basecamp-secret"); client.requestuserauthorization(returnto: new uri("http://localhost:55321/settings/basecampauth")); response.end(); return null; } [httppost] public actionresult basecampauth() { var server = new dotnetopenauth.oauth2.authorizationserverdescription(); server.authorizationendpoint = new uri("https://launchpad.37signals.com/authorization/new"); server.tokenendpoint =

typescript - angular2, how to show the same component more than once -

i have wizard component multiple step components, these steps routed wizard component , wizard routed root component. last step of wizard, need show navigated steps @ once reviewing purposes data that's entered while navigating them. how achieve this? what i've tried: added @injectable() each step component , used angular2 injection provider, no matter i've tried, instantiates new instance , data entries gone. passing hard-coded references around. not terrible , bad practice, thankfully didn't work since can't access prototype properties outside component domain. all fresh out of options. welcomed! maintain data in service , bind view service instead of component class, each component show same data. @injectable() class shareddata { name:string; } @component({ selector: 'wiz-step1', template` <input type="text" [(ngmodel)]="shareddata.name"> `}) export class wizstep1 { constructor(private shareddata

c# - first key hit doesnt work in AutocompleteMenu from codeproject -

actually new working c# . trying make autocomplete rich text box when found solution on codeproject website. problem having not work when hit first key. have tried lot doesnt seem working. its rich text textbox autocompletes whatever write using dictionary. problem not when hit first key. works fine after that. e.g not work on "a" if write "ab" starts working. can me out ? cant provide code long can surely provide guys link http://www.codeproject.com/articles/365974/autocomplete-menu

hornetq - Is it possible to publish messages using JMS API and consume them using MQTT? -

given abctopic topic on artemis (previously hornetq) mq server, internally represented jms.topic.abctopic address. can somehow subscribe mqtt client topic ? problem see when i'm subscribing topic, internally becomes address prefixed $sys.mqtt ( org.apache.activemq.artemis.core.protocol.mqtt.mqttutil#mqtt_address_prefix ) result in impossibility connect jms.topic.abctopic .

json - Arduino EthernetClient cannot connect to Web API -

i trying arduino ethernet connecting client asp.net web api on azure . supposed post data api persisted in mssql db. because not working choose go basic ethernetclient examples , them working. got arduino firing get request webpage , got html data response. no problems there. if try fetch json data web api getting errors. first thought might web api caused problem found public test api called jsonplaceholder.typicode.com sends out dummy json data. did not work either. below code working right now: #include <spi.h> #include <ethernet.h> byte mac[] = { 0x90, 0xa2, 0xda, 0x00, 0x69, 0xe6 }; byte ip[] = { 192, 168, 0, 20 }; char server[] = "http://jsonplaceholder.typicode.com"; ethernetclient client; void setup() { serial.begin(9600); if (ethernet.begin(mac) == 0) { serial.println("failed configure ethernet using dhcp"); ethernet.begin(mac, ip); } delay(1000); serial.println("connecting..."); serial.println(cl

c# - How do I convert a strongly typed DataTable to an untyped DataTable -

i tried send typed datatable wcf service expecting untyped datatable same data. however, got error because serializer didn't know properties. how can convert typed datatable untyped equivalent? note: basic explanation of typed vs. untyped datasets, here . this can done simple merge command, this: // convert stringly typed datatable "data" loosely-typed version of var data_untyped = new datatable(data.tablename, data.namespace); data_untyped.merge(data); the first (non-comment) line creates new datatable, copying tablename , namespace. the last line copies data, including column definitions.

javascript - What does it mean to pass 2 functions into '.then()'? (Angular.js) -

i'm reading tutorial on angular.js , came across expression: .then(handlerequest, handlerequest) i wondering mean pass 2 of same functions .then()? here's more context: function mainctrl(user, auth) { var self = this; function handlerequest(res) { var token = res.data ? res.data.token : null; if(token) { console.log('jwt:', token); } self.message = res.data.message; } self.login = function() { user.login(self.username, self.password) .then(handlerequest, handlerequest) } ... } angular.module('app', []) .controller('main', mainctrl) .... })(); and original tutorial can found here: https://thinkster.io/angularjs-jwt-auth first 1 successcallback , second 1 errorcallback. // simple request example: $http({ method: 'get', url: '/someurl' }).then(function successcallback(response) { // callback called asynchronously // when response available }, function errorcallback(response) {

python - How to use a field to appear in the dropdown of many2one? -

please me when using many2one have combo product names, question how change content of combo , ie instead of product have identifier. thank you class saisir.soumission(osv.osv) _columns = { 'numoffre' : fields.char('n° offre'), # want use field apear in many2one 'organisme_s' : fields.char('organisme'), 'taxe' : fields.selection([('12','12 %'),('10','10 %')],'taxe etablissement'), 'observation_s' : fields.text('observation'), 'order_line' : fields.one2many('saisir.soumission.ligne','order_id','soumission_id') } class saisir_soumission_ligne(osv.osv): _name ='saisir.soumission.ligne' def on_change_produit(self, cr, uid, ids, product_id): val = {} prod = self.pool.get('product.product').browse(cr, uid, product_id) if prod: val['prix&#

ruby - Rails RSpec Test Does not Pass Correctly -

i'm writing model tests rspec cookbook model. each user has_many cookbooks, , each cookbook belongs_to user. make sure cookbook not created without user, wrote following test: it "is invalid without user" expect(factorygirl.build(:cookbook, user: nil)).to be_invalid end however, when running rspec , following output: 1) cookbook invalid without user failure/error: expect(factorygirl.build(:cookbook, user: nil)).to be_invalid nomethoderror: undefined method `cookbooks' nil:nilclass so, then, test error being raised, made test this: it "is invalid without user" expect{factorygirl.build(:cookbook, user: nil)}.to raise_error(nomethoderror) end however, test fails following output: 1) cookbook invalid without user failure/error: expect{factorygirl.build(:cookbook, user: nil)}.to raise_error(nomethoderror) expected nomethoderror nothing raised if means anything, here factory cookbook: require 'faker' factor

spring - No matching bean of type [com.sachin.dao.StockDao] found for dependency -

i getting error when trying use dependency injection in spring mvc. no matching bean of type [com.sachin.dao.stockdao] found dependency: expected @ least 1 bean qualifies autowire candidate dependency. dependency annotations: {}; nested exception org.springframework.beans.factory.nosuchbeandefinitionexception: no matching bean of type [com.sachin.dao.stockdao] found dependency: expected @ least 1 bean qualifies autowire candidate dependency. dependency annotations: {} i think making mistake in annotations. trying inject stockdaoimpl in homcontroller. this controller file homecontroller.java @controller public class homecontroller { private final stockdao dao; @autowired public homecontroller(stockdao dao){ this.dao = dao; } @requestmapping(value = "/", method = requestmethod.get) public string home(locale locale, model model) { return "home"; } @requestmapping(value = "/stockgoogle/", method = requestmethod.get) public

jquery - Why is the server not giving me any responses? -

Image
so have server supposed return json token authentication. isn't returning (i have printing messages console), not error message. mostly, has sent error message once or twice. i've tried fleshing out success complete , error functions. know form elements being picked because print console. i've had people confirm server working ajax requests, won't. not posting servers url obvious reasons. $(function() { $("#login").click(function() { var username = $("#username").val(); var password = $("#password").val(); login(username, password); }); function login(username, password) { $.ajax ({ url: "/", type: "post", datatype: 'json', contenttype: 'application/json', data: '{"username": "' + username + '", "password" : "' + password + '"}',

datetime - Need Help on Computing spilled time in JAVA -

good day all! badly needed on this. have requirement wherein have calculate estimated start/end time of tasks. given figures in image below, how in java? please note new java, please don't yell @ me on :( this desired output want :) **this i've done far based on master madprogrammer**. localtime openingtime = localtime.of(8, 0); localtime closingtime = localtime.of(18, 0); localdatetime jobstartat = localdatetime.of(2012, 7, 31, 8, 0); localdatetime closingat = localdatetime.of(2012, 7, 31, 18, 0); long minutesduration = (long) 12*60; system.out.println("start " + printdatetime(jobstartat)); jobstartat = getspilledtime(openingtime, closingtime, closingat, jobstartat, minutesduration); system.out.println("end " + printdatetime(jobstartat)); private static localdatetime getspilledtime(localtime openingtime, localtime closingtime, localdatetime closingat, localdatetime jobstartat, long minutesduration) { localdatetime estimatede

Rethrowing strongly-typed WCF FaultException in a middle-layer service -

i have simple 3-tier project. there dal (data access layer) wcf service interacting data store; bll (business logic layer) wcf service intermediary between dal service , client ui, , windows forms client layer. i declare datacontract in dal service act fault contract: [datacontract] public class validationfault { [datamember] public string message { get; set; } [datamember] public string propertyname { get; set; } ... } my dal service has operation decorated faultcontract attribute: [operationcontract] [faultcontract(typeof(validationfault))] patient createpatient(patient patient); the implementation of createpatient throws strongly-typed faultexception this: throw new faultexception<validationfault>(new validationfault("patient last name cannot empty.", "lastname")); my bll service acts client dal service, , service ui layer. in bll service call createpatient method of dal service, , if catch faultexception fault, want re

php - Inserting a MySQL table column into a PHP document -

Image
i'm new php , have been working on variation of system using. system comprised of php, html , css (duh). it's user registration , management system. at current, if want insert current user's email address, have insert <?= $fgmembersite->useremail(); ?> , display current user's email address. i've added custom field database table, , want able reference on page, above code does. here screenshot of mysql table: and here pastebin of php: pastebin i apologize if i'm not making sense, new php , trying hardest make question easy possible possible helpers. thankyou in advance. after looking through code found mistake. mistake in function checkloginindb($username,$password) in $qry selected columns name , email not domain. you should replace $qry following: $qry = "select name, email, domain $this->tablename username='$username' , password='$pwdmd5' , confirmcode='y'";

Mulitiple line chart display with zoom in & zoom out features on python -

i trying build user interface show multiple line charts zoom in & out features on python. similar work chart display on finance.yahoo.com: enter image description here for example, image above shows 3 charts ( though of them bar type ), index data, volume data , corresponding technical indicator data. user can either drag chart left or right view older or newer data , or click on -/+ button change time span ( window cover 1 year / 3 years, etc ). 3 charts i wondering if there package on python build such display. thank you! may try chartdirector , has python edition.

Store an SQLite database on Google Drive Android -

is possible store sqlite database on google drive (or similar) , read data straight google drive? if how can accomplished? i'm downloading database external storage each time app turns on reading data have found causes few issues on different devices. database changes daily don't want store database in internal storage. sqlite databases files. if you're using google drive manage database, still have store somewhere can access file. , there's external or internal storage put it.

css - White-space:pre-wrap causes extra spacing -

i'm working on making portions of website more mobile friendly. rather re-work original pages decided we'd duplicate pages needing mobile versions , redirect accordingly. i have following mark-up looks fine on desktop version of page. <div class="description"> <asp:literal id="lbldescription" runat="server"></asp:literal> </div> .description { white-space: pre-wrap; } but on mobile version i'm getting series of white spaces added beginning , end of content. ends being rendered so. lorem ipsum dolor sit amet, consectetur adipiscing elit. vestibulum ornare posuere efficitur. suspendisse molestie, leo in vestibulum condimentum, ligula risus rutrum mi, condimentum augue quam nec velit. nullam quis elementum ipsum, vitae facilisis tellus. integer sed turpis eget purus pellentesque suscipit eu non magna. viewing content in firebug lo

c++ - QMutableStringListIterator's QStringList "not a type"? -

i have qmutablestringlistiterator want use iterate through qstringlist , keep getting error in .h file says qstringlist not type. why? myclass.h #ifndef myclass_h #define myclass_h #include <qdockwidget> #include <qlist> #include <qstringlist> #include <qmutablestringlistiterator> namespace ui { class myclass; } class myclass: public qdockwidget { q_object public: explicit myclass(qwidget* parent = 0); void somefunc(qstring message); ~myclass(); private: ui::messages* ui; qstringlist mylist; qmutablestringlistiterator iterator(mylist); // errors here. "mylist not type" }; #endif // myclass_h myclass.cpp #include "myclass.h" #include <qstring> #include <qdebug> #include <qcoreapplication> myclass::myclass(qwidget* parent) : qdockwidget(parent), ui(new ui::myclass), iterator(mylist) { ui->setupui(this); } myclass::~myclass() { delete ui; } void myclass::somefunc(qstring messag

javascript - jqGrid onCellSelect getGridParam selrow returning null on first click -

i using jqgrid , on first click of cell, null sel_id: function oncellselect(rowid, icol, cellcontent, e) { var downlinkindex = 7; var uplinkindex = 8; var salcodeindex = 3; if (icol == downlinkindex) { var grid = jquery('#salespersonlist'); var sel_id = grid.jqgrid('getgridparam', 'selrow'); var mycelldata = grid.jqgrid('getcell', sel_id, 'salespersonid'); var mysalname = grid.jqgrid('getcell', sel_id, 'name'); showdownlink(mycelldata, mysalname); } if (icol == uplinkindex) { var grid = jquery('#salespersonlist'); var sel_id = grid.jqgrid('getgridparam', 'selrow'); var mycelldata = grid.jqgrid('getcell', sel_id, 'salespersonid'); var mysalname = grid.jqgrid('getcell', sel_id, 'name'); showuplink(mycelld