Search Results

Search found 81 results on 4 pages for 'ingredient 15939'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • An algorithm for finding subset matching criteria?

    - by Macin
    I recently came up with a problem which I would like to share some thoughts about with someone on this forum. This relates to finding a subset. In reality it is more complicated, but I tried to present it here using some simpler concepts. To make things easier, I created this conceptual DB model: Let's assume this is a DB for storing recipes. Recipe can have many instructions steps and many ingredients. Ingredients are stored in a cupboard and we know how much of each ingredient we have. Now, when we create a recipe, we have to define how much of each ingredient we need. When we want to use a recipe, we would just check if required amount is less than available amount for each product and then decide if we can cook a dinner - if amount required for at least one ingredient is less than available amount - recipe cannot be cooked. Simple sql query to get the result. This is straightforward, but I'm wondering, how should I work when the problem is stated the other way round, i.e. how to find recipies which can be cooked only from ingredients that are available? I hope my explanation is clear, but if you need any more clarification, please ask.

    Read the article

  • Google-Chrome 10 stable crash on every page

    - by Achu
    I installed google-chrome today, when i open any page including askubuntu i got this error message. i see my memory usage is normal(Memory 56% and swap 4.8%) also I reload and i go to another page same problem What is the problem? the last dmesg output [26612.341865] lo: Disabled Privacy Extensions [29651.852476] chrome[15472] general protection ip:1528e26 sp:7fff514a9dc0 error:0 in chrome[400000+3082000] [31447.190586] [UFW BLOCK] IN=eth1 OUT= MAC=00:1c:25:a1:e7:67:00:16:3e:28:5a:b7:08:00 SRC=172.23.100.6 DST=172.23.20.128 LEN=69 TOS=0x00 PREC=0x00 TTL=128 ID=15939 PROTO=UDP SPT=4243 DPT=161 LEN=49 [31451.250190] [UFW BLOCK] IN=eth1 OUT= MAC=00:1c:25:a1:e7:67:00:16:3e:28:5a:b7:08:00 SRC=172.23.100.6 DST=172.23.20.128 LEN=69 TOS=0x00 PREC=0x00 TTL=128 ID=16180 PROTO=UDP SPT=4243 DPT=161 LEN=49 [31454.260150] [UFW BLOCK] IN=eth1 OUT= MAC=00:1c:25:a1:e7:67:00:16:3e:28:5a:b7:08:00 SRC=172.23.100.6 DST=172.23.20.128 LEN=69 TOS=0x00 PREC=0x00 TTL=128 ID=16322 PROTO=UDP SPT=4243 DPT=161 LEN=49 [31458.648164] [UFW BLOCK] IN=eth1 OUT= MAC=00:1c:25:a1:e7:67:00:16:3e:28:5a:b7:08:00 SRC=172.23.100.6 DST=172.23.20.128 LEN=69 TOS=0x00 PREC=0x00 TTL=128 ID=16513 PROTO=UDP SPT=4243 DPT=161 LEN=49 [33124.300112] lo: Disabled Privacy Extensions [33601.021406] Skipping EDID probe due to cached edid [34594.043501] chrome[15746]: segfault at 0 ip 0000000000d5cdd0 sp 00007fff5149ec20 error 6 in chrome[400000+3082000] [34597.395334] chrome[18112] general protection ip:17c85bf sp:7fff514aa4f0 error:0 in chrome[400000+3082000] [34616.786643] chrome[18124]: segfault at 1007 ip 00000000017c849f sp 00007fff514aabd0 error 4 in chrome[400000+3082000] [37277.436207] lo: Disabled Privacy Extensions [38549.501390] e1000e: eth1 NIC Link is Down [38551.122253] e1000e: eth1 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX [38551.122263] e1000e 0000:00:19.0: eth1: 10/100 speed: disabling TSO

    Read the article

  • Save many-to-one relationship from JSON into Core Data

    - by Snow Crash
    I'm wanting to save a Many-to-one relationship parsed from JSON into Core Data. The code that parses the JSON and does the insert into Core Data looks like this: for (NSDictionary *thisRecipe in recipes) { Recipe *recipe = [NSEntityDescription insertNewObjectForEntityForName:@"Recipe" inManagedObjectContext:insertionContext]; recipe.title = [thisRecipe objectForKey:@"Title"]; NSDictionary *ingredientsForRecipe = [thisRecipe objectForKey:@"Ingredients"]; NSArray *ingredientsArray = [ingredientsForRecipe objectForKey:@"Results"]; for (NSDictionary *thisIngredient in ingredientsArray) { Ingredient *ingredient = [NSEntityDescription insertNewObjectForEntityForName:@"Ingredient" inManagedObjectContext:insertionContext]; ingredient.name = [thisIngredient objectForKey:@"Name"]; } } NSSet *ingredientsSet = [NSSet ingredientsArray]; [recipe setIngredients:ingredientsSet]; Notes: "setIngredients" is a Core Data generated accessor method. There is a many-to-one relationship between Ingredients and Recipe However, when I run this I get the following error: NSCFDictionary managedObjectContext]: unrecognized selector sent to instance If I remove the last line (i.e. [recipe setIngredients:ingredientsSet];) then, taking a peek at the SQLite database, I see the Recipe and Ingredients have been stored but no relationship has been created between Recipe and Ingredients Any suggestions as to how to ensure the relationship is stored correctly?

    Read the article

  • Entityframework duplicate record on second insert

    - by Delysid
    I am building an application for recipe/meal planning, and i have come across a problem i cant seem to figure out. i have a table for units of measure, where i keep the used units in, i only want unique units in here (for grocery list calculation and so forth) but if i use a unit from the table on a recipe, the first time it is okay, nothing is inserted in units of measure, but the second time i get a "duplicate". i suspect it has something to do with entitykey, because the primary key is identity column on the sql server (2008 r2) for some reason it works to change the objectstate on some objects (courses, see code) and that does not generate a duplicate, but that does not work on the unit of measure my insert methods looks like this : public recipe Create(recipe recipe) { using (RecipeDataContext ctx = new RecipeDataContext()) { foreach (recipe_ingredient rec_ing in recipe.recipe_ingredient) { if (rec_ing.ingredient.ingredient_id == 0) { ingredient ing = (from _ing in ctx.ingredients where _ing.name == rec_ing.ingredient.name select _ing).FirstOrDefault(); if (ing != null) { rec_ing.ingredient_id = ing.ingredient_id; rec_ing.ingredient = null; } } if (rec_ing.unit_of_measure.unit_of_measure_id == 0) { unit_of_measure _uom = (from dbUom in ctx.unit_of_measure where dbUom.unit == rec_ing.unit_of_measure.unit select dbUom).FirstOrDefault(); if (_uom != null) { rec_ing.unit_of_measure_id = _uom.unit_of_measure_id; rec_ing.unit_of_measure = null; } } ctx.Recipes.AddObject(recipe); //for some reason it works to change object state of this, and not generate a duplicate ctx.ObjectStateManager.ChangeObjectState(recipe.courses[0], EntityState.Unchanged); } ctx.SaveChanges(); } return recipe; } My datamodel looks like this : http://i.imgur.com/NMwZv.png

    Read the article

  • Generic extension method returning IEnumerable<T> without using reflection

    - by roosteronacid
    Consider this snippet of code: public static class MatchCollectionExtensions { public static IEnumerable<T> AsEnumerable<T>(this MatchCollection mc) { return new T[mc.Count]; } } And this class: public class Ingredient { public String Name { get; set; } } Is there any way to magically transform a MatchCollection object to a collection of Ingredient? The use-case would look something like this: var matches = new Regex("([a-z])+,?").Matches("tomato,potato,carrot"); var ingredients = matches.AsEnumerable<Ingredient>();

    Read the article

  • Specify fields in a recursive find with cakephp

    - by Razor Storm
    Suppose I have a table Recipe that hasmany ingredients. I do a recursive find to grab recipes with their associated ingredients: $this->Recipe->find('all', array('fields' => array('id','title','description'))); Here I can use the 'fields' attribute to specify that I only want it to return id, title, and description. However, despite this, cakephp still returns ALL columns from the ingredients table. How do I tell cakephp that I only want ingredient table's id and name fields? btw ingredient model is "Ingredient" and the table is ingredients, and the aggregation table is recipes_ingredients.

    Read the article

  • MySQL: Query to obtain recipes using all given ingredients.

    - by John_A
    hi I have the following simplified tables: CREATE TABLE recipe(id int, name varchar(25)); CREATE TABLE ingredient(name varchar(25)); CREATE TABLE uses_ingredient(recipe_id int, name varchar(25)); I want to make a query that returns all id's of recipes that contain both Chicken and Cream. I have tried SELECT recipe_id FROM uses_ingredient INNER JOIN (SELECT * FROM ingredient WHERE name="Chicken" OR name="Cream") USING (name) GROUP BY recipe_id HAVING COUNT(recipe_id) >= (SELECT COUNT(*) FROM theme); which gives me :"ERROR 1248 (42000): Every derived table must have its own alias" and is probably wrong too. Next I tried SELECT recipe_id FROM (SELECT * FROM ingredient WHERE name="Chicken" OR name="Cream") AS t INNER JOIN uses_ingredient USING (name) GROUP BY recipe_id HAVING COUNT(recipe_id)>= (SELECT COUNT(*) FROM t); which gives "ERROR 1146 (42S02): Table 'recipedb.t' doesn't exist" I want to avoid creating temporary tables including using ENGINE=MEMORY.

    Read the article

  • Goodbye XML&hellip; Hello YAML (part 2)

    - by Brian Genisio's House Of Bilz
    Part 1 After I explained my motivation for using YAML instead of XML for my data, I got a lot of people asking me what type of tooling is available in the .Net space for consuming YAML.  In this post, I will discuss a nice tooling option as well as describe some small modifications to leverage the extremely powerful dynamic capabilities of C# 4.0.  I will be referring to the following YAML file throughout this post Recipe: Title: Macaroni and Cheese Description: My favorite comfort food. Author: Brian Genisio TimeToPrepare: 30 Minutes Ingredients: - Name: Cheese Quantity: 3 Units: cups - Name: Macaroni Quantity: 16 Units: oz Steps: - Number: 1 Description: Cook the macaroni - Number: 2 Description: Melt the cheese - Number: 3 Description: Mix the cooked macaroni with the melted cheese Tooling It turns out that there are several implementations of YAML tools out there.  The neatest one, in my opinion, is YAML for .NET, Visual Studio and Powershell.  It includes a great editor plug-in for Visual Studio as well as YamlCore, which is a parsing engine for .Net.  It is in active development still, but it is certainly enough to get you going with YAML in .Net.  Start by referenceing YamlCore.dll, load your document, and you are on your way.  Here is an example of using the parser to get the title of the Recipe: var yaml = YamlLanguage.FileTo("Data.yaml") as Hashtable; var recipe = yaml["Recipe"] as Hashtable; var title = recipe["Title"] as string; In a similar way, you can access data in the Ingredients set: var yaml = YamlLanguage.FileTo("Data.yaml") as Hashtable; var recipe = yaml["Recipe"] as Hashtable; var ingredients = recipe["Ingredients"] as ArrayList; foreach (Hashtable ingredient in ingredients) { var name = ingredient["Name"] as string; } You may have noticed that YamlCore uses non-generic Hashtables and ArrayLists.  This is because YamlCore was designed to work in all .Net versions, including 1.0.  Everything in the parsed tree is one of two things: Hashtable, ArrayList or Value type (usually String).  This translates well to the YAML structure where everything is either a Map, a Set or a Value.  Taking it further Personally, I really dislike writing code like this.  Years ago, I promised myself to never write the words Hashtable or ArrayList in my .Net code again.  They are ugly, mostly depreciated collections that existed before we got generics in C# 2.0.  Now, especially that we have dynamic capabilities in C# 4.0, we can do a lot better than this.  With a relatively small amount of code, you can wrap the Hashtables and Array lists with a dynamic wrapper (wrapper code at the bottom of this post).  The same code can be re-written to look like this: dynamic doc = YamlDoc.Load("Data.yaml"); var title = doc.Recipe.Title; And dynamic doc = YamlDoc.Load("Data.yaml"); foreach (dynamic ingredient in doc.Recipe.Ingredients) { var name = ingredient.Name; } I significantly prefer this code over the previous.  That’s not all… the magic really happens when we take this concept into WPF.  With a single line of code, you can bind to the data dynamically in the view: DataContext = YamlDoc.Load("Data.yaml"); Then, your XAML is extremely straight-forward (Nothing else.  No static types, no adapter code.  Nothing): <StackPanel> <TextBlock Text="{Binding Recipe.Title}" /> <TextBlock Text="{Binding Recipe.Description}" /> <TextBlock Text="{Binding Recipe.Author}" /> <TextBlock Text="{Binding Recipe.TimeToPrepare}" /> <TextBlock Text="Ingredients:" FontWeight="Bold" /> <ItemsControl ItemsSource="{Binding Recipe.Ingredients}" Margin="10,0,0,0"> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Quantity}" /> <TextBlock Text=" " /> <TextBlock Text="{Binding Units}" /> <TextBlock Text=" of " /> <TextBlock Text="{Binding Name}" /> </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> <TextBlock Text="Steps:" FontWeight="Bold" /> <ItemsControl ItemsSource="{Binding Recipe.Steps}" Margin="10,0,0,0"> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Number}" /> <TextBlock Text=": " /> <TextBlock Text="{Binding Description}" /> </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </StackPanel> This nifty XAML binding trick only works in WPF, unfortunately.  Silverlight handles binding differently, so they don’t support binding to dynamic objects as of late (March 2010).  This, in my opinion, is a major lacking feature in Silverlight and I really hope we will see this feature available to us in Silverlight 4 Release.  (I am not very optimistic for Silverlight 4, but I can hope for the feature in Silverlight 5, can’t I?) Conclusion I still have a few things I want to say about using YAML in the .Net space including de-serialization and using IronRuby for your YAML parser, but this post is hopefully enough to see how easy it is to incorporate YAML documents in your code. Codeplex Site for YAML tools Dynamic wrapper for YamlCore

    Read the article

  • How To Peel Garlic In Quick & Easy Way

    - by Gopinath
    Garlic is very common ingredient used in cooking in many parts of the world. In India it’s an undeniable ingredient in almost all the food items that are made using masala. So every cook of Indian kitchen knows the pain of peeling garlic. It’s a messy and time consuming process to peel of all the dead skin layers to get the tasty cloves. Cooking web site Saveur shows us as easy way to peel an entire garlic in less than 10 seconds using just two bowls.  No knifes, no scissor or any other instruments. Check the embedded video   I’ve not yet tried this trick at home, but looks like very easy one. What do you say? via Lifehacker (thanks vijay). cc image credit: flickr/lightlady

    Read the article

  • jQuery: How to grab RadioButton selection?

    - by Matt
    I need to grab the value of the radiobutton option selected with jQuery. I am using the following code but "str" is undefined in Firebug: //handling Feed vs. Ingredient RadioButton $('[id$=rdoCheck]').change(function() { str = $("input[name='rdoCheck']:checked").val(); //ingredients if (str == "ing") { $('[id$="lblDescription"]').text("Ingredient") } //finished feed else if (str == "ffc") { $('[id$="lblDescription"]').text("Finished") } });

    Read the article

  • Rails 3 equivalent of complex SQL query

    - by Bryan
    Given the following models: class Recipe < ActiveRecord::Base has_many :recipe_ingredients has_many :ingredients, :through => :recipe_ingredients end class RecipeIngredient < ActiveRecord::Base belongs_to :recipe belongs_to :ingredient end class Ingredient < ActiveRecord::Base end How can I perform the following SQL query using Arel in Rails 3? SELECT * FROM recipes WHERE NOT EXISTS ( SELECT * FROM ingredients WHERE name IN ('chocolate', 'cream') AND NOT EXISTS ( SELECT * FROM recipe_ingredients WHERE recipe_ingredients.recipe_id = recipes.id AND recipe_ingredients.ingredient_id = ingredients.id))

    Read the article

  • Representing xml through a single class

    - by Charles
    I am trying to abstract away the difficulties of configuring an application that we use. This application takes a xml configuration file and it can be a bit bothersome to manually edit this file, especially when we are trying to setup some automatic testing scenarios. I am finding that reading xml is nice, pretty easy, you get a network of element nodes that you can just go through and build your structures quite nicely. However I am slowly finding that the reverse is not quite so nice. I want to be able to build a xml configuration file through a single easy to use interface and because xml is composed of a system of nodes I am having a lot of struggle trying to maintain the 'easy' part. Does anyone know of any examples or samples that easily and intuitively build xml files without declaring a bunch of element type classes and expect the user to build the network themselves? For example if my desired xml output is like so <cook version="1.1"> <recipe name="chocolate chip cookie"> <ingredients> <ingredient name="flour" amount="2" units="cups"/> <ingredient name="eggs" amount="2" units="" /> <ingredient name="cooking chocolate" amount="5" units="cups" /> </ingredients> <directions> <direction name="step 1">Preheat oven</direction> <direction name="step 2">Mix flour, egg, and chocolate</direction> <direction name="step 2">bake</direction> </directions> </recipe> <recipe name="hot dog"> ... How would I go about designing a class to build that network of elements and make one easy to use interface for creating recipes? Right now I have a recipe object, an ingredient object, and a direction object. The user must make each one, set the attributes in the class and attach them to the root object which assembles the xml elements and outputs the formatted xml. Its not very pretty and I just know there has to be a better way. I am using python so bonus points for pythonic solutions

    Read the article

  • Java Dragging an object from one area to another [on hold]

    - by user50369
    Hello I have a game where you drag bits of food around the screen. I want to be able to click on an ingredient and drag it to another part of the screen where I release the mouse. I am new to java so I do not really know how to do this please help me Here is me code. This is the class with the mouse listeners in it: public void mousePressed(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON1) { Comp.ml = true; // placing if (manager.title == true) { if (title.r.contains(Comp.mx, Comp.my)) { title.overview = true; } else if (title.r1.contains(Comp.mx, Comp.my)) { title.options = true; } else if (title.r2.contains(Comp.mx, Comp.my)) { System.exit(0); } } if (manager.option == true) { optionsMouse(e); } mouseinventory(e); } else if (e.getButton() == MouseEvent.BUTTON3) { Comp.mr = true; } } private void mouseinventory(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON1) { } else if (e.getButton() == MouseEvent.BUTTON1) { } } @Override public void mouseReleased(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON1) { Comp.ml = false; } else if (e.getButton() == MouseEvent.BUTTON3) { Comp.mr = false; } } @Override public void mouseDragged(MouseEvent e) { for(int i = 0; i < overview.im.ing.toArray().length; i ++){ if(overview.im.ing.get(i).r.contains(Comp.mx,Comp.my)){ overview.im.ing.get(i).newx = Comp.mx; overview.im.ing.get(i).newy = Comp.my; overview.im.ing.get(i).dragged = true; }else{ overview.im.ing.get(i).dragged = false; } } } @Override public void mouseMoved(MouseEvent e) { Comp.mx = e.getX(); Comp.my = e.getY(); // System.out.println("" + Comp.my); } This is the class called ingredient public abstract class Ingrediant { public int x,y,id,lastx,lasty,newx,newy; public boolean removed = false,dragged = false; public int width; public int height; public Rectangle r = new Rectangle(x,y,width,height); public Ingrediant(){ r = new Rectangle(x,y,width,height); } public abstract void tick(); public abstract void render(Graphics g); } and this is a class which extends ingredient called hagleave public class HagLeave extends Ingrediant { private Image img; public HagLeave(int x, int y, int id) { this.x = x; this.y = y; this.newx = x; this.newy = y; this.id = id; width = 75; height = 75; r = new Rectangle(x,y,width,height); } public void tick() { r = new Rectangle(x,y,width,height); if(!dragged){ x = newx; y = newy; } } public void render(Graphics g) { ImageIcon i2 = new ImageIcon("res/ingrediants/hagleave.png"); img = i2.getImage(); g.drawImage(img, x, y, null); g.setColor(Color.red); g.drawRect(r.x, r.y, r.width, r.height); } } The arraylist is in a class called ingrediantManager: public class IngrediantsManager { public ArrayList<Ingrediant> ing = new ArrayList<Ingrediant>(); public IngrediantsManager(){ ing.add(new HagLeave(100,200,1)); ing.add(new PigHair(70,300,2)); ing.add(new GiantsToe(100,400,3)); } public void tick(){ for(int i = 0; i < ing.toArray().length; i ++){ ing.get(i).tick(); if(ing.get(i).removed){ ing.remove(i); i--; } } } public void render(Graphics g){ for(int i = 0; i < ing.toArray().length; i ++){ ing.get(i).render(g); } } }

    Read the article

  • Nested Entities and calculation on leaf entity property - SQL or NoSQL approach

    - by Chandu
    I am working on a hobby project called Menu/Recipe Management. This is how my entities and their relations look like. A Nutrient has properties Code and Value An Ingredient has a collection of Nutrients A Recipe has a Collection of Ingredients and occasionally can have a collection of other recipes A Meal has a Collection of Recipes and Ingredients A Menu has a Collection of Meals The relations can be depicted as In one of the pages, for a selected menu I need to display the effective nutrients information calculated based on its constituents (Meals, Recipes, Ingredients and the corresponding nutrients). As of now am using SQL Server to store the data and I am navigating the chain from my C# code, starting from each meal of the menu and then aggregating the nutrient values. I think this is not an efficient way as this calculation is being done every time the page is requested and the constituents change occasionally. I was thinking about a having a background service that maintains a table called MenuNutrients ({MenuId, NutrientId, Value}) and will populate/update this table with the effective nutrients when any of the component (Meal, Recipe, Ingredient) changes. I feel that a GraphDB would be a good fit for this requirement, but my exposure to NoSQL is limited. I want to know what are the alternative solutions/approaches to this requirement of displaying the nutrients of a given menu. Hope my description of the scenario is clear.

    Read the article

  • Converting part of a multi-purpose XML file to RSS using XSL

    - by Nate McCloud
    I have an XML file that I use for storing and displaying recipes that I collect, but that same XML file also has updates for the site at the top of it. How would I, say, use Recipes.xsl to transform Recipes.xml for display as an actual website, and use RecipesRSS.xsl to transform Recipes.xml into Recipes.rss? Currently, my XML file is formatted something like this: <book> <updates> <update when="2010-04-19"> <format> <update>Formatting updates here, if any. Otherwise, omit the Format section.</update> ... </format> <recipes> <update>Recipe updates here, if any. Otherwise, omit the Recipes section.</update> ... </recipes> </update> ... </updates> <recipe name="Recipe Name"> <from>Recipe source</from> <category>Recipe category</category> <ingredients> <ingredient>Recipe ingredient</ingredient> ... </ingredients> <instructions> <step>Recipe instructions go here.</step> ... </instructions> <notes> <note>Additional notes go here, if any. Otherwise, Notes section is omitted.</note> ... </notes> </recipe> ... </book> Any help would be greatly appreciated.

    Read the article

  • Can't send flash message from Model method

    - by Andy
    Hello, I'm trying to prevent a record that has a relationship to another record from being deleted. I can stop the deletion but not send a flash message as I had hoped! class Purchaseitem < ActiveRecord::Base before_destroy :check_if_ingredient ... def check_if_ingredient i = Ingredient.find(:all, :conditions => "purchaseitem_id = #{self.id}") if i.length > 0 self.errors.add(:name) flash.now[:notice] = "#{self.name} is in use as an ingredient and cannot be deleted" return false end end This will prevent a the delete wihthout the flash line, and when I add it I get: undefined local variable or method `flash' for # Any help would be much appreciated!

    Read the article

  • Java: How to store Vector<String[]> in XML (or save in any other way)

    - by hatboysam
    Basically I have a proof-of-concept application that is a digital recipe book. Each Recipe is an object and each object has, among other fields, a Vector containing arrays. The Vector is the list of all ingredients in the Recipe while each ingredient has an array showing the name of the ingredient, the amount, and the unit for that amount. I want to save each Recipe to XML so that they can be accessed by the user. How can I store a Vector of String arrays in XML or any other sort of file so that it can later be recalled and accessed?

    Read the article

  • SEO - A Game of Numbers and Strategy

    Traditional marketing strategy would capitalize on the usual television commercial, banner ads, holding a social event to promote your new product, print ads and more. However, these portfolios might be missing one vital ingredient: the internet. Over one billion people have the access to internet.

    Read the article

  • Managing Images in Web Development

    Images are an important ingredient of web content. Since developers have little control over the display of website, they need to follow some norms to ensure perfect display of images on the target device. The prescribed standard of managing images while developing web pages are as follows:

    Read the article

  • The Advantages of SEO Over Traditional Advertising

    "Build it and they'll come" - there is perhaps no worse business advise than this. Just creating a good product, or setting up a business is not enough. The most essential ingredient of a successful business is the marketing. If no one knows about your organization or product, how do you expect them to patronize you?

    Read the article

  • Concept of Search Engine Optimization

    In today's competent world where the market is big and competition is getting huge one who wants to put himself in the arena of business must be aware of the dimensional demands of the market. To market your product in a right way is the key ingredient for success in business.

    Read the article

  • Managing Images in Web Development

    Images are an important ingredient of web content. Since developers have little control over the display of website, they need to follow some norms to ensure perfect display of images on the target device. The prescribed standard of managing images while developing web pages are as follows:

    Read the article

  • How to handle Oracle Stored Proc with ASP.NET and Oracle Data Provider?

    - by Matt
    I have been struggling with this for quite some time having been accustomed to SQL Server. I have the following code and I have verified that the OracleDbType's are correct and have verified that the actual values being passed to the parameters match. I think my problem may rest with the return value. All it does is give me the row count. I read somewhere that the return parameter must be set at the top. The specific error I am getting says, PLS-00306: wrong number or types of arguments in call to \u0027INSERT_REC\u0027 ORA-06550: line 1, column 7:\nPL/SQL: Statement ignored The stored procedure is: PROCEDURE INSERT_REC ( A_MILL_CENTER IN GRO_OWNER.MOVEMENT.MILL_CENTER%TYPE, --# VARCHAR2(10) A_INGREDIENT_CODE IN GRO_OWNER.MOVEMENT.INGREDIENT_CODE%TYPE, --# VARCHAR2(50) A_FEED_CODE IN GRO_OWNER.MOVEMENT.FEED_CODE%TYPE, --# VARCHAR2(30) --# A_MOVEMENT_TYPE should be ‘RECEIPT’ for ingredient receipts A_MOVEMENT_TYPE IN GRO_OWNER.MOVEMENT.MOVEMENT_TYPE%TYPE, --# VARCHAR2(10) A_MOVEMENT_DATE IN VARCHAR2, --# VARCHAR2(10) A_MOVEMENT_QTY IN GRO_OWNER.MOVEMENT.MOVEMENT_QTY%TYPE, --# NUMBER(12,4) --# A_INVENTORY_TYPE should be ‘INGREDIENT’ or ‘FINISHED’ A_INVENTORY_TYPE IN GRO_OWNER.MOVEMENT.INVENTORY_TYPE%TYPE, --# VARCHAR2(10) A_CREATE_USERID IN GRO_OWNER.MOVEMENT.CREATE_USERID%TYPE, --# VARCHAR2(20) A_RETURN_VALUE OUT NUMBER --# NUMBER(10,0) ); My code is as follows: //3 items hardcoded for now string millCenter = "0010260510"; string movementType = "RECEIPT"; string feedCode = "test this"; string userID = "GRIMMETTM"; string inventoryType = "INGREDIENT"; //set to FINISHED for feed stuff string movementDate = theData[i]; string ingCode = System.Text.RegularExpressions.Regex.Match(theData[i + 1], @"^([0-9]*)").ToString(); //int pounds = Convert.ToInt32(theData[i + 2].Replace(",", "")); int pounds = 100; //setup parameters OracleParameter p9 = new OracleParameter("A_RETURN_VALUE", OracleDbType.Int32, 30); p9.Direction = ParameterDirection.ReturnValue; oraCmd.Parameters.Add(p9); OracleParameter p1 = new OracleParameter("A_MILL_CENTER", OracleDbType.Varchar2, 10); p1.Direction = ParameterDirection.Input; p1.Value = millCenter; oraCmd.Parameters.Add(p1); OracleParameter p2 = new OracleParameter("A_INGREDIENT_CODE", OracleDbType.Varchar2, 50); p2.Direction = ParameterDirection.Input; p2.Value = ingCode; oraCmd.Parameters.Add(p2); OracleParameter p3 = new OracleParameter("A_FEED_CODE", OracleDbType.Varchar2, 30); p3.Direction = ParameterDirection.Input; p3.Value = feedCode; oraCmd.Parameters.Add(p3); OracleParameter p4 = new OracleParameter("A_MOVEMENT_TYPE", OracleDbType.Varchar2, 10); p4.Direction = ParameterDirection.Input; p4.Value = movementType; oraCmd.Parameters.Add(p4); OracleParameter p5 = new OracleParameter("A_MOVEMENT_DATE", OracleDbType.Varchar2, 10); p5.Direction = ParameterDirection.Input; p5.Value = movementDate; oraCmd.Parameters.Add(p5); OracleParameter p6 = new OracleParameter("A_MOVEMENT_QTY", OracleDbType.Int32, 12); p6.Direction = ParameterDirection.Input; p6.Value = pounds; oraCmd.Parameters.Add(p6); OracleParameter p7 = new OracleParameter("A_INVENTORY_TYPE", OracleDbType.Varchar2, 10); p7.Direction = ParameterDirection.Input; p7.Value = inventoryType; oraCmd.Parameters.Add(p7); OracleParameter p8 = new OracleParameter("A_CREATE_USERID", OracleDbType.Varchar2, 20); p8.Direction = ParameterDirection.Input; p8.Value = userID; oraCmd.Parameters.Add(p8); //open and execute oraConn.Open(); oraCmd.ExecuteNonQuery(); oraConn.Close();

    Read the article

< Previous Page | 1 2 3 4  | Next Page >