Monday 28 February 2011

corel draw, [technique], how to cut a box / rectangle, with the shape of artistic

problem:
how may cut / trim a box, with the shape of letters

solution:
- draw a ractangle and fill it with a color
- create an artistic text
- place the text over the rectange you want to cut
- activate the "Shaping" panel. to do this go from the top of the pull down menu: Arrage -> Shaping -> Shaping
- on the panel now there is the Shaping panel, do not change anything. It should look like this: "Trim" is the shaping method, Leave original: [v] source object, [ ] target object
- select the artistic text object you have create
- press the "Trim" button from the Shaping panel (the mouse will be changed as trip operation)
- now select the rectange behind the artistic text
- you have completed the operation, mode the objects to see that you did! =)

of course you may use this technique to make cut and wholes with any shape in corel draw
enjoy the art oh hole

Friday 25 February 2011

winxp, win2003 server, Problem loading the Group Policy security settings

The error message:
---------------------------
Security Templates
---------------------------
The Group Policy security settings that apply to this machine could not be determined.
The error returned when trying to retreive these settings from the local security policy database (%windir%\security\database\secedit.sdb) was: The parameter is incorrect.
All local security settings will be displayed, but no indication will be given as to whether or not a given security setting is defined by Group Policy.
Any local security setting modified through this User Interface may subsequently be overriden by domain-level policies.
---------------------------
OK  
---------------------------

lets start

Wednesday 23 February 2011

how to use your own internet outgoing mail server (smtp), as your provider doesn't allow you to use it

situation
Many providers doesn't allow you to send emails from your company's internet outgoing mail server (smtp), for instance: mail.mycompany.com. The provided reason by the provider is that if you use their connection for spam activities, even if using different outgoing server, provider's ip address will be marked as spam and will be banned in future from other internet servers. The only way is to use the smtp provided by your provider... and this the most easy solution.

problem
In case you use laptop and change several network places (aka providers), you cannot use the provider's smtp... but your company's smtp. So... how to get connected with smtp via your problematic provider???

solution
You must change the tcpip port connection with your smtp.
Of course this change must be done together on smtp and on your client. But some servers doesn't have this setting or even worst this change must be made to all clients that use this smtp server, that means to all employees of the company! forget it!

Take a deep breath... the easiest way to do this... is to turn the client to connect with smtp server with SSL connection. The SSL communicates in different port that is not blocked by your provider... so the steps are...

1. ask from your server administrator... the "outgoing smtp sll tcpip port". this number could be 465 or 567 or 587 or what ever

1.1 if you are the administrator :), see the cpanel (or what ever panel) help about how to configure the email clients. there you will find the port number that is already activate for the smtp ssl connection.

the follow instructions are for msoffice2007/2010, do accordingly on your client

2. file -> accounts settings -> select the email account you want to change -> press the "change" button -> more settings -> outgoing server

3. here, check the required authentication and if the username and password are diffferent from the incoming server, check you use them and type them

4. goto to "advanced" tab



5. here, as "outgoing SMTP" enter the port where administrator told you, 465 or what ever

6. also, as "encrypted connection" select "SSL"


7. now... the most complex part is here... on first email send process, the client will request certification from the server, and you have to accept it. Agree with the follow messages will appeared and the certification will be stored in your computer for the future outgoings.


These settings of outgoing connection, you may apply them in all of your problematic accounts.

Sunday 20 February 2011

Flex, how to make the cursor handpoint


Make the mouse Handpoint over Image component
this technique, show the mouse point handpoint on images

public function Handle_SelectMag_MouseOver(event:MouseEvent):void {
Image(event.target.parent).buttonMode=true;
Image(event.target.parent).useHandCursor=true;
}
public function Handle_SelectMag_MouseOut(event:MouseEvent):void {
Image(event.target.parent).buttonMode=false;
Image(event.target.parent).useHandCursor=false;
}

in general...how to make handpoint on a visual component
--- make it handpoint (on mouseOver event)
buttonMode=true;
useHandCursor=true;

