length

In Java, what's the fastest way to "build" and use a string, character by character?

I have a Java socket connection that is receiving data intermittently. The number of bytes of data received with each burst varies. The data may or may not be terminated by a well-known character (such as CR or LF). The length of each burst of data is variable. I'm attempting to build a string out of each burst of data. What is the fast...

How to set the length of a vector (in xna)

Hey, I'm wondering if there's a function out there to set the length of an XNA framework Vector3, like in c++ it would just be VECTOR.setLength( x ). Either that or the basic math to do it manually would be nice :) ...

Is there a standard function in C that would return the length of an array?

Is there a standard function in C that would return the length of an array? ...

Fixed length path between two graph nodes.

Is there an algorithm that will, if given two nodes on a graph, find a route between them that takes the specified number of hops? Any node can be connected to any other. The points at the moment are located in 2D space, so I'm not sure if a graph is the best approach. ...

what does the mySQL Length parameter do for different types?

I've used MySQL (via PHPMyAdmin) a lot before but never really understood half of it. I'm assuming that for varchar, length is the maximum length of a string that can go there. But what about for Int? According to this, Int is a 4 byte integer, so why have a Length parameter for it? Is it the number of bits for that integer? Why have sep...

C# - Count string length and replace each character with another

How can I count the number of characters within a string and create another string with the same number of characters but replace all of them with a single character such as "*"? Thank you. ...

How to find length of an element in a list?

I'm just starting with programming. I have a list of a few strings and now I need to print the biggest (in length) one. So I first want to just print the lengths of elements. I was trying things like this: l = ("xxxxxxxxx", "yyyy","zz") for i in range(len(l): So how do I do it? ...

what are the maximum length of PHP variable/function/class name ?

Please if you know, make a response. thanks ...

How do I plot vectors of different length on the same axes in MATLAB?

I am running into trouble trying to compare and plot two files of different length. In MATLAB I do not know how to plot two vectors of different length in the same x-axis. As one file has some data missing, I want to create a row and put blank space for that corresponding time stamp. Here are samples of data files: file 1: date time T...

JSON Serialization error

I am getting a error message, when I am trying to get a webservice response as json to jquery, "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property." when i searched in the net, I could see some web.config settings for maxJsonLe...

SQL Anywhere table length

Hi, how can I see the length of a table (in bytes) on SQL Anywhere? It's possible? Thank you ...

Python tabstop-aware len() and padding functions

Python's len() and padding functions like string.ljust() are not tabstop-aware, i.e. they treat '\t' like any other single-width character, and don't round len up to the nearest multiple of tabstop. Example: len('Bear\tnecessities\t') is 17 instead of 24 ( i.e. 4+(8-4)+11+(8-3) ) and say I also want a function pad_with_tabs(s) such ...

How do I account for missing data when creating an Excel file in MATLAB?

I had posted a similar question related to plotting data, and now I'd like to know how to handle missing data when outputting data to an Excel file using the XLSWRITE function. I have two sets of data of different length (described in the question I link to above). I am trying to replace the smaller file with zeroes for the times when t...

Reponse outputstream content length?

I am writing to output stream through various methods. How can I, before I close it, find out content length of the outputstream? ...

jquery json multidimensional array lengths

I'm using a jQuery ajax json call to retrieve a 3 dimensional PHP array into Javascript. the PHP array looks like this: $rate[0][1]['name'] = 'guff'; $rate[0][1]['value'] = 'puff'; $rate[0][2]['name'] = 'guff'; $rate[0][2]['value'] = 'puff'; $rate[0][3]['name'] = 'guff'; $rate[0][3]['value'] = 'puff'; $rate[...

How to calculate the number of characters(spaces are excluded) within a pair of tags in JQuery or Javascript?

How to calculate the characters(spaces are excluded) within a pair of tags in JQuery or Javascript? What function? For example: <pre id="mytext">This is the text. This is the text.</pre> How to know how many characters or words in $("#mytext")? ...

Get the number of elements in a pointer to a char array in C++

I realise this is an incredibly noob question, but I've googled for it and can't seem to find an answer (probably because I've worded the question wrong... feel free to fix if I have) So I have this code: int main(int argc, char* argv[]) { puts(argv[1]); return 0; } It works fine if I've passed a parameter to my program, but ...

How to convert string "brakemeup" in to char[stringlength] array?

if i have this code, how can i put alle the chars in my string in to the Char array? i know this wont compile but the logic shows what im trying to do. private void button1_Click(object sender, EventArgs e) { string stringX = textbox1.Text; int strlen = stringX.Length(); char[] arrayX = new char[strlen...

VBScript: Function parameter list too long?

in VBScript, I've got a function like: Function InsertPerson(FirstName, LastName, Street1, Street2, City, State, Zip, x, y, z, a, b, c, d, e) When I try to compile this function, I get an "Identifier Expected" error. However, if I shorten the list of parameters, it works fine. Is there such a thing as TOO long a list of parameters? ...

Specified edge lengths on networkx/igraph (Python)

I wanted to visualize a network with the data I have and would like to graph them with specific edge lengths. I use Python, and I've tried networkx and igraph to plot but all seem to assign fixed edge lengths. a.) I wonder if I did the codes wrong or the packages aren't really capable. How do you properly implement specified edge lengt...