Search Results

Search found 25888 results on 1036 pages for 'image map'.

Page 189/1036 | < Previous Page | 185 186 187 188 189 190 191 192 193 194 195 196  | Next Page >

  • Preloading CSS Background Images

    - by Peanuts
    Hello guys, I have a hidden contact form which is deployed clicking on a button. Its fields are set as CSS background images, and they always appears a bit later than the div that have been toggled. I was using this snippet in the <head> section, but with no luck (after I cleared the cache) : <script type="text/javascript"> $(document).ready(function() { pic = new Image(); pic2 = new Image(); pic3 = new Image(); pic.src="<?php bloginfo('template_directory'); ?>/images/inputs/input1.png"; pic2.src="<?php bloginfo('template_directory'); ?>/images/inputs/input2.png"; pic3.src="<?php bloginfo('template_directory'); ?>/images/inputs/input3.png"; }); </script> I'm using jQuery as my library, and it would be cool if I could use it as well for arranging this issue. Thanks for your thoughs.

    Read the article

  • Showing an image after loading it from sql database

    - by user330075
    I have a problem showing the image form database in a view Details and a ImageController. Inside the view I have: img src=Url.Action("GetFile","Image", new {id= Model.id}) and in controller: public FileContentResult GetFile(int idl) { //int idl = 32; SqlDataReader rdr; byte[] fileContent = null; ........... return File(,,); } When the view is called, function GetFile it just won't work. But if I cut out the parameter int id1 and I instantiate it as a variable it does work. public FileContentResult GetFile() { int idl = 32; SqlDataReader rdr; byte[] fileContent = null; ........... return File(,,); } Why?

    Read the article

  • best practices question: How to save a collection of images and a java object in a single file? File

    - by Richard
    Hi all, I am making a java program that has a collection of flash-card like objects. I store the objects in a jtree composed of defaultmutabletreenodes. Each node has a user object attached to it with has a few string/native data type parameters. However, i also want each of these objects to have an image (typical formats, jpg, png etc). I would like to be able to store all of this information, including the images and the tree data to the disk in a single file so the file can be transferred between users and the entire tree, including the images and parameters for each object, can be reconstructed. I had not approached a problem like this before so I was not sure what the best practices were. I found XLMEncoder (http://java.sun.com/j2se/1.4.2/docs/api/java/beans/XMLEncoder.html) to be a very effective way of storing my tree and the native data type information. However I couldn't figure out how to save the image data itself inside of the XML file, and I'm not sure it is possible since the data is binary (so restricted characters would be invalid). My next thought was to associate a hash string instead of an image within each user object, and then gzip together all of the images, with the hash strings as the names and the XMLencoded tree in the same compmressed file. That seemed really contrived though. Does anyone know a good approach for this type of issue? THanks! Thanks!

    Read the article

  • How to create a gesture controlled rotating image for a UI

    - by ocdtrekkie
    I'm trying to figure out the best way to make an image rotate along with a user's finger dragging it left or right. I want to try and match the rate a user's finger is moving with the rate the image is rotating. I've got the basic setup for my application going, with the menus and whatnot I want to have, and that's all running great on the emulator, I'm just not sure how to approach this part. I can code all the logic I need for my app, I'm just not doing to well designing the UI, I have a picture in mind, I've actually made a couple mock images of it, I just can't figure out how to get it going in Android, and any help would be appreciated.

    Read the article

  • Rails - Paperclip, getting width and height of image in model

    - by Corey Tenold
    Trying to get the width and height of the uploaded image while still in the model on the initial save. Any way to do this? Here's the snippet of code I've been testing with from my model. Of course it fails on "instance.photo_width". has_attached_file :photo, :styles => { :original => "634x471>", :thumb => Proc.new { |instance| ratio = instance.photo_width/instance.photo_height min_width = 142 min_height = 119 if ratio > 1 final_height = min_height final_width = final_height * ratio else final_width = min_width final_height = final_width * ratio end "#{final_width}x#{final_height}" } }, :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :path => ":attachment/:id/:style.:extension", :bucket => 'foo_bucket' So I'm basically trying to do this to get a custom thumbnail width and height based on the initial image dimensions. Any ideas?

    Read the article

  • Creating Thumbnails with CFImage Aborting Because of Server Load?

    - by nephilite
    I am uploading in image via a form and I want to, in addition to saving the image, save a variety of thumbnails in both png and jpg format. To do this I am using the code below. The initial image uploads fine but then, after spinning for a moment I get an error of: "Request aborted due to heavy system load." (from my host crystaltech), and none of the thumbnails have made it through. I've tried it with even just one resize (and no converts) and it still fails. What am I doing wrong? This issue is somewhat urgent....Thanks! ` <cffile action="upload" destination="#Application.filePath#Icons\#app#Icon.png" filefield="Icon" nameconflict="overwrite"> <cfimage source="#Application.filePath#Icons\#app#Icon.png" action="resize" width="50%" height="50%" destination="#Application.filePath#Icons\#app#Icon_Half.png" overwrite="yes"> <cfimage source="#Application.filePath#Icons\#app#Icon.png" action="resize" width="25%" height="25%" destination="#Application.filePath#Icons\#app#Icon_Quarter.png" overwrite="yes"> <cfimage source="#Application.filePath#Icons\#app#Icon.png" action="convert" destination="#Application.filePath#Icons\#app#Icon.jpg"> <cfimage source="#Application.filePath#Icons\#app#Icon_Half.png" action="convert" destination="#Application.filePath#Icons\#app#Icon_Half.jpg"> <cfimage source="#Application.filePath#Icons\#app#Icon_Quarter.png" action="convert" destination="#Application.filePath#Icons\#app#Icon_Quarter.jpg"> `

    Read the article

  • AS3 + addChild() getting image from library to the stage

    - by Colin
    Hi, I have an .fla file with 1 image in the library and 1 .as file. I have linked the image up with the Class name of libraryImages and Base class is flash.display.BitmapData. This is my AS: package { import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.MovieClip; public class Banner extends MovieClip { var defaultImage:libraryImages = new libraryImages(469, 60); var myImage:Bitmap = new Bitmap(defaultImage); addChild(myImage); } } I am getting two errors: 1180: Call to a possibly undefined method addChild. 1120: Access of undefined property myImage. Any ideas?

    Read the article

  • using Python reduce over a list of pairs

    - by user248237
    I'm trying to pair together a bunch of elements in a list to create a final object, in a way that's analogous to making a sum of objects. I'm trying to use a simple variation on reduce where you consider a list of pairs rather than a flat list to do this. I want to do something along the lines of: nums = [1, 2, 3] reduce(lambda x, y: x + y, nums) except I'd like to add additional information to the sum that is specific to each element in the list of numbers nums. For example for each pair (a,b) in the list, run the sum as (a+b): nums = [(1, 0), (2, 5), (3, 10)] reduce(lambda x, y: (x[0]+x[1]) + (y[0]+y[1]), nums) This does not work: >>> reduce(lambda x, y: (x[0]+x[1]) + (y[0]+y[1]), nums) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in <lambda> TypeError: 'int' object is unsubscriptable Why does it not work? I know I can encode nums as a flat list - that is not the point - I just want to be able to create a reduce operation that can iterate over a list of pairs, or over two lists of the same length simultaneously and pool information from both lists. thanks.

    Read the article

  • create an hotspot and set an image without background (like earth icon) to my panel

    - by sirvan
    Hi I try to create an hotspot by Extends of canvas and I try to add it on a panel witch painted by images , so I must to draw an icon (image) instead of clear rectangle of the screen, to do that I override the paint method to draw the icon I want to use, so far there is no problem, the hotspot work true and the icon painted in true size I want(32,24 pixel) I try to add this hotspot after painting image on the my panel in mypanel.paint(g) that override too. The problem , I use an car icon that have no background !!(I hope you can understand me) just car icon must be show on the panel that painted with my images; But an unwanted rectangle created around the icon and made bad view, How I can paint may icon on panel without that background? Please help me.

    Read the article

  • Having two sets of input combined on hadoop

    - by aeolist
    I have a rather simple hadoop question which i'll try to present with an example say you have a list of strings and a large file and you want each mapper to process a piece of the file and one of the strings in a grep like program. how are you supposed to do that? I am under the impression that the number of mappers is a result of the inputsplits produced. I could run subsequent jobs, one for each string, but it seems kinda... messy?

    Read the article

  • staying within boundaries of image?

    - by codefail
    So I am to loop through copyFrom.pixelData and copy it into pixelData. I realize that I need to check the conditions of i and j, and have them not copy past the boundaries of pixelData[x][y], I need another 2 loops for that? I tried this, but was getting segmentation fault.. Is this the right approach? void Image::insert(int xoff, int yoff, const Image& copyFrom, Color notCopy) { for (int x = xoff; x < xoff+copyFrom.width; x++) { for (int y = yoff; y < yoff+copyFrom.height; y++) { for (int i = 0; i<width; i++){ for (int j = 0; j<height; j++){ if (copyFrom.pixelData[i][j].colorDistance(notCopy)>20 ) pixelData[x][y]=copyFrom.pixelData[i][j]; } } } } }

    Read the article

  • How to create an image from canvas data?

    - by Jakub Hampl
    In my application I am trying to save an arbitrary part of a rendered HTML canvas to an image file. In my Javascript I call ctx.getImageData(x, y, w, h) and pass the resulting object to my macruby code (though if you know a solution in objc I am also very interested). There I'm trying to create a NSBitmapImageRep object so that I can then save to an image format the user desires. This is my code so far (the function gets a WebScriptObject as it's argument): def setimagedata(d) w = d.valueForKey("width").to_i h = d.valueForKey("height").to_i data = Pointer.new(:char, d.valueForKey("data").valueForKey("length").to_i) d.valueForKey("data").valueForKey("length").to_i.times do |i| data[i] = d.valueForKey("data").webScriptValueAtIndex(i).to_i end puts "data complete" # get's called @exported_image = NSBitmapImageRep.alloc.initWithBitmapDataPlanes(data, pixelsWide: w, pixelsHigh:h, bitsPerSample: 32, samplesPerPixel: 4, hasAlpha: true, isPlanar: false, colorSpaceName: NSCalibratedRGBColorSpace, bitmapFormat: NSAlphaNonpremultipliedBitmapFormat, bytesPerRow: 0, bitsPerPixel: 0) puts "done" # doesn't get called end The code doesn't seem to get through the initWithBitmapDataPlanes function but gives no error. My question is: what am I doing wrong? Is this approach reasonable (if not, what would be better?).

    Read the article

  • IMAGE REQUIRED for Project

    - by soniya
    Do anybody have an animated image tat contains all emotion(happy,sad,love) a single gif file that exhibits different smileys representing all emotions like happy,angry pls help me out SONIYA

    Read the article

  • How to fill the blogger header with a very small background image

    - by Kleigh Heart Garcia
    i am using blogger and in my blogger header i have my site title and description. I would like to add a background on it. I already picked out a background image but the size of it is very small (10px width and 10px height), how can i fil the entire background image of my blogger header? i also want to add another column to my blogger header where i can add my logo. I also want that logo to turn into a link to my homepage. thanks and have a great day.

    Read the article

  • jquery - sliding image group left and right (hiding the ones that are past a certain point)

    - by matthewsteiner
    So I'm not really sure how to go about doing this at all. I've got an anchor on the left with id="left" and one on the right with id="right". On the hover event, the image thumbnails should start sliding left or right. If there's not enough thumbnails, there should be no sliding. It can only fit 4 images in between the left and right anchors. How can I hide all anchors that are not in between the left and right anchors? I want the images to actually slowly move left or right, not just be sudden. Any ideas? I know how to bind the events and such just fine. I just don't really now how to get started with the image placement.

    Read the article

  • Describe relative angles between points (like driving directions)

    - by aan234g
    I have a list of points with x, y coordinates. I know how to get the distance between points with sqrt(pow($x2 - $x1, 2) + pow($y2 - $y1, 2)) and the angle between points with atan2(y1 - y2, x1 - x2). How can I calculate the relative angle between the points (left, right, straight)? So, if I'm at point 1, what is the relative direction to point 2, then 2 to 3, 3 to 4, etc... Thanks for any help!

    Read the article

  • Display an ashx image using jQuery?

    - by Abe Miessler
    I've been trying to use the jQuery plugin Colorbox to display images I have in my DB through an ashx file. Unfortunately it just spits a bunch of gibberish at the top of the page and no image. Can this be done? Here is what I have so far: $(document).ready ( function () { $("a[rel='cbImg']").colorbox(); } ); ... <a rel="cbImg" href="HuntImage.ashx?id=15">Click to see image</a>

    Read the article

  • trying to make a scheme procedure

    - by asfejaeofijfe
    trying to make a scheme procedure called make-odd-mapper! its supposed to be a procedure that takes one input, a procedure, and produces a procedure as an output ex: (define i4 (mlist 10 2 30 4)) (i4) {10 2 30 4} ((make-odd-mapper! add-one) i4) i4 {11 2 31 4} I know the problem needs to mutate the input list and that set-mcar! and void are apart of it......could anyone give me some reasonable lines of code to solve this? It would be useful in case anyone was wondering about mutation.....and using it to create a procedure that makes a procedure as its output....

    Read the article

  • Get image url from rss Cdata

    - by zOro
    Hi , I start testing android , trying to get image from xml my Image is hosting inside xmlnode <a href="http://www.site.com/id/?id=41564"><img src="http://www.site.com//news/images/2010/03_march/imagestock/thumb/22.jpg" align="left" /></a> more text comes here i trying to get the http://www.site.com//news/images/2010/03_march/imagestock/thumb/22.jpg and displaying it ... Can you help me with that ? Thanks zOro..

    Read the article

< Previous Page | 185 186 187 188 189 190 191 192 193 194 195 196  | Next Page >