replicate

How do you fix a bug you can't replicate?

The question says it all. If you have a bug that multiple users report, but there is no record of the bug occurring in the log, nor can the bug be repeated, no matter how hard you try, how do you fix it? Or even can you? I am sure this has happened to many of you out there. What did you do in this situation, and what was the final outco...

Creating replicated websites - how is it done?

I have a database/site that I would like to allow users to "white label". In other words, if a user signs up for an account I'd like to allow them to create a brand-less copy of the site which they could access through a custom sub-domain. I would also like to give the user limited customization features like logo, color, etc. Can anyon...

How do I convert a 2X2 matrix to 4X4 matrix in MATLAB?

I need some help in converting a 2X2 matrix to a 4X4 matrix in the following manner: A = [2 6; 8 4] should become: B = [2 2 6 6; 2 2 6 6; 8 8 4 4; 8 8 4 4] How would I do this? ...

How can I replicate a table from SQL 2000 to SQL 2008?

I have a table on a SQL Server 2000 database, which I want copied verbatim to a 2008 server. I tried to do it manually with INSERT/UPDATE triggers, but this technique runs in a distributed transaction, which does not work because I apparently have to enable MSDTC and the firewall; I don't want to do any of that. Are there any other way...

MATLAB: element-wise array replication according to a count

My question is similar to this one, but I would like to replicate each element according to a count specified in a second array of the same size. An example of this, say I had an array v = [3 1 9 4], I want to use rep = [2 3 1 5] to replicate the first element 2 times, the second three times, and so on to get [3 3 1 1 1 9 4 4 4 4 4]. S...

How can you replicate each row of an R data.frame and specify the number of replications for each row?

df <- data.frame(var1=c('a', 'b', 'c'), var2=c('d', 'e', 'f'), freq=1:3) What is the simplest way to expand the first two columns of the data.frame above, so that each row appears the number of times specified in the column 'freq'? In other words, go from this: >df var1 var2 freq 1 a d 1 2 b e 2 3 c f 3 ...

Perl Hash Slice, Replication x Operator, and sub params

Ok, I understand perl hash slices, and the "x" operator in Perl, but can someone explain the following code example from here (slightly simplified)? sub test{ my %hash; @hash{@_} = (undef) x @_; } Example Call to sub: test('one', 'two', 'three'); This line is what throws me: @hash{@_} = (undef) x @_; It is creating a ha...

R: When using the rep(..,..) to replicate 1020 a character variables, the result contains just 1019 replicates?

When programming within the R environment I used rep("[35,40)",1020). This should give me a list with 1020 times "[35,40)". However, the result contains only 1019 of these elements. The programming was first done within a replicated for two vectors, but even when I split it up it doesn't work. What I tried is using differen versions of...

Have a SVN checkout location connected to Codeplex and propagate updates to another develpment location connected to another SVN repository

I would like to checkout a read only SVN projects (e.g. from Codeplex) to a folder on my local disk, open the solution (let's say I am getting Dotnetnuke and open it's solution, add some projects to the solution and possibly changing some files, previously making them writable. I want to regularly update the changes coming from Codeplex ...

how do I re-duplicate sql server database ?

I would like to stress test my database, which is a hospital patient database. The current one is 2 GB. I would like to have a 100GB database, so I would like do the following: 1) read each patient record 2) create a new, fake patient id, and store back to database 3) repeat until size reaches 100GB What is the easiest way of doing th...

MSSQL: LENGTH() inside of REPLICATE()

Hello everyone I have a MSSQL table with the columns "Lvl" and "Title". I need to insert a "-" in front of the title for every character in the Lvl field. As an example: If Lvl = 111 the title shoud become "--- My Title". I can only edit the following SQL-String. There is no possibility to create other functions or likewise. SELECT ...