Blogadda

Blogadda
Visit BlogAdda.com to discover Indian blogs

Friday, March 27, 2009

First convert Hex to Byte Array(http://www.codeproject.com/KB/recipes/hexencoding.aspx)



string hexString = txtHex.Text;

int discarded;

txtByteCount.Text = ((int)HexEncoding.GetByteCount(hexString)).ToString();

txtLength.Text = hexString.Length.ToString();

byte[] byteArray = HexEncoding.GetBytes(hexString, out discarded);

txtDiscard.Text = discarded.ToString();

string temp = "";

for (int i=0; i


{

temp += byteArray[i].ToString("D3") + " ";

}

txtByte.Text = temp;

txtHex2.Text = HexEncoding.ToString(byteArray);






Then Convert Byte Array to Image

(https://secure.codeproject.com/KB/recipes/ImageConverter.aspx?fid=337686&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2182648)

public Image byteArrayToImage(byte[] byteArrayIn)

{

MemoryStream ms = new MemoryStream(byteArrayIn);

Image returnImage = Image.FromStream(ms);

return returnImage;

}






After that image to any type (gif etc)

public byte[] imageToByteArray(System.Drawing.Image imageIn)

{

MemoryStream ms = new MemoryStream();

imageIn.Save(ms,System.Drawing.Imaging.ImageFormat.Gif);

return ms.ToArray();

}






Also



img=Image.FromFile("test.jpg");
img.Save("test.png",ImageFormat.Jpeg); //so simple :-)






Also the useful links



http://www.codeproject.com/KB/web-image/pnguploader.aspx

http://msdn.microsoft.com/en-us/library/ktx83wah.aspx

Wednesday, March 18, 2009

ACE questions

Q1. What is default frame rate of the timeline in frame per second ?

* A. 1
* B. 12
* C. 24
* D. 30

Q2. What is the effect on the instances of a symbol if the symbol itself is changed ?

A. All instances change accordingly.
B. Only future instances change accordingally.
C. Only the current selected instance changes accordingly.
D. Symbols cannot be changed once instance of the symbol have been created.

Q.3 What is the key purpose of using layers in a timeline ?

A. To determine when things appear in your movie.
B. To separate assets playing at different .
C. To handle the four button states
D. To organize the stacking order of assets.

Q4. Which of the following is the recommended character to use to separate target level paths levels?

A. / (slash)
B. $ (Dollar sign)
C. _ (underscore)
D. % (percentage sign)

Q5. If the oilpump movie clip instance in path _root.car.engine.oilpump.clamp uses the following line of actionscript, _parent.someAction;, which movie clip instance is being referenced ?

A. Car
B. Engine
C. Oilpump
D. Clamp

Q6. How many levels does Flash MX support ?

A. 20
B. 80
C. 100
D. 1000

Q7. In which level does the original movie resides ?

A. 0
B. -0
C. 1
D. -1



Q8. What happens if an .swf is loaded into a already occupied level ?

A. An error is thrown.
B. The new swf is rejected and the old one stays.
C. The old swf is unloaded and the new swf is loaded.
D. They share the same level

Q9. What are the correct statements consenting text field ? (Choose Two)

* A. Embedded font outlines are shared by text fields using the same font.
* B. Font Outlines for static for static text field are embedded in the SWF file by default.
* C. Font outline for input text field are embedded in SWF file by default.
* D. Individual font outlines are embedded in to the SWF file for each text field in the FLA file.
* E. Font outlines for dynamic text fields are embedded in SWF file by default.

Q10. What is the function of trace ?

* A. Initiate the automatic debugging procedure.
* B. Discover who has downloaded your movie.
* C. Send String Values to the output panel.
* D. Determine what objects are presents on stage ant any one time.

Q11. Which statement concerning symbol instance statements are correct? (Choose Two)

* A. The Hit State of a Button Symbol instance is invisible at runtime.
* B. Graphic symbol instances may be directly controlled using action script.
* C. If a fill color in a graphic symbol is changed, all instances of graphic symbols are changed.
* D. A movie clip symbol instance may have a different frame rate than the main timeline.


Q12. What is the advantage of progressive video download ?

A. The frame rate of video file can be different from the frame rate of the SWF file..
B. Delivery of media is more secure than streaming video, because media does not get saved to the client cache when streamed.
C. To play the progressive download video, the entire movie must be downloaded before video will be start to play.
D. It usages less of the client memory and disk space than the streaming video download.

Q13. What methods are used to pass variables out of flash to a server side solution ? (Choose Three)

* A. LoadVars
* B. GotoAndStop
* C. getURL
* D. LoadMovie

Q14. What is needed when using static text to have font outline embedded in SWF file ?

* A. Nothing, Font outline are embedded by default.
* B. Select new font in the library panel menu.
* C. Select the alias button in the properties panel.
* D. Select use device font form the properties panel.

Q15. A button instance is named circle_btn. Actionscript is placed on the main timeline so that the button is clicked a movie clip instance named rec_mc's width is changed to 100.

What is the code to perform this action ?

* A. circle_btn.onRelease = function() {this.width=100;}
* B. circle_btn.onRelease = function() {rec_mc.width=100;}
* C. Circle_btn.onRelease = function() {rec_mc.width=100;}
* D. circle_btn.onRelease = function() {rec_mc._width=100;}

Monday, March 9, 2009

STAFF NOTICE - TOILET POLICY

STAFF NOTICE - TOILET POLICY :
Effective immediately, a toilet policy will be established to provide more consistent method of accounting for staff during working hours, thus ensuring effective time management & equal treatment of all. In the future, the doors to all toilets will be equipped with computer linked voice recognition devices, which can only be activated to open at the sound of a person's voice. Staff must therefore immediately provide management with 2 voice prints, one in normal tone & one under stress/desperation.


The following rules shall also apply:

1. On the first day of every month, all staff will be issued 22 toilet trip
credits.

2. Once toilet trip bank reaches zero, the doors of the toilet will
not unlock to your voice until first day of next month.

3. All cubicles are to be equipped with timed roll extractors. If stall
occupied more than 3 minutes, alarm will sound. Paper will retract into
dispenser 30 seconds later and toilet will flush and door will open.

4. If toilet remains occupied, your photo will be taken and appear on TOILET
OFFENDERS
board.

5. Anyone caught smiling will undergo counseling.

6. Be advised that workers company insurance does not cover any injuries incurred
while trying to stop toilet paper retracting into dispenser, or keep door from
opening.

hahaha.. too humourous......