Posts by KelvynRisso • 156 points
7 posts
-
2
votes2
answers784
viewsA: Recursive Function in Typescript Returning Array with Dynamic Objects
Assuming you have received an array with the Postgres data, as follows: var arr = [ {id: 1, idPai: null}, {id: 2, idPai: null}, {id: 11, idPai: 1}, {id: 12, idPai: 1}, {id: 21, idPai: 2}, {id: 22,…
-
3
votes2
answers12367
viewsA: Image inserted in html does not want to appear
If you’re carrying that HTML locally, without using a server, you can just exchange the src from image to: src="file://C:/Users/Lucas/Pictures/Ogame.jpg" However, for security reasons, browsers will…
htmlanswered KelvynRisso 156 -
0
votes1
answer42
viewsA: Save information from an array to each function call
This happens because you are always using the same reference of vetor that is global. You can solve this by creating a vector of local scope of your job. function funcao(){ a = scan; vetor.push(a);…
-
0
votes2
answers402
viewsA: Return data from a Linq query to an EF Core repository
There is no "pretty" way for you to do this, since the Include cannot stand conditions. One way is to separate it into two queries and then put it together: return DbSet.Where(p =>…
-
4
votes1
answer56
viewsA: Is there a difference between "variavelX: Function(){...}" and "variavelX = Function(){...}"?
var minhaFuncao = function(){...} You can use it anywhere in your code, and regardless of where you declare it, minhaFuncao will be of global scope. Already minhaFuncao: function(){...} as you can…
javascriptanswered KelvynRisso 156 -
1
votes2
answers2506
viewsA: How to send and receive image by json?
Basically, assuming you have the image stored locally, or simply have the byte array of it: byte[] bytes = System.IO.File.ReadAllBytes(FileName); String strImage = Convert.ToBase64String(b); Then…
-
1
votes1
answer1018
viewsA: Save User Session/Cookie when logging in
1 - Session means you store data during user activity on your site, and it will expire when it leaves or after a certain downtime. This information is available anywhere in the application in the…