Search Results

Search found 7897 results on 316 pages for 'generate'.

Page 130/316 | < Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >

  • ID numbers generation

    - by mnmyles
    i am trying to code for my system in NetBeans IDE 6.5 to auto generate ID numbers for me like autonumbers in Ms Access. does any one have any ideas about going about that?i mean code for it.

    Read the article

  • Why my json_encode get corrupted

    - by Cullen SUN
    $model = new XUploadForm; $model->file = CUploadedFile::getInstance( $model, 'file' ); //We check that the file was successfully uploaded if( $model->file !== null ) { //Grab some data $model->mime_type = $model->file->getType( ); $model->size = $model->file->getSize( ); $model->name = $model->file->getName( ); $file_extention = $model->file->getExtensionName( ); //(optional) Generate a random name for our file $file_tem_name = md5(Yii::app( )->user->id.microtime( ).$model->name); $file_thumb_name = $file_tem_name.'_thumb.'.$file_extention; $file_image_name = $file_tem_name.".".$file_extention; if( $model->validate( ) ) { //Move our file to our temporary dir $model->file->saveAs( $path.$file_image_name ); if(chmod($path.$file_image_name, 0777 )){ // Yii::import("ext.EPhpThumb.EPhpThumb"); // $thumb_=new EPhpThumb(); // $thumb_->init(); // $thumb_->create($path.$file_image_name) // ->resize(110,80) // ->save($path.$file_thumb_name); } //here you can also generate the image versions you need //using something like PHPThumb //Now we need to save this path to the user's session if( Yii::app( )->user->hasState( 'images' ) ) { $userImages = Yii::app( )->user->getState( 'images' ); } else { $userImages = array(); } $userImages[] = array( "filename" => $file_image_name, 'size' => $model->size, 'mime' => $model->mime_type, "path" => $path.$file_image_name, // "thumb" => $path.$file_thumb_name, ); Yii::app( )->user->setState('images', $userImages); //Now we need to tell our widget that the upload was succesfull //We do so, using the json structure defined in // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup echo json_encode( array( array( "type" => $model->mime_type, "size" => $model->size, "url" => $publicPath.$file_image_name, //"thumbnail_url" => $publicPath.$file_thumb_name, //"thumbnail_url" => $publicPath."thumbs/$filename", "delete_url" => $this->createUrl( "upload", array( "_method" => "delete", "file" => $file_image_name ) ), "delete_type" => "POST" ) ) ); Above code give me correct response, [{"type":"image/jpeg","size":2266,"url":"/uploads/tmp/0b00cbaee07c6410241428c74aae1dca.jpeg","delete_url":"/api/imageUpload/upload?_method=delete&file=0b00cbaee07c6410241428c74aae1dca.jpeg","delete_type":"POST"}] but if I uncomment the following // Yii::import("ext.EPhpThumb.EPhpThumb"); // $thumb_=new EPhpThumb(); // $thumb_->init(); // $thumb_->create($path.$file_image_name) // ->resize(110,80) // ->save($path.$file_thumb_name); it gave me corrupted response: Mac OS X 2??ATTR?dA??Y?Ycom.apple.quarantine0001;50655994;Google\x20Chrome.app;2599ECF9-69C5-4386-B3D9-9F5CC7E0EE1D|com.google.ChromeThis resource fork intentionally left blank ??[{"type":"image/jpeg","size":1941,"url":"/uploads/tmp/409c5921c6d20944e1a81f32b12fc380.jpeg","delete_url":"/api/imageUpload/upload?_method=delete&file=409c5921c6d20944e1a81f32b12fc380.jpeg","delete_type":"POST"}]

    Read the article

  • PHPUnit not working with netbeans 7.2.1

    - by user1578653
    I have just upgraded to netbeans 7.2.1 and phpunit is not working. I get the error:- Cannot run program C:\wamp\bin\php\php5.3.5\PEAR\phpunit-skelgen": CreateProcess error=193, %1 is not a valid Win32 application" when I try to generate PHPUnit tests. The only thing I can think of is that I seem to have a 64 bit version of netbeans installed - could this be the problem? If so, can anyone point me to a 32 bit version, because I couldn't see one on the website?

    Read the article

  • How to create a custom Annotation and processing it using APT ?

    - by Dhana
    Hi, I'm new to Java Annotation. I know how to create custom annotation but I don't know how to process that Annotation to generate the dynamic code just like ejb 3.0 and hibernate does. I read some articles based on APT but no one gives the details about how to process the Annotation. Are there any tutorials with sample code for processing custom Annotations? Thanks

    Read the article

  • Automaticly Change VisualState in Silverlight

    - by Matt
    If you create a simple button and then choose Edit Template - Edit a Copy, Blend will automatically generate a style area, along with all the button states (MouseEnter, MouseLeave, Pressed, etc). No where in the generated code does it say that on a "MouseOver" event, change the state to "MouseOver", but it still manages to work! How does a standard button do it? Is there some sort of AutoEventWireUp going on?

    Read the article

  • Android: R$id class not loaded?

    - by llappall
    Hi, I have a Android class extending Application to generate some global classes, etc. It works, in that I can, for example, get the context, etc. BUT, when I try this: row = (TextView) findViewById(R.id.list_row_text); I get R.id.list_row_text = Class not loaded : <mypackage>.R$id Any ideas why this is happening? Thanks Gerardo

    Read the article

  • Weird black spots on custom Google Map with IE

    - by Domenic
    Hello. I'm getting some weird black spots with a custom map page (via the Google Maps API v2.x) I have created. (Click SERVICIOS and then the icon farthest south to generate image shown below.) The issue seems to only appear when using Internet Explorer. I'm wondering if this is a common problem and if there is a common fix? Any ideas? Thanks.

    Read the article

  • Librarys for DD 5.1 sound

    - by krupert
    I would like to generate, play, record Dolby Digital 5.1 sounds. My goal is a program like "atmosphere" . A good source for sounds is freesound.org. I would like a been flying from left behind to front right, fading away.

    Read the article

  • Project generation problem using Spring Roo

    - by Harry
    Hi, I just downloaded SpringSource Tool Suite, and tried to generate a demo application using roo, but i'm getting error below Code: Created /home/dev/springsource/workspace/demo/pom.xml Undo create /home/dev/springsource/workspace/demo/pom.xml Invalid dependency scope: PROVIDED [Timer-0] NullPointerException at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:84) What is the problem? is this Maven issue? Using: Ubuntu 8.10, SpringSource Tool Suite Version: 2.3.3.M1, Roo 1.1.0.M1, Apache Maven Thanks

    Read the article

  • Checking only "Automatic" services with powershell.

    - by Lee
    I've seen lots of scripts out there for manually stopping/starting services in a list, but how can I generate that list programatically of -just- the automatic services. I want to script some reboots, and am looking for a way to verify that everything did in fact start up correctly for any services that were supposed to.

    Read the article

  • Coverting a vector of maps to map of maps in clojure

    - by Osman
    Hi, I've a vector of maps like this: [ {:categoryid 1, :categoryname "foo" } {:categoryid 2, :categoryname "bar" } {:categoryid 3, :categoryname "baz" } ] and would like to generate a map of maps like this for searching by categoryname { "foo" {:categoryid 1, :categoryname "foo" }, "bar" {:categoryid 2, :categoryname "bar" }, "baz" {:categoryid 3, :categoryname "baz" } } How can i achieve?

    Read the article

  • How to visualize Feature branches?

    - by crauscher
    We are using separate branches for separate features and we need to visualize these brances. Is there a tool that can help us? We do not need a tool that uses our source-repository to generate the graph. We want to use the tool for planning new branches and for visalizing them.

    Read the article

  • Get a random subset from a set in F#

    - by Cay
    I am trying to think of an elegant way of getting a random subset from a set in F# Any thoughts on this? Perhaps this would work: say we have a set of 2x elements and we need to pick a subset of y elements. Then if we could generate an x sized bit random number that contains exactly y 2n powers we effectively have a random mask with y holes in it. We could keep generating new random numbers until we get the first one satisfying this constraint but is there a better way?

    Read the article

  • How does a cryptographically secure random number generator work?

    - by Byron Whitlock
    I understand how standard random number generators work. But when working with crytpography, the random numbers really have to be random. I know there are instruments that read cosmic white noise to help generate secure hashes, but your standard PC doesn't have this. How does a cryptographically secure random number generator get its values with no repeatable patterns?

    Read the article

  • DUMP in unhandled C++ exception

    - by Jorge Vasquez
    In MSVC, how can I make any unhandled C++ exception (std::runtime_error, for instance) crash my release-compiled program so that it generates a dump with the full stack from the exception throw location? I have installed NTSD in the AeDebug registry an can generate good dumps for things like memory access violation, so the matter here comes down to crashing the program correctly, I suppose. Thanks in advance.

    Read the article

< Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >