Search Results

Search found 26 results on 2 pages for 'vegetables'.

Page 1/2 | 1 2  | Next Page >

  • Parsing a file with hierarchical structure in Python

    - by Kevin Stargel
    I'm trying to parse the output from a tool into a data structure but I'm having some difficulty getting things right. The file looks like this: Fruits Apple Auxiliary Core Extras Banana Something Coconut Vegetables Eggplant Rutabaga You can see that top-level items are indented by one space, and items beneath that are indented by two spaces for each level. The items are also in alphabetical order. How do I turn the file into a Python list that's something like ["Fruits", "Fruits/Apple", "Fruits/Banana", ..., "Vegetables", "Vegetables/Eggplant", "Vegetables/Rutabaga"]?

    Read the article

  • Sort List C# in arbitrary order

    - by Jasper
    I have a C# List I.E. List<Food> x = new List<Food> () ; This list is populated with this class Public class Food { public string id { get; set; } public string idUser { get; set; } public string idType { get; set; } //idType could be Fruit , Meat , Vegetable , Candy public string location { get; set; } } Now i have this unsorted List<Food> list ; which has I.E. 15 elements. There are 8 Vegetable Types , 3 Fruit Types , 1 Meat Types , 1 Candy Types I would sort this so that to have a list ordered in this way : 1° : Food.idType Fruit 2° : Food.idType Vegetables 3° : Food.idType Meat 4° : Food.idType Candy 5° : Food.idType Fruit 6° : Food.idType Vegetables 7° : Food.idType Fruit //Becouse there isnt more Meat so i insert the //next one which is Candy but also this type is empty //so i start from begin : Fruit 8° : Food.idType Vegetables 9° : Food.idType Vegetables // For the same reason of 7° 10 ° Food.idType Vegetables ...... .... .... 15 : Food.idType Vegetables I cant find a rule to do this. Is there a linq or List.Sort instruction which help me to order the list in this way? Update i changed the return value of idType and now return int type instead string so 1=Vegetable , 2=Fruit , 3=Candy 4=Meat

    Read the article

  • Best way to implement user-powered data validation

    - by vegetables
    I run a product recommendation engine and I'm hitting a few snags. I'm looking to see if anyone has any recommendations on what I should do to minimize these issues. Here's how the site works: Users come to the site and are presented with product recommendations based on some criteria. If a user knows of a product that is not in our system, they can add it by providing the product name and manufacturer. We take that information, and: Hit one API to gather all the product meta-data (and to validate the product spelling, etc). If the product is not in this first API, we do not allow it in our system. Use the information from step 1 to hit another API for pricing information (gathered from many places online). For the sake of discussion, assume that I am searching both APIs in the most efficient/successful manner possible. For the most part, this works very well. I'd say ~80% of our data is perfectly accurate, but there are a few issues: Sometimes the pricing API (Step 2) doesn't have any information for the product. The way the pricing API is built, it will always return something (theoretically, the closest possible match), and there's no guarantee that the product name is spelled exactly the same way in both APIs, so there's no automated way of knowing if it's the right product. When the pricing API finds the right product, occasionally it has outdated, or even invalid pricing data (e.g. if it screen-scraped the wrong price from a website). Since the site was fairly small at first, I was able to manually verify every product that was added to the website. However, the site has grown to the point where this is taking several hours per day, and is just not efficient use of my time. So, my question is: Aside from hiring someone (or getting an intern) to validate all the data manually, what would be the best system of letting my userbase self-manage the data. Specifically, how can I allow users to edit the data while minimizing the risk of someone ambushing my website, or accidentally setting the data incorrectly.

    Read the article

  • Updating textfield in doctrine produces an exception

    - by james-murphy
    I have a textfield that contains say for example the following text:- "A traditional English dish comprising sausages in Yorkshire pudding batter, usually served with vegetables and gravy." This textfield is in a form that simply updates an item record using it's ID. If I edit part of the textfield and replace "and gravy." with "humous." So that the textfield now contains "A traditional English dish comprising sausages in Yorkshire pudding batter, usually served with vegetables and humous." I get the following exception:- Fatal error: Uncaught exception 'Doctrine_Query_Exception' with message 'Unknown component alias humous' in C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php:780 Stack trace: C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php(767): Doctrine_Query_Abstract-getQueryComponent('humous') C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Set.php(58): Doctrine_Query_Abstract-getAliasDeclaration('humous') C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php(2092): Doctrine_Query_Set-parse('i.details = 'A ...') C:\Projects\nitrous\lightweight\system\database\Doctrine\Query.php(1058): Doctrine_Query_Abstract-_processDqlQueryPart('set', Array) C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php(971): Doctrine_Query-getSqlQuery(Array) C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php(1030): Doctrine_Query_Abstract-_execute(Array) C:\Projects\nitrous\lightweight\system\appl in C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php on line 780 I'm using Doctrine 1.0.6 hooked into CodeIgniter 1.7.0 if anyone is interested. My doctrine query that actually performs the update looks as follows:- public function updateItems($id, $arrayItem) { $query = new Doctrine_Query(); $query->update('Item i'); foreach($arrayItem as $key => $value) { $query->set('i.'.$key, "'".$value."'"); } $query->where('i.id = ?', $id); return $query->execute(); } This seems bizarre because if i replace the entire string "A traditional English dish comprising sausages in Yorkshire pudding batter, usually served with vegetables and humous." with something completely different like just "test" it doesn't throw an exception and works just fine. This baffles me... is it a bug in Doctrine or have I missed something?

    Read the article

  • How to parse (infinite) nested object notation?

    - by kyogron
    I am currently breaking my head about transforming this object hash: "food": { "healthy": { "fruits": ['apples', 'bananas', 'oranges'], "vegetables": ['salad', 'onions'] }, "unhealthy": { "fastFood": ['burgers', 'chicken', 'pizza'] } } to something like this: food:healthy:fruits:apples food:healthy:fruits:bananas food:healthy:fruits:oranges food:healthy:vegetables:salad food:healthy:vegetables:onions food:unhealthy:fastFood:burgers food:unhealthy:fastFood:chicken food:unhealthy:fastFood:pizza In theory it actually is just looping through the object while keeping track of the path and the end result. Unfortunately I do not know how I could loop down till I have done all nested. var path; var pointer; function loop(obj) { for (var propertyName in obj) { path = propertyName; pointer = obj[propertyName]; if (pointer typeof === 'object') { loop(pointer); } else { break; } } }; function parse(object) { var collection = []; }; There are two issues which play each out: If I use recurse programming it looses the state of the properties which are already parsed. If I do not use it I cannot parse infinite. Is there some idea how to handle this? Regards

    Read the article

  • SQL Complicated Group / Join by Category

    - by Mike Silvis
    I currently have a database structure with two important tables. 1) Food Types (Fruit, Vegetables, Meat) 2) Specific Foods (Apple, Oranges, Carrots, Lettuce, Steak, Pork) I am currently trying to build a SQL statement such that I can have the following. Fruit < Apple, Orange Vegetables < Carrots, Lettuce Meat < Steak, Port I have tried using a statement like the following Select * From Food_Type join (Select * From Foods) as Foods on Food_Type.Type_ID = Foods.Type_ID but this returns every Specific Food, while I only want the first 2 per category. So I basically need my subquery to have a limit statement in it so that it finds only the first 2 per category. However if I simply do the following Select * From Food_Type join (Select * From Foods LIMIT 2) as Foods on Food_Type.Type_ID = Foods.Type_ID My statement only returns 2 results total.

    Read the article

  • LINQ to SQL - Grouping categories by parentId

    - by creativeincode
    I am trying to construct a navigation menu using a Categories table from my db. I have a similar layout as below in Categories table. public List<Category> CategoryData = new List(new Category[] { new Category{ CategoryId = 1, Name = "Fruit", ParentCategoryId = null}, new Category{ CategoryId = 2, Name = "Vegetables", ParentCategoryId = null}, new Category{ CategoryId = 3, Name = "Apples", ParentCategoryId = 1}, new Category{ CategoryId = 4, Name = "Bananas", ParentCategoryId = 1}, new Category{ CategoryId = 5, Name = "Cucumber", ParentCategoryId = 2}, new Category{ CategoryId = 6, Name = "Onions", ParentCategoryId = 2} ); } The above should return something like Fruit (parent) "===Apples, Bananas (child) Vegetables (parent) "===Cucumber, Onions (child) I need to be able to pass this as some kind of 'grouped' (grouped by parentid) collection to my View. How to do this?

    Read the article

  • How can I generate HTML tables in Perl?

    - by anon
    I need to create a 2 tables in HTML format. Each has 5 rows: 1st Table 1st row has FRUITS in it, occupying all columns 2nd row has January(month), occupying all columns 3rd row has names of some 6 fruits (apple, orange, grapes,...)These names do not change. so this row has 6 columns 4th row has rates for each fruit ( 10,20,30..) so this has 6 columns. 5th row has corresponding message for each fruit showing as Available or not. 2nd Table If it is available the background color for the cell should be green and if not RED. 1st row has VEGETABLES in it, occupying all columns 2nd row has February(month), occupying all columns 3rd row has names of some 6 vegetables (tomato, potato..)These names do not change. so this row has 6 columns 4th row has rates for each vegetable ( 10,20,30..) so this has 6 columns. 5th row has corresponding message for each vegetable showing as Available or not.If it is available the background color for the cell should be green and if not RED. All this data is read from a file having a particular format, it is <name of fruit/vegetable price <available or not The names of fruits and vegetable do not change , it will be same for both the tables. However, it might be possible that data for a particular fruit/vegetable is not present. if it is not present the the column for that should show N/A with white background. I cannot use MIME:Lite for this. Need to use print <<ENDHTML;

    Read the article

  • How to mix HTML in Perl

    - by anon
    Hi, I need to create a 2 tables in html format. each has 5 rows. 1st Table *) 1st row has FRUITS in it, occupying all columns *) 2nd row has January(month), occupying all columns *) 3rd row has names of some 6 fruits (apple, orange, grapes,...)These names do not change. so this row has 6 columns *) 4th row has rates for each fruit ( 10,20,30..) so this has 6 columns. *) 5th row has corresponding message for each fruit showing as Available or not. 2nd table If it is available the background color for the cell should be green and if not RED. *) 1st row has VEGETABLES in it, occupying all columns *) 2nd row has February(month), occupying all columns *) 3rd row has names of some 6 vegetables (tomato, potato..)These names do not change. so this row has 6 columns *) 4th row has rates for each vegetable ( 10,20,30..) so this has 6 columns. *) 5th row has corresponding message for each vegetable showing as Available or not.If it is available the background color for the cell should be green and if not RED. All this data is read from a file having a particular format, it is price The names of fruits and vegetable do not change , it will be same for both the tables. However, it might be possible that data for a particular fruit/vegetable is not present. if it is not present the the column for that should show N/A with white background. I cannot use MIME:Lite for this. Need to use print <

    Read the article

  • Updating iOS application content which include images

    - by azamsharp
    I am working on a Vegetable gardening application. Apart from the vegetable name and description I also have vegetable image. Currently, I have all the images in the Supported Files folder in the Xcode project. But later on I want to update the application dynamically without having the user download a new version. When the user updates the application or downloads new data from the server that data will include the images. Can I store those images in the supporting file folder or somewhere where they can be references by just the name. RELATED QUESTION: I will also allow the user to take pictures of their vegetables and then write notes about the vegetables like "just planted", "about to harvest" etc. What is the recommended approach for storing pictures/photos. I can always store them in the user's photo library and then store the reference in the local database and then fetch and display the picture using the reference. The problem with that approach might be that if the user accidentally deletes the picture from the library then it will no longer be displayed in my application. The only way I see if to store the picture in the app local database as a BLOB.

    Read the article

  • Can I send email after a agent job meets particular condition?

    - by Saaza Khan
    Every night. Am running a job what checks the produc expiration date.but ther products have different managers..for eg.milk comes under manager..vegetables comes under another manager ..etc so these people have different emails..I nee dot know wether it is possible to send a email to each manager when ever the product under their category is about to expire ,since it is runig as a job and in the night ..I am curious to know if I am following a correct way and if so how do I proceed

    Read the article

  • The fallacies of all these Studies Linking one thing to another&hellip;

    - by Shawn Cicoria
    Are pesticides really the link?  Or is it hereditary?  Pesticides in kids linked to ADHD http://www.msnbc.msn.com/id/37156010/ns/health-kids_and_parenting/ You’ve got to think this one through.  If the parents already have ADHD, and they buy fruits, don’t have the “patience” to wash the fruit, and the kids end up with larger detectible amounts of pesticides in their bodies – are the pesticides really the cause or is it hereditary? I say, switch the kids around for the real test – sure, let the kids go live at a parent’s house w/ out ADHD for 10 years [clearly I’m kidding] who then consciously chooses NOT to wash the fruit. I read this story and all I could think was that the parents already have ADHD and they end up not washing these fruits and vegetables

    Read the article

  • Reduce weight in healthy way - Day 3

    - by krnites
    So I am on Day 3 and what I did today was totally opposite of what I should have done. It seems I will take ever to loose what I had aim for. Today I had ate more than 5000 Calorie, had soda drinks and very oily indian food. On my Day 2 post some one commented that with the number that I have I will loose 1 lbs in a week, but my friends it seems I will gain 5 lbs in a week. I have to straighten my act and really focus on what I want to achieve. I am going to hit the gym and going to burn atleast 500 calorie today.Piece of advice - don't eat fried, oily  and junk food.  Try to have as much as vegetables in your food. I understand its not possible as being a normal person and not a diet freak I know its impossible to be away from Taco or burger and not drink Coke, but to achieve something you have to loose something.

    Read the article

  • I want to scramble an array in PHP

    - by BRUL
    I want PHP to randomly create a multi-dimensional array by picking a vast amount of items out of predefined lists for n times, but never with 2 times the same. Let me put that to human words in a real-life example: i want to write a list of vegetables and meat and i want php to make a menu for me, with every day something else then yesterday. I tried and all i got was the scrambling but there were always doubles :s

    Read the article

  • Rails - 1 entry in model per field, per day

    - by Elliot
    Lets say I have a food model in the model, every day, people enter how many lbs of pizza/vegetables/fruit they eat. each food is its own column my issue is, I'd like it so they can only enter that in once (for that food type) every 24 hours (based on created_at). This possible?

    Read the article

  • How to change the value of value in BASH ??

    - by debugger
    Hello All, Let's say i have the Following, Vegetable=Potato ( Kind of vegetable that i have ) Potato=3 ( quantity available ) If i wanna know how many vegetables i have (from a script where i have access only to variable Vegetable), i do the following: Quantity=${!Vegetable} But let's say i take one Potato then i want to update the quantity, i should be able to do the following: ${Vegetable}=$(expr ${!Vegetable} - 1) It does not work !! Any clues to realize this Thanks

    Read the article

  • Asus A8V overcurrent

    - by user139710
    This is not as much as a question as it is a note to those out there that upgrade their motherboards with better processors and the like. Here's my story. Recently I upgraded my processor. System specifications: • Asus A8V Deluxe • 4GB RAM • ATI Radeon 3870 AGP graphics card (I believe that's it) Anyway, I decided to put a dual core Opteron 180 in this rig, but the problem was that I needed to update the BIOS to V-1017, and not knowing the consequences, I went up to the Asus site and got the newest, the latest and the greatest, 1018.002 thinking that it was the best for this board, however it wasn't. I used the Asus EXFlash, which makes life a lot easier, flashed the BIOS and all of a sudden I start getting this message: USB overcurrent protection, system shutting down in 15 seconds to protect your system. WELL SHIT... This is a new one on me... I read the blogs, all the posts on this thing, and did all that everyone else did to correct the problem, but nothing helped. So i decided to start from square one, went back to Asus and looked at the BIOS download... OMG... IT WAS A BETA. So, I downloaded the update that was suggested 1017< and installed it and wouldn't you know, it took care of the problem, no more USB overcurrent protection, no more crashing. I write this today to let you all know about this, just in case you have an issue such as this. Well there you all go. Fly safe and eat your vegetables.

    Read the article

  • Why is WPFToolkit DataGrid so slow when binding?

    - by Schneider
    I have a very simple test application where I have two objects, each with a small collection of items. when I select an object I display its collection in a WPFToolkit DataGrid. The problem is there is a noticeable delay, such that if you press up/down keys to toggle selection between objects you can see it can't keep up. Why is the performance so bad? <Window x:Class="SlowGridBinding.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" Title="MainWindow" Height="350" Width="525"> <StackPanel> <ListBox ItemsSource="{Binding Shops}" DisplayMemberPath="Name" IsSynchronizedWithCurrentItem="True"/> <Controls:DataGrid ItemsSource="{Binding Shops/Vegetables}" AutoGenerateColumns="True"/> </StackPanel> The DataContext is populated with some test classes filled with 50 items of random test data.

    Read the article

  • Checkboxes and Radio Buttons Together in a JTree

    - by Thunderforge
    I'd like to create a JTree that more or less has the following structure (with a hidden root node) [No Option] Main Dish [Radio Button] Steak [Radio Button] Fish [Radio Button] Filet Mignon [Checkbox] Side Dish [Checkbox] Mashed Potatoes [Checkbox] Green Beans [Checkbox] Mixed Vegetables [Checkbox] Dessert [Radio Button] Ice Cream [Radio Button] Pudding [Radio Button] Cake Basically, at least one main dish (but no more than one) can be chosen, any number of side dishes can be chosen (or none, if the "Side Dish" checkbox is unchecked), and only one dessert can be chosen (or none, if the "Dessert" checkbox is unchecked). This article describes how to create a tree that uses JCheckboxes (as I'd like to use for the Side Dish and Dessert sections) by creating a custom Renderer and page 3 of the same article describes how to use Radio buttons (as I'd like to use for the Main Course) section. But it doesn't describe how to mix them up within the same JTree. Is it possible to create a structure like this? And if so, how?

    Read the article

  • how to remove dynamically loaded images in javascript

    - by jesse
    I'm loading in 3 images (named 1.jpg, 2.jpg, 3jpg) dynamically to 3 divs called "div1", "div2" and "div3". function loadImages() { for (var i = 1; i < 3; i++ ) { var img = document.createElement("img"); img.src = "vegetables/"+i+".jpg"; img.id = "a"+i+""; var divName = "div"+i+""; document.getElementById(divName).appendChild(img); } } That works, but the removing part I can't seem to get to work.. function removeImages() { for (var i = 1; i < 3; i++ ) { var oldImages = "a"+i+""; var divName = "div"+i+""; document.getElementById(divName).removeChild(oldImages); } } Thank you.

    Read the article

  • What skills are needed to be successful at robotics?

    - by Click Upvote
    I'm considering studying to be a robotics engineer. The desire to work in that field is definitely there.. but I'm wondering what my chances of success would be. Generally I'm good with mental tasks of any sort such as programming, maths, physics, etc, and I think i'd be able to do electrical work such as soldering wires, changing batteries, etc. However, I'm not so good with things of a physical nature where I have to use my hands. For example, if you give me some vegetables to slice and dice, all of them will be diced un-evenly and some will look ugly. This might be because I have poor mind-hand coordination or because of a lack of concentration. Thoughts?

    Read the article

  • Clear form field after select for jQuery UI Autocomplete

    - by jonfhancock
    I'm developing a form, and using jQuery UI Autocomplete. When the user selects an option, I want the selection to pop into a span appended to the parent <p> tag. Then I want the field to clear rather than be populated with the selection. I have the span appearing just fine, but I can't get the field to clear. How do you cancel jQuery UI Autocomplete's default select action? Here is my code: var availableTags = ["cheese", "milk", "dairy", "meat", "vegetables", "fruit", "grains"]; $("[id^=item-tag-]").autocomplete({ source: availableTags, select: function(){ var newTag = $(this).val(); $(this).val(""); $(this).parent().append("<span>" + newTag + "<a href=\"#\">[x]</a> </span>"); } }); Simply doing $(this).val(""); doesn't work. What is maddening is that almost the exact function works fine if I ignore autocomplete, and just take action when the user types a comma as such: $('[id^=item-tag-]').keyup(function(e) { if(e.keyCode == 188) { var newTag = $(this).val().slice(0,-1); $(this).val(''); $(this).parent().append("<span>" + newTag + "<a href=\"#\">[x]</a> </span>"); } }); The real end result is to get autocomplete to work with multiple selections. If anybody has any suggestions for that, they would be welcome.

    Read the article

  • Use an Array to Cycle Through a MySQL Where Statement

    - by Ryan
    I'm trying to create a loop that will output multiple where statements for a MySQL query. Ultimately, my goal is to end up with these four separate Where statements: `fruit` = '1' AND `vegetables` = '1' `fruit` = '1' AND `vegetables` = '2' `fruit` = '2' AND `vegetables` = '1' `fruit` = '2' AND `vegetables` = '2' My theoretical code is pasted below: <?php $columnnames = array('fruit','vegetables'); $column1 = array('1','2'); $column2 = array('1','2'); $where = ''; $column1inc =0; $column2inc =0; while( $column1inc <= count($column1) ) { if( !empty( $where ) ) $where .= ' AND '; $where = "`".$columnnames[0]."` = "; $where .= "'".$column1[$column1inc]."'"; while( $column2inc <= count($column2) ) { if( !empty( $where ) ) $where .= ' AND '; $where .= "`".$columnnames[1]."` = "; $where .= "'".$column2[$column2inc]."'"; echo $where."\n"; $column2inc++; } $column1inc++; } ?> When I run this code, I get the following output: `fruit` = '1' AND `vegetables` = '1' `fruit` = '1' AND `vegetables` = '1' AND `vegetables` = '2' `fruit` = '1' AND `vegetables` = '1' AND `vegetables` = '2' AND `vegetables` = '' Does anyone see what I am doing incorrectly? Thanks.

    Read the article

  • Ingredient Substitutes while Baking

    - by Rekha
    In our normal cooking, we substitute the vegetables for the gravies we prepare. When we start baking, we look for a good recipe. At least one or two ingredient will be missing. We do not know where to substitute what to bring same output. So we finally drop the plan of baking. Again after a month, we get the interest in baking. Again one or two lack of ingredient and that’s it. We keep on doing this for months. When I was going through the cooking blogs, I came across a site with the Ingredient Substitutes for Baking: (*) is to indicate that this substitution is ideal from personal experience. Flour Substitutes ( For 1 cup of Flour) All Purpose Flour 1/2 cup white cake flour plus 1/2 cup whole wheat flour 1 cup self-rising flour (omit using salt and baking powder if the recipe calls for it since self raising flour has it already) 1 cup plus 2 tablespoons cake flour 1/2 cup (75 grams) whole wheat flour 7/8 cup (130 grams) rice flour (starch) (do not replace all of the flour with the rice flour) 7/8 cup whole wheat Bread Flour 1 cup all purpose flour 1 cup all purpose flour plus 1 teaspoon wheat gluten (*) Cake Flour Place 2 tbsp cornstarch in 1 cup and fill the rest up with All Purpose flour (*) 1 cup all purpose flour minus 2 tablespoons Pastry flour Place 2 tbsp cornstarch in 1 cup and fill the rest up with All Purpose flour Equal parts of All purpose flour plus cake flour (*) Self-rising Flour 1½ teaspoons of baking powder plus ½ teaspoon of salt plus 1 cup of all-purpose flour. Cornstarch (1 tbsp) 2 tablespoons all-purpose flour 1 tablespoon arrowroot 4 teaspoons quick-cooking tapioca 1 tablespoon potato starch or rice starch or flour Tapioca (1 tbsp) 1 – 1/2 tablespoons all-purpose flour Cornmeal (stone ground) polenta OR corn flour (gives baked goods a lighter texture) if using cornmeal for breading,crush corn chips in a blender until they have the consistency of cornmeal. maize meal Corn grits Sweeteners ( for Every 1 cup ) * * (HV) denotes Healthy Version for low fat or fat free substitution in Baking Light Brown Sugar 2 tablespoons molasses plus 1 cup of white sugar Dark Brown Sugar 3 tablespoons molasses plus 1 cup of white sugar Confectioner’s/Powdered Sugar Process 1 cup sugar plus 1 tablespoon cornstarch Corn Syrup 1 cup sugar plus 1/4 cup water 1 cup Golden Syrup 1 cup honey (may be little sweeter) 1 cup molasses Golden Syrup Combine two parts light corn syrup plus one part molasses 1/2 cup honey plus 1/2 cup corn syrup 1 cup maple syrup 1 cup corn syrup Honey 1- 1/4 cups sugar plus 1/4 cup water 3/4 cup maple syrup plus 1/2 cup granulated sugar 3/4 cup corn syrup plus 1/2 cup granulated sugar 3/4 cup light molasses plus 1/2 cup granulated white sugar 1 1/4 cups granulated white or brown sugar plus 1/4 cup additional liquid in recipe plus 1/2 teaspoon cream of tartar Maple Syrup 1 cup honey,thinned with water or fruit juice like apple 3/4 cup corn syrup plus 1/4 cup butter 1 cup Brown Rice Syrup 1 cup Brown sugar (in case of cereals) 1 cup light molasses (on pancakes, cereals etc) 1 cup granulated sugar for every 3/4 cup of maple syrup and increase liquid in the recipe by 3 tbsp for every cup of sugar.If baking soda is used, decrease the amount by 1/4 teaspoon per cup of sugar substituted, since sugar is less acidic than maple syrup Molasses 1 cup honey 1 cup dark corn syrup 1 cup maple syrup 3/4 cup brown sugar warmed and dissolved in 1/4 cup of liquid ( use this if taste of molasses is important in the baked good) Cocoa Powder (Natural, Unsweetened) 3 tablespoons (20 grams) Dutch-processed cocoa plus 1/8 teaspoon cream of tartar, lemon juice or white vinegar 1 ounce (30 grams) unsweetened chocolate (reduce fat in recipe by 1 tablespoon) 3 tablespoons (20 grams) carob powder Semisweet baking chocolate (1 oz) 1 oz unsweetened baking chocolate plus 1 Tbsp sugar Unsweetened baking chocolate (1 oz ) 3 Tbsp baking cocoa plus 1 Tbsp vegetable oil or melted shortening or margarine Semisweet chocolate chips (1 cup) 6 oz semisweet baking chocolate, chopped (Alternatively) For 1 cup of Semi sweet chocolate chips you can use : 6 tablespoons unsweetened cocoa powder, 7 tablespoons sugar ,1/4 cup fat (butter or oil) Leaveners and Diary * * (HV) denotes Healthy Version for low fat or fat free substitution in Baking Compressed Yeast (1 cake) 1 envelope or 2 teaspoons active dry yeast 1 packet (1/4 ounce) Active Dry yeast 1 cake fresh compressed yeast 1 tablespoon fast-rising active yeast Baking Powder (1 tsp) 1/3 teaspoon baking soda plus 1/2 teaspoon cream of tartar 1/2 teaspoon baking soda plus 1/2 cup buttermilk or plain yogurt 1/4 teaspoon baking soda plus 1/3 cup molasses. When using the substitutions that include liquid, reduce other liquid in recipe accordingly Baking Soda(1 tsp) 3 tsp Baking Powder ( and reduce the acidic ingredients in the recipe. Ex Instead of buttermilk add milk) 1 tsp potassium bicarbonate Ideal substitution – 2 tsp Baking powder and omit salt in recipe Cream of tartar (1 tsp) 1 teaspoon white vinegar 1 tsp lemon juice Notes from What’s Cooking America – If cream of tartar is used along with baking soda in a cake or cookie recipe, omit both and use baking powder instead. If it calls for baking soda and cream of tarter, just use baking powder.Normally, when cream of tartar is used in a cookie, it is used together with baking soda. The two of them combined work like double-acting baking powder. When substituting for cream of tartar, you must also substitute for the baking soda. If your recipe calls for baking soda and cream of tarter, just use baking powder. One teaspoon baking powder is equivalent to 1/4 teaspoon baking soda plus 5/8 teaspoon cream of tartar. If there is additional baking soda that does not fit into the equation, simply add it to the batter. Buttermilk (1 cup) 1 tablespoon lemon juice or vinegar (white or cider) plus enough milk to make 1 cup (let stand 5-10 minutes) 1 cup plain or low fat yogurt 1 cup sour cream 1 cup water plus 1/4 cup buttermilk powder 1 cup milk plus 1 1/2 – 1 3/4 teaspoons cream of tartar Plain Yogurt (1 cup) 1 cup sour cream 1 cup buttermilk 1 cup crème fraiche 1 cup heavy whipping cream (35% butterfat) plus 1 tablespoon freshly squeezed lemon juice Whole Milk (1 cup) 1 cup fat free milk plus 1 tbsp unsaturated Oil like canola (HV) 1 cup low fat milk (HV) Heavy Cream (1 cup) 3/4 cup milk plus 1/3 cup melted butter.(whipping wont work) Sour Cream (1 cup) (pls refer also Substitutes for Fats in Baking below) 7/8 cup buttermilk or sour milk plus 3 tablespoons butter. 1 cup thickened yogurt plus 1 teaspoon baking soda. 3/4 cup sour milk plus 1/3 cup butter. 3/4 cup buttermilk plus 1/3 cup butter. Cooked sauces: 1 cup yogurt plus 1 tablespoon flour plus 2 teaspoons water. Cooked sauces: 1 cup evaporated milk plus 1 tablespoon vinegar or lemon juice. Let stand 5 minutes to thicken. Dips: 1 cup yogurt (drain through a cheesecloth-lined sieve for 30 minutes in the refrigerator for a thicker texture). Dips: 1 cup cottage cheese plus 1/4 cup yogurt or buttermilk, briefly whirled in a blender. Dips: 6 ounces cream cheese plus 3 tablespoons milk,briefly whirled in a blender. Lower fat: 1 cup low-fat cottage cheese plus 1 tablespoon lemon juice plus 2 tablespoons skim milk, whipped until smooth in a blender. Lower fat: 1 can chilled evaporated milk whipped with 1 teaspoon lemon juice. 1 cup plain yogurt plus 1 tablespoon cornstarch 1 cup plain nonfat yogurt Substitutes for Fats in Baking * * (HV) denoted Healthy Version for low fat or fat free substitution in Baking Butter (1 cup) 1 cup trans-free vegetable shortening 3/4 cups of vegetable oil (example. Canola oil) Fruit purees (example- applesauce, pureed prunes, baby-food fruits). Add it along with some vegetable oil and reduce any other sweeteners needed in the recipe since fruit purees are already sweet. 1 cup polyunsaturated margarine (HV) 3/4 cup polyunsaturated oil like safflower oil (HV) 1 cup mild olive oil (not extra virgin)(HV) Note: Butter creates the flakiness and the richness which an oil/purees cant provide. If you don’t want to compromise that much to taste, replace half the butter with the substitutions. Shortening(1 cup) 1 cup polyunsaturated margarine like Earth Balance or Smart Balance(HV) 1 cup + 2tbsp Butter ( better tasting than shortening but more expensive and has cholesterol and a higher level of saturated fat; makes cookies less crunchy, bread crusts more crispy) 1 cup + 2 tbsp Margarine (better tasting than shortening but more expensive; makes cookies less crunchy, bread crusts tougher) 1 Cup – 2tbsp Lard (Has cholesterol and a higher level of saturated fat) Oil equal amount of apple sauce stiffly beaten egg whites into batter equal parts mashed banana equal parts yogurt prune puree grated raw zucchini or seeds removed if cooked. Works well in quick breads/muffins/coffee cakes and does not alter taste pumpkin puree (if the recipe can handle the taste change) Low fat cottage cheese (use only half of the required fat in the recipe). Can give rubbery texture to the end result Silken Tofu – (use only half of the required fat in the recipe). Can give rubbery texture to the end result Equal parts of fruit juice Note: Fruit purees can alter the taste of the final product is used in large quantities. Cream Cheese (1 cup) 4 tbsps. margarine plus 1 cup low-fat cottage cheese – blended. Add few teaspoons of fat-free milk if needed (HV) Heavy Cream (1 cup) 1 cup evaporated skim milk (or full fat milk) 1/2 cup low fat Yogurt plus 1/2 low fat Cottage Cheese (HV) 1/2 cup Yogurt plus 1/2 Cottage Cheese Sour Cream (1 cup) 1 cup plain yogurt (HV) 3/4 cup buttermilk or plain yogurt plus 1/3 cup melted butter 1 cup crème fraiche 1 tablespoon lemon juice or vinegar plus enough whole milk to fill 1 cup (let stand 5-10 minutes) 1/2 cup low-fat cottage cheese plus 1/2 cup low-fat or nonfat yogurt (HV) 1 cup fat-free sour cream (HV) Note: How to Make Maple Syrup Substitute at home For 1 Cup Maple Syrup 1/2 cup granulated sugar 1 cup brown sugar, firmly packed 1 cup boiling water 1 teaspoon butter 1 teaspoon maple extract or vanilla extract Method In a heavy saucepan, place the granulated sugar and keep stirring until it melts and turns slightly brown. Alternatively in another pan, place brown sugar and water and bring to a boil without stirring. Now mix both the sugars and simmer in low heat until they come together as one thick syrup. Remove from heat, add butter and the extract. Use this in place of maple syrup. Store it in a fridge in an air tight container. Even though this was posted in their site long back, I found it helpful. So posting it for you. via chefinyou . cc image credit: flickr/zetrules

    Read the article

1 2  | Next Page >