Posts

objective c - Application isn't the active one, after an update with Sparkle -

i use sparkle provide updates application. the process simple , basic 1 : updates application zipped , xml appcast provides sparkle url zip. all work expected, sparkle advertises of update, , once click install it, downloads, unpacks archive, , asks install , relaunch. there 1 problem : after relaunch application isn't active (foremost ?) one, : application (re)launched 'finish_installation' tool stays @ bottom of applications stack. from how other apps updated sparkle behave, isn't normal behavior , application correctly given focus system on normal, classic launches. if matters, run mac os x 10.9.1 , xcode 5.0.2, , application document-based. i did notice message in system log, saying zip importer encountered error (2) parsing archive used update, doubt root of problem. does observed such behavior ? on non-update configuration ? appreciated. i haven't observed behavior on apps. should fixable adding [nsapp activateignoringotherapps:yes...

xcode5 - Video slow motion using AVPLAYER in Cocoa Aplication -

i'm going start video slow motion using avplayer in cocoa application. example: can select start position , end position video. if play again video want slow motion start , end position . 1 please tech me how implement that. how select start position , end position , slow motion using avplayer. you'll need add time observer player - addperiodictimeobserverforinterval:queue:usingblock: . called on regular intervals specify. you'll use know when player reaches start or end positions. for start , end positions have store them somewhere in code , compare them in block of method. take in mind observer needs cmtime , many people bit confused it. here answers: trying understand cmtime trying understand cmtime , cmtimemake i prefer work cmtime instead of seconds it's you. then slow motion need set rate property of player whatever need - 0.5 make twice slower original speed, 0.25 make 4 times slower etc. value of 0 pause playback , value of 1 play...

php - How to extract variable part from URL and how to know if URL variable is appended by digits? -

i have url this: www.example.com/education/edu.php?main=colleges&category=engineering-colleges i rewrite url using .htaccess www.example.com/education/colleges/engineering-colleges also have url in same education directory like: www.example.com/education/edus.php?main=colleges&collegeid=$id&collegename=$name i want rewrite url this: www.example.com/education/colleges/$name-sqr$id how can accomplished? can't think of way because above 2 rewrite urls have same number of parameters. can't redirect them correct page. these questions: is there way using .htaccess validating url variable sqr$id , redirecting edus.php page. how extract id url , make variable operation in page. try code in /education/.htaccess : rewriteengine on rewritebase /education/ rewritecond %{request_filename} -f [or] rewritecond %{request_filename} -d rewriterule ^ - [l] rewriterule ^([^/]+)/([^-]+)-sqr([0-9]+)/?$ edus.php?main=$1&collegeid=$3&col...

java - How do portlets relate to JSF? -

i haven't worked java portlets or jsf 'till , thought might try learn them. high view seems me both used building component-based user interfaces web applications. more read, more find confusing. i know portlets need run in portlet container both technologies seem "widget" builders. how portlets relate jsf? a high-level analogy: portlet container desktop windowing system ========================================================== portlet window jsf widget framework jsf tag widget the portlet provides api allows application receive , respond requests container. not specify use render portlet views or how application organizes data. in this, portlet similar servlet. jsf provides means specifying views, navigating between them, , interacting model layer. a specialized portlet acts jsf controller/container - typically portlet bridge.

python - Alembic/Flask-migrate doesn't recognise database structure -

i have flask-based application , i'm trying enable migrations able manage database structural changes. database not empty , contains tables , records before started alembic , flask-migrate. first, tried use alembic stand-alone, pip install alembic , configure , use autogenerate generating diff. works fine output not expected: info [alembic.autogenerate.compare] detected removed table u'user' generating /users/me/documents/project/app/migrations/versions/3de1151ce5de_.py ... done so table user present in database (i think it's reserved table in postgresql) , have never removed it. also, have bunch of other tables seem invisible alembic. @ first thought failed configure alembic properly, started on , decided try this nice flask extension miguel grinberg . lot easier setup, result same message. any ideas doing wrong? edit: decided add important information on how edited original alembic env.py: .... import sys,os sys.path.append(os.getcwd()) import a...

Count max interval of cells with numbers before blank cell in Excel -

is there way count, using formulas, intervals of cells numbers in row (before blank cell appears) , display value of "biggest chain" found? doing research automatization in twitter. have list of n users. there 1 column each hour of research, , in every cell there number of tweets published each user during hour. if user didn't publish in 1 specific hour, cell empty (here x means empty cell): user 1: x x x 1 1 1 2 1 3 8 4 2 1 3 1 1 1 1 x 2 x user 2: 1 2 x 2 3 1 3 x x 2 1 8 7 2 1 2 3 x 1 3 x i conclude user 1 uses kind of automatization because active 15 hours in row. user 2, although active user 1, active 8 hours in row with first row of data showing user in a2 , tweet numbers in b2:v2 can use "array formula" in x2 =max(frequency(if(b2:v2<>"",column(b2:v2)),if(b2:v2="",column(b2:v2)))) confirm ctrl + shift + enter , copy down that gives me 15 , 8 sample data

javascript - Add class active to menu links is working with links that has no extension only, how to make it find all links with and without extinctions? -

using .httaccess removed .php extensions end of url, example index.php shown index "site.com/index , not site.com/index.php". now, using script below, adding class of .active anchor of current open page. //main menu .active classes handler $("#mainmenu a").filter(function () { var _href = location.href.replace(/#.*/, ""); if (location.pathname === "/") {_href += "index";} return _href === this.href; }).addclass("active"); the problem is? script above try , find page names/url without php extension, example, links have follows in order work: <li><a href="index">home</a></li> but links follows, , don't want remove .php extension <li><a href="index.php">home</a></li> what can make find urls php or without? tried adding .php var _href = location.href.replace(/#.*/, ""); thinking way it, did not wo...