Asynchronous AlivePDF – Kickoff

Hello Fellow AS3 Developer,

Probably You got here trough the project repository, so let me explain our goal with the Asynchronous version of AlivePDF:

As you probably know AlivePDF is a “ActionScript 3 Open-Source PDF Library – 100% client side PDF generation which makes you and your server happy”.

But there is one big problem with it: If you’re planning to add images to your PDF You’ll see that this library is not asynchronous, and if You add a lot of images in a row your application will hang and freeze until it finishes the process.

Our goal is to change this part of the library and make it work asynchronously.

Keep tuned since You’ll see a couple of push’s in the next weeks.

Open Source Junior Developer
Posted on by Diogo Raminhos This entry was posted in Asynchronous AlivePDF. Bookmark the permalink.

Add Facebook App to Page Link / Bookmarklet

As you know, Facebook removed the App Profile Pages (as of December 10, 2011) and with them the “Add to page” link.

You can now access this feature using a dialog that was created in order to replace the now removed feature.

Calling this dialog would make you loose some precious time, that’s why i developed this bookmarklet that you can add to your bookmark page and click when you’re on your summary page. (Example: https://developers.facebook.com/apps/APP_ID/summary)

Drag to your Bookmark Bar: Add App to Page

(Tested on Google Chrome)

Open Source Junior Developer
Posted on by Diogo Raminhos This entry was posted in News & Updates. Bookmark the permalink.

SQL Series – Insert/Update in one stored procedure

I’ll be starting a new category in my blog called SQL Series, since I’ve been learning a lot about it – And we’ve been earing Wilson Edgar saying he loves SQL two or three times a day

To start my new post area I will share a simple stored procedure that will check if a record exists, if so update it, otherwise create it; Simple hum?! Just Update it to your needs :)

  1. IF (SELECT COUNT(*) FROM YourTable WHERE YourVar = @YourValue) = 0
  2.         BEGIN
  3.                 INSERT INTO YourTable(YourVar) VALUES(@YourVar)
  4.         END
  5. else
  6.         BEGIN
  7.                 UPDATE YourTable
  8.                            SET YourVar = @YourValue
  9.                            WHERE YourVar = @YourValue
  10. END
Open Source Junior Developer
Posted on by Diogo Raminhos This entry was posted in News & Updates, SQL Series and tagged , , . Bookmark the permalink.

Google Maps v3 and JQuery Tabs (jQuery tabs google maps bug)

If you are struggling against some problems with google maps and tabs be aware that, in order to avoid problems, jQuery sets the width & height of every hidden element to Zero.

To fix this problem all you have to do is trigger the resize event and the map will be working as it should.
To trigger the event all you need to do is:

  1. google.maps.event.trigger(map, ‘resize’);

You should use the “show” method of your tabs in order to trigger the event, need an example?

  1. $(‘#tabs’).tabs({
  2.         fx: { opacity: ‘toggle’, duration: 1000 },
  3.         show: function (event, ui) {
  4.                 google.maps.event.trigger(map, ‘resize’);
  5.         }
  6. });

Dont forget to change the “map” variable to your map object holder.

Open Source Junior Developer
Posted on by Diogo Raminhos This entry was posted in JQuery, Open-Source, Software and tagged , , , , , . Bookmark the permalink.

Quick Tip: Flex Error Feedback (errorString)

If you are looking for a simple and quick method to feedback errors on a form you can use someInputElement.errorString = “Your Error Here”; and you’ll have a nice, clean and quick way to display errors on forms.

Open Source Junior Developer
Posted on by Diogo Raminhos This entry was posted in Flex, Open-Source, Software and tagged , , , , , . Bookmark the permalink.

Umbraco Team Tips: Multi developers – Republish all nodes

If you’re working with multiple developers in an Umbraco project you should be aware that every time someone updates content trough the backoffice you’ll have to republish the modified article in each developer working area, you can do it quickly by republishing all nodes on umbraco (Choosing “republish entire site” in the main content node), just choose this option and follow the republishing process:

Open Source Junior Developer

JsonViewer for Chrome

If you work with jQuery as much as I do You’ll love this extension and It will save you some time.

You can find it here and you’ll finnaly see JSON quickly like this on chrome:

