Assign Questions
Ad
Gettimeofday not working when assigned to variable
I have a simple timestamp issue. i am trying to get a timestamp using gettimeofday and it all works as it should when i print the
MISRA: Compound Assignment operators
I have taken over code that has a lot of compound assignment operators in it. i think that compound operators are not 'really' misra compliant. i
Flex 3: Data assignment to a subcomponent fails in an MXML component in the action script block
I'm trying to propagate an assignment to the data parameter of a sub-component through it's parent component's setter. like this:
How to convert this line of code from Python to Julia?
In brief, i have the code below in python [n, m] = f() and i want to convert it to julia, which will not be more
Assigning using += gives NaN in javascript
Assignment a number to an attribute using the += operator gives me nan in javascript. this code works as
having some confusion about c pointer assignment
I'm having some trouble wrapping my head around pointer assignments in c. the asterisk character appears in many different locations and i don't
JavaScript - Use addition on values of multiple dynamically created objects with same name in array
I have an array of objects that's created dynamically (in react, although i don't think it matters), and i'm attempting to use addition on values
a more pythonic way to split a column in multiple columns and sum two of them
Sample code: import pandas as pd df = pd.dataframe({'id': [1, 2, 3], 'bbox': [[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0], [9.0,
Stuck with the "Expected an assignment or function: no-unused expressions"
I'm really going crazy here and hoping someone can help me with this problem. i have the following code inside my model: this.text
Object is null since the second method call
With the following code, the script enters in the block of if (myset! = null) only at the first call of the method.
Ad
Assignment operator, map and promises. What's wrong with that code ? Javascript
I was doing some stuff and i ran into a problem that i can't understand. i simplified the code to get that:
Don't understand how JavaScript assign operator interacts with a function
My problem is that i don't understand how assign operator is interpreted and interacts with a function. let me explain i was changing the
Flutter GetX RxList assign issue
Im trying to convert old code to new code syntax. i have a issue with rxlist.
Button assigned with function wont do as i tell it too
Im trying to create a script. the goal is that the user will put in 3 numbers in 3 boxes, and click a button to display the highest number inside
Disable mass assignment protection for all models across all tests
Is there a way to disable mass assignment protection for all models across all tests without having to duplicate this over and over?
Why can I go out of bounds with the assignment opeator but not with the {}
My question is pretty straightfoward: why can i assign a value that goes out of bounds to an array like this, but not with the {} operator:
How do you assign an Array inside a Dockerfile?
I have tried a number of different ways to assign an array inside a run command within a dockerfile. none of them seem to work. i am
Combined assignment operator in a while loop condition in C
I really have a hard time understanding how the following piece of code works: int x = -2; while ( --x > -10 && (x -=
Construct an assignment matrix - Python
I have two lists of element a = [1,2,3,2,3,1,1,1,1,1] b = [3,1,2,1,2,3,3,3,3,3] and i am trying to uniquely
How to make pd.Dataframe column assignment faster?
So i am trying to add columns to an existing dataframe with mostly logical comparisons: def qualitycheck(data, qparams, qid):
Reshape changes assignment rules
I have this sample code where the value of 'a' is not explicitly updated in the logic of the code. yet, when i print the output- both the
Ad
I would expect the output to be like [[0,0,0,0,],[0,1,0,0],[0,2,0,0],[0,3,0,0]]
Time_count = [[0, 0, 0, 0]] * 4 j = 0 for i in range(len(time_count)): time_count[i][1] = j j += 1 print(time_count)
ReferenceError: Invalid left-hand side in assignment while using "+="
I'm trying to solve this following kata on codewars: strip
How can an assignment statement "x = y := f(x)" be done when using assignment expressions in Python?
I read in twitter: #python
Changing JavaScript function's parameter value using arguments array not working
I am learning javascript and am pretty confused about the arguments property array. i have a function that takes a single
How are expression values stored before they become assigned in C?
Beginner question here; in c, when you assign a numerical value to a variable, the language makes it clear that the variable has a specific type,
What does *= do?
Hey i am kinda new to c and i wanted to ask why this prints out 4 instead of 260? #include
Weird register hex value 0x010000edu in QEMU edu PCI device
In the sourcecode for the qemu edu pci device,
Mass Assignment issue with `updateOrCreate` in Laravel, why?
I have a very simple model: class employee extends \eloquent { } and what i would like to do is to synchronize
Why is it that I can't assign values to member variable of structures outside functions?
I can't change variable value outside functions. this code below throws up an error #include <stdio.h> #include
Compilation fails with "expected expression before '{' token"
I'm trying to initialize ip_addr in a clean way and the library is giving me the ipaddr4_init macro but it seems that i
Ad
Assignment operation on variable in struct not working
I am writing a c program and have been debugging for a few days now. i think i have figured out the problem. here is a snippet of code and
Can assignment operator be used in if statements. As if statements are used Boolean expression
I was expecting an error in if(b=5), as the assignment operator is used in if statement. code: #include
Calculate the mean of an array of n numbers in C
I'm new to c and i'm trying to master the basics so i've written a program which gives you the mean of tree numbers and it works, but when i try
C multiple variable assignment
I'm first year student in software engineering and in my last task i used (chain assignment) multiple assignment of values. the lecturer
Assign string to int in C
I have this code below: #include <stdio.h> int main(void) { int i = "hello world"; printf("%d", i); return 0;
Referencing a variable to an existing array
I'm pretty new to c and starting to play with pointers. i haven't found a way to assign an array to multiple variables. what i want ideally is:
What does = { 0 }; mean in a structure initialization in C?
When setting a struct variable as follows: wndclassw wc = {0}; what does the initialization with
Laravel DB update on primary keys works with a raw array but not with a variable
I initially wanted to use eloquent: $product->quantity_discounts() ->where('min_amount', $discount['min_amount'])
Store foreign key value in laravel
In migration table: schema::create('passws', function (blueprint $table) { $table->increments('id');
What happens when opeator= returns void rather than T&?
In operator overloading, the assignment operator is normally defined as follows: t& t::operator =(const t2& b);
ReferenceError: Invalid left-hand side in assignment when really assigning a value
Why does this snippet in node (10.5) .then(function() { this = {...this, ...payload}; this.update();
Ad
When I have a condition `if (bool = true)`, the else branch is never hit. Why?
Here's the challenge: create a function makeplans that accepts a string. this string should be a name. the function makeplans
destructuring assignment default value
I am learning javascript and i got kind of stuck with es6 syntax while trying to give a default value to a variable when destructuring. basically,
Python 3: How can I take a value in a variable and convert that to a unicode character?
I'm trying to take a value and turn it into a unicode character, either by name or by value. every example i've seen has values hard-coded into
Unity. Assign data to the game when first installed?
Can you help me how to assign the initial data to the game. i used the playerprefs.getint, setint class, in the game. but when calling it in start
More concise assignment for elements in a list (Python)?
How can i do the following in a more concise, "pythonic" way: for element in some_list: if some_condition:
Add a Rand to each row using Pandas' Assign and a Lambda Function
How do i pass a random number to a lambda function, so that i can be used by the pandas assign to add a different random number to
Model returns relation´s dynamic attributes but null relation
I have set 2 models (post and category) with it´s proper relationships configured class post extends model { protected
Z3 Python: ordering models and accessing their elements
In z3 (python), imagine i get a model with the following shape: [c_0 = true, c_3 = false, c_1 = false, c_2 = false]
In Java, how to assign the variable number=Integer.parseInt(args[0]) a value if no argument is passed?
I wrote this simple program, that takes a command line argument, converts it into int type, and prints integers starting from that number till
Matrix assignment in place?
Suppose i initialize a matrix as follows: import scipy m = scipy.zeros((10, 10)) now i do some calculations, and
Laravel 5.2 Model $fillable gets ignored?
I have a simple model isolatedquery which consists of a name and query field. i have defined those two
Ad
Laravel eloquent Mass assignment from multi-dimentional array
I'm creating a restful application, so i'm recieving a post request that could seem like this $_post = array ( 'person' =>
Javascript Object Composition with assign & Object.create
Trying to wrap my head around javascript composition using assign. the
Javascript: How can I mix in methods of another Object B to my Object A without copying but with linking?
If i create an object a: let a = {}; and want to mix in methods from another object b: let b = {
Pass product variable Shopify to snippet
Set-up i have a shopify shop with the debut theme. in the product-card-grid.liquid file of the theme,
Laravel 4.2 force mass assignment on createOrUpdate and similar methods?
I've been working on an api for awhile now that has a sort of 'soft' api validation so i can use backbone more easily on the front end. basically
Shorthand assignment operator for inverting boolean
There are shorthand operators for the basic arithmetic operators, such as: x = x+2; x += 2; or y
Laravel 5 : MassAssignmentException in Model.php
I am getting this error: massassignmentexception in model.php line 448: _token when i am using create method.
PHP: Slim Framework/Eloquent ORM mass assignment error
I am using eloquent with slim framework outside of laravel, i have controllers that help perform crud operations. when i try to perform mass assignment operation eloquent
shopify click on different button will run different liquid code
If a user click on a button which has class name: '3-col', it will execute the following code: '{% assign products_per_row = "3" %}'. and if a user click on a
Creating default object from empty value - Laravel 5
I dont know how fix this error, my code: $subscriptions = auth::user()->subscriptions; foreach($subscriptions as $subscription) { $subs =
Ad
Blog Categories
Ad