Questions tagged [multiparameter]

31 questions
17
votes
2 answers

How do ruby on rails multi parameter attributes *really* work (datetime_select)

I believe that datetime_select is black magic. What I'm really trying to figure out is the whole 1i,2i,3i,4i... multiple parameters stuff. Specifically how is it handled in the back end (activerecord, something else?). What's with the 'i' after…
Dean Stamler
  • 382
  • 4
  • 13
15
votes
7 answers

What Does ActiveRecord::MultiparameterAssignmentErrors Mean?

I have a rails form with a datetime_select field. When I try to submit the form, I get the following exception: ActiveRecord::MultiparameterAssignmentErrors in WidgetsController#update 1 error(s) on assignment of multiparameter attributes If it's…
Jason Wadsworth
  • 933
  • 1
  • 10
  • 18
10
votes
2 answers

In Haskell, is it possible to provide default implementation for partially applied multi-param type class?

For example, I have a type class : class MyClass a b c where fun01 :: a -> b fun02 :: a -> c fun03 :: a -> b -> c -> () fun04 :: a -> WhatEver I'd like to provide a default implementation for my, let's call it BaseDataType which…
Reygoch
  • 1,204
  • 1
  • 11
  • 24
6
votes
1 answer

How to Pass multiple parameter in Multivalue Converter Over WPF DataTrigger

I'm having four int Property ProOne, ProTwo, ProThree and ProFour I have to Implement the Boolean Logic ((ProOne == ProTwo) || (ProThree == ProFour)) in the Multivalue Converter namely VisibilityCheckConverter. Based on the Logic the Multivalue…
B.Balamanigandan
  • 4,713
  • 11
  • 68
  • 130
4
votes
2 answers

Is it possible to write a repeated-parameter function through function literal in scala ?

As we know that we can define a repeated-parameter (varargs) function in scala, like this: def func(s: String*) = println(s) My question is how to rewrite the above in function literal style. Or is it impossible to do that? Note: (s: String) =>…
爱国者
  • 4,298
  • 9
  • 47
  • 66
2
votes
4 answers

Overlapping multi-parameter instances and instance specificity

{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} module OverlappingSpecificsError where class EqM a b where (===) :: a -> b -> Bool instance {-# OVERLAPPABLE #-} Eq a => EqM a a where …
2
votes
1 answer

How to support multiparameter attributes in a rails form object?

I have a form object using the pattern defined here: https://forum.upcase.com/t/form-objects/2267 class RegistrationForm include ActiveModel::Model attr_accessor :first_name, :last_name, :date_of_birth ... end Unlike that example, one of the…
tommarshall
  • 2,038
  • 5
  • 23
  • 36
2
votes
1 answer

how do i parse string or extract text that lies between multi parentheses, colon, brackets, semi colon and much more special characters in c# ASP.Net

how do i parse string or extract text that lies between multi parentheses, colon, brackets, semi colon and much more special characters in c# ASP.Net string 1:…
2
votes
1 answer

Multiple parameters in method issue

My first shot at creating a method with multiple parameters. Still trying to wrap my head around how Objective C does things. Been banging my head for a couple days on this now. Finally ready to ask for help. Searched and tried many posts here on…
J C
  • 63
  • 1
  • 7
2
votes
1 answer

rest services with many conditions

everyone =) I'm kind of novice in rest services, so I'm not sure if some features are possible. For instance I have a list of items and many ways to filter those before delevering to a client app. I'm using .net, linq & wcf rest service with json…
Vital
  • 91
  • 1
  • 6
1
vote
1 answer

Minimization gives weird result (multi-parameter fitting)

I'm working on fitting of the experimental data. In order to fit it I use the minimization of the function of residual. Everything is quite trivial, but but this time I can't find what's wrong and why the result of fitting is so weird. The example…
1
vote
1 answer

Python fmin - TypeError: float() argument must be a string or a number, not 'tuple' ValueError: setting an array element with a sequence

I am trying to minimize my likelihood function with the par parameter only, the rest: n,T,r,log_x, gft_y are supposed to be fixed in the optimization. When I put them in the args to fix them I get back the following errors: TypeError: float()…
1
vote
0 answers

Post multipart imagens using Fast Android Networking

I'm using Fast Android Networking library in my project. My goal is to make a post with multiple parameters, like the image above. enter image description here What I'm trying to acomplish is to send a file with image from my app to a…
RAL
  • 17
  • 4
1
vote
0 answers

ActiveRecord::MultiparameterAssignmentErrors when a parameter was left blank in date_select

I'm having trouble validating date fields using date_select helper from form_builder, whenever one of the parameters is left blank (e.g year params). I'm using the validates_timeliness gem and it works perfectly with datetime_select however it…
1
vote
1 answer

Predicate with forall quantifier in haskell?

I want to write the function which accepts values of types, which has instances of multiparameter type class together with every type. Something like this (signature of test function is illegal): class Test a b test :: forall a. (forall b. Test a…
leventov
  • 14,760
  • 11
  • 69
  • 98
1
2 3