Search Results

Search found 622 results on 25 pages for 'repeating'.

Page 1/25 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Infopath - Repeating sections

    - by witsEnd
    I have struggled with this for 2 days and posted this question at a couple of other sites but with no luck. I am creating a form as follows. I have an "outer" repeating section in which the user enters a work item id and then selects as many names as he/she wishes from a series of drop down lists. When the user clicks a button (also in this "outer" repeating section), Feedback textboxes are added for each name selected, as well as text boxes with the names selected from the drop down appear above the those provided for feedback. I used the XPathNavigator.Clone() method to create the new feedback textboxes and textboxes that display the user's name that was selected. (The username textbox appears above the respective feedback textbox). This did the trick, but there is a problem. The user should be able to click "Insert item" on the outer repeating section to add another work item wherein he/she may again select as many names as they wish from the series of drop downs, click a button, and have feedback and user name text boxes appear for each name selected from the drop down box associated with the current work item, (i.e, "outer" repeating section). I clicked Insert Item on the "outer" repeating section and selected 2 names from the second series of drop downs, but when I try to clone a node, it is added at the end of the previous repeating section. I don't know how to navigate into (for lack of a better term) subsequent repeating sections. I am using InfoPath 2007 and I am aware that the current() method call is implicit, but this still doesn't work. I'm thinking I need to set up a Rule somewhere, but I am not sure how to do that. Any help would be appreciated.

    Read the article

  • Check for repeating dates.

    - by kylex
    I am creating a calendar in PHP and in the database have a date, let's say 6-10-10. Sometimes I have repeating events, stored as weekly repeating, so if the date is 6-10-10, and I am repeating an event every two weeks from that day (including that day) what is the best way to find dates for every two weeks from 6-10-10? For example, let's say the date is 7-8-10, how can I check to see that date meets my criteria?

    Read the article

  • Repeating fields in similar database tables

    - by user1738833
    I have been tasked with working on a database that I have never seen before and I'm looking at the DB structure. Some of the central and most heavily queried and joined tables look like virtual duplicates of each other. Here's a massively simplified representation of the situation, with business-sensitive information changed, listing hypothetical table names and fields: TopLevelGroup: PK_TLGroupId, DisplaysXOnBill, DisplaysYOnBill, IsInvoicedForJ, IsInvoicedForK SubGroup: PK_SubGroupId, FK_ParentTopLevelGroupId, DisplaysXOnBill, DisplaysYOnBill, IsInvoicedForJ, IsInvoicedForK SubSubGroup: PK_SubSUbGroupId, FK_ParentSubGroupId, DisplaysXOnBill, DisplaysYOnBill, IsInvoicedForJ, IsInvoicedForK I haven't listed the types of the fields as I don't think it's particularly important to the situation. In addition, it's worth saying that rather than four repeated fields as in the example above, I'm looking at 86 repeated fields. For the most part, those fields genuinely do represent "facts" about the primary table entity, so it's not automatically wrong for that reason. In addition, the "groups" represented here have a property inheritance relationship. If DisplaysXOnBill is NULL in the SubSubGroup, it takes the value of DisplaysXOnBillfrom it's parent, the SubGroup, and so-on up to the TopLevelGroup. Further, the requirements will never require that the model extends beyond three levels, so there is no need for flexibility in that area. Is there a design smell from several tables which describe very similar entities having almost identical fields? If so, what might be a better design of the example above? I'm using the phrase "design smell" to indicate a possible problem. Of course, in any given situation, a particular design might well be the best solution. I'm looking for a more general answer - wondering what might be wrong with this design and what might be the better design were that the case. Possibly related, but not primary questions: Is this database schema in a reasonably normal form (e.g. to 3NF), insofar as can be told from the information I've provided. I can't see a problem with the requirements of 2NF and 3NF, except in their inheriting the requirements of 1NF. Is 1NF satisfied though? Are repeating groups allowed in different tables? Is there a best-practice method for implementing the inheritance relationship in a database as I require? The method above feels clunky to me because any query on the SubSubGroup necessarily needs to join onto the SubGroup and the TopLevelGroup tables to collect inherited facts, which can make even trivial joins requiring facts from the SubSubGroup table rather long-winded. There are, of course, political considerations to making a relatively large change like this. For the purpose of this question, I'm happy to ignore that fact in the interests of keeping the answers ring-fenced to the technical problem.

    Read the article

  • Cutting down repeating code in c# Class

    - by Tom Gullen
    This is a wrapper for an API I'm working on, am I doing it sort of right? I'm not particularly fond of all the repeating code in the constructor, if someone can show me if I can reduce that it would be very helpful! public class WebWizForumVersion { // Properties of returned data public string Software { get; private set; } public string Version { get; private set; } public string APIVersion { get; private set; } public string Copyright { get; private set; } public string BoardName { get; private set; } public string URL { get; private set; } public string Email { get; private set; } public string Database { get; private set; } public string InstallationID { get; private set; } public bool NewsPad { get; private set; } public string NewsPadURL { get; private set; } public WebWizForumVersion(XmlReader Data) { try { Data.ReadToFollowing("Software"); this.Software = Data.ReadElementContentAsString(); Data.ReadToFollowing("Version"); this.Version = Data.ReadElementContentAsString(); Data.ReadToFollowing("ApiVersion"); this.APIVersion = Data.ReadElementContentAsString(); Data.ReadToFollowing("Copyright"); this.Copyright = Data.ReadElementContentAsString(); Data.ReadToFollowing("BoardName"); this.BoardName = Data.ReadElementContentAsString(); Data.ReadToFollowing("URL"); this.URL = Data.ReadElementContentAsString(); Data.ReadToFollowing("Email"); this.Email = Data.ReadElementContentAsString(); Data.ReadToFollowing("Database"); this.Database = Data.ReadElementContentAsString(); Data.ReadToFollowing("InstallID"); this.InstallationID = Data.ReadElementContentAsString(); Data.ReadToFollowing("NewsPad"); this.NewsPad = bool.Parse(Data.ReadElementContentAsString()); Data.ReadToFollowing("NewsPadURL"); this.NewsPadURL = Data.ReadElementContentAsString(); } catch (Exception e) { } } }

    Read the article

  • PHP contact form overwrite fields issue repeating value

    - by judi
    H I'm using php contact form from http://phpfmg.sourceforge.net/home.php. I thought I'd add an onfocus effect so when i click in the fields the value dissappears automatically. But when I submit say if haven't filled in my requried fields I get this the values appearing again like <input type="text" class="text_box" onfocus="if(this.value=='Telephone')this.value='';" value="TelephoneTelephone" id="field_5" name="field_5">

    Read the article

  • BizTalk&ndash;Mapping repeating EDI segments using a Table Looping functoid

    - by Bill Osuch
    BizTalk’s HIPAA X12 schemas have several repeating date/time segments in them, where the XML winds up looking something like this: <DTM_StatementDate> <DTM01_DateTimeQualifier>232</DTM01_DateTimeQualifier> <DTM02_ClaimDate>20120301</DTM02_ClaimDate> </DTM_StatementDate> <DTM_StatementDate> <DTM01_DateTimeQualifier>233</DTM01_DateTimeQualifier> <DTM02_ClaimDate>20120302</DTM02_ClaimDate> </DTM_StatementDate> The corresponding EDI segments would look like this: DTM*232*20120301~ DTM*233*20120302~ The DateTimeQualifier element indicates whether it’s the start date or end date – 232 for start, 233 for end. So in this example (an X12 835) we’re saying the statement starts on 3/1/2012 and ends on 3/2/2012. When you’re mapping from some other data format, many times your start and end dates will be within the same node, like this: <StatementDates> <Begin>20120301</Begin> <End>20120302</End> </StatementDates> So how do you map from that and create two repeating segments in your destination map? You could connect both the <Begin> and <End> nodes to a looping functoid, and connect its output to <DTM_StatementDate>, then connect both <Begin> and <End> to <DTM_StatementDate> … this would give you two repeating segments, each with the correct date, but how to add the correct qualifier? The answer is the Table Looping Functoid! To test this, let’s create a simplified schema that just contains the date fields we’re mapping. First, create your input schema: And your output schema: Now create a map that uses these two schemas, and drag a Table Looping functoid onto it. The first input parameter configures the scope (or how many times the records will loop), so drag a link from the StatementDates node over to the functoid. Yes, StatementDates only appears once, so this would make it seem like it would only loop once, but you’ll see in just a minute. The second parameter in the functoid is the number of columns in the output table. We want to fill two fields, so just set this to 2. Now drag the Begin and End nodes over to the functoid. Finally, we want to add the constant values for DateTimeQualifier, so add a value of 232 and another of 233. When all your inputs are configured, it should look like this: Now we’ll configure the output table. Click on the Table Looping Grid, and configure it to look like this: Microsoft’s description of this functoid says “The Table Looping functoid repeats with the looping record it is connected to. Within each iteration, it loops once per row in the table looping grid, producing multiple output loops.” So here we will loop (# of <StatementDates> nodes) * (Rows in the table), or 2 times. Drag two Table Extractor functoids onto the map; these are what are going to pull the data we want out of the table. The first input to each of these will be the output of the TableLooping functoid, and the second input will be the row number to pull from. So the functoid connected to <DTM01_DateTimeQualifier> will look like this: Connect these two functoids to the two nodes we want to populate, and connect another output from the Table Looping functoid to the <DTM_StatementDate> record. You should have a map that looks something like this: Create some sample xml, use it as the TestMap Input Instance, and you should get a result like the XML at the top of this post. Technorati Tags: BizTalk, EDI, Mapping

    Read the article

  • Highlighting repeating groups in SSRS 2008 R2 charts

    In a typical bar chart, the height of the bars represents the value of the data along the X axis and the Y axis represents the category of the data point. All these values can be classified in logical groups depending upon the logic used for analysis. One general requirement that arises in the case of repeating groups, is to highlight these groups without representing it on the X or Y scale. In this tip we will look at how to address this requirement.

    Read the article

  • Mapping Repeating Sequence Groups in BizTalk

    - by Paul Petrov
    Repeating sequence groups can often be seen in real life XML documents. It happens when certain sequence of elements repeats in the instance document. Here’s fairly abstract example of schema definition that contains sequence group: <xs:schemaxmlns:b="http://schemas.microsoft.com/BizTalk/2003"            xmlns:xs="http://www.w3.org/2001/XMLSchema"            xmlns="NS-Schema1"            targetNamespace="NS-Schema1" >  <xs:elementname="RepeatingSequenceGroups">     <xs:complexType>       <xs:sequencemaxOccurs="1"minOccurs="0">         <xs:sequencemaxOccurs="unbounded">           <xs:elementname="A"type="xs:string" />           <xs:elementname="B"type="xs:string" />           <xs:elementname="C"type="xs:string"minOccurs="0" />         </xs:sequence>       </xs:sequence>     </xs:complexType>  </xs:element> </xs:schema> And here’s corresponding XML instance document: <ns0:RepeatingSequenceGroupsxmlns:ns0="NS-Schema1">  <A>A1</A>  <B>B1</B>  <C>C1</C>  <A>A2</A>  <B>B2</B>  <A>A3</A>  <B>B3</B>  <C>C3</C> </ns0:RepeatingSequenceGroups> As you can see elements A, B, and C are children of anonymous xs:sequence element which in turn can be repeated N times. Let’s say we need do simple mapping to the schema with similar structure but with different element names: <ns0:Destinationxmlns:ns0="NS-Schema2">  <Alpha>A1</Alpha>  <Beta>B1</Beta>  <Gamma>C1</Gamma>  <Alpha>A2</Alpha>  <Beta>B2</Beta>  <Gamma>C2</Gamma> </ns0:Destination> The basic map for such typical task would look pretty straightforward: If we test this map without any modification it will produce following result: <ns0:Destinationxmlns:ns0="NS-Schema2">  <Alpha>A1</Alpha>  <Alpha>A2</Alpha>  <Alpha>A3</Alpha>  <Beta>B1</Beta>  <Beta>B2</Beta>  <Beta>B3</Beta>  <Gamma>C1</Gamma>  <Gamma>C3</Gamma> </ns0:Destination> The original order of the elements inside sequence is lost and that’s not what we want. Default behavior of the BizTalk 2009 and 2010 Map Editor is to generate compatible map with older versions that did not have ability to preserve sequence order. To enable this feature simply open map file (*.btm) in text/xml editor and find attribute PreserveSequenceOrder of the root <mapsource> element. Set its value to Yes and re-test the map: <ns0:Destinationxmlns:ns0="NS-Schema2">  <Alpha>A1</Alpha>  <Beta>B1</Beta>  <Gamma>C1</Gamma>  <Alpha>A2</Alpha>  <Beta>B2</Beta>  <Alpha>A3</Alpha>  <Beta>B3</Beta>  <Gamma>C3</Gamma> </ns0:Destination> The result is as expected – all corresponding elements are in the same order as in the source document. Under the hood it is achieved by using one common xsl:for-each statement that pulls all elements in original order (rather than using individual for-each statement per element name in default mode) and xsl:if statements to test current element in the loop:  <xsl:templatematch="/s0:RepeatingSequenceGroups">     <ns0:Destination>       <xsl:for-eachselect="A|B|C">         <xsl:iftest="local-name()='A'">           <Alpha>             <xsl:value-ofselect="./text()" />           </Alpha>         </xsl:if>         <xsl:iftest="local-name()='B'">           <Beta>             <xsl:value-ofselect="./text()" />           </Beta>         </xsl:if>         <xsl:iftest="local-name()='C'">           <Gamma>             <xsl:value-ofselect="./text()" />           </Gamma>         </xsl:if>       </xsl:for-each>     </ns0:Destination>  </xsl:template> BizTalk Map editor became smarter so learn and use this lesser known feature of XSLT 2.0 in your maps and XSL stylesheets.

    Read the article

  • Split or individually edit repeating Google Calendar events

    - by Steve Crane
    Our company just moved from Microsoft Exchange with Outlook to Google Mail, Calendar, etc. and I am trying to modify a calendar event where it repeats, but the times across the days are not the same. I created an event from 10h00 to 16h30 and made it repeat for two days. Now the times need to be adjusted independently for the two days. I could just cancel the repeat and book a new appointment for the second day but the event has a confirmed room booking and with rooms at a premium I worry that someone else may grab the room before I can create the new second day event. Outlook had a way to modify repeating events individually but I'm not seeing anything like that in the Google Calendar web client. So my question is whether there is a way to individually edit repeating events, or failing that, to split the repeating event into individual ones?

    Read the article

  • BizTalk: Repeating structures with the Table Looping and Tab

    How to use the Table looping functoid in conjunction with the Table extractor functoid.  read moreBy BiZTech KnowDid 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

  • Hybrid wireless network repeating

    - by Oli
    Summary: I'd like to use two Ubuntu computers to extend/compliment an existing wireless access point. I have a network which currently looks a bit like this: What the diagram doesn't show is the interference caused by our house. It's a wifi-blocking robot sent here from the past. The two wired computers are in areas where the signal is most blocked (not by design, just a happy co-incidence). Both wired computers have fairly good network cards. They're both Ubuntu machines and I would like to turn them into additional base stations. I know I could throw more networking hardware at this (network extenders or cable in additional, pure wireless access points) but I've got two Linux machines sitting in ideal places and I feel like they should be able to help me out. I've tried ad-hoc networks but I need something that is a lot more transparent (eg you can migrate from base to base without a connection dropping); it should look like one network to clients.

    Read the article

  • Repeating keywords in inbound links

    - by JJ_Jason
    Hy. I have a service similar to bit.ly. The link generation method is similar but the site is not. A user uses my site just like the mentioned bit.ly, but i offer a differnet kind of service for which i would want to rank (on Google) for. If i were to generate links such as: mysite.com/my-keywords/1Asdf34 would it be considered spammy or black hat? The same for bit.ly would be: bit.ly/url-shortening-services/3k1dS4sd For bit.ly it would defeat the purpose, but url length in my case does not have to be short.

    Read the article

  • crippling repeating "pciehp card not present" notifications

    - by Nanne
    When using ubuntu (12.04, both installed and on a live usb) I get a lot of these messages: pciehp 0000:00:1c.5:pcie04: Card not present on Slot(37) pciehp 0000:00:1c.5:pcie04: Card present on Slot(37) And with a lot I mean about 20 per second. This has a crippling effect, and I would like to get rid of it :) The computer is a packard bell easynote BG48-U-100 DC. I tip I picked up from some fedora/redhat error here was to look at lspci -vnn. I have pasted the part about "00:1c.5" here: http://pastebin.com/0sfsiqW2 For what good it may do, here is the lsmod of my machine: http://pastebin.com/DQZy1kAL From that first pastebin I think to conclude that it has to do with the module shpchp, which seems to me (aka: google) to have something to do with ACPI. That's as far as I've come in disecting this. Can anyone help me along further? What can I do, check etc? I did see this topic but my intentions are not to surpress the error message: I know how to do this (from that topic ;) ), but I'm looking for a real sollution. Finding the problem on the internet does suspect me to believe it is neither an ubuntu specific nor a packard-bell specific problem.If you google the problem it seems that is present on several other distribution/hardware combo's as well, and it looks like the advice is to remove one of the drivers? I have no clue as to which driver I should look at and and what would be the effect of just removing it. I have seen this topic which is old-ish, but describes my problem and is about a similar computer. The solution in this topic was to compile a new kernel using a spanish guide, which seems a bit extreme to me, so I'm kinda hoping for a better solution than that.

    Read the article

  • return first non repeating character in a string

    - by Amm Sokun
    I had to solve this question in which given a string, i had to return the first non repeating character present in the string. I solved it using hashtable and wrote a method which takes a constant reference to the string and returns the first non repeating character. However, when there is no non repeating character present in the string, i return -1 and in the main program i check as follows char c = firstNonRepeating( word ); if (static_cast<int> (c) == -1) cout<<"no non repeating character present\n"; else cout<<c<<endl; is that the correct way to return -1 when required character is not present?

    Read the article

  • How to best handle exception to repeating calendar events

    - by blcArmadillo
    I'm working on a project that will require me to implement a calendar. I'm trying to come up with a system that is very flexible: can handle repeating events, exceptions to repeats, etc. I've looked at the schema for applications like iCal, Lotus Notes, and Mozilla to get an idea of how to go about implementing such a system. Currently I'm having trouble deciding what is the best way to handle exceptions to repeating events. I've used databases quite a bit but don't have a ton of experience with really optimizing everything so I'm not sure which method of the two I'm considering would be optimal in terms of overall performance and ability to query/search: Breaking the repeating event. So taking the changing the ending date on the current row for the repeating event, inserting a new row with the exception, and adding another row continuing the old sequence. Simply adding an exception. So adding a new row with some field that indicates it as an override. So here is why I can't decide. Method one will result in a lot more rows since each edit requires 2 extra rows as apposed to only one row by the second method. On the other hand I think the query to find an event would be much simper, and thus possibly faster(?) using the first method. The second method seems like it will require more calculating on the application server since once you get the data you'll have to remove the intersection of the two rows. I know databases are often the bottleneck for websites and while I'm sure a lot of you are thinking either is fine because your project will probably never get large enough for the difference in efficiency to really matter, I'd still like to implement the best solution. So what method would you guys pick, or would you do something completely different? Also, as a side note I'll be using MySQL and PHP. If there is another technology that you think would be better suited for this, especially in the database area, please mention it. Thanks for the advice.

    Read the article

  • InfoPath Repeating Group with Data from SharePoint and User Input

    - by 0x808080
    I have a series of questions which are pulled from a SharePoint list and loaded into a repeating section. The section has three elements, the Question # (from SharePoint), and Question itself (from SharePoint), and a drop down box Yes/No (NOT from SharePoint)... The repeating group portion works just fine, it is pulling all Question # and Questions from the SharePoint site, but I cannot bind the drop down box (yes/no) to any sort of local data source in order to record the information. Essentially what I have is a dynamically generated form which pulls questions off a SharePoint and a user will answer Yes or No for each question. I cannot associate the Yes/No drop down with anything because it resides within a Repeating section... Thanks for any help!

    Read the article

  • Repeating random variables in VBA

    - by Soo
    How can I use randomize and rnd to get a repeating list of random variables? By repeating list, I mean if you run a loop to get 10 random numbers, each random number in the list will be unique. In addition, if you were to run this sequence again, you would get the same 10 random numbers as before.

    Read the article

  • Wireless Repeating with Netgear N750 (WNDR4300)

    - by jomo1911
    I have a Netgear N750 as my main router, which connects to the internet via a modem. I have a second Netgear N750 which I want to use to repeat the wireless signal of the main router. I logged in to routerlogin of my main router (192.168.1.1) and set up the "Wireless Repeating Function". I set it as the "Wireless Base Station" and filled in the MAC adress of my second Netgear N750. Then I logged in to routerlogn of my second router and set it up as the "Wireless Repeater", I gave it the IP 192.168.1.11 and filled in the MAC adress of the base station. During the setup of the second router (Repeater) I had to disable all security functions. If I connect to the repeaters' WLAN signal, I get no internet connection. Maybe you can help me, thanks

    Read the article

  • Wireless Repeating with two Netgear N750 (WNDR4300)

    - by jomo1911
    I have a Netgear N750 as my main router, which connects to the internet via a modem. I have a second Netgear N750 which I want to use to repeat the wireless signal of the main router. I logged in to routerlogin of my main router (192.168.1.1) and set up the "Wireless Repeating Function". I set it as the "Wireless Base Station" and filled in the MAC adress of my second Netgear N750. Then I logged in to routerlogin of my second router and set it up as the "Wireless Repeater", I gave it the IP 192.168.1.11 and filled in the MAC adress of the base station. During the setup of the second router (Repeater) I had to disable all security functions. If I connect to the repeaters' WLAN signal, I get no internet connection. Maybe you can help me, thanks

    Read the article

  • convert a repeating code to method

    - by Mr_Green
    In my project, I am adding ComboBox, Text, Link label to my DataGridView dgvMain.I have created different methods for different cell templates as shown below: (The code below is working) gridLnklbl(string headerName) DataGridViewLinkColumn col = new DataGridViewLinkColumn(); col.HeaderText = headerName; // col.Name = "col" + headerName; // same code repeating to all the methods dgvMain.Columns.Add(col); // gridCmb(string headerName) DataGridViewComboBoxColumn col = new DataGridViewComboBoxColumn(); col.HeaderText = headerName; col.Name = "col" + headerName; dgvMain.Columns.Add(col); gridText(string headerName) DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn(); col.HeaderText = headerName; col.Name = "col" + headerName; dgvMain.Columns.Add(col); As you can see, except the declaration of objects, the code for every method is repeating. Just curious to know, can the repeating code be converted to single method? I dont know how to do that.. Its not about 3 codes of line, I have written many more lines which can be make common to those methods.

    Read the article

  • VMware server 2.0 SYN/ACK repeating issues

    - by user65579
    VMWare Server 2.0.0 Build 122956 I am having some issues with connecting into a guest VM (Ubuntu linux 4.4.3-4 lucid) running under VMware 2.0 on a windows server host. All connections to and from the VM's work fine, except for FTP. I thought the issue was the FTP daemon at first but it has been ruled out that it is not the daemon or the server itself. When you try to connect to the FTP server from outside of the host OS it fails with a "421 Service not available" but when you try and connect from the local VM or from the host OS the connection goes through fine. I have ran many packet sniffs using wireshark/tcpdump from the VM, the host OS, and the client connecting, the most informative is the host OS. I have attached a PNG of the relavant packets that were captured. I viewed some other network traffic that was sniffed (WWW specifically) and it seems to do the same syn/ack repeating but the user doesnt see any issues. I have disabled the firewall and the issues persisits, I have tried with specific allow rules to ensure the data is allowed and no changes. It appears like VMware attempts to do the ICMP redirect and it works, but then it vmware repeats the packets sent so you get 3 syn/ack's for every one syn from the client. Also VMWare appears to be attempting to establish an FTP connection between the HOST OS and the GUEST OS, because I see the second SYN sent from the HOST OS to the GUEST to initiate a new connection, and it get the appropriate SYN/ACK followed by an ACK, but the client never sees any of this from its end. EG. syn from client syn/ack from host OS to client syn/ack from guest OS to client syn/ack from host OS to client The same thing happens when the connection reset is attempted, RST's start being sent and repeated, the server responds with a valid header to continue the FTP handshake but the RST acknowledgement is allready issued and things are closed. I am not 100% if this is a bug in VMware or possibly a VMNetwork missconfiguration. Does anyone have any thoughts on where exactly the issue could be, things to try to verify or rule out? I have linked to a picture of the relevant packets sniffed from the host OS. http://img18.imageshack.us/img18/7789/vmwareftpconnection.jpg

    Read the article

  • how to avoid repeating code?

    - by helloWorld
    I have some technical question, I have repeating code in my work, and I want to get rid of it, so I know that in C++ it is not good idea to use macro, but instead I must use inline function, is it good idea to use this function as inline: list<Data>::iterator foo(int data){ if(dataExists(data)){ list<Data>::iterator i; for(i = Data.begin(); i != Data.end(); ++i){ if(i->getData() == data){ break; } return i; //here I have one more problem, what can I return if data doesn't exist? } I'm beginner, and I think that this function is very unsafe, can somebody please give me advice, how can I improve my code, thanks in advance P.S. what usually do You use to avoid repeating code?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >