php upload file, File input (or “upload”) in HTML forms, Uploading multiple files, PHP – File Upload
Latest Updates: code RSS
-
liduan
-
liduan
3 good topic about mozilla extension development.
Getting started with extension development
-
liduan
Mozilla Firefox Extension Development
Mozilla Firefox Extension DevelopmentView more presentations from Perry Loh. -
liduan
enable javascript and other HTML element in wordpress MU. open wp-includes/kses.php find following line
$allowedposttags = array(
add following codes
'script' => array( 'type' => array(), 'src' => array(), 'language' => array() ), 'noscript' => array( ), 'object' => array( 'height' => array(), 'width' => array(), 'type' => array(), 'data' => array(), 'allowfullscreen' => array(), 'id' => array() ), 'param' => array( 'name' => array(), 'value' => array() ), 'embed' => array( 'width' => array(), 'height' => array(), 'type' => array(), 'src' => array(), 'allowfullscreen' => array() ), 'coolcode' => array( 'lang' => array() ), //over
-
format '12345' to '12,345' javasc ...
liduan
format ‘12345′ to ‘12,345′
javascript:
string.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, function(s){return s+","})
ruby:
string.gsub(/(\d)(?=(\d\d\d)+(?!\d))/) { |match| match + ',' }
DecimalFormat class also can be used.
-
liduan
using python get current timestamp
>>>import time
>>>time.time()
//currenting timestamp to int
>>>int(time.time())
//converting to string
>>>str(time.time())
-
liduan
using python get friend timeline in twitter. following tools should be used:
python-simplejson
first install python-simplejson, if in ubuntu, just using command as follows
$apt-get install python-simplejson
then, downloading python-twitter , unpackage it. then using command
$ python setup.py build $ python setup.py install
then, open python.
>>> import twitter
>>> api = twitter.Api(“username”, “passworld”)
>>> posts = api.GetFriendsTimeline(‘username’)
>>> print [post.text in post as posts ];
for the file, the script should be liked:
import twitter
class mytwitter():def __init__(self):
self._config = Nonedef main():
api = twitter.Api('username', 'passworld')
posts = api.GetFriendsTimeline('username')
for post in posts:
print post.text.encode('utf-8')if __name__ == "__main__":
main()
-
liduan
work on the ruby on vista.
firstly, install ruby
next, install rails, by command “gem install rails”
then, create a new web app by rails by “rails project”.
if “project” has been create, it can be runned by command “ruby script/server webrick”.
lastly, open address “http://localhost:3000″ web browser.
-
liduan
very simple CMS system build by php. it provides support for mysql database, but not support template.
-
liduan
-
liduan
using c read each char and covert to long int:
while(*buffer != ‘\n’);
{
read(fileName, buffer, 1);
printf(” Byte: %s”, buffer);
}good way.
-
liduan
degrafa is a graph library based on the flex. it is compatible with flex 2 and 3. it also support other graph library, example of papervision3D(3D graph and animation library). there is a example that visual map based on the degrafa, pv3D and yahoo map.
-
liduan
some effect of the vbox in flex 3.
Clipping a Flex container’s content using the clipContent property
Changing a VBox container’s background size in Flex
Changing a VBox container’s background alpha in Flex
Changing a VBox container’s background image attachment in Flex
Setting the vertical gap between items in a Flex VBox container
Setting a Flex container’s vertical scroll policy
Toggling a Flex container’s visibility using states
Toggling a Flex container’s visibility
-
liduan
C / ANSI-C examples (example source code) Organized by topic
-
liduan
some sources for developing web server by c.
1. a simple httpd called tiny httpd.
2. “Illustrated Guide to HTTP” is a book for devemoping web server.
-
liduan
-
liduan
somethings can be using in showing strength in the flex spring graph.
1. show different colour for the node of spring graph.
2. show different edge of each node of the spring graph.
3. show different size of nodes in the spring graph.
-
liduan
The mx.controls package contains the Flex user-interface controls, e.g. textinput, label and textarea
-
liduan
flex app communicate with java via socket server. actionscript/flex program can send socket to a server. that means flex can communicate with other language or program without xml.
-
liduan
some good effect example for hide and show panel of flex 3. simple code and tutorial.
-
Warning: str_split() [function.str-split]: The length of each segment must be greater than zero in /home1/liduanbi/public_html/duanli/wp-content/themes/p2/functions.php on line 352
Warning: str_split() [function.str-split]: The length of each segment must be greater than zero in /home1/liduanbi/public_html/duanli/wp-content/themes/p2/functions.php on line 354
liduan
http://www.adobe.com/devnet/flex/samples/fig_panzoom/ simple zoom in/out map by flex.
-
liduan
google maps provide api for flash client. a tutorial for using google maps api by flex sdk. other one tutorial for installing and using google maps in flex.
-
liduan
make a visual earth based on the google earth by flex. it only supports ie, firefox and chrome. becouse it require google earth plug-in. resources.
-
liduan
a simple tutorial for kde4 widget development.
-
liduan
some good tutorial for flex list:
Making a horizontal list with clickable images as members
Flex – overriding scrollToIndex in HorizontalList to animate scrolling
Setting alternating colors on a Flex HorizontalList control
Creating a simple image gallery with the Flex HorizontalList control
The TileList control displays a number of items laid out in tiles.
-
liduan
some flex client for online map api is helpful for geographic locations application.
-
liduan
-
liduan
some resources about papervision3D:
-
23 Papervision3D Primitives (17 new ones)
-
Getting Started with Papervision GW
- flex 3 cook book provide very good example for papervision programming.
- Geocoding, work with yahoo map, dome.
-
Papervision3d Tutorials in Flex 3
-
-
liduan
I found a http server that developed by python. but it is not multiple thread. it provide simple service for http request and dir request. and a other python http server tutorial is here.
-
liduan
a simple http server that developed by java. based on the multiple thread. provide a simple log system. it is a good simple to research http work in the java.