Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. update: so i used my decimal to roman numeral code inside of a loop in my roman to decimal code. All of the numbers passed, which means my code is not filtering standard roman numerals. Super! i changed an entry in the loop to a numeral that should be considered non standard and my code stopped the loop and displayed the invalid message. so the code is working. Then i used the decimal to roman code to produce an array of all of the standard roman numerals, then i used the var_export to create a copy of this good numerals array. I made a copy of the array produced in the roman to decimal conver
  3. I always want 100px from left and right, no matter how much the browser is resized. I currently have: html { padding-left: 100px; padding-right: 100px; }Is this the best way? Is this the best way? Comments: 1.) Putting it in "body{" works the same. 2.) Using "margin-left: 100px; margin-right:100px;" works the same. 3.) Setting body and html to margin:0; padding:0; and putting 1 big div in the body with 100px padding/margin works the same. With so many ways, what is the "accepted Best Practices" way of doing this? My html pages are super simple: just 4 rows! 1st row:
  4. Today
  5. interesting. I can't believe that my code is even remotely similar to yours. I am not a very good programmer so it is nice to know that i did something correctly. I suppose that i am a bit too hard on myself. Really though, i am still trying to comprehend how i wrote code that is similar to your code. You are a pro and i am just a programmatic idiot trying to make a website. I guess i am slowly learning how to think programmatically. So progress is good 😀 but i don't let it go to my head. I got lucky this time and did something right. I am going to get some coffee and get to work on my ro
  6. Hi. I think it is something in the theme doing it as I added two rows with an icon on the second one on a different WP theme, and it did exactly as expected. Moved up with a minus top margin, no z-index needed (as I agree.. that can cause other issues). And went over the upper Div. So I will refer it to our theme devs. What should work in CSS, is being ignored for some reason.
  7. A similar approach to mine function ad_litera ($n) { if ($n >3999) return 'NaN'; $n2r = [ 1000 => [ 1 => 'M', 2 => 'MM', 3 => 'MMM' ], 100 => [ 1 => 'C', 2 => 'CC', 3 => 'CCC', 4 => 'CD', 5 => 'D', 6 => 'DC', 7 => 'DCC', 8 => 'DCCC', 9 => 'CM' ], 10 => [ 1 => 'X', 2 => 'XX', 3 => 'XXX', 4 => 'XL', 5 => 'L', 6 => 'LX', 7 => 'LXX', 8 => 'LXXX', 9 => 'XC' ], 1 => [ 1 => 'I', 2 => 'II', 3 => 'III', 4 => 'IV', 5 => 'V', 6 => 'VI', 7 =>
  8. Hi Barand, I created a script for decimal to roman last week. I am certain that my approach is different than yours but i get the job done. I added a loop so that my code prints numerals 1-3999. Decimal to Roman is easy if we only convert to standard Roman numerals. Converting from unknown possibly nonstandard possibly invalid roman numerals to decimal is a bit more difficult. I suppose that one could make a 3999 roman numeral valued array and call it a day but i like to try to solve the problems programmatically. If failure happens and i can't find a way to filter correctly then the 3999
  9. Hi Barand, Thank you for the lovely gift 🙂 I will finish testing today. I have a physical therapy session in the afternoon. Hopefully, i can put it all together after my appointment. I think that the program is working as expected but time will tell. Best wishes, John
  10. If you only care about checking individual dates that are available, that's fairly easy: store the unavailability dates as rows of start and end dates, then search for rows based on whether the day is between them. If you care about checking date ranges then it's a bit trickier, but still not as complicated as it might sound: a conflict is any row where the desired start date is before the unavailable end date, and the desired end date is after the unavailable start date.
  11. Available at all on a select date or available within a given time frame on a select date? If the only spec is that there are no other appointments or events on that person's calendar on that specific date, that's a simple question of a subquery where select all events on date are null. If you're talking time, that gets complicated with start times, end times, and overlaps of either or both.
  12. Here's what I'm trying to do. 1. A user creates a calendar that shows which dates he's available. This calendar could showcase availability for up to a year. 2. Other users can do a search for a user that's available on a set date. For e.g. July 1st. 3. All the users available on July 1st will show up in the search results. There is no booking for appointments involved. It simply needs to show the users available on set dates. I am wondering what's the best way to create this calendar feature?
  13. Yesterday
  14. Attached is a gift for you so you can test all numbers from 1 - 3999 Sample contents... I II III IV V VI VII VIII IX X XI XII XIII XIV XV XVI XVII XVIII XIX XX . . MCMVC MCMXCVI MCMXCVII MCMXCVIII MCMIC MM MMI MMII MMIII MMIV MMV . . MMMCMXC MMMCMXCI MMMCMXCII MMMCMXCIII MMMCMXCIV MMMCMVC MMMCMXCVI MMMCMXCVII MMMCMXCVIII MMMCMIC roman_test.txt
  15. Hi gw1500se, i don't know how to define the scholarly subtraction but it certainly isn't invalid. Some mathematicians (which noone has ever heard of) suddenly hold themselves higher than, say Carl von Linne, and deem MDVC as an invalid numeral. However, some of the world's smartest people have published books with these 'invalid' numerals. I want to convert these numerals that you may see in old books and not show a message that it is invalid. I have only seen numbers I-5 used in irregular subtraction dates: mdvc, mdic etc. I've not seen MDVIIC or MDVIXC. I want to limit irregular subtrac
  16. Why the restriction of subtraction only up to V? How would you process MCM?
  17. In general, try to use z-index as little as possible. How is overflow configured on the parent row? If it isn't allowed then the arrow will clip when you try to position it partly out of bounds.
  18. ixx really shouldn't be calculated and my code skips it. I prefer it be skipped. Furthermore, i notice other numerals that should be ignored according to research and comparison with printed material: vv,vvv,vvvv, ll,lll,llll, dd,ddd,dddd. 2021 really should not be processed as dddixxii. I also noticed that old books use the letter j for a final i in a series of this numeral: ij, iij, vij, viij. I've added this snippet of code to my program to permit the usage of the letter j: $RomanNumeralInput = str_replace('J', 'I', $RomanNumeralInput); I added the following code at the end of my scr
  19. Because X is not less than the subsequent X, so only the I is subtractive
  20. You are probably not getting any reply because you did not post your code here. Few people will go to a 3rd party web site to see your code and ever fewer will download zipped code. Post you code here using the code icon (<>) on the to menu and specify PHP. You will be more likely to get a response.
  21. Hi Barand, I got my program to do all of the tings that i want it to do. I just have to finish the code by producing a decimal/arabic number and verify that all of the numbers are correct. I have learned something about Roman numerals today that i find interesting. I do not rmember hearing about this problem before. I have given this problem a name: "The Nine Hole". Your code also falls into the "Nine Hole". What am i talking about? how do you know that ixx is 19 and not 1? ixx is 10-9 or 20-1, depending on how you see it. My code jumps over the Nine Hole with a code block on the ix
  22. Also an oddity... it has a sticky menu. If I set it just to be margin-top: -100px, it appears to crop the top as it goes behind the previous DIV. But when you scroll the screen it goes over the sticky menu with the high z-index... still cropped...
  23. Alas not, as this is purely in a preview... It's in WordPress using WP Bakery. One row after the other. Each row has three columns - tho only the center one is being used (others are to create gaps). Above the 'element' for the Heading, is the Info box to add the icon. All rows are relative positioned. Even if I set the icon DIV to be absolute, and high z-index, it still goes under the previous DIV.
  24. A screenshot isn't the most helpful thing. Got a link to the webpage?
  25. Depends on how many "levels" you need to work with. If you only need, say, immediately related parent or child records, or even as far as grandparent or grandchild, you can do that with a regular query, just joining the table to itself the required number of times. select ... from table1 parent inner join tabel1 child on parent.child = child.parent inner join table1 grandchild on child.child = grandchild.parent ; But, as soon as you start getting arbitrary depth of nesting, a CTE is the way to go. Also, bear in mind that you want some way of stopping this
  26. I am creating a page with rows. Each row is a Step in a process. In the second, third and so on rows, above its title I have added am element with a 'down arrow'. I want that Element to be 'in front of' both DIVs. When I do it now, and set a minus top margin, it goes up, but behind the row above. How do I make it go in front of it? I've done it with SVGs so it's making it have that layered look, but doesn't seem to work on DIVs only. I assumed z-index: 20000; would do the trick, and even if I set the row above to be a lower z-index. Help...
  27. Hi Barand, I am not making a calculator. I will try to better explain my project. I am simply trying to create my own date converter (roman numerals to arabic/decimal numbers) allowing common date subtractive numerals but restricting subtractives to five. Again, I forgot how roman numerals work except for basic numers. I had to look up D (500) for example. I often have to calculate the dates in books for my literary references of biographical notices. An example citation for Ulisse Aldrovandi (Ulysses Aldrovandi): Bonucci, Anicio . Plauso Letterario per la Restaurazione della Sala Ur
  28. That comes from $sql2 = " SELECT order_id FROM ordered_items GROUP BY order_id WHERE order_id = '".$row[order_id]."' "; this query. So if this query isn't working then your next step is to learn more about $row.
  1. Load more activity
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.