Questions tagged [charactercount]

67 questions
0
votes
1 answer

Trying to count characters after submitting a comment, mb_strlen gives back weird results

In my controller, I access the comment data with $this->request->data['Comment']['text']. I use CakePHP's formhelper to build the form, and a plugin called Summernote to transform the textarea into a WYSIWYG editor. I save the comment as HTML in my…
0
votes
1 answer

Rails: Using Jquery for Text_Area character count

My goal is to put the keycount in a blank 'p' element above a text_area. Here is my erb and javascript:

<%= f.label :essay %>
<%= f.text_area :essay, :id => "essay-form" %>
(This is all I…
zasman
  • 346
  • 4
  • 24
0
votes
3 answers

c# richtextbox display character remaining count

Yes, I have already researched this question. I've found this: How to display remaining textbox characters in a label in C#? and many others just like it. That's how I managed to get this following code pieced together: protected void…
user5360843
0
votes
4 answers

Finding max character count in a string using Python 3

I'm working on a lab (in Python 3) that requires me to find and print the character in a string that occurs most frequently. For example: >>> print(maxCharCount('apple')) ['p'] The idea is to do this using a loop, but I'm confused about how to do…
Kelsey
  • 11
  • 1
  • 2
0
votes
2 answers

Spotfire: count the number of a certain character in a string

I am trying to add a new calculated column that counts the number of semi colons in a string and adds one to it. So the column i have contains a bunch of aliases and I need to know how many for each row. For example, A; B; C; D So basically this…
Tryingtolearn
  • 11
  • 1
  • 1
0
votes
2 answers

Can't count '|' symbols in a .c file

Basically I have to write a program that counts all kinds of different symbols in a .c file. I got it to work with all of the needed symbols except the vertical line '|'. For some reason it just won't count them. Here's the method I'm using: int…
Vlad
  • 27
  • 4
0
votes
4 answers

Reset character countdown on button click

How can I make my character countdown reset back to 150 when my submit button is clicked? Right now I have a input text box that you type in and it counts down how many characters you have left and then when you want to submit it, you click the…
julian
  • 49
  • 1
  • 8
0
votes
2 answers

Textarea counter / countdown with negative numbers and enforcement

I've been working on adding a character counter to a TEXTAREA field. There are many, many solutions available online for this task. "Stop-at-Zero" Solution The problem I'm having is that practically all solutions terminate user input at 0. That's…
Michael Benjamin
  • 265,915
  • 79
  • 461
  • 583
0
votes
1 answer

Rails 4 - Setting character count limit on textarea

I have a description field that I want to limit to 400 characters. Right now I am able to type in the text, the counter works showing [current-count]/400, and I can save and it all works, as long as I'm within the 400 limit. Right now I can also…
aep
  • 45
  • 10
0
votes
3 answers

Count characters in string

So I'm trying to count anhCrawler and return the number of characters with and without spaces alone with the position of "DEATH STAR" and return it in theReport. I can't get the numbers to count correctly either. Please help! anhCrawler = """Episode…
Rachel Green
  • 47
  • 1
  • 4
0
votes
0 answers

MySQL RLIKE repeating character end position

I have done my due diligence and am still stuck. I have a situation where I need to locate where the last existing same character is in a search string, then check to see what follows that character. I think I need to use RLIKE to do this but maybe…
0
votes
2 answers

Removing lines from file based on character/word ratio - unix/bash

I have two files and I need to remove lines that falls under a certain token ratio, e.g. File 1: This is a foo bar question that is not a parallel sentence because it's too long hello world File 2: c'est le foo bar question creme bulee bonjour tout…
alvas
  • 94,813
  • 90
  • 365
  • 641
0
votes
1 answer

Minimum character count on body field in drupal

I am having a very hard time getting a body field to have a minimum character count of 2000 incl. spaces. If the field has less than 2000 charaters, it should not be possible to save the node. So far i have:
PJJ
  • 87
  • 2
  • 14
0
votes
2 answers

Hover Effects Disabled when "Span" is Modified with JavaScript

I have a text field, and there is a max-character counter (not using the maxlength in my HTML). Here's how it works: it starts at 500 characters, and as you type, the number will decrease. The counter is below the text field. When it gets to 0,…
TJ Mazeika
  • 608
  • 7
  • 25
0
votes
3 answers

Javascript/YUI Character Counter off by one

I've gone over the code several times and can't figure out why the first keystroke doesn't seem to count. When the textarea is an empty string, the counter display should read accurately. But it seems that the textarea needs to be empty…
ndreckshage
  • 773
  • 8
  • 19