Dim Values As Range Dim CurrentSheet As Worksheet Set CurrentSheet = ActiveWorkbook.ActiveSheet Set Values = Rows(5) For j = 0 To 20 For i = 1 To Values.Cells.Count - 1 Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _ Formula1:="=Delimit2!$A$" & i, Formula2:="=Delimit2!$B$" & i Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority With Selection.FormatConditions(1).Font Color = -16383844 TintAndShade = 0 End With With Selection.FormatConditions(1).Interior PatternColorIndex = xlAutomatic Color = 13551615 intAndShade = 0 End With Next i Next j In this I code, I would like to increment column A to C and B to D after For loop of i gets over.

Member Avatar
+0 forum 0

How to display letters A to P (capital letters) with spaces in between? using assembly language? Requirement: use loop command For 15 lines below :(

Member Avatar
Member Avatar
+0 forum 1

TABLE_ROWS 13 1 8 5 2 3 5 2 7 6 3 4 3 32 my select query results a table like this .Here i want to assign each item to each variables . a=13 b=1 etc... i tried with forech but i did not get out put.Here is my code $sql="SELECT TABLE_ROWS FROM `information_schema`.`tables` WHERE `table_schema` = 'labreport'"; $result= mysql_query($sql); $row = mysql_fetch_row($result); echo $row[0]; echo $row[1];

Member Avatar
Member Avatar
+0 forum 1

I'm having a little brain fart and I just want to double check something ... // Array of [a,b,c,d] $array = array('a', 'b', 'c', 'd'); // Loop through array foreach ($array AS $letter) { // Break out of the loop on a specific condition if ($letter == 'c') { break; } } echo $letter; I just want to double check $letter's scope. $letter exists outside of the foreach loop and retains the value of 'c', right?

Member Avatar
Member Avatar
+0 forum 3

hi, I have an excel sheet and the is a row filled with data the row starts from B5 everytime, what i want to do it to read the values of the cell until the row comes to an empty cell how do i do it, thanks appreciate a reply, thanks

Member Avatar
Member Avatar
+0 forum 13

HI, I am trying to do questions generation system in PHP. I need some idea form all of you, how to shuffle questions and answers from table based on standard, section, subject,difficulty of question (Easy, Medium, High),No of module (Like, choose the best anser, true or false, Explanation ), and Choices for each module, etc, By your ideas only, I am going to do this concept., How to do shuffle the question? Can you tell me with some examples? with some easy logic for shuffling questions?

Member Avatar
Member Avatar
+0 forum 7

Hello i want to retrieve only one row from an mysqli statement. The catch is that i use the `$row=mysqli_fetch_array` in a `while()` to loop the data. But i need a row to run as variable before the while begins This is what i mean $query=mysqli_query($db,"SELECT a_id,a_title,a_desc,a_url,a_img,a_uid,a_times FROM table WHERE status='1' ORDER BY a_id DESC ")or die(mysqli_error($db)); $x=$query->fetchColumn(6) ?> <marquee behavior="scroll" loop="<?php echo $x;?>" scrollamount="4" direction="left" width="100%" height="50px"> <?php while($row=mysqli_fetch_array($query,MYSQLI_ASSOC)) { echo $row['a_url'].$row['a_title']. $row['a_desc']; }?> i want the $x variable to run the marquee but before the while. any suggestions?

Member Avatar
Member Avatar
+0 forum 9

Hi! Im creating individual excel file base on the duedate and client name of a reservation and sending it automatically on that date.but im having a trouble dispalying the SUM/ Grandtotal of each excel summary that i created. the grandtotal inside my while loop is also incrementing. i dont now what i am doing wrong. Example for today i have 4 Client that has a duedate today. and the script automatically generated the excel file summary of each client. Client 1. **7 STONES** ![1.jpg](/attachments/large/3/80865fbd4503de12d4e92f87cb782ca5.jpg "align-center") Client 2. **Your Travel Planner** ![2.jpg](/attachments/large/3/55ec7e0726c5b10a809533a6d9d9a51d.jpg "align-center") Client 3. **ZOEMIE** ![3.jpg](/attachments/large/3/8c4718cc6a98257f7babcbd9193b09f9.jpg "align-center") And the Last …

Member Avatar
Member Avatar
+0 forum 5

Hi Everyone! Can anybody point me to the right direction or check what am i doing wrong. Im trying to export data from php to excel using phpexcel( which is working fine if im am only getting 1 specific record). but when i tried adding a loop to create a workbook im having a problem. the data does not match the actual record from DB this is the script Currently editing: /home/msicph/public_html/sedaatria/demo/toexcel/genexcel.php Encoding: Reopen Switch to Code Editor Close Save <?php error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); date_default_timezone_set('Europe/London'); /** PHPExcel_IOFactory */ require_once dirname(__FILE__) …

