Search Results

Search found 8 results on 1 pages for 'salmon'.

Page 1/1 | 1 

  • Saving image to server with php

    - by salmon
    Hey i have the following script, basicaly a flash file sends it some data and it creates a image and then opens a save as dialog box for the user so that they can save the image to there system.Here the problem comes in, how would i go about also saving the image to my server? <?php $to = $_POST['to']; $from = $_POST['from']; $fname = $_POST['fname']; $send = $_POST['send']; $data = explode(",", $_POST['img']); $width = $_POST['width']; $height = $_POST['height']; $image=imagecreatetruecolor( $width ,$height ); $background = imagecolorallocate( $image ,0 , 0 , 0 ); //Copy pixels $i = 0; for($x=0; $x<=$width; $x++){ for($y=0; $y<=$height; $y++){ $int = hexdec($data[$i++]); $color = ImageColorAllocate ($image, 0xFF & ($int >> 0x10), 0xFF & ($int >> 0x8), 0xFF & $int); imagesetpixel ( $image , $x , $y , $color ); } } //Output image and clean #header("Content-Disposition: attachment; filename=test.jpg" ); header("Content-type: image/jpeg"); ImageJPEG( $image ); imagedestroy( $image ); ?> Help would be greatly appreciated!

    Read the article

  • Customising Google Maps breaks highway label blocks

    - by user2248809
    I'm trying to customise a Google map to use shades of a particular colour. It's working nicely except the blocks that contain major road names / numbers is illegible. I've figured out how to target styles to those elements, but setting the 'color' value sets both text and background to that colour. And no adjusting of saturation, gamma, lightness etc seems to make the text legible. function initialize() { var latlng = new google.maps.LatLng(50.766472,0.284732); var styles = [ { stylers: [ { "gamma": 0.75 }, { "hue": "#607C75" }, { "saturation": -75 }, { "lightness": 0 } ] },{ featureType: "water", stylers: [ {color: "#607C75"} ] } ]; var myOptions = { zoom: 15, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, }; var marker = new google.maps.Marker({ position: latlng, title:"Living, dining, bedrooms by David Salmon" }); var map = new google.maps.Map(document.getElementById("map"), myOptions); map.setOptions({styles: styles}); marker.setMap(map); }

    Read the article

  • Google I/O 2010 - Fluid social experiences across sites

    Google I/O 2010 - Fluid social experiences across sites Google I/O 2010 - Bridging the islands: Building fluid social experiences across websites Social Web 201 John Panzer, Joseph Smarr As more sites add social functionality, profiles, friends, and conversations are becoming increasingly fragmented. But an emerging collection of open technologies aim to help bridge these social islands, allowing users to seamlessly move between sites and have unified conversations that span multiple web sites. Learn how OpenID, OAuth, Portable Contacts, ActivityStrea.ms, and Salmon can help you connect to the rest of the Social Web. For all I/O 2010 sessions, please go to code.google.com/events/io/2010/sessions.html From: GoogleDevelopers Views: 2 0 ratings Time: 01:01:42 More in Science & Technology

    Read the article

  • Google I/O 2010 - What's the hubbub about Google Buzz APIs?

    Google I/O 2010 - What's the hubbub about Google Buzz APIs? Google I/O 2010 - What's the hubbub about Google Buzz APIs? Social Web 101 Chris Chabot, Marco Kaiser (Seesmic), Ming Yong (Socialwok) Google Buzz is a new way to share updates, photos, videos and more, and start conversations about the things you find interesting. In this session, we'll take a deep dive into building with the Buzz APIs and the open standards it uses, such as ActivityStrea.ms, PubSubHubbub, OAuth, Salmon and WebFinger. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 3 0 ratings Time: 50:37 More in Science & Technology

    Read the article

  • Google I/O 2010 - The open & social web

    Google I/O 2010 - The open & social web Google I/O 2010 - The open & social web Social Web 101 Chris Messina This session will cover the latest and most important trends of the Social Web and dive deep into where this is all going, at both technical and conceptual levels. From the concepts of digital identity, relationships, and social objects, this session will cover emerging technologies like WebFinger, Salmon, ActivityStrea.ms, OpenID, OAuth and OpenSocial. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 4 0 ratings Time: 47:12 More in Science & Technology

    Read the article

  • Extract all related class type aliasing and enum into one file or not

    - by Chen OT
    I have many models in my project, and some other classes just need the class declaration and pointer type aliasing. It does not need to know the class definition, so I don't want to include the model header file. I extract all the model's declaration into one file to let every classes reference one file. model_forward.h class Cat; typedef std::shared_ptr<Cat> CatPointerType; typedef std::shared_ptr<const Cat> CatConstPointerType; class Dog; typedef std::shared_ptr<Dog> DogPointerType; typedef std::shared_ptr<const Dog> DogConstPointerType; class Fish; typedef std::shared_ptr<Fish> FishPointerType; typedef std::shared_ptr<const Fish> FishConstPointerType; enum CatType{RED_CAT, YELLOW_CAT, GREEN_CAT, PURPLE_CAT} enum DogType{HATE_CAT_DOG, HUSKY, GOLDEN_RETRIEVER} enum FishType{SHARK, OCTOPUS, SALMON} Is it acceptable practice? Should I make every unit, which needs a class declaration, depends on one file? Does it cause high coupling? Or I should put these pointer type aliasing and enum definition inside the class back? cat.h class Cat { typedef std::shared_ptr<Cat> PointerType; typedef std::shared_ptr<const Cat> ConstPointerType; enum Type{RED_CAT, YELLOW_CAT, GREEN_CAT, PURPLE_CAT} ... }; dog.h class Dog { typedef std::shared_ptr<Dog> PointerType; typedef std::shared_ptr<const Dog> ConstPointerType; enum Type{HATE_CAT_DOG, HUSKY, GOLDEN_RETRIEVER} ... } fish.h class Fish { ... }; Any suggestion will be helpful.

    Read the article

  • PHP: How to automate building a 100 <UL>/<LI> menuitems, while keeping the Menu Structure File Flat / Simply Managable?

    - by Sam
    Above: current "stupid" menu. (entire ul/li menu for javascript menu system) + (some li lines as page-specific submenu) Hi folks! With passion for automation and elegancy, but limited knowledge/knowhow, im stuck with "my hands in my hair" as we Dutch say, for my current menu system works perfectly, but is a pain in the a*s to update! So, i would appreciate it greatly, if you can suggest how to automate this in php: how to let the php generate the html menu code basing on a flat menu input file with TABS indented. OLD SITUATION <ul> <!-- about 100 of these <li>....</li> lines --> <li><a href="carrot.php"><p class="mnu" style="background-position:0 -820px"><? echo __("carrot juice") ?></p></a></li> <!-- lots of data, with only little bit thats really the menu itself--> </ul a javascript file reads a ul/li structure as input to build menu of format in that ul/li, the items with a hyperlink and sprite-bg position represent webpages, (inside LI) while items without hyperlink and sprite-bg are just headers of that menusection, (inside H6) to highlight the current page in the menu, the javascript menumaker uses an id number. this number corresponds to the consequtive li that is a webpage, skips h6 headers correctly. these h6 headers are only there for when importing sections of the same menu as submenu. non-li headers are not shown in menu, nore counted by the javascript menu for their ID. to know which page should be shown, i have to count from ID 0, the li items till finding the current webpage in the li structure and then manually put it in each webpage! BUT: changing an item in li order, means stupidly re-counting their entire li again! each webpage has an icon (= sprite bg-position numer), which is also used in the webpage. INTENDED RESULT I dream of, once setting what the current webpage is (e.g carrot.php) the menu system automatically "finds" and "counts" the li's and returns the id nr (for proper highlight of main menu); generates the entire menu html, and depending on which headings are set for submenu, (e.g. meals, drinks) generates those submenu (entire section below each given header); ginally adds h5 highlight inside the li of that submenu item. For the menu, i wish an easily readable, simple plain txt menu that is indented with tabs, (each tab is one depth for example) and further tabs follow for url and sprite position of icon. MY DREAM MENU-MANAGEMENT FILE |>TAB SEPARATED/INDENTED FLATMENU FILE |MUST BE CALCULATED BY PHP: |>MENUTEXT============URL=============SPRITE=====|ID===TAG================== |>about "#" -520 |00 li |> INFORMATION |—— h6 |> physical state "physical.php" -920 |01 li |> mental health "mental.php" -10 |02 li |> |>apetite "#" -1290 |03 li |> meals "#" -600 |04 li |> COLD MEAL |—— h6 |> egg salade "salad.php" -1040 |05 li |> salmon fish "salmon.php" -540 |06 li |> HOT MEAL |—— h6 |> spare ribs "spareribs.php" -120 |07 li |> di macaroni "macaroni.php" -870 |08 li |> |> drinks "#" -230 |09 li |> JUCY DRINK |—— h6 |> carrot juice "carrot.php" -820 |10 li |> mango hive "mango.php" -270 |11 li DESIRED CHRONOLOGY php outputs the entire ul/li html so the javascript can show the menu: webpage items go inside li tags, and header items go inside h6 tags, e.g. <h6>JUCY DRINK</h6> Each website page has a url filename [eg: salad.php]. Based on this given fact, the php menu generator detects the pagename, gives the IDnr of the position of that page according to the li-item nr and sets variable for javascript to highlight current menu item. the menu items below the specified headers are loaded as submenu in which the current page.php is wrapped inside h5 to highlight current page in submenu: e.g. (<li><h5><a href="carrot.php"><p>..etc..</p></h5></li> Question Which methods / steps / (chronological)ways are there for doing this? I am no good in php programming, but am learning it so please dont write any code without a line of comment why I should use that method etc. Where do I start? If I am unclear in my question, please ask. Thanks. Much appreciated!! Concrete Task List from the provided Comments/Answers, sofar: (RobertB) First, get some PHP code working that can read through a tab-delimited file and put the data into an appropriate data structure. NOW WORKING AT THIS

    Read the article

  • How to remove the shadow from a librarystack

    - by red-X
    I'm currently in a project where I need a LibraryStack with no visuals at all, so it would just show the content. If I just remove the background a shadow stays in view which I cant seem to remove... This code looks like: <s:LibraryStack Background="Transparent"> <s:LibraryStackItem Background="AliceBlue"/> <s:LibraryStackItem Background="Bisque"/> <s:LibraryStackItem Background="Salmon"/> </s:LibraryStack> This stack is just for explaining purposes, the actual stack is added in the code behind in c#. So preferably any answers that would be usefull to add in c#.

    Read the article

1