Search Results

Search found 18749 results on 750 pages for 'komodo edit'.

Page 31/750 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Im getting fatal errors... can anyone help me edit my program!

    - by user350217
    The errors i am getting are: Error 1 error LNK2019: unresolved external symbol "double __cdecl getDollarAmt(void)" (? getDollarAmt@@YANXZ) referenced in function _main hid.obj Error 2 fatal error LNK1120: 1 unresolved externals this is my program: #include<iostream> #include<cmath> #include<string> using namespace std; double getDollarAmt(); void displayCurrencies(); char getCurrencySelection (float amtExchanged); bool isSelectionValid(char selection); double calcExchangeAmt (float amtExchanged, char selection); void displayResults(double newAmount, float amtExchanged, char selection, char yesNo); const double russianRubles = 31.168; const double northKoreanWon = .385; const double chineseYuan = 6.832; const double canadianDollar = 1.1137; const double cubanPeso = 1.0; const double ethiopianBirr = 9.09; const double egyptianPound = 5.6275; const double tunisianDinar = 1.3585; const double thaiBaht = 34.4; /****** I changed the variables to global variables so you don't have to worry about accidentally setting them to 0 or assigning over a value that you need ********/ float amtEchanged = 0.0; char selection; char yesNo; double newAmount; int main() { float amtExchanged = 0.0; selection = 'a'; yesNo = 'y'; newAmount = 0.0; getDollarAmt (); displayCurrencies(); getCurrencySelection (amtExchanged); isSelectionValid(selection);/**** you only need to use the selection variable ****/ calcExchangeAmt (amtExchanged, selection); displayResults(newAmount, amtExchanged, selection, yesNo); return 0; } double getDollarAmt (float amtExchanged) // promt user for eachange amount and return it to main { float amtExchanged0;//created temporary variable to set amtExchanged to cout<< "Please enter the total dollar amount to exchange: "; cin>> amtExchanged0; amtExchanged = amtExchanged0;//setting amtExchanged to the right value return amtExchanged; } void displayCurrencies() // display list of currencies { cout<<"A Russian Ruble"<<endl <<"B North Korean Won"<<endl <<"C Chinese Yuan"<<endl <<"D Cuban Peso"<<endl <<"E Ethiopian Birr"<<endl <<"F Thai Baht"<<endl <<"G Canadian Dollars"<<endl <<"H Tunisian Dinar"<<endl <<"I Egyptian Pound"<<endl; } char getCurrencySelection (float amtExchanged) // make a selection and return to main { char selection0;//again, created a temporary variable for selection cout<<"Please enter your selection: "; cin>>selection0; selection = selection0;//setting the temporary variable to the actual variable you use /***** we are now going to see if isSelectionValid returns false. if it returns false, that means that their selection was not character A-H. if it is false we keep calling getCurrencySelection *****/ if(isSelectionValid(selection)==false) { cout<<"Sorry, the selection you chose is invalid."<<endl; getCurrencySelection(amtExchanged); } return selection; } bool isSelectionValid(char selection) // this fuction is supposed to be called from getCurrencySelection, the selction // must be sent to isSelectionValid to determine if its valid // if selection is valid send it bac to getCurrencySelection // if it is false then it is returned to getCurrencySelection and prompted to // make another selection until the selection is valid, then it is returned to main. { /**** i'm not sure if this is what you mean, all i am doing is making sure that their selection is A-H *****/ if(selection=='A' || selection=='B' || selection=='C' || selection=='D' || selection=='E' || selection=='F' || selection=='G' || selection=='H' || selection=='I') return true; else return false; } double calcExchangeAmt (float amtExchanged,char selection) // function calculates the amount of money to be exchanged { switch (toupper(selection)) { case 'A': newAmount =(russianRubles) * (amtExchanged); break; case 'B': newAmount = (northKoreanWon) * (amtExchanged); break; case 'C': newAmount = (chineseYuan) * (amtExchanged); break; case 'D': newAmount = (canadianDollar) * (amtExchanged); break; case 'E': newAmount = (cubanPeso) * (amtExchanged); break; case 'F': newAmount = (ethiopianBirr) * (amtExchanged); break; case 'G': newAmount = (egyptianPound) * (amtExchanged); break; case 'H': newAmount = (tunisianDinar) * (amtExchanged); break; case 'I': newAmount = (thaiBaht) * (amtExchanged); break; } return newAmount; } void displayResults(double newAmount, float amtExchanged, char selection, char yesNo) // displays results and asked to repeat. IF they want to repeat it clears the screen and starts over. { switch(toupper(selection)) { case 'A': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Russian Rubles."<<endl<<endl; break; case 'B': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" North Korean Won."<<endl<<endl; break; case 'C': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Chinese Yuan."<<endl<<endl; break; case 'D': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Cuban Pesos."<<endl<<endl; break; case 'E': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Ethiopian Birr."<<endl<<endl; break; case 'F': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Thai Baht."<<endl<<endl; break; case 'G': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Canadian Dollars."<<endl<<endl; break; case 'H': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Tunisian Dinar."<<endl<<endl; break; case 'I': cout<<"$"<<amtExchanged<<" is "<<newAmount<<" Egyptian Pound."<<endl<<endl; break; } cout<<"Do you wish to continue? (Y for Yes / N for No)"; cin>>yesNo; if(yesNo=='y' || yesNo=='Y') { getDollarAmt(); } else { system("cls"); } }

    Read the article

  • How can I edit an exe's resources (File Description, Icon, etc.) using a command line utility?

    - by Coder7862396
    The whole story: I have created a fancy .NET program which has an installer created by the Visual Studio Installer (VSI). The VSI creates 2 files (setup.exe and MyProgramSetup.msi). I understand the reasons for both files being needed, however, I only want to distribute a SINGLE executable installer to users. I do not want them to see 2 files and have to choose between them. In order to do this I have merged the 2 files into a self-extracting archive using IExpress (as seen in this answer: http://stackoverflow.com/questions/535966/merge-msi-and-exe). This works well, however, the self-extracting archive that gets created has an ugly icon and confusing file info (the File Description is "Win32 Cabinet Self-Extractor" with 43 black spaces after it). I need to replace the icon with my custom one and change some of the file properties like "Description", "Company", etc. I would like to have this automatically done as a build step so having a program which is a command line/console utility would be great. I've searched for a while now and can only find one program which does exactly what I want (ResourceTuner Console: http://www.heaventools.com/command-line_resource_editor.htm) but it costs an arm and a leg and my budget is $0. Does anyone know a better way to achieve what I want, or know of a program which can replace an executable's resources without having to use a GUI? By the way, I have also tried "SiComponents Resource Builder 3" which can't even open the executable, and "Julien Audo's ResEdit" which just crashes when I execute the command: "resedit.exe -convert "Modified Resources.rc" "MyProgramSetup.exe"

    Read the article

  • Is there a way to edit a control's template based on the default template?

    - by Adam S
    I'm trying to make just a few minor tweaks to the default template of a checkbox. Now I understand how to make a new template from scratch, but this I do not know. I did manage to (I think?) extract the default template via the method here. And it spat out: <ControlTemplate TargetType="CheckBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna"> <BulletDecorator Background="#00FFFFFF" SnapsToDevicePixels="True"> <BulletDecorator.Bullet> <mwt:BulletChrome Background="{TemplateBinding Panel.Background}" BorderBrush="{TemplateBinding Border.BorderBrush}" BorderThickness="{TemplateBinding Border.BorderThickness}" RenderMouseOver="{TemplateBinding UIElement.IsMouseOver}" RenderPressed="{TemplateBinding ButtonBase.IsPressed}" IsChecked="{TemplateBinding ToggleButton.IsChecked}" /> </BulletDecorator.Bullet> <ContentPresenter RecognizesAccessKey="True" Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" Margin="{TemplateBinding Control.Padding}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" /> </BulletDecorator> <ControlTemplate.Triggers> <Trigger Property="ContentControl.HasContent"> <Setter Property="FrameworkElement.FocusVisualStyle"> <Setter.Value> <Style TargetType="IFrameworkInputElement"> <Style.Resources> <ResourceDictionary /> </Style.Resources> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <Rectangle Stroke="#FF000000" StrokeThickness="1" StrokeDashArray="1 2" Margin="14,0,0,0" SnapsToDevicePixels="True" /> </ControlTemplate> </Setter.Value> </Setter> </Style> </Setter.Value> </Setter> <Setter Property="Control.Padding"> <Setter.Value> <Thickness>2,0,0,0</Thickness> </Setter.Value> </Setter> <Trigger.Value> <s:Boolean>True</s:Boolean> </Trigger.Value> </Trigger> <Trigger Property="UIElement.IsEnabled"> <Setter Property="TextElement.Foreground"> <Setter.Value> <DynamicResource ResourceKey="{x:Static SystemColors.GrayTextBrushKey}" /> </Setter.Value> </Setter> <Trigger.Value> <s:Boolean>False</s:Boolean> </Trigger.Value> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> Okay, sure, looks just fine I guess. I don't have enough experience to know if that looks like it's right or not. Now, I get two errors: Assembly 'PresentationFramework.Luna' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. and The type 'mwt:BulletChrome' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. Now I'm wondering, how can I resolve these errors so that I can actually start working on the template? Is there a better way of going about this? My boss wants a three-state checkbox with a red square instead of green, and he won't take no for an answer.

    Read the article

  • Core Data: Inverse relationship only mirrors when I edit the mutableset. Not sure why.

    - by zorn
    My model is setup so Business has many clients, Client has one business. Inverse relationship is setup in the mom file. I have a unit test like this: - (void)testNewClientFromBusiness { PTBusiness *business = [modelController newBusiness]; STAssertTrue([[business clients] count] == 0, @"is actually %d", [[business clients] count]); PTClient *client = [business newClient]; STAssertTrue([business isEqual:[client business]], nil); STAssertTrue([[business clients] count] == 1, @"is actually %d", [[business clients] count]); } I implement -newClient inside of PTBusiness like this: - (PTClient *)newClient { PTClient *client = [NSEntityDescription insertNewObjectForEntityForName:@"Client" inManagedObjectContext:[self managedObjectContext]]; [client setBusiness:self]; [client updateLocalDefaultsBasedOnBusiness]; return client; } The test fails because [[business clients] count] is still 0 after -newClient is called. If I impliment it like this: - (PTClient *)newClient { PTClient *client = [NSEntityDescription insertNewObjectForEntityForName:@"Client" inManagedObjectContext:[self managedObjectContext]]; NSMutableSet *group = [self mutableSetValueForKey:@"clients"]; [group addObject:client]; [client updateLocalDefaultsBasedOnBusiness]; return client; } The tests passes. My question(s): So am I right in thinking the inverse relationship is only updated when I interact with the mutable set? That seems to go against some other Core Data docs I've read. Is the fact that this is running in a unit test without a run loop have anything to do with it? Any other troubleshooting recommendations? I'd really like to figure out why I can't set up the relationship at the client end.

    Read the article

  • DataGrid - Edit the selected row when a button is clicked.

    - by Chepech
    Hi all. I have a very simple DataGrid with 2 columns, some thing like this: <mx:DataGrid id="grid" > <mx:columns> <mx:DataGridColumn dataField="name" headerText="Name"/> <mx:DataGridColumn dataField="date" headerText="Date"/> </mx:columns> </mx:DataGrid> What Im trying to do is to activate the edition of the selected row when the user clicks a button. So far I've been unable to find any example of how to do this. I already tried 6 or 7 different approaches but non works. Does any one has a clue how to do this? How do you get the selected row (NOT selectedItem) of a DataGrid and how can you: Change the ItemRenderEditor or ItemRenderer on the fly of just that row. Or enable the edition of that specific row without clicking it. This are the questions that I've been unable to answer Help will be greatly appreciated.

    Read the article

  • Development deployment: how to achive edit-and-reload with JSP pages?

    - by doublep
    Out project uses WebLogic as web-server and uses mostly JSP for user interface. With standard setup it is possible to copy edited JSP files into the exploded deployment directory and WebLogic will automatically pick them up, recompile and serve new content through HTTP. However, is it possible to avoid copying at all, so that I just save a file in my editor and it is immediately (well, after a couple of seconds for recompilation) visible? The project uses Apache Ant as building tool. I would imagine what I want would be possible with symlinks (since this is for deployment only I don't care about cross-platformity), but then I don't see how it is possible to symlink lots of files at once with Ant. So, how do I achieve save-JSP-hit-F5-in-browser functionality either with some setting in WebLogic; or with symlinking JSPs using Apache Ant (instead of copying them as is done now); or something else completely?

    Read the article

  • How to edit the code table for one row only?

    - by TomatoSandwich
    I understand that dw-control.Object.columnname.Values("Red~tR/Blue~tB) changes columnname's values for all rows, but is there code that can just change the dropdown values of a code table for specific row/s? I've tried dw-control.Object.columnname[row].Values but I get R0039 in response :(

    Read the article

  • UNIX-style RegExp Replace running extremely slowly under windows. Help? EDIT: Negative lookahead ass

    - by John Sullivan
    I'm trying to run a unix regEXP on every log file in a 1.12 GB directory, then replace the matched pattern with ''. Test run on a 4 meg file is took about 10 minutes, but worked. Obviously something is murdering performance by several orders of magnitude. Find: ^(?!.*155[0-2][0-9]{4}\s.*).*$ -- NOTE: match any line NOT starting 155[0-2]NNNN where in is a number 0-9. Replace with: ''. Is there some justifiable reason for my regExp to take this long to replace matching text, or is the program I am using (this is windows / a program called "grepWin") most likely poorly optimized? Thanks. UPDATE: I am noticing that searching for ^(155[0-2]).$ takes ~7 seconds in a 5.6 MB file with 77 matches. Adding the Negative Lookahead Assertion, ?=, so that the regExp becomes ^(?!155[0-2]).$ is causing it to take at least 5-10 minutes; granted, there will be thousands and thousands of matches. Should the negative lookahead assertion be extremely detrimental to performance, and/or a large quantity of matches?

    Read the article

  • How can I fix the scroll bug when using Windows rich edit controls in wxpython?

    - by ChrisD
    When using wx.TextCtl with the wx.TE_RICH2 option in windows, I get this strange bug with the auto-scroll when using the AppendText function. It scrolls so that all the text is above the visible area, which isn't very useful behaviour. I tried just adding a call to ScrollLines(-1) after appending the text - which does scroll it to the correct position - but this can lead to the window flashing when it auto-scrolls. So I'm looking for another way to automatically scroll to the bottom. So far, my solution is to bypass the AppendText functions auto-scroll and implement my own, like this: def append_text(textctrl, text): before_number_of_lines = textctrl.GetNumberOfLines() textctrl.SetInsertionPointEnd() textctrl.WriteText(text) after_number_of_lines = textctrl.GetNumberOfLines() textctrl.ScrollLines(before_number_of_lines - after_number_of_lines + 1) Is there a better way?

    Read the article

  • How can I edit a css rule in jQuery?

    - by chacham15
    The purpose is that rows are dynamically added to a table and it is not as nice (and slower) to apply the rule manually later. The specific example is that I am creating a tree table to represent a folder directory. Each folder is a div. In each div, there is a ul with an li for each columns' information. These li have a class name equivalent to the column name. This provides column width. I want to make the columns resizable however. I could do $('.className').css('width', newWidth) but then this wont apply to newly inserted items. Therefore, I want to modify the css rule. How do I do this?

    Read the article

  • Is it possible to open and edit 2 or more RecordStores at the same time in j2me?

    - by me123
    Hi, I was wondering if it is possible in j2me to have 2 or more recordStores open at the same time. I basically want to be able to add/remove records from 2 different recordStores in the same execution of the code. Is this possible? If so, how would you do it? At the top of the class, you do something like 'private RecordStore rs;' would you need to have two instances of this to make it work or could you do it with the one declaration? Thanks in advance.

    Read the article

  • How can I optimize retrieving lowest edit distance from a large table in SQL?

    - by Matt
    Hey, I'm having troubles optimizing this Levenshtein Distance calculation I'm doing. I need to do the following: Get the record with the minimum distance for the source string as well as a trimmed version of the source string Pick the record with the minimum distance If the min distances are equal (original vs trimmed), choose the trimmed one with the lowest distance If there are still multiple records that fall under the above two categories, pick the one with the highest frequency Here's my working version: DECLARE @Results TABLE ( ID int, [Name] nvarchar(200), Distance int, Frequency int, Trimmed bit ) INSERT INTO @Results SELECT ID, [Name], (dbo.Levenshtein(@Source, [Name])) As Distance, Frequency, 'False' As Trimmed FROM MyTable INSERT INTO @Results SELECT ID, [Name], (dbo.Levenshtein(@SourceTrimmed, [Name])) As Distance, Frequency, 'True' As Trimmed FROM MyTable SET @ResultID = (SELECT TOP 1 ID FROM @Results ORDER BY Distance, Trimmed, Frequency) SET @Result = (SELECT TOP 1 [Name] FROM @Results ORDER BY Distance, Trimmed, Frequency) SET @ResultDist = (SELECT TOP 1 Distance FROM @Results ORDER BY Distance, Trimmed, Frequency) SET @ResultTrimmed = (SELECT TOP 1 Trimmed FROM @Results ORDER BY Distance, Trimmed, Frequency) I believe what I need to do here is to.. Not dumb the results to a temporary table Do only 1 select from `MyTable` Setting the results right in the select from the initial select statement. (Since select will set variables and you can set multiple variables in one select statement) I know there has to be a good implementation to this but I can't figure it out... this is as far as I got: SELECT top 1 @ResultID = ID, @Result = [Name], (dbo.Levenshtein(@Source, [Name])) As distOrig, (dbo.Levenshtein(@SourceTrimmed, [Name])) As distTrimmed, Frequency FROM MyTable WHERE /* ... yeah I'm lost */ ORDER BY distOrig, distTrimmed, Frequency Any ideas?

    Read the article

  • Creating a loop that will edit 60 TextBox names?

    - by Darkmage
    text box set1 = 1 to 30 = in the query name = br1id to br30id textbox set 2 = 1 to 30 = in the result output i dont understand how to create a loop based on 30 diffrent textbox names? i cant copy paste these lines 30 times editing the textbox names, that wold just look wrong. try { MySqlConnection mysqlCon = new MySqlConnection( "server= 195.159.253.229;" + "Database = bruker;" + "user id=bobby;" + "password=LoLOW###;"); MySqlCommand cmd1 = new MySqlCommand( "SELECT brukernavn From bruker where ID = '" + br1id.Text + "';", mysqlCon); mysqlCon.Open(); navX[0] = cmd1.ExecuteScalar().ToString(); br1txt3.Text = navX[0]; }

    Read the article

  • LINQ-to-XML to DataGridView: Cannot edit fields -- How to fix?

    - by Pretzel
    I am currently doing LINQ-to-XML and populating a DataGridView with my query just fine. The trouble I am running into is that once loaded into the DataGridView, the values appear to be Un-editable (ReadOnly). Here's my code: var barcodes = (from src in xmldoc.Descendants("Container") where src.Descendants().Count() > 0 select new { Id = (string)src.Element("Id"), Barcode = (string)src.Element("Barcode"), Quantity = float.Parse((string)src.Element("Quantity").Attribute("value")) }).Distinct(); dataGridView1.DataSource = barcodes.ToList(); I read somewhere that the "DataGridView will be in ReadOnly mode when you use Anonymous types." But I couldn't find an explanation why or exactly what to do about it. Any ideas?

    Read the article

  • Can one edit an InstallShield setup.exe's manifest file?

    - by DNS
    I'm running into the Windows Vista/7 Program Compatibility Assistant problem described here: http://stackoverflow.com/questions/1069135/this-program-might-not-have-installed-correctly-message-in-windows-7-rc The solution (backed-up by similar questions elsewhere, and MSDN), is apparently to add a 'compatibility' section to setup.exe's manifest. InstallShield 10 SP1 does this automatically, but unfortunately I only have InstallShield 2009. How would I go about editing the manifest? Is there a way to do this programmatically, so I can integrate it into my build?

    Read the article

  • Cannot edit ColumnDefinitions property in Visual Studio WPF application, ellipsis are invisible!

    - by SLC
    I have a window that looks like this: <Window x:Class="MyWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="My Title" Height="300" Width="300" ResizeMode="NoResize" SizeToContent="Height" WindowStartupLocation="CenterOwner"> <DockPanel> <Grid x:Name="MyGrid" DockPanel.Dock="Top" Margin="10"> </Grid> </DockPanel> </Window> Pretty simple. The instructions I am following suggest that if I click the item, the properties window will appear (it does), and then I can click ColumnDefinitions (which is a Collection) to bring up the Collection Editor and add some columns. However, the ColumnDefinitions property looks like this: The ColumnDefinitions ellipsis you'd normally press is gone, or invisible, or something. Any idea why?

    Read the article

  • how to create multiple selections in text edit box in qt4?

    - by Ronny
    Qt3.3 used to allow for multiple selections in the QTextEdit widget by calling the setSelection() function and specifying a different selection id (selNum) as the last argument in that function. In Qt4, to create a selection, I do it by creating a QTextCursor object and call the setPosition() or movePosition() methods. I have no problems being able to create a single selection of text. I am, however, unable to find a way to create multiple selections. The methods in Qt4 do not have an argument which allows you to set a selection id, nor can i find any other function in the QTextCursor or QTextEdit which looks like it might allow me to do so. Has this feature been completely removed from Qt4? or has is there a new and different way of doing it? Thanks. Ronny

    Read the article

  • how to make a div element edit-able ,like a textarea when i click..

    - by zjm1126
    this is my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta name="viewport" content="width=device-width, user-scalable=no"> </head> <body> <style type="text/css" media="screen"> </style> <!--<div id="map_canvas" style="width: 500px; height: 300px;background:blue;"></div>--> <div class=b style="width: 200px; height: 200px;background:pink;position:absolute;left:500px;top:100px;"></div> <script src="jquery-1.4.2.js" type="text/javascript"></script> <script src="jquery-ui-1.8rc3.custom.min.js" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> </script> </body> </html> thanks

    Read the article

  • how to read and edit a doc file in asp.net?

    - by Nimesh
    I have a .doc or .docx file where in after the booking of the hotel room i wanna give the agreement and the receipt in a .doc file. for this i have a text file, To, [NAME] [ADDRESS] Dear.... ...Content;;;... This will be my .doc file. My idea is to read this .doc file and replace the tags, say.([NAME] and [ADDRESS]) with the user's name and address. How can i do this in ASP.NET?

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >