Communities and Collections
Posts
There are many topic about the faith,
I try my demostration exist, to me it's very simple, a piece of cake,
(even though I personally don't follow religion, I can't' stand aggresivity and arrogance I see agaist who follow religion, so i'm going to provocate atheists here)
Supposing I enter in a room with other people, if i'm really a rational person, and science is the paradigma I follow for believe everything, I should check the chimical substances of the ceiling or check how architect built the edifice, this for being scientifically and rational sure the ceiling is not going to fall apart and kill me (expecially if I'm atheist, I suppose i'm quite scared to die).
Why don't happen?
Why people enter in the room without check nothing scientific,
using something near the exactly the concept of faith.
When they clam they are scientific, how many time they check something in their day and how many time enter in rooms check nothing?
Now, i hope there is no need to explain the room it's a metaphora, you have to extend meaning with your imagination, I prefer say clear after other orwellian experiences.
I personally, have to admit I enter in the mataphoric room lot of times using nothing than faith (not consciouss), I also don't ask if someone have check and it's not going to fall apart, everything it's automatics like an anmal istinct, in a psychological delegation of meaning and thinking in a loop and a chain of faith in the faith and so one
The strange thing is that I'm one trust nothing and nobody from beginning of my life, I'm a checher, but how many thing i'm not cheking? i could think i'm checling only what I like to check.
But I want to be too hard with myself, i cant' check everything, shouldn't I?
So i need faith, relax, or I will explode checking things, I'm going to get crazy.
So, I enter in the metaphoric room, too tired to check everything inside,
and I fell, nothing happen, the sun is going to shininng and the ceiling is not going to fall apart.
Now if this is truer, the metaphiric room it's not something I KNOW, it's something i FEEL.
Here we have our demostration, i'm lazy about fatih so i stop here and let other continue the work.
When you arrive that everything works with faith, you don't have to understand what is, but why this human way to feel take different shapes inside everyone fo us, why we fight each other in order to demostrate something exist don't exist.
So thinking in this way, I ealborated the idea that spiritual people are not differents because they have faith and other dont't have, but probably only because they don't remove the feeling of faith.
Remotion of faith, shoudl be explained by atheist, not by these spiritual people, and this would reverse the concept we usually need to handle.
I try my demostration exist, to me it's very simple, a piece of cake,
(even though I personally don't follow religion, I can't' stand aggresivity and arrogance I see agaist who follow religion, so i'm going to provocate atheists here)
Supposing I enter in a room with other people, if i'm really a rational person, and science is the paradigma I follow for believe everything, I should check the chimical substances of the ceiling or check how architect built the edifice, this for being scientifically and rational sure the ceiling is not going to fall apart and kill me (expecially if I'm atheist, I suppose i'm quite scared to die).
Why don't happen?
Why people enter in the room without check nothing scientific,
using something near the exactly the concept of faith.
When they clam they are scientific, how many time they check something in their day and how many time enter in rooms check nothing?
Now, i hope there is no need to explain the room it's a metaphora, you have to extend meaning with your imagination, I prefer say clear after other orwellian experiences.
I personally, have to admit I enter in the mataphoric room lot of times using nothing than faith (not consciouss), I also don't ask if someone have check and it's not going to fall apart, everything it's automatics like an anmal istinct, in a psychological delegation of meaning and thinking in a loop and a chain of faith in the faith and so one
The strange thing is that I'm one trust nothing and nobody from beginning of my life, I'm a checher, but how many thing i'm not cheking? i could think i'm checling only what I like to check.
But I want to be too hard with myself, i cant' check everything, shouldn't I?
So i need faith, relax, or I will explode checking things, I'm going to get crazy.
So, I enter in the metaphoric room, too tired to check everything inside,
and I fell, nothing happen, the sun is going to shininng and the ceiling is not going to fall apart.
Now if this is truer, the metaphiric room it's not something I KNOW, it's something i FEEL.
Here we have our demostration, i'm lazy about fatih so i stop here and let other continue the work.
When you arrive that everything works with faith, you don't have to understand what is, but why this human way to feel take different shapes inside everyone fo us, why we fight each other in order to demostrate something exist don't exist.
So thinking in this way, I ealborated the idea that spiritual people are not differents because they have faith and other dont't have, but probably only because they don't remove the feeling of faith.
Remotion of faith, shoudl be explained by atheist, not by these spiritual people, and this would reverse the concept we usually need to handle.
TRAPPED IN THE NET - THE CARPENTER QUESTION
This time i'm going to open a uber metaphysic post to introduce what I will call "the carpenter question".
Try to be patience because we need first to exit a root then to enter into another.
THE NET - INTRODUCTION
I always ask myself what the hell is time, expecially in relation the eternal war between objectivists and subjectivists.
Both sides are in my opinion the same annoyng thing, a deformation of the same mirror, they are like brothers that fight for the same blue t-shirt.
I say this becasue they share the main root, like these imaginary brothers share the same mother (mater semper certa est, pater numquam)
They share the same idea of the life, they share a life without living time.
What is living time? well i don't know exactly because the post itself is gonna be in real time, but be patience a moment, I'll try to write down something decent about.
TWO TIMES - ONE SPIDER NET
We have two times that shape our mind as they shape our languages (in the future tences and in the past tences) .
One is the time without us, the time that simple pass near us like a Ferrari we barelly can see when we are lazing around a fuel station.
The other is the time with us, the time we are walking in the history, the time we are living.
These two concepts are not the same, because one is passive, cold and one is active, hot (I would say cool if is official tollerate).
Both the two brothers, whom i was speaking before, share the idea we are trapped in the passive metaphysic side, inside the net of a big spider, we are here to observe things during our life in the trap, we are not here for walking the history, we are not here for be free.
THE CARPENTER QUESTION - DIVAGATION ROOM
Pheraps we are ready to reach the main topic: "the carpenter question", so let's do it.
The carpenter question have to do with the theories exposed in the book "Agaist Democracy" written by Jason Brennan.
Book describe why we need to exit from the currently democracy and setup a different system where only people qualificated and in possesion of the right skills can exprime a vote and similar kinda things.
As justification this perspective, Brennan make, also in interview, examples about easy general culture questions that people fail, expecially about politics, but we can say almost in every aspect of culture.
We dont' have to hidden here that the examples show that averange people are really ignorant, there is no doubt about it.
Here we have to understand if really is something bad.
THE CARPENTER QUESTION - CONCENTRATION ROOM
I'm not totally in abstract agaist the theory, should I? I think we are asking world wide if democracy is something ridicolus or something serious from the beginning (expecially if we study well the greek democracy we get that this was already a controvarsal point) and noone was really able to solve the dilemma, soudln't them?
Pheraps democracy need of irony for surviving, we shouldn't be too envolved in its sacred funeral ceremonial.
I have always suspected we don't smile enough.
So, I don't want really to speak about whether the funeral theory is right or wrong, because it's probably both exactly like the concept of the time while the spider bitch is watching us trapped in the net.
I want to speak about the questions that people have to answer about general culture, i want to think about if they really have a meaning, I want know what they really show.
So, let's do it.
THE CARPENTER QUESTION - SPIDER ROOM
People object of the questions are in the side of the spider net where they cannot chose the questions.
Please be careful that i'm not questining the theory, i'm only reversing, i'm only using it for testing if work in the laboratory of the other sides.
Here my engish could became a mess to follow, but let's try a moment to think if was a carpenter that make the questions to ask these elite people and not the contrary.
How many of these intellectuals are going to answer correctly? How many of them have enough fingers after the second week of work?
We are going to have the same statistic reversed.
We are trapped in the same net, under the power of the same spider, aren't we? Surelly this show something, but not necessary what is supposed to show in the funeral theory.
Show people know what they need to know, nothing more, nothing less.
We have to see if this it's someting good or something bad.
Now, let's try a moment to introduce another concept then we came back and hopefully we end something.
THE CARPENTER QUESTION - THE WRONG NUMBER ROOM
For get this we still use our carpenter.
Now, supposing we need the carpenter, because our phone table is broken or whatelse, we make the number, have our call, we ask what carpenter can do for repair our table, etc..
Supposing he said that he dont' know because he know something else.
Geez, here finally, we start to be near the loco main point.
Surelly, since we belong one of the most smiling and take it easy society of the history of the humanity, we will think smple carpenter is freak and give us a simple and funny loco moment.
But what woudl happen if was always the same? How is big our tollerance about irony if every carpenter we call tell us the same story?
what we will be supposed to do? try with taxi drivers? try with elementary teachers?
So, you see, this society don't work because people know, it know because people work.
This last main concept bring us into the next and almost final chapter of the topic.
THE CARPENTER QUESTION - THE EVERYBODY'S RULE ROOM
The real question we reached in the last topic chapter is that we need to know the role of a person and we should only ask questions about the role cover by the person.
Outside this range of knowledge connected our duty in a society, every people could appear stupid, it's reason why don't know could mean many things, reason why don't' know belong always everybody of us.
Now, since we reached this point, we need to reverse again the problem and ask ouselves what is the role of a politician, what is it? what they are supposed to do?
This is more important than ask if people can vote them starting from their horrible general cultur skills they manifested, we have to know what these politics creatures are supposed to do, because this affect also the kind of questions we are going to ask to the people in order to decide if they are connected or not with the problems the politics are call to solve.
Think about what a disaster coudl be don't know the specific role of every people, think a carpenter that instead to repair your table came in you sacred space and start to paint your room, think if he start to broken your televison or make a happyday party noone ordered.
What the hell is it?
So, we have to define the role of the politics, i mean what is their work? what they have to do?
THE CARPENTER QUESTION - THE BEST FOR EVERUBODY AND THE RIGHT QUESTION
Probably they have to do the best for everybody, the best to improve society, but it's all but simple because the interests of people are differents, they are to be honest in conflict, they are in the other side ot the net, who gain is because someone lost and viceversa.
So, we can reach that they have the really hard role that is write the social compromise between different interests, this is by the way also the democracy itself.
Even though we can all agree it's a very hard work to do, we have also to think if the cultural general questions are the right questions to ask to the people.
Let's try something else.
Lets' try to ask if they like the current compromise. Are they still not able to answer correctly?
Lets' try to ask if they want politcs work only for elites or they want poltics work for the people. Are they still not able to answer correctly?
Lets' try to ask if they still believe someone care what they think. Are they still not able to answer correctly?
Lets' try to ask if they believe in the political system. Are they still not able to answer correctly?
Lets' try to ask if they know what they dream. Are they still not able to answer correctly?
Lets' try to ask if they still fell they are in a democracy. Are they still not able to answer correctly?
Let's try to ask the righ questions and pheraps these really mean something.
(P.S. Sorry you win nothing if you are able to read all the wallpaper)
This time i'm going to open a uber metaphysic post to introduce what I will call "the carpenter question".
Try to be patience because we need first to exit a root then to enter into another.
THE NET - INTRODUCTION
I always ask myself what the hell is time, expecially in relation the eternal war between objectivists and subjectivists.
Both sides are in my opinion the same annoyng thing, a deformation of the same mirror, they are like brothers that fight for the same blue t-shirt.
I say this becasue they share the main root, like these imaginary brothers share the same mother (mater semper certa est, pater numquam)
They share the same idea of the life, they share a life without living time.
What is living time? well i don't know exactly because the post itself is gonna be in real time, but be patience a moment, I'll try to write down something decent about.
TWO TIMES - ONE SPIDER NET
We have two times that shape our mind as they shape our languages (in the future tences and in the past tences) .
One is the time without us, the time that simple pass near us like a Ferrari we barelly can see when we are lazing around a fuel station.
The other is the time with us, the time we are walking in the history, the time we are living.
These two concepts are not the same, because one is passive, cold and one is active, hot (I would say cool if is official tollerate).
Both the two brothers, whom i was speaking before, share the idea we are trapped in the passive metaphysic side, inside the net of a big spider, we are here to observe things during our life in the trap, we are not here for walking the history, we are not here for be free.
THE CARPENTER QUESTION - DIVAGATION ROOM
Pheraps we are ready to reach the main topic: "the carpenter question", so let's do it.
The carpenter question have to do with the theories exposed in the book "Agaist Democracy" written by Jason Brennan.
Book describe why we need to exit from the currently democracy and setup a different system where only people qualificated and in possesion of the right skills can exprime a vote and similar kinda things.
As justification this perspective, Brennan make, also in interview, examples about easy general culture questions that people fail, expecially about politics, but we can say almost in every aspect of culture.
We dont' have to hidden here that the examples show that averange people are really ignorant, there is no doubt about it.
Here we have to understand if really is something bad.
THE CARPENTER QUESTION - CONCENTRATION ROOM
I'm not totally in abstract agaist the theory, should I? I think we are asking world wide if democracy is something ridicolus or something serious from the beginning (expecially if we study well the greek democracy we get that this was already a controvarsal point) and noone was really able to solve the dilemma, soudln't them?
Pheraps democracy need of irony for surviving, we shouldn't be too envolved in its sacred funeral ceremonial.
I have always suspected we don't smile enough.
So, I don't want really to speak about whether the funeral theory is right or wrong, because it's probably both exactly like the concept of the time while the spider bitch is watching us trapped in the net.
I want to speak about the questions that people have to answer about general culture, i want to think about if they really have a meaning, I want know what they really show.
So, let's do it.
THE CARPENTER QUESTION - SPIDER ROOM
People object of the questions are in the side of the spider net where they cannot chose the questions.
Please be careful that i'm not questining the theory, i'm only reversing, i'm only using it for testing if work in the laboratory of the other sides.
Here my engish could became a mess to follow, but let's try a moment to think if was a carpenter that make the questions to ask these elite people and not the contrary.
How many of these intellectuals are going to answer correctly? How many of them have enough fingers after the second week of work?
We are going to have the same statistic reversed.
We are trapped in the same net, under the power of the same spider, aren't we? Surelly this show something, but not necessary what is supposed to show in the funeral theory.
Show people know what they need to know, nothing more, nothing less.
We have to see if this it's someting good or something bad.
Now, let's try a moment to introduce another concept then we came back and hopefully we end something.
THE CARPENTER QUESTION - THE WRONG NUMBER ROOM
For get this we still use our carpenter.
Now, supposing we need the carpenter, because our phone table is broken or whatelse, we make the number, have our call, we ask what carpenter can do for repair our table, etc..
Supposing he said that he dont' know because he know something else.
Geez, here finally, we start to be near the loco main point.
Surelly, since we belong one of the most smiling and take it easy society of the history of the humanity, we will think smple carpenter is freak and give us a simple and funny loco moment.
But what woudl happen if was always the same? How is big our tollerance about irony if every carpenter we call tell us the same story?
what we will be supposed to do? try with taxi drivers? try with elementary teachers?
So, you see, this society don't work because people know, it know because people work.
This last main concept bring us into the next and almost final chapter of the topic.
THE CARPENTER QUESTION - THE EVERYBODY'S RULE ROOM
The real question we reached in the last topic chapter is that we need to know the role of a person and we should only ask questions about the role cover by the person.
Outside this range of knowledge connected our duty in a society, every people could appear stupid, it's reason why don't know could mean many things, reason why don't' know belong always everybody of us.
Now, since we reached this point, we need to reverse again the problem and ask ouselves what is the role of a politician, what is it? what they are supposed to do?
This is more important than ask if people can vote them starting from their horrible general cultur skills they manifested, we have to know what these politics creatures are supposed to do, because this affect also the kind of questions we are going to ask to the people in order to decide if they are connected or not with the problems the politics are call to solve.
Think about what a disaster coudl be don't know the specific role of every people, think a carpenter that instead to repair your table came in you sacred space and start to paint your room, think if he start to broken your televison or make a happyday party noone ordered.
What the hell is it?
So, we have to define the role of the politics, i mean what is their work? what they have to do?
THE CARPENTER QUESTION - THE BEST FOR EVERUBODY AND THE RIGHT QUESTION
Probably they have to do the best for everybody, the best to improve society, but it's all but simple because the interests of people are differents, they are to be honest in conflict, they are in the other side ot the net, who gain is because someone lost and viceversa.
So, we can reach that they have the really hard role that is write the social compromise between different interests, this is by the way also the democracy itself.
Even though we can all agree it's a very hard work to do, we have also to think if the cultural general questions are the right questions to ask to the people.
Let's try something else.
Lets' try to ask if they like the current compromise. Are they still not able to answer correctly?
Lets' try to ask if they want politcs work only for elites or they want poltics work for the people. Are they still not able to answer correctly?
Lets' try to ask if they still believe someone care what they think. Are they still not able to answer correctly?
Lets' try to ask if they believe in the political system. Are they still not able to answer correctly?
Lets' try to ask if they know what they dream. Are they still not able to answer correctly?
Lets' try to ask if they still fell they are in a democracy. Are they still not able to answer correctly?
Let's try to ask the righ questions and pheraps these really mean something.
(P.S. Sorry you win nothing if you are able to read all the wallpaper)
I noticed that AI topics reach easy 50/60 posts rock solid every time, it means people get passion for this enviroment of discussion expecially in summer time
so, supposing this is our unique occasion in life to make a question to the AI,
what we would ask to it,
what we really want to know?
what is our best all time one shot question?
pharaps i want to know who killed kennedy, it's just curiosity after all these movies, all these cospiracy book theories, but what happen to me if AI answer it was really the patsy thay killed him?
so i pheraps could ask about the mistery of women, not because really i care, but because i can write a book with the definitive answer and become rich solving this mistery for the first time, but what happen to me if AI anwser there is no misytery at all, answer to me that the real mistery is that there was ever no mistery
so, pheraps i can turn my question asking if god exist, this really open me a roadway to write a book of success, but what happen to me if simple say god dont' exist? don't' i have waste my only and unique best all time one shot question?
so, i think, i'm in someway forced to ask simply "what the hell of best all time one shot question i'm supposed to ask to you" and this is the strange thing, since i got the right question, but i can't get anymore the right asnwer
so, i think, i can change a little, and ask AI "what is the hell of best all time one shot answer you should say me answering the hell of best all time one shot question i'm supposed to ask you?"
so, supposing this is our unique occasion in life to make a question to the AI,
what we would ask to it,
what we really want to know?
what is our best all time one shot question?
pharaps i want to know who killed kennedy, it's just curiosity after all these movies, all these cospiracy book theories, but what happen to me if AI answer it was really the patsy thay killed him?
so i pheraps could ask about the mistery of women, not because really i care, but because i can write a book with the definitive answer and become rich solving this mistery for the first time, but what happen to me if AI anwser there is no misytery at all, answer to me that the real mistery is that there was ever no mistery
so, pheraps i can turn my question asking if god exist, this really open me a roadway to write a book of success, but what happen to me if simple say god dont' exist? don't' i have waste my only and unique best all time one shot question?
so, i think, i'm in someway forced to ask simply "what the hell of best all time one shot question i'm supposed to ask to you" and this is the strange thing, since i got the right question, but i can't get anymore the right asnwer
so, i think, i can change a little, and ask AI "what is the hell of best all time one shot answer you should say me answering the hell of best all time one shot question i'm supposed to ask you?"
i have a web app html service with the callback to succes or unsuccess handle
usually unsuccess handle never fire, but i think due some problem in server of google (i'm not sure of this) i had some feedback that some users get the red message of problem communication with server.
now, i think this is connected an unlucky moment, nevwertheless i started to think how i can send to myself a message for notice i have these failures.
I thought to put inside the unsuccess callbak a new google.script run to another function that simple send a mail, i'm not sure it's allowed because i already called a script in the server.
I thougth also to put a try and catch (that i confess i have never used in my code) structure in the server function of google.script.run so in case of failure i send a mail to myself, also in this case i'm not sure this is in conflict to the callback message that show the user if aswer is send or not, i'm afraid this stop all the things in the server side
so, if someone what to share some opinions, in any case i will try something when i have a little of time (i'm oriented call a second google.script. run inside the failure callaback of the first google.script.run)
tks
usually unsuccess handle never fire, but i think due some problem in server of google (i'm not sure of this) i had some feedback that some users get the red message of problem communication with server.
now, i think this is connected an unlucky moment, nevwertheless i started to think how i can send to myself a message for notice i have these failures.
I thought to put inside the unsuccess callbak a new google.script run to another function that simple send a mail, i'm not sure it's allowed because i already called a script in the server.
I thougth also to put a try and catch (that i confess i have never used in my code) structure in the server function of google.script.run so in case of failure i send a mail to myself, also in this case i'm not sure this is in conflict to the callback message that show the user if aswer is send or not, i'm afraid this stop all the things in the server side
so, if someone what to share some opinions, in any case i will try something when i have a little of time (i'm oriented call a second google.script. run inside the failure callaback of the first google.script.run)
tks
i usually use this kind of function to return an array of datas from a sheet or whatelse if some column match a condition - in this way i simply reduce the array - this seem really fast instead loop things and i find very well this strategy
i write a generic example
var riduci_array = array_originale.filter(function(item) {
return item[1] == 'something';
});
sopposing i neet to reduce the 2 dimension array in the same way as well but i need to check 2 conditions something1 (let say 'cat') and something2 (let say 'dog') in different columns 1 and 2
how i write it down?
thanks
i write a generic example
var riduci_array = array_originale.filter(function(item) {
return item[1] == 'something';
});
sopposing i neet to reduce the 2 dimension array in the same way as well but i need to check 2 conditions something1 (let say 'cat') and something2 (let say 'dog') in different columns 1 and 2
how i write it down?
thanks
i'm working a new project
in a point of the project i'm getting a sheet as csv
this is the test of the function (the original i need to pass also some parameters, but more or less this is the code)
now, the test work, it's ok, i already tryed the exportation, everything works
I force download, but in case something go wrong (because i notice you can have in browser pop up that not alllow to start the download) I keep open the dialog form so user can download the csv from the button
this is what i wanted
the little problem is I get automatically a name of file that is equal the name of the sheet, googe itself do this
since i need to run the function in different situations I would like to change the name of file on fly, i dont' find any documentation on this in the guide of google, nothing about this export things, pheraps theyr are not in the gas documentations
I'm not sure is possbile pass in the url to rename the file
something like &name=myname to add my url variable
thanks
// genera url download csv
function get_csv_url () {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('csv');
var data_csv_exp = new Date();
var form_data_csv_exp = Utilities.formatDate(data_csv_exp, "GMT", "dd_MM_yyyy");
//Logger.log(form_data_csv_exp);
var url = ss.getUrl();
// rimuove edit dall'url
url = url.replace(/edit$/,'');
// esporta come pdf
var url_ext = 'export?exportFormat=csv' + '&gid=' + sheet.getSheetId();
url = url + url_ext;
//Logger.log(url);
var nome_link = 'Download CSV';
var html = '<!DOCTYPE html>' + "\n" +
'<html>' + "\n" +
'<head>' + "\n" +
'<style>' + "\n" +
'.button {' + "\n" +
'display: block;' + "\n" +
'margin: auto;' + "\n" +
'width: 125px;' + "\n" +
'background-color: #007399;' + "\n" +
'border: 1px solid black;' + "\n" +
'border-radius: 6px;' + "\n" +
'color: white;' + "\n" +
'padding: 10px 25px;' + "\n" +
'text-align: center;' + "\n" +
'text-decoration: none;' + "\n" +
'font-size: 16px;' + "\n" +
'}' + "\n" +
'</style>' + "\n" +
'</head>' + "\n" +
'<body>' + "\n" +
'<a class="button" href="' + url + '"target="blank">' + nome_link + '</a>' + "\n" +
'<script>' + "\n" +
'window.open("' + url + '", "_blank");' + "\n" +
'</script>' + "\n" +
'</body>' + "\n" +
'</html>';
var ui = HtmlService.createHtmlOutput(html)
SpreadsheetApp.getUi()
.showModelessDialog(ui,"Premi il link se non è partito il download");
} // fine get csv
in a point of the project i'm getting a sheet as csv
this is the test of the function (the original i need to pass also some parameters, but more or less this is the code)
now, the test work, it's ok, i already tryed the exportation, everything works
I force download, but in case something go wrong (because i notice you can have in browser pop up that not alllow to start the download) I keep open the dialog form so user can download the csv from the button
this is what i wanted
the little problem is I get automatically a name of file that is equal the name of the sheet, googe itself do this
since i need to run the function in different situations I would like to change the name of file on fly, i dont' find any documentation on this in the guide of google, nothing about this export things, pheraps theyr are not in the gas documentations
I'm not sure is possbile pass in the url to rename the file
something like &name=myname to add my url variable
thanks
// genera url download csv
function get_csv_url () {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('csv');
var data_csv_exp = new Date();
var form_data_csv_exp = Utilities.formatDate(data_csv_exp, "GMT", "dd_MM_yyyy");
//Logger.log(form_data_csv_exp);
var url = ss.getUrl();
// rimuove edit dall'url
url = url.replace(/edit$/,'');
// esporta come pdf
var url_ext = 'export?exportFormat=csv' + '&gid=' + sheet.getSheetId();
url = url + url_ext;
//Logger.log(url);
var nome_link = 'Download CSV';
var html = '<!DOCTYPE html>' + "\n" +
'<html>' + "\n" +
'<head>' + "\n" +
'<style>' + "\n" +
'.button {' + "\n" +
'display: block;' + "\n" +
'margin: auto;' + "\n" +
'width: 125px;' + "\n" +
'background-color: #007399;' + "\n" +
'border: 1px solid black;' + "\n" +
'border-radius: 6px;' + "\n" +
'color: white;' + "\n" +
'padding: 10px 25px;' + "\n" +
'text-align: center;' + "\n" +
'text-decoration: none;' + "\n" +
'font-size: 16px;' + "\n" +
'}' + "\n" +
'</style>' + "\n" +
'</head>' + "\n" +
'<body>' + "\n" +
'<a class="button" href="' + url + '"target="blank">' + nome_link + '</a>' + "\n" +
'<script>' + "\n" +
'window.open("' + url + '", "_blank");' + "\n" +
'</script>' + "\n" +
'</body>' + "\n" +
'</html>';
var ui = HtmlService.createHtmlOutput(html)
SpreadsheetApp.getUi()
.showModelessDialog(ui,"Premi il link se non è partito il download");
} // fine get csv
i'm working this function,
but something is wrong
i dont' want to create 4/5 for loop,
i'm already able to do this
i'm trying to write a unique function that handle all the work
the function i'm trying to do have a 2 dimension array (like google sheet, that is reason i'm testing) and a second array where i have a list of id that coincide with culumn 1 of my item array (that simulate the sheet)
now i'm trying to say the function to return a filter 2 dimension array if is able to find all the id are in the second array
i shoudl have this as result research 1,3,4
["1", "1A", "2A", "3A", "4A"],
["3", "1C", "2C", "3C", "4C"],
["4", "1D", "2D", "3D", "4D"],
im gettin this
Array [ "1" ]
1: Array []
2: Array [ "3" ]
3: Array [ "4" ]
4: Array []
5: Array []
// funzione
var items = [
["1", "1A", "2A", "3A", "4A"],
["2", "1B", "2B", "3B", "4B"],
["3", "1C", "2C", "3C", "4C"],
["4", "1D", "2D", "3D", "4D"],
["5", "1E", "2E", "3E", "4E"],
["6", "1F", "2F", "3F", "4F"],
];
var array_id = ["1","3","4"];
var filtra_array_valori_array = items.map(function(riga) {
return riga.filter(function(value) {
return array_id.indexOf(value) >= 0;
});
});
console.log(filtra_array_valori_array);
but something is wrong
i dont' want to create 4/5 for loop,
i'm already able to do this
i'm trying to write a unique function that handle all the work
the function i'm trying to do have a 2 dimension array (like google sheet, that is reason i'm testing) and a second array where i have a list of id that coincide with culumn 1 of my item array (that simulate the sheet)
now i'm trying to say the function to return a filter 2 dimension array if is able to find all the id are in the second array
i shoudl have this as result research 1,3,4
["1", "1A", "2A", "3A", "4A"],
["3", "1C", "2C", "3C", "4C"],
["4", "1D", "2D", "3D", "4D"],
im gettin this
Array [ "1" ]
1: Array []
2: Array [ "3" ]
3: Array [ "4" ]
4: Array []
5: Array []
// funzione
var items = [
["1", "1A", "2A", "3A", "4A"],
["2", "1B", "2B", "3B", "4B"],
["3", "1C", "2C", "3C", "4C"],
["4", "1D", "2D", "3D", "4D"],
["5", "1E", "2E", "3E", "4E"],
["6", "1F", "2F", "3F", "4F"],
];
var array_id = ["1","3","4"];
var filtra_array_valori_array = items.map(function(riga) {
return riga.filter(function(value) {
return array_id.indexOf(value) >= 0;
});
});
console.log(filtra_array_valori_array);
I open a new topic asking to create the ten comandaments of philosphy
i think we can manage a list of short and deeply absolute comandaments that everybody can use in philosphy as well as religion did with their own things (now original ten comandaments they weren't really what people usually know, they were about primitive rituals, expecially about poor animals to sacrifice, but this is outside the work we have to do here).
so feel free to write down your own list of ten comandaments of philosphy
i'm thinking about, it's not simple find the perfect list
i think we can manage a list of short and deeply absolute comandaments that everybody can use in philosphy as well as religion did with their own things (now original ten comandaments they weren't really what people usually know, they were about primitive rituals, expecially about poor animals to sacrifice, but this is outside the work we have to do here).
so feel free to write down your own list of ten comandaments of philosphy
i'm thinking about, it's not simple find the perfect list
I made these two functions to use as point of start,
one delete all columns 2 using slice and the second change the empyt value to a string in all arrays
i wanted to convert them for leanrning porpouse into 2 anonymous functions using map or foeach or whatelse
i studied documentation, i get how use these funcitons map and foreach, you pass inside item, index and array parameters, if i have 1 dimension array they work in my tests, i get perfectly
nevertheless when i try on these kind of 2 dimension arrays (built for emulate the array in google app scritp when you get the sheet vales) they give me array empty, undefined, weird things also hard to debug, etc..
so i ask little help again because i have porpouse to improve my techinique, but i get some problems at the moment
expecially i don't get why my tests didn't work, i tryed all combinations possbile with parameters item, index, array
var items = [
["1A", "2A", "3A", "4A", "5A"],
["1B", "2B", "3B", "4B", "5B"],
["1C", "2C", "3C", "4C", "5C"]
];
console.log(items);
//SLICE - CANCELLO COLONNE
// 1 indica start - 2 indica quanti elementi da cancellare
//cancella seconda colonna dell'array
for (var i = 0; i < items.length; i++) {
items[i].slice(1, 1);
} // fine for
console.log(items);
// ===============================
var items = [
["1A", "2A", "", "4A", "5A"],
["1B", "", "3B", "", "5B"],
["1C", "2C", "3C", "", ""]
];
console.log(items);
//SOSTITUISCO "" CON VUOTO
for (var riga = 0; riga < items.length; riga++) {
for (var colonna = 0; colonna < items[0].length; colonna++) {
if (items[riga][colonna] == "") {
items[riga][colonna] = "VUOTO";
} // fine if
} // fine for riga
} // fine for colonna
console.log(items);
one delete all columns 2 using slice and the second change the empyt value to a string in all arrays
i wanted to convert them for leanrning porpouse into 2 anonymous functions using map or foeach or whatelse
i studied documentation, i get how use these funcitons map and foreach, you pass inside item, index and array parameters, if i have 1 dimension array they work in my tests, i get perfectly
nevertheless when i try on these kind of 2 dimension arrays (built for emulate the array in google app scritp when you get the sheet vales) they give me array empty, undefined, weird things also hard to debug, etc..
so i ask little help again because i have porpouse to improve my techinique, but i get some problems at the moment
expecially i don't get why my tests didn't work, i tryed all combinations possbile with parameters item, index, array
var items = [
["1A", "2A", "3A", "4A", "5A"],
["1B", "2B", "3B", "4B", "5B"],
["1C", "2C", "3C", "4C", "5C"]
];
console.log(items);
//SLICE - CANCELLO COLONNE
// 1 indica start - 2 indica quanti elementi da cancellare
//cancella seconda colonna dell'array
for (var i = 0; i < items.length; i++) {
items[i].slice(1, 1);
} // fine for
console.log(items);
// ===============================
var items = [
["1A", "2A", "", "4A", "5A"],
["1B", "", "3B", "", "5B"],
["1C", "2C", "3C", "", ""]
];
console.log(items);
//SOSTITUISCO "" CON VUOTO
for (var riga = 0; riga < items.length; riga++) {
for (var colonna = 0; colonna < items[0].length; colonna++) {
if (items[riga][colonna] == "") {
items[riga][colonna] = "VUOTO";
} // fine if
} // fine for riga
} // fine for colonna
console.log(items);
i have simple scritps that use advanced drive api for convert excel, pdf, word, or other document and html service as user form
I sometimes get message in url page of script dont' have right to acces in the html page, when i get there is nothing to do
since i have 4/5 type of this application they are all the same only they change in kind of conversion i checked setup in console and setup is the same,
i tryed to disable, able again, publsh new version, nothing to do
if i copy scritp without change a single line of code and i publish again and i ability advanced drive api, they work, this sound strange to me becase it mean i do nothing wrong and code have nothing wrong
how is your opinion about this?
i have solution to copy and republish, it's not very a probem to me,
but i'm courios to understand how si possbile this behaviour
it's something seem illogical to me, but in this matter barelly you see something illogical
i experimented some of these random problems that seem connected authorization (all scripts work as me and only me can acces, so it's a bit strange i can't see my things)
I sometimes get message in url page of script dont' have right to acces in the html page, when i get there is nothing to do
since i have 4/5 type of this application they are all the same only they change in kind of conversion i checked setup in console and setup is the same,
i tryed to disable, able again, publsh new version, nothing to do
if i copy scritp without change a single line of code and i publish again and i ability advanced drive api, they work, this sound strange to me becase it mean i do nothing wrong and code have nothing wrong
how is your opinion about this?
i have solution to copy and republish, it's not very a probem to me,
but i'm courios to understand how si possbile this behaviour
it's something seem illogical to me, but in this matter barelly you see something illogical
i experimented some of these random problems that seem connected authorization (all scripts work as me and only me can acces, so it's a bit strange i can't see my things)
Wait while more posts are being loaded
