Questions tagged [sample]

Small part of or a selection from something (code, logs, data etc.), intended to show the structure, style, or nature of the whole.

In statistics, the process of generating random samples is called .

In and some other programming languages, the function sample performs random sampling of a set with or without replacement.

1672 questions
8
votes
1 answer

xauth using python-oauth2

I am trying to implement xauth for instapaper using python-oauth2. I am able to find samples for oauth but I didnt find any for xauth. Can someone share samples or the api documentation?
MNC348
  • 203
  • 1
  • 7
8
votes
1 answer

.NET, "Any CPU/64Bit (x64)/32Bit (x86)" Best Practices, Tips and Tricks

If a .NET program directly or indirectly needs to call platform dependent/native/unmanaged code it might crash. This 32-bit/64-bit theme came into my mind after I got a new laptop with Windows 7 64-bit installed and tried to develop with the SQLite…
k3b
  • 14,517
  • 7
  • 53
  • 85
8
votes
3 answers

R - sample used in %in% modify dataframe which is being subsetted

Not sure if I titled question correctly, because I don't fully understand the reason of following behaviour: dfSet <- data.frame(ID = sample(1:15, size = 15, replace = FALSE), va1 = NA, va3 = 0, stringsAsFactors = FALSE) dfSet[1:10, ]$va1 <-…
her_dom
  • 97
  • 4
8
votes
3 answers

Hive lateral view with sample example with hive table having 1 column as array

My use case is I am having one table in hive which has one column as INT and one as Array data type. I want to display it horizontally..
Nakul Dev
  • 81
  • 1
  • 1
  • 4
8
votes
2 answers

Delete added sample in Health App

I add sample like this: var store:HKHealthStore? date = NSDate() let type = HKQuantityType.quantityTypeForIdentifier(HKQuantityTypeIdentifierDietaryVitaminA) quantity = HKQuantity(unit: HKUnit.gramUnitWithMetricPrefix(.Micro), doubleValue: 100) let…
Bogdan Bogdanov
  • 882
  • 11
  • 36
  • 79
8
votes
3 answers

MSBuild Starter Kits

Just wondering if anyone knows if there are any MSBuild starter kits out there. What I mean by starter kits is that from the looks of it most builds to kinda the same sort of steps with minor changes here and there (i.e. most builds would run test,…
vdh_ant
  • 12,720
  • 13
  • 66
  • 86
8
votes
1 answer

Sample size and power calculation in r as viable alternative to proc power in SAS?

So I am trying to see how close the sample size calculations (for two sample independent proportions with unequal samples sizes) are between proc power in SAS and some sample size functions in r. I am using the data found here at a UCLA website.…
user27008
  • 600
  • 3
  • 15
  • 24
8
votes
2 answers

Simple example of Masstransit with RabbitMQ

I want to use MassTransit bus with RabbitMQ. But I am not able to find a simple example. I am looking for example which will get me started. What I have tried. googled: But most the examples are using MSMQ or they using too many configuration…
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
8
votes
5 answers

pick a random number, always with increasing value over last random number picked

How would I efficiently go about taking a 1-by-1 ascending random sample of the values 1:n, making sure that each of the randomly sampled values is always higher than the previous value? e.g.: For the values 1:100, get a random number, say which…
thelatemail
  • 91,185
  • 12
  • 128
  • 188
8
votes
3 answers

How to obtain multiple lines in a single density plot, with a corrected scale?

Possible Duplicate: How to overlay density plots in R? I have recently started working with microarray datasets and am trying to get my hands on R. I wish to make some plots out of my result data, but however I am stuck at the following. I have…
Letin
  • 1,255
  • 5
  • 20
  • 36
8
votes
5 answers

Where Can I Find Demo/Sample Code For Perl 6?

I've got myself a copy of Rakudo and I'd love to give it a test drive. After looking around the Internet I found some code snippets of cool Perl 6 stuff, but no complete scripts. Any sites that make practical Perl 6 scripts available would be…
Ehtyar
  • 226
  • 2
  • 4
8
votes
3 answers

Examples for successful real life mobile cross-platform / hybrid apps?

I have nothing found here or on google. Do you know any (good/successful/most sold/most downloaded) samples for mobile cross-platform apps? If so, on which frameworks (jQuery Mobile, Sensa, PhoneGap, etc.) are they built on? I want to get some…
donttellya
  • 452
  • 1
  • 3
  • 13
7
votes
4 answers

c++: Select a subset of a std::vector, based predefined element indices

I am looking for an efficient way of either trimming or copying a subset of an existing std::vector. The criteria for elements to be eligible for the subset / remain is that their index is contained in a separate predefined std::vector. e.g…
oracle3001
  • 1,090
  • 19
  • 31
7
votes
2 answers

How to create a random sample from a vector of elements?

I used this code to create a random sample for the numbers 0 to 49. Now I want to create a random sample for a custom set of values. For example: select a sample of 5 from [1, 2, 3, 4, 9, 10, 11, 14, 16, 22, 32, 45]. How can I do this? use…
Miguel
  • 1,295
  • 12
  • 25
7
votes
7 answers

How to select random DBPedia nodes from SPARQL?

How can I select random sample from DBpedia using the sparql endpoint? This query SELECT ?s WHERE { ?s ?p ?o . FILTER ( 1 > bif:rnd (10, ?s, ?p, ?o) ) } LIMIT 10 (found here) seems to work ok on most SPARQL endpoints, but on…
Mulone
  • 3,603
  • 9
  • 47
  • 69