Member Avatar
Member Avatar
+0 forum 12

To begin with, I'm a noob to JavaScript. How do I add functionality to the main loop, or something similar?

Member Avatar
Member Avatar
+0 forum 3

Part 2 of exploring/tasting the Swift language takes a look at dictionaries; process flow controls like loops, if/else and switch/case; functions and sorting. I hope I can follow this up with part 3, a closer look at class operations.

Member Avatar
Member Avatar
+2 forum 23

I wasn’t sure which forum to put this under so I just selected web development. I have run into an issue that ironically I have solved before but thanks to my wonderful drop-box the changes I made were not saved and when I changed them again on another computer, the old values were kept so in a sense I lost my progress/solution. Now onto my problem. I have a table that generates buttons to give you the option to approve or decline a user. Now the approve button calls a function that will create a database dynamically by checking to …

Member Avatar
Member Avatar
+0 forum 6

HI again, I would like to know how i would use a loop for the following code, thanks for read this. LV1.Columns.Add(ds.Tables(0).Columns(0).ColumnName, 25) LV1.Columns.Add(ds.Tables(0).Columns(1).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(2).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(3).ColumnName) LV1.Columns.Add(ds.Tables(0).Columns(4).ColumnName) LV1.Columns.Add(ds.Tables(0).Columns(5).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(6).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(7).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(8).ColumnName, 75) LVitem.Text = dt.Rows(0).Item(0).ToString LVitem.SubItems.Add(dt.Rows(0).Item(1).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(2).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(3).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(4).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(5).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(6).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(7).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(8).ToString) i was thinking along the lines of something like this For i As Integer = 0 To dt.Rows.Count - 1 next not sure what to put in the middle.

Member Avatar
Member Avatar
+0 forum 9

Hi I am trying to read the datas from mysql using php in json. but i am not getting my expected output. Please help me to fix the issue. **code** <?php include('../config.php'); //mysql_query("SET NAMES 'utf8'"); $tdate = date('d-m-Y'); $url = 'url'; $sql = "SELECT * FROM pimage where date<='$tdate' and pstatus='Y' ORDER BY id desc"; $result = mysql_query($sql,$conn); $array = array("photoOfDayList"=>array()); while($row = mysql_fetch_array($result )) { $b = array(); $a = array("photoOfDay"=>array()); $a["photoTitle"] = $row['ptitle']; $a["photoId"] = $row['id']; $a["date"] = $row['date']; $a["thumbImg_Phone"] = 'url'.$row['pimage']; $a["thumbImg_Tablet"] = 'url'.$row['pimage']; $a["img_Phone"] = 'url'.$row['pimage']; $a["img_Tablet"] = 'url'.$row['pimage']; $array["photoOfDay"][] = $a; $array["photoOfDayList"][] = $b; } …

Member Avatar
Member Avatar
+0 forum 3

