5.27 Tuesday, June 28, 2016

================================== 
Top new questions this week: 
==================================

[Is the renaming mechanism of ‘With‘ flawed?] http://mathematica.stackexchange.com/questions/119403/is-the-renaming-mechanism-of-with-flawed

I’m confused about the renaming mechanism of With:

With[{x = a}, Hold[With[{a = b}, a + 2 x]]] 
(*==>Hold[With[{a$ = b}, a$ + 2 a]]*) 
 
With[{x = a$}, Hold[With[{a = b}, a + 2 x]]] 
 ... 

- asked by luyuwuli (21 votes), answered by Leonid Shifrin (22 votes)

—————————-

[How do I increase the readability of this code?] http://mathematica.stackexchange.com/questions/119074/how-do-i-increase-the-readability-of-this-code

Below is some code I am working on; being a beginner. How can I increase the readability of the part behind Manipulate?

I can’t read my own code anymore, because it is simply too long and unordered. ...

- asked by Imre Vegh (20 votes), answered by E.Doroskevic (16 votes)

—————————-

[Mysterious behaviour of Pick] http://mathematica.stackexchange.com/questions/119223/mysterious-behaviour-of-pick

As everyone knows, Pick can do amazing things, The most facinating phenomenon is that it can pick though all sorts of lists:

The basic & pattern matching: 
 
Pick[{4, 5, 6}, {1, 2, 1}, 1] 
(*{4,6}*) 
 ... 

- asked by Wjx (18 votes), answered by WReach (25 votes)

—————————-

[How to debug the C code for LibraryLink?] http://mathematica.stackexchange.com/questions/119053/how-to-debug-the-c-code-for-librarylink

Recently, I use the C to rewrite a Mathematica function NonzeroBasis[], please see here for fully descriptions.

Here, NonzeroBasis[i,p,u,U] calculates the values of ...

- asked by Shutao TANG (11 votes), answered by Szabolcs (16 votes)

—————————-

[Is it possible to attach a debugger to a dynamically linked library on the supported OS?] http://mathematica.stackexchange.com/questions/119083/is-it-possible-to-attach-a-debugger-to-a-dynamically-linked-library-on-the-suppo

Recently, I discovered that LibraryLink technique is a very useful tool to improve the performance of function. Firstly, I need to use LibraryLink template to write C/C++ program. Then compiling the ...

- asked by Shutao TANG (10 votes), answered by user21 (3 votes)

—————————-

[Nothing not behaving as expected?] http://mathematica.stackexchange.com/questions/119239/nothing-not-behaving-as-expected

I was thinking that Nothing was doing the same job as the vanishing sequence ##&[]. 
 
Yet this exemple shows it doesn't. 
 
Association[If[True,Nothing]] (*returns Association[Nothing]*) 
 ...

- asked by faysou (10 votes), answered by Szabolcs (12 votes)

—————————-

[Random walk on a Sierpinski gasket] http://mathematica.stackexchange.com/questions/119036/random-walk-on-a-sierpinski-gasket

I am trying to simulate a random walk on a Sierpinski gasket. The best strategy i could come up with is to use Nearest point function to determine the next possible step of my walker. But this creates ...

- asked by FEARxxx (9 votes), answered by Wjx (11 votes)

================================== Greatest hits from previous weeks: ==================================

[Creating legends for plots with multiple lines?] http://mathematica.stackexchange.com/questions/4025/creating-legends-for-plots-with-multiple-lines

So I have a graph with multiple lists, for e.g.

data = {{1,2}, {3,4}, {3,5}, {2,3} . . .} 
 
 
If I then do ListLinePlot[Table[{#1,Log[b,#2]}&@@@data, {b,1,10,2}]] I have no way to generate a legend  ... 

- asked by Eiyriou von Kauyf (58 votes), answered by Jens (88 votes)

—————————-

[How can this image (optical illusion) be created with Mathematica?] http://mathematica.stackexchange.com/questions/24148/how-can-this-image-optical-illusion-be-created-with-mathematica

I came across this image the other day:

and liked the sensation of it pulsing. I was wondering if anyone would know how to create something similar with Mathematica (without the Pink Floyd Dark ...

- asked by Mike Honeychurch (51 votes), answered by halirutan (65 votes)

================================== Can you answer these? ==================================

[Is pattern matching just systematic guessing and checking?] http://mathematica.stackexchange.com/questions/119394/is-pattern-matching-just-systematic-guessing-and-checking

How does the pattern matcher work?

how does it match this example?

f[3, h[4]] /. f[x_, z_[y_]] :> {x, y, z}

My guess is that the pattern matcher collects all the names in the expression f[3, ...

- asked by John Conor Cosnett (3 votes)

—————————-

[How can I move he documentation to another location after install on Windows?] http://mathematica.stackexchange.com/questions/119503/how-can-i-move-he-documentation-to-another-location-after-install-on-windows

How can I move he documentation to another location after install on Windows?

I would like to move the documentation to another partition on my Windows filesystem. Michael Hale in chat recommended ...

- asked by jamesson (4 votes)

—————————-

[How to perform convolutions on this complicated pdf?] http://mathematica.stackexchange.com/questions/119034/how-to-perform-convolutions-on-this-complicated-pdf

For a known pdf f[x], I need to calculate integrals over the probability density of the sum of Log[f[x]] over independent samples:

\[Q[t,n]\equiv P(\sum _{i=1}^{n}Log[f[x_{i}]]=t)\]

Since the sample ...

- asked by Jerry Guern (2 votes)