Search Results

Search found 2417 results on 97 pages for 'states'.

Page 83/97 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • Cross-platform build UNC share (Windows->Linux) - possible to be case-sensitive on CIFS share?

    - by holtavolt
    To optimize builds between Windows and Linux (Ubuntu 10.04), I've got a UNC share of the source tree that is shared between systems, and all build output goes to local disk on each system. This mostly works great, as source updates and changes can quickly be tested on both systems, but there's one annoying limitation I can't find a way around, which is that the Linux CIFS mount is case-insensitive. Consequently, a test compile of code that has an error like: #include "Foo.h" for a file foo.h, will not be caught by a test build (until a local compile is done on the Linux box, e.g. nightly builds) Is it possible to have case-sensitivity of the Windows UNC share on the Linux box? I've tried a variety of fstab and mount combinations with no success, as well as editing the smb.config to set "case sensitive = yes" Given what the Ubuntu man page info states on this: nocase Request case insensitive path name matching (case sensitive is the default if the server suports it). I suspect that this is a limitation from the Windows UNC side, and there's nothing to be done short of switching to some other mechanism (is NFS still viable anywhere?) If anyone has already solved this to support optimized cross-platform build environments, I'd appreciate hearing about it!

    Read the article

  • How to set default view in OpenLayers, WITHOUT restricting bounds?

    - by Jenny
    Based on samples, I can see that you can set a default view in OpenLayers by saying something along the lines of: var bounds = new OpenLayers.Bounds(-125, 25, -65, 50); var map = new OpenLayers.Map('map', {restrictedExtent: bounds }); However, this also (as the name implies), restricts me to be able to ONLY navigate within these bounds. I can zoom out and see things outside of these bounds, but I can't then zoom back onto them, or scroll to them. I've tried not having any restrictedExtent (or making it the entire map), but then I can't get it to focus on the area I want. I tried using: map.setCenter(new OpenLayers.LonLat(0,0), 3); console.log(map.getCenter()); To set the zoom and the center...but it doesn't seem to do ANYTHING, other than set the variable "center" which I can then read from map.getCenter() (if I don't set it, it's null, if I do set it, I can see it...but the map itself stays fully extended and it's center doesn't seem to change at all...) The Map layer I am using is: OpenLayers.Layer.OSM.Mapnik with displayOutsideMaxExtent set to true... I'm really at a loss here. My goal is to have a default region of the world zoomed in to and in view (such as the United States), with the option of viewers being able to go outside the default to view things.

    Read the article

  • Index question: Select * with WHERE clause. Where and how to create index

    - by Mestika
    Hi, I’m working on optimizing some of my queries and I have a query that states: select * from SC where c_id ="+c_id” The schema of ** SC** looks like this: SC ( c_id int not null, date_start date not null, date_stop date not null, r_t_id int not null, nt int, t_p decimal, PRIMARY KEY (c_id, r_t_id, date_start, date_stop)); My immediate bid on how the index should be created is a covering index in this order: INDEX(c_id, date_start, date_stop, nt, r_t_id, t_p) The reason for this order I base on: The WHERE clause selects from c_id thus making it the first sorting order. Next, the date_start and date_stop to specify a sort of “range” to be defined in these parameters Next, nt because it will select the nt Next the r_t_id because it is a ID for a specific type of my r_t table And last the t_p because it is just a information. I don’t know if it is at all necessary to order it in a specific way when it is a SELECT ALL statement. I should say, that the SC is not the biggest table. I can say how many rows it contains but a estimate could be between <10 and 1000. The next thing to add is, that the SC, in different queries, inserts the data into the SC, and I know that indexes on tables which have insertions can be cost ineffective, but can I somehow create a golden middle way to effective this performance. Don't know if it makes a different but I'm using IBM DB2 version 9.7 database Sincerely Mestika

    Read the article

  • C++ Beginner - Trouble using structs and constants!

    - by Francisco P.
    Hello everyone! I am currently working on a simple Scrabble implementation for a college project. I can't get a part of it to work, though! Check this out: My board.h: http://pastebin.com/J9t8VvvB The subroutine where the error lies: //Following snippet contained in board.cpp //I believe the function is self-explanatory... //Pos is a struct containing a char, y, a int, x and an orientation, o, which is not //used in this particular case void Board::showBoard() { Pos temp; temp.o = 0; for (temp.y = 'A'; temp.y < (65 + TOTAL_COLUMNS); ++temp.y) { for (temp.x = 1; temp-x < (1 + TOTAL_ROWS); ++temp.x) { cout << _matrix[temp].getContents(); } cout << endl; } } The errors returned on compile time: http://pastebin.com/bZv7fggq How come the error states that I am trying to compare two Pos when I am comparing chars and ints? I also really can't place these other errors... Thanks for your time!

    Read the article

  • AJAX/JSONP Question. Access id denied using IE while requesting corss domain.

    - by Sisir
    Ok, Here we go. I have already searched the Stack for the answer i have found some useful info but i want to clear up some more things. I also search the net for the answer but no real help. I have worked with some api (yelp, ouside.in). In yelp i use to inject the script to head with the url request to the api with a callback funcion. I worked fine in all browsers. But while using outside.in api when i call the url the callback in not working. In yelp they have a url field can be used like that callback=callbackfuncion so the callback will automatically called. But in outside.in there is not such field available. Is there are any standard command for callback function which will work regardless of any server/api? I also tried a standard ajax request using jQuery $.ajax() function. It worked for my local pc for both IE and other browser but did not working in IE showing the error: access denied, other borwser seems ok. Firebug in my FF also don't notice any errors. Outside.in has an javascript example but it is too hard to me to understand github.com/outsidein/api-examples/tree/master/javascript/browser/ site i am working: http://citystir.com yelp: yelp.com outside.in: outside.in Techniqual info: i am using: wampserver in local, wordpress for hosting, Godaddy, apache for remote with linux. Codes: Using Jquery $.ajax url is like: "http://hyperlocal-api.outside.in/v1.1/states/Illinois/cities/chicago/stories?dev_key="+key+"&sig="+signeture+"&limit=3 function makeOutsideRequest(url){ $.ajax({ url: url, dataType: 'json', type: 'GET', success: function (data, status, xhr) { if (data == null) { alert("An error occurred connecting to " + url + ". Please ensure that the server is running and configured to allow cross-origin requests."); }else{ printHomeNews(data); } }, error: function (xhr, status, error) { alert("An error occurred - check the server log for a stack trace."); } }); } Thanks!

    Read the article

  • How to obtain value of auto_increment field in Access linked to MySQL?

    - by Cruachan
    I'm trying to modify and existing Access application to use MySQL as a database via ODBC with the minimal amount of recoding. The current code will often insert a new record using DAO then obtain the ID by using LastModified. This doesn't work with MySQL. Instead I'm trying to use the approach using SELECT * FROM tbl_name WHERE auto_col IS NULL Suggested for Access in the MySQL documentation. However if I set up a sample table consisting of just an id and text data field and execute this CurrentDb.Execute ("INSERT INTO tbl_scratch (DATA) VALUES ('X')") Set rst = CurrentDb.OpenRecordset("SELECT id FROM tbl_scratch WHERE id IS NULL") myid = rst!id Id is returned as null. However if I execute INSERT INTO tbl_scratch (DATA) VALUES ('X'); SELECT id FROM tbl_scratch WHERE id IS NULL; using a direct MySQL editor then id is returned correctly, so my database and approach is fine but my implementation inside Access must be incorrect. Frustratingly the MySQL documentation gives the SQL statement to retrieve the id as an example that works in Access (as it states LAST_INSERT_ID() doesn't) but gives no further details. How might I fix this?

    Read the article

  • Exchange Server 2010: move mailboxes from recoveded and mounted edb to user's mailbox [closed]

    - by Cook
    One of our exchange servers crashed, and I am trying to recover the mailboxes. We had 1 exchange 2003 server named "apex" and 1 exchange 2010 server named "2008Enterprise. the exchange 2010 server named "2008Enterprise" crashed. I created a new exchange 2010 server named "Providence". I ran the command on Providence: New-MailboxDatabase -Recovery -Name JBCMail -Server Providence -EdbFilePath "c:\data\Exchange\Mailbox\Mailbox Database 0579285147\Mailbox Database 0579285147.edb" -LogFolderPath "c:\data\Exchange\Mailbox\Mailbox Database 0579285147" this command executed and finished without error I then ran the command: eseutil /p E00 this command was executed from the below directory: c:\data\Exchange\Mailbox\Mailbox Database 0579285147 I then mounted the JBCMail with the mount command note: I do not have my full typed command. Inside my Exchange Management Console (EMC) I can view the new mailbox database named JBCMail. The JBCMail database is show as mounted on the exchange server named Providence. I can see the crashed Exchange server named 2008Exchange. In the EMC the crashed exchange server states the Copy Status under ServerConfiguration-Mailbox is ServiceDown. From here I need to recover three mailboxes The mail boxes are on the apex server. How do I move the mailboxs from apex to Providence? How do I restore the mailboxes from JBCmail mounted database to the user's mailbox? I do not fully understand how to use the Restore-Mailbox command because when I use this command it tries to restore the mailbox to the dead apex server. Restore-Mailbox -ID 'Jason Young' -RecoveryDatabase JBCMail

    Read the article

  • extract out text in each line and put it in seperate variables with javascript

    - by user357034
    I have the following address which is in a paragraph with no great way to select the individual text areas within. I do not have access to this code. I want to extract out each line and put the text values in a variable for each type. Not sure what would be the best way to do it. Use .split('<br>') ? then use .split('&nbsp;') to separate the state from the zip same with city and state I am a little lost here. Here are the variables I would like. company name, person's name, address1, city, state, country, zip code, phone, Here is the paragraph that i have. I do not need the '(Residential Address)' <p> XYZ Inc<br> John&nbsp;Smith<br> 555 Anywhere Street<br> New York, NY&nbsp;11150<br> United States<br> 212-555-1212<br> (Residential Address) </p>

    Read the article

  • android costumized button problem with changing text color

    - by alaxid
    Hi, I made a button that changes the background drawable on different states, this way: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/btn_location_pressed" /> <!-- pressed --> <item android:state_focused="true" android:drawable="@drawable/btn_location_pressed"/> <!-- focused --> <item android:drawable="@drawable/btn_location"/> <!-- default --> The problem here is that I'm also trying to change the textColor as I do with the drawable but I'm not being able to. I already tried android:textColor and android:color but the first doesn't work whilst the seconds changes my background. The next code is part of my layout. Regarding to the text color it only works for the normal state text color, thus not changing it to the white one while pressed <Button android:id="@+id/location_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingTop="5dp" android:background="@drawable/location" android:textSize="15sp" android:textColor="@color/location_color" android:textColorHighlight="#FFFFFF" /> As anybody got a clue? ty! :)

    Read the article

  • How to load the SQL data into several ComboBox easily, am i doing the correctly or is there another way

    - by Dominic Deepan.d
    I have a Combobox to fill the data for City, State and PinCode these combobox is dopdown list and the user will pick it. and it loads once the form opens. Here is the CODE: /// CODE TO BRING A DATA FROM SQL INTO THE FORM DROP LIST /// To fill the sates from States Table cn = new SqlConnection(@"Data Source=Nick-PC\SQLEXPRESS;Initial Catalog=AutoDB;Integrated Security=True"); cmd= new SqlCommand("select * from TblState",cn); cn.Open(); SqlDataReader dr; try { dr = cmd.ExecuteReader(); while (dr.Read()) { SelectState.Items.Add(dr["State"].ToString()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { cn.Close(); } //To fill the Cities from City Table cn1 = new SqlConnection(@"Data Source=Nick-PC\SQLEXPRESS;Initial Catalog=AutoDB;Integrated Security=True"); cmd1 = new SqlCommand("SELECT * FROM TblCity", cn); cn.Open(); SqlDataReader ds; try { ds = cmd1.ExecuteReader(); while (ds.Read()) { SelectCity.Items.Add(ds["City"].ToString()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { cn1.Close(); } // To fill the Data in the Pincode from the City Table cn2 = new SqlConnection(@"Data Source=Nick-PC\SQLEXPRESS;Initial Catalog=AutoDB;Integrated Security=True"); cmd2 = new SqlCommand("SELECT (Pincode) FROM TblCity ", cn2); cn2.Open(); SqlDataReader dm; try { dm = cmd2.ExecuteReader(); while (dm.Read()) { SelectPinCode.Items.Add(dm["Pincode"].ToString()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { cn2.Close(); } its kinda Big, i am doing the same steps for all the combo-box, but is there a way i can merge it in a simple way.

    Read the article

  • C++ RPC library suggestions

    - by Oxsnarder
    I'm looking for suggestions regarding RPC libraries implemented in C++, for C++ developers. Some requirements constraints: Should work on both linux/unix and win32 systems Be able to execute free function and class methods Hopefully written in modern C++ not 90's/java-esque C++ Be able to function over networks and hetrogenous architectures Not too slow or inefficient Hopefully provide interfaces for TR1 style std::function's et al. My example usage is to invoke the free function foo on a remote machine. ---snip--- // foo translation unit int foo(int i, int j) { return i + j; } ---snip--- ---snip--- // client side main int main() { //register foo on client and server //setup necassary connections and states int result; if (RPCmechanism.invoke("foo",4,9,result)) std::cout << "foo(4,9) = " result << std::endl; else std::cout << "failed to invoke foo(4,9)!" << std::endl; return 0; } ---snip--- Something that can achieve the above or similar would be great.

    Read the article

  • Converting a soap message to a document using wssj

    - by ellander
    I have been supplied with a jar file that should enable me to connect to a 3rd party system. When I run the necessary class I get an error which states that the namespace for the prefix "SOAPENV" has not been declared. Using jad I have decompiled the class files to try suss out what is going on and the error seems to occur when a soap message is being converted to a document. Unfortunately I don't know much about wssj. Can anyone suggest what the problem might be? I'm wondering if it's an incompatibility issue as it's not a recently created jar file and the decompiled code looks different to all the examples I can find. For example, in this section the examples have addNamesSpaceDeclaration rather than addAttribute... MessageFactory factory = MessageFactory.newInstance(); SOAPFactory sf = SOAPFactory.newInstance(); SOAPMessage msg = factory.createMessage(); MimeHeaders headers = msg.getMimeHeaders(); headers.addHeader("Content-Type", "text/xml"); SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); env.addAttribute(sf.createName("xmlns:xsi"), "http://www.w3.org/2001/XMLSchema-instance");

    Read the article

  • How to: StructureMap and configuration based on runtime parameters?

    - by user981375
    In a nutshell - I want to be able to instantiate object based on runtime parameters. In this particular case there are only two parameters but the problem is that I'm facing different permutations of these parameters and it gets messy. Here is the situation: I want to get an instance of an object specific to, say, given country and then, say, specific state/province. So, considering the US, there are 50 possible combinations. In reality it's less than that but that's the max. Think of it this way, I want to find out what's the penalty for smoking pot in a given country/state, I pass this information in and I get instantiated object telling me what it is. To the code (for reference only): interface IState { string Penalty { get; } } interface ICountry { IState State { get; set; } string Name { get; } } class BasePenalty : IState { virtual public string Penalty { get { return "Slap on a wrist"; } } } class USA : ICountry { public USA(IState state) { State = state; } public IState State { get; set; } public string Name { get { return "USA"; } } } class Florida: BasePenalty { public override string Penalty { get { return "Public beheading"; } } } // and so on ... I defined other states // which have penalties other than the "Slap on a wrist" How do I configure my container that when given country and state combination it will return the penalty? I tried combinations of profile and contextual binding but that configuration was directly proportional to the number of classes I've created. I have already gone thru trouble of defining different combinations. I'd like to avoid having to do the same during container configuration. I want to inject State into the Country. Also, I'd like to return UsaBasePenalty value in case state is not specified. Is that possible? Perhaps these is something wrong with the design.

    Read the article

  • Optimizing C++ Tree Generation

    - by cam
    Hi, I'm generating a Tic-Tac-Toe game tree (9 seconds after the first move), and I'm told it should take only a few milliseconds. So I'm trying to optimize it, I ran it through CodeAnalyst and these are the top 5 calls being made (I used bitsets to represent the Tic-Tac-Toe board): std::_Iterator_base::_Orphan_me std::bitset<9::test std::_Iterator_base::_Adopt std::bitset<9::reference::operator bool std::_Iterator_base::~_Iterator_base void BuildTreeToDepth(Node &nNode, const int& nextPlayer, int depth) { if (depth > 0) { //Calculate gameboard states int evalBoard = nNode.m_board.CalculateBoardState(); bool isFinished = nNode.m_board.isFinished(); if (isFinished || (nNode.m_board.isWinner() > 0)) { nNode.m_winCount = evalBoard; } else { Ticboard tBoard = nNode.m_board; do { int validMove = tBoard.FirstValidMove(); if (validMove != -1) { Node f; Ticboard tempBoard = nNode.m_board; tempBoard.Move(validMove, nextPlayer); tBoard.Move(validMove, nextPlayer); f.m_board = tempBoard; f.m_winCount = 0; f.m_Move = validMove; int currPlay = (nextPlayer == 1 ? 2 : 1); BuildTreeToDepth(f,currPlay, depth - 1); nNode.m_winCount += f.m_board.CalculateBoardState(); nNode.m_branches.push_back(f); } else { break; } }while(true); } } } Where should I be looking to optimize it? How should I optimize these 5 calls (I don't recognize them=.

    Read the article

  • Java: Cleaing up connection reset (but not by peer).

    - by Zombies
    There seems to be some confusion as well contradicting statements on various SO answers: http://stackoverflow.com/questions/585599/whats-causing-my-java-net-socketexception-connection-reset . You can see here that the accepted answer states that the connecteion was closed by other side. But this is not true, closing a connection doesn't cause a connection reset. It is cauesed by "an underlying TCP/IP error." What I want to know is if a SocketException: Connection reset means really besides "unerlying TCP/IP Error." What really causes this? As I doubt it has anything to do with the connection being closed (since closing a connection isn't an exception worthy flag, and reading from a closed connection is, but that isn't an "underlying TCP/IP error." My hypothesis is this Connection reset is caused from a server's failure to acknowledge an ACK packet (either wholly or just improperly as per TCP/IP). And that a SocketTimeoutException is generated only when no data is generated to be read (since this is thrown during a read after a certain duration, and read is waiting for data, but is not concerned with ACK packets). In other words, read() throws SocketTimeoutException if it didn't read any bytes of actual data (DATA LAYER) in its allotted time.

    Read the article

  • Runtime Error 1004 using Select with several workbooks

    - by Johaen
    I have an Excel workbook which pulls out data from two other workbooks. Since the data changes hourly there is the possibility that this macro is used more than one time a day for the same data. So I just want to select all previous data to this date period and want to delete them. Later on the data will be copied in anyway. But as soon as I want to use WBSH.Range(Cells(j, "A"), Cells(lastRow - 1, "M")).Select the code stopes with Error 1004 Application-defined or object-defined error. Followed just a snippet of the code with the relevant part. What is wrong here? 'Set source workbook Dim currentWb As Workbook Set currentWb = ThisWorkbook Set WBSH = currentWb.Sheets("Tracking") 'Query which data from the tracking files shoud get pulled out to the file CheckDate = Application.InputBox(("From which date you want to get data?" & vbCrLf & "Format: yyyy/mm/dd "), "Tracking data", Format(Date - 1, "yyyy/mm/dd")) 'states the last entry which is done ; know where to start ; currentWb File With currentWb.Sheets("Tracking") lastRow = .Range("D" & .Rows.Count).End(xlUp).Row lastRow = lastRow + 1 End With 'just last 250 entries get checked since not so many entries are made in one week j = lastRow - 250 'Check if there is already data to the look up date in the analyses sheet and if so deletes these records Do j = j + 1 'Exit Sub if there is no data to compare to prevent overflow If WBSH.Cells(j + 1, "C").Value = "" Then Exit Do End If Loop While WBSH.Cells(j, "C").Value < CheckDate If j <> lastRow - 1 Then 'WBSH.Range(Cells(j, "A"), Cells(lastRow - 1, "M")).Select 'Selection.ClearContents End If Thank you!

    Read the article

  • What happens to exinsting workspaces after upgrading to TFS 2010

    - by user351671
    Hi, I was looking for some insight about what happens to existing workspaces and files that are already checked-out on people, after an upgrade to TFS2010. Surprisingly enough I can not find any satisfactory information on this. (I am talking about upgrading on new hardware by the way. Fresh TFS instance, upgraded databases) I've checked TFS Installation guide, I searched through the web, all I could find is upgrade scenarios for the server side. Nobody even mentions what happens to source control clients. I've created a virtual machine to test the upgrade process, The upgrade was successful and all my files and workspaces exist in the new server too. The problem is: The new TFS installation has a new instanceID. When I redirected on the clients to the new server, the client seemed unable to match files and file states in the workspace with the ones on the new server. This makes me wonder if it will be possible to keep working after the production upgrade. As I mentioned above I can not find anything on this, it would be great if anyone could point me to some paper or blog post about this. Thanks in advance...

    Read the article

  • Checkbox not checkable in dialog ui

    - by Sable Foste
    I am trying to solve a z-index problem with the jQuery UI Dialog, similar to question Can't select or deselect checkboxes inside jQuery UI Modal Dialog , knowing there is a bug report out there. So in trying to up the z-index as recommended, I added the following code: $('#interface').click(function(evform){ $('#interface').prop('z-index')=99999; }); where the chrome and firefox console.log states: Uncaught ReferenceError: Invalid left-hand side in assignment HOWEVER, despite the error, the checkbox now works (throwing the console error every time). If I remove the offending line, the checkbox becomes "unclickable". How can I properly code this? My HTML: <div id="dialog" title="Loading..."> <p id="interface">Loading...</p> </div> (by the way, I tried adding inline style to the <p>, and it didn't work: <p id="interface" style="z-index:99999">Loading...</p> And with AJAX, I replace the contents of '#interface' with valid checkbox html such as: <label for="right"> <input name="right" type="checkbox"> </label> and I have the usual jQuery/Dialog UI files included. One final note, I tried to get creative, since this wasn't working and manually switch the checkbox by: if ($(evform.target).prop('type')=="checkbox"){ $(evform.target).checked; } Thank you to anyone willing to help me figure this out!

    Read the article

  • Usage of setInfoClass() on DirectoryIterator vs on RecursiveDirectoryIterator

    - by Gordon
    I've ran into an inconsistent behavior when using setInfoClass to set a custom SplFileInfo class to a DirectoryIterator versus setting it to a RecursiveIterator. The method description states: Use this method to set a custom class which will be used when getFileInfo and getPathInfo are called. The class name passed to this method must be derived from SplFileInfo. Consider this custom SplFileInfo class A extends SplFileInfo { public function test() { printf("I am of class %s\n", __CLASS__); } } and my iterators $iterator = new DirectoryIterator('.'); and $iterator = new RecursiveDirectoryIterator('.'); Now I'd expect those two to behave the same when I do $iterator->setInfoClass('A'); foreach($iterator as $file) { $file->test(); } and output 'I am of A' for each $file encountered and in fact, the RecursiveDirectoryIterator will do that. But the DirectoryIterator will raise Fatal error: Call to undefined method DirectoryIterator::test() so apparently the InfoClass does not get applied when iterating over the files. At least not directly, because when I change the code in the foreach loop to $file->getPathInfo()->test(); it will work for the DirectoryIterator. But then the RecursiveDirectoryIterator will raise Fatal error: Call to undefined method SplFileInfo::test() Like I said, I'd expect those two to behave the same, but apparently getFileInfo and getPathInfo don't get called in the DirectoryIterator, which I consider a bug. So if there is any Iterator experts out there, please help me understand this. Thanks.

    Read the article

  • How can multiple variables be passed to a function cleanly in C?

    - by aquanar
    I am working on an embedded system that has different output capabilities (digital out, serial, analog, etc). I am trying to figure out a clean way to pass many of the variables that will control those functions. I don't need to pass ALL of them too often, but I was hoping to have a function that would read the input data (in this case from a TCP network), and then parse the data (IE, the 3rd byte contains the states of 8 of the digital outputs (according to which bit in that byte is high or low)), and put that into a variable where I can then use elsewhere in the program. I wanted that function to be separate from the main() function, but to do so would require passing pointers to some 20 or so variables that it would be writing to. I know I could make the variables global, but I am trying to make it easier to debug by making it obvious when a function is allowed to edit that variable, by passing it to the function. My best idea was a struct, and just pass a pointer to it, but wasn't sure if there was a more efficient way, especially since there is only really 1 function that would need to access all of them at once, while most others only require parts of the information that will be stored in this bunch of state variables. So anyway, is there a clean way to send many variables between functions at once that need to be edited?

    Read the article

  • Mathmatic errors in basic C++ program

    - by Heather
    I am working with a basic C++ program to determine the area and perimeter of a rectangle. My program works fine for whole numbers but falls apart when I use any number with a decimal. I get the impression that I am leaving something out, but since I'm a complete beginner, I have no idea what. Below is the source: #include <iostream> using namespace std; int main() { // Declared variables int length; // declares variable for length int width; // declares variable for width int area; // declares variable for area int perimeter; // declares variable for perimeter // Statements cout << "Enter the length and the width of the rectangle: "; // states what information to enter cin >> length >> width; // user input of length and width cout << endl; // closes the input area = length * width; // calculates area of rectangle perimeter = 2 * (length + width); //calculates perimeter of rectangle cout << "The area of the rectangle = " << area << " square units." <<endl; // displays the calculation of the area cout << "The perimeter of the rectangle = " << perimeter << " units." << endl; // displays the calculation of the perimeter system ("pause"); // REMOVE BEFORE RELEASE - testing purposes only return 0; }

    Read the article

  • Expandable columns in a datagrid

    - by Jobe
    Im working on a WPF-applications to present and correct large amounts of data. Im about to implement a datagrid containing data from 3 different sources that are populated from external services. To start with I will only populate the grid with data from one source, the master source. However, sometimes an automated validator will trigger a validation warning or error on one cell and the requirement states that the user should be able to view data from the additional 2 sources in columns next to the selected one. Something like this: Standard view: | col1 src1 | col2 src1 | col3 src1 | | | | | | |faulty | | | | | | User want to show data from source 2 and 3 next to the column "col2 src1" like this: | col1 src1 | col2 src1 | col2 src2 | col2 src3 | col3 src1 | | | | | | | | |corrected | | | | | | | | | | and then be able to correct the faulty formatted cell with data from the other 2 soruces, and then collapse the columns again. I am trying to use the mvvm pattern on this one so I have populated the DataGrid with a ListCollectionView so far. The list contains items with properties like this: MyRowItem {string col1, string col2, string col3} I will then have 2 additional collections with items of type like above but from 2 other sources. I have no idea how to implement this functionality and could use some help on the logics. What approach should I head for?

    Read the article

  • C# XML Documentation Compiler Warning

    - by ImperialLion
    I am curious as to why I get a compiler warning in the following situation. /// <summary>This is class A /// </summary> public class A { /// <summary>This is the documentation for Method A /// </summary> public void MethodA() { //Do something } } /// <summary>This is class B /// </summary> public class B : A { /// <summary>This does something that I want to /// reference <see cref="MethodA"/> /// </summary> public void MethodB() { //Do something } } The warning states that "XML comment on 'B.MethodB()' has cref attribute 'MethodA' that could not be resolved." If B inherits from A shouldn't the compiler be able to see that method when generating the documentation without me specifying the parent class in the cref? If I change the cref to be cref="A.MethodA()" it works fine, but it seems like that's unnecessary and is a pain to do, especially if I have to go up more than one level. As a note to anyone testing this you have to be sure to "XML documentation file" checked in the Properties - Build in order to see the warning.

    Read the article

  • Windows "forms" authentication - <deny users="?"> redirecting to foreign page!

    - by Erik5388
    Like the title states - I have a web.config file that looks like, <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> <authentication mode="Forms"> <forms name="login" protection="All" timeout="30" loginUrl="login" defaultUrl="~/"> <credentials passwordFormat="Clear"> <user name="admin" password="password" /> </credentials> </forms> </authentication> <authorization> <deny users="?" /> </authorization> </system.web> </configuration> I want to do exactly what it says it should do... I want to deny all users who try to enter the site. It works however, it redirects to a "Account/Login?ReturnUrl=%2flogin" url I have never heard of... Is there a place I can change this?

    Read the article

  • Mathematics errors in basic C++ program

    - by H Bomb1013
    I am working with a basic C++ program to determine the area and perimeter of a rectangle. My program works fine for whole numbers but falls apart when I use any number with a decimal. I get the impression that I am leaving something out, but since I'm a complete beginner, I have no idea what. Below is the source: #include <iostream> using namespace std; int main() { // Declared variables int length; // declares variable for length int width; // declares variable for width int area; // declares variable for area int perimeter; // declares variable for perimeter // Statements cout << "Enter the length and the width of the rectangle: "; // states what information to enter cin >> length >> width; // user input of length and width cout << endl; // closes the input area = length * width; // calculates area of rectangle perimeter = 2 * (length + width); //calculates perimeter of rectangle cout << "The area of the rectangle = " << area << " square units." <<endl; // displays the calculation of the area cout << "The perimeter of the rectangle = " << perimeter << " units." << endl; // displays the calculation of the perimeter system ("pause"); // REMOVE BEFORE RELEASE - testing purposes only return 0; }

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >