In my code an array is declared as follows
private Object[,] cellInfos = new Object[20, 10];
I need to convert it into Jagged array so I wrote following code
private Object[][] cellInfos = { new Object[20],
new Object[10]
};
But it gave me a array with 2 items each of type array.
I need to create 2D array where new Object[20] would be first column and new Object[10] would be the second one.
Thanks.
Hello!
I`m trying to write simple batch file generator in python. Batch file consist of about 30-50 lines of text and is passed to other applications. During the execution of script there a lot of calls to external applications. I want to create file in memory (like named pipes in win32). Is there any platform independ way?
p.s. sorry for possible mistakes in text, I'm still learning English
Hello,
I'm looking for a special hash-function. Let's say I have a large list of strings, if I order them by their hash-values they should be ordered quasi randomly.
The most important point is: it must be super fast. I've tried md5 and sha1 and they're using to much cpu power.
Clashes are not a problem.
I'm using javascript, so it shouldn't be too complicated to implement.
lets say i have a web request:
WebRequest webRequest = WebRequest.Create(Url);
webRequest.BeginGetResponse(this.RespCallback, webRequest);
now is there is any way to do retierve the URL in
private void RespCallback(IAsyncResult asynchronousResult)
{
// here
}
the idea is i want to provide a squence id in the url while doing webrequest and then reterive it on the call back and match it to know that this call back is from that request.
any idea?
Hi Stackoverflow,
I have been looking at the source code of raphael (http://raphaeljs.com/index.html) and I see a lot of stuff like !variable && function() (e.g.: !svg.bottom && (svg.bottom = this); )
What does that exactly do? Does it check first and execute only if not true?
Thanks.
I have seven columns in my table:
hours, weight, status, total_hours, total_weight and percentage
total_weight = weight where status = 'X'
total_hours = hours where status = 'X'
percentage = total_hours/sum(weight)
sum(weight) is an aggregate function
I would like to specify formula to generate the three computed columns.
What do i do?
The error-Warning: sqlite_query() [function.sqlite-query]: attempt to write a readonly database is coming whenever i try to insert values into a sqllite 1.1 database thru php program.
php version is 5.2.
Is it possible to assign php array in MySQL IN() function? for example,
$numbers = array('8001254656','8886953265','88864357445','80021536245');
$sql = mysql_query("SELECT * FROM `number_table` WHERE `number` IN ($numbers)");
Any Ideas?
Thanks,
I'm using the JQuery autocomplete plugin. I wish to override the implementation of the filllist() function. Can someone point me to an example of how to do this?
Is there a hash function that returns a 16-digit hex value (as MD5 returns 32-digit), or is there a library (for C++) in which I can use MD5 or SHA-1 which returns a 16-digit value
Working on an rsync script and the portion below is in a for loop. What I want to achieve is assign a variable to every arguement after 3. Just confused if I need to create another loop for that or not:
#1: name
name=$1
#2: ip
ip=$2
#3: user
user=$3
#4+: folder exlusion
#any lines higher than 3 will be created as exlcude folders
ex[ARG_NUMBER]=
i want to create a table :
products
which looks like
(these are columns name)
Id Name Category-id Description
now Category-id column gets the values from another table
category
which looks like
Id Name Description
now category.Id is used in products.Category-id
how to do this in mySQL
Very similar to this post
How can I declare template array as a parameter in templated function?
Something like this code:
template <unsigned i> void my_func (char (&a)[i]); //yes, I do need that reference
Hi, if i wanted to create a mobile friendly version of a relatively small website would it be better to have a sub domain that redirects to a completely new url with sperate markup and styling or would it be better to detect the useragent in code and programatically change to a different mobile friendly stylesheet, or is their a better infrastructure based solution i am overlooking..
Thanks.
abstract class db_table {
static function get_all_rows() {
...
while(...) {
$rows[] = new self();
...
}
return $rows;
}
}
class user extends db_table {
}
$rows = user::get_all_rows();
I want to create instances of a class from a static method defined in the abstract parent class but PHP tells me "Fatal error: Cannot instantiate abstract class ..." How should I implement it correctly?
I want to make this kind of query:
create procedure something
@name varchar(13)
as
begin
select * from WORKER
where NAME LIKE "%@name%"
end
For input @name=ho, I want output every row that contains NAME wich sounds "ho",
for example HOuse, soHO, broHOw...
I am not very familiar with the Javascript syntax bellow. Can anyone shade light about the sense of this block? For what purpose?
(function foo() {
alert('bar');
})();
Thanks in advance.
Hi I'm not too sure how to create the attached image effect where the right hand side is my main content and it shades onto my left sidebar which has a gradient effect downwards.
hello friends sorry for previous question actuly my question is i am having one button called btn[0] which is allready on browser when it is loaded when i click on btn[0] it will create another button element called btn[1] now btn[0]'s click event is disabled and when i click on btn[1] it will also generate another button which called btn[2] when i click on btn[2] it will generate another btn called btn[3] and so on
Is it possible to use ffmpeg create a video from a set of sequences, where the number does not start from zero?
For example, I have some images [test_100.jpg, test_101.jpg, test_102.jpg, ..., test_200.jpg], and I want to convert them to a video. I tried the following command, but it didn't work (it seems the number should start from zero):
ffmpeg -i test_%d.jpg -vcodec mpeg4 test.avi
Any advise?
Hi everyone,
I need to create a custom settings view used within the app. The app is a mockup so it actually does have one already, it uses a UITableViewCellStyleValue1, but nothing is editable. So essentially what I would like to have is the same thing but with editable detailTextLabel (the label on the right hand side), what's the best way to do this?
Hi..
i need to know how to create own event handler occurs when we recieve message from keyboard or the button was pressed and then we write output in a textbox...