Posts

Showing posts from March, 2010

php - Pull row data into modal window -

i have mysql query within php function: $sql_json = "select * mytable"; i displaying returned data table grid. first row has edit button once user clicks on it, opens modal window. should transfer data row bootstrap modal window. echo "<tr><td> <a class=\"btn btn-primary btn-mini\" data-toggle=\"modal\" href=\"#myeditmodal\" data-project-id=\"" .$row['pk_tid']. "\" \">delete/edit</a></td>"; now trying $row['pk_tid'] modal window here: <div class="modal hide fade" id="myeditmodal" tabindex="-1" role="dialog" aria-labelleby="mymodallabel" aria-hidden="true"> <div class="modal-header"> <div class="modal-body"> <form class="well-small" action="edit.php" method="post" id="modalform" name="modalform">

bash - Replace 5 dots with a single space -

i have title has 5 consecutive dots i'd replaced 1 space using bash script. doing not helping: tr '.....' ' ' obviously because it's replacing 5 dots 5 spaces. basically, have title want changed slug. i'm using: tr a-z a-z | tr '[:punct:] [:blank:]' '-' to change lowercase , change punctuation mark , spaces hyphen, i'm stuck dots. the title i'm using like: believe.....right now so want turned believe-right-now how change 5 dots single space? you don't need sed or awk. original tr command should trick, need add -s flag. after tr translates desired characters hyphens, -s squeeze repeated hyphens one: tr a-z a-z | tr -s '[:punct:] [:blank:]' '-' i'm not sure input/output context you, tested above follows, , worked me: tr a-z a-z <<< "believe.....right now" | tr -s '[:punct:] [:blank:]' '-' output: believe-right-now see http://www.ss64

Can I exclude HTML output when there's no result in mysql database when querying via PHP -

