Posts

Showing posts from January, 2010

javascript - Node Stream: Not passing Callback Function a Value -

javascript - Node Stream: Not passing Callback Function a Value - i working on nodeschool.io's learnyounode http client exercise. this task: write programme performs http request url provided first command-line argument. write string contents of each "data" event response new line on console (stdout). my solution was: var http = require("http"); var url = process.argv[2]; http.get(url, function(res){ res.setencoding('utf8'); res.on('data', function(data){ console.log(data); }) }); this worked, curious why suggested solution works. how console.log , console.error using data or error objects. don't appear passed callback function. var http = require('http') http.get(process.argv[2], function (response) { response.setencoding('utf8') response.on('data', console.log) response.on('error', console.error) }) by using response.on('data', co

html - Match only one URL with Javascript -

html - Match only one URL with Javascript - i have code: if (!window.location.href.match(/\?snake=/)) { which redirects user if go site.com/snake . problem matches url starting same keyword , endless loop: site.com/snake-mobile how can avoid that? , match url ends snake ? you utilize href.endswith("snake") . used endswith ecmas 6 function usefull isn't compatible web browsers. javascript html

oauth - Creating an OAuth2.0 provider in python 3 for an existing WSGI server -

oauth - Creating an OAuth2.0 provider in python 3 for an existing WSGI server - i cannot figure out how create oauth v. 2.0 provider existing wsgi server. want deploy custom oauth 2.0 provider on existing wsgi-server (using apache's mod_wsgi) on https. wsgi basis , https implemented , working fine. unfortunately find this tutorial oauthlib on how implement oauth 2.0 providers in python 3. modules' documentation refers frameworks drango , flask, don't need , don't want utilize project. additionally, oauthlib seems forcefulness me using own webserver described in # previous section on validators my_validator import myrequestvalidator oauthlib.oauth2 import webapplicationserver validator = myrequestvalidator() server = webapplicationserver(validator) my problem here is, want create oauth 2.0 provider without mentioned frameworks on existing wsgi server, cannot figure out need alter what. python oauth

javascript - How to dynamic set top css when element over top page or bottom page? -

javascript - How to dynamic set top css when element over top page or bottom page? - how dynamic set top css when element on top page or bottom page ? first , mouse on first cat image. it's ok http://image.ohozaa.com/i/480/7ypwei.jpg when scroll page bottom , mouses first cat image 1 time again , http://image.ohozaa.com/i/5b5/l2l3dj.jpg big cat image on top page and when scroll page top , mouses 3 cat image 1 time again , http://image.ohozaa.com/i/5db/ezze1b.jpg big cat image on bottom page how alter top css of mouse on effect element not on top page or on bottom page ? http://jsfiddle.net/l7lyjtp7/ index.php <!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <head> <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <style type="text/css"> <?php for($i=0;$i<3;$i++) { ?> .top_box<?php echo

php - Adding Title, Author, Subject, Keywords metadata with wkhtmltopdf -

php - Adding Title, Author, Subject, Keywords metadata with wkhtmltopdf - is there way add together metadata (e.g. title, author, subject, keywords) pdf when creating wkhtmltopdf command line via php? the many command line options wkhtmltopdf documented @ http://wkhtmltopdf.org/usage/wkhtmltopdf.txt (also available running wkhtmltopdf -h . can set title of pdf via --title global option. there not appear back upwards specifying author, subject, or keywords metadata. php metadata wkhtmltopdf

Entitfy Framework: everything is broken when I change schema -

Entitfy Framework: everything is broken when I change schema - i utilize ef code-first approach. i have class: public class cat { // ... } then add together properties , migrations them. have couple of existing migrations. create abstract class: public abstract class animal { // ... } and inherit cat animal: public cat : animal { // ... } when that, , run add-migration run problem can't solve. ef gives me error: unable generate explicit migration because next explicit migrations pending: [...]. apply pending explicit migrations before attempting generate new explicit migration. this because schema stored in __migrationhistory. , when ef tries compare current schema schema fetched database (from __migrationhistory), fails. everything's fine when drop of migrations , create database scratch. but don't want drop entire database when schema changes. how can handle schema changes ef? here similar post, without solution. if r

html - Element with display set to inline-block does not work in MVC for loop -

html - Element with display set to inline-block does not work in MVC for loop - i have loop in mvc razor view: @for (int = 0; < 10; i++) { <div class="myinlineblockelement">some value</div> } and class myinlineblockelement has style display: inline-block . the problem cannot create output div in sequence. pretty formatted in output. because of this, there spaces between divs (as expected inline-block). is there way output loop elements in single line? placing elements no spaces between them isn't way around gap appears between inline-block elements. instead can utilize css give parent of div elements font-size of 0, re-add desired font-size on div elements themselves. class="snippet-code-css lang-css prettyprint-override"> .container { font-size: 0; } .myinlineblockelement { background: tomato; color: #fff; display: inline-block; font-size: 14px; } class="snippet

ruby on rails - Trouble inserting code in a flash notice -

ruby on rails - Trouble inserting code in a flash notice - i have flash notice in controller. notice includes mail_to helper method. couldn't helper work without placing view_context before it. works in browser outputs html tags string instead of processing html. in other words, in controller have: flash[:notice] = "blabla #{view_context.mail_to setting::email} blabla." but when gets called see in browser's flash notice: blabla <a href="mailto:me@example.com">me@example.com</a> blabla any suggestions? i.e. alter to: flash[:notice] = "blabla #{view_context.mail_to setting::email} blabla.".html_safe ruby-on-rails ruby-on-rails-4

oracle11g - Casting java.sql.Connection to oracle.jdbc.OracleConnection results in compilation error -

oracle11g - Casting java.sql.Connection to oracle.jdbc.OracleConnection results in compilation error - i cast java.sql.connection oracle.jdbc.oracleconnection in order bind info on array query. when seek next on scala 2.10, bonecp 0.8.0 , slick 2.0.0: import com.jolbox.bonecp.connectionhandle import oracle.jdbc.oracleconnection def failswithcompilationerror() = { database.fordatasource(ds).withdyntransaction { val connection = dynamicsession.conn.asinstanceof[connectionhandle].getinternalconnection println(connection.unwrap(classof[oracleconnection])) // when uncommenting next 2 lines compilation error "error while loading aqmessage, class file '.../ojdbc6.jar(oracle/jdbc/aq/aqmessage.class)' broken" occur // val oracleconnection: oracleconnection = connection.unwrap(classof[oracleconnection]) // println(oracleconnection) } } and uncomment 2 lines assignment val of type oracleconnection , println a compilation failure

python - Is there an alternate for the now removed module 'nltk.model.NGramModel'? -

python - Is there an alternate for the now removed module 'nltk.model.NGramModel'? - i've been trying find out alternative 2 straight days now, , couldn't find relevant. i'm trying probabilistic score of synthesized sentence (synthesized replacing words original sentence picked corpora). i tried collocations, scores i'm getting aren't helpful. tried making utilize of language model concept, find seemingly helpful module 'model' has been removed nltk because of bugs. it'd great if either allow me know alternate way ngram model implementation in python, or improve yet, suggest me other way solve problem of 'scoring' sentence. according this open issue on nltk repo, ngrammodel not in master because of bugs. current solution install code model branch. 8 months behind master though, might miss out on other features , bug fixes. pip install https://github.com/nltk/nltk/tarball/model the relevant code here in model b

html - CSS hover effect applying to everything but h4 -

html - CSS hover effect applying to everything but h4 - i have next scenario: i'm using bootstrap develop site. when hover list group, suppose have trnasition bluish background color , text should go white. works though styles don't apply h4. here's css code: .styled-group-right-item{ padding: 20px; margin-left: 100px; } .limited-list-group{ height: auto; max-height: 500px; overflow-y: scroll; } .author-pubdate-info{ font-weight: bold; } .list-group-item-switchhon-blog:hover{ transition: 0.5s ease !important; color: #fff !important; background-color: #2980b9 !important; } .list-group-item-switchhon-blog{ transition: 0.5s ease; } and here markup: <div class="list-group limited-list-group"> <a href="#" class="list-group-item clearfix list-group-item-switchhon-blog"> <div class="pull-left"> &

Displaying two rows of data in one line in a Crystal Report report -

Displaying two rows of data in one line in a Crystal Report report - i have simple study each info row consist of 2 fields ( field1, field2) save paper print 2 rows per line in report: field1 field2 {bigger space} field1 field2 is doable in cr? thank, ignacio you can setting details section contain multiple columns of data. in section expert, select details section of study , check "format multiple columns". enable 4th tab on same screen called "layout" can tell cr how format each of these columns , how print records across page. crystal-reports

javascript - Why is a more convoluted jQuery pattern necessary here? -

javascript - Why is a more convoluted jQuery pattern necessary here? - to me, next code seems reasonable enough: $("#onebutton").click( alert("hello"); ); it seems when onebutton clicked, please pop alert saying "hello". however, in reality, alert pops regardless of whether button clicked or not. one has wrap alert("hello"); in anonymous function, , (and then), alert popping depend on clicking button. me seems unnecessarily convoluted. there must reason why designers of jquery thought acceptable alert in code above pop when button hasn't been clicked. reason? fair question guess, although i'm not fan of arrogance came :) lets break downwards bit: object.method(function() { alert('hi'); }); your question is, why can't skip anonymous function? what we're doing here, telling method execute @ later point. what's beingness executed beingness supplied function. we give refer

common lisp - using CLISP to make equations given a sequence of numbers -

common lisp - using CLISP to make equations given a sequence of numbers - so have utilize clisp create 2 equaline equations given sequence of numbers ie user enters 2 2 2 2: 2 + 2 = 2 + 2 ; valid 2 - 2 = 2 - 2 ; valid 2 = 2 + 2 - 2 ; valid 2 + 2 + 2 = 2 ; not valid user enters 6 2 2 2: 6 = 2 + 2 + 2 ; valid 6 = 2 * 2 + 2 ; valid 6 + 2 = 2 * 2 ; not valid the operates of *, /, +, , - used basic math, , = signify left hand side = right hand side. my problem lies in lack of real lisp training , start. think have utilize macros, i'm not sure how utilize macros or how macros used this. i know have define function such (defun findequation (a b c d)) but there i'm lost first step: create combinations of relevant symbols, restriction 1 = should present. example input: (2 2 2 2) , (+ - * / =) example output: (2 + 2 + 2 = 2) , (2 + 2 - 2 = 2) , (2 - 2 - 2 = 2) , … second step: utilize shunting-yard algorithm transform infix list of alter

MOXy JAXB implementation not working for JAX-WS web services on Glassfish 4.0? -

MOXy JAXB implementation not working for JAX-WS web services on Glassfish 4.0? - i've been able specify eclipselink moxy jaxb provider per blaise doughan's instructions here: http://blog.bdoughan.com/2011/05/specifying-eclipselink-moxy-as-your.html i'm trying publish web service, incorporates subclasses include @xmlvalue annotation. (the jaxb reference implementation wont allow this, moxy will). anyway, got usual jaxb error message again: com.sun.xml.bind.v2.runtime.illegalannotationsexception: ... @xmlvalue not allowed on class derives class. ...which means web service trying utilize reference implementation again, instead of moxy. i found blaise's blog post how moxy can leveraged create jax-ws service in glassfish 3.1.2: http://blog.bdoughan.com/2012/02/glassfish-312-is-full-of-moxy.html however, doesn't work in glassfish 4.0. exception: wsservlet11: failed parse runtime descriptor: com.sun.xml.ws.spi.db.databindingexception: unknown

javascript - Two pages, one jQuery script, error on one site -

javascript - Two pages, one jQuery script, error on one site - i have been stuck on problem while now. have developing environment, i've added lazy load script rather big file developed site external party. works on pages 1 - on site lot of functions aren't defined, , puzzled @ least. one of working pages is: (site removed due local developing environment) the page error in console is: (site removed due local developing environment) the file jquery.main.js thing has happened we've upgraded 1.8.3 1.11.0 jquery - since works on other sites, surprised if problem. any help appreciated. you have 2 jquery.min (v 1.10 , 1.11) files loaded in page, remove oldest. 1 more tip, load scripts in bottom of page avoid headcaches. update: here jquery files: in top: <script type="text/javascript" src="(site removed due local developing environment)/jquery-1.11.0.min.js"></script> in bottom: <script src="//ajax.googl

jquery - How to drag a node from a div and drop it on to a JStree? (jstree version: 3.0.4) -

jquery - How to drag a node from a div and drop it on to a JStree? (jstree version: 3.0.4) - using next code, drag jstree node , drop on div, , after that, node deleted jstree. storing removed jstree nodes in mapofremovednodes object, node id key , node object value. now, want move node jstree. finish code: <!doctype html> <head> <title>jstree</title> <link rel="stylesheet" href="css/style.css" /> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="js/jquery.js"></script> <script src="js/jstree.js"></script> <script> var mapofremovednodes = new object(); $(function() { var arraycollection = [ {"id": "animal", "parent": "#", "text": "animals"}, {&qu

ios - UILocalNotification wants permission to show, but it is already granted -

ios - UILocalNotification wants permission to show, but it is already granted - i allowing remote , local notifications in app, works fine remote notifications when trying utilize local notifications not show notification, running code. remote notifications work when out of app, local notifications don't want show when in app? here code: in didfinishlaunchingwithoptions method: let notificationtypes:uiusernotificationtype = uiusernotificationtype.badge | uiusernotificationtype.sound | uiusernotificationtype.alert allow notificationsettings:uiusernotificationsettings = uiusernotificationsettings(fortypes: notificationtypes, categories: nil) uiapplication.sharedapplication().registerusernotificationsettings(notificationsettings) uiapplication.sharedapplication().registerforremotenotifications() and receiving of notification: if(application.applicationstate == uiapplicationstate.active) { var ln: uilocalnotification = uilocalnotification() ln.

ios - Dynamic table view + scroll view -

ios - Dynamic table view + scroll view - i've got uiscrollview , on top there info sources , on button there a uitableview . table view cannot scrolled, capable of displaying big number of cells need manual calculation stuff. that's (you can see in code below). meanwhile, container table view should grow it. seek alter these parameters while loading view nil changes... this how looks like. in ib. the struct. and code. class viewcontroller: uiviewcontroller, uitableviewdatasource, uitableviewdelegate { @iboutlet var scrollview: uiscrollview! @iboutlet var tableview: uitableview! allow numberofcells = 55 allow rowheight: cgfloat = 40 allow footerheight: cgfloat = 30 allow headerheight: cgfloat = 30 allow identifier = "cell" override func viewdidload() { super.viewdidload() self.tableview.datasource = self self.tableview.delegate = self self.tableview.backgroundcolor = self.vi

c# - Error during connection to wcf service by ssl -

c# - Error during connection to wcf service by ssl - hello everybody, i've done wcf service, published (i can connect browser , can see wsdl) when seek consume client programme i've written, obtain "an error occurred when verifying security message" message. some detail: consumer , server on same machine (so isn't case of out-of-sync time between consumer , server), utilize self signed certificate, service set in subsection of greater solution, , has dedicated web.config overrides solution one. web.config files same both on service side on consumer side (i've done re-create , paste service consumer file). consumer uses basichttpbinding , transportwithmessagecredential connection and, after several attempts, if i've created service reference service visual studio tool, in consumer code specify 1 time again both binding type endpoint address. as i've said, service uses self signed certificate, , i've implemented validation class v

android - xmpp in IntentService only works when debugging -

android - xmpp in IntentService only works when debugging - when implementing xmpp on cloud connection server of google receive messages start wakefulbroadcastreceiver . manifest.xml <uses-permission android:name="android.permission.internet"/> <uses-permission android:name="android.permission.use_credentials"/> <uses-permission android:name="com.google.android.c2dm.permission.receive"/> <uses-permission android:name="android.permission.wake_lock"/> <permission android:name="com.tag.xmppandroid.permission.c2d_message" android:protectionlevel="signature"/> <uses-permission android:name="com.tag.xmppandroid.permission.c2d_message"/> <receiver android:name=".gcmbroadcastreceiver" android:permission="com.google.android.c2dm.permission.send"> <intent-filter> <action android:name="com.goog

c# - NServiceBus Saga handle a message-type multiple times gives concurrency exception -

c# - NServiceBus Saga handle a message-type multiple times gives concurrency exception - we have nservicebus implementation handles multiple message-types: public class statecoordinator : saga<messagedata>, iamstartedbymessages<createmessage>, iamstartedbymessages<confirmmessage> messagedata this: public class flowdata : icontainsagadata { [unique] public guid mappingid { get; set; } public guid id { get; set; } public string originalmessageid { get; set; } public string originator { get; set; } public list<messagepart> messageparts { get; set; } } public messagepart { public int id { get; set; } public string status { get; set; } } the createmessage has messagepart added messageparts in handler. confirmmessage updates status of particular messagepart. this scenario: 1) first createmessage received. creates saga in raven , adds messagepart

c++ - Error with the CMakeLists.txt in opencv project -

c++ - Error with the CMakeLists.txt in opencv project - i'm begining opencv project in c++ , figure it'll nice occasion larn cmake. project hirerachy: project/ |__include/ |__sample1.h |__sample2.h |__build/ |__doc/ |__src/ |__sample1.cpp |__sample2.cpp |__test/ |__main.cpp |__cmakelists.txt the cmakelists.txt : cmake_minimum_required( version 2.8 ) set( proj_name "project" ) set( proj_path ${cmake_source_dir} ) set( proj_out_path ${cmake_binary_dir} ) set( proj_libraries ${opencv_libs} ) set( proj_includes "include" ) file( glob_recurse proj_sources src/*cpp test/*cpp ) file( glob_recurse proj_headers include/${proj_name}/*.h ) project( ${proj_name} ) find_package( opencv required ) include_directories( ${proj_includes} ) add_executable( ${proj_name} ${proj_sources} ) target_link_libraries( ${proj_name} ${proj_libraries} ) the makefile generated, when execute "make" have "undefined references&qu

c# - Can't install RestSharp for Mobile Apps into visual Studio for Xamarin -

c# - Can't install RestSharp for Mobile Apps into visual Studio for Xamarin - i want utilize restsharp project visual studio xamarin, got error : installing 'restsharp 105.0.0'. installed 'restsharp 105.0.0'. adding 'restsharp 105.0.0' wikeepet. uninstalling 'restsharp 105.0.0'. uninstalled 'restsharp 105.0.0'. install failed. rolling back... not install bundle 'restsharp 105.0.0'. trying install bundle project targets 'portable-net45+win+wpa81+wp80+monoandroid10+monotouch10', bundle not contain assembly references or content files compatible framework. more information, contact bundle author. my projet mobile apps : blank apps (xamarin.forms portable) any help appreciated. so found answer, user1 in comments upstair. the reply easy : there nil restsharp in pcl. if want utilize restsharp, need interface or install 3 references , coding few lines each projects ! c# android visual-s

ios - How to retrofit Parse’s PFObject to an existing, complex, aggregate model class? -

ios - How to retrofit Parse’s PFObject to an existing, complex, aggregate model class? - i have existing model class manage parse, ideally changing superclass nsobject pfobject. real-world model class, designed without parse in mind, presents number of challenges. challenges the challenges are: this class in swift. this class has stored properties , computed properties. (so parse should manage stored properties, of course.) some properties hold arrays of instances of other custom model classes some of custom classes hold user objects, should managed parse. every 1 of these things seems require special treatment handled correctly in parse, , parse’s documentation brief on these issues. existing model class hierarchy to give example, class this: // i’d alter pfuser subclass. class user : nsobject { /* ordinary user object */ } // , pfobject subclass class tango : nsobject { var user:user // presumably, parse "pointer" pfuser var opponent:participant

c# - How to convert an IP Camera video stream into a video file? -

c# - How to convert an IP Camera video stream into a video file? - i have url ( <ip>/ipcam/mpeg4.cgi ) points ip camera connected via ethernet. accessing url resuls in infinite stream of video (possibly audio) data. i store info video file , play later video player (html5's video tag preferred player). however, straightforward approach, simple saving stream info .mp4 file, didn't work. i have looked file , here saw (click enlarge): it turned out, there html headers, farther on manually excluded using binary editing tool, , yet no player play rest of file. the html headers are: --myboundary content-type: image/mpeg4 content-length: 76241 x-status: 0 x-tag: 1693923 x-flags: 0 x-alarm: 0 x-frametype: x-framerate: 30 x-resolution: 1920*1080 x-audio: 1 x-time: 2000-02-03 02:46:31 alarm: 0000 my question pretty clear now, , help or suggestion. suspect, have manually create mp4 headers myself based on values above, however, fail understand format de

oracle - Populate a column on update (create too?), and why "FOR EACH ROW"? -

oracle - Populate a column on update (create too?), and why "FOR EACH ROW"? - i have table of people belong various sites. these sites can change, don't often. when create attendance record (a learner_session object) don't store site. has cause problem in reporting how many training hours site has, because people have changed sites on years. not much, we'd right. so i've added site_at_the_time column learner_session table. want auto-populate site person @ when attended session. i'm not sure how reference this. reason (i'm guessing speed development or something) learner_id allowed null. i'm planning update trigger. learner_id shouldn't ever updated, , if ever did somehow, entire record junk i'm not worried overwriting it. the trigger have create trigger set_site_at_the_time after update of learner_id on lrn_session begin :new.site_at_the_time:= (select site_id learner :new.learner_id = who.learner_id); end; which

php - How can Laravel 4 be used to support two authentication methods for two different areas of a site? -

php - How can Laravel 4 be used to support two authentication methods for two different areas of a site? - i'm building site has 2 areas: main site, , admin area. the main site has have facebook login functionality (i'm looking @ using sammy k's laravel facebook sdk) , admin area going have database-based login; laravel login system. i'm wondering how approach this, , whether anyone's done before. design considerations: should have 2 separate user tables? should utilize 2 route filters, 1 each auth type? if have 1 user table, should utilize different groups (somehow - i'm not sure they'll built in?) or indicator allow scheme know whether it's database-based, user/password login, or facebook login? since using facebook sdk, you don't need user table begin in most cases/projects. if indeed want utilize 2 different authentication, yes, utilize 1 each auth type. assign different routes each of case. don't need bring differ

java - Find intersection between two ArrayLists -

java - Find intersection between two ArrayLists - find intersection of 2 arraylists of strings. here code: public arraylist<string> intersection( arraylist<string> al1, arraylist<string> al2){ arraylist<string> empty = new arraylist<string>(); arraylist<string> empty1 = new arraylist<string>(); if (al1.isempty()){ homecoming al1; } else{ string s = al1.get(0); if(al2.contains(s)) empty.add(s); empty1.addall(al1.sublist(1, al1.size())); empty.addall(intersection(empty1, al2)); homecoming empty; } } i want output this: example, [a, b, c] intersect [b, c, d, e] = [b, c] the above code give me output, want know how create code more easier understand. you create easier understand writing this: /** * computes intersection of 2 lists of strings, returning new arraylist of strings * * @param list1 1 of lists compute

Read in image file sequence in C++ w/o using opencv -

Read in image file sequence in C++ w/o using opencv - given image files lights000.rgbe lights001.rgbe lights002.rgbe ... lights899.rgbe are located in single subfolder. best way read 1 file next? given read command .rgbe called readhdr(char* filename) i have seen several questions regrading problem utilize opencv. not using opencv , .rgbe not supported opencv file extension method wouldn't work. i saw next code different question: char* dataset_dir( "c:/data/" ); // or take argv[1] cv::mat normal_matrix; std::vector<cv::mat>* image_stack; for( int i=1; i<=endnumber; ++i ) { // gives entire stack of images go through image_stack->push_back(cv::imread(std::format("%s/%03d-capture.png", dataset, i), cv_load_image_color)); normal_matrix = cv::imread(std::format("%s/%03d-capture.png", dataset, i), cv_load_image_color); } but cannot find info on std::format command or dataset_dir. any advice how split f

dart - Best way to get model associated with a core-item element? -

dart - Best way to get model associated with a core-item element? - consider polymer fragment: class="lang-html prettyprint-override"> <core-menu on-core-activate="{{selectuser}}"> <template repeat="{{user in users}}"> <core-item label="{{user.name}}"></core-item> </template> </core-menu> when user clicks on core-item element , triggers selectuser , how determine user associated activated core-item ? i'd instance actual object, , not stringified identifier utilize object. polymer >= 1.0.0 @reflectable void someclickhandler(dom.event event, [_]) { // native events (like on-click) var model = new domrepeatmodel.fromevent(event); // or custom events (like on-tap, works native events) var model = new domrepeatmodel.fromevent(converttojs(event)); var value = model.jselement['items']; // or var value = model.jselement[$['mylist'].attributes[

I want the same Fixed Header across all pages - Can I link dynamic HTML or Javascript -

I want the same Fixed Header across all pages - Can I link dynamic HTML or Javascript - i have website done in html , css js. ive set page header perfect me - fixed contains divs logo, search bar , phone number. underneath div navbar controlled master javacript file template , navbar fades upon scroll js. my question how set entire header styling can replicated on 80 pages , have alter once? i've tried below - external page header1.html has header code (of has total html head, body, etc) when load all, page calls header1.html , disappears. <script src="//code.jquery.com/jquery-1.10.2.js"></script> in head <div id="header"></div> <script> $("#header").load("header1.html"); </script> end body header1.html should not contain total html document. rather, should snippet of html code need header stuff. javascript html css templates header

java - How can I make uploadArchives dependent on another task? -

java - How can I make uploadArchives dependent on another task? - i have next in build.gradle : afterevaluate { project -> uploadarchives { repositories { mavendeployer { configuration = configurations.deployerjars pom.packaging = "aar" pom.groupid = project.core_group pom.version = project.core_version_name repository(url: "scp://" + project.core_maven_url) { authentication(username: project.uploadusername, privatekey: project.uploadkeyfile) } } } } } and want dependent on next task: task checkproperties << { if (!project.hasproperty('uploadusername')) { throw new runtimeexception("couldn't find uploadusername property. did forget specify in ~/.gradle/gradle.properties?") } else if (!project.hasproperty('uploadkeyfile')) { throw new runtimeexception("couldn't find uploadkeyfile property. did forget specify in

save - android get key press programmatically -

save - android get key press programmatically - i want know key has been pressed in android keyboard. example, if pressed {a}, want show value {a} in screen toast ? i want using broadcastreciever or background service try using dispatchkeyevent(keyevent event) in activity: @override public boolean dispatchkeyevent(keyevent event) { log.i("key pressed", string.valueof(event.getkeycode())); homecoming super.dispatchkeyevent(event); } android save keylogger

joomla3.0 - Joomla 3.3.6 Category Blog - Subcategories before articles -

joomla3.0 - Joomla 3.3.6 Category Blog - Subcategories before articles - i trying customise category blog layout 1 category follows: this special category (id 24) blog layout should display list of subcategories before articles the other categories stick default layout: articles first , subcategories i tried overriding blog.php: <div class="blog<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="http://schema.org/blog"> <!-- special category - subcategories first --> <?php if ($this->category->id == 24 && !empty($this->children[$this->category->id]) && $this->maxlevel != 0) : ?> <div class="cat-children"> <?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?> <h3> <?php echo jtext::_('jglobal_subcategories'); ?> </h3> <?php endif; ?> <?php echo $this-&g

c# - Flot Ajax Realtime Chart Not get data from CS Page -

c# - Flot Ajax Realtime Chart Not get data from CS Page - i'm trying illustration of flot ajax realtime chart info coming cs page info not getting passed. chart gets created info points don't show up. missing? default.aspx <%@ page title="flot examples: real-time updates" language="c#" masterpagefile="~/site.master" autoeventwireup="true" codefile="default.aspx.cs" inherits="_default" %> <asp:content id="bodycontent" contentplaceholderid="maincontent" runat="server"> <script type="text/javascript" src="js/flot/jquery.min.js"></script> <script type="text/javascript" src="js/flot/jquery.flot.js"></script> <script type="text/javascript" src="js/flot/jquery.flot.min.js"></script> <script type="text/javascript" src="js/flot/jquery.flot.time.js">

How to config proxy in openSUSE 13.1 -

How to config proxy in openSUSE 13.1 - i need connect net proxy server. edit kde , yast proxy settings nil works. seek manually edit /etc/sysconfig/proxy. same config works on working computer under windows 7 on notebook undes suse can't. proxy server proxy.tellur.local works on port 8080. at start brain not understand utilize local proxy server. run command nslookup on windows computer , add together line in /etc/hosts file ip address , url of local proxy-server want use. after changes net works fine. proxy opensuse

c# - Explain why setting DataGridTextColumn.HeaderTemplate affects all columns? -

c# - Explain why setting DataGridTextColumn.HeaderTemplate affects all columns? - i have datagridtextcolumn.headertemplate set, reason seemed have affected datagridtextcolumn's? this affected both id , name columns, seem should impact column set on such startlog, stoplog , notes. i couldn't set header, forced set textblock.text property similar effect. code below: <datagrid grid.column="1" grid.row="1" grid.columnspan="5" name="shifts" isreadonly="false" autogeneratecolumns="false"> <datagrid.columns> <datagridtextcolumn header="id" binding="{binding id, mode=onetime}" /> <datagridtextcolumn header="name" binding="{binding name, mode=onetime}" /> <datagridtextcolumn header="startlog" binding="{binding startlog}&qu

jquery animate - Converting floats to absolute positioning -

jquery animate - Converting floats to absolute positioning - i have monopoly board , i'd move unicode piece around board smoothly, jquery.animate method. q: have go canvas have smooth player moving experience, or can utilize sort of absolute positioning instead? right i'm using floats float squares board. class="snippet-code-js lang-js prettyprint-override"> window.dom = {} // document object model var column = 1 var row = 2 function roll() { return math.floor(math.random() * 6) + 1 } $('#parta .bottomheader:eq(0)').append('<img src="//lenoir-rhyne.com/emoji/hotel.png" width="25">') $('#parta .bottomheader:eq(1)').append('<img src="//lenoir-rhyne.com/emoji/house.png" width="25">') ;(function() { var variables = {} variables.die1 = roll() variables.die2 = roll() variables.die1 = 1000 /* while testing */ variables.counter = 0 placeposi