search for: contrived

Displaying 20 results from an estimated 304 matches for "contrived".

2009 Jul 09
5
Best way to export values from a function?
Maybe there is a great website out there or white paper that discusses this but again my Google skills (or lack there of) let me down. I would like to know the best way to export several doubles from a function, where the doubles are not an array. Here is a contrived function similar to my needs: multipleoutput<-function(x) { squared<-x^2 cubed<-x^3 exponentioal<-exp(x) factorialVal<-factorial(x) } Thanks again for all your help.
2015 Mar 30
3
Segfault with match()
This is admittedly a contrived example, but... data(housing, package ="MASS") x <- housing$Type + housing$Sat match(x, unique(x)) Hadley -- http://had.co.nz/
2019 Apr 12
2
External Authentication
...t still seems overly complex. This is why I was looking into auto discovery / auto creation of users and groups via an external authentication request. At least then the users would exist if they successfully authenticated. Obviously that's not a completely reasonable solution either. Another contrived solution I've been mulling around is using the meta backend in OpenLDAP and creating a combined view of Samba4 with central campus LDAP. The issue here is that I don't yet know whether OpenLDAP would be able to query Samba4, stitch together the output of the LDAP servers, let alone configur...
2010 Feb 17
2
qr test?
I am testing 'qr' with an admittedly contrived matrix and I am getting different results than I am from another package. The matrix that I am using is: x <- matrix(seq(.1, by=.1, length.out=12), 4) So the whole test is: x <- matrix(seq(.1, by=.1, length.out=12), 4) qr(x) And the output from 'R' is: $qr [,1] [...
2004 Jun 22
3
[Q] GET_DIM() crash on Windows only
I have the following contrived code in package format. On Solaris and Mac OS X, code runs just fine. On Windows, it crashes the R environment with the "Send Bug Report" dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP) binaries with the same result. PCs otherwise appear properly configured for creating R packages. Anyt...
2013 Mar 13
0
[LLVMdev] PROPOSAL: struct-access-path aware TBAA
...-------------------------- > > the *-statement can be optimized into "return 2" if optimizer can prove > type-A does not include type-B, > and type-B does not include type-A either. > And my example shows that they can alias regardless of that. Granted, it's somewhat contrived and I'm not 100% sure if it's legal. Once there are pointers, there is little that can be done without knowing at least something about what they point to. -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
2005 Mar 09
9
Unit testing + instance variables
...fter *much* digging and playing around, I finally figured out how to unit test instance variables that are created by actions. It was more difficult than I expected. It seems like there should have been a more straight forward way to do this. Can someone enlighten me? A simplified and somewhat contrived example of what I am current doing: Thanks. Matt >> # My Controller of interest for testing class RecipeController < ApplicationController def list @recipes = Recipe.find_all @categories = Category.find_all end end >> # My test file require File.dirname(__...
2008 Oct 04
0
[LLVMdev] mem2reg optimization
...uaranteed. If it is, your approach is superior. > > I got my patch updated to work with TOT. Here it is. Comments > welcome. Hi Dave, Great. I'd like to get this in, but would really like to do a profile first. Could you please include a testcase? Even if it is something contrived with llvm-gcc, I would really like to understand what is going on. > I still prefer Nicolas' solution if his use list ordering assumption > is valid. It isn't. -Chris
2013 Mar 13
3
[LLVMdev] PROPOSAL: struct-access-path aware TBAA
Based on my understanding of her design, following is one obtuse motivating example: -------------------------- class A; class B; int foo(A* p, B* q) { p->a_int_field = 2; q->another_int_field = 3; return p->a_int_field; // !!!!! } ---------------------------------- the *-statement can be optimized into "return 2" if optimizer can prove type-A does not include
2018 Jan 25
2
Run away memory with gluster mount
...en running on and off about 12 hours now and the resident memory of the above process is already at 7.5G and continues to grow slowly. If I stop the test script the memory stops growing, but does not reduce. Restart the test script and the memory begins slowly growing again. This is obviously a contrived app environment. With my intended application load it takes about a week or so for the memory to get high enough to invoke the oom killer. Is there potentially something misconfigured here? Thanks, Dan Ragle daniel at Biblestuph.com -------------- next part -------------- An HTML attachment was...
2009 Mar 23
3
Replacing a few variable values within a DataFrame...
I would like to replace a few varaibles within a data frame. For example, in the dataframe below (contrived) I would like to replace the current housesize value only if the Location is HSV. However, I would like to leave the other values intact. I tried "ifelse", but I don't really need the else condition. test_data2_df<-data.frame(Variables=c("SQR Footage","SQR Fo...
2008 Feb 29
1
Problems initializing an extended S4 class
...ble problems. As a toy example, consider classes A and B and associated methods as defined below. I use a validity method for A to complain about negative values, and an initialize method to "correct" small input values. B should simply extend A by adding an extra slot. The example is contrived, but it illustrates a key behavior that I also encounter in my real code: setClass("A", representation(x="numeric")) setClass("B", representation(y="character"), contains="A") setValidity("A", function(object) { message("start...
2006 Feb 17
3
Using :include with has_one vs. has_many
...associations. First, let me say that I''m a big fan of :include for reducing the number of SQL calls. There are times when I wish it could go more than 1 step away from the parent object, but I kind of understand why it can''t. Now, on to my "discovery"... Completely contrived example follows: I have the following Models: class Author < ActiveRecord::Base has_many :posts end class Post < ActiveRecord::Base belongs_to :author has_one :category end class Category < ActiveRecord::Base belongs_to :post end There are many authors in the database tha...
2006 Sep 17
2
histogram frequency weighing
...which has 5 preceding empty intervals, so its adjusted count would be 1/6. Similarly, the second one would be element 8 (3), which has 1 preceding empty interval, so its adjusted count would be 3/2. Can somebody please provide a hint to implement such a weighing scheme? I thought about some very contrived ways to accomplish this, involving 'which' and 'diff', but I sense a function might already be available to do this efficiently. I couldn't find relevant info in the usual channels. Thanks in advance for any pointers. Cheers, -- Seb
2018 Jan 25
0
Run away memory with gluster mount
...een running on and off about 12 hours now and the resident memory of the above process is already at 7.5G and continues to grow slowly. If I stop the test script the memory stops growing, but does not reduce. Restart the test script and the memory begins slowly growing again. This is obviously a contrived app environment. With my intended application load it takes about a week or so for the memory to get high enough to invoke the oom killer. Is there potentially something misconfigured here? I did see a reference to a memory leak in another thread in this list, but that had to do with the setting...
2012 Aug 21
2
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
...exception is thrown. I haven't implemented a test case that reproduces the problem, but I will do so. (I've verified the problem and the fix in the scope of a much larger system) I'm open to suggestions as to how best to test it, I'm currently thinking of trying to create a highly contrived situation to force exception tables to be written at the end of a buffer that won't be long enough. ============================================================================= michaelMuller = mmuller at enduden.com | http://www.mindhog.net/~mmuller -------------------------------------------...
2007 Dec 18
2
[LLVMdev] Another Pass Manager Assertion
Dear All, The attached code (which is a contrived test case) hits the following assertion: test: /home/vadve/criswell/src/llvm22/include/llvm/PassAnalysisSupport.h:226: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*, llvm::Function&) [with AnalysisType = Pass1]: Assertion `ResultPass && "getAnalysis*() called o...
2003 Jan 16
2
Problem using outer()
Here is a problem I am having. I would sincerely appreciate any help/advice from the experts who read this list. I have contrived a simple example, but it gives the same result I encountered in a more complicated application. Given data frame u: x y 31 19 32 18 33 17 34 16 35 15 36 14 37 13 I define the function f as follows: f <- function(a,b) sum(u$x - a) + sum(u$y - b) One might think of a and b as "mean&quot...
2018 Jan 26
2
Run away memory with gluster mount
...out 12 hours now and the resident memory of the above > process is already at 7.5G and continues to grow slowly. If I stop the > test script the memory stops growing, but does not reduce. Restart the > test script and the memory begins slowly growing again. > > This is obviously a contrived app environment. With my intended > application load it takes about a week or so for the memory to get > high enough to invoke the oom killer. Can you try debugging with the statedump (https://gluster.readthedocs.io/en/latest/Troubleshooting/statedump/#read-a-statedump) of the fuse mount...
2017 Jan 19
2
Taking determinant of a matrix of NAs results in intermittent memory corruption
...on of the openblas package is the latest currently available for 14.04 LTS from the official ubuntu repository. 14.04 LTS is "supported" by Canonical until 2019. Also, I'm just confirming that I can repeat it. It's not an issue for me as it's never happened other than the contrived example. If someone brought it to my attention, I'd probably follow your original though and ask them if they really wanted the determinant of an unassigned matrix as it sounds like not a useful thing to do. Using rnorm to initialise the matrix works fine. I'd suggest the OP pursue it wi...