Search Results

Search found 2562 results on 103 pages for 'angularjs ng repeat'.

Page 9/103 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Monitor a log file on Linux and send each line to another program

    - by mlambie
    I run an apt-cacher-ng server on Ubuntu Linux which writes logs in the following format: 1299745593|O|149406|XXX.XXX.XXX.XXX|uburep/pool/main/t/tiff/libtiff4_3.9.2-2ubuntu0.4_amd64.deb 1299745593|O|10154976|XXX.XXX.XXX.XXX|uburep/pool/main/l/linux-firmware/linux-firmware_1.34.4_all.deb 1299748529|O|39368|XXX.XXX.XXX.XXX|uburep/pool/main/n/nagios-nrpe/nagios-nrpe-server_2.12-4ubuntu1_amd64.deb 1300155440|O|680100|XXX.XXX.XXX.XXX|uburep/pool/main/t/tzdata/tzdata_2011c-0ubuntu0.10.04_all.deb It shows the timestamp, direction (in or out), byte count, IP and filename. Every time a line is written to it, I'd like to also send that line to another program. I will have this program insert the line into a database so that I can crunch some statistics about how much bandwidth we're saving through operating a caching server. I do not want to cat the log file every X minutes (via cron) looking for new entries as it'd be somewhat computationally uneconomical. Instead I'd prefer to have a daemon monitor the log, and when a change is detected, each line is sent to my database-insertion script. Will swatch achieve this, or are there better options?

    Read the article

  • Adding to database. No repeat on refresh

    - by kevstarlive
    I have this code: Episode.php <?$feedback = new feedback; $articles = $feedback->fetch_all(); if (isset($_POST['name'], $_POST['post'])) { $cast = $_GET['id']; $name = $_POST['name']; $email = $_POST['email']; $post = nl2br ($_POST['post']); $ipaddress = $_SERVER['REMOTE_ADDR']; if (empty($name) or empty($post)) { $error = 'All Fields Are Required!'; }else{ $query = $pdo->prepare('INSERT INTO comments (cast, name, email, post, ipaddress) VALUES(?, ?, ?, ?, ?)'); $query->bindValue(1, $cast); $query->bindValue(2, $name); $query->bindValue(3, $email); $query->bindValue(4, $post); $query->bindValue(5, $ipaddress); $query->execute(); } }?> <div align="center"> <strong>Give us your feedback?</strong><br /><br /> <?php if (isset($error)) { ?> <small style="color:#aa0000;"><?php echo $error; ?></small><br /><br /> <?php } ?> <form action="episode.php?id=<?php echo $data['cast_id']; ?>" method="post" autocomplete="off" enctype="multipart/form-data"> <input type="text" name="name" placeholder="Name" /> / <input type="text" name="email" placeholder="Email" /><small style="color:#aa0000;">*</small><br /><br /> <textarea rows="10" cols="50" name="post" placeholder="Comment"></textarea><br /><br /> <input type="submit" onclick="myFunction()" value="Add Comment" /> <br /><br /> <small style="color:#aa0000;">* <b>Email will not be displayed publicly</b></small><br /> </form> </div> Include.php class feedback { public function fetch_all(){ global $pdo; $query = $pdo->prepare("SELECT * FROM comments"); $query->bindValue(1, $cast); $query->execute(); return $query->fetchAll(); } } This code updates to the database as it is suppose to. But after submission it reloads the current page as mentioned in the form action. But when I refresh the page to see the comment being added it asks to re submit. If I hit submit then the comment adds again. How can I stop this from happening? Maybe I could hide the comment box and display a thank you message but that would not stop a repeat entry. Please help. Thank you. Kev

    Read the article

  • Background repat in Flex 3

    - by Tom
    Hello everybody, I am trying to set a background to a canvas, and set an repeat-x on it. But anything I try don't work. I am using this code: <mx:Style> Canvas.topbar { borderColor: yellow; alpha: 1.0; backgroundImage: url('../assets/images/header.png'); backgroundRepeat: x-repeat; } </mx:Style> <mx:Canvas height="25" top="0" left="0" right="0" styleName="topbar"> <mx:Label x="2" y="4" text="{system_name} {system_version}" height="15"/> </mx:Canvas> But it won't work:( What is wrong with the code?

    Read the article

  • Third party library not working with angular js

    - by sarvesh
    I am using navgoco.js and angular js in an application and I have following html <div id="demo"> <ul > <li ng-repeat ... > <a href="#"> ... </a> ...... </li> </ul> </div> js code $j("#demo1").navgoco({accordion: false}); It is supposed to do some expand-collapse of menus. the problem is that navgoco events are not performing on clicking on anchor. It simply adds # to url. In the rendered html of anchor tag, anuglar is adding ng-binding that may be the problem. Please help.

    Read the article

  • Whar parts of functionality should be refactored into a directive? [AngularJS]

    - by Sprottenwels
    I am creating an application from legacy code using AngularJS. I wonder what parts of my code should be moved into a directive. For example, i had thought of moving a table which is used multiple times across the application into a directive. The tables alter from headings and size. Is it worth the effort or even a good practice to turn such things into their own directives or should i create each table in a unique way?

    Read the article

  • Regex to repeat a capture across a CDL?

    - by richardtallent
    I have some data in this form: @"Managers Alice, Bob, Charlie Supervisors Don, Edward, Francis" I need a flat output like this: @"Managers Alice Managers Bob Managers Charlie Supervisors Don Supervisors Edward Supervisors Francis" The actual "job title" above could be any single word, there's no discrete list to work from. Replacing the ,  with \r\n is easy enough, as is the first replacement: Replace (^|\r\n)(\S+\s)([^,\r\n]*),\s With $1$2$3\r\n$2 But capturing the other names and applying the same prefix is what is eluding me today. Any suggestions?

    Read the article

  • IE8 ignoring background "no-repeat" value

    - by Simon Gibbs
    I have a page that uses a background image to do rounded corners, and in IE8 on Windows XP the background image repeats. http://j.mp/c5h1Hf It looks right in other browsers and even in "Compatability View" in IE8. Does anyone know how to remove the repetion? I'm stumped!

    Read the article

  • Preventing multiple repeat selection of synchronized Controls ?

    - by BillW
    The working code sample here synchronizes (single) selection in a TreeView, ListView, and ComboBox via the use of lambda expressions in a dictionary where the Key in the dictionary is a Control, and the Value of each Key is an Action<int. Where I am stuck is that I am getting multiple repetitions of execution of the code that sets the selection in the various controls in a way that's unexpected : it's not recursing : there's no StackOverFlow error happening; but, I would like to figure out why the current strategy for preventing multiple selection of the same controls is not working. Perhaps the real problem here is distinguishing between a selection update triggered by the end-user and a selection update triggered by the code that synchronizes the other controls ? Note: I've been experimenting with using Delegates, and forms of Delegates like Action<T>, to insert executable code in Dictionaries : I "learn best" by posing programming "challenges" to myself, and implementing them, as well as studying, at the same time, the "golden words" of luminaries like Skeet, McDonald, Liberty, Troelsen, Sells, Richter. Note: Appended to this question/code, for "deep background," is a statement of how I used to do things in pre C#3.0 days where it seemed like I did need to use explicit measures to prevent recursion when synchronizing selection. Code : Assume a WinForms standard TreeView, ListView, ComboBox, all with the same identical set of entries (i.e., the TreeView has only root nodes; the ListView, in Details View, has one Column). private Dictionary<Control, Action<int>> ControlToAction = new Dictionary<Control, Action<int>>(); private void Form1_Load(object sender, EventArgs e) { // add the Controls to be synchronized to the Dictionary // with appropriate Action<int> lambda expressions ControlToAction.Add(treeView1, (i => { treeView1.SelectedNode = treeView1.Nodes[i]; })); ControlToAction.Add(listView1, (i => { listView1.Items[i].Selected = true; })); ControlToAction.Add(comboBox1, (i => { comboBox1.SelectedIndex = i; })); } private void synchronizeSelection(int i, Control currentControl) { foreach(Control theControl in ControlToAction.Keys) { // skip the 'current control' if (theControl == currentControl) continue; // for debugging only Console.WriteLine(theControl.Name + " synchronized"); // execute the Action<int> associated with the Control ControlToAction[theControl](i); } } private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { synchronizeSelection(e.Node.Index, treeView1); } private void listView1_SelectedIndexChanged(object sender, EventArgs e) { // weed out ListView SelectedIndexChanged firing // with SelectedIndices having a Count of #0 if (listView1.SelectedIndices.Count > 0) { synchronizeSelection(listView1.SelectedIndices[0], listView1); } } private void comboBox1_SelectedValueChanged(object sender, EventArgs e) { if (comboBox1.SelectedIndex > -1) { synchronizeSelection(comboBox1.SelectedIndex, comboBox1); } } background : pre C# 3.0 Seems like, back in pre C# 3.0 days, I was always using a boolean flag to prevent recursion when multiple controls were updated. For example, I'd typically have code like this for synchronizing a TreeView and ListView : assuming each Item in the ListView was synchronized with a root-level node of the TreeView via a common index : // assume ListView is in 'Details View,' has a single column, // MultiSelect = false // FullRowSelect = true // HideSelection = false; // assume TreeView // HideSelection = false // FullRowSelect = true // form scoped variable private bool dontRecurse = false; private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if(dontRecurse) return; dontRecurse = true; listView1.Items[e.Node.Index].Selected = true; dontRecurse = false; } private void listView1_SelectedIndexChanged(object sender, EventArgs e) { if(dontRecurse) return // weed out ListView SelectedIndexChanged firing // with SelectedIndices having a Count of #0 if (listView1.SelectedIndices.Count > 0) { dontRecurse = true; treeView1.SelectedNode = treeView1.Nodes[listView1.SelectedIndices[0]]; dontRecurse = false; } } Then it seems, somewhere around FrameWork 3~3.5, I could get rid of the code to suppress recursion, and there was was no recursion (at least not when synchronizing a TreeView and a ListView). By that time it had become a "habit" to use a boolean flag to prevent recursion, and that may have had to do with using a certain third party control.

    Read the article

  • jquery repeat process once get reply from php file

    - by air
    i have one php file which process adding of record in Database fro array. for example in array i have 5 items aray an='abc','xyz','ert','wer','oiu' i want to call one php file in j query ajax method um = an.split(','); var counter = 0; if(counter < uemail.length) { $("#sending_count").html("Processing Record "+ ecounter +" of " + an.length); var data = {uid: um[counter] $.ajax({ type: "POST", url: "save.php", data: data, success: function(html){ echo "added"; counter++; } what it do, it complete all the prcess but save.php is still working what i want after one process it stop untill process of save.php complete then it wait for next 10 sec and start adding of 2nd element. Thanks

    Read the article

  • Regex to check that a character in range doesn't repeat

    - by Aly
    Hi, I want to match against Strings such as AhKs & AdKs (i.e. two cards Ah = Ace of Hearts). I want to match two off-suit cards with a regex, what I currently have is "^[AKQJT2-9][hscd]{2}$", but this could match hands such as AhKh (suited) and AhAh. Is there a way to possibly use backreferences to say the second [hscd] cannot be the same as the firs (similarly for [AKQJT2-9])

    Read the article

  • Random Pairings that don't Repeat

    - by Andrew Robinson
    This little project / problem came out of left field for me. Hoping someone can help me here. I have some rough ideas but I am sure (or at least I hope) a simple, fairly efficient solution exists. Thanks in advance.... pseudo code is fine. I generally work in .NET / C# if that sheds any light on your solution. Given: A pool of n individuals that will be meeting on a regular basis. I need to form pairs that have not previously meet. The pool of individuals will slowly change over time. For the purposes of pairing, (A & B) and (B & A) constitute the same pair. The history of previous pairings is maintained. For the purpose of the problem, assume an even number of individuals. For each meeting (collection of pairs) and individual will only pair up once. Is there an algorithm that will allow us to form these pairs? Ideally something better than just ordering the pairs in a random order, generating pairings and then checking against the history of previous pairings. In general, randomness within the pairing is ok.

    Read the article

  • How to repeat a particular execution multiple times

    - by Joshua
    The following snippet generates create / drop sql for a particular database, whenever there is a modification to JPA entity classes. How do I perform something equivalent of a 'for' operation where-in the following code can be used to generate sql for all supported databases (e.g. H2, MySQL, Postgres) Currently I have to modify db.groupId, db.artifactId, db.driver.version everytime to generate the sql files <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>hibernate3-maven-plugin</artifactId> <version>${hibernate3-maven-plugin.version}</version> <executions> <execution> <id>create schema</id> <phase>process-test-resources</phase> <goals> <goal>hbm2ddl</goal> </goals> <configuration> <componentProperties> <persistenceunit>${app.module}</persistenceunit> <drop>false</drop> <create>true</create> <outputfilename>${app.sql}-create.sql</outputfilename> </componentProperties> </configuration> </execution> <execution> <id>drop schema</id> <phase>process-test-resources</phase> <goals> <goal>hbm2ddl</goal> </goals> <configuration> <componentProperties> <persistenceunit>${app.module}</persistenceunit> <drop>true</drop> <create>false</create> <outputfilename>${app.sql}-drop.sql</outputfilename> </componentProperties> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>${hibernate-core.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j-api.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-nop</artifactId> <version>${slf4j-nop.version}</version> </dependency> <dependency> <groupId>${db.groupId}</groupId> <artifactId>${db.artifactId}</artifactId> <version>${db.driver.version}</version> </dependency> </dependencies> <configuration> <components> <component> <name>hbm2cfgxml</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2dao</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2ddl</name> <implementation>jpaconfiguration</implementation> <outputDirectory>src/main/sql</outputDirectory> </component> <component> <name>hbm2doc</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2hbmxml</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2java</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2template</name> <implementation>annotationconfiguration</implementation> </component> </components> </configuration> </plugin>

    Read the article

  • Java the little console game won't repeat?

    - by Jony Kale
    Okay, what I have so far is: You enter the game, and write "spin" to the console. Program will enter the while loop. In the while loop, if entered int is -1, return to the back (Set console input back to "", and let the user select what game he would like to play). Problem: Instead of going back, and selecting "spin" again, the program exits? Why is it happening? How can I fix this? private static Scanner console = new Scanner(System.in); private static Spin spin = new Spin(); private static String inputS = ""; private static int inputI = 0; private static String[] gamesArray = new String[] {"spin", "tof"}; private static boolean spinWheel = false; private static boolean tof = false; public static void main (String[] args) { if (inputS.equals("")) { System.out.println("Welcome to the system!"); System.out.print("Please select a game: "); inputS = console.nextLine(); } while (inputS.equals("spin")) { System.out.println("Welcome to the spin game! Please write 1 to spin. and -1 to exit back"); inputI = console.nextInt(); switch (inputI) { case 1: break; case -1: inputI = 0; inputS = ""; break; } } }

    Read the article

  • Loop append div and repeat

    - by Diego Vieira
    I have this code <div class="round-3-top"> <div class="round-2-top"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> <div class="round-2-bottom"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> </div> <div class="round-3-bottom"> <div class="round-2-top"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> <div class="round-2-bottom"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> </div> But i want generate dynamically, how i do that? Ex.: i have 4 rounds, this would be the generated code <div class="round-4-top"> <div class="round-3-top"> <div class="round-2-top"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> <div class="round-2-bottom"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> </div> <div class="round-3-bottom"> <div class="round-2-top"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> <div class="round-2-bottom"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> </div> </div> <div class="round-4-bottom"> <div class="round-3-top"> <div class="round-2-top"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> <div class="round-2-bottom"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> </div> <div class="round-3-bottom"> <div class="round-2-top"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> <div class="round-2-bottom"> <div class="round-1-top"></div> <div class="round-1-bottom"></div> </div> </div> </div> I try using TagBuilder in MVC C# but I can not do. What should happen is, if you are 3 rounds, adding he should go inside each div is like the example above. Any idea how can I develop it?

    Read the article

  • Random directions, with no repeat.. (Bad Description)

    - by Neurofluxation
    Hey there, So I'm knocking together a random pattern generation thing. My code so far: int permutes = 100; int y = 31; int x = 63; while (permutes > 0) { int rndTurn = random(1, 4); if (rndTurn == 1) { y = y - 1; } //go up if (rndTurn == 2) { y = y + 1; } //go down if (rndTurn == 3) { x = x - 1; } //go right if (rndTurn == 4) { x = x + 1; } //go left setP(x, y, 1); delay(250); } My question is, how would I go about getting the code to not go back on itself? e.g. The code says "Go Left" but the next loop through it says "Go Right", how can I stop this? NOTE: setP turns a specific pixel on. Cheers peoples!

    Read the article

  • make javascript repeat for each row in a view

    - by Kathy Chavez
    I have created a view in Drupal. I"m using javascript to modify css in each row. The script runs on the first row, but does not make the changes on the rest of rows from the view. This is the script: <script language="javascript" type="text/javascript"> window.onload = floatbr; function floatbr() { var f = document.getElementById('firstright') // Get div element var s = document.getElementById('secondright') // Get div element var w = document.getElementById('catwrapper') // Get div element var sh = s.offsetHeight // secondright div height var wh = w.offsetHeight // catwrapper div height f.style.height = wh - sh + 'px'; } </script> I'm using it from this page: http://agsone.100webcustomers.com/floatbottom.php having the script in the page once does not do the trick. having the script in the view footer and repeating the script does not work. THanks! link to fiddle with html, css & js: http://jsfiddle.net/Vvjku/

    Read the article

  • Python: Repeat elements in a list comprehension?

    - by User
    I have the following list comprehension which returns a list of coordinate objects for each location. coordinate_list = [Coordinates(location.latitude, location.longitude) for location in locations] This works. Now suppose the location object has a number_of_times member. I want a list comprehension to generate n Coordinate objects where n is the number_of_times for the particular location. So if a location has number_of_times = 5 then the coordinates for that location will be repeated 5 times in the list. (Maybe this is a case for a for-loop but I'm curious if it can be done via list comprehensions)

    Read the article

  • Android - Looping Activity to Repeat MediaPlayer

    - by Austin Anderson
    I'm trying to create a soundboard for longer audio files and can't figure out how to stop an audio file and start it again without closing the activity. Let's say each audio file is one minute long. If I play the first audio file for 20 seconds and start the next audio file, the first stops playing and the second starts playing. However, if I click the first audio file again, the second stops playing and the first does not. I need help. This is driving me insane. bAudio1 = (ImageButton) findViewById(R.id.bAudio1); bAudio2 = (ImageButton) findViewById(R.id.bAudio2); mpAudio1 = MediaPlayer.create(this, R.raw.audio1); mpAudio2 = MediaPlayer.create(this, R.raw.audio2); bAudio1.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(mpAudio1.isPlaying()) { mpAudio1.stop(); } else { if(mpAudio2.isPlaying()) { mpAudio2.stop(); } mpAudio1.start(); } } }); bAudio2.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(mpAudio2.isPlaying()) { mpAudio2.stop(); } else { if(mpAudio1.isPlaying()) { mpAudio1.stop(); } mpAudio2.start(); } } }); Thanks.

    Read the article

  • how to repeat alarm week day on in android

    - by user1662296
    I want to get alarm on monday to friday only. my code is here if (chk_weekday.isChecked()) { int day = calNow.get(Calendar.DAY_OF_WEEK); if (day == 2 || day == 3 || day == 4 || day == 5 || day == 6) { alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calSet.getTimeInMillis(), 1 * 60 * 60 * 1000, pendingIntent); } Have a Idea.

    Read the article

  • Jquery and Fancybox repeat Gallery

    - by ron
    HI everyone I hope you can help me, I have a problem with a requirement, I need to make a list of images that go to cycle. I have this website, here I have some business cards and I need the images to be repeated after the end of the first cycle and continue like a loop. here I leave the website, look that the list has a final. http://tradelinks.com.au/index.php?service=painters Thanks in Advance

    Read the article

  • Repeat Customers Each Year (Retention)

    - by spazzie
    I've been working on this and I don't think I'm doing it right. |D Our database doesn't keep track of how many customers we retain so we looked for an alternate method. It's outlined in this article. It suggests you have this table to fill in: Year Number of Customers Number of customers Retained in 2009 Percent (%) Retained in 2009 Number of customers Retained in 2010 Percent (%) Retained in 2010 .... 2008 2009 2010 2011 2012 Total The table would go out to 2012 in the headers. I'm just saving space. It tells you to find the total number of customers you had in your starting year. To do this, I used this query since our starting year is 2008: select YEAR(OrderDate) as 'Year', COUNT(distinct(billemail)) as Customers from dbo.tblOrder where OrderDate >= '2008-01-01' and OrderDate <= '2008-12-31' group by YEAR(OrderDate) At the moment we just differentiate our customers by email address. Then you have to search for the same names of customers who purchased again in later years (ours are 2009, 10, 11, and 12). I came up with this. It should find people who purchased in both 2008 and 2009. SELECT YEAR(OrderDate) as 'Year',COUNT(distinct(billemail)) as Customers FROM dbo.tblOrder o with (nolock) WHERE o.BillEmail IN (SELECT DISTINCT o1.BillEmail FROM dbo.tblOrder o1 with (nolock) WHERE o1.OrderDate BETWEEN '2008-1-1' AND '2009-1-1') AND o.BillEmail IN (SELECT DISTINCT o2.BillEmail FROM dbo.tblOrder o2 with (nolock) WHERE o2.OrderDate BETWEEN '2009-1-1' AND '2010-1-1') --AND o.OrderDate BETWEEN '2008-1-1' AND '2013-1-1' AND o.BillEmail NOT LIKE '%@halloweencostumes.com' AND o.BillEmail NOT LIKE '' GROUP BY YEAR(OrderDate) So I'm just finding the customers who purchased in both those years. And then I'm doing an independent query to find those who purchased in 2008 and 2010, then 08 and 11, and then 08 and 12. This one finds 2008 and 2010 purchasers: SELECT YEAR(OrderDate) as 'Year',COUNT(distinct(billemail)) as Customers FROM dbo.tblOrder o with (nolock) WHERE o.BillEmail IN (SELECT DISTINCT o1.BillEmail FROM dbo.tblOrder o1 with (nolock) WHERE o1.OrderDate BETWEEN '2008-1-1' AND '2009-1-1') AND o.BillEmail IN (SELECT DISTINCT o2.BillEmail FROM dbo.tblOrder o2 with (nolock) WHERE o2.OrderDate BETWEEN '2010-1-1' AND '2011-1-1') --AND o.OrderDate BETWEEN '2008-1-1' AND '2013-1-1' AND o.BillEmail NOT LIKE '%@halloweencostumes.com' AND o.BillEmail NOT LIKE '' GROUP BY YEAR(OrderDate) So you see I have a different query for each year comparison. They're all unrelated. So in the end I'm just finding people who bought in 2008 and 2009, and then a potentially different group that bought in 2008 and 2010, and so on. For this to be accurate, do I have to use the same grouping of 2008 buyers each time? So they bought in 2009 and 2010 and 2011, and 2012? This is where I'm worried and not sure how to proceed or even find such data. Any advice would be appreciated! Thanks!

    Read the article

  • Why repeat database constraints in models?

    - by BWelfel
    In a CakePHP application, for unique constraints that are accounted for in the database, what is the benefit of having the same validation checks in the model? I understand the benefit of having JS validation, but I believe this model validation makes an extra trip to the DB. I am 100% sure that certain validations are made in the DB so the model validation would simply be redundant. The only benefit I see is the app recognizing the mistake and adjusting the view for the user accordingly (repopulating the fields and showing error message on the appropriate field; bettering the ux) but this could be achieved if there was a constraint naming convention and so the app could understand what the problem was with the save (existing method to do this now?)

    Read the article

  • How do I repeat function over several row.

    - by ChrisBD
    I'll admit that I'm not an Excel guru so maybe someone here can help me. On my worksheet I have several blocks of data. I calculate the sum of all items within column D of that block. Within each block I am checking the value of the cell in column C and if it contains the letter "y" and the value in column D of that row is equal to zero I must exclude the total sum of column D. Currently I am doing this by multiplying the sum value by either 1 or 0 which is produced by running a test over the cell contents. Below is an example of what I am using to test rows 23 to row 25 inclusively for data in Column D. I am also performing the same on Column E and G, but the "y" character is always in column C, hence the absolut column reference. =IF(AND($C23="y",D23=0),0,1)*IF(AND($C24="y",D24=0),0,1)*IF(AND($C25="y",D25=0),0,1) There must be a more efficient way to do this. Ideally I would like to write a function that I can paste into a cell and then select the rows or cells over which I run the test. Can anyone point me in the right direction?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >