c# – looking to optimize array looping or a even a better solution is appreciated

looping array for 7 times for printing the following output

int() arr = { 9, 2, 7, 4, 6, 1, 3 };


  static void Main(string() args)
     int() arr = { 9, 2, 7, 4, 6, 1, 3 };
     int rotate = 7;
     int printsize = 5;
     int addsize = 0;
     int startsize = 0;
     for (int i = 0; i < rotate; i++)
        Print(arr, printsize, ref addsize, ref startsize);
 static void Print(int() arr, int printsize,ref int addsize, ref int startsize)
      int n = (arr.Length - 1);
      int loop = 0;
      for (int j = startsize; j <= (printsize + addsize); j++)
          if (loop == 4)
             startsize = j + 1;
             addsize = (n) - j;
          if (j == n)
            addsize = 0;
            j = -1;
            printsize = printsize - (loop + 1);
          loop = loop + 1;

Hi guys, im getting this error java.net.SocketException: Connection reset, any help would be appreciated!

Hi guys, im getting this error java.net.SocketException: Connection reset, any help would be appreciated! – Stack Overflow em Português

Suggest some free tutorial for magento 2 associate developer certification please Didnt found anything on internet.Any help would be appreciated

i m planning to answer magento 2 associate developer exam, can anyone plz suggest me some content for the same.
All the cources which are given are paid ones also the exam fee is also not cheap, so wanted some reliable source, Please suggest some.

sql – I am getting an SQLException. Any help is greatly appreciated

“java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement” is what I am getting. SQL code below:

CREATE OR REPLACE PROCEDURE Get_User_Accounts(BU IN ProjectZeroBankingAppClat_BankUser.Bank_Username%TYPE)
    SELECT *
    FROM ProjectZeroBankingAppClat_BankUser_BankAccount JUNCTION
    JOIN ProjectZeroBankingAppClat_BankAccount BankAccount
    ON JUNCTION.BankAccount_ID = BankAccount.BankAccount_ID) B
    WHERE B.Bank_Username = BU;

schengen – Think I have overstayed in Denmark, as an EU citizen. But need to apply for residency. Advice appreciated

I am a British citizen so it’s fairly urgent (considering brexit). I was getting everything ready to apply for EU residency through the self-sufficiency option. Then I found out that I should have applied for this within 3 months of arriving in Denmark. I feel stupid, but I thought this applied to non-EU citizens.

I think I have overstayed over a year. I feel a lot of anxiety and guilt about it and don’t know the best way to deal with it. I can’t return to the UK and come back in a few weeks because of covid restrictions.

The document requires me to put a date of entry. It doesn’t say I need to provide proof but I assume they might ask for it. I am wondering whether to call and ask what my options are and admit that I have overstayed. However, I feel very concerned about what the punishment might be for overstaying as an EU citizen. I can only find examples for non-EU citizens overstaying.

I looked here: https://international.kk.dk/artikel/eu-residence-document
They explain about the 3 months rule but don’t mention any consequences or what to do, what will happen, if you have spent longer than 3 months before applying.

This EU website: https://europa.eu/youreurope/citizens/residence/documents-formalities/reporting-presence/index_en.htm
“In some EU countries, failure to report your presence might result in a fine, but you cannot be expelled just for this.”

I should add that while I have been in Denmark I have not claimed benefits, used any services etc.

Does Denmark impose fines for EU-citizens overstaying? And if so, how much might this be? Will it be a matter for police?

Will this overstay be a problem for me applying for residency?

Thank you.

bitcoincore development – How to improve bitcoin-qt when downloading blockchain? (very technical, dev views appreciated)

GitHub suggested discussing here before bothering developers with an issue.
So be it! 🙂

I’m running Bitcoin Core Version v0.20.1 and Linux Mint 18.3 on crappy old hardware. Pruning blockchain to 2 G and setting dbcache=2048 didn’t help much. Moving datadir from HDD onto a USB-Stick did a little.

top says CPU around 20% can reach up to 40 if I manually drop slow or unresponsive nodes.
CPU frequency is rarely going up. So, no issue here.

Memory usage is fine too, actually a lot of headroom. Looks like bitcoin-qt doesn’t need that much cache.

Swap is empty. (vm.swappiness=5)


Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdc               0,00     0,00  549,00    0,00 51125,00     0,00   186,25     1,06    1,92    1,92    0,00   1,70  93,60

Bottleneck seems to be file I/O. Which confuses me since that is what a cache is meant to fix, isn’t it?

Now to my questions:

Is there anything I am missing to improve disk access?
Is there an open issue on GitHub regarding this already?

And secondly for the experts on dropping lazy nodes. Can you give me a hint at which classes I have to look to understand the strategy? Or even better a link to the discussions on that topic.
For I don’t want to start an arms race between clients seeking faster download and nodes trying to serve fair.

Short summary what I’ve learned so far.

  • Don’t use USB-Sticks for datadir. For bitcoin-qt might shutdown due to Fatal LevelDB errors.
  • Pruning increases disk I/O while saving disk space.
  • Even on crappy old hardware memory and CPU are most probably not the limiting factor.

python – Need a review for my project-plan. Any advice would be appreciated

I want to code an application using python – its purpose will be :

  • Playing and downloading YT videos natively
  • Having a playlist system, primarily for playing music.

To do this task, I have so far found:
-youtube-dl to search and capture the video and audio streams, i then plan to
-forward this stream to a simple opencv based player
-this will be embedded in a GUI made with pysimplegui (tkinter version).

I am a novice to programming but have exprience with linux and some simple projects. This project is currently above my skill level, but learning this way (using documentation and projects) is the best way for me.

Can this be done or am I missing something? Any tips will be appreciated.
Also, where should I start? And will I be able to embed opencv into pysimplegui or should I use stock tkinter (since pysimplegui is much easier).

javascript – Could you please assist with some advice on making my code a little more DRY. And General feedback and guidance would be much appreciated

As you can see there are a few instances where i’ve repeated code. For example isDry, getElementById and image.src. What could i do to fix that problem? And possibly create better, cleaner code in the future.

const toggleSwitch = document.querySelector('input(type="checkbox")');
const nav = document.getElementById('nav');
const toggleIcon = document.getElementById('toggle-icon');
const textBox = document.getElementById('text-box');
const darkLightTheme = ('dark', 'light');

function imageMode(color) {
    image1.src = `img/undraw_proud_coder_${color}.svg`;
    image2.src = `img/undraw_feeling_proud_${color}.svg`;
    image3.src = `img/undraw_conceptual_idea_${color}.svg`;

    lightDarkMode = (isDark) => {
    nav.style.backgroundColor = isDark ? 'rgb(0 0 0 / 50%)' : 'rgb(255 255 255 / 50%)';
    textBox.style.backgroundColor = isDark ? 'rgb(255 255 255 / 50%)' : 'rgb(0 0 0 / 50%)';
    toggleIcon.children(0).textContent = isDark ? 'Dark Mode' : 'Light Mode';
    isDark ? toggleIcon.children(1).classList.replace('fa-sun', 'fa-moon') : toggleIcon.children(1).classList.replace('fa-moon', 'fa-sun');
    isDark ? imageMode(darkLightTheme(0)) : imageMode(darkLightTheme(1));

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheapest USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Proxyti.com Buy Quality Private Proxies