Search Results

Search found 236 results on 10 pages for 'fish'.

Page 5/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • How to switch iostream from binary to text mode and vice versa?

    - by Mad Fish
    I want to read both formatted text and binary data from the same iostream. How can I do that? Why? Imagine this situation: You have different resources, and resource loaders for them, that take a std::istream as a parameter. And there are a "resource source" that provides these streams. Resources can be both text and binary and I need to handle both cases with resource loaders. Or other situation: Image that you have an archive with resources of mixed types. How can I get a text stream from inside the binary archive stream?

    Read the article

  • Simulate Click Javascript

    - by Belgin Fish
    Hi, I'm just wondering how I can have javascript simulate a click on a element. Currently I have <script type="text/javascript"> function simulateClick(control) { if (document.all) { control.click(); } else { var evObj = document.createEvent('MouseEvents'); evObj.initMouseEvent('click', true, true, window, 1, 12, 345, 7, 220, false, false, true, false, 0, null ); control.dispatchEvent(evObj); } } </script> <a href="http://www.google.com" id="mytest1">test 1</a><br> <script type="text/javascript"> simulateClick(document.getElementById('mytest1')); </script> But it's not working :( Any ideas?

    Read the article

  • Sort MYSQL Data By Number of Entries

    - by Belgin Fish
    Hi, I'm wondering how I can sort mysql data based on the number of entries. I'm doing this so I can have a page of the top purchases, so it would have to retrieve all the product_id's from a table, and then sort them by the most times one shows up, limiting it to 10 or something. Thanks!

    Read the article

  • Retrieve Specific Data/Value From Database 1 Line PHP

    - by Belgin Fish
    Hi, I'm just wondering how I can retrieve a specific value (only 1 thing will be returned) from a database using php. My query is mysql_query("SELECT balance FROM users WHERE username = '". $this->username . "'") I'm just looking for it to retrieve the data from that row so I can save it directory into a variable.

    Read the article

  • modalpopupextender and commas appearing in my textbox asp.net

    - by SLC
    Some weird stuff is happening, I am converting an application that used to use javascript to open another web page in a tiny window for data input to use a ModalPopupExtender. It seems to work fine, but in the OK event, when I do txtData.Text (the textbox in my modal popup), it comes back with a comma before the data, so if you type "Rabbit", it comes back as ",Rabbit". Also when I use it multiple times, in another place where I might click to show it, and type "Fish", it starts coming back with stuff like ",Rabbit,,Fish" I don't know why or how to stop it from doing this... any ideas?

    Read the article

  • Please help me debug my SQL query.

    - by bob09
    I have a query: Select n_portions, dish_name from food_order, dish where n_portions= (select max (n_portions) FROM food_order); It's meant to return: fish pie 3 steak and chips 1 pasta bake 2 stuffed peppers 1 But i get: Pasta bake 35 Fish pie 35 Steak and chips 35 Stuffed peppers 35 Ham and rice 35 Lamb curry 35 Why is this happing? table data table data Insert into customer_order values ('00001', '03-Apr-09', '07-apr-09','St. Andrew St'); Insert into customer_order values ('00002', '05-Apr-09', '01-May-09', 'St. Andrew St'); Insert into customer_order values ('00003', '12-Apr-09', '27-Apr-09', 'Union St'); Insert into customer_order values ('00004', '12-Apr-09', '17-Apr-09', 'St. Andrew St'); Insert into Dish values ('D0001', 'Pasta bake', 'yes', '6.00'); Insert into Dish values ('D0002', 'Fish pie', 'no', '9.00'); Insert into Dish values ('D0003', 'Steak and chips', 'no', '14.00'); Insert into Dish values ('D0004', 'Stuffed peppers', 'yes', '11.50'); Insert into Dish values ('D0005', 'Ham and rice' , 'no', '7.25'); Insert into Dish values ('D0006', 'Lamb curry' , 'no', '8.50'); Insert into Drink values ('DR0001', 'Water', 'soft', '1.0'); Insert into Drink values ('DR0002', 'Coffee', 'hot', '1.70'); Insert into Drink values ('DR0003', 'Wine' , 'alcoholic', '3.00'); Insert into Drink values ('DR0004', 'Beer' , 'alcoholic', '2.30'); Insert into Drink values ('DR0005', 'Tea' , 'hot' , '1.50'); Insert into food_order values ('F000001', '000001', 'D0003', '6'); Insert into food_order values ('F000002', '000001', 'D0001', '4'); Insert into food_order values ('F000003', '000001', 'D0004', '3'); Insert into food_order values ('F000004', '000002', 'D0001', '10'); Insert into food_order values ('F000005', '000002', 'D0002', '10'); Insert into food_order values ('F000006', '000003', 'D0002', '35'); Insert into food_order values ('F000007', '000004', 'D0002', '23'); Insert into drink_order values ('D000001', '000001', 'DR0001', '13'); Insert into drink_order values ('D000002', '000001', 'DR0002', '13'); Insert into drink_order values ('D000003', '000001', 'DR0004', '13'); Insert into drink_order values ('D000004', '000002', 'DROOO1', '20'); Insert into drink_order values ('D000005', '000002', 'DR0003', '20'); Insert into drink_order values ('D000006', '000002', 'DR0004', '15'); Insert into drink_order values ('D000007', '000003', 'DR0002', '35'); Insert into drink_order values ('D000008', '000004', 'DR0001', '23'); Insert into drink_order values ('D000009', '000004', 'DR0003', '15'); Insert into drink_order values ('D0000010', '000004', 'DR0004', '15');

    Read the article

  • Set a dropdown option to selected based on get variable in url in Razor MVC

    - by Mason240
    I have a dropdown menu in a GET form. When the user hits submit, they are directed to the same page and shown the form again. I would like to have the dropdown option the user displayed in the last page already selected. So for example: @Html.DropDownList("Type", null, "Type", new { @class = "sbox-input" } ) website.com/Search?Type="Beef" <select name="Type"> <option value="Fish" >Fish</option> <option value="Chicken" >Chicken</option> <option value="Beef" selected="selected">Beef</option> </select> A jQuery solution would work just as well.

    Read the article

  • extra padding/Margin in Firefox+CHrome None in IE

    - by Adi
    There is 20px margin/padding below the catmenuconatiner (second navigation bar). This is only showing in firefox and chrome not in IE 6+ Here is the page: www.fish-and-web.blogspot.com Another problem related to the same issue is between the comments. The comment boxes have 15px margin between them. Again, this is only showing in Firefox and Chrome not in IE6+ Here is the comment page: http://fish-and-web.blogspot.com/2010/05/alfa-romeo-9c_24.html It'd be great if someone comes along and guide me in the right direction. I have been working on this for hours and I just cannot get it to work. Just so you know that the page is hosted on blogger. Thank you.

    Read the article

  • Creating an enum/class from a Database Table

    - by Mark
    I have a database table that essentially contains different types of things. I'll use animals as an example. I have a table called AnimalTypes: AnimalTypes { ID:int, Name:string } I then populate it with: 1:Dog, 2:Cat, 3:Fish I would like to then have some sort of C# object created that functions similar to this enum be entirely read from the database: enum AnimalTypes { Dog = 1, Cat = 2, Fish = 3 } Is there a way to create an enum/class from a database table as described? I basically want to be able to reference things in the AnimalTypes table using intellisense and AnimalTypes.Dog as an example; I don't actually need an enum, just something that kind of functions like one. Is this possible? Edit: I'm not really that thrilled about generating a DLL as I've seen in other related problems. I feel like this should be possible with reflection.

    Read the article

  • Multiple interfaces inhertience. Casting from one to another

    - by yossi1981
    Consider the following set of classes/Interfaces: class IFish{ public: virtual void eat() = 0; } class IFriendly{ public: virtual void protect() = 0; } class IAggresive{ public: virtual void attack(Point inDest) = 0; } class CDolphin : public IFish, IFriendly{ eat... protect.... } class CShark : public IFish, IAggresive{ eat.... attack... } Now I am having the following class void CDiver { Void shouldRunAway(IFish* fish) { //??? } } My question is , can "shouldRunAway" extract from the fish argument whether it is an IAggresive or IFreindly (if it is any of these at all...) is there some kind of casting that can help out?

    Read the article

  • retrieved upload images in php

    - by hunter
    i want to retrieve image from client (ipod) programmed in objective c i use the following code $TARGET_PATH = "pics/"; $image = $_FILES['photo']; $TARGET_PATH =$TARGET_PATH . basename( $_FILES['photo']['name']); $TARGET_PATH =$TARGET_PATH.".jpg"; if(file_exists($TARGET_PATH)) { $TARGET_PATH =$TARGET_PATH .uniqid() . ".jpg"; } if (move_uploaded_file($image['tmp_name'], $TARGET_PATH)) { $TARGET_PATH="http://www.".$_SERVER["SERVER_NAME"]."/abc/".$TARGET_PATH; echo $TARGET_PATH; echo "image upload successfully";} else{ echo "could not upload image"; } this code upload five to six images successfully and after that it gives me error i.e Notice: Undefined index: photo in /home/abc/public_html/abc.com/fish/mycatch_post.php on line 42 Notice: Undefined index: photo in /home/abc/public_html/abc.com/fish/mycatch_post.php on line 53 could not upload image

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >