Search Results

Search found 1971 results on 79 pages for 'digital cake'.

Page 42/79 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Count the number of rows of a CSV file, with d3.js

    - by user2934073
    Suppose I have this CSV file Day,What 2013-10-27,Apple 2013-10-27,Cake 2013-10-27,Apple 2013-10-28,Apple 2013-10-28,Apple 2013-10-28,Blueberry 2013-10-28,Orange I would like to drawn with D3.js a time-series graph. All I need to do is to display the sum of the number of rows for each day. As an example, the 27 of November should have 3 as value, the 28th should have 4. Is there a way I can archive it? I've been trying to create a new dataset out of the CSV one with no positive results. var dataset; d3.csv("data.csv", function(d) { return { Day: new Date(d.Day), What: d.What }; }, function(error, rows) { dataset = rows; // I SUPPOSE THE FUNCTION THAT GENERATE THE NEW DATASET SHOULD GO THERE });

    Read the article

  • visual c# 2008 database application examples

    - by Omar
    hi, i just have a few weeks programming with vc# (2008) and i'm trying to build an application (winforms) and i have the following problem... i need my application to work with and without connection to the mssql database, this sounds like piece of cake for our friend DataSet right? i can persist the data as XML or binary until i can reach the database and the DataSet will magically sync; all without bothering the user. The problem is... the few books i have read just mention that logic like a fairy tale but dont give any practical example of how to do it, can you point me to one example/demo/whatever i can read or download of an application with (equal or) similar logic?

    Read the article

  • Creating 'select' listboxes using FormHelper in CakePHP

    - by joec
    I have two models Category and Point. The associations are defined as: Category hasMany Point Point belongsTo Category I would like, when adding Points to my database, to be able to select the category it belongs to from a <select> box, along with the rest of the form data. Where would i need to set the category list and how could i do it? And how would i produce the select box? I assume it could be done with $form->input('categorieslist',array('type'=>'select')); //categorieslist needs //setting somewhere. But i am fairly new to Cake and not done much with associations before. Thanks.

    Read the article

  • How can I by using the FormHelper ,or some other method, render an image link that runs javascript w

    - by chiggsy
    Background: I want to render this: <a href="javascript:myfunction('Somevar')"><img src="some.png" width="20" height="20" border="0" /></a> in a cakephp app. Note: this link is not associated with a model at all, it's just part of a form going off-site. I'm unsure of how to proceed: I've seen this on the cakephp site, but with all that goes on in cake, I'm not sure about the whole javascript calling business. What's the best way to create such a thing?

    Read the article

  • Silverlight Cascading Combobox

    - by lidermin
    Hi, I have an issue trying to implement cascading comboboxes on Silverlight 3. I have two comboboxes: Product Type Sub Cathegory The user need to select the Product type, and based on his selection, the second combobox must load the sub cathegories. Binding the first combobox is a piece of cake: <ComboBox x:Name="cmbProductType" Margin="11,2,8,5" MaxDropDownHeight="100" Grid.Column="1 /> cmbProductType.ItemsSource = objFactory.ProductTypes; objFactory.Load(objFactory.GetProductTypesQuery()); My issue is trying to load the second combobox based on the first seleccion. I tryied to implement the SelectionChanged event on the first combobox, but it didn't worked for me: private void cmbProductType_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { FactoryDS objFactory = new FactoryDS(); cmbSubCat.ItemsSource = objFactMetas.Campos; objFactory.Load(objFactory.GetSubCathegoryQuery(((SybCathegroy)cmbProductType.SelectedItem).Id)); } How should I do this? (I'm new on Silverlight). thanks in advance.

    Read the article

  • Codebase for making a Flash-based interactive map with SVG vector data?

    - by Mike
    I'm looking for a way to take SVG path info (basically a string of coordinates) and dynamically draw it with Actionscript. Icing on the cake would be if those shapes could detect mouse events to trigger JS and dynamically change their appearance (fill, stroke, etc...). I'm currently trying something similar to this (http://raphaeljs.com/australia.html) using SVG but it's just too slow in IE. I've also tried Google's SVG Web (http://code.google.com/p/svgweb/) which basically does exactly what I'm looking for (it converts SVG to Flash in IE) but again, it's sloooooow - which is why I'm considering doing the whole shebang in Flash. Anyone know of some links to point me in the right direction?

    Read the article

  • Canvas Animation Kit Experiment... ...how to clear the canvas?

    - by Ted Wong
    I can make a obj to use the canvas to draw like this: MyObj.myDiv = new Canvas($("effectDiv"), Setting.width, Setting.height); Then, I use this to draw a rectangle on the canvas: var c = new Rectangle(80, 80, { fill: [220, 40, 90] } ); var move = new Timeline; move.addKeyframe(0, { x: 0, y: 0 } ); c.addTimeline(move); MyObj.myDiv.append(c); But after I draw the rectangle, I want clear the canvas, but I don't know which method and how to do this... ... O...one more thing: it is the CAKE's web site: Link

    Read the article

  • Hibernate pluralization

    - by matiasf
    I have A MySQL database currently in production use for a CakePHP application A Java SE application accessing the same database via Hibernate, currently in development. I'm using the Netbeans "automigrate" feature to create the POJO classes and XML files (do I really need the XML files when using annotations?). As the schema is quite complex creating the tables manually is way too much work. Cake expects all DB tables to be pluralized (the Address class is automagically mapped to the addresses table). When running the Netbeans automigration it then does pluralization on the already pluralized table names (I'm getting Addresses.java and setAddresseses() methods). I know I'm asking for trouble running two very different data layers against the same database, but I'd like to know if it's possible to have Netbeans generating the POJO classes in singular form or if there is another (better) way to manage this.

    Read the article

  • is there a native php function to see if one array of values is in another array?

    - by Haroldo
    Is there a better method than loop with strpos()? Not i'm looking for partial matches and not an in_array() type method. example needle and haystack and desired return: $needles[0] = 'naan bread'; $needles[1] = 'cheesestrings'; $needles[2] = 'risotto'; $needles[3] = 'cake'; $haystack[0] = 'bread'; $haystack[1] = 'wine'; $haystack[2] = 'soup'; $haystack[3] = 'cheese'; //desired output - but what's the best method of getting this array? $matches[0] = 'bread'; $matches[1] = 'cheese';

    Read the article

  • Good resources for Wordpress?

    - by Smickie
    Hi, I'm building quite a large site, no e-commerce, but a a lot of specific content to be managed. For some reason, the client wants Wordpress. There is no way of getting around this... I've used Wordpress before to rapidly develop blogs, but that's about it. If anything goes beyond the scope of Wordpress I'll use a framework in something (Rails/Cake). This build is going to require custom plug-ins and widgets, so what I'm asking is how is the best way to go about learning how Wordpress and best practices for plug-ins and widgets?

    Read the article

  • Tips on how to deploy C++ code to work every where

    - by User1
    I'm not talking about making portable code. This is more a question of distribution. I have a medium-sized project. It has several dependencies on common libraries (eg openssl, zlib, etc). It compiles fine on my machine and now it's time to give it to the world. Essentially build engineering at its finest. I want to make installers for Windows, Linux, MacOSX, etc. I want to make a downloadable tar ball that will make the code work with a ./configure and a make (probably via autoconf). It would be icing on the cake to have a make option that would build the installers..maybe even cross-compile so a Windows installer could be built in Linux. What is the best strategy? Where can I expect to spend the most time? Should the prime focus be autoconf or are there other tools that can help?

    Read the article

  • CakePHP repeats same queries

    - by Rytis
    I have a model structure: Category hasMany Product hasMany Stockitem belongsTo Warehouse, Manufacturer. I fetch data with this code, using containable to be able to filter deeper in the associated models: $this->Category->find('all', array( 'conditions' => array('Category.id' => $category_id), 'contain' => array( 'Product' => array( 'Stockitem' => array( 'conditions' => array('Stockitem.warehouse_id' => $warehouse_id), 'Warehouse', 'Manufacturer', ) ) ), ) ); Data structure is returned just fine, however, I get multiple repeating queries like, sometimes hundreds of such queries in a row, based on dataset. SELECT `Warehouse`.`id`, `Warehouse`.`title` FROM `beta_warehouses` AS `Warehouse` WHERE `Warehouse`.`id` = 2 Basically, when building data structure Cake is fetching data from mysql over and over again, for each row. We have datasets of several thousand rows, and I have a feeling that it's going to impact performance. Is it possible to make it cache results and not repeat same queries?

    Read the article

  • Open page in Joomla

    - by dutt
    I'm using Jumi to echo php code and then showing that in a Joomla Article, and everythings working fine. Now I want to do this: The output is basically a list from a database like this: Name Price Type A 1 T1 B 2 T2 In this list I want to include links to only show items of the same type, so "T1" would like to a page only showing things of type T1. So I thought I would do this by making a new page that takes a type and then get all the items of that type from the database. Without Joomla this wouldv'e been a piece of cake, with Joomla I'm not quite sure where to begin. How should the a href=... tags in the html code printed by my php script look? Is my basic structure still correct, and if so, how do I make Joomla open the new page in the normal frame and not replace the whole Joomla page. some kind of target-frame attribute?

    Read the article

  • CakePHP HABTM Filtering

    - by James Haigh
    Hi, I've got two tables - users and servers, and for the HABTM relationship, users_servers. Users HABTM servers and vice versa. I'm trying to find a way for Cake to select the servers that a user is assigned to. I'm trying things like $this->User->Server->find('all'); which just returns all the servers, regardless of whether they belong to the user. $this->User->Server->find('all', array('conditions' => array('Server.user_id' => 1))) just gives an unknown column SQL error. I'm sure I'm missing something obvious but just need someone to point me in the right direction. Thanks!

    Read the article

  • Accessing individual HABTM records in a form

    - by Pichan
    I'm building a form in my CakePHP project that lets you edit a company's information. Among all other things, every company has at least one geographical area in which the company operates, but it may have more. The areas are selected individually using select dropdowns. The relationship between companies and areas is HABTM, because I need to be able to change the amount of associated areas without modifying the database. Currently the associations and corresponding data are handled separately, which isn't really a problem but I was wondering how it could be done using as much Cake's own 'automagic' functionality as possible?

    Read the article

  • Cakephp: Extend search capability to hasMany Relationship

    - by Chris
    I have two models: Car hasMany Passengers Passenger belongsTo Car I want to implement a search using Cake Search. The user should input a number and the searchengine should return all cars that have less than this number passengers. In my search form: echo $form->input('passengers', array('label' => 'Passengers', 'div' => false)); In my Car model: public $filterArgs = array( array('name' => 'passengers', 'type' => 'int'), ); In the controller: public $presetVars = array( array('field' => 'passengers', 'type' => 'int') } I thought of adding a function to the model that returns the number of passengers: function countPassengers(){ return(count($this->Car->Passenger)); //Not sure if this works } And how to I implement this search criteria?: return all Cars where countPassengers()<passenger

    Read the article

  • Manually Building a Tree in CakePHP

    - by mabwi
    I'm currently working on building an application in CakePHP. There's a quite extensive existing data set that's conceptually a tree, but wasn't previously stored as one. What I mean by that, is there's no real relationship defined in the data. The problem I'm having is getting it to work correctly with the CakePHP tree behaviour. Because I have to set all the values on existing data - as opposed to Cake setting up the structure as elements are inserted - I need to understand how the lft/rght values work. So, I guess the question is: How does the structure data work, specifically the lft/rght values? How do I set it up so that the data comes out rationally, without inserting them one at a time? It's a 2 level tree, with Sections and sub-sections. Thanks for the help

    Read the article

  • How Many HABTM relationships in cakephp is too many?

    - by user559540
    Hi all, I'm struggling with deciding how many HABTM relationships I really need in my cakephp app. I guess I don't quite get what "has" truly means. I don't want to have more HABTM tables than necessary. Here's what I have in my database: Users Properties Leases Payments Repairs user HABTM properties, user HABTM leases, user HABTM users, user HABTM repairs, property hasMany repairs, property hasMany leases, lease hasMany repairs. Also, I have two aliases for my users model (manager and tenant). This is one of the reasons I ended up with so many HABTM relationships, but I'm not sure it's necessary. Do I have too many user HABTM relationships? Would it be better to just have cake recurse through my models? Thanks!

    Read the article

  • Interactive Charts for web application

    - by user227290
    We are working on a web based application (implemented in JAVA) on commodity prices and one part of it is interactive charting. I provide a simplified example here. We have a table in Mysql database where we have information on commodity prices in US states and counties. One aspect of the application is to create interactive plots based on user choice. For example, if the user needs to see the price density in Oregon and Linn county then she chooses it from the menu in a webpage and it is rendered on fly with accompanying quantile information in a table. As the user changes state and county these plots and table change on fly.For our computational need we are using R (and use rjava to integrate it to our web application) and I know that if interactivity is not an issue this is a piece of cake in ggplot2, but I am not aware of any interactive version of R graphics framework (like lattice, ggplot2). We are exploring google visualization API but I am not sure we can have the statistical power we need in some of the plots.Please help.

    Read the article

  • How to execute unknown functions from dynamic load libraries?

    - by activenightly
    It's easy to load functions from dynamic libraries when you know this function in design time. just do something like this: int (*fn)(int); l0 = dlopen("./libfoo.so", RTLD_LAZY); if (!l0) { fprintf(stderr, "l0 %s\n", dlerror()); return 1; } fn = (int (*)(int))dlsym(l0, "foo"); if ((error = dlerror()) != NULL) { fprintf(stderr, "fn:%s\n", error); return 1; } x=(*fn)(y); ... How to execute library function when it's unknown in design time? In runtime you have a function name and array of arguments pointers and array of arguments sizes: char* fn_name="foo"; int foo_argc; void* foo_argv[]; int foo_argv_size[]; In scripting language it's a piece a cake task, but how to implement this nicely in c++?

    Read the article

  • Playing a .wav sound file in JPanel/JFrame using javax (Swing)

    - by JavaIceCream
    I need some code example on how I would use a filepath from a harddrive location to then play a .wav sound file when opened in swing GUI. I don't need it to show a play button, or pause or stop. I just want it to play when I select the 'Sound' option from my 'Files' in my window (I know how to do that already, no need to explain that). So basically, just how to play a .wav sound file from a filepath (i.e. c:/cake/thereisnone.wav) inside of a JFrame. And how can I easily apply methods to that sound file afterwards. Also, if anyone knows how to apply methods on a BufferedImage in a JFrame, that would be helpful too. Thank you very much everyone!

    Read the article

  • sIFR works, except for one word in my navigation bar

    - by Jasper
    Hi there, My website uses sIFR and it all seems to work great, except for one word in my navigation bar. The navigation links all work, but the word "Zoeken" (= Search) in front of the search form doesn't get changed to the desired font type. I have checked the header.php of my site, as well as the CSS, but any of the changes that I made, don't seem to work. Could anyone help me out? I am hoping it's just a "piece of cake", but my knowledge of sIFR is close to non-existent. Many thanks! Jasper

    Read the article

  • 3rd party applications API / Framework Q for PHP user site

    - by Ryan
    So we are defining out functional requirements for a user content site and would like to enable: 1) 3rd party developers to develop applications that users can use on their profile 2) Enable users to export content to other sites meaning share their photos on the net. So we were told we need to use APIs for this & it's merely changing data permissions. Is that the only thing we need? Is there a framekwrok we need to build out, or what is the process functioanlly to define out to make these happen? Platform is being built on MySQL and Cake php.

    Read the article

  • Cakephp Autoconvert find() fields?

    - by Razor Storm
    In cake php I can grab a model's fields by using the find() method. What if I wish to apply a transformation function to the fields? Is there a way to directly accomplish this task? Suppose I have a model called RaceTime with the fields racerId and timeMillis RaceTime +------------+ | Field | +------------+ | id | | racerId | | timeMillis | +------------+ timeMillis is an int specifying how long the race took in milliseconds. Obviously saying a race took 15651 milliseconds isn't very useful to a human reader, and I would wish to convert this to a human readable format. Is there a way to accomplish this directly in find()? Or is the only option to loop through the results after find() finishes?

    Read the article

  • TPageControl tab area OnMouseEnter OnMouseLeave events

    - by daemon_x
    Hello, I need to catch the "OnMouseEnter" and "0nMouseLeave" for a certain area of the TPageControl component. With that specific area I mean the whole "tab header" rectangle. The problem is, that the page control doesn't catch the messages (I'm catching internal control messages CM_MOUSEENTER and CM_MOUSELEAVE) in the "empty" space. The aim for me is to draw a small arrow in the right empty side when user hovers in the red framed area (and drawing is just piece of cake) and erase it when leaves this area. And I'm don't care about the overflow of the tabs (which causes to draw scrolling double button) - that will never happen.

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >