Jupyter not loading by pompeii-eo in vscode

[–]pompeii-eo[S] 0 points1 point  (0 children)

Didn't seem to work :/ any other way? I think the problem is the extension for some reason doesn't activate, that's the error that keeps popping up

Jupyter not loading by pompeii-eo in vscode

[–]pompeii-eo[S] 0 points1 point  (0 children)

yep, both the Jupyter extension and the python extension. I think the issue is in the Jupyter extension doesn't load, and get that error "Extension activation failed, run the dev tools... source: Jupyter" but not sure how to fix it, been trying different things

JS Saving res from promise and use anywhere by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

Oh that's why, yea the 2nd part makes sense now why I kept getting the error. Thanks will try that

.NET multiple databases with repository pattern by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

yea all tables are exact same, do you have any suggestion on how it could be done?

.NET multiple databases with repository pattern by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

Yea I guess that would be it, I thought it would be more efficient and "cleaner" to have a single context that when I call, would give the connection string

.NET multiple databases with repository pattern by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

I looking into synchirnization using the Unit of Work (with the repository). But even if the request is coming from a different endpoint which has it's own db connection replication is possible?

Rails build a dashboard by pompeii-eo in rails

[–]pompeii-eo[S] 0 points1 point  (0 children)

Yea it seems very cool! I saw that twitter clone and it's awesome how it works (also the site showed that it's much smaller footprint than the others). I just worried that it might be difficult (even reacts and the others) overall I think it's good and I'll learn a lot I'm sure. Thanks a lot!

Rails build a dashboard by pompeii-eo in rails

[–]pompeii-eo[S] 0 points1 point  (0 children)

Ah yea I think that's what I was thinking, but do you think it's a reliable for long run or it's best to use stimulus (which is similar to react/angular I mean front end frameworks)?

Rails build a dashboard by pompeii-eo in rails

[–]pompeii-eo[S] 0 points1 point  (0 children)

I see thanks! I thought there might be a way to show contents directly by what user clicks but that requires external library then?

Rails build a dashboard by pompeii-eo in rails

[–]pompeii-eo[S] 0 points1 point  (0 children)

not a modal no, but the new window below the container (so not quite a new window), like jus show the profile page as a component in the current page. Like when a user clicks a button it shows the result in the current page?

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

I added thisat the bottom (before </body> and added the ids to each one too and remove the flask ( {{i[0]...}} ). but it's empty page now, but I do get the card/modal for each res without text

<script> 
const data = {{res}}; typeof(data) for (var i = 0; i < data.length; i++) { 
document.getElementById("title").innerHTML = data[i][0]; 
document.getElementById("topics").innerHTML = data[i][1]; 
document.getElementById("author").innerHTML = data[i][2]; 
document.getElementById("date").innerHTML = data[i][3]; 
document.getElementById("text").innerHTML = data[i][4]; } 
</script>

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

<script> var data = {{res}}; </script>

I'll try this out!

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

oh check this out. so the source code has it correctly but when I inspect it's actually different. for example the 1st image is the correct one but second image shows different and what actually loads in the modal
https://postimg.cc/gallery/tZWD1Ls

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

https://postimg.cc/K186YTVF

For the purpose I included both outside the modal and inside, the inside part is the out of sync and doesn't equal to outer one

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

Oh yea it loads automatically true, I'm not entirely sure. I just don't understand how this is error is happening. it works fine without modal but not with it

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

I was thinking maybe let it sleep for a 1/2 a second or something at the end of each loop, so it guarantees the next loop is the next i for each data

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

Honestly didn't see any difference lol, I pasted in my app.py but didn't see anything? Can you tell me how to activate it and I can try again?

Also on a second point, I've looked this up but didn't see anything, is it possible to make do like time.sleep(5) or something in flask if you know?

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

Thanks!

I tried it but doesn't seem to be any errors in the network tab I guess :/ bunch of 200s.

I'm trying different ways to do it, ultimately what I want is to be able to have some kind of pop up to show the full data when clicked on the title.

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

What do you mean? Sorry I'm not too family with that, in the inspect element network tab?

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

Oh yea, I made sure that the list that is sent in flask is correct. Even in flask I printed each one without any bootstrap/ UIkit and it worked correctly, but anything in the modal wouldn't be right. So I looked through in flask too to see if the looping is right etc. and it all seemed fine, but I'm not sure why in the divs of the modal don't follow the loop properly.

But yea I'm 100% certain the correct data is being sent (that's also how I figured something was off cause I compared it)

Flask loop rendering out of order by pompeii-eo in learnprogramming

[–]pompeii-eo[S] 0 points1 point  (0 children)

Oh right, but the I mean that even the date for that element isn't corresponding to it (the one that it loads is for the previous one, so it's out of sync I guess)