Skip to content

Commit 7d80059

Browse files
committed
comments
1 parent 21df4cd commit 7d80059

17 files changed

+478
-17
lines changed

sites/en/pages/a-polling-station-with-flask.txt

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=books flask, python
66
=author szabgab
77
=archive 1
8-
=comments_disqus_enable 1
8+
=comments_disqus_enable 0
99

1010
=abstract start
1111

@@ -221,4 +221,36 @@ $ git commit -m "show the results"
221221
<a href="/testing-the-flask-poll">Testing the Flask Poll</a>.
222222

223223

224+
<h2>Comments</h2>
224225

226+
hello in part where we add "
227+
228+
<code>
229+
@app.route('/poll')
230+
def poll():
231+
vote = request.args.get('field')
232+
return vote "
233+
the /poll pagedoesn't show me the selection I've made
234+
235+
The code:
236+
from flask import Flask, render_template
237+
import os
238+
app = Flask(__name__)
239+
240+
poll_data = {
241+
'question' : 'Which web framework do you use?',
242+
'fields' : ['Flask', 'Django', 'TurboGears', 'web2py', 'pylonsproject']
243+
}
244+
245+
@app.route('/')
246+
def root():
247+
return render_template('poll.html', data=poll_data)
248+
@app.route('/poll')
249+
def poll():
250+
vote = request.args.get('field')
251+
return vote
252+
253+
if __name__ == "__main__":
254+
app.run(debug=True)
255+
256+
</code>

sites/en/pages/add-code-snippets-to-atom.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=books atom
66
=author szabgab
77
=archive 1
8-
=comments_disqus_enable 1
8+
=comments_disqus_enable 0
99

1010
=abstract start
1111

@@ -76,3 +76,21 @@ I know this because I opened the <hl>Settings</hl> (Actually the <hl>Atom / Pref
7676
and among the <hl>Packages</hl> looked for the one handling HTML files. This is how it looks like:
7777

7878
<img src="img/atom_html_file_type.png" alt="HTML file type in Atom" />
79+
80+
81+
<h2>Comments</h2>
82+
83+
Exactly what I was looking for to bet a long ad code snippet working. Thanks..
84+
85+
<hr>
86+
87+
How can i stop auto-complete to mess with my snippets? When i tab, it does code completation instead of my snippet! Is it possible to do bind it in another key?
88+
89+
<hr>
90+
91+
Thank you! This was helpful. Do you know of a community site where snippet examples and shared? Maybe a github repo?
92+
93+
<hr>
94+
95+
This was super-helpful! Thank you!!
96+

sites/en/pages/ajax-request-for-json-data.txt

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=books javascript
66
=author szabgab
77
=archive 1
8-
=comments_disqus_enable 1
8+
=comments_disqus_enable 0
99

1010
=abstract start
1111

@@ -75,3 +75,27 @@ to create and html string from various parts of this data object. This is not re
7575
I am going to use this opportunity to show a more convincing reason to use Handlebars that I had in the
7676
<a href="/introduction-to-handlebars-javascript-templating-system">introduction to Handlebars</a>
7777

78+
<h2>Comments</h2>
79+
80+
Awesome
81+
82+
<hr>
83+
84+
how do you fetch and render the entire json file content instead of fetching individual element values? i was thinking about something like below...
85+
86+
document.getElementById("TEXTAREA_ID").innerHTML = `${data}`;
87+
88+
but it doesnt work...
89+
<hr>
90+
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.google.fr/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
91+
92+
<hr>
93+
94+
why xmlhttp.readyState == 4, and xmlhttp.status == 200 ?
95+
96+
---
97+
98+
Good Question, see here https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState
99+
100+
This should give you an idea why.
101+

sites/en/pages/argv-raw-command-line-arguments-in-nodejs.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=books nodejs
66
=author szabgab
77
=archive 1
8-
=comments_disqus_enable 1
8+
=comments_disqus_enable 0
99

1010
=abstract start
1111

@@ -108,4 +108,10 @@ $ node argv.js hello
108108
Param: hello
109109
</code>
110110

111+
<h2>Comments</h2>
111112

113+
thanks for awesome and simple entry guide
114+
115+
<hr>
116+
117+
Just used this to troubleshoot a problem in someone else's code. One of the arguments wasn't being passed correctly on the command line. Thanks!

sites/en/pages/automatic-counter-using-angularjs.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=books angularjs, javascript
66
=author szabgab
77
=archive 1
8-
=comments_disqus_enable 1
8+
=comments_disqus_enable 0
99

1010
=abstract start
1111

@@ -104,3 +104,8 @@ and create the new $timeout object only if the timer was <hl>null</hl>.
104104

105105

106106
<try file="examples/angular/automatic_counter_with_stop_start.html">
107+
108+
<h2>Comments</h2>
109+
110+
Is it possible to add a save button and save the elapsed (time) count in the above script? Maybe make the elapsed time counter value a variable in an ionic application?
111+

sites/en/pages/convert-string-to-number-in-ruby.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=books ruby
66
=author szabgab
77
=archive 1
8-
=comments_disqus_enable 1
8+
=comments_disqus_enable 0
99

1010
=abstract start
1111

@@ -131,4 +131,19 @@ puts e.to_c # 23000.0+0i
131131
<include file="examples/ruby/string_to_number.rb">
132132

133133

134+
<h2>Comments</h2>
135+
136+
foo.to_i" works for simple cases. One might consider: "Integer(foo)".
137+
138+
"1.4.5".to_i => 1
139+
Integer("1.4.5") => invalid value for Integer()
140+
141+
Latter is better suited as a result.
142+
143+
<hr>
144+
145+
Hi, in this case my string is "12345.678" when use to_f then result is: 12345.67 (only 2 number after dot)
146+
How can i get enough 12345.678 . I mean how can i get more number after dot.
147+
Thanks guys
148+
134149

sites/en/pages/create-and-download-csv-with-javascript.txt

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=books javascript
66
=author szabgab
77
=archive 1
8-
=comments_disqus_enable 1
8+
=comments_disqus_enable 0
99

1010
=abstract start
1111

@@ -47,3 +47,98 @@ However, what happens if the data can also contain quotes? We will then have to
4747

4848
This is not "unsolvable" of course, but it needs some more work and currently I did not have the need for that.
4949

50+
<h2>Comments</h2>
51+
52+
In Firefox is not working. I click the button and nothing happens.Thanks
53+
54+
---
55+
56+
Firefox requires the download A-element to be present in the DOM before clicking and not created dynamically. So, just add a hidden <a id=dummy_download> or similar and fetch that instead of using createElement and you're set. :)
57+
58+
(This might not be the official explanation, but it works)
59+
60+
<hr>
61+
62+
hye how can i click the save button and it will automatically save into my server not my laptop ?
63+
64+
<hr>
65+
Excellent little example - just what I needed.
66+
Thanks very much Gabor.
67+
68+
<hr>
69+
70+
Hi, is there any check to prevent delimiter inside data? What if any data will contain delimiter (",")? rows and columns wont match. Is there workaround for that?
71+
72+
<hr>
73+
74+
thanks, very handy!
75+
76+
<hr>
77+
78+
thank you .....its perfect
79+
80+
<hr>
81+
82+
I'm glad you explain each. line of code. Thanks!
83+
84+
<hr>
85+
86+
Thank you
87+
88+
<hr>
89+
Chrome has an issue using encodeURI if the filesize is greater than 1mb. This discussion on StackOverflow shows how to use createObjectURL instead.
90+
https://stackoverflow.com/questions/24610694/export-html-table-to-csv-in-google-chrome-browser/24611096#24611096
91+
92+
<hr>
93+
94+
Hi, It is not working in IE 11. I have added tag in DOM. Whenever call function to download csv, getting alert, "Do you want to open application from this website". After click on Allow csv is not dwonloading. Working fine on chrome. Please help to eun on IE 11.
95+
96+
<hr>
97+
98+
Thank you very much!
99+
100+
<hr>
101+
102+
hello....I need your help...i want to export form data into csv file using plain JS
103+
104+
<hr>
105+
106+
Is there any option to set password for the files.
107+
108+
<hr>
109+
110+
How can we download multiple sheets?
111+
112+
<hr>
113+
what if my delimiter in the string is ; instead of comma
114+
---
115+
116+
Then join with a semi-colon instead;
117+
118+
csv += row.join(';');
119+
120+
121+
<hr>
122+
123+
Thank's for this solution, I'm saved :)
124+
125+
<hr>
126+
127+
i followed the steps hoewever i get my array values written in one row in CSV file, no \n is applied.
128+
my data is an array returned by a function as :
129+
var data = [days];
130+
return data;
131+
and i call this function from the downloadCSV ()
132+
133+
<hr>
134+
135+
Getting the following error: (TypeError: row.join is not a function) Any idea?
136+
137+
<hr>
138+
139+
Hi, How to achieve the same functionality in IE 11 ?
140+
141+
<hr>
142+
143+
Thank you!
144+

