Is there any textbox comoponent(control) which is counting back from the maxlength?
I can write it but i would like to find a control which has this function.
I want to write a function in Java that takes as input an integer and outputs every possible permutation of numbers up to that integer. For example:
f(1)
0
f(2) should output:
00
01
10
11
f(3) should output:
000
001
002
010
011
012
020
021
022
100
....
220
221
222
That is it should output all 27 permutations of the digits of the numbers 0,…
I essentially want to reconstruct the getTickCount() windows function so I can use it in basic C++ without any non standard libraries or even the STL. (So it complies with the libraries supplied with the Android NDK)
I have looked at
clock()
localtime
time
But I'm still unsure whether it is possible to replicate the getTickCount…
Hi,
could you give me idea how to calculate unique views of page? If i will increase counter on each page load it will be no good, otherside storing information of viewed pages in session looks like not ideal solution.
Let's say I have this 170mb file (roughly 180 million bytes). What I need to do is to create a table that lists:
all 4096 byte combinations found [column 'bytes'], and
the number of times each byte combination appeared in it [column 'occurrences']
Assume two things:
I can save data very fast, but
I can update my saved data very slow.
How…
We've got the following repository method
public IList<Foo> GetItems(int fooId, int pageIndex, int pageSize
, string sortField, string sortDir, out int totalItems)
{
// Some code
}
My question is: is it ok to use out in this way. I'm somewhat uncomfortable with out, but can't come up with a better way to write this as a single call.
I'm still learning linq, now i'm getting confused. I need data for report from 3 tables, I get the result, but it's duplicate. I have used distinct but it's not working, n I need data to be sum still not working.
Here is my query, can somebody explain what's wrong?
var report= (from u in myDb.TBL_TRANSAKSI_MKN_MNMs.AsEnumerable()
where…
I need an assembler 8080 software which counts words (delimited by space) which have more than two number in it.
Example : this sh0uld b3 l1ke th1s
would print : 0 words
but
Example : this sh0uld b3 l1k3 th1s f000k
would print : 2 words
<- word l1k3 contain number 1,3 and f000k number 0,0,0
the output should be displayer in hexadecimal…
I have a collection of links which are being displayed on the index page. Whenever a user clicks a link I want to keep a track of the number of unique views. I know it can be done by tracking the ips whenever a click happens by request.remote_ip and then the link of the page that was clicked. Is there any better approach ? Any plugins etc.
We are developing an inventory tracking system. Basically we've got an order table in which orders are placed. When an order is payed, the status changes from 0 to 1. This table has multiple children in another table order_items.
This is the main structure.
CREATE TABLE order(
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
user_id INT…
Users writing an article have the option to write some tags, tags are written like this:
tag1, tag2, tag3
So tags are stored like: $tags = "tag1, tag2, tag3";
I want to make sure, every tag has a minimum of 3 characters, so i need to validate the tags.
I have tried this:
$tagsstring = explode(",", $tags);
$tagslength =…
Hello,
I've a table called sports that contains a list of list of sports, other called seasons that contains the seasons for a specific sport and competitions that have the competitions of a specific sport and season.
I need one MySQL query to print the list of sports with how much seasons and competitions has each. My tables…
Is it possible to determine the throughput of an application on a processor from the cycle counts (Processor instruction cycles) consumed by the application ? If yes, how to calculate it ?
The following view code generates a series of links with totals (as expected):
<% @jobs.group_by(&:employer_name).sort.each do |employer, jobs| %>
<%= link_to employer, jobs_path() %> <%= "(#{jobs.length})" %>
<% end %>
However, when I refactor the view's code and move the logic to a helper,…
can anyone help me make this more generalised and more pro?
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
// open text file for input:
string file_name;
cout << "please enter file name: ";
cin >> file_name;
//…
Hi everyone,
I have google analytics on my site.
One page has a button which when pressed executes some javascript.
It would be nice to monitor the number of hits the button receives when people come to this page.
Can anybody suggest the easiest way to achieve this with google analytics ?
Are there any best practices…
Hi I've got some SQL ...
SELECT
AdviceNo,
Registration
FROM tblSalesDetail
that produces something like ...
ADV00001, ABC123
ADV00001, CDE564
ADV00002, FGE432
ADV00003, HUY789
ADV00003, MJS532
ADV00003, JFY428
Can anyone tell me how I'd adjust it to see the following please?
ADV00001, ABC123, 1…
For a given int sequence check number of double palindromes, where by double palindrome we mean sequence of two same palindromes without break between them. So for example:
in 1 0 1 1 0 1 we have 1 0 1 as a palindrome which appears 2 times without a break,
in 1 0 1 5 1 0 1 we have 1 0 1 but it's separated
…
I have an application where I can list Items and add tags to each Item.
The models Items and Tags are associated like this:
class Item < ActiveRecord::Base
has_many :taggings
has_many :tags, :through => :taggings
end
class Tagging < ActiveRecord::Base
belongs_to :item
belongs_to :tag
end
…
Say I have some scala code like this:
// outputs 1, 4, 9, 16, 25, 36, 49, 64, 81, 100
println( squares )
def squares = {
val s = for ( count <- 1 to 10 ) yield { count * count }
s.mkString(", ");
}
Why do I have to use the temporary val s? I tried this:
def squares = for ( count <- 1 to…
can some one help me create a macro for the following Data.The values in GradeA,GradeB etc.. columns need to be populated by checking sheet1 ColumnB(Student Name) and columnH(Grade).I need both row wise and Column wise total.
Student GradeA GradeB GradeC GradeD GradeE GrandTotal
Std1 1 0 …
I have two table
First table
BID Town
1 ABC
2 ABC2
3 ABC
Second Table
PID BID AmountFirst AmountSecond AmountThird Minority
1__ 1___ 1000_____ 1000________ 1000_____ SC
2__ 2___ 2000_____ 1000_______ 2000_____ ST
3__ 3___ 1000____ 1000_______ 1000_______ SC
BID is foreign key in Second table.
I want…
I was playing around with Ruby and Latex to create a color coding set. I'm more than a novice with C++, but haven't looked at Ruby until now. So, still learning a lot of coding.
I have the following block of code below.
When attempting to run this, band1 = 1e+02.
I've tried band1 = (BigDecimal(i) *…