Posts

Showing posts from May, 2015

android - Styles and themes on values, values-v11 and values-v14 folders -

i working on app base design on holo theme. globally want working little confused way working folders values , values-v11 , values-v14 . so know that: values targeting api inferior 11 values-v11 targeting api between 11 , 13 values-v14 targeting api superior 13 at first thought had specify every folder styles needed app realized kind of inheritance system in place. my problem confused , don't understand how working inheritance between these 3 folders. i did following test in order see behavior on phone (running on android 4.0, folder values-v14 should 1 loaded): in values have style set in blue text color: <style name="textmedium" parent="@android:style/textappearance.medium"> <item name="android:textcolor">@color/blue</item> in values-v11 have style set in white text color: <style name="textmedium" parent="@android:style/textappearance.medium"> <item name="a

mysql - return one row from join table with same field name -

block : ------------- | id | name | ------------- | 1 | test| ------------- block relation coords ------------- | id | blockid| coordid ------------- | 1 | 1 | 1 ------------- | 1 | 1 | 2 ------------- | 1 | 1 | 3 ------------- block coords ------------- | id | name| type ------------- | 1 | north | n ------------- | 2 | east | e ------------- | 3 | south | s ------------- now want join table , result in 1 row , it's not important title of result table , put last table in field all block table have 3 relation coords table ------------- name| north | east | south ------------- test | north | east | south try this: select b.name, max(case when type = 'n' c.name end) north, max(case when type = 'e' c.name end) east, max(case when type = 's' c.name end) south block b inner join block_relation_coords r on b.id = r.blockid inner join block_coords

c++ - Expected primary expression before -