--- make it normal (on mouseOver event)
buttonMode=false;
useHandCursor=false;

Flex4, image component, how to get dimensions of a Image... actual size, applied size etc


problem:
Searching at internet I didn’t find a correct distinction about the available values about the dimensions that Image component gives. Adobe's reference help of course has complete definition of these propoerties... but lets summarize them.

solution definition:
--- Image.width, Image.height
this is the width and height of the component that shows the image
--- Image.measuredWidth, Image.measuredHeight 
these are the actual dimensions of the Image, irregardless the previous dimensions and if the image is scaled
--- Image.contentWidth, Image.contentHeight
these are the dimensions that image have now at the Image component, dimensions as scaled image

Further problem… Many values are returned as 0 zero or NaN
When you assign data to “data” property… the Image component doesn’t do all the do job it must do… you have to give it some time to complete all it's the pending issues… 

Solution... 
EVENT!!! Wait for the event Image’s event “updateComplete” and there… check again if the width property (you want) is NaN or not, using the isNaN function.

The event handler will look like this:

  internal function Handel_imPhoto_updateCompleted(e:Event):void{
                  if (!isNaN(im_photo.measuredHeight))
                          height= im_photo.measuredHeight;
           }

Friday 18 February 2011

If my computer beeps and fails to boot, what do the beeps mean?

On startup, computers perform a Power-on Self Test, commonly referred to as a POST. If problems are found while booting, you can usually diagnose them using the error codes displayed on the screen. However, if nothing displays on the screen, the computer might use sounds (i.e., beep codes) to tell you what is wrong. Many of these errors indicate hardware problems that a service technician should fix. However, some errors are easily fixed. For example, keyboard controller errors often mean that your keyboard isn't plugged in. Following are beep codes for some common brands of BIOS for PCs. For information about Macintosh beep codes or startup tones, see article 58183 (older hardware) or article 58442 (newer hardware) in Apple support.
Note: Many BIOSes will have different beep codes even if they appear to be from the same manufacturer. This is because motherboard manufacturers reprogram codes to reflect their own customizations. You can often go to the web site for the motherboard's manufacturer to find the updated codes, but you may find cases where the manufacturer simply does not document the changes.
For more about beeps and error codes, see ComputerHope.com's Computer POST/beep codes.

Thursday 17 February 2011

Flex4, how to use mx:TextArea and mx:RichTextArea in Spark world

situation
With new spark components, some old ms components are not implemented yet in spark version, or are exist and it is complex in use.

benefits
with this ms version of these two components, you allow the user to use a nice editor with format text abilities, and represent this formated text (it is html encoded) using only one property, the htmltext.
Till now in Flex 4 and Spark we have no these two power and easy to use components, we hope Adobe to be reasonable and to do not downgrade us more!

problem
how to add mx:TextArea and mx:RichTextArea in spark application? the mx complents doesn't exist in components pallete

solution
open the mxml source code... and insert the two follow lines.
    <mx:RichTextEditor x="0" y="50" width="400" height="200"/>
    <mx:TextArea x="0" y="210" width="400" height="100" />
these lines are creating the RichTextArea and TextArea on you design place.

Wednesday 16 February 2011

Flex, ActionScript 3, How to Handle the... NaN (Not a No-brainer)

situation
In ActionScript 3, you can no longer assign null to specific native data types. If you try to do this with 'Number' for example you'll receive a warning that 'null used where Number type expected'. Take the following code snippet for example:
var MyNumber:Number;

MyNumber = getNumber();
if (MyNumber == null)
{
// do something
}

If you try to return 'null' from the getNumber() method you'll receive the aforementioned warning.

Although this is only a compiler warning, perhaps the better way to handle this is to have getNumber return NaN (and make the comparison against NaN) since in ActionScript 3 the default value of the Number data type is now 'NaN'(Not a Number). This leaves us with this:
var MyNumber:Number;

MyNumber = getNumber();
if (MyNumber == NaN)
{
// do something
}


