I have a list which I shuffle with the Python built in shuffle function (random.shuffle)
However, the Python reference states:
Note that for even rather small
len(x), the total number of
permutations of x is larger than the
period of most random number
generators; this implies that most
permutations of a long sequence can
never be generated.
Now, I wonder what this "rather small len(x)" means. 100, 1000, 10000,...
Can anybody clarify?
Thanks!
A java app runs with the following flag: -XX:+PrintSafepointStatistics, and then
produces the following line on the standard output console:
2 VM operations coalesced during safepoint
Anyone cares to explain what this mean ?
More generally - is there a Java reference manual somewhere detailling all JVM flags, their use and, most importantly, the expected output, with relevant explanations ?
I need to implement the following scenario in a REST service implemented in WCF:
the user submits a binary file and a set of parameters
the server consumes the file, does some clever work and generates a binary output file
the user retrieves that binary result file
and all that is done in a single operation from the client perspective.
It's pretty easy in a non-REST service. How do I do that in a REST service? Where do I get started?
Hi!
I'm new to ejb. Actually I've created one ejb and I added reference to a web application which will call the session bean simply. How to call the session bean from the jsp file?
What is a good method to align images together that may have different rotations, exposures, etc, but have the same background or other fixed reference?
Adobe Photoshop can do this with its "Photomerge" feature.
How can I do this programatically? Is there an Open Source application that does it?
I am attempting to write a LaTeX package which leverages the minted package's \inputminted command. My \mycommand command takes two parameters, the first being a path to a file, and I want to pass the file's extension to the \inputminted command:
\newcommand\mycommand[2]{
\inputminted{#1}{...}
}
Note that the above won't work since the full path is passed to \inputminted.
Example:
\mycommand{/path/to/Test.java}{blah}
should invoke
\inputminted{java}{...}
Hello,
I have a:
GFile* gf = g_file_new_for_path(file_path);
in my code. But when i try to compile it, i see error:
underfined reference to: 'g_file_new_for_path'
in include section i have #include <gio/gio.h>
What's weong in this code?
Thank you.
Hi all,
i'd like to call a function using an array as a parameters:
var x = [ 'p0', 'p1', 'p2' ];
call_me ( x[0], x[1], x[2] ); // i don't like it
function call_me (param0, param1, param2 ) {
// ...
}
Is there a better way of passing the contents of x into call_me()?
Ps. I can't change the signature of call_me(), nor the way x is defined.
Thanks in advance
Our WCF svc files contain the following:
<%@ ServiceHost Service="Foo"
Factory="Bar"
Language="C#"
Debug="true" %>
What does debug=true mean in this case? web.config has debug=false, but I don't know what this one means and can't find a reference on MSDN.
Hi,
I am using WIT2410 cirronet radio to transfer the data wirelessly.
But now i need to interface this radio wiht my PC's serial port.
I need help in how can i make the connection and wat all additional parameters needed for it.
It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, you'll probably use "m_foo". I've also seen "myFoo" occasionally.
C# (or possibly just .NET) seems to recommend using just an underscore, as in "_foo". Is this allowed by the C++ standard?
Hi,
Is there any way of running the $ORACLE_HOME/rdbms/admin/awrrpt.sql so that it doesn't require any input parameters, as in automatically collects a report for the previous hour?
/j
Is there anyway I can make the process of adding references to C# projects less painfull?
Every time I create a new C# class library project. I have to use the Add Reference dialog for 5 times at least.
I'm looking for any PHP/programming podcast episodes which specifically talk about PHP classes and objects. Maybe this is too specific but any reference is ok.
BTW, are there any dedicated podcasts for PHP beginners?
maybe all of you saw the Apple html5 shocases...thing is they didnt put online anything downloadable, am I right? someone found a 360 example that we can download and use as is instead of going trought the Safari Reference book...?
thanks
I created an UITextField in my App. This text field display a long text.
The problem is that when I first open the view containing the UITextField, it is automaticaly show the end of my text. But I want it to show the begining.
I read the UITextFiled Class Reference on Apple dev center, but nothing seem to allow me to change it.
How can I do?
I want to reference an element once and then reuse it threw out my code but I'm not sure the correct way. Below is what I tried but it only works in some places.
$(document).ready(function() {
var image = $("#content img");
image.wrap("<span />"); // Works!
image.hover(function(){}, function(){}); // Does not work?
});
Is it possible to download a folder and its contents using air for android? I would like to also use the same code on iPhone.
I need it to be stored in the application storage so we can reference the content once downloaded.
I know it's possible to download content as referenced in this question: Download Content using Air For Android
but can a person download the entire folder and again store it in the application directory?
Thanks
@lukevain? :)
Where can I find the values that inputType can have?
I'm aware of http://developer.android.com/reference/android/text/InputType.html, but how should the values look like in layout xml files?
I like the visual behavior of the DOJO TitlePane widget, but it has too much other bunk for my purpose. http://dojotoolkit.org/reference-guide/dijit/TitlePane.html#dijit-titlepane
Is anyone aware of a jQuery widget that provides the same ability to expose and hide content in a stacked manner with the little flippy-arrow, pane highlighting on mouse over, etc? An accordion does not accomplish my goal being able to have multiple panes open at the same time.
Thanks in advance.
Does anyone know of any tool (like javadoc) to generate documentation from my @RequestMapping? I.e. to get a list of URLs with parameters and response data. It would be great if it would come as a maven plugin.
In my node.js program I have a response stream attached to a message queue (zeromq) delivering data at a very high rate. Due to slow network connection the response stream and its underlying implementation is unable to consume data at that pace thus occupying a lot of memory. Do you have any suggestion to solve this problem.
For reference please see the code snippet below:
zmq.on("message", function(data) {
res.write(data);
// End response on some event
});
I have a RestFull grails api that i expose through grails Controller.
I need to automatically bind the xml data sent in a POST request.
I don't think using groovy bindData(object,params) works as the params reference seems not having the xml elements. i use the parseRequest=true in the UrlMappings but yet the params Object does'nt have the xml elements.
am i missing some other config so that my params object get automatically populated with the xml body elements?
I'm trying to programatically add a series to a Dundas TreeMap but I'm getting a Object reference not set to an instance of an object. error. This error looks to be a bug in Dundas, but I was wondering if anyone has tried/managed to do this?
If I add the series in declaratively then at all works fine.