Classic ASP / Printing results horizontally (8 rows, x columns) - css

Can anybody help or point me in the right direction for a tutorial/example for printing recordsets horizontally, with fixed rows and variable columns. The desired effect:
A------ Crime Estimate
Air Curtains Estoria
Alpha D------ F------
Apple Daily ...
B------ Doctor ...
Banana E------
Billy Eddie
C------ Elephant
Chair Eskimo
[<]-------[|||||||]-------------------------------[>]
I have a DIV with horizontal scroll (like my imitation scrollbar above lol) and need to scroll along the alphabetical list of words. I need to have 8 rows high and that should include the new character heading (A, B, C...) but the amount of columns, nobody knows.
Maybe there's an easier way using CSS. If each word was a block of 100x20px, the first block would have top:0px; left:0px;, the next block would have top:20px; left:0px; and then on the next column, top:0px; left:100px;...
I could probably do it if somebody explained how. Any help or tutorial links gratefully received as always.
MY RESULT
Made with CSS positioning instead of table rows/cells. Happy!

You'll have to weave it into an HTML table where <tr> is a table row and <td> is a table cell or column.
This example shows a standard recordset to table but you will need to change the code to meet your desired format.
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=4&txtCodeId=7466

Related

Logical reasoning at Klarna interview

I get this reasoning question in Klarna pre test. Please help me to solve this. Question is in image
You are correct 'B' is the answer
1). Center 3 Dots , that is the 3rd column Will stay the same
2). 4th and 5th Column moves from right to left one at a time, as soon 2 black dots merged it will be come white, if the black moves it will become white again
3). Try the entire sequence filled with Numbers ( 1 to 10 ) in place of black dots to avoid confusion and solve the problem
if you have more questions, please do let me know
The correct Answer is B
Its because the middle column black squares remain constant while the two right columns move left. When they merge they become white. At separation restore to black.

How to create descending left hand row numbers in a table (tr) with CSS

I use the method shown hear;
https://kryogenix.org/code/browser/sorttable/#lefthandheader
to add numbers to the left hand side of my table. And it works great by putting 1 at the top on the first row, 2 on the second and so on. However my table is time sensitive, and descending in order so the top row is actually the most current thing that occurred. I would like the left column to reflect that by having the highest number on top and descending to the bottom where the first event occurred.
Is there a simple way to modify the CSS to do this?
My table in question is built using PHP/MYSql. It turns out that the quoted solution to number the left hand column has at least on option, you can add an option to the CSS like this.
table.sortable tbody {
counter-reset: sortabletablescope 48;
}
Then reference it as demonstrated here: https://jsbin.com/yanihid/edit
The result is exactly as I needed it. Counting the rows starting at the highest number. All you have to do is know the count, an easy deal with PHP/MYSQL.

How to nudge a graph to the right without altering the total surface it covers

I have a document collection with size 1000, they all have 1 feature, a vector with 5 elements. The total sum of the 5 elements equals 100. So for example I can have a document with feature: [10,15,40,20,15].
Each vector element equals a sentiment, ranging from very negative to very positive.
The results I get for the 1000 text documents come out a little on the negative side,
so I am trying to nudge them all a little to the right without altering the total sum.
For example [10,15,40,20,15] should, after applying the formula, result to [7,13,32,40,8].
How can I manage this?
Thanks in advance!
As I understand, you want the first (left) elements of that vector to get smaller, and the right part to get bigger, right? This can be accomplished by adding something like [-10,-5,0,5,10] to each vector.
If the issue is that the corpus is genuinely more negative than you'd like it to be, then how about pre-prending to each document, just before the analysis:
I am a happy bunny!
And if that isn't enough, then also add in:
The sun is shining beautifully in Happy Bunny Land today!!
If the issue is that your analysis is producing a more negative result than what you believe is the correct answer, then fiddle with the weights (if using a weighted approach); if not using a weighted word approach, and you have a list of positive and negative words, then review those lists for the document context and either remove some negative words, or add in some more words to the positive list.

Bootstrap 3.1 - How to have list item text line up on the left, AND centered in column

Not sure how to describe this exactly but here goes:
I have a 3 column design, and there is a list of items in each of the columns.
I need to have:
1) Each column's list items must aligned so that the left side of each word lines up
2) Each list itself must be centered within its column. (This of course means that list items on their own won't necessarily be dead center inside their respective column)
I would prefer a CSS solution without javascript/jQuery.
I have an example of bootstrap code that I am working on here to help explain what doesn't work for me:
http://bootply.com/112003
The first row is what happens when the text is centered within each column. Condition 2 passes, condition 1 fails.
The second row is what happens when I divide up each of the three colums into 3 subcolumns. Condition 1 passes, but condition 2 fails. This is subtle. While each list item is in the center subcolumn, overall the list isn't in the dead center of that column. (Imagine the list is one item if that helps think about the problem.)
Thanks to anyone who can try to help me out. This one is driving me a little bit crazy :)

Reason for having separate tables for slots and days

In the agenda day+week view there are two separate tables for days and slots.
The days table essentially has a blank left column, x number of full height columns for each of the days with the date at the top (in a <thead> tag), and finally a right gutter with the scrollbar.
The slots table has y rows for each time slot (obviously a dynamically calculated number of rows). They have two cells per row. One for the time (12am) and one full-width cell that is only used afaik to display alternating dotted/solid horizontal borders.
My question (to the devs hopefully) is why did you make this choice, when compared to one table that contains x columns and y rows? Do you have plans to consolidate it into one table?
The reason I'm asking is because I am forking the code now to make it so that individual days+time slots are addressable (i.e. set the bgcolor on 8-10am on nov 12th to be red ... or disallow events to be dropped there).

Resources