I used the following html code for displaying FB «Like» button on our site:
<div class="fb-like" data-href="https://www.facebook.com/MyCompany?ref=hl" data-send="false" data-width="400" data-show-faces="false"></div>
On desktops everything looks fine. But I found out that on mobile devices data-width attribute is ignored and this is how the div with class fb-like looks after page is loaded:
<div class="fb-like fb_iframe_widget fb_iframe_widget_fluid" data-href="https://www.facebook.com/MyCompany?ref=hl" data-send="false" data-width="400" data-show-faces="false" fb-xfbml-state="rendered" fb-iframe-plugin-query="app_id=&href=https%3A%2F%2Fwww.facebook.com%2FMyCompany%3Fref%3Dhl&locale=en_US&sdk=joey&send=false&show_faces=false&width=400" style="display: block; width: 100%; height: auto;>
You can see that style attribute with «Width:100%» is added to the div. While on the desktops no inline style is added to this div.
In the console I receive the following error:
Viewport argument value "device-width;" for key "width" is invalid, and has been ignored. Note that ';' is not a separator in viewport values. The list should be comma-separated.
with link to the file like.php which belongs to Facebook.
I don’t know if this error message is connected with data-width problem on the mobile devices. Maybe someone already faced with this problem. I’ll appreciate any help or explanation.
That works. Thank you. Is it common practice to have a set of directories with a _hw.tcl and associated RTL somewhere, then to point to that from Platform Designer? I know with the IP packager tool in Xilinx, this is the preferred workflow.
Another issue I am having, and I can open another thread if need be, is that it seems like when I generate t he testbench system there is a file that is supposed to wrap the RTL in the new_component.v file from the component that the top level generated platform designer RTL file is instantiating. The module name is something like <name of the platform designer>_<name of the component>. I assume inside this module, there would be an instantiation of what is in new_component.v where I wrote my RTL
# ** Error: (vsim-3033) ./../fpga_ram_sim_tb/simulation/submodules/fpga_ram_sim.v(44): Instantiation of ‘fpga_ram_sim_oc_axi_lite_bfm_0’ failed. The design unit was not found.
# Time: 0 ps Iteration: 0 Instance: /fpga_ram_sim_tb/fpga_ram_sim_inst File: ./../fpga_ram_sim_tb/simulation/submodules/fpga_ram_sim.v
I am getting strange outputs from my workstation, which has ECC RAM.
Supposedly, from what I read, the data width should be at 64 bits and the total width at 72. But… data width shows as 64 and total width as 128.
Is this a problem with my configuration?
For reference, my motherboard is a MSI C236A WORKSTATION.
Handle 0x0042, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0041
Error Information Handle: Not Provided
Total Width: 128 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: DIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR4
Type Detail: Synchronous
Speed: 2133 MHz
Manufacturer: Micron
Serial Number: 18221400
Asset Tag: 9876543210
Part Number: 18ASF1G72AZ-2G1B1
Rank: 2
Configured Clock Speed: 2133 MHz
Minimum Voltage: Unknown
Maximum Voltage: Unknown
Configured Voltage: 1.2 V
Thanks,
Eduardo
asked Jun 2, 2016 at 15:58
You’re right that you should be seeing 72 bits
in that output, as DJ Bernstein describes, and as I quote from this concise answer on StackExchange:
- Data width = 64 (8 banks * 8 bits)
- Total width = 72 (9 banks * 8 bits)
- The extra bank indicates that ECC is active.
Your problem is almost definitely a BIOS bug. For my ASRock E3C224D2I, here’s what dmidecode -t memory | grep Total
shows for an old BIOS (P2.00) which incorrectly reports the data:
Total Width: 128 bits
If I update the BIOS to P3.50 I get:
Total Width: 72 bits
There’s a thread on the FreeNAS board which alludes to this, but I haven’t been able to figure out what the underlying detailed rationale for the bug is.
answered Oct 3, 2018 at 17:41
kikokiko
2611 silver badge8 bronze badges
Googling memory bus width shows the following Wikipedia page, which explains how things go: https://en.wikipedia.org/wiki/Memory_bandwidth
A short answer to your question is that dmidecode shows the actual width of the single memory module and width of the actual memory access. The actual memory bus is 128 bits, because the memory controller uses dual channel memory access, that is, two memory modules are handled as a single unit.
ECC bits are not included in the DMI information.
answered Jun 5, 2016 at 9:36
Tero KilkanenTero Kilkanen
35.8k3 gold badges38 silver badges62 bronze badges
4
Recommended Posts
-
- Report
- Share
hello,
I have a register model describing register with various size 16bits, 32 bits or 128 bits. In my uvm_reg_block this registers are well defined but when I tried to access the 128 bits register the data width of the transaction is only 32 bits instead of 128.
Futhermore, this issue happened only if the address of my 128 bits register is higher than my 32 bits register.
Would anyone have a rational explanation
- Quote
Link to comment
Share on other sites
-
- Report
- Share
hello,
I have a register model describing register with various size 16bits, 32 bits or 128 bits. In my uvm_reg_block this registers are well defined but when I tried to access the 128 bits register the data width of the transaction is only 32 bits instead of 128.
Futhermore, this issue happened only if the address of my 128 bits register is higher than my 32 bits register.
Would anyone have a rational explanation
hi,
did you extend `UVM_REG_DATA_WIDTH to 128? otherwise your reg fields can only store upto 64bits by default.
/uwe
- Quote
Link to comment
Share on other sites
- Author
-
- Report
- Share
Hello,
I did!
I also find the origin of my problem. In fact in my regmodel I made a mistake by declaring :
default_map = create_map(«default_map», ‘h6F80000, 4, UVM_BIG_ENDIAN, 0);
instead of:
default_map = create_map(«default_map», ‘h6F80000, 16, UVM_BIG_ENDIAN, 0);
thanks you
- Quote
Link to comment
Share on other sites
- 10 years later…
-
- Report
- Share
On 6/21/2011 at 1:56 AM, paul said:
hello,
I have a register model describing register with various size 16bits, 32 bits or 128 bits. In my uvm_reg_block this registers are well defined but when I tried to access the 128 bits register the data width of the transaction is only 32 bits instead of 128.
Futhermore, this issue happened only if the address of my 128 bits register is higher than my 32 bits register.
Would anyone have a rational explanation
Hi Paul
I have the same error as register model requires that UVM_REG_DATA_WIDTH be defined as 256 or greater. Currently defined as 64. How to change from 64 value ? Thanks
- Quote
Link to comment
Share on other sites
Join the conversation
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
-
#1
I ran dbtool and it appears to do nothing. As soon as I give an answer to the prompt about verbose level, I IMMEDIATELY get back to the linux prompt as if the tool has run and done everything in a nanosecond.
It is actually doing nothing as I the ODBC error messages continue.
I also noted that it didn’t care whether I chose 0 for single user or 1 for self-service or 2 (for more threads). It seems like this tool does nothing. (to be clear, I ran dbtool with the dbname as the parameter on the command line, then I chose option for SQL Width number 2 (I also chose option 1, but no difference).
Last edited: Apr 11, 2017
-
#2
Dbtool does in fact work, so you have some other issue. What it your version?
-
#5
Dbtool does in fact work, so you have some other issue. What it your version?
OpenEdge version is 10.2B07 on Red Hat Enterprise Linux Server release 6.5
I did not realize that dbtool does not display any error messages on screen when it fails.
So I found that it created a file called mydatabasename.lg
When I looked there it gave me the idea that maybe I haven’t specified my database correctly (I didn’t include a pathname because an example of running dbtool on progress.com implied that is what you do). But QAD has a page where it indicates the path is needed
(QAD Business Intelligence Documentation)
So I then ran
dbtool /mydirectorytreeofpaths/mydatabasename (with no .db extension)
nothing displayed onscreen, but now I know I need to look in my current directory for files to learn what happened. This generated a file called protrace.16274 which running cat on it displayed this on screen:
#1 [0x4584d8] dbut_uttraceback+0x144 from /apps/dlc/bin/dbtool
#2 [0x455d78] dbut_uttrace+0x13d from /apps/dlc/bin/dbtool
#3 [0x4441bd] dbExit+0x4d from /apps/dlc/bin/dbtool
#4 [0x45d6d7] dsmFatalMsgnCallBack+0x10b from /apps/dlc/bin/dbtool
#5 [0x4a6918] shmmsg+0x58 from /apps/dlc/bin/dbtool
#6 [0x4a60b3] shmAttachSegment+0x1ed from /apps/dlc/bin/dbtool
#7 [0x4a6122] shmVerifySegment+0x4e from /apps/dlc/bin/dbtool
#8 [0x4a6389] shmattsegs+0x118 from /apps/dlc/bin/dbtool
#9 [0x4a5701] shmAttach+0x31 from /apps/dlc/bin/dbtool
#10 [0x449eda] dbenv2+0x12d from /apps/dlc/bin/dbtool
#11 [0x4488e9] dbenv+0x69 from /apps/dlc/bin/dbtool
#12 [0x466f1b] dsmUserSecureConnect+0x7da from /apps/dlc/bin/dbtool
#13 [0x411b0f] myConnect+0x3f4 from /apps/dlc/bin/dbtool
#14 [0x40b71b] main+0x389 from /apps/dlc/bin/dbtool
#15 [0x77e1ed1d] __tls_get_addr@@GLIBC_2.3+0x77e1ed1d from /lib64/libc.so.6
Last edited: Apr 11, 2017
-
#6
I do not understand how either of those Progress KB’s will get ODBC to read (at least correctly) the data in the progress database.
Last edited: Apr 11, 2017
-
#7
Yeah, I’m sure it does once I learn exactly how to use it and why the way I am using it doesn’t work.
It seems to be too critical a tool not to. I think I saw somewhere that QAD has a menu option somewhere to run dbtool on its data. I will search for that.
-
#8
The auto truncate options prevent ODBC from reporting errors if the data is too wide for ODBC’s idea of what it should be.
Whether that is the «correct» choice or not is in the eye of the beholder. Over the years many people have said that’s what they wanted though.
-
#9
The auto truncate options prevent ODBC from reporting errors if the data is too wide for ODBC’s idea of what it should be.
ODBC generated an error on my environment when I tried to connect after I added this option to the DSN
[DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Invalid Connection Property in Connection Property string
The ODBC driver is the one you can currently download from QAD which is for 11.6 and earlier Progress databases (though it wouldn’t surprise me if this specific scenario of special settings and versions of drivers and DBs has not been verified to work). Specifically the ODBC Administrator lists this driver name as Progress OpenEdge 11.6 Driver and in the version column for the driver itself it lists 7.10.05.167.
-
#10
The options for truncating data and altering the meta-schema are only available starting in OE 11.5.
I’d suggest running dbtool manually first before resorting to some «automagic» option. I can’t say for sure but based on the call stack, my semi-educated guess is that your userid doesn’t have permission to attach to the database’s shared memory segment(s). Can you connect a shared-memory client without errors? E.g. mpro /mydirectorytreeofpaths/mydatabasename
-
#11
My employer is still only in the evaluation phase of QAD 2016 which uses Progress 11.6. For my need today the I might be able to use that evaluation database. For longer term knowing the 11.5 requirement might give some workaround. I’ll explore that later. But for right now, it seems I need to debug the stack dump.
If you know QAD, then maybe saying that I am connecting using the same Linux user account that runs the QAD system (which I guess is the database creator/owner of the progress database I’m trying to run dbtool on.)
I guess that is why I was able to run your suggested command (mpro /mydirectorytreeofpaths/mydatabase and that environment came up. I don’t know how to use that environment, so I don’t know if I needed to do something more to check my system.
I did run sqlexp -db mydatabasename -S mydblistenerport
and then I could do something simple like Select top 10 * from sysprogress.systables
which if I had tried to do this via ODBC I would get some error about data widths being wrong.
-
#12
I managed to get this call stack, pretty close to yours, by creating a db as root, chowning the db log file so I had write permission on it, and running dbtool with my non-root userid:
Code:
#1 [0x455562] dbut_uttraceback+0x12b from /u/DLC/11.6/oe/bin/dbtool
#2 [0x45247b] dbut_uttrace+0x139 from /u/DLC/11.6/oe/bin/dbtool
#3 [0x43d6f0] dbExit+0x47 from /u/DLC/11.6/oe/bin/dbtool
#4 [0x459b22] dsmFatalMsgnCallBack+0x110 from /u/DLC/11.6/oe/bin/dbtool
#5 [0x4bc6e0] shmmsg+0x60 from /u/DLC/11.6/oe/bin/dbtool
#6 [0x4bc1ac] shmAttachSegment+0x1eb from /u/DLC/11.6/oe/bin/dbtool
#7 [0x4bc229] shmVerifySegment+0x55 from /u/DLC/11.6/oe/bin/dbtool
#8 [0x4bc3e1] shmattsegs+0x10c from /u/DLC/11.6/oe/bin/dbtool
#9 [0x4bbcde] shmAttach+0x31 from /u/DLC/11.6/oe/bin/dbtool
#10 [0x445e7a] dbenv2+0x12c from /u/DLC/11.6/oe/bin/dbtool
#11 [0x447b98] dbenv+0x6a from /u/DLC/11.6/oe/bin/dbtool
#12 [0x46a729] dsmUserSecureConnect+0x7de from /u/DLC/11.6/oe/bin/dbtool
#13 [0x417c18] myConnect+0x6f6 from /u/DLC/11.6/oe/bin/dbtool
#14 [0x41491b] main+0x253 from /u/DLC/11.6/oe/bin/dbtool
#15 [0xb3a1ed5d] __rpc_thread_destroy+0xffedd8ad from /lib64/libc.so.6
-
#13
Odd. If you are using the account that created (and presumably owns) the .db file then those same permissions would be on the shared memory segments. You can see those permissions with ipcs -m (cross-reference with proutil -C dbipcs output to get the right shmid). With that user you should be able to run dbtool successfully.
-
#14
I don’t see any KB articles that seem related to this issue.
Not sure what else to suggest, apart from trying to run dbtool from the application if that’s an option, or else contact QAD for support.
-
#15
Odd. If you are using the account that created (and presumably owns) the .db file then those same permissions would be on the shared memory segments. You can see those permissions with ipcs -m (cross-reference with proutil -C dbipcs output to get the right shmid). With that user you should be able to run dbtool successfully.
running ipcs from the account I’ve always used shows the owner for the shared memory segment of the process running the db I am trying to check (using that cross reference suggestion you made to locate the shmid) is root with perms=644 and nattch=14 (I don’t know what perms and nattch are).
this account is in the /etc/sudoers file in the root section of the file and running
sudo -s and getting the shell, then issuing the the id command. I see uid=0(root) gid=0(root) groups=0(root).
So this account has root access. Since I wasn’t around to create the database, maybe there is a way to create it with some other user account which somehow causes a problem??? I am grasping at straws here though.
As for QAD, as I looked farther, it just lists doing manual dbtool commands at the command line, so while it has slightly more documentation then I found on progress, it still doesn’t work or begin to cover the problems I am seeing here with this stack dump.
-
#16
OK. I seemed to have solved the problem by logging on with the root user. I’m not sure why the account which seemed to have root privileges was not good enough, but I’ll take this for now. I also just learned we are going live in about 2 months with QAD 2016 which uses Progress 11.6. So it won’t be that long before I can just use that ODBC property to get around this issue.
-
#17
So after running dbtools logged in as root I was able to use the ODBC driver in order to import some progress tables into SQL Server using SQL Server’s default import facilities. However, one bug that I referenced here
Querying The Catalog Via Odbc
still remains. When I used linked servers to query the catalog sysprogress I still get errors that have to do with false reporting of data sizes. So I guess dbtool doesn’t correct that. I will try the extra ODBC property with the non-production 11.6 database to see if that bug is fixed by that.
I did look briefly at Data Server for SQL Server but this looks to be a product for letting 4GL programs access SQL Server. It doesn’t seem to be a bridge to push data more directly (e.g. data sync or at least sending progress data to a data warehouse in SQL Server) between the two DBMS’. Correct?
-
#18
root with perms=644 and nattch=14 (I don’t know what perms and nattch are)
«Perms» is permissions: 6 (read/write) for owner, 4 (read) for group, and 4 (read) for the rest of the world. So in this case if you aren’t root, you get read-only access to the shared-memory segment. This would explain not being able to run dbtool. I believe «nattch» is the number of processes attached to (i.e. that have mapped) that segment.
I did look briefly at Data Server for SQL Server but this looks to be a product for letting 4GL programs access SQL Server. It doesn’t seem to be a bridge to push data more directly (e.g. data sync or at least sending progress data to a data warehouse in SQL Server) between the two DBMS’. Correct?
Yes, DataServers are for running an OpenEdge ABL application with a non-OpenEdge database.
-
#19
I thought I saw that QAD gets started by the account I logged in with. But apparently it gets launched by the root, which to me is suboptimal. Later down the road I will do a security audit on our QAD installation and likely change a bunch of stuff.
-
#20
If you are new to OE / Progress databases and are more familiar with MS SQL, you might consider exporting the data from OE and loading it into MS SQL to do your data investigation.
DigitalOcean provides cloud products for every stage of your journey. Get started with $200 in free credit!
Introduction
HTML elements can have attributes on them that are used for anything from accessibility information to stylistic control.
<!-- We can use the `class` for styling in CSS, and we've also make this into a landmark region -->
<div class="names" role="region" aria-label="Names"></div>
What is discouraged is making up your own attributes, or repurposing existing attributes for unrelated functionality.
<!-- `highlight` is not an HTML attribute -->
<div highlight="true"></div>
<!-- `large` is not a valid value of `width` -->
<div width="large">
There are a variety of reasons this is bad. Your HTML becomes invalid, which may not have any actual negative consequences, but robs you of that warm fuzzy valid HTML feeling. The most compelling reason is that HTML is a living language and just because attributes and values that don’t do anything today doesn’t mean they never will.
Good news though: you can make up your own attributes. You just need to prefix them with data-*
and then you’re free to do what you please!
Syntax
It can be awfully handy to be able to make up your own HTML attributes and put your own information inside them. Fortunately, you can! That’s exactly what data attributes are. They are like this:
<!-- They don't need a value -->
<div data-foo></div>
<!-- ...but they can have a value -->
<div data-size="large"></div>
<!-- You're in HTML here, so careful to escape code if you need to do something like put more HTML inside -->
<li data-prefix="Careful with HTML in here."><li>
<!-- You can keep dashing if you like -->
<aside data-some-long-attribute-name><aside>
Data attributes are often referred to as data-*
attributes, as they are always formatted like that. The word data
, then a dash -
, then other text you can make up.
Can you use the data
attribute alone?
<div data=""></div>
It’s probably not going to hurt anything, but you won’t get the JavaScript API we’ll cover later in this guide. You’re essentially making up an attribute for yourself, which as I mentioned in the intro, is discouraged.
What not to do with data attributes
Store content that should be accessible. If the content should be seen or read on a page, don’t only put them in data attributes, but make sure that content is in the HTML content somewhere.
<!-- This isn't accessible content -->
<div data-name="Chris Coyier"></div>
<!-- If you need programmatic access to it but shouldn't be seen, there are other ways... -->
<div>
<span class="visually-hidden">Chris Coyier</span>
</div>
Here’s more about hiding things.
Styling with data attributes
CSS can select HTML elements based on attributes and their values.
/* Select any element with this data attribute and value */
[data-size="large"] {
padding: 2rem;
font-size: 125%;
}
/* You can scope it to an element or class or anything else */
button[data-type="download"] { }
.card[data-pad="extra"] { }
This can be compelling. The predominant styling hooks in HTML/CSS are classes, and while classes are great (they have medium specificity and nice JavaScript methods via classList
) an element either has it or it doesn’t (essentially on or off). With data-*
attributes, you get that on/off ability plus the ability to select based on the value it has at the same specificity level.
/* Selects if the attribute is present at all */
[data-size] { }
/* Selects if the attribute has a particular value */
[data-state="open"],
[aria-expanded="true"] { }
/* "Starts with" selector, meaning this would match "3" or anything starting with 3, like "3.14" */
[data-version^="3"] { }
/* "Contains" meaning if the value has the string anywhere inside it */
[data-company*="google"] { }
The specificity of attribute selectors
It’s the exact same as a class. We often think of specificity as a four-part value:
inline style, IDs, classes/attributes, tags
So a single attribute selector alone is 0, 0, 1, 0. A selector like this:
div.card[data-foo="bar"] { }
…would be 0, 0, 2, 1. The 2 is because there is one class (.card
) and one attribute ([data-foo="bar"]
), and the 1 is because there is one tag (div
).
Attribute selectors have less specificity than an ID, more than an element/tag, and the same as a class.
Case-insensitive attribute values
In case you’re needing to correct for possible capitalization inconsistencies in your data attributes, the attribute selector has a case-insensitive variant for that.
/* Will match
<div data-state="open"></div>
<div data-state="Open"></div>
<div data-state="OPEN"></div>
<div data-state="oPeN"></div>
*/
[data-state="open" i] { }
It’s the little i
within the bracketed selector.
Using data attributes visually
CSS allows you to yank out the data attribute value and display it if you need to.
/* <div data-emoji="✅"> */
[data-emoji]::before {
content: attr(data-emoji); /* Returns '✅' */
margin-right: 5px;
}
Example styling use-case
You could use data attributes to specify how many columns you want a grid container to have.
<div data-columns="2"></div>
<div data-columns="3"></div>
<div data-columns="4"></div>
Accessing data attributes in JavaScript
Like any other attribute, you can access the value with the generic method getAttribute
.
let value = el.getAttribute("data-state");
// You can set the value as well.
// Returns data-state="collapsed"
el.setAttribute("data-state", "collapsed");
But data attributes have their own special API as well. Say you have an element with multiple data attributes (which is totally fine):
<span
data-info="123"
data-index="2"
data-prefix="Dr. "
data-emoji-icon="🏌️♀️"
></span>
If you have a reference to that element, you can set and get the attributes like:
// Get
span.dataset.info; // 123
span.dataset.index; // 2
// Set
span.dataset.prefix = "Mr. ";
span.dataset.emojiIcon = "🎪";
Note the camelCase usage on the last line there. It automatically converts kebab-style attributes in HTML, like data-this-little-piggy
, to camelCase style in JavaScript, like dataThisLittlePiggy
.
This API is arguably not quite as nice as classList
with the clear add
, remove
, toggle
, and replace
methods, but it’s better than nothing.
You have access to inline datasets as well:
<img src="spaceship.png"
data-ship-id="324" data-shields="72%"
onclick="pewpew(this.dataset.shipId)">
</img>
JSON data inside data attributes
<ul>
<li data-person='
{
"name": "Chris Coyier",
"job": "Web Person"
}
'></li>
</ul>
Hey, why not? It’s just a string and it’s possible to format it as valid JSON (mind the quotes and such). You can yank that data and parse it as needed.
const el = document.querySelector("li");
let json = el.dataset.person;
let data = JSON.parse(json);
console.log(data.name); // Chris Coyier
console.log(data.job); // Web Person
JavaScript use-cases
The concept is that you can use data attributes to put information in HTML that JavaScript may need access to do certain things.
A common one would have to do with database functionality. Say you have a “Like” button:
<button data-id="435432343">♡</button>
That button could have a click handler on it which performs an Ajax request to the server to increment the number of likes in a database on click. It knows which record to update because it gets it from the data attribute.
Specifications
- Selectors Level 4 (Working Draft)
- Selectors Level 3 (Recommended)
- Selectors Level 2, Revision 1 (Initial Definition)
Browser support
Desktop
Chrome | Firefox | IE | Edge | Safari |
---|---|---|---|---|
7 | 6 | 11 | 12 | 5.1 |
Mobile / Tablet
Android Chrome | Android Firefox | Android | iOS Safari |
---|---|---|---|
109 | 109 | 3 | 5.0-5.1 |