Jump to content

sakura

Members
  • Content Count

    75
  • Joined

  • Last visited

Everything posted by sakura

  1. sakura

    Buggy Optimizer in Delphi 10.4

    Let's not discuss the GOTO - first, it is not my code, but code from a library I use, second, the full method from the library certainly benefits from it. It is not always possible to optimize for everything cleanly. For full details, follow the links πŸ˜‰
  2. Yes, no change, the IOTAEditorContent object itself is not even marked as modified, it's the module, which is "knowing" that something has happened. 😐
  3. Further on, the function is to ensure a properly nulled reference, even if something fails. A object that failed during Free/Destroy is usually not usable any longer anyways.
  4. Yeah, that was my first thought... not really better, though the name of the method itself tells the story. Yet, for someone, who does not quite yet understand all the quirks of Delphi, this is a little frustrating...
  5. sakura

    wuppdi Welcome Page for Delphi 10.4?

    Yepp, I know why πŸ˜„ The original Welcome Page was designed by me during the field test, and at that time "wuppdi" was the "thing" at the German Delphi Praxis, and I wanted to include that somehow and that's how it ended up there πŸ˜„ wuppdi is a simple CSS class to hide different things. doShow CSS class was used to override wuppdi πŸ˜„
  6. Don't worry, I've never seen larger projects, where the code could explain all the thinking behind the tinkering, especially the larger picture. I think we all can agree, that good code explains what it is doing quite well, however, rarely, if ever why and never the reason behind he full logic of a multi-year-project.
  7. @Vincent Parrett Done yet? πŸ˜„ Honestly, refactoring does not only mean fixing and improving code itself, though, as stated above, as learning and evolving creature, there is always a chance for that, no matter how expertly you done it, but requirements change, features need to be implemented, and so on. Existing code may anticipate a lot of upcoming changes, but ever everything? So yes, there will always be a need for refactoring. Now, let's go back to my last paragraph and do that πŸ˜‰
  8. sakura

    Just wanted to brag a bit :-)

    German store has ist too. Congrats!
  9. sakura

    Problem With Generating AAB With 10.3.3

    Looks like you have some post build events and those try accessing java.
  10. I second the Synopse solution. Very darn fast.
  11. sakura

    Delphi 5 FOR Loop problem (W10-64bit)

    What would you expect, from 0 to 0 allows for 0 as iteration value. Correct behaviour, back since Pascal times...
  12. sakura

    IDE Fix pack for Rio

    I have similar results. The compiler on 10.3 is faster without any FixPack, than the compiler of 10.2.3 with the FixPack installed. So, I am fine with that part. ... 🐈 ...
  13. sakura

    FavIcon

    Missing, at least in Chrome on Windows, a fav icon πŸ˜‰ ... 🐈 ...
  14. sakura

    FavIcon

    Thanks πŸ™‚ ... 🐈 ...
  15. For those of you, using TamperMonkey in Chrome, I have created a small script, which, for now, will compact the design just a bit. Feel free to enhance/comment. // ==UserScript== // @name [DPE] CSS Overrides // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://en.delphipraxis.net/* // @exclude *?do=edit // @grant none // ==/UserScript== (function() { 'use strict'; // fluid list const $ = jQuery; $('HEADER .logo').attr('style', 'height: auto;'); $('HEADER .logo IMG').attr('style', 'margin-bottom: -30px;'); $('LI.ipsDataItem').attr('style', 'padding: 2px 0'); $('DIV.ipsDataItem_icon').attr('style', 'padding: 0 10px;'); $('DIV.ipsDataItem_main').attr('style', 'padding: 0;'); $('UL.ipsDataItem_stats').attr('style', 'padding: 0 10px 0 0;'); $('LI.ipsDataItem_unread DIV.ipsDataItem_main A[href*=topic]').each(function() { const href = $(this).attr('href'); if (href.indexOf('?') < 0) $(this).attr('href', href + '?do=getNewComment'); }); // thread view const ipsPageHeader = $('DIV.ipsPageHeader'); ipsPageHeader.attr('style', 'padding: 5px;'); const topicControls = ipsPageHeader.next(); const topicControlsLinks = topicControls.find('A'); for (var idx = 0, link; link = topicControlsLinks[idx]; idx++) { const div = $('<div class="ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone" style="margin-left: 5px;"></div>'); link.style = 'padding: 5px; line-height: 1.5em;'; div.append(link); ipsPageHeader.prepend(div); } topicControls.remove(); $('UL.cAuthorPane_info').attr('style', 'transform: scale(0.6); padding: 0; margin: -40px;'); $('DIV[data-role="commentContent"]').attr('style', 'padding: 0; font-size: small;'); })(); ... 🐈 ...
  16. It almost got to be in Europe, as it is run by a European person (Daniel πŸ˜‰). Going abroad, outside the EU, is hard in regards to the DSGVO (privacy laws), as it is almost impossible to guarantee a provider to obey those laws at sensible prices. Especially with US gov agencies trying to access anything and everything nowadays. ... 🐈 ...
  17. sakura

    Chrome/TamperMonkey for Design

    Strange, works fine for me now. Anyways, posting a new topic was broke, so here is another fix. πŸ˜„ // ==UserScript== // @name [DPE] CSS Overrides // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://en.delphipraxis.net/ // @match https://en.delphipraxis.net/?* // @match https://en.delphipraxis.net/topic/* // @match https://en.delphipraxis.net/discover/* // @grant none // ==/UserScript== (function() { try{ 'use strict'; // Header const enable_compact_banner = true; const enable_compact_searchbar = true; // thread overview const enable_modified_topic_banner = true; const enable_compact_fluidlist = true; const enable_additional_highlight = true; // Threads/Posts const enable_small_userinfo = true; const enable_compact_comment = true; const enable_compact_pre = true; const enable_compact_code = true; const enable_compact_survey = true; // Other const enable_goto_latest_post = true; const enable_scroll_to_content = true; const enable_compactDiscover = true; const isDiscover = location.href.indexOf('delphipraxis.net/discover') > 0; const $ = jQuery; const stylesheet = document.styleSheets[document.styleSheets.length - 1]; if (enable_compact_banner) { $('HEADER .logo').attr('style', 'height: auto;'); $('HEADER .logo IMG').attr('style', 'margin-bottom: -30px;'); } // fluid list if (enable_compact_fluidlist && !isDiscover) { $('LI.ipsDataItem').attr('style', 'padding: 2px 0'); $('DIV.ipsDataItem_icon').attr('style', 'padding: 0 10px;'); $('DIV.ipsDataItem_main').attr('style', 'padding: 0;'); $('UL.ipsDataItem_stats').attr('style', 'padding: 0 10px 0 0;'); } if (enable_goto_latest_post) { $('LI.ipsDataItem_unread DIV.ipsDataItem_main A[href*=topic]').each(function() { const href = $(this).attr('href'); if (href.indexOf('?') < 0) $(this).attr('href', href + '?do=getNewComment'); }); } if (enable_modified_topic_banner) { const ipsPageHeader = $('DIV.ipsPageHeader'); ipsPageHeader.attr('style', 'padding: 5px;'); if (!isDiscover) { const topicControls = ipsPageHeader.next(); const topicControlsLinks = topicControls.find('A'); for (var idx = 0, link; link = topicControlsLinks[idx]; idx++) { if ($(link).closest('FORM').length > 0) continue; const div = $('<div class="ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone" style="margin-left: 5px;"></div>'); link.style = 'padding: 5px; line-height: 1.5em;'; div.append(link); ipsPageHeader.prepend(div); } } } if (enable_small_userinfo) { $('UL.cAuthorPane_info').attr('style', 'transform: scale(0.6); padding: 0; margin: -40px;'); } if (enable_compact_comment && !isDiscover) { $('DIV[data-role="commentContent"]').attr('style', 'padding: 0; font-size: small;'); } // Code if (enable_compact_code && !isDiscover) { $('PRE.ipsCode').attr('style', 'padding: 5px !important; font-size: small;'); } if (enable_compact_pre) { stylesheet.insertRule('PRE.ipsCode { max-height: 15em; }'); stylesheet.insertRule('PRE.ipsCode.viewAll { max-height: inherit; }'); stylesheet.insertRule('.codefold { right: 0; position: absolute !important; margin-right: 3em; }'); const a = $('<a href="javascript:void(0);" class="codefold" onclick="$(this).parent().toggleClass(\'viewAll\');">open/close</a>'); $('PRE.ipsCode').prepend(a); } // Survey if (enable_compact_survey && !isDiscover) { $(':root').attr('style', '--grid-gap: 0px;'); $('span.ipsFaded').attr('style', 'margin-left: 5px;'); } if (enable_additional_highlight) { // Highlight subforum in post listing (fluid list) $('.ipsDataItem_meta > a[href*="?forumId="]').css({ color: '#4D7395' }); // Highlight user in post listing (fluid list) $('.ipsDataItem_meta > span > a[href*="/profile/"]').css({ color: '#4D7395' }); } // Compact search bar if (enable_compact_searchbar && !isDiscover) { $('.nav-bar').attr('style', 'height: 30px;'); $('.secondary-header-align').attr('style', 'height: 30px;'); $('.ipsNavBar_primary > ul > li > a').attr('style', 'line-height: 30px;'); $('.ipsfocus-search').attr('style', 'height: 30px; line-height: 30px;'); } stylesheet.insertRule('.ipsDataList.ipsDataList_zebra > .ipsDataItem { height: 45px; }'); if (enable_compactDiscover && isDiscover) { $('LI.ipsStreamItem').attr('style', 'padding: 2px 10px !important; margin: 0 0 2px 30px !important;'); $('LI.ipsStreamItem UL.ipsTags').each(function () { $(this).closest('DIV').find('H2').append($(this)); }); } // scroll to start of content if (enable_scroll_to_content) { if ((window.location.href.indexOf('?do') < 0) && window.location.href.indexOf('#') < 0) { $('html,body').animate({scrollTop: $('#elContent').offset().top},'slow'); } } } catch(e) { // I don't wanna hear about it } })();
  18. Hi, just a tiny tidbit, but wouldn't it be prudent to have the Code-Language default to Pascal? So far, it is HTML. I admit, I've only posted JavaScript at this point 😊, but I am looking forward to actually be helpful at some point πŸ˜‰ ... 🐈 ...
  19. sakura

    Chrome/TamperMonkey for Design

    Now it does: // ==UserScript== // @name [DPE] CSS Overrides // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://en.delphipraxis.net/ // @match https://en.delphipraxis.net/?* // @match https://en.delphipraxis.net/topic/* // @match https://en.delphipraxis.net/discover/* // @grant none // ==/UserScript== (function() { try{ 'use strict'; // Header const enable_compact_banner = true; const enable_compact_searchbar = true; // thread overview const enable_modified_topic_banner = true; const enable_compact_fluidlist = true; const enable_additional_highlight = true; // Threads/Posts const enable_small_userinfo = true; const enable_compact_comment = true; const enable_compact_pre = true; const enable_compact_code = true; const enable_compact_survey = true; // Other const enable_goto_latest_post = true; const enable_scroll_to_content = true; const enable_compactDiscover = true; const isDiscover = location.href.indexOf('delphipraxis.net/discover') > 0; const $ = jQuery; const stylesheet = document.styleSheets[document.styleSheets.length - 1]; if (enable_compact_banner) { $('HEADER .logo').attr('style', 'height: auto;'); $('HEADER .logo IMG').attr('style', 'margin-bottom: -30px;'); } // fluid list if (enable_compact_fluidlist && !isDiscover) { $('LI.ipsDataItem').attr('style', 'padding: 2px 0'); $('DIV.ipsDataItem_icon').attr('style', 'padding: 0 10px;'); $('DIV.ipsDataItem_main').attr('style', 'padding: 0;'); $('UL.ipsDataItem_stats').attr('style', 'padding: 0 10px 0 0;'); } if (enable_goto_latest_post) { $('LI.ipsDataItem_unread DIV.ipsDataItem_main A[href*=topic]').each(function() { const href = $(this).attr('href'); if (href.indexOf('?') < 0) $(this).attr('href', href + '?do=getNewComment'); }); } if (enable_modified_topic_banner) { const ipsPageHeader = $('DIV.ipsPageHeader'); ipsPageHeader.attr('style', 'padding: 5px;'); if (!isDiscover) { const topicControls = ipsPageHeader.next(); const topicControlsLinks = topicControls.find('A'); for (var idx = 0, link; link = topicControlsLinks[idx]; idx++) { const div = $('<div class="ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone" style="margin-left: 5px;"></div>'); link.style = 'padding: 5px; line-height: 1.5em;'; div.append(link); ipsPageHeader.prepend(div); } topicControls.remove(); } } if (enable_small_userinfo) { $('UL.cAuthorPane_info').attr('style', 'transform: scale(0.6); padding: 0; margin: -40px;'); } if (enable_compact_comment && !isDiscover) { $('DIV[data-role="commentContent"]').attr('style', 'padding: 0; font-size: small;'); } // Code if (enable_compact_code && !isDiscover) { $('PRE.ipsCode').attr('style', 'padding: 5px !important; font-size: small;'); } if (enable_compact_pre) { stylesheet.insertRule('PRE.ipsCode { max-height: 15em; }'); stylesheet.insertRule('PRE.ipsCode.viewAll { max-height: inherit; }'); stylesheet.insertRule('.codefold { right: 0; position: absolute !important; margin-right: 3em; }'); const a = $('<a href="javascript:void(0);" class="codefold" onclick="$(this).parent().toggleClass(\'viewAll\');">open/close</a>'); $('PRE.ipsCode').prepend(a); } // Survey if (enable_compact_survey && !isDiscover) { $(':root').attr('style', '--grid-gap: 0px;'); $('span.ipsFaded').attr('style', 'margin-left: 5px;'); } if (enable_additional_highlight) { // Highlight subforum in post listing (fluid list) $('.ipsDataItem_meta > a[href*="?forumId="]').css({ color: '#4D7395' }); // Highlight user in post listing (fluid list) $('.ipsDataItem_meta > span > a[href*="/profile/"]').css({ color: '#4D7395' }); } // Compact search bar if (enable_compact_searchbar && !isDiscover) { $('.nav-bar').attr('style', 'height: 30px;'); $('.secondary-header-align').attr('style', 'height: 30px;'); $('.ipsNavBar_primary > ul > li > a').attr('style', 'line-height: 30px;'); $('.ipsfocus-search').attr('style', 'height: 30px; line-height: 30px;'); } stylesheet.insertRule('.ipsDataList.ipsDataList_zebra > .ipsDataItem { height: 45px; }'); if (enable_compactDiscover && isDiscover) { $('LI.ipsStreamItem').attr('style', 'padding: 2px 10px !important; margin: 0 0 2px 30px !important;'); $('LI.ipsStreamItem UL.ipsTags').each(function () { $(this).closest('DIV').find('H2').append($(this)); }); } // scroll to start of content if (enable_scroll_to_content) { if ((window.location.href.indexOf('?do') < 0) && window.location.href.indexOf('#') < 0) { $('html,body').animate({scrollTop: $('#elContent').offset().top},'slow'); } } } catch(e) { // I don't wanna hear about it } })();
  20. sakura

    Chrome/TamperMonkey for Design

    The CodeMonkey code editor is not perfect. I can live with that πŸ˜‰ ... 🐈 ...
  21. sakura

    Chrome/TamperMonkey for Design

    Added Activity Stream: // ==UserScript== // @name [DPE] CSS Overrides // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://en.delphipraxis.net/ // @match https://en.delphipraxis.net/?* // @match https://en.delphipraxis.net/topic/* // @match https://en.delphipraxis.net/discover/* // @grant none // ==/UserScript== (function() { try{ 'use strict'; // Header const enable_compact_banner = true; const enable_compact_searchbar = true; // thread overview const enable_modified_topic_banner = true; const enable_compact_fluidlist = true; const enable_additional_highlight = true; // Threads/Posts const enable_small_userinfo = true; const enable_compact_comment = true; const enable_compact_pre = true; const enable_compact_code = true; const enable_compact_survey = true; // Other const enable_goto_latest_post = true; const enable_scroll_to_content = true; const enable_compactDiscover = true; const isDiscover = location.href.indexOf('delphipraxis.net/discover') > 0; const $ = jQuery; const stylesheet = document.styleSheets[document.styleSheets.length - 1]; if (enable_compact_banner) { $('HEADER .logo').attr('style', 'height: auto;'); $('HEADER .logo IMG').attr('style', 'margin-bottom: -30px;'); } // fluid list if (enable_compact_fluidlist && !isDiscover) { $('LI.ipsDataItem').attr('style', 'padding: 2px 0'); $('DIV.ipsDataItem_icon').attr('style', 'padding: 0 10px;'); $('DIV.ipsDataItem_main').attr('style', 'padding: 0;'); $('UL.ipsDataItem_stats').attr('style', 'padding: 0 10px 0 0;'); } if (enable_goto_latest_post) { $('LI.ipsDataItem_unread DIV.ipsDataItem_main A[href*=topic]').each(function() { const href = $(this).attr('href'); if (href.indexOf('?') < 0) $(this).attr('href', href + '?do=getNewComment'); }); } if (enable_modified_topic_banner) { const ipsPageHeader = $('DIV.ipsPageHeader'); ipsPageHeader.attr('style', 'padding: 5px;'); if (!isDiscover) { const topicControls = ipsPageHeader.next(); const topicControlsLinks = topicControls.find('A'); for (var idx = 0, link; link = topicControlsLinks[idx]; idx++) { const div = $('<div class="ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone" style="margin-left: 5px;"></div>'); link.style = 'padding: 5px; line-height: 1.5em;'; div.append(link); ipsPageHeader.prepend(div); } topicControls.remove(); } } if (enable_small_userinfo) { $('UL.cAuthorPane_info').attr('style', 'transform: scale(0.6); padding: 0; margin: -40px;'); } if (enable_compact_comment && !isDiscover) { $('DIV[data-role="commentContent"]').attr('style', 'padding: 0; font-size: small;'); } // Code if (enable_compact_code && !isDiscover) { $('PRE.ipsCode').attr('style', 'padding: 5px !important; font-size: small;'); } if (enable_compact_pre) { stylesheet.insertRule('PRE.ipsCode { max-height: 15em; }'); stylesheet.insertRule('PRE.ipsCode.viewAll { max-height: inherit; }'); stylesheet.insertRule('.codefold { right: 0; position: absolute !important; margin-right: 3em; }'); const a = $('<a href="javascript:void(0);" class="codefold" onclick="$(this).parent().toggleClass(\'viewAll\');">open/close</a>'); $('PRE.ipsCode').prepend(a); } // Survey if (enable_compact_survey && !isDiscover) { $(':root').attr('style', '--grid-gap: 0px;'); $('span.ipsFaded').attr('style', 'margin-left: 5px;'); } if (enable_additional_highlight) { // Highlight subforum in post listing (fluid list) $('.ipsDataItem_meta > a[href*="?forumId="]').css({ color: '#4D7395' }); // Highlight user in post listing (fluid list) $('.ipsDataItem_meta > span > a[href*="/profile/"]').css({ color: '#4D7395' }); } // Compact search bar if (enable_compact_searchbar && !isDiscover) { $('.nav-bar').attr('style', 'height: 30px;'); $('.secondary-header-align').attr('style', 'height: 30px;'); $('.ipsNavBar_primary > ul > li > a').attr('style', 'line-height: 30px;'); $('.ipsfocus-search').attr('style', 'height: 30px; line-height: 30px;'); } stylesheet.insertRule('.ipsDataList.ipsDataList_zebra > .ipsDataItem { height: 45px; }'); if (enable_compactDiscover && isDiscover) { $('LI.ipsStreamItem').attr('style', 'padding: 2px 10px !important; margin: 0 0 2px 30px !important;'); $('LI.ipsStreamItem UL.ipsTags').each(function () { $(this).closest('DIV').find('H2').append($(this)); }); } // scroll to start of content if (enable_scroll_to_content) { if (window.location.href.indexOf('?do') < 0) { $('html,body').animate({scrollTop: $('#elContent').offset().top},'slow'); } } } catch(e) { // I don't wanna hear about it } })(); ... 🐈 ... Fixed for start page after login.
  22. sakura

    Attachment limit

    Hi, not sure I think this is a good idea. Just hope you'll watch how it works out. Rather would think max. size per attachment would be better. Otherwise users might start deleting attachments made, which can/will lead to broken threads at some point. Mine is now at: You have used 229.84 kB of your 488.28 MB attachment limit. ... 🐈 ...
  23. sakura

    Solved: Dark Theme for DP

    I copied the header from the other script and forget to remove exclusions, which shouldn't be needed in this one. ... 🐈 ...
  24. sakura

    Solved: Dark Theme for DP

    Couple smaller improvements in previous post. ... 🐈 ...
  25. sakura

    Solved: Dark Theme for DP

    You are welcome, have done so much f****ing CSS in the last months, this was a easy one πŸ˜‰ ... 🐈 ...
Γ—