Posts

Showing posts from May, 2012

php - CodeIgniter won't load model on deployment machine -

i developed small application codeigniter , brought run vagrant , debian. , fine. so i'm trying set virtual machine xubuntu 15.04. installed same packages (php apache module) now i'm getting following error: unable locate model have specified: person_model this how load model: $this->load->model('person_model'); and how model looks in models/person_model.php <?php class person_model extends ci_model { function __construct() { parent::__construct(); } // ... } on xubuntu i'm running php 5.6.4-4ubuntu6.2 , on debian i'm running php 5.4.41-0+deb7u1 thanks advice , help! starting codeigniter 3.0, class filenames (libraries, drivers, controllers , models) must named in ucfirst-like manner or in other words - must start capital letter. http://www.codeigniter.com/user_guide/installation/upgrade_300.html#step-2-update-your-classes-file-names this codeigniter 3.0 coding convention must follow. model file should

c# - Using Claims with OpenIdConnect.Server in ASP.NET 5 -

in past 7 days i've tried setup asp.net 5 webapi using openidconnect.server resource owner flow. i more or less successful in generating token , accessing [authorize] protected actions. however, when try access this.user.identity.claims , it's empty. using asp.net 5, beta6 (having troubles upgrading recent beta7 , waiting it's official release) in startup.cs got following: public void configureservices(iservicecollection services) { services.addcaching(); services.addentityframework() .addsqlserver() .adddbcontext<authcontext>(options => { options.usesqlserver(configuration.get("data:defaultconnection:connectionstring")); }); services.addidentity<authuser, authrole>( options => options.user = new microsoft.aspnet.identity.useroptions { requireuniqueemail = true, usernamevalidationregex = "^[a-za-z0-9@_\\.-]+$" })

smarty function assign php -

i have function in smarty checks if row called "mikaphotos" empty. if row empty, it's ok , doesnt happen anything, , if it's not empty..it takes value in $path variable. assin is: $smarty->assign("mikaphotos", gettheimages("somepath",400), true); and gettheimages function is: gettheimages($path,$width){ $dirname = $path; //the path $images = glob($dirname."*.png");//get png images directory foreach($images $image) { echo '<img src="'.$dirname.'/'.$image.'" width="'.$width.'" /><br />';//echo images in somepath } } now in file.tpl .. put:{$mikaphotos} , it's not working. think there problem in code, not know how that. please? function assign in smarty assigns( ! ) value returned gettheimages function mikaphotos variable. so, gettheimages function should return string instead of echoing. example, like: gettheimages($path,$width){ $res

How to indent some text after a list item without regarding it as a list item in Google Docs? -

for example: 1. item1 indented item, not list (1) 2. item2 3. item3 indented item, blank line before , after (2) 4. item4, continue list how produce (1) , (2)? you can add additional rows using shift+enter, , indent them using shift+tab here example doc: https://goo.gl/ifqeep

ssh - Changing Vim Cursor in MobaXTerm -

i updated mobaxterm 7.7 mobaxterm 8.1 on windows machine ssh , x11 needs. since doing that, vim cursors have stopped changing when enter different modes (i.e. insert mode) -- cursor block cursor. additionally, noticed if change default terminal cursor setting in mobaxterm, console cursor remains block cursor regardless (a possible bug?). in past, added following lines .vimrc file address cursor shapes, since updating mobaxterm 8.1, no longer works. let &t_ti.="\e[1 q" let &t_si.="\e[3 q" let &t_ei.="\e[1 q" let &t_te.="\e[0 q" i'm curious causing this. after doing research, found following line in mobaxterm 8.0 changelog: improvement: embedded terminal based on plain putty engine if recall correctly, have limited ability change cursors within putty environment. mean can no longer change vim cursors while using mobaxterm? alternatively, there .vimrc command don't know about? bug or intended? thanks!

sql - How to select distinct rows with respect to only certain columns? -

i'm using select below. select a.bada, b.boom, ' ' '---', * ... there's bunch of joins along way , have data need but rows repeated respect bada , boom . not exact duplicates because values brought in star differ. however, not relevant case. the solution i'm applying listing interesting columns explicitly wonder of there's smooth way eliminate rows have bada , boom repeated (keeping 1 occurrence of such row). most databases support ansi standard window , ranking functions. such, can choose particular or arbitrary rows in set rows same values in columns: select t.* ( select t.bada, t.boom, row_number() on (partition bada, boom order bada) seqnum, t.*, table t) t seqnum = 1; this works first adding sequence number of each row over partition of original table. row number consecutive respect selected columns. once that's done, it's possible pick value of consecutive counter, e.g. 1. s

cygwin - byacc %defines syntax error when compiling with make command -

i trying run ymer tool in windows 10 platform. have installed g++, gcc, yacc via cygwin. after configure command, when running make command compile application, generates following error. ps c:\ymer> make /bin/sh ./ylwrap src/grammar.yy y.tab.c src/grammar.cc y.tab.h echo src/grammar.cc | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e s/c++$/h++/ -e s/c$/h/ y.output src/grammar.output -- byacc -d byacc: e - line 514 of "/cygdrive/c/ymer/src/grammar.yy", syntax error %defines ^ makefile:2467: recipe target 'src/grammar.cc' failed make: *** [src/grammar.cc] error 1 it seems grammar.yy file causes problem. knows how solve problem. btw not familiar neither yacc nor make files. new cygwin well. thank you, the %defines declaration bison-specific (not part of standard yacc). file grammar.yy contains bison features byacc implements, not 1 of those. (from description in manual page, seems equivalent standard command-line op

php - info doesn't get inserted to table -

my problem that, not insert info table, please read code , tell me problem thanks.also don't errors db. because thing won't stop bugging me telling more details,im going type survive lyric stops @ first afraid,i petrified,kept thinking never live,without side,but spent many nights,thinking how did me wrong,i grew strong,i learned how along this html: <div id="middle" class="col"> <br><br> <p class="text-center"><strong> فرم ثبت نام</strong></p> <br><p class="text-center"> اجباری<span><strong style="color:red">&nbsp *</strong></p><br> <form method="post" style="height:70vh; width:47vw; text-align:center;" action=""> <table width="75%"> <tr> <td align="right"><span class="error"><?php echo $usernameerr?>

Java Variable Length Parameter vs. Array, Simply Syntactic Sugar? -

i taking data structures , algorithms course fun @ local community college. course's textbook y. daniel liang's introduction java programming, 10th edition . book, itself, pretty solid. in dealing java.util.arrays , liang mentions java's "variable-length" parameter. writes (p. 265): java treats variable-length parameter array. can pass array or variable number of arguments variable-length parameter. when invoking method variable number of arguments, java creates array , passes arguments it. an example being: public static void (int... toes) { //... code } however, liang never explains origin or advantage of variable-length parameter. if, liang says, variable-length parameter "converted" array, advantage? there software design pattern or engineering goal facilitated variable length parameter? in other words, above code snippet offer not offered below: public static void (int[] toes) { // ... in java, varargs synta

windows - C# Read Multiple Tags in a string -

i want allow user can read more 1 tag in string. far, user add 1 tag if (rtb.text.contains("[b]")) { regex regex = new regex(@"\[b\](.*)\[/b\]"); var v = regex.match(rtb.text); string s = v.groups[1].tostring(); rtb.selectionstart = rtb.text.indexof("[b]"); rtb.selectionlength = s.length + 7; rtb.selectionfont = new font(rtb.font.fontfamily, rtb.font.size, fontstyle.bold); rtb.selectedtext = s; } else if (rtb.text.contains("[i]")) { regex regex = new regex(@"\[i\](.*)\[/i\]"); var v = regex.match(rtb.text); string s = v.groups[1].tostring(); rtb.selectionstart = rtb.text.indexof("[b]"); rtb.selectionlength = s.length + 7; rtb.selectionfont = new font(rtb.font.fontfamily, rtb.font.size, fontstyle.italic); rtb.selectedtext = s; } richtextbox1.select(richtextbox1.textlength, 0); richtextbox1.select

c# - XAML Designer Window won't load for "Universal Windows" app - even in new project -

i seem recall running before can't life of me recall how got around , no depth of googleing seems help. here's problem: when open vs2015 (community version) "universal windows" project, new or old, without changing single thing, exception in designer window. xaml code shows fine, designer window gives me "error 0x80070005: while processing request, system failed register windows.capability extension due following error: access denied." this followed wall of text i'll include below. i wonder if due having updated windows 10 (which forced because reason still wouldn't update without common work-around) , adding features vs installation required use universal apps. if open universal windows 8.1 project designer loads fine not universal windows project. worth noting, i'm amateur learning c#, simple seems bug in ide me... here's wall of text in case makes sense anyone. system.exception package not registered. err

c# - How to find all combinations of an List in sets of two? -

i've tried looking , didn't find i'm trying accomplish. lets have list<int> has around 50 numbers list<int> _mylist = new list<int>(); (int = 0; < 49; i++) { _mylist.add(i); } how list of combinations based on array two? for example result set like 1,1 1,2 1,3 1,4 1,5 and considered unique. possible 1,2 same 2,1 ? i'll assume source list called input : var output = new list<hashset<int>>(); (int = 0; < input.count; i++) (int j = + 1; j < input.count; j++) output.add(new hashset<int> { input[i], input[j] }); in case want output result console: foreach (var result in output) console.writeline(string.join(", ", result));

php - User login show element -

this question has answer here: php parse/syntax errors; , how solve them? 12 answers i'm wanting show element when logged in user. , when not logged in hidden. php parse error: syntax error, unexpected '<'. please on , upfront <?php if ($_session['usrname']) { <style type="text/css">#lah{ display:visible;} </style> } else { <style type="text/css">#lah{ display:none; }</style> } ?> you blending php html. need either echo html or drop out of php while entering html. try this: <?php if ($_session['usrname']) { ?> <style type="text/css">#lah <?php { ?> display:visible; </style> <?php } } else { ?> <style type="text/css">#lah <?php { ?> display:none; </style&g

sql server - Join using Table valued function -

this question has answer here: inner join table-valued function not working 4 answers how can join using table valued function mssql 2012 query below? select m1.id, m1.oid, m1.id2 dbo.match(484066) m1 inner join dbo.match(m1.id2) m2 on m1.id2 = m2.id inner join dbo.match(m2.id2) m3 on m2.id2 = m3.id , m1.id = m3.id2 select m1.id, m1.oid, m1.id2 dbo.match(484066) m1 cross apply dbo.match(m1.id2) m2 cross apply dbo.match(m2.id2) m3 is wanted?

NGINX Ajax - PHP 404 Error -

i have written simple ajax function communicates php web service. works fine in local (iis + php) , in production environment ajax call php file throws 404 error (not found) this seems ngnx config issue , pasting relevant nginx config server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /usr/share/nginx/html; # load configuration files default server block. include /etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } # pass php scripts fastcgi server listening on 127.0.0.1:9000 location ~ \.php$ { root /usr/share/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_n

php - sub-entity schema implementation -

Image
i want implement system of category , associated options in symfony 2. so category (example: car, home) have categoryoption (example: date, color, size, etc…). moreover, category entities have many 1 relationship advert entity. mean advert can have 1 category infinite advert can attached category. so, @ end, want able make dynamic form that: if select category (ex: caravanning), of attached subcategory appear that: and allow user select or enter desired information. i have implemented category , advert entity don’t know schema use options , how generate form. have create new categoryoption entity , make relationship advert , category or use way? of course, categoryoption attached advert can edited user.

c# - ExtendedWebBrowser. Use 32-bit version of your browser -

Image
i hoping can have input problem. did extendedwebbrowser using following article http://www.codeproject.com/articles/13598/extended-net-webbrowser-control going embedded inside windows application navigates url. error getting when navigate extendedwebbrowser. i can navigate internet explorer. input on how make extendedwebbrowser use 32 bit version instead of 64 thanks i think solution build application targeting 32 bit mode (x86 option). use 32 bit webbrowser.

xcode - how to get c++ man pages on os x? -

in ubuntu, after install libstdc++6-x.x-doc, docs available via man, example libstdc++-4.8-doc: man std::list man std::weak_ptr man std::ios_base is possible install man pages c++ (using brew or other means) on osx? reason requiring man pages can access them vim using shift-k . note: i'm using xcode version of g++: snowch$ g++ -v configured with: --prefix=/applications/xcode.app/contents/developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 apple llvm version 6.1.0 (clang-602.0.53) (based on llvm 3.6.0svn) target: x86_64-apple-darwin14.5.0 thread model: posix you can install man pages here . run following commands: $ git clone https://github.com/jeaye/stdman $ cd stdman $ ./configure $ make install # user appropriate permissions install

javascript - Find <style> tag by id or attribute -

i dynamically remove or disable <style> tag that looks this <style type="text/css" id="cssx/portal/simple-sidebar.css" designtr="cssx/portal/simple-sidebar.css"> #wrapper { padding-left: 0; -webkit-transition: 0.5s ease; -moz-transition: 0.5s ease; -o-transition: 0.5s ease; transition: 0.5s ease; } #wrapper.toggled { padding-left: 250px; } #sidebar-wrapper { z-index: 1000; position: fixed; left: 250px; width: 0; height: 100%; margin-left: -250px; overflow-y: auto; background: #000; -webkit-transition: 0.5s ease; -moz-transition: 0.5s ease; -o-transition: 0.5s ease; transition: 0.5s ease; } </style> if have id or own defined designtr property, can't seem disable or remove so: var id = 'x'; var designtr = 'x'; document.getelementbyid(id).disabled = true; //doesn't work, throws error saying element null

c# - XDocument duplicate namespace with different Local Name -

i have xml document looks this: <schema namespace="bbsf_model" alias="self" p1:usestrongspatialtypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:p1="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"> <entitytype name="customer"> <property name="id" type="guid" nullable="false" /> </entitytype> </schema> i used below code modify property element of document: xelement csdleentity = csdldoc.root.descendants() .where(d => d.name.localname == "entitytype") .firstordefault(e => e.attribute("name").value == "customer"); var csdlproperty = csdleentity.descendants() .where(d => d.name.localname == "property")

arrays - How to replace a line from another file MATLAB -

i have cell array this: m = [002] [a] [0] [0] [0] [381] [002] [b] [0] [0] [0] [166] [002] [c] [0] [0] [0] [136] [002] [d] [0] [0] [0] [880] [003] [e] [0] [0] [0] [839] [003] [f] [0] [0] [0] [156] [003] [g] [0] [0] [0] [789] [003] [h] [0] [0] [0] [676] [003] [i] [0] [0] [0] [778] [004] [j] [0] [0] [0] [787] and have input file contain: [x] [4] [3] [e] [839] [y] [7] [4] [f] [156] [z] [8] [1] [i] [778] i want third column second file ([e], [f], , [i]) indices find value in m , replace row in m (but didnt change first column of m), new matrix this: n = [002] [a] [0] [0] [0] [381] [002] [b] [0] [0] [0] [166] [002] [c] [0] [0] [0] [136] [002] [d] [0] [0] [0] [880] [003] [x] [4] [3] [e] [839] [003] [y] [7] [4] [f] [156] [003] [g] [0] [0] [0] [789] [003] [h] [0] [0] [0] [676] [003] [z] [8] [1] [i] [778] [004]

Debugging error 500 issues in Python EVE -

what best way debug error 500 issues in python eve on resources? i'm having problem patch method in 1 of item end points. there options more verbose error or catching exceptions proper info before error 500. my database mongodb , i'm using cerberus styled schema. if switch debug mode on exception message within body of response. set debug = true in settings, or run application this: from eve import eve app = eve() app.run(debug=true) furthermore, if want dig in, clone repository , install ( pip install -e <path repo> . can set own breakpoints directly in source code.

html5 - What is the Javascript Equivalent of A User Clicking on the Input Type File Button? -

what need programmatically hook file select dialog created when user clicks on button input type file, without user clicking on button. javascript test if file exists, , handle needed: read it, copy it, etc. try utilizing onchange event access file object if user selects file ; js cannot select user file . var input = document.queryselector("[type=file]"); input.onchange = function() { console.log(this.files) } <input type="file" />

Javascript Cross domain JSON -

hi trying use javascript , html read json object url. using following code: function getjsonp(url, success) { var ud = '_' + +new date, script = document.createelement('script'), head = document.getelementsbytagname('head')[0] || document.documentelement; window[ud] = function(data) { head.removechild(script); success && success(data); }; script.src = url.replace('callback=?', 'callback=' + ud); head.appendchild(script); } getjsonp('http://weburl?&callback=?', function(data){ console.log(data); }); as have guessed getting not @ same origin document, , parent of track element not have 'crossorigin' attribute. origin 'null' therefore not allowed access. fyi server returns json data , doesnot have callback function. cheers help. the server either needs have cors enabled using headers this: (credits answer here: cors php

filemaker - Custom Function - Calculate date of first date of next quarter -

i trying create custom function of given date in filemaker, determine if week of fiscal year number within first week of quarter else calculate first date next quarter. our fiscal year starts on july 1 so defined requirements our fy starts on july 1 , qtrs on week # 1, 14, 27, 40 our weeks go 1-52 , week starts on tuesday (defined day 3). if fy starts on monday first week mon-tues (therefore shortweek) week 2 full 7 day week. example---> if have date 09/09/2011 week 11 in q1, therefore since not first week of quarter following date next qtr wk 14 first date of 9/27/2011. evaluation needs determine whether given date within first week of qtr (weeks 1, 14, 27, 40) or provide first week of next qtr. also here initial cf working brian dunnings site. https://www.briandunning.com/cf/147 i know developed in filemaker there maybe developed in language may apply... thanks in advance try starting point: let ( [ startfy = date ( 7 ; 1 ; year ( datefield ) - ( month

swift - What am I doing wrong with NSDateComponentsFormatter? -

i found out new-to-ios8 class nsdatecomponentsformatter, lets format time intervals rather dates. cool. i've written code more times care think about. decided try , use in playground, can't work. here's (swift) code: var componentsformatter = nsdatecomponentsformatter() componentsformatter.allowedunits = .calendarunithour | .calendarunitminute | .calendarunitsecond componentsformatter.unitsstyle = .positional let interval: nstimeinterval = 345.7 let intervalstring = componentsformatter.stringfromtimeinterval(interval) println("interval string = \(intervalstring)") this displays interval string = nil i've tried various things, no joy. have working example using new class, or can spot i'm missing? (i speak objective-c too, if have sample code in objective-c works well.) swift 3.1 • xcode 8.3.2 extension formatter { static let datecomponents: datecomponentsformatter = { let formatter = datecomponentsformatte

c - Binary tree, cannot free memory -

i've made binary tree (bst) , works fine, can't free allocated memory. nodes made of pointers (left, right, parent) , data, first name, name , phone number. first name , name static char arrays, , phone number of int , it's key tree. use function free memory: void freeyourtree(node* x) { if (!x) return; freeyourtree(x->left); freeyourtree(x->right); free(x); x = null; } but when use function , show tree inorder still shows records trash chars instead of first name. can't find what's wrong that. give insert function: void insert(node** root) { node* x = (node*) malloc(sizeof(node)); if (x == null) { printf("malloc error"); return; } printf("put first name: "); scanf("%s", x->f_name); printf("put name: "); scanf("%s", x->s_name); printf("put number: "); scanf("%ld", &(x->number)); x-&

javascript - this.state.foo is different in _onChange and different in render()? -

in _onchange method, wait change in this.state.name . on change _updatearticle method called: _onchange() { var team = this.getteamstate(); this.setstate({name: team}); console.log(this.state.name); //"boston celtics" //this should have changed didn't this.unbind("articles"); this._updatearticle(); }, then in _updatearticle new reference created using new state. _updatearticle(team) { var teamref = new firebase(this.props.baseurl + team + "/results"); console.log(this.state.team); // "boston celtics" //this should have been new not this.bindasarray(teamref, 'articles'); }, in render method check state put console.log check. in render , this.state.name has been updated properly. question why this.state different outside of render function? . as per api docs : setstate() not mutate this.state creates pending state transition. acce

Strange uwsgi mountpoint for my django site with nginx -

i hit strange issue site(nginx1.7+uwsgi2.0+django1.6). today see there strange log entries in uwsgi logs. snippet here: mon aug 31 10:43:17 2015 - wsgi app 1 (mountpoint='zc.qq.com|') ready in 0 seconds on interpreter 0xf627c0 pid: 18360 zc.qq.com {address space usage: 421933056 bytes/402mb} {rss usage: 102522880 bytes/97mb} [pid: 18360|app: 1|req: 1/7] 61.132.52.107 () {42 vars in 684 bytes} [mon aug 31 10:43:17 2015] /cgi-bin/common/attr?id=260714&r=0.6131902049963026 => generated 0 bytes in 6113 msecs (http/1.1 301) 4 headers in 210 bytes (2 switches on core 0) zc.qq.com {address space usage: 421933056 bytes/402mb} {rss usage: 102522880 bytes/97mb} [pid: 18360|app: 1|req: 2/8] 61.132.52.105 () {44 vars in 986 bytes} [mon aug 31 10:43:29 2015] /cgi-bin/common/attr?id=260714&r=0.1676001222494321 => generated 0 bytes in 3 msecs (http/1.1 301) 4 headers in 210 bytes (2 switches on core 0) actually, zc.qq.com nothing site. so, how guy comes server? sits

elixir - Strange behavior with String.to_integer/1 -

i have strange in elixir string.to_integer . nothing major, know if there's way chain functions pipe operator. here problem. line of code (you can try in "iex"): [5, 6, 7, 3] |> enum.reverse |> enum.map_join "", &(integer.to_string(&1)) returns string "3765" what want integer. have add little piece of code |> string.to_integer @ end previous statement , should have integer. let's try. piece of code: [5, 6, 7, 3] |> enum.reverse |> enum.map_join "", &(integer.to_string(&1)) |> string.to_integer gives me this: "3765" . not integer, string! if though: a = [5, 6, 7, 3] |> enum.reverse |> enum.map_join "", &(integer.to_string(&1)) string.to_integer(a) it returns me integer: 3765 . it's i'm doing right makes me mad because love chain these function way amazing pipe operator. thanks or lights. elixir fun! you need add parenthes

matlab - Create workspace variables from table -

essentially opposite of create table workspace variables . i.e. table containing var1, var2, ... , assign var1, var2 base environment, or if called within function, assign these variables calling environment. for example: load patients patients = table(age,gender,height,weight,smoker,... 'rownames',lastname); patients has 5 variables, assign them workspace. e.g. age = patients.age , gender = patients.gender ... there way without manually typing everything? the example given in documentation think should you're looking for. completeness, i'll create table can verified: create table: load patients patients = table(age,gender,height,weight,smoker,... 'rownames',lastname); extract data table , assign variable a : a = patients{1:5,{'height','weight'}}; a 5x2 array of height , weight of patients 1-5, can seen from: whos a; hope helps!

How to use sbt to specify dependsOn other module with different scala version? -

i have multiple module projects in scala. module a, b, c. b --dependson--> , c --dependson--> too. module && c compiled scala 2.11 while module b has compiled scala 2.10 since there dependency library scala 2.10. how use sbt specify module b dependson module a? it won't work. period. either switch , c compile scala 2.10 well, or if source of 2.10-only library available, update 2.11.

javascript - correct usage of sinon's fake XMLHttpRequest -

i creating xmlhttprequest javascript module json data server. here code: (function() { var makerequest = function(url,callback,opt) { var xhr; if (xmlhttprequest) { // mozilla, safari, ... xhr = new xmlhttprequest(); } else if (activexobject) { // ie try { xhr = new activexobject("msxml2.xmlhttp"); } catch (e) { try { xhr = new activexobject("microsoft.xmlhttp"); } catch (e) {} } } if (!xhr) { callback.call(this, 'giving :( cannot create xmlhttp instance', null); return false; } xhr.onreadystatechange = function() { if (xhr.readystate === 4) { if (xhr.status === 200) { var data = xhr.responsetext; if(opt && !opt.raw) { try { data = json.parse(data); } catch (e) { callback.call(this, e,null); return; }

jQuery UI, HTML in autocomplete -

i'm trying exact same thing in: http://dev.nemikor.com/jquery-ui-extensions/autocomplete/html.html but it's not working, label , value showed in autocomplete, ie when i'm inputting "a": "aardvark", "< b>apple" , "< i>atom" displayed in box below input. my html is: <form> <input type="text" id="recherche" /> </form> my jquery is: $('#recherche').autocomplete({ source: [ { label: "aardvark", value: "aardvark" }, { label: "<b>apple</b>", value: "apple" }, { label: "<i>atom</i>", value: "atom" } ], html: true }); and i'm using jquery ui 1.11.4 it seems you've miss

netbeans - What are "Java EE 7 API Library" and "Java EE Web 7 API Library" and when to use them? -

i have full-fledged java ee project running on glassfish 4.1 / java ee 7 (netbeans 8.0.2) not using apache maven. depending upon project functionality, cdi dependency has added both projects/modules namely ee module , web module (and class library, if any). i have been confusing long time seeing people recommending add either "java ee 7 api library" or "java ee web 7 api library" compile-time class-path cdi dependency (these libraries bundled in netbeans , readily available out of box, when using netbeans). since these libraries contain collection of apis possibly entire java ee stack starting servlet api, adding 1 of these libraries compile-time class-path (especially in ee project) not make sense, when cdi functionality needed in java ee applications. why suggested many times in netbeans projects add 1 of these libraries, when cdi-api.jar cdi dependency sufficient? i not find canonical answer on site nor somewhere else library added in netbeans proj

rust - What's the difference between `self` and `Self`? -

i haven't come across self in documentation, in source code. documentation uses self . self when used first method argument, shorthand self: self – there &self equals self: &self , &mut self equals self: &mut self . self in method arguments syntactic sugar receiving type of method (i.e. type impl method in. allows generic types without repetition.

class "fa" for font Awesome -

i'm using latest version of font awesome , clear icons have own classes. question why class "fa" should include (e.g. class="fa fa-wifi"). fa common class giving style every icon font, font-size , font-weight , font-style etc.

node.js - How response.end and response.send differs? -

hi trying build simple application using express js. new node , express js. can explain difference in response.end , response.send i tried command , both sent request(message) server. res.send('send message'); res.end('send message'); res.send() method built express , , make automatically assume content-type of html . res.end() , on other hand, uses underlying end() implementation built nodejs on response stream (aka. not express), doesn't attempt assume content-type .

c# - Asp .Net Core 2 + SignalR (1.0.0-alpha2-27025) + /signalr/negotiate 404 Error -

i add signalr asp .net core 2 app packages "microsoft.aspnetcore.all" version="2.0.0" "microsoft.aspnetcore.signalr" version="1.0.0-alpha2-27025" "microsoft.aspnetcore.signalr.client" version="1.0.0-alpha2-27025" "microsoft.aspnetcore.signalr.client.core" version="1.0.0-alpha2-27025" "microsoft.aspnetcore.signalr.common" version="1.0.0-alpha2-27025" "microsoft.aspnetcore.signalr.core" version="1.0.0-alpha2-27025" public iserviceprovider configureservices(iservicecollection services) { services.addsignalrcore(); services.addsignalr(); } and public void configure(iapplicationbuilder app, ihostingenvironment env, iloggerfactory loggerfactory, iserviceprovider serviceprovider) app.usesignalr(routes => { routes.maphub<managehub>("managehub"); }); } url:port/signalr , url:port/signalr/negotiate... return

Menu item call twice in fragment android -

in fragment when click on menu item , calls function twice 1 previous fragment , other 1 existing fragment. fragment 1: @override public void onactivitycreated(bundle savedinstancestate) { super.onactivitycreated(savedinstancestate); sethasoptionsmenu(true); } @override public boolean onoptionsitemselected(menuitem item) { if(item.getitemid() == r.id.refresh){ retrycallmap(); return true; }else return false; } fragment 2: @override public void onactivitycreated(bundle savedinstancestate) { super.onactivitycreated(savedinstancestate); sethasoptionsmenu(true); } @override public boolean onoptionsitemselected(menuitem item) { if(item.getitemid() == r.id.refresh){ retrycall(); return true; }else return false; } main

How can I add silencable logging to my sbt Scala project? -

i'm new @ logging , i've got println debugging able silence. i tried scala logging logback ( runnable example ), i'm surprised can't silence new logger changing sbt log level, e.g. > warn . can sbt control logger's log levels? or should trying use sbt's logger instead? logback has own configuration file control logging in application. need "logback.xml" in src/main/resources folder configure. below simple example, control log @ levels , below case not print out debug level logs. in addtion, can set complexed loggings such file based logging , more. see http://logback.qos.ch/manual/configuration.html detail <configuration> <appender name="console" class="ch.qos.logback.core.consoleappender"> <encoder> <pattern>%d{yyyy-mm-dd hh:mm:ss.sss}: %msg%n</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="co