Sunday, 1 September 2013

Dynamic animation in flash and actionscript

Dynamic animation in flash and actionscript

longtime fan.
I wish to create a dynamic animation engine for my major creative project
in my current fine arts diploma. I have some programming experience in the
past but not specialized in the fields I'm currently researching.
I am wondering whether the idea I have is feasible and if so what
language/etc I would require to achieve it.
I realise this is a big question so I'll try to be as specific and
descriptive as possible
I am currently looking at using Flash and Actionscript 3.
The current simple description of operation is as follows:
User is presented with a drawing input whereby they can draw using just
black. Once they have finished their drawing they click a submit button
and the drawing becomes a frame in an ongoing animation.
However each frame that is submitted is analysed by the program and its
compared to all other frames currently in the animation. The program then
sorts the new frame (and possibly all or any appropriate other frames)
into the animation in an order where the pixel data is closest to the
frames either side of it.
The program could possibly do this resort in the background, or at
interval times or any way that works really.
The animations frame rate would also speed up partially over time as more
frames are added making the animation longer and faster (to a point
perhaps).
Perhaps:
framerate = totalFrames / n
or something along those lines
My current thoughts are:
I realise the most difficult aspect is the analysis, comparison and
re-sorting of frames in terms of their pixel location data. I feel it
could be possible through somekind of bitmap analysis.
As I am new to the question asking process if anything is unclear or bad
practice please pull me up and I will try to correct asap.
Thank you kindly.

Sharing URL On Facebook using Addthis

Sharing URL On Facebook using Addthis

we have a news website and using AddThis plugin to share news on Facebook
, sometimes when we try to share news on Facebook it doesn't detect the
page info (title ,desc , image ) and when we put the same URL on Facebook
debugger every thing running correctly and page info detected , and when
return to the web site and use the same URL we can share it normally .
the web site created using asp.net 4.0 + SQL server 2008 + iis 6 and the
website behind a firewall
thanks

"\n" newline and %n not work to begin newline

"\n" newline and %n not work to begin newline

I was putting simple loading animation to my previous code but I can't
fine a way to begin new line when its show the result.
JFrame frame = new JFrame("Max");
ImageIcon loading = new ImageIcon("ajax-loader.gif");
frame.add(new JLabel("Processing to Result \n Result of Maximum is :
"+max, loading,
JLabel.CENTER));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 300);
frame.setVisible(true);![enter image description here][1]
I also try to use newline and %n but both is not work...please help.

Saturday, 31 August 2013

Unix: How to sort a dat file and keep original line numbers

Unix: How to sort a dat file and keep original line numbers

I have a large data file containing over a thousand entries. I would like
to sort them but maintain the original line numbers. For instance,
1:100
2:120
3:10
4:59
Where the first number is the line number, not saved in the data file,
separated by a colon from the real number. I would like to sort it and
keep the line numbers bound to their original lines, with an output of:
2:120
1:100
4:59
3:10
If possible, I would like to do this without creating another file, and
numbering them by hand is not an option for the data size I'm using.

Is it possible to reference a package from not within an import statement?

Is it possible to reference a package from not within an import statement?

I'm writing a documentation about a Scala library. When I reference a
certain package I do this with a String, e.g. "com.my.example" but would
rather prefer to do this in a manner that gives me compile errors if
anything breaks (e.g. (com.my.example).mkString).
Of course my IDE will warn me about such situations when refactoring and
propose to fix those Strings for me. I'd just prefer to rely on the
compiler instead of the IDE. Is this in some way possible? (Creating
pseudo classes in each package to reference is not an option).

Is it okay to set title and meta description in php like this?

Is it okay to set title and meta description in php like this?

I'm setting page title and meta description dynamically on the pages of my
site http://jobfou.com, since http is stateless, like this.
<html>
<?php
ob_start();
?>
<title> <!--TITLE--> </title>
<body>
Some HTML Page Content From Database Goes Here.
<?php
//The PHP Code Here Gets executed on each page loads, dynamically.
$wholePageContents = ob_get_contents();
$post_title = "Page 1";
ob_end_clean();
echo str_replace("<!--TITLE-->", $post_title, $wholePageContents);
?>
</body>
<html>
Is it okay to set page title and meta description like this, calling
ob_start(); on each page load, what are the pros and cons, or should i
just go with using jquery. Which is better, and doesn't consume memory.

Show all the properties on a single map with markers?

Show all the properties on a single map with markers?

I am doing a small application with gmap3. I have stored all the
properties with the respective locations in mysql
database(longitude,latitude,country name,location name). Now I want that
all the properties should come with markers on google map. As I am using
gmap3 plugin I want to know how to show all the markers on a single google
map? Any help and suggestions will be really appreciable. Thanks..