Daily Archives

Articles indexed Saturday May 29 2010

Page 14/76 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • how do i work bool!

    - by user350217
    HI! im a beginner and im really getting frustrated with this whole concept. i dont understand how to exactly use the bool function. i know what it is but i cantfigure out how to make it work in my program. Im trying to say that if my variable "selection" is any letter beween 'A' and 'I' then it is valid and can continue on to the next function which is called calcExchangeAmt(amtExchanged, selection). if it is false i want it to ask the user if they want to repeat the program and if they agree to repeat i want it to clear the screen and restart to the main function. please help edit my work! this is my bool function: bool isSelectionValid(char selection, char yesNo, double amtExchanged) { bool validData; validData = true; if((selection >= 'a' && selection <= 'i') || (selection >= 'A' && selection <= 'I')) { validData = calcExchangeAmt (amtExchanged, selection); } else(validData == false); { cout<<"Do you wish to continue? (Y for Yes / N for No)"; cin>>yesNo; } do { main(); } while ((yesNo =='y')||(yesNo == 'Y')); { system("cls"); } return 0; } this is the warning that im gettng: warning C4800: 'double' : forcing value to bool 'true' or 'false' (performance warning)

    Read the article

  • Rails: find_by, conserving leading whitespaces

    - by peppermonkey
    Hi, when I do the following def somefunction @texts = A.find_all_by_someid(someid) respond_to do |format| format.xml { render :xml => @texts } end end it gets the string from the db correctly, except if the string has leading whitespaces, it seems they are trimmed. Note: the whitespaces are there in the db correctly What can I do to conserve those whitespaces? Thanks

    Read the article

  • xml parsing + tablew view tutorial needed

    - by shishir.bobby
    Hi all, i am working on live XML arsing, i am able to parse xml and pass into array,but i am not able to set those values into table view, so if any 1 can provide me some guideline or some tutorials to set array data into table view,with xml parsing,it will be a great heklp for me. regard shishir

    Read the article

  • Is SparkViewEngine dying?

    - by Stephane
    Hey, I am building a email service based on templates. I thought of using the spark view engine but it seems that It doesn't get much updates anymore. Support on .NET4.0 is not even yet complete and it fails at runtime when used in a console app. The little Intellisense support that was there in VS2008 doesn't seem to work on VS2010 (from the information I have found) Should I avoid it? What do you think?

    Read the article

  • What technologies are appropriate for a human workflow system?

    - by CCw
    I'm researching various workflow architectures and it is overwhelming. The workflow system I am creating will be almost completely human-driven. Very little, if any, asynchronous activity will be taking place. One possibility is to simply use a RDBMS and have a task table, from which stored procedures would be used to enforce synchronous access to each task. This seems very simple, but I'm having a hard time coming up with reasons why I might need to involve a heavier solution. If my system has ~500 concurrent users, and there is very little in the way of automated or asynchronous tasks, should I even consider the various workflow patterns/packages out there like Mule, BPEL/SOA, Spring Work Flow, etc?

    Read the article

  • How to close jQuery Dialog within the dialog?

    - by imperialx
    Hello, How to close jQuery Dialog within the dialog without using the close button? Inside the ui dialog is a simply form request and if a successful submission occurs, then the ui dialog automatically closes and refreshes the parent page. <script type="text/javascript"> $(document).ready(function () { $("#form-dialog").dialog({ autoOpen: true, modal: true, width: 200, draggable: true, resizable: true }); }); </script> <div id="form-dialog" title="Form Submit"> <form action="default.aspx" method="post"> <input type="text" name="name" value=" " /> <input type="submit" value="submit" /> </form> </div> -imperialx

    Read the article

  • Model Based Apps and Frameworks

    Having been involved (mostly as a user or observer) with several recent applications and frameworks, Ive come to the conclusion that building your app/framework on an internal model is generally the best way to go.  In this post Ill explain what I mean by on an internal model and later describe the benefits I have seen, realized, been told about by others and still others that Ive only imagined (but are still possible).  I plan on writing a few blog posts along these lines to explore what...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Using http request on Yahoo Map Service C#

    - by Tang
    Hi I'm currently using yahoo map service to display a static image of a location with the latitude and longitude that I suppiled, and this work fine. But I was just wondering if it possible to send an url request to the service that will return an image with multiple markers on the image? (ie. more than one locations marked). If anyone know how to do this, please help! Thank you very much! ps. I am developing my application for windows mobile using .NET CF 3.5 with windows mobile 6 professional as a target platform.

    Read the article

  • Databinding a list (in an object) to a combobox in VB.net

    - by Casey
    VB 2008 .NET 3.5 I have a custom "Shipment" object that contains a list of "ShippingRate" objects. This list of "ShippingRates" is accessible through a property "Shipment.PossibleShippingRates." That property simply returns a copy of the list of "ShippingRate" for that particular Shipment. My UI layer receives a list of "Shipment" objects from the BLL. This list is databound to a datagridview, and shows details relevant to the Shipment such as Shipping Address, etc. I want to bind the "Shipment.PossibleShippingRates" property to a combobox, such that when the user changes the grid row, the combobox reflects the "PossibleShippingRates" for that "Shipment." In addition, I need a way to store the "ShippingRate" they selected from the combobox for later use. I have tried a few ideas, but none of them work properly. Any ideas on how to do this?

    Read the article

  • String Utility Library for Code Generation

    - by Adam Barney
    CodeSmith has a nice StringUtils class that can be used to change database object names to singular, plural, camel case, pascal case, etc... Very useful for creating data access layers in their code generation tool. I'm trying to port some CodeSmith templates to the T4 template files used by Visual Studio, and I'm trying to find a similar library to do these things. There must be one somewhere in T4, since that's what is used to produce the LINQ to SQL classes, and it does a nice job of pluralization / singularization. Does anyone know where this library exists, or if a free library with similar functionality exists somewhere? Thanks!

    Read the article

  • jQuery reader() on downloaded content.

    - by David
    Hi all! jQuery.ready() allows us to wait for the construction of the webpage. Recently it has been added support to wait until CSS files are loaded. I would like to know if that feature can be used for downloaded content, because I fetch content via $.ajax() that holds CSS references and I would like to retrieve the content of the CSS before working with the retrieved content. Fetch with $.ajax() the html. -- Wait until all CSS is downloaded. Show to fetched content (already css'ed). Thank you very much for your help.

    Read the article

  • jquery slideshow

    - by prakasam
    im using this slide in my site. im new to js. i want one option.When i put the mouse over it, it should pause on the picture and not keep changing Slideshow link: http://smoothgallery.jondesign.net/

    Read the article

  • Question about Architecture for Viewing Images in ASP.NET MVC App

    - by Charlie Flowers
    I have an approach in mind for an image viewer in a web app, and want to get a sanity check and any thoughts you stackoverflowers might have. Here's the whirlwind nutshell summary: I'm working on an ASP.NET MVC application that will run in my company's retail stores. Even though it is a web application, we own the store machines and have control over them. We have a "windows agent" running on the store machine which we can talk to from the browser via javascript (it is a WCF service, and our web app has permission to talk to it from the browser). One of the web pages needs to be an "image viewer" page with some common things like Rotate & Zoom. Now, there are some WebForms controls that offer Rotate and Zoom. However, they take up server resources and generate a good bit of traffic between the server and the browser. For example, the Rotate function would cause an ajax call to the server, which would then generate a new image written to a .NET Canvas object, which would then be written to a file on the server, which would then be returned from the ajax call and refreshed inside the browser. Normally, that's a pretty good way of doing things. But in our case, we have code running on the store machine that we can communicate with. This leads me to consider the following approach: When the user asks to view an image, we tell our "windows agent" to download it from our image server to the store machine. We then redirect our browser to our image viewer page, which will pull the image from the local file we just wrote to the store machine. When the user clicks "Rotate", we cause JavaScript code in the browser to call our "windows agent" software, asking it to perform the "Rotate" function. The "windows agent" does the rotation using the same kind of imaging control that would formerly have been used on the server, but it does so now on the store machine. Javascript in the browser then refreshes the image on the page to show the newly rotated image. Zoom and similar features would be implemented the same way. This seems to be much more efficient, scalable, and responsive for the end-users. However, I've never heard of anything like it being done, mostly because it's rare to have this combination of a web app plus a "windows agent" on the client machine. What do you think? Feasible? Reasonable? Any pitfalls I overlooked or improvements / suggestions you can see? Has anyone done anything like this who would like to offer the wisdom of experience? Thanks!

    Read the article

  • PHP array pointer craziness

    - by JMan
    I'm trying to create a "GetCurrentLevel" method that takes a point value as an input and returns what "Level" that corresponds to. I'm storing the Level = Points mapping in an array, but the array pointer is not moving logically when I use it a foreach loop. I've added echo statements for debugging. Here's my class definition: class Levels extends Model { protected $_map = array ( 'None' => 0, 'Bronze' => 50, 'Silver' => 200, 'Gold' => 500 ); public function __construct() { parent::__construct(); } public function GetCurrentLevel($points) { foreach ($this->_map as $name => $threshold) { echo "Level Name: $name<br/>"; echo "Level Threshold: $threshold<br/>"; echo "Current Level: " . key($this->_map) . "<br/>"; echo "Current Threshold: " . current($this->_map) . "<br/>"; if ($points < $threshold) /* Threshold is now above the points, so need to go back one level */ { $previousThreshold = prev($this->_map); echo "Previous Threshold: $previousThreshold<br/>"; echo "Final Level: " . key($this->_map) . "<br/>"; return key($this->_map); } echo "Go to next level <br/>"; } } And here is what I see when I call GetCurrentLevel(60): Level Name: None Level Threshold: 0 Current Level: Bronze //* Looks like foreach immediately moves the array pointer *// Current Threshold: 50 Go to next level Level Name: Bronze Level Threshold: 50 Current Level: Bronze //* WTF? Why hasn't the array pointer moved? *// Current Threshold: 50 Go to next level Level Name: Silver Level Threshold: 200 Current Level: Bronze //* WTF? Why hasn't the array pointer moved? *// Current Threshold: 50 Previous Threshold: 0 Final Level: None But the "Final Level" should be 'Bronze' since 60 points is above the 50 points needed for a Bronze medal, but below the 200 points needed for a Silver medal. Sorry for the long post. Thanks for your help!

    Read the article

  • Error of text2ltree

    - by thuanvh
    Error of text2ltree I can't use text2ltree. Any suggestion? SELECT text2ltree(to_char(243, '09999999')) *** Error *** ERROR: syntax error at position 0 SQL state: 42601

    Read the article

  • Extjs - Getting more from the server

    - by fatnjazzy
    Hi, Is it possible to get every data from the server? for example, i want to get the columns items from the server Via Ajax/Proxy by sending json string? thanks var grid = new Ext.grid.GridPanel({ store: store, columns: [ {id:'company',header: 'Company', width: 160, sortable: true, dataIndex: 'company'}, {header: 'Price', width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'}, {header: 'Change', width: 75, sortable: true, renderer: change, dataIndex: 'change'}, {header: '% Change', width: 75, sortable: true, renderer: pctChange, dataIndex: 'pctChange'}, {header: 'Last Updated', width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} ], stripeRows: true, autoExpandColumn: 'company', height: 350, width: 600, title: 'Array Grid', stateful: true, stateId: 'grid' });

    Read the article

  • Sharing variables between mxml components

    - by Kamo
    I have several mxml components in an app, all of which need the same variable called genericX. I've included that variable in the main mxml and made it public [Bindable] public var genericX:Number = 102; but I still can't access it from other mxml components. If I try to do this for example, it doesn't recognize the variable. <s:Button x="{genericX}" label="Click" />

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >