Friday, November 23, 2012

Upcoming Events

Since I am adding promotional products to expand my horizons, I feel I should explain a bit about recent and upcoming events.

1. I have recently added a business page for YetiMnky.

2. I have created a couple of online stores, which I have already posted at the following facebook page. These links will also be created here, but at a later time.

3. I plan to continue programming and posting my ideas and software, but these will come at a later time as well, as they do take time to create. Finished products will be added to a CodePlex, SourceForge, etc. for easy downloading.

4. I plan on blogging about other topics in the near future.

5. I plan to continue making modifications to the layout of this blog.

6. I may be changing the above navigational links to reflect home, blog, software, and knowledge. There may also be affiliate and/or advertisement links added. I hope to make home a dashboard for yetimnky related sites, giving updates for facebook and twitter, and recent posts for blog, software, and knowledge sections.

YetiMnky

Do to 5 classes and personal reasons, I haven't spent as much time on this. These events will take some time.

Please donate. I hope to eventually be able to host my own blog.
read more

Thursday, November 15, 2012

Javascript - Format links for blog

I was previously planning a series of posts on the wix toolset, and wanted to display the reference link with some formatting, like facebook. Since there is no reliable cross-domain access to the title and description using jquery (that I know of), and I do not have a site to get this information, it does require some manual work. As a draft, subject to change, here is a simple solution:

CSS
a.extendedLink
 {
text-decoration: none;
  width: auto;
  height: auto;
  padding: 0px;
  margin: 0px;
  display: block;
 }
 
a.extendedLink:link
{
 text-decoration: none;
 width: auto;
 height: auto;
 padding: 0px;
 margin: 0px;
 display: block;
}

a.extendedLink img
{
 width: 30px;
 height: 30px;
 vertical-align: middle;
 padding: 0px;
 margin: 0xp;
}

a.extendedLink header
{
 border-bottom: 1px solid gray;
 font-size: 30px;
}

a.extendedLink description
{
 margin-left: 5px;
}

a.extendedLink:hover
{
 text-decoration: none;
 width: auto;
 height: auto;
 padding: 0px;
 margin: 0px;
 display: block;
}


Javascript
$(document).ready(function() {
  var map = { 
   'a.extendedLink[href^="http://"]': /^(http:\/\/[^\/]+).*$/,
   'a.extendedLink[href^="https://"]': /^(https:\/\/[^\/]+).*$/ 
  }; 
   $.each(map, function (key, value) {
   $(key).each(function () 
    {
     var link = $(this);
     var html = link.html();
     var url = link.attr('href');
     var title = link.attr("title");
     var icon = url.replace(value, '$1') + '/favicon.ico';

     console.log(icon);
     var header = $('
' + html + '
'); var img = $(""); var description = $('' + title + ''); var imgCheck = new Image(); imgCheck.src = icon; imgCheck.onerror = function() { img.attr("src", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSuagEm4fjs5bVXRoCwzxShyphenhyphen2bJWe5DVan-3bZ6aWxHfBDG4YNX_6CCtm_fORme_octD2YPtz8PEXuhe9gtKDoVrvsGc2RC3y_9xOTuQEIrvQsHhdh9yieTNqGe17tBfMZVN62xIU1xwA/s1600/6930ico_question.ico"); } link.attr("target", "_blank"); link.attr("rel", "nofollow"); link.html(""); header.appendTo(link); img.appendTo(link); description.appendTo(link); }); }); });
Default Image

Explanation

After the document is ready, for each link with class name 'extendedLink' and a href starting with 'http://':

  1. Create array map to hrefs (http, https) - map
  2. For each item in the array, do the following steps for each link(extendedLink)
  3. a reference to the link will be created - link
  4. collect the current html - html
  5. collect the current attribute 'href' - url
  6. collect the current title - title
  7. collect the icon location based on the base address - icon
  8. set the header with the current links html - header
  9. set the image with the collected icon location - image
  10. set the description with title - description
  11. create Image() with icon src and add src default if image has error loading
  12. set link attribute 'target'
  13. set link attribute 'rel'
  14. set link html with header, image, and description
References
Own experiences...

JQuery andreaslagerkvist
read more

Wednesday, November 7, 2012

Crystal Reports - No Printer Option


Problem:

System.Runtime.InteropServices.COMException (0x80004005): The Report Application Server failed
System.Runtime.InteropServices.COMException (0x80000201): Invalid printer specified
System.Runtime.InteropServices.COMException (0x80000200): Print engine not opened


//It has been some time since I received these errors and do not remember, but this may also be an error that may occurr:


Error in file: {%TEMP%}.rpt: The request could not be submitted for background processing


Fix:

Make sure the the 'No Printer' checkbox is checked in the page setup of the crystal report:


  1. Have project open, and crystal report document open.

  2. Select Crystal Reports -> Design -> Page Setup...

  3. The Page Setup window will appear.

  4. Select No Printer checkbox.



Alternatively, right-click the designer area, and select Design -> Page Setup...





Explanation:

In my case, when using the below snippet, crystal reports engine would first check the selected printer from the page setup, and then print to the provided domain printer.


rpt.PrintOptions.PrinterName = "//domain/printer/";
rpt.PrintToPrinter(1, false, 0, 0);  



This was an issue. It became apparent that there was a problem when one customers eventLogs indicated "Invalid printer specified", and another customers eventLogs indicated a random occurrence of all the provided errors. Even though the reports had been deployed to the customers, the reports had been setup with a default printer that pointed to our local domain.


Crystal Reports Runtimes:

......I also speculate that the versioning of the crystal reports runtime makes a difference in this situation. I did not make any changes to the page setup options nor am I aware of any other developers making any changes. I do believe these errors began after upgrade to runtimes 10.5.2. This is just speculation.


11-07-2012
Zaryk
read more

Introduction

So, an introduction? I have been meaning to post instructions to various issues that i had during a 1 1/2 year stay at my last place of employment, and issues that I may receive during my learning process. Since my experience with coding is junior level, and work experience is limited, meaning I have bad habits through self taught studies, I find thorough fixes or solutions to be important.

In the upcoming posts I will talk about topics that may include crystal reports, c#, c++, xml, mysql, php, xcode, eclipse, html, jquery, as400, wcf services, or any other topic that may come to my interest.

Not only do I hope to help others, have my ideas commented on and corrected if needed, but also, promote my ideas and help organize my thoughts.

11-03-2012
Zaryk
read more