Posts

Showing posts from February, 2014

Compatibility issue with jquery ui.autocomplete -

i using jquery ui.autocomplete . working fine in ie 11. however, having compatibility issues when run project in mozilla(latest) or chrome(latest). have 2 problems this. how resolve compatibility issue and what best way handle these compatibility issues? different browsers have different compatibility issues , if make project compatible particular browser, still non-compatible in another. is not there way make project compatible in browser? now, code used try , achieve auto-complete feature provided below: $(function () { $.extend($.ui.autocomplete.prototype, { _rendermenu: function (ul, items) { $(ul).unbind("scroll"); var self = this; self._scrollmenu(ul, items); }, _scrollmenu: function (ul, items) { var self = this; var maxshow = 10; var results = []; var pages = math.ceil(items.length / maxshow); results = items.slice(0, maxshow); if (pages > 1) { $(ul).scro

android - How to finish activity from other activity -

im looking way finish first activity other first activity it's splashscreen. want show him while second activity building../downloading datas , interface, , in asynctask second activity want finish first activity. dont need simple way delay. it's possible ? try android:nohistory="true" in splash screen, can set in manifest file. like this: <activity android:name=".package.splashscreen" android:nohistory="true" ... </activity> see more here .

python - How to test custom Django forms clean/save methods? -

most of time have change/extend default form save/clean methods. i'm not sure how test custom save/clean methods. most of time tests like: response = self.client.post(reverse('example:view_name'), kwargs={'example, self.example'}) self.assertequal(200, response.status_code) self.asserttemplateused('example.html', response) using self.client.post django's testcase class, capture response isn't enough , doesn't cover/test custom save , clean. what's practice of testing forms? in opinion did above wrong, since it's more of integration test goes through view form. create form directly in tests, , call is_valid method ( clean called is_valid ); check whether validate correctly. same save method. for example: from django.contrib.auth.forms import (usercreationform, ...) ... class usercreationformtest(testcase): def test_user_already_exists(self): data = { 'username': 'testclien

mediawiki - How to add an invisible entry to a Wiki TOC? -

i add entry table of contents of wiki page links arbitrary point inside article. in use case, want link multiple 'header rows' inside long table. tried both <h4 style="display: none;">my invisible toc entry</h4> as as <div style="display: none;">my invisible toc entry</h4> however, seems element not rendered @ all. how add such invisible entry? i'll reply use case directly: «i want link multiple 'header rows' inside long table». i recommend use normal headers in such cases. able section editing of sub-table (or row) without breaking general table. example of sections reuse existing cells/headers feature map on mediawiki.org . alternatively, have invisible anchors, can add <span id=linkme></span> or similar, done via {{anchor}} template. middle ways, i.e. anchors sections , display in toc, hacked , made inservible viewing , section editing, don't "solutions" me.

java - the value of local variable is not used -

this question has answer here: java error “value of local variable not used” 7 answers i wrote small program check given movie name exist in folder. getting warning on eclipse "the value of local variable not used" here main method public static void main(string[] args) { // todo auto-generated method stub boolean movie_exist=false; system.out.println("hellow world!"); try{ filewriting newfolrder = new filewriting("h:\\breakinbad2\\breaking bad season 2 complete 720p.brrip.sujaidr"); //movie_exist=newfolrder.checkfilesname("movie name"); system.out.println(newfolrder.checkmovieexist("breaking bad")); movie_exist = newfolrder.checkmovieexist("breaking bad"); }catch(nullpointerexception e){ system.out.println("exce

html - CSS Hover Caption Issue -

i have site background seperated 4 divs each take 25% of page the goal have overlay fade in when hovered on (which applied first image - #nw) the problem cannot text class .caption show up the code below: css .overlaytext {font-family: 'raleway', sans-serif;} body { height:100%; margin:0; padding:0; } div.bg { position:fixed; width:50%; height:50% } #nw { top:0; left:0; background-image: url('clevelandnight.jpg'); background-size:cover;} #ne { top:0; left:50%; background-image: url('news1.jpg'); background-size:cover;} #sw { top:50%; left:0; background-image: url('drinks1.jpg'); background-size:cover;} #se { top:50%; left:50%; background-image: url('clevelandday.jpg'); background-size:cover;} .overlay { background:rgba(0,0,0,.75); opacity:0; height:100%; -webkit-transition: .4s ease-out; -moz-transition: .4s ease-out; -o-transition: .4s ease-out; -ms-transition: .4s ease-out; transition: .4s ease-out

multiprocessing - Fastest way to extract tar files using Python -

i have extract hundreds of tar.bz files each size of 5gb. tried following code: import tarfile multiprocessing import pool files = glob.glob('d:\\*.tar.bz') ##all files in d f in files: tar = tarfile.open (f, 'r:bz2') pool = pool(processes=5) pool.map(tar.extractall('e:\\') ###i want extract them in e tar.close() but code has type error: typeerror: map() takes @ least 3 arguments (2 given) how can solve it? further ideas accelerate extracting? you need change pool.map(tar.extractall('e:\\') pool.map(tar.extractall(),"list_of_all_files") note map() takes 2 argument first function , second iterable , , apply function every item of iterable , return list of results. edit : need pass tarinfo object other process : def test_multiproc(): files = glob.glob('d:\\*.tar.bz2') pool = pool(processes=5) result = pool.map(read_files, files) def read_files(name): t = tarfile.open (name, '

Does YAML::Node have a Mark structure? -

i know during parsing, yaml-cpp can throw exception has nice file location (line , column number) information exception occurred. how post-parse? there mechanism determine (first) line number of yaml file associated given node? starting 0.5.3 yaml::node has property mark() information line number etc.

php shorthand return statement -

so looking examples of validating unix timestamp. 1 code chunk kept reappearing this: function isvalidtimestamp($strtimestamp) { return ((string) (int) $strtimestamp === $strtimestamp) && ($strtimestamp <= php_int_max) && ($strtimestamp >= ~php_int_max); } now have looked shorthand return if statements think might not having luck. can explain me how function deciding return , how. thanks the result of boolean operations (like &&, || or ==) boolean, result of numeric operations (like + , *) number. return 2 + 3 yield 5, return true && false return false. now, operations can, of course, nested. example, return (2 + 3) * (3 + 3) still valid expression , yields 30. in same manner, return ($a === $b) && ($a => $c) yield boolean value.

function - LISP, cond returning nil everytime -

why return nil when adding lst??? please help! thank you! cl-user 1 : 1 > (defun constants-aux (form lst) (cond ((null form) lst) ((eq (car form) 'implies) (constants-aux (cdr form) lst)) ((eq (car form) 'not) (constants-aux (cdr form) lst)) ((eq (car form) 'and) (constants-aux (cdr form) lst)) ((eq (car form) 'or) (constants-aux (cdr form) lst)) ((atom (car form)) (print (car form)) (cons (car form) (list lst)) (delete-duplicates lst) (constants-aux (cdr form) lst)) (t (constants-aux (car form) lst) (constants-aux (cdr form) lst)))) constants-aux cl-user 2 : 1 > (defun constants (form) (constants-aux form nil)) constants cl-user 3 : 1 > constants '(implies (not q) (implies q p)) q q p nil you doing wrong in many ways. 1. - why create -aux function, wh

multithreading - shared tcp socket android service -

in android application define service communicate server. question : can use same tcp socket in 2 thread's receiving , sending data simultaniosly ? thanks. two threads can use same socket 1 thread reading socket , other writing. if try read , write both threads have conflicts.

Swift Array - Check if an index exists -

in swift, there way check if index exists in array without fatal error being thrown? i hoping this: let arr: [string] = ["foo", "bar"] let str: string? = arr[1] if let str2 = arr[2] string? { // wouldn't run println(str2) } else { // run } but get fatal error: array index out of range an elegant way in swift: let isindexvalid = array.indices.contains(index)

git - How to use the new CredentialsProvider in LibGit2Sharp? -

i using libgit2sharp.credentials class time @ following way: libgit2sharp.credentials credentials = new usernamepasswordcredentials() { username = tokenvalue, password = "" }; var pushoptions = new pushoptions() { credentials = credentials} ; now libgit2sharp.pushoptions.credentials obsolate, have use credentialsprovider. i want ask correct way use credentialsprovider in case? thank much! >i want ask correct way work credentialsprovider @ case? this piece of code should fit need. var pushoptions = new pushoptions() { credentialsprovider = (_url, _user, _cred) => new usernamepasswordcredentials { username = tokenvalue, password = "" } } this has been introduced pr #761 in order allow more interactive scenarios (when user being asked credentials part of clone process, instance) , prepare path other kinds of credentials (ssh, instance). the credentialsprovider callback which passes in

c# - Adding Cancel button to RadFileExplorer Upload window -

i'm using radfile explorer. i'm trying add cancel button close upload window of radfileexplorer. want add button next upload button. how do that? the following threads show how customize dialogs: http://www.telerik.com/forums/custom-upload-file-fields http://www.telerik.com/forums/upload-dialog here example reference opened dialog (which, when custom button added upload dialog): var explorer = $find("<%=fileexplorer1.clientid%>"); var wndmanager = explorer.get_windowmanager(); //get reference radfileexplorer's window manager var wnd = wndmanager.getactivewindow();//get reference upload dialog's window wnd.close();

python - How to convert from multidimensional data nc file data to three column format -

does can me, read data .nc (netcdf) file in matlab r2013b. , kind of variable variables: time size: 1x1 dimensions: time datatype: double attributes: units = 'hours since 0001-01-01 01:00:00.0' calendar = 'gregorian' latitude size: 801x1 dimensions: latitude datatype: single attributes: units = 'degrees_north' longitude size: 1501x1 dimensions: longitude datatype: single attributes: units = 'degrees_east' den size: 1501x801x1 dimensions: longitude,latitude,time datatype: single attributes: least_significant_digit = 1 long_name = 'density'

Highcharts context menu causes chart to disappear on return from print screen only on Chrome -

we using highcharts 4.0.4 , php server side script. there multiple charts on page , each chart has context menu print/save options. the context menu works fine, when control returns print screen page, respective chart either corrupted in size or disappears altogether. strangely bad behavior observed on chrome not ie. a fiddle demonstrating behavior. code along fiddle any or guidance on how tackle problem appreciated. defaulty in highcharts elements hidden apart of current chart. can wrap exporting function , dismiss part of code. (function (h) { h.wrap(h.chart.prototype, 'print', function (proceed) { var chart = this, container = chart.container, origdisplay = [], win = window, origparent = container.parentnode, body = document.body, childnodes = body.childnodes; if (chart.isprinting) { // block button while in printing mode return; }

java - Routine (get_data_type) can not be resolved -

i've updated informix jdbc driver on application (from 3.0 v4.10.jc4de) , following error occurred, when trying connect informix 9. java.sql.sqlexception: routine (get_data_type) can not resolved. @ com.informix.jdbc.ifxsqli.a(ifxsqli.java:3130) @ com.informix.jdbc.ifxsqli.d(ifxsqli.java:3412) @ com.informix.jdbc.ifxsqli.dispatchmsg(ifxsqli.java:2325) @ com.informix.jdbc.ifxsqli.receivemessage(ifxsqli.java:2250) @ com.informix.jdbc.ifxsqli.executestatementquery(ifxsqli.java:1485) @ com.informix.jdbc.ifxsqli.executestatementquery(ifxsqli.java:1465) @ com.informix.jdbc.ifxresultset.a(ifxresultset.java:211) @ com.informix.jdbc.ifxstatement.executequeryimpl(ifxstatement.java:1064) @ com.informix.jdbc.ifxstatement.executequery(ifxstatement.java:236) @ com.informix.jdbc.ifxdatabasemetadata.getcolumns(ifxdatabasemetadata.java:3549) @ com.mchange.v2.c3p0.impl.newproxydatabasemetadata.getcolumns(newproxydatabasemetadata.java:3968) @ org.

Android drawerlayoyt sliding options -

the default sliding menu transition slide on main view. are other options menu transition? moving main view swipe? or other option? thanks, ilan from: http://developer.android.com/training/implementing-navigation/nav-drawer.html , can set listener on drawer: mdrawerlayout.setdrawerlistener((drawerlayout.drawerlistener) listener); the listener implementation defined here: http://developer.android.com/reference/android/support/v4/widget/drawerlayout.drawerlistener.html you can implement drawerlistener.ondrawerslide(view drawerview, float slideoffset) and use slideoffset in order animate other views, moving main view in relation slide offset.

android - Using curl_multi_exec with gcm push notifications and PHP -

i have app configured send push notification via google/gcm. working fine, there 1000 limit per push notification. currently, have loop registration id's separate messages , send them in batches. question is, not familiar curl. how can utilize curl_mutli_exec speed push notifications , messages users less of delay. here current way have set up. need utilize curl_mutli_exec? thanks! $file = fopen("/gcmusers.key", "r") or exit("unable open file!"); //output line of file until end reached $pcount = 0; $registrationids = array(); while(!feof($file)) { $pid = fgets($file); $pcount = $pcount + 1; if ($pid <> '') { array_push($registrationids,$pid); } if ($pcount == 990) { // message sent $apikey = "myapikey"; $u

php - regex start and close characters (preg_replace) -

i have both googled , searched site before posting here, can't seem understand start , close regex characters within following code segment. $url = preg_replace('|[^...]|i', '', $url) i familiar '/.../i' , '|...|i' mean ? in advance. ps - first question on forum, please forgiving. '|...|i' same '/.../i' , difference , don't have escape / inside '|...|i' , have escape | . a delimiter can non-alphanumeric, non-backslash, non-whitespace character. see doc>

c - How to limit the amount of characters entered -

so, i'm working on simple password program. i've got code far /* simple password prog */ #include<stdio.h> #include<string.h> int main(){ char usrin[9]; char password[]={"axcd8002"}; { fprintf(stdout,"\n password:"); fgets(usrin,9, stdin); if ( strcmp(usrin,password)<0 || strcmp(usrin,password )>0 ) { fprintf(stdout,"\n password incorrect"); }; }while( (strcmp(password,usrin))!=0 ); fprintf(stdout, "\n password correct \n"); return 0; } this code works correctly, if password incorrect, loop keep going, if it's correct - loop break. doesn't work this: if user enters password @ least 1 character longer, program still correct. instance, if user enters axcd8002aaa, fgets read axcd8002 , , ignore aaa. how can prevent happening? usrin has 9 characters, of course characters ignored. give usrin enough space: char usrin[100]; and

iphone - Big difference on file size between iOS picture on the local and on server -

there image url http://example.com/xxoo.jpg open url chrome, save image desktop check image file size. open url iphone safari, save image camera roll, send computer check image file size. save image in ios app using uiimagewritetosavedphotosalbum , , send computer check image file size. strangely, these files different each other. difference can hundreds of kb. i had tried download image using afnetworking setimagewithurl , sdimageview setimagewithurl , sdimagedownloader downloadimagewithurl , datawithcontentsofurl . these downloads same size different size on server. there example code: [[sdwebimagedownloader shareddownloader] downloadimagewithurl:imageurl options:0 progress:^(nsinteger receivedsize, nsinteger expectedsize) { } completed:^(uiimage *image, nsdata *data, nserror *error, bool finished) { _imagetobedownload = image; uiimagewritetosavedphotosalbum(image, nil, nil, nil); }]; these possible reasons: the camera roll

ajax - Assigning JSON value to a Variable that Resides Outside JavaScript Function -

i have question regarding json web services , ajax function. have declared javascript function below. function setjsonser(){ formdata = { 'email': 'clientlink@russell.com', 'password': 'russell1234', 'url': getvaria() }; $.ajax({ url: "/apiwebservice.asmx/analyticsdatashowwithpost", type: 'post', data: formdata, complete: function(data) { alert("this set json in "+json.stringify(data)); } }); $.ajax({ url: "/apiwebservice.asmx/analyticsdatashowwithpost", type: 'get', data: formdata, complete: function(data) { alert("this json out "+json.stringify(data)); } });

angularjs - Convert $http request to Restangular -

i'm trying use angular-ui bootstrap typeahead search names remote server. input search field implemented follows. <input type="text" ng-model="selectedname" typeahead="name name in search($viewvalue)" class="form-control"> and equivalent controller code follows. $scope.search = function (term) { return $http({ method: 'get', url: 'names/search.json', params: { q: term } }).then(function (response) { var names = []; (var = 0; < response.data.length; i++) { names.push(response.data[i]); } return names; }); }; currently, working fine using $http i'm trying use restangular server communication. i've tried changing above controlle

c# - The provider did not return a ProviderManifest instance -

when want configure datasource (entitydatasource1) , assign connectionstring generated automatically entity data model it. error: "the metadata specified in connection string not loaded. consider rebuilding web project build assemblies may contain metadata. following error(s) occurred: provider did not return providermanifest instance". i read many suggestions http://blogs.teamb.com/craigstuntz/2010/08/13/38628/ suggest replace * assembly-name in connection string. example : <connectionstrings> <add name="myentities" connectionstring="metadata= res://*/model.csdl| res://*/model.ssdl| res://*/model.msl;provider= <!-- ... --> replace with <connectionstrings> <add name="myentities" connectionstring="metadata= res://simple mvc.data.dll/model.csdl| res://simple mvc.data.dll/model.ssdl| res://simple mvc.data.dll/model.msl;provider= &l

.htaccess - php project in ubuntu. Correct paths but forbidden access -

i'm trying run windows7 php project in ubuntu 12.04. give correct paths saw web console css file , other files aren't used. errors web console shows following: get http://192.168.1.3/webserver/css/mycssfile.css [http/1.1 403 forbidden 0ms] http://192.168.1.3/webserver/css/search.css [http/1.1 403 forbidden 0ms] http://192.168.1.3/webserver/css/button.css [http/1.1 403 forbidden 0ms] http://192.168.1.3/webserver/css/button2.css [http/1.1 403 forbidden 0ms] http://192.168.1.3/webserver/js/resolutionfinder.js [http/1.1 403 forbidden 0ms] http://192.168.1.3/webserver/js/changeinputvalue.js [http/1.1 403 forbidden 0ms] http://192.168.1.3/webserver/js/ajaxcalls.js [http/1.1 403 forbidden 0ms] http://192.168.1.3/webserver/js/ajaxcalls.js [http/1.1 403 forbidden 0ms] http://192.168.1.3/webserver/images/logo.jpg [http/1.1 403 forbidden 0ms] someone told me have check .htaccess file make sure allow access css,js , images subdirectories i'm new in ubuntu , i'm bit confused

redirect - creating a <a href> element once an unexpected delay in PHP header redirection occurs? -

i have page form in post method, in user posts z value, following php page process it, , redirect user accordingly: <?php { if(isset($_post['z'])){ switch ($_post['z']) { case "a": $url = "http://www.a.com"; break; case "b": $url = "http://www.b.com"; break; default: $url = "http://www.default.com/"; } } header( "refresh:0;url=$url" ); } ?> <!doctype html> <html> <head> <style> .wrap{ margin-top: 25%; } </style> </head> <body> <div class="wrap"> being redirected. </div> </body> </html> usually seems work ok, today have received complaint visitor said message "you being redirected." kept showing , never redirected. i saw on server logs tried several times (say him posting form @ least 3 times). what have caused issue? (the code in form h

log4j - java Apache L4J - logging to file known only during the runtime -

is there simple way achieve described in topic? i know normally, l4j.properties contains information file, store informations. catch have file during runtime, need set file in kind of dynamic way , append new logs it? any ideas? you this: string logfile = ...// log4j.xml absolute path domconfigurator.configure(logfile); logger log = logger.getrootlogger(); string fileappendername = ... fileappender fa = (fileappender)log.getappender(fileappendername); fa.setfile(yourlogfile)

oracle - Regex: Detect any substring of the alphabet? -

first step with "the alphabet" defined abcdefghijklmnopqrstuvwxyz , want find substring of alphabet. need build more here, first challenge. end-goal given pattern of characters (a-z) no repetitions , no whitespace , incrementing characters (abde, never abed), replace missing characters in alphabet single space within oracle statement. so, column of row might read abcdeghijklmnopqtuvwxyz (f , rs missing) , needs read abcde ghijklmnopq tuvwxyz . is possible? david for single value can use 2 connect-by clauses; 1 generate 26 values, other split original string individual characters. since ascii codes consecutive, ascii() function can used generate number 1-26 each of characters present. left-join 2 lists: var str varchar2(26); exec :str := 'abcdfgz'; alphabet ( select level pos dual connect level <= 26 ), chars ( select substr(:str, level, 1) character, ascii(substr(:str, level, 1)) - 64 pos dual connect level <= length(

php - Get index for multi-dimensional array -

i need index of multidimensional , output variable. know simple struggling it. for example given following: [1]=> array(11) { ["field_label"]=> string(24) "what first name?" ["field_name"]=> string(6) "f_name" ["identifier"]=> bool(true) ["options"]=> bool(false) ["form_name"]=> string(12) "demographics" } [2]=> array(11) { ["field_label"]=> string(23) "what last name?" ["field_name"]=> string(6) "l_name" ["identifier"]=> bool(true) ["options"]=> bool(false) ["form_name"]=> string(12) "demographics" } [3]=> array(11) { ["field_label"]=> string(32) "researcher took measurements" ["field_name"]=> string(17) "weight_researcher" [&

html - Set width of fixed positioned div relative to his parent having max-width -

is there solution without js? html <div class="wrapper"> <div class="fix"></div> </div> css .wrapper { max-width: 500px; border: 1px solid red; height: 5500px; position: relative; } .fix { width: inherit; height: 20px; position:fixed; background: black; } i cant add other styles .wrapper except width: 100%; . try width: inherit doesn't work me because of have parent div max-width. source here jsfiddle demo a position:fixed element not relative parent anymore. respects viewport's boudaries. mdn definition : fixed not leave space element. instead, position @ specified position relative screen's viewport , don't move when scrolled. so width , max-width , or whatever property not respected fixed element. edit in fact, won't inherit width because there's no width property defined on wrapper.. so, try setting child width: 100% , inherit max-width : http://jsfiddle.net/m

java - Override previous application -

i having issue application, when send apk way him install application uninstalling previous one. installating other application on similar 1 works fine, one. critical because lets there update application, not want user have uninstall previous version before being able install new one, , should override automatically. below manifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.dooba.beta" android:versioncode="1" android:versionname="1.0" > <!-- card.io card scanning --> <uses-permission android:name="android.permission.camera" /> <uses-permission android:name="android.permission.vibrate" /> <uses-feature android:name="android.hardware.camera" android:required="false" /> <uses-feature android:name="android.hardware.camera

VisualBasic Make and Model ComboBox -

my goal have program able tell make selected , offer list of models based on that. however, when click combobox, execute program, , select make, not getting selections in model combobox. can me this? here source code: option explicit on option strict on public class form1 private sub buttonexit_click(sender object, e eventargs) handles buttonexit.click close() end sub private sub form1_load(sender object, e eventargs) handles mybase.load 'initialize text property of 3 combo boxes null string comboboxmake.text = "" comboboxmodel.text = "" comboboxcolor.text = "" 'add number of cars "make" combobox. comboboxmake.items.add("honda") comboboxmake.items.add("toyota") comboboxmake.items.add("ford") comboboxmake.items.add("lexus") end sub private sub comboboxmake_selectedindexchanged(sender object, e eventargs) handles comboboxmake.selectedindexchanged d

python - Autocomplete in Pydev / Eclipse is not showing all methods -

i've been using eclipse many years (for java , perl programming), i've installed pydev want use ide learning python. my problem when press period sign after variable name, list of autocomplete suggestions not show methods type. e.g. in screenshot below, want use isoformat() method in datetime module. if manually type variable.methodname i.e. end.isoformat(), code working fine. however, while typing if press period after variable end, autocomplete suggestions dropdown not contain isoformat anywhere. can see, datetime in list of forced builtins, not seem help. i have looked @ other questions related autocompletion problems pydev here on site, none of solutions suggested in threads fixing problem. beginner in python, working autocomplete lot of me. can please help? details setup: eclipse version: luna release (4.4.0) build id: 20140612-0600 pydev eclipse 3.7.1.201409021729 python 2.7.3 windows 8.1 edit: bah, stackoverflow won't let me post screenshot image

grouping - Solr facet with sub facets -

i'm trying find solution make subfacet list facets. i have clothes size on products , stored in solr "size_both":"w30l30", "size_width":"w30", "size_length":"l30" i wish generate list of subfacet each width: w30 (8) l30 (3) l32 (1) l33 (4) w32 (2) l30 (1) l34 (1) etc anyone know how accomplish this? thought group, didn't work. use facet pivoting achieve desired result: facet pivoting try below query: http://<host_name>:<port>/solr/<core_name>/select?q=*:*&rows=20&wt=json&indent=true&facet=true&facet.pivot=size_width,size_length

css - unable to render font awesome icons from locally placed FA library -

Image
i have downloaded font-awesome library , linked html. here simplest version of code: <!doctype html> <html> <head> <link rel="stylesheet" type="text/css" href="font-awesome.min.css"> </head> <body> <div id="content"> <i id="search-icon" class="fa fa-search"></i> </div> </body> </html> but, rendered in browser is: what missing? need working in firefox only. i try set encoding of page first, , check if other files placed in correct directories "copy entire font-awesome directory project" in get started page says.

javascript - Can you list users in Meteor without a login system? -

for example, if did chatroom ahve enter username (so don't log in), can still somehow list out people in chatroom? how can this? instead of using normal meteor.users collection, easiest create own collection such simple authentication. if wanted make simple (most likely, long didn't care if 2 people have same name), store name property of chat room message document. edit - answer comment: to detect when user disconnects, can add event handler in publish function this: meteor.publish('some_collection', function(){ var connectionid = this.connection ? this.connection.id : 'server'; this._session.socket.on("close", meteor.bindenvironment(function(){ // deal connectionid closing })); });

download the site.xml from an eclipse update site -

does know how can download eclipse update-site's xml file? i tried paste website in browser url no luck. e.g. http://dist.springsource.org/release/greclipse/e4.2/ your appreciated!

asp.net mvc - Encrypting information to a hidden field in an MVC application -

i working on mvc project. need encrypt information , store in hidden field. solution being deployed in intranet scenario , information private not critical encrypting best practice. using windows authentication. to prevent user seeing these values using rijndael encryption method create encrypted string converting encrypted value hex string , placing in hidden field. i hard-coding values key , iv (storing them in web.config - , encrypting). have read iv should different in every encryption. not want have start storing each iv server side , retrieving on post unless have to. how critical generate new iv key every request? would there more suitable encryption algorithm not require generated values? you can store key , iv values in database each user. prevent generating them on each request, make unique each employee accesed web application regeneration make each midnight using windows service or sql job.

Do object oriented PHP and procedural PHP do the same thing? -

this question has answer here: simple explanation php oop vs procedural? 5 answers i'm beginner in php know lot of stuff (procedural). want know if object oriented php same thing procedural. basically i'm planning make social site , i'm wondering best use (if same thing). they different approaches same problem. however, large projects don't want go procedural. mixing oo code design pattern mvc (model-view-controller) way want go, easier maintain , expand. allows develop reusable classes , methods instead of rewriting same thing on , on again - the dry (don't repeat yourself) principle . tend use this mvc framework lot of smaller systems write, , it's useful introduction both oo , mvc.

Launching photo screen a second time on iOS8 when Calabash iOS is linked -

problem launching photo screen second time on ios8 when calabash-ios linked. when user takes photo in our app, can save it, can decide go , give go @ later time. when app built ios 8, see following behaviour: taking first photo works ok, retaking without leaving photo screen works fine, well. but when photo saved , photo screen launched second time, photo preview area - viewfinder - on screen black , unable take photo. when switch between 2 cameras on phone, saved photograph flipped transition animation. exiting photo screen , launching again gives same. happens when launching app manually. it's happening on ios 8, tested ios 7 , works fine. $ xcode-select --print-path /applications/xcode.app/contents/developer $ xcodebuild -version xcode 6.0.1 build version 6a317 $ calabash-ios version 0.10.1 $ calabash.framework/resources/version 0.10.1 i have sample app reproduce issue takes photos. works expected when built without calabash, has same issue when calabash linked.

ipad - Black screen in Adobe AIR App for iOS 8 -

i have app ipad 2 years working fine. after updating ios8 app shows black screen. the app made flashdevelop. i tried compiling app newest adobe air sdk (15), result same. are more changes needed? thanks. make sure using latest sdk ( 15.0.0.289 ) labs.adobe.com.

android - Which are the causes to get END_TAG error? -

at moment ican not resolve question asked in :; android: why getting end_tag error when execute function while copy-paste of other working? my stack error is: 09-22 22:43:30.711: w/system.err(3338): org.xmlpull.v1.xmlpullparserexception: expected: end_tag {http://schemas.xmlsoap.org/soap/envelope/}body (position:end_tag </{http://schemas.xmlsoap.org/soap/envelope/}s:fault>@1:802 in java.io.inputstreamreader@536f30c4) 09-22 22:43:30.711: w/system.err(3338): @ org.kxml2.io.kxmlparser.require(kxmlparser.java:2046) 09-22 22:43:30.715: w/system.err(3338): @ org.ksoap2.soapenvelope.parse(soapenvelope.java:138) 09-22 22:43:30.715: w/system.err(3338): @ org.ksoap2.transport.transport.parseresponse(transport.java:63) 09-22 22:43:30.715: w/system.err(3338): @ org.ksoap2.transport.httptransportse.call(httptransportse.java:100) 09-22 22:43:30.715: w/system.err(3338): @ org.tempuri.iandroid.userpasswordexists(iandroid.java:304) 09-22 22:43:30.715: w/system.err(3

oop - Why array is not full after initialization in constructor PHP? -

i have 2 classes php: profile publicprofile at publicprofile class there are: public function index($id){ $profile = new profile($id, true); $profile->index(); } so, here create new object profile . let's see class profile : class profile extends auth { public $data = array(); public function __construct($iduser = null, $view = false){ parent::__construct(); $this->gettemplate(); } } } the function gettemplate() ; - forms array $this->data if show @ once array after execute gettemplate() , see (via var_dump ), array contains data keys: view_inside view when called method $profile->index() - array not same: method index in class profile: public function index(){ var_dump($this->data); die(); // here there not keys view_inside, view $this->route(); } what wrong @ code, source array in 1 class different @ 2 methods? function gettemplate():

WEKA + Java: get class probabilities -

given following binary classifier: libsvm classifier = new libsvm(); classifier.setcost(cost); classifier.setgamma(gamma); performing following operation returns label instance: double classid = classifier.classifyinstance(instance); however, obtain degree of confidence classification (i.e., probability instance in positive class + probability instance in negative class). how can obtain information? possible have it? thanks. have considered using setprobabilityestimates() , sets flag generating probability estimates? there option, -b, in setoptions() may generate these probability estimates.

objective c - Convert TBXML parser to NSXML parser -

i developing app ios device in xcode6 (just updated xcode5) @ point user pushes button , tableview seen information nicely incorporated in each cell, information details of corresponding object, , object specified identifier numeric value when he/she pushed button. so basically, using segue method capture numeric value entered in textfield user in previous view (secondviewcontroller.m) there view button seen, number it's label. user pushes button , tableview pops in, showing details of object. the data (details info) retrieved xml url, works fine using project tbxml parser. but tested app on real device (iphone5s) , time push button in order see tableview , object details, happens nothing, if button not there, @ least functionality, in simulator works wonderful. my boss told me change code use nsxml parser instead of tbxml parser. i've seen tutorials , don't though. can me translate block of tbxml-code nsxml-code please. btw "object" tree, , details

generics - Call Class Methods From Protocol As Parameter -

i want able pass class (not initialized object) of protocol type method, call class functions of class in method. code below. i using swift , have protocol defined this //protocol object used fauapiconnection protocol fauapimodel{ //used parse object given dictionary object class func parsefromjson(json:anyobject) -> self //required default init init() } what have method this func getsomeparsingdone<t:fauapimodel>(model:t.type? = nil, getpath:path, callingobj:callingclass) -> void { //getit inconsequential, logic object path var returnobj:anyobject = getit.get(path) if(model != nil){ returnobj = model!.parsefromjson() <<<<<< type 't' not conform protocol 'anyobject' } callingobj.done(returnobj) } object implements protocol import foundation class myobj: fauapimodel{ var neededval:string var nonneededval:string required co

java - LinkedIn - unable to find valid certification path to requested target -

we have several apps working few days ago , today not able log linkedin the error we're getting is: org.scribe.exceptions.oauthconnectionexception: there problem while creating connection remote service. sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target does know why happening , how solve this? pkix stands " public key infrastructure exchange ." cause of server connecting changed ssl certificate chain system doesn't know. upgrading jdk may fix issue nature of trusting newer root certificate. otherwise, can extract root certificate chain provided or find way, , add trust store.

javascript - PhoneGap + AngularJS failed to read file that is just created -

i'm using angularjs in phonegap 3.5.0 project , use on ios 5 , 6 xcode. i try read file write previously. i've empty string instead of value of response json. $http.get(api + '/content') .success(function (response) { // response json console.log(response); window.requestfilesystem(localfilesystem.persistent, 0, function (filesystem) { filesystem.root.getdirectory('json', {create: true}, function (direntry) { direntry.getfile('contents.json', {create: true, exclusive: false}, function (fileentry) { fileentry.createwriter(function (filewriter) { filewriter.onwriteend = function (e) { // not working... fileentry.file(function (file) { var reader = new filereader(); reader.onloadend = function (e) { // e.target.result empty string (!?)

java - libgdx - moving an object -

so, i'm farely new programming first game, , have been working on while, 1 of classes , i'm creating pong game changed bit , i'm having trouble moving paddle left center everytime change the percentage of width of screen move reason elevates paddle same. controlled width bizarre reason field.height has no effect on moving it? i'm stuck right here , i'm close finishing i'm trying lower paddle bottom center? appreciated , makes sense. here field @override public void create () { field.set(0, 0, gdx.graphics.getwidth(), gdx.graphics.getheight()); fieldleft = field.x; fieldright = field.x + field.width; fieldbottom = field.y; fieldtop = field.y + field.height; and here paddle movement private void resetrectangle(){ paddle1.move(field.x + (field.width * .5f, 0); paddle2.move(0,0); } and class public class paddle extends gameshare{ private shaperenderer paddlerenderer; protected paddle() { super(100, 32); } public