module test; reg matrix[7:0] [7:0]='{'{0,1,0,0,0,0,0,0},'{0,0,1,0,0,0,0,0},'{1,0,0,1,0,0,0,0},'{0,0,0,0,1,0,0,0},'{0,0,0,0,0,1,0,1},'{0,0,0,0,0,0,1,0},'{0,0,0,0,1,0,0,1},'{0,0,0,0,0,0,0,0}}; initial begin $display(&quot;%d &quot;,matrix[3][3]); end endmodule  this is the test code I am trying to run. My goal is to declare a multi dimensional array to store matrix in Verilog. I am assuming that multi dimensional could be mapped to register or a memory in Verilog. And I have simulated this on Questa sim Error: ** Error: test.v(2): (vlog-2110) Illegal reference to memory &quot;matrix&quot;. # ** Error: test.v(2): Illegal LHS of assignment.  Could someone comment on my assumptions and tell me the way to make this happen. Disclaimer: I am a newbie to Verilog !!!
int t=-1'd1; //trying to assign -1 to t; bit vb[7:0]; // simple declaration  bit matrix[0:1][0:7]='{'{0,1,0,0,0,0,0,0},'{0,0,1,0,0,0,0,0},'{1,0,0,1,0,0,0,0},'{0,0,0,0,1,0,0,0},'{0,0,0,0,0,1,0,1},'{0,0,0,0,0,0,1,0},'{0,0,0,0,1,0,0,1},'{0,0,0,0,0,0,0,0}};// initialising multi-dimensional array.  I am using QuestaSim to compile and simulate. this is the report: # -- Compiling module test # ** Error: (vlog-13032) test.v(8): near &quot;=&quot;: Syntax error. # ** Error: (vlog-13032) test.v(9): near &quot;;&quot;: Syntax error.  I am somewhat New to the Verilog. Please help me in fixing these errors.
joomla 2.5 in module install.mysql.utf8.sql dosent work I've taken some stock photography of lots of clear bottles, and now want to remove the background (which is white-ish, because at a pinch I could leave it...) so that the bottle becomes transparent with highlighting.  My bottles are clear with different colored liquids with multiple refraction and reflection surfaces.  I am looking for a background color subtraction effect that will allow me to get to transparent (hopefully with some sort of effect/opacity slider).  Ideas that I can't pull off yet:   Combine layer with a color fill layer (keyed off the "transparent color") in some manner to produce some output that could be used as the starting point of a layer mask Same layer combination as above, but somehow translating "pure white" to transparency.   Notes for what doesn't work (Photoshop terminology):   "Color Range" and delete (fuzzy select, but not graded/alpha) - results in harsh lines and only leaves the pure white and dark highlights and shadow refractions/reflections Magic wand selections for the same reason "Background Eraser" because although it is able to only subtract a certain color and leave "the rest", it (like all tolerance based tools) eventually hits a colour slightly outside of the range that it just won't touch.   I'll add more if I can remember what I've found There's a part in my apps that displays the file path loaded by the user through OpenFileDialog. It's taking up too much space to display the whole path, but I don't want to display only the filename as it might be ambiguous. So I would prefer to show the file path relative to the assembly/exe directory.  For example, the assembly resides at C:\Program Files\Dummy Folder\MyProgram and the file at C:\Program Files\Dummy Folder\MyProgram\Data\datafile1.dat then I would like it to show .\Data\datafile1.dat. If the file is in C:\Program Files\Dummy Folder\datafile1.dat, then I would want ..\datafile1.dat. But if the file is at the root directory or 1 directory below root, then display the full path.   What solution would you recommend? Regex?  Basically I want to display useful file path info without taking too much screen space.  EDIT: Just to clarify a little bit more. The purpose of this solution is to help user or myself knowing which file did I loaded last and roughly from which directory was it from. I'm using a readonly textbox to display the path. Most of the time, the file path is much longer than the display space of the textbox. The path is supposed to be informative but not important enough as to take up more screen space.  Alex Brault comment was good, so is Jonathan Leffler. The Win32 function provided by DavidK only help with part of the problem, not the whole of it, but thanks anyway. As for James Newton-King solution, I'll give it a try later when I'm free. Filter bibliography by author? I would like to create a template for a publication list that can then be used by several people. The idea is that there is one bib-file which contains all of the publications. Peer-reviewed entries are marked with the keyword = pr. Then there is the master-file of the type scriptreport in which everyone can integrate their chapter-file in order to merge the publication lists of everybody into one file. The chapter file is the core of everything and should be reusable. It should filter out the entries for the respective author from the bib file and print them out in two lists (peer-reviewed and non-peer-reviewed). My problem is that I don't really know how to filter by author in this case. Here are the rough codes of the two files: Master: \documentclass[a4paper]{scrreprt}  \usepackage{biblatex}  \title{Publication list}  \addbibresource{sample.bib}  \begin{document}     \maketitle          \tableofcontents     \newpage          \include{Researcher}     \newpage \end{document}  chapter: \chapter*{Researcher} \addcontentsline{toc}{chapter}{Researcher}          \nocite{*}     \printbibliography[keyword={pr}, title={Peer-reviewed}]          \nocite{*}     \printbibliography[notkeyword={pr}, title={Non-peer-reviewed}] Pluralization rule for "five-year-old children", "20 pound note", "10 mile run" How can I control where smoke and fire are emitted from? Spider-Man is the one franchise that is on course to a third reboot in a span of 15 years.   My question is what was the reason for these numerous reboots of Spider-Man which pretty much follow the same origin story for the Marvel superhero.  Has the comic creator or studio ever spoken out about the reasoning behind the same? Finding a clear difference between truth and fact I have been starting back in school after a long hiatus.  In one of my classes, a discussion of Truth began.  The problem I have had is that no one seems to have a solid definition between the two.   My earlier training and schooling left me with this definition, and I would like some feedback.  Fact - A point of data that can be directly qualified/quantified through confirmed, standardized measurement.  Truth - A point of data not directly qualified/quantified through confirmed, standardized measurement.  So fact would be that ice cream is cold, as we can place a measurement of the temperature.  Ice cream being tasty would be truth, as it is impossible to accurately measure "tasty".  Please let me know your thoughts. How do I remove gapps from CyanogenMod I installed CyanogenMod 11 on my HTC One with CyanogenMod Installer. So I got also the google Apps (gapps) on my device. But I need a CM11 without gapps. I did then the following without success:   copy cm-11-20140308-SNAPSHOT-M4-m7.zip to /sdcard/ boot to recovery mode -> recovery -> ClockworkMod Recovery v6.0.4.6: "wipe data/factory reset" "install zip" choosing the zip-file "reboot system now"  So I got a new CM11 but with gapps still installed.  What should I do in addition to "wipe data/factory reset" to get rid of this apps? To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object? How do I efficiently get "the most recent corresponding row"? I have a query pattern that must be very common, but I don't know how to write an efficient query for it.  I want to look up the rows of a table that correspond to "the most recent date not after" the rows of another table.  I have a table, inventory say, which represents the inventory I hold on a certain day.  date       | good | quantity ------------------------------ 2013-08-09 | egg  | 5 2013-08-09 | pear | 7 2013-08-02 | egg  | 1 2013-08-02 | pear | 2   and a table, "price" say, which holds the price of a good on a given day  date       | good | price -------------------------- 2013-08-07 | egg  | 120 2013-08-06 | pear | 200 2013-08-01 | egg  | 110 2013-07-30 | pear | 220   How can I efficiently get the "most recent" price for each row of the inventory table, i.e.  date       | pricing date | good | quantity | price ---------------------------------------------------- 2013-08-09 | 2013-08-07   | egg  | 5        | 120 2013-08-09 | 2013-08-06   | pear | 7        | 200 2013-08-02 | 2013-08-01   | egg  | 1        | 110 2013-08-02 | 2013-07-30   | pear | 2        | 220   I know one way of doing this:  select inventory.date, max(price.date) as pricing_date, good from inventory, price where inventory.date &gt;= price.date and inventory.good = price.good group by inventory.date, good   and then join this query again to inventory. For large tables even doing the first query (without joining again to inventory) is very slow.  However, the same problem is quickly solved if I simply use my programming language to issue one max(price.date) ... where price.date &lt;= date_of_interest ... order by price.date desc limit 1 query for each date_of_interest from the inventory table, so I know there is no computational impediment.  I would, however, prefer to solve the whole problem with a single SQL query, because it would allow me to do further SQL processing on the result of the query.  Is there a standard way to do this efficiently? It feels like it must come up often and that there should be a way to write a fast query for it.  I'm using Postgres, but an SQL-generic answer would be appreciated. Connection pools being reset with Error: 18056, Severity: 20, State: 46. & Perfmon Counters not showing How do I embed an image from the web into a Trello card comment or description? So far I have been successful embedding Youtube videos into Trello card comments; simply by including the URL in the comment Trello picks it up and renders an embedded Youtube thumbnail.   What I would like to do is the same thing, but with a simple PNG image. I don't want to upload the image as it is a Balsamiq mockup permalink which will get updated periodically, and I want the latest version to be displayed on the Trello card.   However, pasting the image URL into the Trello card has no effect.  Am I missing somthing? How can I find out which process is locking a file or folder in Windows?  For instance, when trying to delete a folder, Windows reports this:     The action can't be completed because the folder is open in another program   Happens the same with a file, but how do I find out what program or application is currently using it and preventing me from deleting the file or folder? Can you have a class in a struct? Looking for title of sci fi short story about attempts to colonise planet (Venus?). Scientist and his dog are main characters XIV pages in page counts? Is it possible to make biblatex output page counts for both the regular pages and the roman-numbered pages, for example:     Cook, Theodore Andrea. The Curves of Life : Being an Account of Spiral Formations and Their Application to Growth in Nature, to Science and to Art; with Special Reference to the Manuscripts of Leonardo da Vinci. — London : Constable and Company, 1914. — xxx + 479 p.   Here there are "30 pages + 478 pages" in total. Thanks! How to let PHP to create subdomain automatically for each user? How do I create subdomain like  ? Do i have to access htaccess somehow? Is it actually simply possible to create it via pure php code or I need to use some external script-server side language?  To those who answered: Well, then, should i ask my hosting if they provide some sort of DNS access?? What does !$ mean? I'm following through a tutorial and it mentions to run this command:  sudo chmod 700 !$   I'm not familiar with !$. What does it mean? I am firmly convinced he is innocent and his accusation is the result of the police conspiracy.     I am firmly convinced he is innocent and his accusation is the result of the police's conspiracy.    Which sentence do you think is a better choice?