sites/en/pages/creating-an-iterator-in-python.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=books python
66
=author szabgab
77
=archive 1
8-
=comments_disqus_enable 1
8+
=comments_disqus_enable 0
99

1010
=abstract start
1111

@@ -112,3 +112,14 @@ elements), or it can be totally unrelated. (e.g. some user input. Elapsed time.
112112
Day of the week. Etc.)
113113

114114
<include file="examples/python/fibonacci_iterator.py">
115+
116+
117+
<h2>Comments</h2>
118+
119+
Very nice. Thank you!
120+
121+
<hr>
122+
123+
%> python3 fibonacci_finate_iterator.py
124+
TypeError: iter() returned non-iterator of type 'Fibonacci'
125+

sites/en/pages/dependency-injection-in-angularjs.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=books angularjs
66
=author szabgab
77
=archive 1
8-
=comments_disqus_enable 1
8+
=comments_disqus_enable 0
99

1010
=abstract start
1111

@@ -109,4 +109,8 @@ the function call.
109109

110110

111111

112+
<h2>Comments</h2>
113+
114+
Simple, short, and great explanation. When i saw in tutorials both ways you mention i couldn't understand when to use one or the other, and now i do thanks to you.
115+
112116

sites/en/pages/deploying-python-flask-using-uwsgi-on-ubuntu-14-04.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
=books flask
55
=status show
66
=author szabgab
7-
=comments_disqus_enable 1
7+
=comments_disqus_enable 0
88

99
=abstract start
1010

@@ -389,4 +389,10 @@ my-uswgi.ini.
389389

390390
For other options you might want to check out the <a href="http://flask.pocoo.org/docs/0.10/deploying/uwsgi/">Deploying Flask on uWSGI</a> in the documentation.
391391

392+
<h2>Comments</h2>
393+
394+
Got my app up and running, thank you, command "uwsgi --http-socket :9090 --plugin python --wsgi-file app.py --callabe app" worked. But there is still a typo - callale
395+
396+
---
397+
fixed. thanks
392398

0 commit comments

Comments
 (0)