Quantcast
Channel: Active questions tagged constraints - Stack Overflow
Browsing latest articles
Browse All 124 View Live

Image may be NSFW.
Clik here to view.

Rounded UIButton - iPad size

I have custom UIButton to have rounded edgesimport UIKitclass RoundedButton: UIButton { override init(frame: CGRect) { super.init(frame: frame) self.layer.cornerRadius = self.bounds.width * 0.5...

View Article



Form Constraints on File Skipped

I'm working with Symfony 5.4.I tried using the constraints parameter in my FileType.php but it looks like it doesnt work, nothing seems happen, do u have an idea ? I checked the documentation and my...

View Article

Integers into random order with constraints in R?

I want to sample integers in R, but also set constraints that for example, "3 comes always before 2" and "8 comes always before 5".EDIT: The integers need not to be next to each other, for example,...

View Article

MYSQL ignores not null constraint, inserts null values into table and only...

I am using MYSQL versoin 14.14 Distrib 5.7.40, for Linux (x86_64). I have created a table with 3 columns and the columns have NOT NULL constraints set. Then when I try to insert null values directly...

View Article

Generate random trajectory for aircraft in 3D world (Python)

I have a 3D world in Python with terrain where I want to be able to generate airplanes flying in the world with random trajectories. The terrain should be some type of constraint so the airplanes do...

View Article


Constraints in Symfony

I have a class called Student with a StartDate and EndDate. I would like to add an \@Assert() where it verifies that StartDate is always BEFORE EndDate. This is what I have thus but the error message...

View Article

MySQL: Constraining a set of columns so at least one is not NULL

I want to have a SQL table with two columns. One is a key into another table, the other holds a string literal. The idea is phone numbers can be entered either exactly (in which case the ID into the...

View Article

How to force grouping the lessons for the same series of students in the same...

I want to enforce the student groups from the same series of students to be in the same Timeslot and in the same Room for a Course Type.This is my attempt:Constraint...

View Article


Can't display the simplest UIToolbar without UIKit complaining

I thought I could easily display a toolbar in UIKit, but I was wrong, or at least I can't do so without getting "Unable to simultaneously satisfy constraints." console messages.Here is my code:import...

View Article


cannot infer V: infer type parameter from constraint implementation

I have an interface in go which wants to support saving and loading results in different databases and I want to support different types.package cfgStoragetype WritableType interface { ~int | ~string |...

View Article

Auto-increment in label height in ios if Web-services data is more

By using this code will showing the value of Web-services, but I want to auto increase the height as more data is coming.[cell.Label setText:[NSString stringWithFormat:@" %@",[detailsDict...

View Article

ERROR: check constraint "to_uppercase" of relation "my_table" is violated by...

I try to run following script:ALTER TABLE my_table ADD CONSTRAINT to_uppercase CHECK (upper(my_name) = my_name);but when I do I receive the error: ERROR: check constraint "to_uppercase" of relation...

View Article

Symfony 7 : Expected argument of type "string", "null" given at property path...

It's mainly a question of understanding, because I've found a solution, but I'm not really convinced.I've two methods, new and edit as shown below : #[Route('film/new', name: 'app_film_new', methods:...

View Article


How to restrict T to certain specific value types using a constraint?

I want to restrict the possible types N can take-on using a constraint. I wish to restrict N to be either a int or a decimal.public static Chart PopulateInto<T, N>(List<T> yAxis,...

View Article

Multiple Linear Regression with specific constraint on each coefficients on...

I am currently running multiple linear regression on a dataset. At first, I didn't realize I needed to put constraints over my weights; as a matter of fact, I need to have specific positive &...

View Article


CheckConstraint in sqlalchemy not working as expected

I have been using this model for a sqlite3 server for a while where the CheckConstraint only had those first two lines and it seemed to be working fine. I wanted to allow another case represented in...

View Article

Problem with implementation of the knapsack problem using DEAP library in...

I am currently working in an implementation of the knapsack problem in python using the libray DEAP. I have to maximize the benefit and minimize the preference. The problem cannot have more elements...

View Article


Constrain C# generic type to one of multiple types

Here are generic examples of some overloaded DoTypeSpecificWork() C# functions that I have.void DoTypeSpecificWork(byte[] data) // an array type (a reference type){ // Do type-specific work // ...}void...

View Article

Imputing a categorical variable with constraint in MICE package in R

I would like to ask for help and advice.I have a dataset where one nominal variable has 4 values, all have some presence in the dataset. Some data were lost, but it is known that the missing values can...

View Article

Constraints in PyChoco using %2

I use PyChoco.I have three vectors of 0 and 1 named O1, O2, O3 and I would like to write the constraint:O3 = (01 + O2) %2 The best I have done:O1 = model.intvars(2,0,1)O2 = model.intvars(2,0,1)O3 =...

View Article

How to detect when all the bounds are initialized in UIKit?

I have this setup:there is a view-controlleron viewDidLoad, I am adding the following views and constraints:a scroll view with edges mounted to the viewa scroll content view with edges and width equal...

View Article


How to Create a Conditional Unique Constraint Based on Latest Updates in SQL

I have a log table that tracks updates, structured like this:CREATE TABLE user_log ( name_id VARCHAR, modified DATE, -- Other fields...);I aim to implement a unique constraint based on the name_id,...

View Article


Image may be NSFW.
Clik here to view.

How to solve constraints issue: Position is ambiguous for UIButton?

I have placed UIButton to right view of textfield. But I see the below warning My code for UIButton:private lazy var myButton : UIButton = { let button = UIButton() var config =...

View Article

Merge table rows that are referenced as foreign keys in other tables

I have a table companies in which there are some duplicated rows I found with a simple GROUP BY name.This companies table has a PRIMARY KEY id which is referenced in several other tables, under the...

View Article

What is point of constraint validation @Null?

I was checking list of available constraints in javax.validation package and I noticed that there is an annotation @Null which force the field to be null.I do not understand what is point of adding it...

View Article


Why is this constraint function so much slower than a similar one and how do...

I have an optimization that has around 22 constraint functions. I tried to turn that into a single constraint function and the optimizer is taking 10x as long. Any way to reduce the speed?The below are...

View Article

MATLAB fmincon with non linear constraints

I need to minimize the fisher information determinant in order to get some optimized yaw rates the the AUV model to follow an optimal path.The minimization function contains some non linear constraints...

View Article

Sets and Constrains in Pyomo

I have the following problem:I would like to define multiple Constraint in Pyomo.I have an indexed Set, where every row has an index (1,2,3..n_generators) and they corresponds to different time...

View Article

Migration Constraint to jetty 12 ee10

how can i migrate this part of code to jetty 12 and jetty.ee10.servlet.security?public class BasicSecurityHandler extends ConstraintSecurityHandler{ public BasicSecurityHandler() { super(); //...

View Article



Convert XML Constraint Layout to Jetpack Compose Constraint Layout - Chain...

I am trying to create a specific layout with two views: a TextView and an ImageView. The TextView is dynamic, meaning the length of the text can vary. If the length of the text is less than the width...

View Article
Browsing latest articles
Browse All 124 View Live




Latest Images