try { File file = new File("/Users/Alex Ting/Desktop/test2/MovieList.xml"); DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = dBuilder.parse(file); NodeList movielist = doc.getElementsByTagName("movie"); for(int i =0;i<movielist.getLength(); i++){ Node m=movielist.item(i); if(m.getNodeType()==Node.ELEMENT_NODE){ Element movie = (Element) m; String movieID = movie.getAttribute("id"); NodeList mnamelist=movie.getChildNodes(); for(int j=0;j<movielist.getLength(); j++){ Node n = mnamelist.item(j); if(n.getNodeType()==Node.ELEMENT_NODE){ Element name = (Element) n; //System.out.println("Movie ID: "+ movieID +"\n"+ name.getTagName()+ ": "+ name.getTextContent()); //System.out.println(name.getTagName()+ ": "+ name.getTextContent()); if(name.getTextContent().equals(smoviename)){ System.out.println("Movie Id :"+movie.getAttribute("id")); System.out.println(name.getTagName()+ ": "+ name.getTextContent()); } } } } } } catch (Exception e) { e.printStackTrace(); } my xml file <?xml version="1.0" encoding="UTF-8" standalone="no"?> <movies> <movie id="1001"> <title>Blackhat</title> <genre>thriller</genre> <duration> 90 mins </duration> …

Member Avatar
Member Avatar
+0 forum 1

Yesterday i completed my exercises on loop , that's why today i've decided to create a tutorial on loop in c++. # Loop # loop allows us to repeat a statement or a group of statements. When we want to repeat a single statement then it is not necessary to put curly braces But if we want to repeat a group of statements then it must be enclosed with curly braces. And it is a good practise to enclosed your loop body with curly braces. c++ has three loop control structures while loop do-while loop for loop # while loop …

Member Avatar
Member Avatar
+7 forum 15

Hi group, I'm attempting to use a variable (i) to read the multiple files within a folder. However this doesn't seem to be working. Can you tell me what I'm doing wrong? For i = 0 To counter Dim objReader As New System.IO.StreamReader(getRestranName(i)) If System.IO.File.Exists(folderName) Then Do While objReader.Peek() <> -1 txtLine = objReader.ReadLine() If lineNo = 3 Then programName = Trim(Microsoft.VisualBasic.Left(txtLine, 10)) In advance, thanks for your help. Don

Member Avatar
Member Avatar
+0 forum 3

I am attempting to convert a C application to python. I am having difficultiy on this particular for loop. Any ideas how I might proceede? bool Enigma2C::encrypt(char *inString, char *outString) { int16 csum = 1, checksum = 0; int16 tmpSum = 0; int16 i = 0; strcpy(m_keyCode, inString); // Calculate and store 2-digit checksum. for (i = 2; i < KEY_LENGTH; i++) { if (isdigit(m_keyCode[i])) { tmpSum = m_keyCode[i] - '0'; } else { tmpSum = m_keyCode[i] - 'A'; } csum += i + tmpSum + (i * tmpSum); printf( "DEBUG> csum: %d\n", csum ); } csum = 100 - …

Member Avatar
Member Avatar
+0 forum 17

Hey guys i need some help.. Here is my code given below + the question statement.. The problem is simple i just wanted to ask what and how i can use variable to calculate average in array questions.. Problem Statement: "Write a program that declares an array of 25 integers and populates the array by reading values from the user (i.e. reads 25 numbers from the user and puts them into the array). Now your program computes and displays the average of all the numbers that are between 10-80." CODE: #include<iostream> #include<conio.h> using namespace std; int main() { int x[25]; …

Member Avatar
Member Avatar
+0 forum 8

Write the nested loop that causes this output below: *It can only use one if statement ( I'm having issues solving it I never solved a nested loop like this one before seriously need some input on how to solve this program) Here is a link the proper image of the problem: https://drive.google.com/file/d/0B4ABEeUJeFbXNmZDNjh6WWRHS0V1SUlRQmwzaFh5RXpzSGk4/view?usp=sharing 1 1 2 2 3 2 3 4 2 3 1 2 1

Member Avatar
Member Avatar
+0 forum 16

Hey guys ..!! so today I was solving another problem involving a loop in it and i'm not sure exactly how to apply that condition to repeat it unless the terminating condition becomes true. I tried to do it on my own but its not working. can anyone of you please tell me how to do it correctly. MY CODE.. #include<iostream> #include<conio.h> using namespace std; int main() { int num; float centigrade, fahrenheit, result; cout<<"Please select from the following options. Press (1 or 2). \n1.Centigrade to Fahrenheit. \n2.Fahrenheit to Centigrade."<<endl; cin>>num; while( num == 1 || num == 2 || …

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I have one simple logical question that I seem not to figure it out, sadly... We have a list of objects and I loop trough them, list of products. We need to create anchor maps for each category, so I did a comparison with temp variables to check the previous and current element value. How can I display only the first occurence of a series of values for each category ? Desired result: Category 1 - product 1 - product 2 - product 3 Category 2 - product 1 - product 2 - product 3 $previous = ''; …

Member Avatar
Member Avatar
+0 forum 2

Hello i want to make to show adds but on every 10th ticket i have tried with for loop but its adding too much adds here is the code: if($is_active == 1 && $is_shared == 1) { for($i=0; $i <= 1; $i++) { echo "<table id='t01' style='margin: 5px;'><tr><th colspan='2'>Publisher: $publisher <img src='like-btn.png' width='21' height='21' style='position: responsive; cursor: pointer; align='right'> 0</img></th></tr>"; echo "<tr><th colspan='2'>Ticket ".$count." | <a style='font-size: 12px;'>Date: ".$date."</a></th></tr>"; echo " <tr><td>".$row["match1"]."</td><td>".$row["tip1"]."</td></tr> <tr><td>".$row["match2"]."</td><td>".$row["tip2"]."</td></tr> <tr><td>".$row["match3"]."</td><td>".$row["tip3"]."</td></tr> <tr><td>".$row["match4"]."</td><td>".$row["tip4"]."</td></tr> <tr><td>".$row["match5"]."</td><td>".$row["tip5"]."</td></tr> <tr><td>".$row["match6"]."</td><td>".$row["tip6"]."</td></tr> <tr><td>".$row["match7"]."</td><td>".$row["tip7"]."</td></tr> <tr><td>".$row["match8"]."</td><td>".$row["tip8"]."</td></tr> <tr><td>".$row["match9"]."</td><td>".$row["tip9"]."</td></tr> <tr><td>".$row["match10"]."</td><td>".$row["tip10"]."</td></tr> <tr><td>".$row["match11"]."</td><td>".$row["tip11"]."</td></tr> <tr><td>".$row["match12"]."</td><td>".$row["tip12"]."</td></tr> <tr><td>".$row["match13"]."</td><td>".$row["tip13"]."</td></tr> <tr><td>".$row["match14"]."</td><td>".$row["tip14"]."</td></tr> <tr><td>".$row["match15"]."</td><td>".$row["tip15"]."</td></tr> <tr><td>".$row["match16"]."</td><td>".$row["tip16"]."</td></tr> "; echo "<tr><th colspan='2'>Total Bet: $uplata_total</th></tr>"; echo "<tr><th colspan='2'>Total Win: $dobivka_total</th></tr>"; echo "<tr><th …

Member Avatar
Member Avatar
+0 forum 4

Hello Guys, I apologized if I may have misplaced this post as I cannot see CURL on any category. Here is my situation. I am trying to create a batch file which will pull up information from a fleet of devices via its web interface. I am using CURL to do that. The output will be 1 file for each device. I created a text file that lists all the IP address of the devices. Below is the command I usedd for just one device: curl http://<IP>/cgi-bin/history > <nameOFfile.txt> Any help will be much appreciated. Thanks.

Member Avatar
Member Avatar
+0 forum 3

I'm a great fan of extensions in C#. See also this previous [snippet](https://www.daniweb.com/software-development/csharp/code/467292/squaring-an-integer-with-extensions). Extensions are really simple to use. Start with adding a static class containing static methods. Note the special use of the keyword `this` in the Times extension method. The next code snip is how you could use this extension, eliminating the use of the for.

Member Avatar
Member Avatar
+0 forum 7

hello, I have trouble with mustache php template engine. I have this: $get2 = mysqli_query($link,"SELECT * FROM users_table"); while($row = mysqli_fetch_assoc($get2)) { $values3 = array('repo' => array( 'name3'=>$row['user_name'], ),); } And in template file i try to catch all with: <select> {{#repo}} <option value="{{ name3 }}">{{ name3 }}</option> {{/repo}} </select> Its shows only first name. I have 2 names in table 'lqlqlq' and 'lqlqlq2', it shows only lqlqlq2. Maybe i dont understand the way to work with while cycles and array's. Can someone with experience with this help me ? PS: I try with {{ . }} too.

Member Avatar
Member Avatar
+0 forum 3

Group, I'm taking a text file that is storing ID numbers in a single column that looks like this: 123 3050 3971 I'm looping through the text file line for line and putting each ID number into a textbox. My question is: Am I writing this code the most efficient way? Here's my code: Dim FILE_NAME As String = "C:\Restran Conversion\RestranFileConversion.txt" Dim objReader As New System.IO.StreamReader(FILE_NAME) Dim txtProps As String Dim i As Integer = 1 If System.IO.File.Exists(FILE_NAME) = True Then Do While objReader.Peek() <> -1 txtProps = objReader.ReadLine() If i = 1 Then prop1 = txtProps End If If …

Member Avatar
Member Avatar
+0 forum 8

Hi, If you look trough my code you can see that i have tried to print out some values (the mean value) with a scanner from a csv file with the help of an enhanced for loop (the absolut last loop) and it gives me NaN (not a number). And i cannot figure out why as i get the values from the file through the loop and everyone says my code looks right. Can anyone help? Did we perhaps miss something? package apelsinenn; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.ArrayList; import …

Member Avatar
Member Avatar
+0 forum 49

I have a program that creates a right triangle from a loop reading "*". I have used the code to complete the first part, but the second part calls for a manipulation to take the current pattern, flip it upside down, and then add it to the first pattern. Here is the code I have so far. Can anyone guide me through how to do the reverse loop, I was thinking another loop and a nested loop within to call the opposite pattern? public static void main (String[] args) { final int LIMIT = 10; for (int row = 1; …

Member Avatar
Member Avatar
+0 forum 15

I am needing to write a program for someone that needs it to count by any number they manually enter into the program. I have the menu code written and now just need help with the counnting code. I know i most likely need to use a "for" loop but after that i am not sure.

Member Avatar
Member Avatar
+0 forum 5

The End.