problem
But NaN is a funny kind of beast in ActionScript. If you tried to code things like they are above, you would receive another compiler warning, 'illogical comparison with NaN. This statement always returns false'. Any comparsion with NaN returns false in fact, suprisingly, even this one:
if (NaN == NaN)
{
}


solution
Your best bet is to never deal with NaN directly but instead use the built in isNaN function to correctly evaluate whether your variable is not a number.
var MyNumber:Number;

MyNumber = getNumber();
if (isNaN(MyNumber))
{
// do something
}

Monday 14 February 2011

Administator's password recovery on Windows XP

works only:
- with windows xp, with any sp version.
- you must have physical contact with the machine!
- you must have windows installation cd, recommended with the same sp of computer, cracked or not

Problem:
- I forgot my password of windows system
- I Forgot My Administrator Password!
- I want to hack my friend's computer
- I want to open my boss's computer, to see the date he will fire me
- I want to crack a computer's password for good reasons...

Solution:
It is very easy to open it. Do not spend money for recovery password applications, as this solutions it works even with sp3!!!

The only required thing you must have, is a windows cd with the same service pack with the computer you want to unlock. This cd could be a cracked versions, it could be sp3.

This solution works with a security whole left on installation cd; this hole is still in sp3. As this security hole is on the installation cd... it is difficult to be closed from windows update.

cables combination for "sprinter wifi rs232" product

product:

With Sprinter Wireless System for POS and Kitchen Printer, you make the rs232 of a computer with any system... wireless!


problem: 
Manufacturer doesn't supply you with cables for:
- 80mm (kitchen) printers with db9 rs232 connector <-> sprinter KP unit,
- additional cables computer <-> sprinter POS unit.



solution:
Bellow are all cobinations for all kind of cables you may need.
You will need a "db9 to rj45 kit" male or female, you may get it from shop with electronics.

connection from Computer to Sprinter POS Unit
DB9 F --> rj45 db9 kit, number and color
8 --> 2 orange
6 --> 3+1 black+blue (bridged)
5 --> 4 red
3 --> 5 green
2 --> 6 yellow
 
connection from Sprinter KP unit to printer
DB9 M --> rj45 db9 kit, number and color
6 --> 1 blue
4 --> 2 orange
7 --> 3 black
5 --> 4 red
2 --> 5 green
3 --> 6 yellow
 
connection from Sprinter KP unit to printer
DB25 M --> rj45 db9 kit, number and color
20 --> 1 blue
5 --> 2 orange
6 --> 3 black
7 --> 4 red
3 --> 5 green
2 --> 6 yellow


about the product
http://www.ycr.co.uk/html_files/sprinter.htm

Saturday 12 February 2011

Flex4, the parent is not scrolled with mouse wheel; or in general how to pass an event that is consumes by a component

problem: you have create a Flex Module (or a simple Group or in general a DisplayContainer) that consumes the mouseWheel event, as result the parent of this Module doesn't scroll any more and the mouse wheel seems to be stuck when it is on this Module. The same is happening in Flex 3 on Image component.

situation: you have to pass the event to the parent, in order to parent process the event The problem occurred because in general the components you use with the properties you have it just get the mouseWheel event and they consume it. This might be happen when the policy of the scrolls of your containers is off.

solution: go to your Flex Module, and define the follow code at mouseWheel event
    DisplayObject(event.target).parent.dispatchEvent(event);
           you may copy this code on design time as value of the mouseWheel event

Monday 7 February 2011

how to turn Firefox in full mode on startup (for iKiosk terminals)


problem:
how to make Firefox to start in full screen / full mode on start up?

situation:
there is no way to do it from "settings" or from "about:config" :p

solution:
add on!
https://addons.mozilla.org/en-US/firefox/addon/full-fullscreen/

Sunday 6 February 2011

How to embed images in Actionscript 3 / Flex 3 / Flex 4 in the right way?

situation: 
It is useful to embed images especially for banners. But Flex 4 doesn't provide Library to import your stuff!

