Displaying 20 results from an estimated 100 matches for "40,10".
Did you mean:
409,10
2010 Oct 08
4
function using values separated by a comma
Hello,
I have a dataframe (tab separated file) which looks like the example below -
two values separated by a comma, and tab separation between each of these.
[,1] [,2] [,3] [ ,4]
[1,] 0,1 1,3 40,10 0,0
[2,] 20,5 4,2 10,40 10,0
[3,] 0,11 1,2 120,10 0,0
I would like to calculate the percentage of the smallest number separated by
the comma by:
1) summing the values e.g. for [1,3] where 40,10, 40+10 = 50
2) taking the first value and dividing it by the total e.g. for [1,3], 40/50
= 0.8...
2010 Dec 11
2
Predator Prey Models
Dear R-users,
I am currently modifying a previously developed predator prey model and
was curious if there was a way to add in a disturbance to the model (let's
say at time t=100). The disturbance can be the introduction of 40 prey
(N=40) and 10 predators (Pred = 10). I would like to see my model go from a
state of equilibrium (up to t = 99), show this disturbance (at t = 100) and
then slowly work its way back to equilibrium. Does anybody know if this
could be done?
LVmod0D <- function(Time, State, Pars) {
with(a...
2013 Dec 09
3
[PATCH] sysprep: mention globbing in help for --delete
Followup of ed4bcb119cb908e98ecc1107dcd8b740ee2f484f.
---
sysprep/sysprep_operation_delete.ml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sysprep/sysprep_operation_delete.ml b/sysprep/sysprep_operation_delete.ml
index 59d5485..a08d4d0 100644
--- a/sysprep/sysprep_operation_delete.ml
+++ b/sysprep/sysprep_operation...
2011 Aug 24
1
[LLVMdev] Segmented Stacks (re-roll)
...::runOnMachineFunction(MachineFunction &MF) {
> + return false;
> +}
> +
It is, in the next patch.
diff --git a/lib/CodeGen/StackSegmenter.cpp b/lib/CodeGen/StackSegmenter.cpp
index 5ffb8f2..cc2ca87 100644
--- a/lib/CodeGen/StackSegmenter.cpp
+++ b/lib/CodeGen/StackSegmenter.cpp
@@ -40,7 +40,10 @@ void StackSegmenter::getAnalysisUsage(AnalysisUsage
&info) const {
}
bool StackSegmenter::runOnMachineFunction(MachineFunction &MF) {
- return false;
+ const TargetFrameLowering &TFI = *MF.getTarget().getFrameLowering();
+ TFI.adjustForSegmentedStacks(MF);
+ // adjust...
2017 Oct 09
1
[PATCH nbdkit] tests/tls: fix qemu-img check
...Also, check that qemu-img actually has the --object option, since the
test uses it.
---
tests/test-tls.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/test-tls.sh b/tests/test-tls.sh
index 73d44fa..7a6c949 100755
--- a/tests/test-tls.sh
+++ b/tests/test-tls.sh
@@ -40,10 +40,14 @@ if ! ss --version; then
echo "$0: 'ss' command not available"
exit 77
fi
-if ! qemu-img --help; then
+if ! command -v qemu-img > /dev/null; then
echo "$0: 'qemu-img' command not available"
exit 77
fi
+if ! qemu-img --help | g...
2012 Oct 02
2
[PATCH] fix ARM longjmp with zero 'val'.
...conditional
execution to eliminate branch and reduce size.
Signed-off-by: Bill Pringlemeir <bpringle at sympatico.ca>
diff --git a/usr/klibc/arch/arm/setjmp.S b/usr/klibc/arch/arm/setjmp.S
index 92ffc43..9f96274 100644
--- a/usr/klibc/arch/arm/setjmp.S
+++ b/usr/klibc/arch/arm/setjmp.S
@@ -40,10 +40,9 @@ setjmp:
.type longjmp, #function
longjmp:
ldmia r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
- mov r0, r1
- bne 1f
- mov r0, #1
-1: BX(lr)
+ movs r0, r1
+ moveq r0, #1
+ BX(lr)
.size longjmp,.-longjmp...
2016 Feb 06
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...)
+ endif()
endif()
if(CMAKE_VERSION VERSION_LESS 2.8.12)
Index: cmake/modules/LLVM-Config.cmake
===================================================================
--- cmake/modules/LLVM-Config.cmake (revision 259743)
+++ cmake/modules/LLVM-Config.cmake (working copy)
@@ -40,10 +40,17 @@
# done in case libLLVM does not contain all of the components
# the target requires.
#
- # TODO strip LLVM_DYLIB_COMPONENTS out of link_components.
+ # Strip LLVM_DYLIB_COMPONENTS out of link_components.
# To do this, we need special handling for "all&quo...
2009 Aug 13
1
[PATCH libguestfs] tests: increase likelihood that heap abuse triggers failure
...ys set
MALLOC_PERTURB_ to a random value in 1..255.
---
regressions/Makefile.am | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/regressions/Makefile.am b/regressions/Makefile.am
index a51c76b..3279f95 100644
--- a/regressions/Makefile.am
+++ b/regressions/Makefile.am
@@ -40,7 +40,10 @@ SKIPPED_TESTS = \
FAILING_TESTS = \
test-qemudie-launchfail.sh
+random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
+
TESTS_ENVIRONMENT = \
+ MALLOC_PERTURB_=$(random_val) \
LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
LIBGUESTFS_PATH=$(to...
2017 Oct 08
1
[RFC PATCH 03/29] subdev/volt/gk104: return error when read fails
...+++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drm/nouveau/nvkm/subdev/volt/gk104.c b/drm/nouveau/nvkm/subdev/volt/gk104.c
> index 1c744e02..53a7af9d 100644
> --- a/drm/nouveau/nvkm/subdev/volt/gk104.c
> +++ b/drm/nouveau/nvkm/subdev/volt/gk104.c
> @@ -40,10 +40,15 @@ gk104_volt_get(struct nvkm_volt *base)
> {
> struct nvbios_volt *bios = &gk104_volt(base)->bios;
> struct nvkm_device *device = base->subdev.device;
> - u32 div, duty;
> + int div, duty;
>
> div = nvkm_rd32(device, 0x20340);
> + if (div <...
2016 Feb 09
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...{test_name})
get_target_property(test_suite_folder ${test_suite} FOLDER)
Index: cmake/modules/LLVM-Config.cmake
===================================================================
--- cmake/modules/LLVM-Config.cmake (revision 260200)
+++ cmake/modules/LLVM-Config.cmake (working copy)
@@ -40,10 +40,17 @@
# done in case libLLVM does not contain all of the components
# the target requires.
#
- # TODO strip LLVM_DYLIB_COMPONENTS out of link_components.
+ # Strip LLVM_DYLIB_COMPONENTS out of link_components.
# To do this, we need special handling for "all&quo...
2010 Nov 30
1
Zooming in to a ggplot (a sort of ylim, but ylim won't do)
...trying to chop-off anything below zero (this for the example
only)
trunc_rnorm <- function(n, mean = 0, sd = 1, lb = 0)
{
lb <- pnorm(lb, mean, sd)
qnorm(runif(n, lb, 1), mean, sd)
}
# generate my data, this is not important
rsp<-trunc_rnorm(160,mean=c(
rep(20,10),rep(25,10),rep(40,10),rep(45,10),
rep(20,10),rep(27,10),rep(42,10),rep(45,10),
rep(20,10),rep(30,10),rep(44,10),rep(45,10),
rep(20,10),rep(30,10),rep(44,10),rep(45,10)),
sd=c(rep(c(60,2,2,3),each=10,len=160)),
lb=c(rep(c(0,0,0,0),each=10,len=160)))
d<-rep(c(rep(1,10),rep(2,10),rep(3,10),rep(4,10)),4)
v<-re...
2006 Nov 23
0
[753] trunk/wxruby2/swig/classes/include/wxListBox.h: Added back in client data functions for listbox
...int Append(const wxString& item , wxClientData * clientData );
</span><span class="cx"> virtual void Append(const wxArrayString& strings );
</span><span class="cx"> virtual void Clear();
</span><span class="lines">@@ -40,10 +40,10 @@
</span><span class="cx"> virtual wxString GetString(int n ) const;
</span><span class="cx"> virtual wxString GetStringSelection() const;
</span><span class="cx"> virtual void Insert(const wxString& item , in...
2011 Sep 26
4
Testing for arguments in a function
I don't understand how this function can subset by i when i is missing....
## My function:
myfun = function(vec, i){
ret = vec[i]
ret
}
## My data:
i = 10
vec = 1:100
## Expected input and behavior:
myfun(vec, i)
## Missing an argument, but error is not caught!
## How is subsetting even possible here???
myfun(vec)
Is there a way to check for missing function arguments, *and*
2002 Jan 02
2
macosx (lots of little changes)
...else
if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0)
+#endif
DEBUG("pthread_sigmask failed");
}
I was getting segfaults using NULL instead of the dummy variable.
--- ogg123/callbacks.c.orig Wed Jan 2 01:25:13 2002
+++ ogg123/callbacks.c Tue Jan 1 18:14:29 2002
@@ -40,10 +40,11 @@
audio_reopen_arg_t *reopen_arg = (audio_reopen_arg_t *) arg;
audio_device_t *current;
ao_sample_format format;
+ int dummy_o;
/* We DO NOT want to get cancelled part way through this and have our
audio devices in an unknown state */
- pthread_setcancelstate(PT...
2002 Jan 02
2
macosx (lots of little changes)
...else
if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0)
+#endif
DEBUG("pthread_sigmask failed");
}
I was getting segfaults using NULL instead of the dummy variable.
--- ogg123/callbacks.c.orig Wed Jan 2 01:25:13 2002
+++ ogg123/callbacks.c Tue Jan 1 18:14:29 2002
@@ -40,10 +40,11 @@
audio_reopen_arg_t *reopen_arg = (audio_reopen_arg_t *) arg;
audio_device_t *current;
ao_sample_format format;
+ int dummy_o;
/* We DO NOT want to get cancelled part way through this and have our
audio devices in an unknown state */
- pthread_setcancelstate(PT...
2014 Aug 14
1
Encoder example for 24-bit files
...ls = 2;
>> - bps = 16;
>> + channels = ((unsigned)buffer[23] << 8) | buffer[22];
>> + bps = ((unsigned)buffer[35] << 8) | buffer[34];
>> total_samples = (((((((unsigned)buffer[43] << 8) | buffer[42]) << 8)
>> | buffer[41]) << 8) | buffer[40]) / 4;
>>
>
> I suspect that the expression for total_samples should be not
>
> (.....) / 4
>
> but
>
> (.....) / (channels * bps/8)
Yes, that's correct.
Here is the final diff I used to use the example to convert the 24bps file:
diff --git a/examples/c/encode/f...
2019 Apr 29
1
[nbdkit PATCH] nbd: Give some examples
...lugin along with nbdkit
+filters (adding I<--filter> to the nbdkit command line) makes it
+possible to apply any nbdkit filter to any other NBD server.
For now, this is limited to connecting to another NBD server over a
named Unix socket without TLS, although it is feasible that future
@@ -40,10 +42,38 @@ empty string).
=back
+=head1 EXAMPLES
+
+Expose the contents of an export served by an old style server over a
+Unix socket to TCP network clients that only want to consume encrypted
+data. Use I<--exit-with-parent> to clean up nbdkit at the same time
+that the old server exit...
2018 Nov 07
2
Re: [PATCH v3 3/3] v2v: linux: install QEMU-GA (RHBZ#1619665)
...inspect drv_name drv_pciid =
> let ddb_node = g#hivex_node_get_child root "DriverDatabase" in
>
> diff --git a/v2v/windows_virtio.mli b/v2v/windows_virtio.mli
> index 91b3ced45..fa9997829 100644
> --- a/v2v/windows_virtio.mli
> +++ b/v2v/windows_virtio.mli
> @@ -40,6 +40,10 @@ val install_drivers
> virtio devices if we managed to install those, or legacy devices
> if we didn't. *)
>
> +val install_linux_tools : Guestfs.guestfs -> Types.inspect -> unit
> +(** installs QEMU Guest Agent on Linux guest OS from the driver direc...
2011 Aug 23
0
[LLVMdev] Segmented Stacks (re-roll)
On Aug 23, 2011, at 9:24 AM, Sanjoy Das wrote:
> Hi!
>
>> diff --git a/lib/CodeGen/StackSegmenter.cpp b/lib/CodeGen/StackSegmenter.cpp
>> new file mode 100644
>> index 0000000..5ffb8f2
>> --- /dev/null
>> +++ b/lib/CodeGen/StackSegmenter.cpp
>> @@ -0,0 +1,48 @@
>> +//===-- StackSegmenter.h - Prolog/Epilog code insertion -------*- C++ -* --===//
2017 Sep 15
0
[RFC PATCH 03/29] subdev/volt/gk104: return error when read fails
...au/nvkm/subdev/volt/gk104.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drm/nouveau/nvkm/subdev/volt/gk104.c b/drm/nouveau/nvkm/subdev/volt/gk104.c
index 1c744e02..53a7af9d 100644
--- a/drm/nouveau/nvkm/subdev/volt/gk104.c
+++ b/drm/nouveau/nvkm/subdev/volt/gk104.c
@@ -40,10 +40,15 @@ gk104_volt_get(struct nvkm_volt *base)
{
struct nvbios_volt *bios = &gk104_volt(base)->bios;
struct nvkm_device *device = base->subdev.device;
- u32 div, duty;
+ int div, duty;
div = nvkm_rd32(device, 0x20340);
+ if (div < 0)
+ return div;
+
duty = nvkm_rd32(d...