Search Results

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

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

  • Android: getting thumbnails from specific location on sd card

    - by dykzei
    AFAIK accessing thumbnails for images via MediaStore.Images.Thumbnails would generate thumbnails at first attempt, and that's what i need to perform against specific location on sd card. The question is how to make valid URI to content under specific folder? All answers i can find use just MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI as uri to make managedQuery. And result of it is Cursor that points to all sdcard images, while none examples can be found on how to access only specific folder.

    Read the article

  • How can I change my admin theme in symfony 1.4?

    - by JG
    I am using sfAdminJrollerTheme Plugin for some parts of my application, but when I generate new modules without admin generator, I lose same look and feel than jroller in my other application pages. I know maybe is good idea to use admin generator for everything but I cannot change all my modules. Regards,

    Read the article

  • Java Code Formating

    - by the qwerty
    I'm using FreeMarker to generate java code, but as most of it is dynamically generated it's difficult to control the code formation. I want to get code well formatted. Does anyone knows a lib or something like a pretty printer for java code?

    Read the article

  • asp.net mvc HttpPostedFileBase getting file extension

    - by mazhar kaunain baig
    public string ContructOrganizationNameLogo(HttpPostedFileBase upload, string OrganizationName, int OrganizationID,string LangName) { var UploadedfileName = Path.GetFileName(upload.FileName); string type = upload.ContentType; } I want to get the extension of the file to dynamically generate the name of the file.One way i will use to split the type. but can i use HttpPostedFileBase object to get the extension in the clean way?

    Read the article

  • Auto generation of Web Service sample, help and documentation

    - by orjan
    We're using javax.jws.WebServices deployed in a Glassfish server, is there a way to auto generate documentation like the one ASMX services generates? ASMX services display methods in service ASMX services when running locally could be easily tested with a prebuilt form ASMX services provided a sample request and response XML message http://keithelder.net/blog/archive/2008/01/15/How-to-Get-Around-WCFs-Lack-of-a-Preview-Web.aspx In Glasshfish together with /test/TestApi?wsdl there's /test/TestApi?Tester but it doesn't work, I don't know if it can be used to provide similar features as above?

    Read the article

  • andromda problem

    - by clark
    hi, I work now with andromda generator,and where I try to generate code ,I have this problem : "The default goals should be specified in the section of project.xml instead of maven.xml ". I use maven1.1 to download andromda plug-in

    Read the article

  • Parallel programming in C#

    - by Alxandr
    I'm interested in learning about parallel programming in C#.NET (not like everything there is to know, but the basics and maybe some good-practices), therefore I've decided to reprogram an old program of mine which is called ImageSyncer. ImageSyncer is a really simple program, all it does is to scan trough a folder and find all files ending with .jpg, then it calculates the new position of the files based on the date they were taken (parsing of xif-data, or whatever it's called). After a location has been generated the program checks for any existing files at that location, and if one exist it looks at the last write-time of both the file to copy, and the file "in its way". If those are equal the file is skipped. If not a md5 checksum of both files is created and matched. If there is no match the file to be copied is given a new location to be copied to (for instance, if it was to be copied to "C:\test.jpg" it's copied to "C:\test(1).jpg" instead). The result of this operation is populated into a queue of a struct-type that contains two strings, the original file and the position to copy it to. Then that queue is iterated over untill it is empty and the files are copied. In other words there are 4 operations: 1. Scan directory for jpegs 2. Parse files for xif and generate copy-location 3. Check for file existence and if needed generate new path 4. Copy files And so I want to rewrite this program to make it paralell and be able to perform several of the operations at the same time, and I was wondering what the best way to achieve that would be. I've came up with two different models I can think of, but neither one of them might be any good at all. The first one is to parallelize the 4 steps of the old program, so that when step one is to be executed it's done on several threads, and when the entire of step 1 is finished step 2 is began. The other one (which I find more interesting because I have no idea of how to do that) is to create a sort of worker and consumer model, so when a thread is finished with step 1 another one takes over and performs step 2 at that object (or something like that). But as said, I don't know if any of these are any good solutions. Also, I don't know much about parallel programming at all. I know how to make a thread, and how to make it perform a function taking in an object as its only parameter, and I've also used the BackgroundWorker-class on one occasion, but I'm not that familiar with any of them. Any input would be appreciated.

    Read the article

  • Practical examples of using symbols in Scala?

    - by Jesper
    Scala has symbols - names that start with a single quote ' and which are a kind of string constants. I know symbols from Ruby (where they start with a colon). In Ruby they are used for some meta-programming tasks, like generating getters and setters for member variables (for example attr_reader :name to generate a getter for name). I haven't seen a lot of use of symbols in Scala code yet. What are practical uses for symbols in Scala?

    Read the article

  • Word documents generation in web app using Eclipse BIRT Report Engine

    - by Orr151
    Hi, Is it possible to generate word documents (*.doc) in java web application using Eclipse BIRT (Report Engine)? I want .rptdesign to be an input file in generating process. I could not find any example or tutorial. What would you recommend as an alternative solution. As far as I know Jasper Reports allow only RTF format generation. Thank you for your answer/explaination

    Read the article

  • VS 2005 Class Diagram View format

    - by Jebli
    Hi, I have generated class diagram by gight clicking and selecting generate class diagram usign VS 2005. There are nearly 300 class in my project . The class diagram that i have created is not in expanded view. I have to manually expand the class diagrams to view the members. Is there any way to expand the classdiagrams that are created . Regards, Jebli.

    Read the article

  • k-combinations of a set of integers in ascending size order

    - by Adamski
    Programming challenge: Given a set of integers [1, 2, 3, 4, 5] I would like to generate all possible k-combinations in ascending size order in Java; e.g. [1], [2], [3], [4], [5], [1, 2], [1, 3] ... [1, 2, 3, 4, 5] It is fairly easy to produce a recursive solution that generates all combinations and then sort them afterwards but I imagine there's a more efficient way that removes the need for the additional sort.

    Read the article

  • Can a math intensive application cause a crash?

    - by philcolbourn
    I have been messing with hash functions and functions to generate primes etc. I had 3 lock-ups in a short period. This was odd since my macbook rarely locks-up and usually only when I run out of memory - which does not happen often. But in this case, I had three in a row and none since (but I also am not generating as much load as before).

    Read the article

  • PHP Force Apache error

    - by Rolf
    Hi dear stackers :P Thanks to this forum, I learnt PHP header function does not actually send header to Apache server but only to the client. What I wanna do is to generate an error 500, and let Apache displays its corresponding page. Is there a way to force it ? Thanks in advance ! (and allez les bleus !)

    Read the article

  • 3D plotting in Matlab

    - by Jill
    I'm using the subplot and then surf functions to generate images in 3D in Matlab. How do I get rid of the axes and axis' gridlines and change the color to all yellow or all green or something like that? Thanks.

    Read the article

  • Getting error "Association references unmapped class" when using interfaces in model

    - by Bjarke
    I'm trying to use the automap functionality in fluent to generate a DDL for the following model and program, but somehow I keep getting the error "Association references unmapped class: IRole" when I call the GenerateSchemaCreationScript method in NHibernate. When I replace the type of the ILists with the implementation of the interfaces (User and Role) everything works fine. What am I doing wrong here? How can I make fluent use the implemented versions of IUser and IRole as defined in Unity? public interface IRole { string Title { get; set; } IList<IUser> Users { get; set; } } public interface IUser { string Email { get; set; } IList<IRole> Roles { get; set; } } public class Role : IRole { public virtual string Title { get; set; } public virtual IList<IUser> Users { get; set; } } public class User : IUser { public virtual string Email { get; set; } public virtual IList<IRole> Roles { get; set; } } I use the following program to generate the DDL using the GenerateSchemaCreationScript in NHibernate: class Program { static void Main(string[] args) { var ddl = new NHibernateSessionManager(); ddl.BuildConfiguration(); } } public class NHibernateSessionManager { private ISessionFactory _sessionFactory; private static IUnityContainer _container; private static void InitContainer() { _container = new UnityContainer(); _container.RegisterType(typeof(IUser), typeof(User)); _container.RegisterType(typeof(IRole), typeof(Role)); } public ISessionFactory BuildConfiguration() { InitContainer(); return Fluently.Configure().Database(MsSqlConfiguration.MsSql2008 .ConnectionString("ConnectionString")) .Mappings(m => m.AutoMappings.Add( AutoMap.AssemblyOf<IUser>())) .ExposeConfiguration(BuildSchema) .BuildSessionFactory(); } private void BuildSchema(Configuration cfg) { var ddl = cfg.GenerateSchemaCreationScript(new NHibernate.Dialect.MsSql2008Dialect()); System.IO.File.WriteAllLines("Filename", ddl); } }

    Read the article

  • Categorize the approximate shape of an array of Points in 3D Space

    - by user1295133
    I have a set of points in 3d space and I want to be able to categorize the shape that best fits them - cube, sphere, cylinder, planar (flat) etc. I've looked at supervised/machine learning but since I need first generate a large training data set that's not really suitable. My dream solution would be a java library with a wonderful magical function something like : public enum ShapeType { CUBE, SPHERE, CYLINDER, PLANAR } public ShapeType CategorizeShapeFromPoints( 3DPoint[] points ) However, any and all help will be appreciated. Thanks

    Read the article

  • What if an application needs MSVCR80.dll but I've installed Microsoft Visual Studio 9.0?

    - by user198729
    I'm trying to install this: http://www.coderholic.com/pywebshot-generate-website-thumbnails-using-python/ I've googled a lot,and still can't make it work(gtk runtime has been installed successfully(gtk-demo works),but it still reports can't find MSVCR80.dll,this should be because that I have installed Microsoft Visual Studio 9.0?), each time it reports ImportError: DLL load failed,MSVCR80.dll is not found.. How to make an application that needs MSVCR80.dll work when I've already installed Microsoft Visual Studio 9.0? Or : How to make _gtk.pyd use MSVCR90.dll instead of MSVCR80.dll?

    Read the article

  • 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

  • Paperclip renaming files after they're saved

    - by fivetwentysix
    How do I rename a file after is has been uploaded and saved? My problem is that I need to parse information about the files automatically in order to come up with the file name the file should be saved as with my application, but I can't access the information required to generate the file name till the record for the model has been saved.

    Read the article

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