problem:
How to embed the images in the swf?!?

solution:
The embed process is very simple, just follow to follow steps:
1. copy your image files where the "src" folder is of your application. the Flex 4 will get these files from there. Of course you may define sub folders to do not mess up.
2. In your class define like the example bellow
    [Embed (source="728x90a.jpg" )] 
    public static const imgData1:Class;
                The 728x90a.jpg is the file name of the image (I didn't use sub folders here)
                The imgData1 is the object where contains the data of the embedded image!
3. Somewhere in your code, load the data into a visual component, like the example bellow
    img1.source=imgData1;
                The img1 is an Image component.
4. That's all... now read my recommendation bellow

!attention!
1. You should compress the images downgrading their quality in order to be small in file size! swf files with huge images are huge for downloading and launching by flash's player!
2. This technique is for small photos, banners and so on. You may use it but it is not recommended at all for application with interfaces and so on, it is not professional solution. The reason is that the application is heavy for launch. Use the Image.source property defining the full url address of the files image instead to embed it.

Thursday 3 February 2011

failed to define the default email client and sync problem with pda (wm6.5)

three in a row... three problems in an row...


specs: system w7 64bit, msoffice 2010 pro, pda htc diamond 2 with win mobile 6.5.

1. Every time I open the ms office, is asks me: “Outlook is not currently your default program for E-mail, Calendar and Contacts. Would you like to make it the default program?” Every time I said "Yes"... and every time it asks me. I found and I ran the MicrosoftFixit50565.msi but the problem persist.

2. When I connect my pda, the WMDC asks me to create a new partnership or just be guest. I select to create partnership and I get this message:"Either there is no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Outlook and set it as the default mail client." ... ok... this might be solved if the problem 1 solved

3. Continuing creating the new partnership... asks me what kind of items I want to sync... the problem is that the Contacts and Calendar item (where I want) is shown gray, they are checked and they have the information"already synchronizing" . Continuing the process and making a complete and success Sync process... the pda is not informed with anything.
I tried to delete the partnership and trying again several times... with no result. I don't know if there is something to do on the pda's side...

the simple solutions (without throw them all away...)

problem 1:

try 1:
1. close the ms outlook (and possibly any other email clients)
2. do a backup of your registry (export the keys you will edit or do a "restore point".
3. run the "regedit" and go to at HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail
4. delete any subkey you see there
5. start the ms office

try 2:
1. close the ms outlook (and possibly any other email clients)
2. do a backup of your registry (export the keys you will edit or do a "restore point".
3. run the "regedit" and go to at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Outlook (the red text might be different according the specific version of the office you hace
4. delete any subkey you see there
5. start the ms office

try 3:
go to at http://support.microsoft.com/kb/813745 , download the run this hotfix code name: 50565


try 4:
pray to God... Microsoft's spirit hit again...


Problem 2&3 (the tragic problem)

Are you serious? Do you want to sync with ms office 64bit? Doesn't this message "Either there is no default mail client or " makes you understand that you are doing something inappropriate?!?

You can't babe, till this time I am writing these lines ms office 64bit cannot sync with any pda because of Microsoft' internal incompatibility!!! The error message is totally faulty and misleading; it guided me to spend several hours of stupid research where nobody will pay!!! Shame on you Microsoft!


According the Microsoft's article http://technet.microsoft.com/en-us/library/ee681792.aspx :
"Windows Mobile Device Center (WMDC) synchronization   WMDC does not synchronize with Microsoft Outlook 2010 if you use the 64-bit version of Outlook 2010. In such cases, an error message displays that states that there is no default mail client or the current mail client cannot fulfill the messaging. WMDC synchronizes correctly with the 32-bit version of Outlook 2010. To synchronize a Windows Phone with Outlook 2010 by using Windows Mobile Device Center, uninstall Outlook 2010 64-bit. Then use the original installer that you used to obtain Outlook 2010 64-bit to install Outlook 2010 32-bit. Outlook 2010 32-bit is the default option."


The good news is that at least they have report is somewhere... even very hidden!


Wednesday 2 February 2011

msoffice, all my anual appoitments are changed and now occured every 12 mothns!!!

This is caused by Outlook's ability to set an appointment's recurrence to "every x years". This recurrence setting was added to Outlook beginning with Outlook 2007 SP2 but this recurrence pattern is not supported by Window Mobile's calendar.

Because Outlook 2010 also includes this yearly recurrence option, this bug will continue to be a problem for people who sync their device with multiple computers.


While there is not a fix available yet (other than not upgrading beyond Outlook 2007 SP1), users affected by this bug can try setting an end date on recurring items. The end date should be just a couple of years into the future. Note that this doesn't solve the problem for everyone. Existing events need to be fixed either manually or using VBA. A VBA sample and links to additional VBA samples are at Birthdays recur every 12 Years

In this calendar sync bug, All Day events that recur yearly are changed to recur every 12 years. This bug first appeared with the release of Office 2007 SP2 and affects devices that sync with Outlook 2007 using ActiveSync. It may only affect users who sync their device between two different computers.
Outlook's recurrance dialogThe problem is related to Outlook's ability to set an appointment's recurrence to "every N years". This recurrence setting was added to Outlook beginning with Outlook 2007 SP2 but this recurrence pattern is not supported by Window Mobile's calendar.
To fix this problem (and a long list of other issues) install the following hotfix:
Description of the Office Outlook 2007 hotfix package (outlook-x-none.msp): April 27, 2010
http://support.microsoft.com/?kbid=981048


good luck
microsoft is around

How to Display HTML text in the Spark TextArea

 It isn’t immediately obvious how to display HTML text in a Spark TextArea. Back in the MX days we had textArea.htmlText which is pretty easy to use. But no such beast on the Spark version.
With a Spark text component you have to run your HTML text through a multi-dimensional phase-inducer which is handily provided through spark.utils.TextFlowUtil.importFromString( myHTMLtext );
But you don’t send the output of the importFromString method to the textArea.text. No, no, no. That would be toooo easy. With Spark there’s a new thingy called textFlow. That’s what gets the output of the importFromString() method.

Here’s a very simple example
myTextArea.textFlow = spark.utils.TextFlowUtil.importFromString(
  'some <span fontWeight="bold">bold</span> text.' );

There are a few issues that I’ve found with the new Spark Text components. First, I cannot get embeded <span> tags to render. For instance I can’t change the fontWeight to bold and also change the fontSize to, say, 16 on the same text. I’m not sure what’s up with that.
Also, I cannot get unordered-lists to display at all. Perhaps these are just issues that will be resolved when Flex4 is ready for primetime. If you know anything about this I’d love to read about it in the comments.
One interesting bonus I found is that creating a link automatically turns the text blue and underlines it. I’m not sure how you would override that but it’s nice that it doesn’t show up as just regular un-formatted text.
What’s funny is that starting out this was just going to be a simple example with two text fields where you could type in your HTML and then see it rendered below. Then I thought I’d add a button to make the selected text bold. And then italic. And on and on. Sometimes I just don’t know when to quit.
More examples at  Setting text in a Spark RichText control in Flex 4 at blog.FlexExamples.com.

Note also that you may use the old mx:TextArea where support your favorite htmltext propetry
open the source view of your mxml, and drop the follow lines
    <mx:TextArea x="0" y="2" width="400" height="200">
    </mx:TextArea>

Tuesday 1 February 2011

Flex4, I can't get the size (width, height) of the Image component, when it is loaded

problem:
Flex4, I can't get the size (width, height) of a loaded pisture in Image component, when it is loaded from internet (and not only).

situation, what is really happening:
the event for complete download on the Image component is the "complete" event. This event is comming from the SWFLoader ! and because if that you might be can't get the width and the height of the loaded image; because it is not processed yet from the Image component.

solution:
the solution is simple, listen to "resize" event instead of "complete".
For professional handle you should listen both events.

read more about the Image's events (and not only)