Posts

installer - How to show pop message before majorupgrade -

how show pop message user wants upgrade new installer or not before major upgrade. i tried majorupgrade element, able downgrade custom actions not major upgrade. if using majorupgrade element wix_upgrade_detected property defined when upgrade performed. can define new dialog or pop-up in ui based on property. you'd need modify publish element want put ui so: <publish event='showmajorupgradedialog'>wix_upgrade_detected</publish>

regex - 301 redirect to the rewrited url -

the cms working has these rewrite rules: for tags: rewriterule ^tags/([^/]+)/$ tag.php?t=$1&page=1 rewriterule ^tags/([^/]+)/page-([0-9]+)(/)?$ tag.php?t=$1&page=$2 for category pages: rewriterule ^browse-(.*)-videos.html$ category.php?cat=$1 rewriterule ^browse-(.*)-videos-([0-9]+)-(.*).html$ category.php?cat=$1&page=$2&sortby=$3 but not redirect seo friendly url estructure creating duplicate content issues, how can make 301 redirects rewrited url if accessed other? thanks in advance you need create 4 new rules , place them above existing. #redirect old url new seo rewritecond %{the_request} ^get\ /+tag\.php\?t=([^&\s]+)&page=1 rewriterule ^ /tags/%1/? [r=301,l] #redirect old url new seo rewritecond %{the_request} ^get\ /+tag\.php\?t=([^&\s]+)&page=([^&\s]+) rewriterule ^ /tags/%1/page-%2/? [r=301,l] #redirect old url new seo rewritecond %{the_request} ^get\ /+category\.php\?cat=([^&\s]+)&page=([^&\s]+)&sor...

ios - Try catch whole block in Swift 2 -

i know how make try-catch single function. problem want try-catch whole block of code - simple if goes wrong ignore whole block. let me show simple example. simple parser facebook graph api /me/taggable_friends: let params:[nsobject : anyobject] = ["fields": "first_name, last_name, id, picture"] let request = fbsdkgraphrequest(graphpath: "/me/taggable_friends", parameters: params, httpmethod: "get") request.startwithcompletionhandler { (connection, result, error) -> void in if let error = error { print(error) } else{ let resultdictionary:nsdictionary! = result as! [string: anyobject] let array = resultdictionary["data"] as! nsarray object in array { let firstname = object["first_name"] as! string let lastname = object["last_name"] as! string let ...

encrypting string in javascript without external library -

basically, i'd have javascript function checks whether you've entered specific string -- don't want string visible in source code. in mind, go this: function checkpass(input) { if (encrypt(input) === 'ojqqyaqud4aplzvag3fvcii8os9qbr23tlzwwjbw') { alert('success'); } else { alert('fail'); } } function encrypt(input) { //pass through encryption algorithm } how might accomplish –– ideally, without external libraries? because javascript can seen in source, there not can do. minify - in order make harder read , obfuscation another thing use http://javascript2img.com/ make hard read.

Android Widget Upgrade app.. remove the widget -

steps: download app 3.0 market. add widget of app. sign of app 4.0. install latest 4.0 app on device. it remove widget on devices. user have explicitly add widget again. want udpate existing widget. any idea ?? which devices talking about? must not change widgetproviders class name , broadcastreceiver , package name (obviously) allow updates of widgets. never heard updating package makes loose widget if pay attention things above.

Is there a shorthand for this multidimensional array declaration in C -

so have code: #include <stdio.h> #include <stdlib.h> #include <string.h> char field1[45]; char field2[444]; char *fields[] = { field1, field2 }; int main (int argc, char *argv[]) { sprintf(fields[0], "hello\n"); printf(fields[0]); } i have no need accessing fields using field1 , field2. there shorthand way this? tried following doesn't work. char *fields[] = { char[45], char[444] }; basically guess want array contains character strings of varying length without having use malloc. you write: char *fields[] = { (char[45]) { 0 }, (char[444]) { 0 } }; i'd suggest against using design though makes difficult perform check won't overrunning buffer.

swift - Slow responsiveness of sprite.xScale -

in spritekit game, wish resize sprite (named "manta" below) based on user vertical drag. drag should make sprite bigger while drag down should shrink it. i have implemented uipangesturerecognizer , in rec.state == .changed , have below code: let deltay = startpoint.y - currentpoint.y newscale = mantacurrentscale + ((deltay / dragheight ) * mantascalediff ) if (newscale <= mantamaxscale) && (newscale >= mantaminscale) { manta.xscale = newscale manta.yscale = newscale mantacurrentscale = newscale } it works not reliable, responsiveness of resizing sluggish , not useable in live game. are there sprikekit tricks not aware of, give priority process or there better alternatives uipangesturerecognizer create such control in spritekit? i wouldn't use gesture recognizers because easier if know touch point. here example in sudo code might find works. of these functions can overridden inside of skscene, , position can found. var ...