history

How do I track router change events in Backbone.js

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to run a function every time the application switches URLs in Backbone.js, and I need to know the hashtag the URL has changed to. I'm assuming there is an event that I can bind to but I haven't been able to figure out which event and what object to bind to. Specifically I want to ship the new URL to an analytics application. 回答1: I know this is an old post, but like @kirk suggested, Backbone.js already has it built it. Backbone.history.on("all", function (route, router) { //console.log(window.location.hash); }); I think you'd be

How retrieve Chat History using Java Smack library from openfire server?

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: After installing Open Archive plugin in the Openfire server I can see the chat conversation between two user from the openfire admin panel which is pretty easy and that is web based too. Now I want to retrive those conversation or chat history from chat client application(written in java) where I've used Smack library. I didn't found any helpfull resource for that. Any advice will be helpfull. 回答1: Smack just implemented MAM feature [XEP 0313] but yet not released, hope to get it on next release if you want to use this feature build the

Convert datetime fields in Chrome history file (sqlite) to readable format

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Working on a script to collect users browser history with time stamps ( educational setting). Firefox 3 history is kept in a sqlite file, and stamps are in UNIX epoch time... getting them and converting to readable format via a SQL command in python is pretty straightforward: sql_select = """ SELECT datetime(moz_historyvisits.visit_date/1000000,'unixepoch','localtime'), moz_places.url FROM moz_places, moz_historyvisits WHERE moz_places.id = moz_historyvisits.place_id """ get_hist = list(cursor.execute (sql_select)) Chrome also stores history

How can I use window.history.pushState 'safely'

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to use the window.history.pushState() function in supporting browsers. Unfortunately I'm getting an error on Firefox: TypeError: history.pushState is not a function How is it possible to avoid that? 回答1: [try-catch] tag implies what you know the answer already... (is there anything more specific?) The other possibitity is to check if ( history.pushState ) history.pushState( {}, document.title, location.href ); 回答2: Although I haven't tested it in JavaScript, I know in other languages that try-catch is more resource intensive

Is it possible to access a user's Google +1 (Plus One) history via an API?

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to access a user's Google Plus One history With +1 enabled, the history is saved in your Google profile and optionally can be displayed: http://www.google.com/+1/button/ It is possible to access this programatically (once the user has given permission via normal Google Authentication and Authorization?) I have only been able to find information for the API to add the button to sites. 回答1: You can allways try to parse the data used by G+ itself. The G+ user profile has a tab with all public +1, that can be fetched with https:/

Can I search Netbeans' local history?

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: In one of the previous versions of one of my file in a Netbeans project I wrote code that I later removed, and now I want to retrieve it. However now I can't find it when I manually go to previous versions, as I have many versions in the local history of this file, and I don;t remember when exactly I wrote this code. Is there a way to run a search on the local history of this file? I saw in this answer that the local history is kept in this path <HOME>/.netbeans/<NB_VERSION>/var/filehistory where HOME is my user home and NB_VERSION

Javascript : Change the function of the browser's back button

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Is there a way to make the user's back button on their browser, call a javascript function instead of going back a page? 回答1: You can't override the behaviour that if a user follows a link to your page, clicking Back will take them off it again. But you can make JavaScript actions on your page add entries into the history as though they were clicks to new pages, and control what happens with Back and Forward in the context of those clicks. There are JavaScript libraries to help with this, with Really Simple History being a popular

history.go(&#039;url&#039;) issue

匿名 (未验证) 提交于 2019-12-03 02:27:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've seen that history.go() method can have two types of parameter: see: http://www.w3schools.com/jsref/met_his_go.asp But url does not working at all. I use JavaScript console of browser to test this method but got no success. I know that there are security issues, that you can't read history entries. You can just go back and forward. So why this string parameter listed in all js references? 回答1: Supplying a URL as a parameter is a non-standard feature and will not work in all browsers. Most browsers accept only a relative number, e.g. 1 or

Spark shell command lines

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new to Spark and trying to figure out how can I use the Spark shell. Looked into Spark's site documentation and it doesn't show how to create directories or how to see all my files in spark shell. If anyone could help me I would appreciate it. 回答1: In this context you can assume that Spark shell is just a normal Scala REPL so the same rules apply. You can get a list of the available commands using :help . Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 2.3.0 /_/ Using Scala version 2.11