in short, have php output (the code part) needs hyperlinked when displayed on webpage, issue is, when there's no result, hyperlinks blank url. there anyway not display html if there's no result when search executed? to clarify, i'd need apply more 1 section of output. here's specific part of code. if(isset($_post['search'])) { $searchq = $_post ['search']; $query = mysql_query ("select * hh_list2 company '%$searchq%'") or die ("could not search"); //ot here !!!!! $count = mysql_num_rows($query); if ($count == 0) { $output = 'sorry did not find anything'; }else{ while($row = mysql_fetch_array($query)) { $company = $row ['company']; $twitter_id = $row ['twitter_id']; $online_chat = $row ['online_chat']; $online_form = $row ['online_form']; $email_1 = $row ['email_1']; $email_2 = $row

osx - Boot Camp, howto manually change the configuration -

so visiting in-laws week, , mother in law has imac osx 10.5. had small windows 7 partition dual booting boot camp. turns out, uses windows partition, , partition way small. asked me make bigger. so, used gparted , made partition right sizes; however, mac boot manager not recognize windows partition now. expected happen, did not expect boot camp useless afterwards. "untitled" windows partition in osx looks ok. boot camp ui lets gives me option restore single partition. my question is: can manually change boot entries without ui ala grub? or, how else can fix boot loader? i never found config file ala gurb fix issue, did fix it. there a few things @ play here. looks closed of tabs reading off of, take stab @ writing found. the osx boot loader @ (from memory) hybrid of mbr , gpt. if not synced, not show option. gparted not sync them automatically use "gptsync" sync mbr of disk gpt of partitions this allow osx bootloader show windows

css - How can I center my logo for my mobile site? -

i’m trying horizontally center logo on mobile version of site. can’t center, though. i’ve tried various things nothing seems move it. my code is: @media screen , (max-width: 640px) { .logo-image .logo img { max-height: 70px; margin-top: -15px; margin-bottom: 15px; width: auto; background: center; } } for h1.logo try text-align:center;

javascript - How to have a default option in Angular.js select box -

i have searched google , can't find on this. i have code. <select ng-model="somethinghere" ng-options="option.value option.name option in options" ></select> with data options = [{ name: 'something cool', value: 'something-cool-value' }, { name: 'something else', value: 'something-else-value' }]; and output this. <select ng-model="somethinghere" ng-options="option.value option.name option in options" class="ng-pristine ng-valid"> <option value="?" selected="selected"></option> <option value="0">something cool</option> <option value="1">something else</option> </select> how possible set first option in data default value result this. <select ng-model="somethinghere" ....> <option value="0" selected=&

Spring @Autowired Not Working Error Creating Bean Injection Of Autowire dependencies failed -

i use spring , have lot of trouble using @autowired annotation. upon compiling throws these errors edit using regular java classes write classes. not causing problem, it? aug 12, 2013 2:40:32 pm org.apache.catalina.core.applicationcontext log info: no spring webapplicationinitializer types detected on classpath aug 12, 2013 2:40:32 pm org.apache.catalina.core.applicationcontext log info: initializing spring root webapplicationcontext aug 12, 2013 2:40:33 pm org.apache.catalina.core.standardcontext listenerstart severe: exception sending context initialized event listener instance of class org.springframework.web.context.contextloaderlistener org.springframework.beans.factory.beancreationexception: error creating bean name 'homecontroller': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: com.mycompany.smsdatabase.service.personimport com.mycompany.smsdatabase.controller.homecontroll

c# - how to add event handler to programatically created checkboxes -

this code adding check box progrmatically doesnt let me add event onchecked protected void gridview1_rowdatabound(object sender, gridviewroweventargs e) { checkbox chk = new checkbox(); chk.enableviewstate = true; chk.enabled = true; chk.id = "chkb"; datarowview dr = (datarowview)e.row.dataitem; e.row.cells[0].controls.add(chk); e.row.tablesection = tablerowsection.tablebody; } when try add this: chk.checkedchanged += checkbox_checkedchanged; error : "the name 'checkbox_checkedchanged' not exist in current context", even though have added function: private void checkbox_checkedchanged(object sender, system.eventargs e) { response.write("in check changed object"); } c# case-sensitive. function named checkbox_checkedchanged , attempting attach event handler function named checkbox_checkedchanged (note upper- vs. lowercase "c" @ beginning).

facebook - Automatic FB Login NO PROMPT -

i wanting add fb functionality our mvc business site. there events result customer activity on our site. post these events our company timeline. have several working examples , tutorials having difficulty @ log in. have system use stored credentials..web config etc. rather prompt login. docs etc. show oauth end point doesn't accept these kind of parameters?? so how can have system log in using stored credentials? tia jb facebook used have offline_access permission defunct. can trade in short-lived token long-lived token (that think lasts around 60 days) , store on server. check out details here learn more process.

asp.net - How to get radio buttons (list items) to stay selected during postback -

basically have radiobuttonlist in updatepanel, inside of updatepanel. once select item in list unselect itself, of course triggered postback. now, nothing in codebehind anywhere changing selected property of radiolist. now, assumed viewstatemode= enabled, selected index preserved between postbacks. happens when item selected, becomes unselected. my inner(nested) updatepanel code looks this. <asp:updatepanel id="optionsupdater" updatemode="conditional" runat="server" childrenastriggers="true" viewstatemode="enabled"> <contenttemplate> <asp:panel runat="server" id="rightside" cssclass="column4 row2"> <%--options panel--%> <div id="optionspanel"> <div style="padding: 2px; border-color: black; border-style: solid; border-width: 1px; background-color: whi

java - Junit running subclass invokes superclass testcases -

this question has answer here: junit ignore @test methods base class 8 answers say there're 2 junit classes, bigtest , smalltest. smalltest subclass of bigtest, , both contain tests. when trying run smalltest in eclipse junit testing, testcases in both classes run, instead of testcases in smalltest being run. why so? there way run smalltest's testcases without invoking bigtest's testcases? if derive 1 test other (which consider bad practise) derived class inherits methods. junitrunner searches methods starts "test", , finds of course methods parent , sub class.

Visual Studio 2010 web deployment to IIS server -

i need able setup iis server accept web application publishing via web deployment tool in visual studio 2010. have attempted install web deploy, still haven't had success. not positive if right tool or not. i running server 2008 r2 enterprise version 6.1.7601 service pack 1 build 7601 x64 iis version 7.5.7600.16385 sql databases accessed , housed on server well. ssrs running on server. thank you, stephen hathaway

c# - Method to handle objects with properties in common, but different object types -

i have large collection of automatically generated objects. although of different, non-related classes, of objects share basic properties (name, id, etc.). i not control generation of these objects, unfortunately cannot take ideal approach of implementing interface. create method in pass arbitrary 1 of these objects , using these common properties. the general idea like: someobj = new someobj(); a.name = "sara"; diffobj b = new diffobj(); b.name = "joe"; string phrase = string.format("i {0} , {1}", getname(a), getname(b)); private string getname(object anyobjwithname) { return anyobjwithname.name; } though naturally not work. i thought generic method might hold answer, way can see call current type using genericmethod.invoke , still carries same issue of not being able resolve properties of passed object in method. unlike calling generic method type argument known @ execution time or how call generic method given type object? type

twitter bootstrap - jquery on click only fires first time -

i using bootstrap dropdown list of different categories. when user clicks on 1 category in list, category selector (the 1 displayed in dropdown-toggle) should change title 1 clicked. here example . it works first time users clicks item. when clicking again on list item nothing happens. seems on click event fires once, although used delegated version of (which need, because dom might change). here's html of dropdown list: <div class="dropdown inline hide" style="display: block;"> <a href="#" data-toggle="dropdown" class="dropdown-toggle"> <span class="current-category">no category</span><span class="caret"></span> </a> <div class="dropdown-menu scroll-pane"> <ul> <li><a class="category-selection" href="#">no category</a></li> <li><a class="category-selectio

visual c++ - task<...> construction vs create_task -

according asynchronous programming in c++ (windows store apps) : // explicit construction. (not recommended) // pass iasyncoperation task constructor. // task<deviceinformationcollection^> deviceenumtask(deviceop); // recommended: auto deviceenumtask = create_task(deviceop); why assignment ( create_task ) preferred on construction? i think you're bound either way. you're bound class you're constructing factory interface may using , subject maintaining compatibility whatever changes made public interfaces utilitized in implementation. disruptive changes possible in either location. microsoft's answer question comes create_task() documentation: create_task() convenience function allows use of 'auto' keyword while creating tasks. http://msdn.microsoft.com/en-us/library/vstudio/hh913025.aspx

qt4 - QWebview - setBaseUrl doesn't work -

i want render html qstring in qwebview using qwebview::sethtml( qstring, qurl ); the images should loaded temporary directory c:/temp. in html code images referred file-names, without path e.g. <img src="myimage.png"> i provide path baseurl 2nd parameter of sethtml, images not rendered. i've tried refer images full path: <img src="c:/temp/myimage.png"> and works correctly - image displayed. i've checked, whether url valid: qurl base = qurl::fromuserinput("c:/temp"); if (!base.isvalid()) return false; and url reported valid. doing wrong here? i'm working on windows, qt 4.8.4 thanks hints! solved! right click on missing image symbol in qwebview reviled, image had not address c:/temp/myimage.png expected c:/myimage.png . i've tried set baseurl c:/temp/. , works! looks qwebview interpreted baseurl html-file, relative images located. in point of view doesn't make sense qwebview::

How can I tell if a string pattern exists within any element of a set in Python? -

how can ask if string pattern, in case c , exists within element of set without removing them each , looking @ them? this test fails, , not sure why. guess python checking if element in set is c , instead of if element contains c : n [1]: seto = set() in [2]: seto.add('c123.45.32') in [3]: seto.add('c2345.345.32') in [4]: 'c' in seto out[4]: false i know can iterate them set make check: in [11]: x in seto: if 'c' in x: print(x) ....: c2345.345.32 c123.45.32 but not looking in case. ok help! edit i sorry, these set operations, not list original post implied. 'c' in seto this checks see if of members of seto exact string 's' . not substring, string. check substring, you'll want iterate on set , perform check on each item. any('c' in item item in seto) the exact nature of test can changed. instance, if want stricter c can appear: any(item.startswith('c') it

javascript - Downloading HTML files without opening a browser -

i have url don't want open in browser. servlet url points able download jpeg image of rendered html document using html2canvas library based on specific params. how can download html jpeg without rendering html on client side. possible. please share inputs. you can try this:- response.addheader("content-disposition", "attachment; filename=" + name); or ian suggested:- content-disposition: attachment; filename=abc.jpeg

ios - iPad fails to find apple-touch-icon.png for home page bookmark -

i've added link rel="apple-touch-icon" href="apple-touch-icon.png" main index.php file in head section. i've got apple-touch-icon.png in root dir. i've tried 57x57, 72x72 , 114x114 pngs. when click 'add home screen' button in safari, ipad fails find .png file. shows black box grey outline. can't figure out how ipad use .png image. the correct size ipad 144px , 114px iphone retina display. <link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon.png" /> <link rel="apple-touch-icon" sizes="144x144" href="apple-touch-icon-retina.png" />

c# - "Could not find default endpoint element that references contract" -

yes, know question repeat, bear me here. i've tried i've seen in other questions of same type , still haven't managed working. i'm working .net 4.0 in vs2012 ultimate. have class library that's supposed reference web service. going through usual steps (add service reference > enter service uri > go > find available service > give name > ok) creates service reference , adds system.servicemodel tag in app.config file of class library. this class library being referenced winforms app that's passing data it, validated returned data web service. however, upon creation of service client object... shws.staticxmlapisoapclient wsc = new shws.staticxmlapisoapclient(); ...the code crashes error noted in question title, "could not find default endpoint element references contract 'shws.staticxmlapisoap' in servicemodel client configuration section. might because no configuration file found application, or because no endpoint ele

c++ - Allow users to specify a target location using a Browse Folder Dialog & store files -

i working c++ on windows environment. creating app using mfc. have stream of image files generated application. have placed button in application , need store images target folder user specify. have tried following far. code dialog box pop (opens browse folder dialog) void imagearchive::browsefolder(tchar path[max_path]) { browseinfo bi = { 0 };; bi.lpsztitle = _t("please select folder storing received files"); bi.pszdisplayname = path; lpitemidlist pidl = shbrowseforfolder(&bi); if (pidl != 0) { bool bret = shgetpathfromidlist(pidl,path); _tprintf ( _t("selected folder: %s\n"), path ); // free memory imalloc * imalloc = 0; if ( succeeded( shgetmalloc ( &imalloc )) ) { imalloc->free ( pidl ); imalloc->release ( ); } } } code saving images folder void imagearchive::archivesave(ippimage<ipp8u,1> const &im ) { time_t t = clo

ruby on rails - Add id to url wont work -

i have 2 model less views. an index view: <% @icd1.each |f| %> <%= link_to "#{f.von} #{f.bis} #{f.bezeichnung}", icd_show_path(f) %> </p> <% end %> and show view: <% @icd1.each |f| %> <%= link_to "#{f.von} #{f.bis} #{f.bezeichnung}", icd_show_path(f) %> </p> <% f.icd2.each |s| %> <%= s.von %><%= s.bis %><%= s.bezeichnung %> </p> <% end %> <% end %> my controller: class icdcontroller < applicationcontroller def index @icd1 = icd1.all end def show @icd1 = icd1.find(params[:id]) end end but somehow link in index view, wont work: <%= link_to "#{f.von} #{f.bis} #{f.bezeichnung}", icd_show_path(f) %> when try access show page error: couldn't find icd1 without id and url shows http://localhost:3000/icd/show without id! my routes: get "icd/index" "icd/show" 1st : confusing namin

javascript - jQuery - on page load select optgoup and children in second select by a default selected option in a parent select -

i have select "usercountry" has predefined option selected when page loads. have second select organized optgroup country , child option state. have jquery script change/show optgroup , child option states accordingly when usercountry chosen. problem when page loads "united states" preselected need optgroup united states preloaded. html: <select name="usercountry" id="usercountry" class="required"> <option value="">-- please choose --</option> <option value="13">australia</option> <option value="38">canada</option> <option value="223" selected>united states</option> <option value="239">zimbabwe</option> </select> <select name="userstate" id="userstate" class="required"> <option value="" selected>please cho

opengl es - How to convert RGB frame to YUV in android using GPU? -

i looking h/w accelerated way convert rgb frame yuv (say yuv420) in android. see renderscript has intrisics yuv rgb conversion. looking rgb yuv though. i need embedded system (android 4.0.3 based) cortex-a8 sgx530 gpu core. on 720p argb frame keeps changing @ 10 frames per sec. doing on arm a8 core not acceptable. thats why looking way using gpu compute. imagining renderscript or opengl based implementation can solve this.but don't know how. a blog post here http://www.mdk.org.pl/2007/11/17/gl-colorspace-conversions has example doing rgb yuv conversion using gstreamer , opengl. looking works on android. edit: link http://slouken.blogspot.com/2011/02/mpeg-acceleration-with-glsl.html has pointers. still researching. is using gpu necessary? cortex-a8 has neon support can convert frames fast gpu could. there nice c library takes care of cpu h/w acceleration: http://code.google.com/p/libyuv/ .

android - How to communicate between two child Fragments inside a Nested Fragment -

i can communicate between 2 fragment s of activity callback interface . following way, have implemented interface in parentfragment communicate. but in case of activity, using - @override public void onattach(activity activity) { super.onattach(activity); try { mcallback = (onheadlineselectedlistener) activity; } catch (classcastexception e) { throw new classcastexception(activity.tostring() + " must implement onheadlineselectedlistener"); } } and in current case, using mcallback = (onheadlineselectedlistener) getparentfragment(); instead of mcallback = (onheadlineselectedlistener) activity; . working well. approach okay? or should thread instead onattach() ? the cast thing ensure object instance of class implements given interface (in case onheadlineselectedlistener ). it's irrelevant @ point type of object activity, fragment or else. long implements interface need,

xml - How to get the number of generations of a node? -

i have xml string or file in vb.net. question is, how number of generations node has (going downwards child, grandchild, great grandchild...)? here code: dim doc new xmldocument() doc.loadxml(str) dim root xmlnode = doc.selectsinglenode("/root/subcategory") if root.haschildnodes dim integer = 0 root.childnodes.count - 1 textbox1.appendtext(root.childnodes(i).name) textbox1.appendtext(vbtab) textbox1.appendtext(number of generations) textbox1.appendtext(vbnewline) next (i) end if the xmlnodereader class has depth property can tell depth of current node, this: dim doc new xmldocument() doc.loadxml(str) dim deepestnodelevel integer = 0 using nodereader new xmlnodereader(doc) while nodereader.read() if nodereader.depth > deepestnode deepestnodelevel = nodereader.depth end if end while end using now after going through whole xml document know deepest depth ( deepestnodelev

c# - Windows Impersonation: A Flaw in the Ointment -

in journey master nuances of user impersonation in windows first had issue getting impersonation remote database occur @ (see this question ) figured out. next hurdle undoing/cancelling/reverting (choose favorite verb) impersonation. i have tried couple different impersonation libraries seem credible me: phil harding's impersonator matt johnson's simpleimpersonation the results identical both libraries. best practices dictate using logon32_logon_new_credentials logon type (see windows api logonuser function ) remote db connection. when here sample code produces: // scenario begin impersonation. local user = mydomain\myuser db reports: mydomain\impersonateduser end impersonation. local user = mydomain\myuser db reports: mydomain\impersonateduser << not expected here!! the workaround have found use logon32_logon_interactive logon type , this: // scenario b begin impersonation. local user = mydomain\impersonateduser << expected, not wanted! db report

jsf 2 - intellij - No code-completion for JSF2 @Named annotated bean -

intellij doesn't seem recognize jsf2 managed beans when annotate them @named , cdi (jsr299) annotation used when deploying web application on glassfish server. @named("userbean") @sessionscoped public class userbean implements serializable { private string name; private string password; public string getname() { return name; } public void setname(string name) { this.name = name; } public string getpassword() { return password; } public void setpassword(string password) { this.password = password; } } i don't auto-completion when using bean in el expression (e.g. #{userbean.name} ). , when open jsf-tab in intellij, there no managed beans listed. when use @managedbean annotation, auto-completion + beans listed in jsf tab. have configure or how working? screenshot: http://i.imgur.com/tlz7zlx.png have tried right-click project > add framework support > cdi ? intellij cdi

Get age range for Facebook users who have not installed my app? -

is possible age range facebook users have not installed app? the intended use invite screen - we'd show user friends 18 or older, can't figure out if possible. love suggestions. you can use insights api of facebook. you can active users age application_active_users_age

How do I override a method object's __call__ method in Python? -

this question has answer here: python functions , __call__ attribute 1 answer here working far def f(n): return n f.__call__ = lambda n: n + 1 print f(2) #i expect output of 3 output of 2 i not interested in way achieve desired output. rather, educational purposes, know why overriding __call__ have done, doesn't work expect. this appears due special-casing of function types in ceval.c , in call_function : if (pyfunction_check(func)) x = fast_function(func, pp_stack, n, na, nk); else x = do_call(func, pp_stack, na, nk); i'd guess efficiency, since calling regular functions, , ignoring __call__ attribute, far common kind of calling gets done.

backbone.js - Marionette multiple regionTypes -

i have custom region main application allows me page transitions. works 1 style of transition, how go creating different transitions region. can set multiple regiontypes on same region, or have pass transition type modified marionette region show function , go there. appreciated, thanks. app.addregions { main: { selector: "#page", regiontype: fold } } you cannot associate multiple-types same region. options become if knowledge of knowing way render role of region-manager or outside of it. from statement of passing 'transition type' in, thinking responsibility of figuring out transition use not role region manager. this question may better answered base on design. hope help.

override django admin change_list_results.html per model -

i'm trying override change_list_results.html particular model. tried copying file other templates in corresponding tree directory ( templates/admin/app/model ), method didn't work. see in documentation overriding per app/model possible, not described special method achieve this. found related answer overriding change_list.html , want override change_list_results.html , can't understand how accomplish that. way override? i having same issue , found old post. imagine fixed yours. anyways, doing wrong use plural name of model , using lowercase name. have sure of following: save template in /templates/admin/app/model said check lower/upper cases in names of models this sounds silly, in case...don't use plural name of model good luck!

Collapsible ChoiceField in Django -

i have django form textfield input i'd turn choicefield can away having compare similar answers determine if refer same thing. however, number of possible choice prohibitive (several hundred). collapsible choicefield users select category, sub-category, , on @ each step presented reasonable number of options (especially since many users on mobile devices limited screen sizes). options quite amenable unambiguous categorization , seems way display information. however, while see information collapsing sorts of other sorts of aspects of forms haven't seen how this. i'm not sure avenue pursue make work best. css or javascript seem ways people make collapsible lists don't know whether either of these play django select widget. what's best option sort of thing? here options i'm aware of: 1) write sort of new widget. sounds horrible (based on experience writing new widgets) if it's best option i'll it. 2) use normal select widget , use javascript

c++ - data member 'vec' cannot be a member template -

i have following 2 lines in header in order declare vector containing template: template <class t> std::vector <t> vec; however following error: data member 'vec' cannot member template did wrong? edit: don't know understood correctly, trying declare vector contains template, know can done 1 can have following: template <class t> void funct(vector <t> v){ } this function takes vector of template it's parameter, wish same thing except declaring vector in header in order allow vector contain anything. the template <> statement used when declaring function template or class template . example can use when declare (and define) class: template <typename t> class templateclass { /* definition */ }; or function: template <typename t> void templatefunc(t value) { /* definition */ } when creating instance of class, can't use template <> statement. instead specify template param

Javascript doesnt run when navigating through listview , jquery mobile -

i developing jquery mobile website , have problems running javascript code. i have home page , index.html , listview navigate various html pages. use single-page structure pages , means every 1 html file contains 1 page. home page , navigate page using persistent navbar horizontal button 2 options. 1 photos , other multimedia. for photos using javascript fb api , download photos fb page , photoswipe plugin present them user. the problem.. if run photos.html page , work , load albums. there 2 things javascript does. 1) use fb api albums, photos , cover photos etc.. 2) dynamically create listview albums , photos. in case both work great! however when in index.html , navigate through listview photos.html (photos default chosen button persisent navbar) javascript code doesnt work. not called @ all.. the index.html looks like: <!doctype html> <html> <head> <meta charset="utf-8"> <title>jquery mobile web app</title>

Linux, Backtrack, Perl, Bluesniff -

i trying run bluesniff on backtrack.i have bluesniff.pl script , when try execute typing: perl bluesniff.pl an error message came out: can't locate curses.pm in @inc (@inc contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10 /usr/local/lib/site_perl .) @ /usr/local/share/perl/5.10.1/curses/application.pm line 92. begin failed--compilation aborted @ /usr/local/share/perl/5.10.1/curses/application.pm line 92. compilation failed in require @ bluesniff.pl line 23. begin failed--compilation aborted @ bluesniff.pl line 23. please advise! to commented, thanks! worked. you need download curses perl module .

asp.net - How to remove postback on linkbutton inside gridview? -

i'd ask on how prevent post when linkbutton inside gridview clicked? my current implementation that, have gridview customer details , button link id link button, once link button clicked customer details shown on respective fields (i.e. textbox, etc), want more interactive , faster when clicking said button removing post back. how can achieve this? thanks. so confirm answer after our comments, replace this... <asp:templatefield> <itemtemplate> <asp:linkbutton id="linkview" cssclass="view" text ='<%# eval("id")%>' runat="server"></asp:linkbutton> </itemtemplate> </asp:templatefield> ...with this... <asp:templatefield> <itemtemplate> <a href="#" onclick="return loadviaajax();"><%# eval("id")%></a> </itemtemplate> </asp:templatefield> ...where loadviaajax javascript function populates customer field

java - Items are not showing in dropdown list using servlet -

i've created servlet dropdown list. here code.. ddbirformno.java(servlet) public class ddbirformno extends httpservlet { private static final long serialversionuid = 1l; @override protected void doget(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { tblbirformnodao birdao = daofactory.getdaomanager(tblbirformno.class); list<tblbirformno> birtypelist = birdao.getallbirformnumber(); request.setattribute("birtypelist", birtypelist); request.getrequestdispatcher("/web-inf/rcmoduleissue-ereceipt-ror.jsp").forward(request, response); } } i don't know if missed something. rcmoduleissue-ereceipt-ror.jsp: <select name="bfnscode" id="bfnscode" class="sel" style="width: 245px; margin-left: 0;"> <option selected="selected" value=""></option> <c:foreach

how to map an array of custom type from postgres to java using hibernate -

i trying map array of custom type returned postgres procedure java i have custom type in postgres create type public.customtype_sample as( sampleid bigint, samplename character varying, samplevalue character varying ) the procedure returns array of customtype_sample column of type customtype_sample[] in postgres i went through various link: how map user data type (composite type) hibernate array usertype in hibernate , postgresql --> mappingexception and may more wrote class implements array of sampletype end getting exception "could not execute query" caused : org.postgresql.util.psqlexception: method org.postgresql.jdbc4.jdbc4array.getarrayimpl(long,int,map) not yet implemented. the error occurs in nullsafeget method of usertype @override public object nullsafeget(resultset rs, string[] names, sessionimplementor session, object owner) throws hibernateexception, sqlexception { sampletype[] javaarra

actionscript 3 - Send variables back to the constructor function (AS3) -

i hope can ask in way make sense. i'm not sure if title question need do. here goes nothing. i'm attemping create game, i'm creating 2d array sets out "map". stage.addchild(new grid5(stage,g1a,20,20)); so stage stagereference, g1a "grid1array" , x , y. inside grid5 run loops check values of in array, if finds 2 creates new "player" player sets on map , adds keyboard event listeners, in game there 2 or 3 maps, , therefore there 2 or 3 players (1 on each map). fine, works, players need spot on map, , when set boolean true. each player has it's own boolean... need find way check 3 players booleans set true know game finished. so have function called finished() . problem is, if put in player class, can check it's own boolean, , means when 3 of players gets end, game end. thought need pass result of boolean constructor , loop through players, i'm not sure how reference them created in grid class. fist way how s

javascript - how to implement Tab panel inside Widget with extjs? -

i'm trying implement tab-panel inside widget. i can see it, totally in wrong place... here code of view how can place inside widget.testusersettings???? i suppose renderto: ext.getbody() not correct here... whar mean? ext.define("test.view.settings.usersettings", { extend: "ext.window.window", alias: "widget.testdusersettings", requires: [ "test.overrides.localcombobox", "test.common.localemanager", "ext.form.panel" ], width: 600, height: 300, border: false, closeaction: "hide", resizable: false, layout: "fit", title: 'user settings', initcomponent: function() { debugger; ext.create('ext.tab.panel', { width: 300, height: 200, activetab: 0, items: [ { title: 'userdata', bodyp

javascript - What is wrong with my Google Universal Analytics code? -

what seems case why code not working. the account set universal analytics. the account enabled ecommerce. the chrome extension debugging analytics shows lot of stuff happening. but days pass , no tracking. here output: (note: account , domain data substituted public post.) <!-- bof: google analytics e-commerce tracking --> <script> (function(i,s,o,g,r,a,m){i['googleanalyticsobject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new date();a=s.createelement(o), m=s.getelementsbytagname(o)[0];a.async=1;a.src=g;m.parentnode.insertbefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'ua-00000000-0', 'my.domain.com'); ga('require', 'ecommerce', 'ecommerce.js'); ga('ecommerce:addtransaction', { 'id': '12345', 'affiliation': 'my store', 're

visual studio 2012 - TypeScript error Web essential -

i use web essentials compile typescript files on save (visual studio 2012), got empty js , message : compile error. see error list details error ts5012: cannot read file 'c:/users/nor/documents/tribway/tribway-invitationpage/tribway/scripts/tribway/invitations.ts': unsupported file encoding. file encoding issue ts 0.9.0 fixed in latest version. can download 0.9.1 here : https://typescript.codeplex.com/releases/view/102929 ps: recommend uninstalling webessentials before installing 0.9.1 tend conflict (webessentials starts leak memory). ts 0.9.1 has pretty awesome , stable support visual studio 2012

qt - QML in C++ app or vice versa -

consider case of simple gui displaying output of rather elaborate calculation. now write nice, custom gui using qml . write background app in qt c++ . i'm sitting in front of qt documentation , wonder if i 1) should write qml application , somehow embed c++ classes in (which absolutely possible) or if i 2) should write c++ application , somehow embed qml gui in , modify qml properties classes (which again possible) i wrote in c++ using qt widgets gui. want move gui qml , keep c++ classes though willing rewrite interface gui. possible anser: the marked solution below suggested keeping c++ classes , interface gui exclusively through signals , slots. ended main.cpp instantiates main working class , displays qml gui this: qquickview viewer; viewer.setsource(qurl("./qml/main.qml")); viewer.show(); then added myclass , got me object connections: myclass myclass; qquickitem* item = viewer.rootobject(); qobject::connect(item, signal(buttonclicked()), &

php - Retrieve data from a database and separate the data when we get a delimiter? -

i have table 2 columns first column id , second column list of form : productid:3,productname:eggbiryani,quantity1price:100; productid:5,productname:vegetable biryani,quantity1price:100; productid:10,productname:special vegetable biryani,quantity1price:130; when retrieving column need place \n instead of ;. need send data via mail not clear identification if include \n in place of ; data after /n come next line data clear.thanks in advance in javascript: var newcol2 = oldcol2.replace(/;/, "\n"); or var arycol2 = oldcol2.split(';'); in php: $newcol2 = str_replace(";", "\n", $oldcol2); or $arycol2 = explode(';', $oldcol2); references: explode , str_replace php manual.