I have 2 stores and create CF products using import. How do I control the super attribute values for the second store as they are different to the values used for the default store?
You just need to add the proper values to the attributes needed.
Let's say an attribute shoe_size.
For EU store will have values: 40, 41, 42, 43, 44 and 45
For USA store will have values: 8, 9, 9.5, 10, 10.5 and 11.
So attribute shoe_size must have all those values included.
If you don't want to show all those values in product page or filters you can modify this in frontend displaying what you want or create two attributes: shoe_size_eu and shoe_size_usa.
Regards.
Related
I have created custom distribution in my model using option list.
First column is account ID. There are 3 types of account High , Low , Medium .
I want to create different scenarios in the model.
if user selects the High type of accounts then agents with High type should get generated at the source. Currently all agents with all account type are generated.
for a particular account type I want to change the custom distribution. e.g if user selects High type of account then the custom distribution for those account will be changed dynamically.
If below two accounts are High type then I want to change the distribution using percentage
before --->>
Account No of Observation
A-3929180 10
A-5414929 20
Let's increase the distribution by 50%
After--->>
Account No of Observation
A-3929180 15
A-5414929 30
I couldn't see any help around creating custom distribution using Option list in Java.
To build a customDistribution that you change during simulation runtime in any way, you can do it yourself by definining it as follows:
new CustomDistributionOfOptions(OptionList.values(),new double[] { 34.0, 4.0, 5.0, })
this is how you construct it programatically... so you have to create a variable of type CustomDistributionOfOptions and then set up a value for it as I mentionned.
The following can be an example of a function you might want to use to change your custom distribution:
double [] values=new double[OptionList.values().length];
int i=0;
for(OptionList o : OptionList.values()){
values[i++]=uniform(1,15);
}
customDist=new CustomDistributionOfOptions(OptionList.values(),values);
I'm using LL 25, trying to store a value from one table into a variable and then display it in a column in another table.
The values I need to store are being output as group footers.
Is this possible with User Variables or similar?
You can use the GetVar and SetVar functions for this purpose, as long as the value is first stored and then retrieved (i.e. the table referencing the value is printed after the table containing the value).
A simple SetVar("MyVariable", [ValueToStore]) is all it takes to store the value. Then use GetVar("MyVariable") to retrieve it later.
If the order is reversed, i.e. the table containing the variable is printed after the reference, you need to use a multi pass approach. I blogged about this very topic here:
Finally – a Glance in the Crystal Ball
This feature (i.e. the double pass) is available since version 26.GetVar and SetVar are available in 25 as well.
For older versions, the value can be precalculated and passed as variable/field.
I have an application where I need to keep the data in the same order as it is entered. The data is entered into a List property. Everything works great until I have to delete an item. When the delete occurs the last item on the List takes the place of the one that was deleted. The UITableView shows the correct number of items but is not synchronized with the realm List.
An example would be if I had data:
1, 2, 3, 4, 5, 6
I then delete:
3
The realm data looks like this:
1, 2, 6, 4, 5
The tableview looks like this:
1, 2, 4, 5, 6
The desired result of the realm data would match the tableview output.
Is there any way to keep the order of the data from changing after items are deleted?
Objects in a Realm are inherently unordered. If you wish to retrieve objects in a specific order that you control, you can do so by inserting them into a List property of an object, or by sorting the Results that you use to retrieve them.
I need to load data into a parent-child pair of tables with SQL Loader.
For various reasons the customer prefers to extract the data into one consolidated file, hence I'll have a data file containing main records (ID, First Name and Last Name) and then several phone numbers for each main record (ID, phone type, phone).
1, John, Doe
2, Mary, Doe
3, Sandy, Smith
1, home, 88899999
1, mobile, 7777777
2, home 6666666
3, office,3333333
3, mobile, 7777777
My goal is to load two tables: emp - with main record data and emp_phones with child records.
Is it possible to implement this with SQL Loader?
I can request from them to put some record "type" identifier in front of the line, like 'main', or 'phone' if it helps.
I would say that some sort of type indicator not just helps, but is required. SQL Loader has a "when" clause that will allow you to decide which table to load your records into.
In my app, I set my users information like:
set users:alex:age 30
set users:alex:heigth 1.8
set users:sly:age 32
set users:sly:heigth 1.95
Is there a way to get the list of users (alex, sly) without using a Set Or do I need to use a Set like:
sadd users users:alex
sadd users users:sly
and get the users with
smembers users
?
Using a set is the proper way to do it. You can also use keys users:*:age to get all users, but that would be much slower.
Also, instead of using users::age, users::height, you should use a hash in users: with "age" and "height" as keys.