i have following code in translator.h file class dictionary { public: dictionary(const char dictfilename[]); void translate(char out_s[], const char s[]); and call function in translator.cpp file follows for (int i=0; i<2000;i++) { dictionary:: translate (out_s[],temp_eng_words[i]); } which gives me error "expected primary expression before ']' token". don't understand wrong, , decided against putting whole code if problem can found in above snippet. any ideas?? i tried without [] out_s, gives me error "cannot call member function void dictionary::translate (char*, const char *) without object". i'll post whole code give clearer indication of problem might be. translator.cpp #include <iostream> #include <fstream> #include <sstream> #include <cstring> #include "translator.h" using namespace std; void dictionary::translate(char out_s[], const char s[]) { int i; char englishword[max_num

regex - Turning text with # symbols into links in javascript -

i wondering how following using javascript. suppose had text following var test = '#test #cool #place'; and want following <a href="abc.html?q=test">#test</a> <a href="abc.html?q=cool">#cool</a> <a href="abc.html?q=place">#place</a> how that? i better: stringtomatch.replace(/(<a[^>]*)?#(\w+)(?!\w)(?!.*?<\/a>)/g, function($0, $1, $2) { return $1 ? $0 : '<a href="'+ window.location +'?q=' + $2 + '">#' + $2 + '</a>'; } )); this match except other links. see example .

custom html button code for a form -

tti know lame question in order right need help. this html code <form name="form1" class="form1"> <fieldset> <legend>subscription</legend> <label for="subname">name</label> <input type="text" name="subname" /> <label style="padding-left:20px;" for="subemail">your email</label> <input type="text" name="subemail" /> </fieldset> </form> <div style="width:100%; font-size:14px;text-align:center;"><a href="#">click here subscribe</a> </div> <div class="subscribe"><a href="#"></a> </div> and here fiddle http://jsfiddle.net/v8rb2/ how can associate "click here subscribe" text , button form? if understood correctly, want submit form when link clicked. this, you'll have use javascript. a quic

mysql - why cannot be updated data in database table using php? -

here php code.in code if user edits his/her information , clicks update button, posted values must updated in database side.my table name user users.but when want post values name updated not others.and date changed 0000-00-00.why happen?i couldn't understand.any idea , reply helpful? <?php if(isset($_post['update'])) { include("db.php"); $name = $_post['name']; $password1 = md5($_post['password1']); $password2 = md5($_post['password2']); $date_of_birth = $_post['date_of_birth']; $place_of_birth = $_post['place_of_birth']; $info = $_post['info']; $nationality = $_post['nationality']; echo $_post['name']; echo $name; echo $date_of_birth; echo $info; echo $place_of_birth; echo $nationality; if ($password1 != $password2) { include "src/header.php"; include "src/mainmenu.php"; echo '<p>error: password not match. try again</a>

python - Combine lists by joining strings with matching index values -

i have 2 lists combine, instead of increasing number of items in list, i'd join items have matching index. example: list1 = ['a', 'b', 'c'] list2 = ['1', '2', '3'] list3 = ['a1', 'b2', 'c3'] i've seen quite few other questions combining 2 lists, i'm afraid haven't found achieve. any appreciated. cheers. >>> list1 = ['a', 'b', 'c'] >>> list2 = ['1', '2', '3'] >>> map(lambda a, b: + b, list1, list2) ['a1', 'b2', 'c3']

xaml - DataBinding and EventToCommand -

i'm attempting use eventtocommand initialize viewmodel, command isn't firing. suspect it's because triggers section not within databound container, how can in example? i'm trying stick straight xaml if possible. <window x:class="mvvmsample.home" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:viewmodels="clr-namespace:mvvmsample.viewmodels" xmlns:i="clr-namespace:system.windows.interactivity;assembly=system.windows.interactivity" xmlns:cmd="clr-namespace:galasoft.mvvmlight.command;assembly=galasoft.mvvmlight.extras.wpf4" d:datacontext="{d:designinstance type=viewmodels:homeviewmodel, isdesigntimecreatable=tr

Testing modular AngularJS w/ Jasmine & Karma -

struggling unit testing set in jasmine/karma. have controller service dependency, , service has service dependency. not organizing modules type (directives, services, etc), rather feature (layout, summaryview, etc). here's architecture: angular.module('myapp', ['ngresource', 'myapp.base', 'myapp.layout','myapp.common']); angular.module('myapp.base', ['myapp.common']); angular.module('myapp.common',[]); angular.module('myapp.layout',['myapp.common']); controller: angular.module('myapp.layout') .controller('layoutctrl', ['$scope', '$rootscope', '$timeout', 'layoutservice', 'urlservice', 'baseservice', function ($scope, $rootscope, $timeout, layoutservice, urlservice, baseservice) { //controller code here }); layout service: angular.module('myapp.layout') .service('layoutservice'

c - WinAPI using SetfilePointer to test EOF -

hi guys if want test eof using setfilepointer(fi1, 0, null, file_current) != invalid_set_file_pointer or ? setfilepointer(fi1, 1, null, file_current) != invalid_set_file_pointer msdn documentation neither trick. first won't detect eof, , second moves file pointer guess not want. you should read file pointer calling setfilepointerex "move method" of file_current , distance of zero. , compare against file size, obtained calling getfilesizeex . large_integer pos, size; if (!setfilepointerex(hfile, 0, &pos, file_current)) handleerror(); if (!getfilesizeex(hfile, &size)) handleerror(); bool eof = (pos.quadpart == size.quadpart);

Printing the set of all words in an alphabet in C -

i'm trying code program prints set of words in alphabet. test me used strings , pointers in c. have settled on recursive solution, seem having trouble using pointers in strcat. suggestions why i'm getting segfaults here? #include <stdio.h> #include <stdlib.h> #include <string.h> #define dim 26 void print (char *); char alphabet[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; char word[26]; int main(void) { *word = '\0'; print(word); return exit_success; } void print (char *word){ (int = 0; < dim; ++i){ strcat(word, alphabet[i]); p

arrays - Python, cPickle, pickling lambda functions -

i have pickle array of objects this: import cpickle pickle numpy import sin, cos, array tmp = lambda x: sin(x)+cos(x) test = array([[tmp,tmp],[tmp,tmp]],dtype=object) pickle.dump( test, open('test.lambda','w') ) and gives following error: typeerror: can't pickle function objects is there way around that? the built-in pickle module unable serialize several kinds of python objects (including lambda functions, nested functions, , functions defined @ command line). the picloud package includes more robust pickler, can pickle lambda functions. from pickle import dumps f = lambda x: x * 5 dumps(f) # error cloud.serialization.cloudpickle import dumps dumps(f) # works picloud-serialized objects can de-serialized using normal pickle/cpickle load , loads functions. dill provides similar functionality >>> import dill >>> f = lambda x: x * 5 >>> dill.dumps(f) '\x80\x02cdill.dill\n_create_function\nq\x0

java - LIBGDX background for main menu is showing up white -

my background image not showing up, shows white square in corner this. https://dl.dropboxusercontent.com/u/45938379/menu.png i need know how fix this, actors showing behind can see. here code public class mainmenu implements screen { crazyzombies game; stage stage; textureatlas atlas; skin skin; spritebatch batch; button play, option, quit, custom, store; textureregion background; public mainmenu(crazyzombies game) { this.game = game; } @override public void render(float delta) { gdx.gl.glclearcolor(0.09f, 0.28f, 0.2f, 1); gdx.gl.glclear(gl10.gl_color_buffer_bit); stage.act(delta); batch.begin(); stage.draw(); drawbackground(); batch.end(); } @override public void resize(int width, int height) { if (stage == null) stage = new stage(width, height, true); stage.clear(); gdx.input.setinputprocessor(stage); /** * quit button */ textbuttonstyle stylequit = new textbuttonstyle(); stylequit.up = sk

asp.net - Insert datetime from C# into SQL Server database -

when try insert datetime value sql server database error: conversion failed when converting date and/or time character string code: connection.open(); sqlcommand command = new sqlcommand("insert table values(@time)", connection); command.parameters.addwithvalue("@time", datetime.now); command.executenonquery(); connection.close(); table table has 1 datetime column called time . edit: table created in mssql 2012: http://i.imgur.com/tj3t3y7.png real code is: public void vytvordotaz(string uzivatel, datetime cas, string nazev, string dotaz) { int id = getmaxid() + 1; connection.open(); sqlcommand command = new sqlcommand("insert otazky values('" + id + "', '" + uzivatel + "', '0','0','0','@cas','" + nazev + "','" + dotaz + "')", connection); command.parameters.addwithvalue("@cas", datet

css - Footer should cover the rest of the height -

i have blackout @ moment. i have wrapper class @ top of page , want footer covers rest of page. @ moment, footer has height:100%; , creates scrollbar. i want footer fills rest of height of body minus height of wrapper, no scrollbar. how can solve this? example: http://codepen.io/anon/pen/ydhlk thanks! you need put footer inside closing </div> tag wrapper. http://codepen.io/anon/pen/imgbt

Scraping HTML in lisp -

my question related question found here scraping html table in common lisp? i trying extract data webpage in common lisp. using drakma send http request, , i'm trying use chtml extract data looking for. webpage i'm trying scrap http://erg.delph-in.net/logon , here code (defun send-request (sentence) "sends sentence in http request logon parsing, , recieves webpage containing mrs output" (drakma:http-request "http://erg.delph-in.net/logon" :method :post :parameters `(("input" . ,sentence) ("task" . "analyze") ("roots" . "sentences") ("output" . "mrs") ("exhaustivep" . "best") ("nresults" . "1")))) and here's function having trouble

java - Android read large files crashing app -

hello can see below m trying make (android) app check md5 hash of file code works small files can me? final textview informations = (textview) findviewbyid(r.id.informations); final edittext input = (edittext) findviewbyid(r.id.tocrack); string filepath = data.getdatastring(); string rawtext; string hash; stringbuilder text = new stringbuilder(); filepath = filepath.split("//")[1]; file file = new file(filepath); toast.maketext(getapplicationcontext(),"loading: "+filepath,toast.length_long).show(); fileinputstream fis = null; bufferedinputstream bis = null; datainputstream dis = null; try{ fis = new fileinputstream(file); bis = new bufferedinputstream(fis); dis = new datainputstream(bis); while (dis.available() != 0){ text.append(dis.re

c++ - Class isn't abstract but I get Error C2259: cannot instantiate abstract class -

i'm trying implement strategy pattern in c++, following error: error 1 error c2259: 'linearrootsolver' : cannot instantiate abstract class here's code (the line error is, marked comment). class uses strategy pattern (context): bool isosurface::intersect(hitinfo& result, const ray& ray, float tmin, float tmax) { inumericalrootsolver *rootsolver = new linearrootsolver(); // error here [...] } and here's strategy pattern classes: class inumericalrootsolver { public: virtual void findroot(vector3* p, float a, float b, ray& ray) = 0; }; class linearrootsolver : public inumericalrootsolver { public: void findroot(vector3& p, float a, float b, ray& ray) { [...] } }; i can't see why error trying instantiate abstract class in intersect method @ top? void findroot(vector3* p, float a, float b, ray& ray) = 0; //^^ and void findroot(vector3& p, float a, float b, ray&am

haskell - Convert Int into [Int] -

i'm looking through past exam paper , don't understand how convert int [int] . example, 1 of questions asks produce list of factors of whole number excluding both number , 1. strictfactors int -> [int] strictfactors x = ??? i'm not asking question me! want know how i'd convert integer input list of integer output. thanks! perhaps easiest have @ similar code. requested, won't give answer, should able use these ideas want. brute force here we're going use pairs of numbers between 1 , x test if can make x sum of 2 square numbers: sumofsquares :: int -> [int] sumofsquares x = [ (a,b) | <- [1..x], b <- [a..x], a^2 + b^2 == x] you call this: ghci> assumofsquares 50 [(1,7),(5,5)] because 50 = 1^2+7^2 , 50 = 5^2 + 5^2. you can think of sumofsquares working first taking a list [1..x] of numbers between 1 , x , between , x . checks a^2 + b^2 == x . if that's true, adds (a,b) resulting list. generate , check t

django - Edit a Key/Value Parameters list Formset -

i'm looking convenient solution create 'edit settings' key/values page. parameters model : class parameter(models.model): key = models.charfield(max_length=50) value = models.charfield(max_length=250) showinui = models.smallintegerfield() initial keys/values inserted in table. load them , send them using model formset factory using these lines : parameterformset = modelformset_factory(parameter, extra=0, fields=('key', 'value')) parameterformset = parameterformset(queryset=parameter.objects.filter(showinui=1)) return render_to_response('config.html', {'parameterformset': parameterformset}, context_instance=requestcontext(request)) template side, when formset displayed, keys , values shown inputs. i'd find convenient way display form keys readonly labels , values inputs. and, when submited, validate them according django standards. i've read lot of stuff, guess solution may custom widget, find reliable sol

wordpress - How to display content from a child page within a hierarchial custom post type? -

i have hierarchical custom post type. has 6 pages, , each page has 3 child pages. when viewing 1 of 6 pages, need display content (a title , excerpt) each of 3 child/descendent pages. here current loop: <?php if(have_posts()):?> <?php query_posts('&post_type=how-we-do-it&post_parent=0');?> <?php while(have_posts()):the_post();?> <?php $color = get_post_meta( get_the_id(), 'pointb_how-we-do-it-color', true ); ?> <div class="section"> <div class="title"> <h1 style="background:<?php echo $color;?> !important;"> <?php the_title();?> </h1> </div> <div class="content"> <div class="how-<?php the_slug();?>">the summary here. , here child content: <div class="child">child content should here.</div&

Create a file at a given path using C++ in Linux -

i want create file @ given path relative current directory. following code behaves erratically. times see file created , times not. may because of change in current directory. here's code. //for appending timestamp timeval ts; gettimeofday(&ts,null); std::string timestamp = boost::lexical_cast<std::string>(ts.tv_sec); //./folder/inner_folder existing directory std::string filename = "./folder/inner_folder/abc_"+timestamp+ ".csv"; std::ofstream output_file(filename); output_file << "abc,efg"; output_file.close(); now, problem file created in cases. when have command line argument input file current directory, works fine. ./program input_file if have this, not work ./program ./folder1/input_file i tried giving full path argument ofstream , still don't see files created. what correct way this? thanks ofstream not create missing directories in file path, must ensure directories exist , if not create them usin

android - "Failed to inflate" ActionbarSherlock and ViewPager Indicator -

i have app using viewpager , viewpagerindicator , reason keep getting following error below. cant seem figure out why error populating. greately appreciated. based on stack trace believe issue main.xml on line viewpager starts, there nothing havnt done before. maybe coming librarys side? e/activitythread(1220): failed inflate e/activitythread(1220): android.view.inflateexception: binary xml file line #29: error inflating class com.viewpagerindicator.titlepageindicator e/activitythread(1220): @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:698) e/activitythread(1220): @ android.view.layoutinflater.rinflate(layoutinflater.java:746) e/activitythread(1220): @ android.view.layoutinflater.inflate(layoutinflater.java:489) e/activitythread(1220): @ android.view.layoutinflater.inflate(layoutinflater.java:396) e/activitythread(1220): @ android.view.layoutinflater.inflate(layoutinflater.java:352) e/activitythread(1220): @ com.android.intern

php - Symfony2 How to have access to a set of data in all controllers? -

i have searched can't find similar issues or maybe phrasing wrong. want achieve access object in controllers in bundle. example: <?php namespace example\corebundle\controller; use symfony\bundle\frameworkbundle\controller\controller; class foldercontroller extends controller { function indexaction() { $title = $this->folder->gettitle(); $description = $this->folder->getdescription(); } } usually outside of symfony have extended controller class myself basecontroller extends controller , set in construct method know symfony doesn't use construct method bit stuck go. i this: class basecontroller extends controller { function __construct() { parent::__construct(); //load folder model id $this->folder = $folder; } } i extend basecontroller foldercontroller , go there have tried symfony , not work. have looked services not think need make work. if more details requir

javascript - cakephp - ajax request and action 'edit' does not work in simultaneous -

i'm using ajax ($this->js->get) select element of dropdownlist and, then, populate other dropdownlist. but, have dropdownlists inside form->create('user'). so, if use form->create(false) action 'edit' doesnt work... on other hand, if use form->create('user') 'ajax' doesnt work. <?php echo $this->form->create('user', array('action' => 'edit')); ?> <table> <tr> <th>project</th> <th>version</th> </tr> <tr> <td> <?php echo $this->form->select('projects', array($projects), array('multiple' => false, 'class' => 'span2', 'id' => 'projectstest')); ?> </td> <td> <?php

automatic ref counting - ARC from strong - to - strong -

i know correct approach here under arc. i have strong nsarray(custom class objects of own) @property inside controller , when init controller have pass 1 nsstring these arrays controller's pointer weak. dont needed sorted in main controller _leftpanelviewcontroller.repotlabels = [[self.availabledashboards sortedarrayusingdescriptors:@[sortbyreportlabel]]]; and other controller has @property(nonatomic, strong)nsarray *repotlabels; 1) understood 1st returns weak pointer assign weak pointer if code in maincontroller goes out of scope reportlabel becomes "nil"? 2) if make reportlabels property (strong) fix problem there other approach? should "copy" @ end? _leftpanelviewcontroller.repotlabels = [[self.availabledashboards sortedarrayusingdescriptors:@[sortbyreportlabel]]copy]; i think there may confusion when property's memory management options kicks in. affect setter not getter . here's quick review using arc: str

java - How to center a print statement text? -

so working on java project , in 1 part of program i'm printing out text text displayed on left side wanted displayed in middle how many accomplish this? newbie question? example: public static void main(string[] args) { system.out.println("hello"); } very quick answer you can use javacurses library fun things on console. read below it's in there. before though let's answer entire question in context it newbie question :) it's valid question. hints you: first question is, how wide terminal? (it's counted in number of characters) old terminals had fixed dimensions of 80 characters , 25 lines; so first step start assumption it's 80 characters wide. how center string on 80 character wide terminal screen? do need worry length of string? how position horizontally? add spaces? there format string can come with? once you've written program such can give string display on assumptions (that terminal 80 characters wide) can st

javascript - JS compression - PageSpeed (Google Chrome report) -

Image
i'm running pagespeed google chrome extension check performance of webpage. believe have got compressed js file (see attached code) report says can compressed again 59% reduction. missing here? update: using play framework. can done using require.js optimizer? /* requirejs 2.0.4 copyright (c) 2010-2012, dojo foundation rights reserved. available via mit or new bsd license. see: http://github.com/jrburke/requirejs details */ var requirejs,require,define; (function(y){function x(b){return j.call(b)==="[object function]"}function g(b){return j.call(b)==="[object array]"}function q(b,c){if(b){var e;for(e=0;e<b.length;e+=1)if(b[e]&&c(b[e],e,b))break}}function n(b,c){if(b){var e;for(e=b.length-1;e>-1;e-=1)if(b[e]&&c(b[e],e,b))break}}function y(b,c){for(var e in b)if(b.hasownproperty(e)&&c(b[e],e))break}function k(b,c,e,i){c&&y(c,function(c,j){if(e||!b.hasownproperty(j))i&&typeof c!=="string"?(b[j]||

javascript - Smooth Transition of "same" Object across a Pageload -

lets have 2 simple html pages, both div of same .blabla class. on 1 page, div in different position or have different size/color/background/etc. my goal have smooth transition between these 2 states across pageload. i'm dreaming of pure css3/html5 implementation i'm guessing that's not quite possible. my use case accompanied large change of text/content should reside on separate page. what best way this? i'll accept javascript/alternatives if must.

PHP/MongoDB - Add subdocument to document with _id -

i trying learn mongodb php. can save new document ->save($object). goal add subdocument document specific _id. i have document: "5197f4bef045a1d710000032": { "_id": { "$id": "5197f4bef045a1d710000032" }, "tag": 5487, "serial": "1z5589ss56", "type": "soda can", "dept": "noc", "location": "mitchell", "date": 1368913086, "moves": null } i insert new document "moves". i have been able once $set, subsequent $push nothing. <?php $m = new mongo(); $d = $m->selectdb('peeps'); $c = $d->family; $fields = array('tag' => 5487 , 'serial' => '1z5589ss56', 'type' => 'soda can', 'dept' => 'noc', 'location' => 'mitchell', 'date' => time() ); $can = new asset($fields); #$c->save($can); #update insert

c++ - Is it legal to statically link libstdc++ and libgcc in a binary-only application? -

is legal distribuite binary-only application has been built statically linking unmodified versions of both libstdc++ , libgcc gcc suite version 4.7 or greater? i no lawyer, think faqs @ gnu pretty clear on this. yes can! if want distribute executables. http://www.gnu.org/licenses/gcc-exception-faq.html http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.license.what

Dropbox Core API for Android: Not returning after Authentication -

i developing 2 android applications: the first normal application launcher , on the other application viewer activity (see manifest): <activity android:name=".myactivity" android:icon="@drawable/icon" android:label="@string/dropbox" > <intent-filter> <action android:name="android.intent.action.view" /> <category android:name="android.intent.category.default" /> </intent-filter> </activity> <activity android:name="com.dropbox.client2.android.authactivity" android:configchanges="orientation|keyboard" android:launchmode="singletask" > <intent-filter> <data android:scheme="db-xxxxx" /> <action android:name="android.intent.action.view" /> <category android:name="android.intent.category.browsable" /> <category android:nam

java - JTextArea not updating dynamically -

i have jtextarea inside class want update dynamically. displaying text append after processing done. have tried implement following fix it: public newconsole(){ initcomponents(); } public void write(final string s){ swingutilities.invokelater(new runnable() { public void run() { textarea.append(s); } }); } console gets instantiated in parent class as: protected newconsole console = new newconsole(); and output it, children call: console.write("append this.."); edit: here's more information: public abstract class parent{ protected newconsole console = new newconsole(); public parent(){} protected abstract int dosomething(); } public class child extends parent{ public child(){ console.write("i want update dynamically"); dosomething(); console.write("and this.."); } public int dosomething(){

c++ - CMFCStatusBar double click event -

how response cmfcstatusbar double click event? i have called m_statusbar.enablepanedoubleclick(true); see example statusbardemo @ http://archive.msdn.microsoft.com/vcsamplesmfc begin_message_map(cstatusbardemoview, cformview) on_command(id_indicator_label, onindicatorlabel) end_message_map() static uint indicators[] = { id_indicator_icon, // status icon id_separator, // status line indicator id_indicator_progress, // progress bar id_indicator_label, // text label id_indicator_animation, // animation pane id_indicator_caps, id_indicator_num, id_indicator_scrl, }; void cstatusbardemoview::oncreate() { m_wndstatusbar.create(this); m_wndstatusbar.setindicators(indicators, sizeof(indicators)/sizeof(uint))) } void cstatusbardemoview::onindicatorlabel() { messagebox(_t("status bar pane double-click...")); }

asp.net mvc - knockout validation with typeahead combobox plugin -

Image
i trying use knockout validation in combination bootstrap combobox plugin . i have select control bound observable property has required attribute (for ko validation). <select data-bind="attr: { options: typeaheadsource, value: xyz, validationoptions: {errorelementclass: 'input-validation-error'}, typeaheadcombobox: {}"></select> i have custom binding associated select control in call bootstrap combobox plugin. creates div input control on select control , hides select control. the knockout validation fires when dont select value in comobox , shows error message next control field not highlighted. here how looks like as can see, error message shows input field not highlighted. here final html generated when validation fires. <div class="combobox-container"> <input style="position:static;" type="text" autocomplete="off" data-bind="{ value: name, validationoptions: { errorelem