Open Source Junior Developer
Posted on by Diogo Raminhos This entry was posted in General-Tech, JQuery, Windows and tagged , , , , . Bookmark the permalink.

Facebook Share Cache

Quick Tip:

If You’re having troubles with the facebook sharer cache you can find this post from FBMHell (Funny Name) very useful.

Either you want to update your image, title or description you just need to use the facebook URL Linter Utility that you can find over the Facebook Developers Area (Right Here).

Now you can focus on more important things, since you will be able to refresh your facebook page fetch anytime you want.

P.S. : You will start seeing more quick tips from now on around here…


Flex Share on Facebook

Hello!

I’ve been saving this snippet of code for ages but now I had a little time to share it with all of you flex lovers out there.

If you are trying to share some content trough the world’s biggest social network get ready: Because it’s incredibly simple.

Share on facebook in less than 30 seconds: Copy & Paste into your solution, Call the function  and Facebook will start generating traffic into your site!

  1. /**
  2.  * Flex Share on facebook – quick & easy way
  3.  **/
  4. public function ShareOnFacebook(shareUrl:String):void
  5. {
  6.         var openUrl:String = "http://www.facebook.com/sharer.php?u="+shareUrl;
  7.         navigateToURL(new URLRequest(openUrl), ‘_blank’);
  8. }
Open Source Junior Developer

Simple Skinnable JQuery Lightbox

Hello!

Today I’m bringing you the latest DigitalWorks release: a simple & skinnable JQuery lightbox.

You can download it here.

The code is documented so it can be easily understood.

Installation

The lightbox install is divided in four simple steps:

1. Extract the *.zip contents into your root directory.

2. Add the following code to your page “HEAD” section:

  1. <script src="Scripts/jquery.js" type="text/javascript"></script>
  2. <script src="Scripts/jquery-ui.js" type="text/javascript"></script>
  3. <script src="Scripts/dw_lightbox.js" type="text/javascript"></script>
  4. <link rel="stylesheet" href="Styles/dw_lightbox.css" type="text/css" media="screen" />

3. Add the following code right before your body close tag (</body>):

  1. <!–lightbox:start–>
  2. <!–Add on the footer of your page (Before the </body> tag) –>
  3. <div id="ShadowLightbox" class="ShadowLightbox">&nbsp;</div>
  4.  
  5. <div id="ContentLightbox" class="ContentLightbox">
  6.   <div class="ContentLightboxTitle">
  7.     <table width="100%" cellspacing="0" cellpadding="0">
  8.       <tr>
  9.         <td>
  10.           <div id="titleLightbox">
  11.  
  12.           </div>
  13.         </td>
  14.         <td align="right">
  15.           <div id="LightboxCloseButton" class="ContentLightboxCloseButton" style="display:none; float:right;">
  16.             <a href="javascript:CloseLightbox();">
  17.               <img src="Images/BtClose.png" onmouseover="this.src=’Images/BtCloseOver.png’"onmouseout="this.src=’Images/BtClose.png’">
  18.             </a>
  19.           </div>
  20.         </td>
  21.       </tr>
  22.     </table>
  23.   </div>
  24.  
  25.   <div id="bodyLightbox" class="ContentLightboxBody">
  26.     <div id="wrapperLightbox" class="ContentLightboxWrapper">
  27.       <span id="LightboxContent"></span>
  28.       <input type="button" onClick="CloseLightbox();" id="LightboxButton" style="display:none;"></a>
  29.     </div>
  30.   </div>
  31. </div>
  32. <!–lightbox:end–>

4. Call the OpenLightbox function and/or skin your lightbox!

  1. /**
  2.  * OpenLightbox
  3.  * This function centers an element on the screen.
  4.  *
  5.  * Args:
  6.  * title – The title for the lightbox
  7.  * contents – The contents for the body of the lightbox
  8.  * buttonText – null to hide the button or text to a button that closes the lightbox
  9.  * callbackFunction – null or a callback to call on lightbox close.
  10.  * reloadCallback – null or a callback to call on lightbox reload (hide and show)
  11.  **/
  12. function OpenLightbox(title,contents,buttonText, callbackFunction, reloadCallback)
Open Source Junior Developer