184 Topics
|
|
I would like to create a loop where it will count down and shift every thing to the right by one postion in the array. for example: array('1a','1b','1c','','','1f') should look like this array('1a','','','1b','1c','1f') Starting from position 5 and counting down.$i-- |
|
I need a program that will return an integers factorial, but only when the number entered is between 0 and 20. I have the code to disregard anything below 0 and above 20, but something with my math and/or syntax is off and I dont fully comprehend how to fix … |
|
Let's say I have an array/arraylist(doesn't matter) with the following content: 2, 2, 2, 4, 5, 5, 8, 8, 8. How wold I go about counting the different values, in other words; how would I find out that there are 3 twos, one 4, 2 fives and 3 eights. How … |
|
<html> <head> <script> var count = 6; var time = setInterval(countdown, 1000); function countdown() { count = count - 1; var cx = document.getElementById("cdown"); if (count < 0) { count = 5 } cx.innerHTML = count; } </script> <body> <p id="cdown">5</p> </body> </html> This is a script for a count … |
|
I'm causing input letters to write ones into variables through an array. I'm trying to count the occurences of ones in a variable. Lets say I input aaaaa. The count output displays 12345. Instead of outputting the whole count of numbers, I want to output the biggest number in the … |
|
i have a listview with subitems namely NAME Age and Position. The positions are Driver, Conductor and Inspector. I have 3 textbox namely CountD, CountC, CountI. What i want is if i Click the Name in the listview where the position is driver, the CountD.text will display 1 and if … |
|
this is a code from the book "the C programming language" by dennis ritchie, but for some reason its not working! #include <stdio.h> #define IN 1 /* inside a word */ #define OUT 0 /* outside a word */ /* count lines, words, and characters in input */ main() { … |
|
I have a Flight Log for a small company. I have been able to figure out most of the needs but 2, using Adobe Acrobat 9 and Javascript. 1. I have a passenger manifest that needs a count...I am having a problem with figuring out the code for the counter … |
|
I need you help in making a query about this table. ------------------------------------ boss # | bet1 | bet2 | bet3 ------------------------------------ LastName |Bet1 |Bet2 | Bet3 11111111 |1 |0 | 1 22222222 |1 |0 | 0 333333 |0 |1 | 1 44444 |0 |1 | 1 i want to count … |
|
Dear All, I'm struglling with one small prblm with my code. // Charecter count $(document).ready(function (){ $('#msgbx').click(function(){ var charLength = $(this).val().length; $('#charcount').html(charLength + ' of 250 characters used'); // Alerts when 250 characters is reached if($(this).val().length > 250){ $('#charcount').html('<strong>You may only have up to 250 characters.</strong>'); }); }); Please help … |
|
#include<stdio.h> #include<stdlib.h> int input(int *a) { int n,i; printf("enter the no of elements:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("enter the element:"); scanf("%d",a++); } return n; } int key_input(int *a,int key) { int k; printf("enter the key value which have to be searched in the array of no's provided:"); scanf("%d",&k); return k; } … |
|
I'm looking for a short jQuery snippet to count how many divs I can have horizontally in my browser window. Basically, I'm using a fluid layout, like this: <div id="wrapper"> <div id="content"> <div class="foo" /> <div class="foo" /> Wrapper is 100% width, and foo about 250px wide. What's the simplest … |
|
I am trying to build a query that will display the Amount of people that signed up in a certain month. I am adding the date_time to the database at the time someone signs up for a course. I want to display the months and total sign-ups for the month. … |
|
Hello again. I am trying to create a simple code that can compute the average of a set of numbers read in using a scanner. import java.util.Scanner; public class Average { public static void main(String[] args) { double number = 0; double total = 0; int count = 0; Scanner … |
|
Quickselect, based on quicksort, and counting select, based on counting sort. Each is capable of finding the kth smallest element in an unsorted/sorted list/array. This is some example code for a QuickSelect algorithm. This doesn't include the partition function. // return the kth smallest item int quickSelect(int items[], int first, … |
|
Hey guys, I've been stuck on this problem for quite some time now. I'm trying to have someone type some text into CK editor and then I want to count how many bold, italic, or underlined words have been typed. I've managed to count the number of tags there are … |
|
Its an exam question that wants to modify code so that the following output is generated 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5 **This was the original code** #include<stdio.h> void main() { int i,j; for(i=1;i<5;i++) { for(j=1;j<=5;j++) { printf("%d",i); } printf("\n"); } … |
|
helo i want to count values from database in c# please help me? |
|
I am having trouble trying to figure out how to write code so the room number increases by 1 each time it asks for length and width. Here's what the assignment is about.. In this program, you are going to calculate the total square footage of a five room apartment. … |
|
Hello all, I am having some trouble with my assembly code...still kind of new, but here it goes... The assignment is to desing an assembly program that uses a dialog box to prompt the user for a number. These numbers will be stored in an array. There will be an … |
|
I have to find factors of 1-10 then count all factors and find if they are odd/even. I know how to find if they are even or odd i just can't count how many factors for each number. #include <iostream.h> #include <stdlib.h> int main() { int num, icntA, icntB, icntC, … |
|
hi everyone i am very new to programming and really need some advice. i am currently building a program and one of the things i need is to be able to count the number of pages in pdf files in a directory. i found a script online which is suppose … |
|
here is the details I got: 1. Create a class called 'GuessMyNumber'. The constructor should chose a random number between 1 and 100. There should be a method 'guess(int guess)' that returns -1 if the guess is too low, 0 if the guess is correct, and 1 if the guess … |
|
Hey guys! I wrote a small program, which works. Unfortunately, when things get too complicated, it breaks down. The objective is to list the occurrences of vowels in a given word, such that for (word = yellow) and index spits out (e = 1, o = 1) The code KIND … |
|
Hey there! I'm trying to write a program in C++ that will read information in from a file and then tell the user how many strings are in the file and the lengths of the smallest and longest strings. I know I can figure out the length of the strings … |
|
Hi! I am working on a program to count the number of characters and words in a text file. The counting characters portion works, but my countWords function displays '0'. I built the countWords function on the basis of my countChar function, but since it's returning zero I'm not sure … |
|
Hello! I am working on a problem to count characters (without using strings) and I got my program to work! However, I got it to work before I put the code that counts characters into a function (countChar), which is required for this assignment. I'm not sure I understand how … |
|
I have some drop down boxes which are dynamically created via php, created from a number of either 6, 12, 24 or 36 - also created from a number of check boxes. What I want to do is show the total number of all the drop down boxes (so if … |
|
How can I count the number of items in the listview. Example scenario. Today, I added students say, 20 students. and tomorrow I added another 15 students, i need to have a breakdown on how many students i have been adding per day. Please help me. Thank you guys! |
|
I want to have an alternative way to increment my student no. the current way I'm doing to is in my database, mssql. there's a property called Identity Seed(201200001 - my studentid format) and Identity Increment (1 - no. of increments). The 2012-is the school year, while the 00001- is … |
The End.