question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
44,220,335
How to parse a particular attribute name from an XML file?<p>In the <code>.gxl</code> file below, I want the content with the attr name <code>"chem"</code>. How can I get that?</p> <p>I have tried this:</p> <pre><code> for node in tree.findall(".//node/attr/int"): </code></pre> <p>but it's giving the one with attr n...
<p>If tree is ElementTree, you can use xpath.</p> <pre><code>for node in tree.findall(".//node/attr/int[@name='chem']") </code></pre>
How to parse a particular attribute name from an XML file?
python|python-3.x
-1
29
1
44,225,448
44,225,448
0
true
2017-05-27T18:29:35.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to parse a particular attribute name from an XML file?<p>In the <code>.gxl</code> file below, I want the content with the attr name <code>"chem"</code>. ...
44,256,638
Python regular expression to find letters and numbers<p>Entering a string</p> <p>I used <code>'findall'</code> to find words that are only letters and numbers (The number of words to be found is not specified).</p> <p>I created: </p> <p><code>words = re.findall ("\ w * \ s", x) # x is the input string</code> If i en...
<p>This one should work : <code>(?&lt;![\"=\w])(?:[^\W_]+)(?![\"=\w])</code></p> <p><strong>Explanation</strong></p> <p><code>(?:[^\W_])+</code> Anything but a non-word character or an underscore at least one time (non capturing group)</p> <p><code>(?&lt;![\"=\w])</code> not precedeed by <code>"</code> or a word cha...
Python regular expression to find letters and numbers
python|regex
-1
10,293
2
44,258,609
44,258,609
0
true
2017-05-30T07:57:26.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python regular expression to find letters and numbers<p>Entering a string</p> <p>I used <code>'findall'</code> to find words that are only letters and numbe...
44,258,005
User authentication using passport.js giving error<p>I'm very new to <code>node.js</code> and <code>passport.js</code>. I was trying to learn how to make an authentication app using <a href="https://www.youtube.com/watch?v=OlapNW9Jc8s" rel="nofollow noreferrer">this video</a>, but I keep getting this error after reachi...
<p>You have to call the <code>new</code> operator:</p> <pre><code>passport.use(new passportLocal.Strategy(function(username, password, done){ //connect to a real db here if(username===password){ done(null,{id: username, name: username}); //these actually have to bbe pulled from the db } ...
User authentication using passport.js giving error
javascript|node.js|authentication|passport.js
-1
40
1
44,264,974
44,264,974
0
true
2017-05-30T09:09:11.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: User authentication using passport.js giving error<p>I'm very new to <code>node.js</code> and <code>passport.js</code>. I was trying to learn how to make an ...
44,269,539
Laravel 5.4 DELETE photos from public path<p>When on delete i want to delete not only row from the table, i also want to delete file from the public path. This is my code:</p> <pre><code>public function destroy($id) { $photo = Photo::find($id); Storage::delete(public_path('/photos/' . $photo-&gt;ph...
<p>Check this out, it seems like it would be the right solution.</p> <p><a href="https://laravel.io/forum/06-04-2014-how-to-delete-an-image-file-when-deleting-a-page?page=1" rel="nofollow noreferrer">https://laravel.io/forum/06-04-2014-how-to-delete-an-image-file-when-deleting-a-page?page=1</a></p>
Laravel 5.4 DELETE photos from public path
php|laravel-5.4
-1
577
1
44,269,619
44,269,619
0
true
2017-05-30T18:37:10.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel 5.4 DELETE photos from public path<p>When on delete i want to delete not only row from the table, i also want to delete file from the public path. Th...
44,286,336
Window opens, catches focus and disappears (WIndows 10)<p>Since a few days, a window pops randomly up (every 30 min or so) and disappears again. It stays in focus for less than a second and it is impossible to read anything.</p> <p>It could be related to Firefox or not, it is hard to say... Any idea how to catch this?...
<p>I have also been having that since the big update last week. Seems that the OfficeBackgroundTaskHandler is the culprit: <a href="https://www.ghacks.net/2017/05/30/what-is-that-popup-on-windows-10-that-disappears-after-a-split-second/" rel="nofollow noreferrer">https://www.ghacks.net/2017/05/30/what-is-that-popup-on-...
Window opens, catches focus and disappears (WIndows 10)
windows|window
-1
41
1
44,297,513
44,297,513
0
true
2017-05-31T13:37:55.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Window opens, catches focus and disappears (WIndows 10)<p>Since a few days, a window pops randomly up (every 30 min or so) and disappears again. It stays in ...
44,325,455
Why does pretty much every attempt to merge changes from remote with Git turn into SCS hell?<p>I have a clean local repository.</p> <p>I perform a fetch and see several new changesets.</p> <p>I perform a merge to master. This errors saying some files cannot be written, so I abort the merge.</p> <p>At this point my l...
<p>To remove the "trashed wasteland of a half performed merge", just</p> <pre><code>git reset --hard branchname </code></pre> <p>Also, by "merge to master" you probably mean merge <em>from</em> master, right? Another option is to rebase your branch on the fetched remote one, but you still need to resolve the conflict...
Why does pretty much every attempt to merge changes from remote with Git turn into SCS hell?
git|merge
-1
31
1
44,325,562
44,325,562
0
true
2017-06-02T09:30:35.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does pretty much every attempt to merge changes from remote with Git turn into SCS hell?<p>I have a clean local repository.</p> <p>I perform a fetch and...
44,338,592
Xampp doesn't recognize <? tag<p>Today I needed to do some changes on my website so I downloaded the whole site to my computer, changed the IP's and login details and the website is working.</p> <p>But, when I went to a page, I press the button and nothing happens, and the same button is working on the webhost.</p> <...
<p>As I can see on your screenshot, they're showing you "<code>&lt;? echo ... ?&gt;</code>"</p> <p>The problem are who newer versions of PHP have deprecated the shorttags. You need to change all tags <code>&lt;?</code> with the complete one: <code>&lt;?php</code></p>
Xampp doesn't recognize <? tag
php|html|xampp
-1
47
1
44,338,864
44,338,864
0
true
2017-06-02T23:10:24.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xampp doesn't recognize <? tag<p>Today I needed to do some changes on my website so I downloaded the whole site to my computer, changed the IP's and login de...
44,339,770
Conditional Not Being Hit - Conditionally Rendering React Component<p>I'm not sure why no matter if isAuthenticated is false or not, it always ends up rendering instead of hitting the . When isAuthenticated is false you'd think it would obviously hit the redirect but it's not.</p> <pre><code>class ProtectedRoute ext...
<p>You are sending both the component and render as props to Route component. Since component prop is available, the Route renders that component instead of triggering the render.</p>
Conditional Not Being Hit - Conditionally Rendering React Component
javascript|reactjs
-1
73
1
44,339,909
44,339,909
0
true
2017-06-03T02:52:13.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Conditional Not Being Hit - Conditionally Rendering React Component<p>I'm not sure why no matter if isAuthenticated is false or not, it always ends up render...
44,350,120
SQL count query - how to get desired results?<p>I have a factory that contains 4 production lines, work in a year which is devised into periods of year. I also have a working days and holidays table that contains these columns:</p> <pre><code>factory_id, mainline_id, year_id, period_id, holiday check </code></pre> <...
<p>Use the <code>GROUP BY</code> clause:</p> <pre><code>SELECT COUNT(*) FROM your_table WHERE holiday_check = false GROUP BY period_id, factory_id, mainline_id </code></pre>
SQL count query - how to get desired results?
sql
-1
38
1
44,350,133
44,350,133
0
true
2017-06-04T02:00:43.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL count query - how to get desired results?<p>I have a factory that contains 4 production lines, work in a year which is devised into periods of year. I al...
44,356,829
execute script on ajax success<p>here is my javascript code in my php document:-</p> <pre><code> ( function() { if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; }; var unit = {"calltype":"async[2]","publisher":"soodsidhant","width":728,"height":90,"sid":"Chitika Default"}; var placement_id = wind...
<p>Put this function in your file with the ajax request and then call it in the <code>.succuess(...)</code> callback from POST or PUT or whatever.</p>
execute script on ajax success
javascript|php|jquery|html|ajax
-1
818
1
44,357,057
44,357,057
0
true
2017-06-04T17:21:20.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: execute script on ajax success<p>here is my javascript code in my php document:-</p> <pre><code> ( function() { if (window.CHITIKA === undefined) { window.C...
44,359,398
Return value of series where position is determined by minimum value of an array<p>Using the example data table below as a guide</p> <p>Image of table</p> <p><a href="https://i.stack.imgur.com/eGJMW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eGJMW.jpg" alt="image of table"></a></p> <p>I need ...
<p><code>=LOOKUP(1,0/FREQUENCY(-98^99,INDEX(B2:D8,0,MATCH(G2,B1:D1,0))),A2:A8)</code></p> <p>where it is assumed that no value within the range <code>B2:D8</code> is smaller than -98^99.</p> <p>Regards</p>
Return value of series where position is determined by minimum value of an array
excel
-1
26
1
44,362,826
44,362,826
0
true
2017-06-04T22:26:19.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return value of series where position is determined by minimum value of an array<p>Using the example data table below as a guide</p> <p>Image of table</p> ...
44,364,453
How to train a constant model (regression) in Python?<p>I'm trying to train a linear regression model in Python (with sklearn), but with slopes equal to zero, i.e., a constant model h(x) = b (h: model, b: intercept).</p> <p>Do you know any method in sklearn to accomplish this? (I'm familiar with LinearRegression but I...
<p>Hi I don't think you need sklearn for that. Algebraically speaking and assuming your X matrix univariate that is solved by the mean of Y minus the mean of your X.</p> <pre><code> b = y_train.mean() - X_train.mean() </code></pre>
How to train a constant model (regression) in Python?
python|scikit-learn|linear-regression
-1
519
1
44,364,544
44,364,544
0
true
2017-06-05T08:08:12.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to train a constant model (regression) in Python?<p>I'm trying to train a linear regression model in Python (with sklearn), but with slopes equal to zero...
43,939,097
Can't make use of newly produced links in a function<p>When i run my scraper it fetches titles and hrefs to the titles form a webpage. The page has pagination option in the footer which contains 6 new links which are being scraped by the second "print" in my scraper. But, at this point I can't make use of this next-pag...
<p>You can easily make it a recursive function, like this:</p> <pre><code>import requests from lxml import html Page_link="http://www.wiseowl.co.uk/videos/" visited_links = [] def GrabbingData(url): base="http://www.wiseowl.co.uk" response = requests.get(url) visited_links.append(url) tree = html.fro...
Can't make use of newly produced links in a function
python|web-scraping|web-crawler
-1
36
1
43,939,977
43,939,977
1
true
2017-05-12T13:34:57.300Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't make use of newly produced links in a function<p>When i run my scraper it fetches titles and hrefs to the titles form a webpage. The page has paginatio...
43,941,884
Order source dataframe, store id column in output dataframe<p>I have a dataframe approximately 80x300. It looks like this:</p> <pre><code>id var1 var2 var3 ... Alpha 23 68 22 Bravo 29 48 37 Hotel 39 10 85 ... </code></pre> <p>My goal is to get...
<p>Something like this?</p> <pre><code>apply(df[,-1], 2, function(x) df$id[order(x)]) # var1 var2 var3 # [1,] "Alpha" "Hotel" "Alpha" # [2,] "Bravo" "Bravo" "Bravo" # [3,] "Hotel" "Alpha" "Hotel" </code></pre> <p><strong>DATA</strong></p> <pre><code>df &lt;- read.table(text=" id,var1,var2,var3 Alpha,23,68,2...
Order source dataframe, store id column in output dataframe
r|loops|sorting
-1
53
3
43,942,057
43,942,057
1
true
2017-05-12T15:53:34.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Order source dataframe, store id column in output dataframe<p>I have a dataframe approximately 80x300. It looks like this:</p> <pre><code>id var1 ...
43,954,805
Error:(45) Error parsing XML: not well-formed (invalid token) Because Button "<<"<p>I Have a Button android studio, this is my code :</p> <pre><code>&lt;Button android:layout_width="40dp" android:layout_height="40dp" android:background="@color/colorAccent" android:text=" &lt;&lt; " android:textColor="@c...
<p>You need to escape the "&lt;" characters</p> <pre><code>android:text="&amp;lt;&amp;lt;" </code></pre> <p>"&lt;" is a special character in XML.</p> <p><a href="http://support.esri.com/technical-article/000005870" rel="nofollow noreferrer">http://support.esri.com/technical-article/000005870</a></p>
Error:(45) Error parsing XML: not well-formed (invalid token) Because Button "<<"
java|android|xml
-1
1,087
2
43,954,867
43,954,867
1
true
2017-05-13T15:25:35.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error:(45) Error parsing XML: not well-formed (invalid token) Because Button "<<"<p>I Have a Button android studio, this is my code :</p> <pre><code>&lt;But...
43,956,728
arrange divs in nested angular manner<p>In my angular project I want to show divs in following manner:</p> <p><a href="https://i.stack.imgur.com/RH0lF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RH0lF.png" alt="enter image description here"></a></p> <p>My HTML looks like following:</p> <pre><c...
<blockquote> <p>I hope this sample can help you [open in full screen]</p> </blockquote> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code> var app = angular.module("app", [...
arrange divs in nested angular manner
html|css|angularjs
-1
31
1
43,965,649
43,965,649
1
true
2017-05-13T18:41:52.173Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: arrange divs in nested angular manner<p>In my angular project I want to show divs in following manner:</p> <p><a href="https://i.stack.imgur.com/RH0lF.png" ...
43,996,543
Javascript Regex Not Giving Multiple Results<p>I am trying to read a string formatted like </p> <pre><code>&lt;test&gt;input&lt;/test&gt;\n &lt;another&gt;input&lt;/another&gt; </code></pre> <p>My regex works for the <strong>test</strong> tagged input, but ignores the <strong>another</strong> tagged input. If I wrap ...
<p>Add a <a href="https://www.w3schools.com/jsref/jsref_regexp_g.asp" rel="nofollow noreferrer">g Modifier</a> so specify that it is global (allows for multiple results)</p> <p>So change your regexp to (notice the g in the end)</p> <pre><code>/([\n\s]*&lt;([^&gt;]+)&gt;([^&lt;&gt;]*)&lt;([^&gt;]+)&gt;[\n\s]*){0,}/g <...
Javascript Regex Not Giving Multiple Results
javascript|regex
-1
31
1
43,996,659
43,996,659
1
true
2017-05-16T08:46:13.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript Regex Not Giving Multiple Results<p>I am trying to read a string formatted like </p> <pre><code>&lt;test&gt;input&lt;/test&gt;\n &lt;another&gt;i...
43,999,035
I want a spinner to be displayed when an item in a listview is clicked. How to do that?<p>I have a listview containing 4 items. Whenever one of them is clicked, a pop up spinner should be displayed. I have populated the spinner adapter but I don't know how to display it.</p> <pre><code>@Override protected void onCreat...
<p>You can do this</p> <pre><code>public void showSpinnerPopUp(String[] array){ AlertDialog.Builder b = new Builder(this); b.setTitle("Example"); b.setItems(array, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); switch(which){ ...
I want a spinner to be displayed when an item in a listview is clicked. How to do that?
android|listview|spinner|android-spinner
-1
37
1
43,999,115
43,999,115
1
true
2017-05-16T10:33:02.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want a spinner to be displayed when an item in a listview is clicked. How to do that?<p>I have a listview containing 4 items. Whenever one of them is click...
44,020,302
Filter tuples by using value pairs from other table in SQLite<p>I have two tables, <strong>Friend</strong> (F) and <strong>Likes</strong> (L). <strong>Friend</strong> represents pairs of students (ID1, ID2) who are friends. Friendship is mutual, so if (1510, 1381) is in the <strong>Friend</strong> table, so is (1381, 1...
<p>I would go with a <code>left join</code>, so that all rows of likes are preserved but are associated with <code>null</code> if no matching row is found on <code>friends</code>. This way you can filter on those nulls to get the rows you need</p> <pre><code>select L.* from likes L left join friends F on ...
Filter tuples by using value pairs from other table in SQLite
sql|sqlite
-1
299
2
44,020,448
44,020,448
1
true
2017-05-17T09:07:05.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filter tuples by using value pairs from other table in SQLite<p>I have two tables, <strong>Friend</strong> (F) and <strong>Likes</strong> (L). <strong>Friend...
44,033,392
Compare integer var to an array and take highest value<p>I'm searching for a way to compare a value (which is an integer) to an array, and take only the cell which is higher than my value.</p> <p>For exemple :</p> <pre><code>var array_score_specs = ["17", "24", "33", "46", "68", "128"]; var valeurtest = 0; for(count=...
<p>First issue:</p> <pre><code> parseInt(Object.keys(offers.responseJSON.linux).length) </code></pre> <p>change that with:</p> <pre><code>array_score_specs.length </code></pre> <p>In order to convert a string to number prefix with plus sign and use break to exit the for loop:</p> <p><div class="snippet" data-lang=...
Compare integer var to an array and take highest value
jquery|arrays|comparison
-1
44
2
44,033,530
44,033,530
1
true
2017-05-17T19:35:56.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Compare integer var to an array and take highest value<p>I'm searching for a way to compare a value (which is an integer) to an array, and take only the cell...
44,079,600
Remote directory empty except for .ftpquota?<p>See attached - imported xml that the client sent over. Claims I'm successfully connected but then the directory is almost empty - no PublicHTML. Would this be on my end or would it have to do with how permissions for me are set in their CPanel? I imagine this means I was n...
<p>This means that you were given access to a Public_ftp folder where you can upload files and either a person or a script will move the uploaded files to the final destination folder.</p>
Remote directory empty except for .ftpquota?
ftp|filezilla
-1
782
1
44,079,715
44,079,715
1
true
2017-05-19T21:59:46.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remote directory empty except for .ftpquota?<p>See attached - imported xml that the client sent over. Claims I'm successfully connected but then the director...
44,095,051
How to make multi-dimensional table from database<p>I have a database table named:expenditures(given image no.1) that stores some official expenditures. <a href="https://i.stack.imgur.com/CmGPc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CmGPc.png" alt="enter image description here" /></a></p> <...
<p>You can use multiple <code>SELECT</code> statements to generate columns for months, e.g.:</p> <pre><code>SELECT s.head_id, s.acc_sub_head, (SELECT SUM(amount) FROM exenditures WHERE sub_head_id = s.head_id AND ex_date BETWEEN '2017-01-01' AND '2017-01-31') AS 'January 2017', (SELECT SUM(amount) FROM exenditures W...
How to make multi-dimensional table from database
php|mysql|laravel-5
-1
34
1
44,095,251
44,095,251
1
true
2017-05-21T09:05:21.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make multi-dimensional table from database<p>I have a database table named:expenditures(given image no.1) that stores some official expenditures. <a ...
44,110,485
How do I have zlib output the gzip footer?<p>How do I have zlib output the gzip footer for me? I'm currently doing it myself but it'd be nice if zlib could do it for me.</p> <pre><code>shared_data xcc_z::gzip(data_ref s) { z_stream stream; stream.zalloc = NULL; stream.zfree = NULL; stream.opaque = NULL; if (...
<p>Why do you think it doesn't? Your code appends a useless second trailer after the one already written by zlib.</p>
How do I have zlib output the gzip footer?
c++|zlib
-1
265
1
44,125,244
44,125,244
1
true
2017-05-22T10:23:47.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I have zlib output the gzip footer?<p>How do I have zlib output the gzip footer for me? I'm currently doing it myself but it'd be nice if zlib could d...
44,177,187
Display pdf files that contain a specific key-word<p>I am trying to develop a search tool that would search the words inside all of the PDFs, and the results would list all of the PDFs that contain the word or term inside. I am a complete beginner and have no idea how it goes . I tried searching over internet and got ...
<p>You can use <a href="https://www.phpclasses.org/browse/file/31030.html" rel="nofollow noreferrer">PDF2Text Class</a> to convert the pdf into text and, after that, search through the text about your words. I strongly suggest for better performance you do that routine when store the pdfs into your system, saving in a ...
Display pdf files that contain a specific key-word
php|file|pdf|search|full-text-search
-1
62
1
44,177,954
44,177,954
1
true
2017-05-25T09:39:06.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display pdf files that contain a specific key-word<p>I am trying to develop a search tool that would search the words inside all of the PDFs, and the result...
44,199,056
Creating backup server<p>We have hosted a website on Amazon AWS EC2 server. Now just wanted to know how to create a backup server which will behave like mirror server. It would be two servers running in parallel and if one fails all traffic gets shifted to other server.</p>
<p>There are three aspects to your answer:</p> <ul> <li>Creating a backup server</li> <li>Shared storage between the servers</li> <li>Cut-over in case of failure</li> </ul> <p><strong>Backup Server</strong></p> <p>The easiest way to <em>clone</em> a server is to create an Amazon Machine Image (AMI) of the existing A...
Creating backup server
amazon-ec2|cloud
-1
28
1
44,210,905
44,210,905
1
true
2017-05-26T10:18:01.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating backup server<p>We have hosted a website on Amazon AWS EC2 server. Now just wanted to know how to create a backup server which will behave like mirr...
44,211,299
Use 2 forms to trigger $(document).on<p>Hi i am using a script in jquery that will be triggered when in update one form called <code>class="data"</code>.</p> <pre><code>$(document).on('change', '.data' function(){ #my-code-here } </code></pre> <p>What i want to do is trigger my script using 2 forms, something like ...
<p>If I understand, you just want to bind multiple classes to the event, and you do that by using a comma between them in your jquery selector.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint...
Use 2 forms to trigger $(document).on
javascript|jquery
-1
26
1
44,211,445
44,211,445
1
true
2017-05-26T23:16:24.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use 2 forms to trigger $(document).on<p>Hi i am using a script in jquery that will be triggered when in update one form called <code>class="data"</code>.</p>...
44,216,143
Getting the reversing function in R<p>i am trying to plot the reverse function of a given function in R:</p> <pre><code>f&lt;-function(x){ if( x&gt;1 || x&lt; -1) { 0 }else{ 0.75*(1-x^2) }} #densityfunction f fVec &lt;- Vectorize(f) F&lt;-function(t){ integrate(fVec, lower=-1, upper=t)$value }#inte...
<p>If you wrap the call to <code>uniroot</code> in a <code>try</code>, then it keeps going when it finds an error</p> <pre><code>inverse &lt;- function (f, lower = -1, upper = 1) { function (y) try(uniroot((function (x) f(x) - y), lower = lower, upper = upper)$root) } </code></pre> <p>The resulting graph indicates...
Getting the reversing function in R
r
-1
63
1
44,216,377
44,216,377
1
true
2017-05-27T11:11:41.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting the reversing function in R<p>i am trying to plot the reverse function of a given function in R:</p> <pre><code>f&lt;-function(x){ if( x&gt;1 || x&l...
44,231,356
Refactor parser code to avoid borrow checker issue<p>What the best way to refactor this parser code to avoid borrow checker issue?</p> <pre><code>pub type Token=u8; pub trait Stream { type Item; fn next(&amp;mut self) -&gt; Option&lt;&amp;Self::Item&gt;; fn peek(&amp;mut self) -&gt; Option&lt;&amp;Self::It...
<p>Your <code>peek</code>function doesn't need a <code>&amp;mut self</code>, and using just a <code>&amp;self</code> would totally solve your error and give you <code>cannot borrow *stream as mutable because it is also borrowed as immutable</code>. Anyway, avoiding <code>mut</code> when not needed is better.</p> <p>Yo...
Refactor parser code to avoid borrow checker issue
rust|borrow-checker
-1
60
1
44,231,543
44,231,543
1
true
2017-05-28T19:46:47.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Refactor parser code to avoid borrow checker issue<p>What the best way to refactor this parser code to avoid borrow checker issue?</p> <pre><code>pub type T...
44,245,443
How to prevent users from navigating to symfony project directories?<p>How to prevent users from navigating to symfony project directories?</p> <p>I see vendor directory content when I visit:</p> <pre><code>http://localhost/myproject/vendor/ </code></pre>
<p>You should <a href="http://symfony.com/doc/current/setup/web_server_configuration.html" rel="nofollow noreferrer">configure</a> your web server's document root directory to /web folder to avoid this issue. Sample configuration snippet for Apache:</p> <pre><code>DocumentRoot /var/www/project/web &lt;Directory /var/w...
How to prevent users from navigating to symfony project directories?
symfony
-1
41
1
44,245,472
44,245,472
1
true
2017-05-29T14:57:29.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to prevent users from navigating to symfony project directories?<p>How to prevent users from navigating to symfony project directories?</p> <p>I see ven...
44,286,367
Have to join tables but only want to delete from first table<p>So I have table1 and table2. Table1 has columns configId, timestamp, value. Table2 has configId, machineId, ioid, iotype, lock. The relationship is many Table1 items to 1 Table2 item. Table one is the data, Table2 is the identifiers.</p> <p>I want to delet...
<p>If you are using mySQL you can do something like</p> <pre><code>DELETE FROM Table1 t1 JOIN Table2 t2 ON t2.configId = t1.configId WHERE t2.lock = 0; </code></pre> <p>If not, you can try something like</p> <pre><code>DELETE FROM Table1 WHERE configId IN ( SELECT t1.configId FROM Table1 t1 JOIN Table2 t2 ON t2.conf...
Have to join tables but only want to delete from first table
java|sqlite
-1
20
1
44,286,509
44,286,509
1
true
2017-05-31T13:39:05.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Have to join tables but only want to delete from first table<p>So I have table1 and table2. Table1 has columns configId, timestamp, value. Table2 has configI...
44,291,471
No Spring Boot Template when create new Jelastic environment<p>Trying to deploy my spring boot application to Jelastic. According to <a href="http://blog.jelastic.com/2017/04/27/hosting-spring-boot-java-applications/" rel="nofollow noreferrer">manual</a> I need to create environment from <strong>SpringBoot</strong> tem...
<p>Only the hosters with version of Jelastic starts with 4.10.1 and higher can provide the possibility to host Spring Boot applications. You can find the most suitable cloud provider using filter by version on the <a href="https://jelastic.cloud" rel="nofollow noreferrer">Jelastic Cloud Union</a>.</p>
No Spring Boot Template when create new Jelastic environment
spring-boot|jelastic
-1
53
1
44,292,708
44,292,708
1
true
2017-05-31T17:44:59.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: No Spring Boot Template when create new Jelastic environment<p>Trying to deploy my spring boot application to Jelastic. According to <a href="http://blog.jel...
44,306,984
Laravel 5 validation mimes also checks the content of the file<p>Does the Laravel validation also checks the content of the file if it's real an image?</p> <p>I can't find this :(</p> <pre><code> $this-&gt;validate($request, [ 'title' =&gt; 'required', 'image' =&gt; 'max:1000|mimes:jpeg,bmp,png', ...
<p>Yes it does. From the doc</p> <blockquote> <p>Even though you only need to specify the extensions, this rule actually validates against the MIME type of the file by reading the file's contents and guessing its MIME type.</p> </blockquote> <p><a href="https://laravel.com/docs/master/validation#rule-mimes" rel="no...
Laravel 5 validation mimes also checks the content of the file
laravel|laravel-5
-1
558
2
44,307,174
44,307,174
1
true
2017-06-01T12:01:16.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel 5 validation mimes also checks the content of the file<p>Does the Laravel validation also checks the content of the file if it's real an image?</p> ...
44,341,453
How do I trigger Python functions with arguments in a Heroku virtual instance (dyno)?<p><strong>Context</strong></p> <p>I'm very familiar with Swift and iOS. I'm familiar with the Python programming language and writing pure python code (by 'pure' I mean, without using modules like Django or Flask which I know nothing...
<p>You're on the right track. A "web application" isn't necessarily one that runs in the browser (though perhaps usage of that term is shifting). I think of a web application as an application that's served via HTTP, which yours is.</p> <p>So Flask is a great choice for how to write this in Python. Here's some code th...
How do I trigger Python functions with arguments in a Heroku virtual instance (dyno)?
python|heroku|redis
-1
312
1
44,341,611
44,341,611
1
true
2017-06-03T07:19:30.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I trigger Python functions with arguments in a Heroku virtual instance (dyno)?<p><strong>Context</strong></p> <p>I'm very familiar with Swift and iOS...
44,351,442
Cant figure out IF(number) in Google Sheets macro to hide rows with a zero value<p>I'm brand new at this, so I may be way off base here. this is my code:</p> <pre><code>function onOpen() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheetByName("To Order"); var maxRows = sheet.getMaxRows();...
<p>The code in the question compares an undefined variable called <code>Number</code> with <code>"0"</code> using the abstract equality comparator. This comparison always will return false.</p> <p>Instead of <code>Number</code>, use <code>data[i][0]</code>.</p>
Cant figure out IF(number) in Google Sheets macro to hide rows with a zero value
google-apps-script|google-sheets
-1
34
1
44,354,349
44,354,349
1
true
2017-06-04T06:40:56.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cant figure out IF(number) in Google Sheets macro to hide rows with a zero value<p>I'm brand new at this, so I may be way off base here. this is my code:</p>...
44,356,060
Sorting using the Smartsheet API<p>Python SDK for Smartsheet API (latest versions)</p> <p>Here's the scenario: I have a large (over 3000 rows) sheet. New records are added (at the bottom) in batches (typically 100 - 150 rows at a time). There is a column with an identifier (not an auto-number). We would like to sort...
<p>If your application is single-threaded and working with a single sheet, it's unlikely that you will encounter rate limiting. Also, the Python SDK automatically retries rate limit errors. (And the other SDKs will soon.)</p>
Sorting using the Smartsheet API
smartsheet-api
-1
261
1
44,374,112
44,374,112
1
true
2017-06-04T16:07:51.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sorting using the Smartsheet API<p>Python SDK for Smartsheet API (latest versions)</p> <p>Here's the scenario: I have a large (over 3000 rows) sheet. New re...
44,371,131
How to style the slider?<p>I found <a href="https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/xaml-styles" rel="nofollow noreferrer">this tutorial</a>... But Imma noobie yet too much to get how to apply it for my slider. I have this now:</p> <pre class="lang-xml prettyprint-override"><code>&lt;Slider ...
<p>There is a document about the default style and template for the Slider control. You can modify these resources and the default ControlTemplate to give the control a unique appearance. Please refer <a href="https://msdn.microsoft.com/en-us/library/windows/apps/mt299153.aspx" rel="nofollow noreferrer">Slider styles a...
How to style the slider?
uwp|uwp-xaml
-1
580
1
44,381,613
44,381,613
1
true
2017-06-05T14:22:06.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to style the slider?<p>I found <a href="https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/xaml-styles" rel="nofollow noreferrer">this tu...
44,359,521
Add a new rows and copy the values of cells under certain conditions<p>l have a csv file that l process using pandas.</p> <pre><code>id raw_value manual_raw_value 00219b14-37d1-42b2-95e8-65fe2a94b7a5 6,35 6,35 402048fd-868d-446a-8468-07a57f5386bf 11,68 11,68 3...
<p>I think you need custom function with <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.apply.html" rel="nofollow noreferrer"><code>apply</code></a> and <code>axis=1</code> for expand <code>DataFrame</code> to <code>list</code>, last use <a href="http://pandas.pydata.org/pandas-docs/sta...
Add a new rows and copy the values of cells under certain conditions
python|csv|pandas|dataframe
-1
75
1
44,406,792
44,406,792
1
true
2017-06-04T22:45:26.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add a new rows and copy the values of cells under certain conditions<p>l have a csv file that l process using pandas.</p> <pre><code>id ...
43,956,876
What is practical use of '-x' parameter?<p>I am curios where in real-world applications people use following parameter?</p> <blockquote> <p>-x Excludes (skips) the first line of the main script’s source</p> </blockquote>
<p>I don't know what you're looking at, but both the <a href="https://docs.python.org/2/using/cmdline.html#cmdoption-x" rel="nofollow noreferrer">docs</a> and <code>python --help</code> have more information:</p> <blockquote> <p>Skip the first line of the source, allowing use of non-Unix forms of <code>#!cmd</code>....
What is practical use of '-x' parameter?
python|command-line
-1
42
1
43,956,905
43,956,905
2
true
2017-05-13T18:54:24.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is practical use of '-x' parameter?<p>I am curios where in real-world applications people use following parameter?</p> <blockquote> <p>-x Excludes (s...
43,957,363
Multiple modules with name are being created and they will overwrite each other<p>When trying to run an angular project, just a black page is displayed. On debugging I see a message "Multiple modules with name are being created and they will overwrite each other."</p> <p>How to check this?</p>
<p>Search through your codebase for <code>angular.module</code>. You shouldn't have <code>angular.module('someName',[])</code> more than once for the same module. </p> <p>Passing in the second argument for the modules it requires is for instantiation/creation. Whereas <code>angular.module('foo')</code> can be repeated...
Multiple modules with name are being created and they will overwrite each other
javascript|angularjs
-1
54
1
43,957,503
43,957,503
2
true
2017-05-13T19:47:23.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple modules with name are being created and they will overwrite each other<p>When trying to run an angular project, just a black page is displayed. On d...
44,010,291
Sending data to ASP.NET through jQuery Ajax() gives error<p>I am trying to send data to an ASP.NET programme with jQuery with this code:</p> <pre><code>$.ajax({ method: "POST", dataType: 'json', url: "http://localhost:52930/api/person/", data: JSON.stringify({Name: "Sinan", Password: 'test'}) }) .d...
<p>Add:</p> <pre><code>contentType: "application/json; charset=utf-8", </code></pre> <p>And change <code>method</code> to <code>type</code>.</p> <p>Something like this:</p> <pre><code>$.ajax({ type: "POST", dataType: 'json', url: "http://localhost:52930/api/person/", contentType: "application/json; ...
Sending data to ASP.NET through jQuery Ajax() gives error
javascript|c#|jquery|asp.net|ajax
-1
36
1
44,010,404
44,010,404
2
true
2017-05-16T19:44:28.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sending data to ASP.NET through jQuery Ajax() gives error<p>I am trying to send data to an ASP.NET programme with jQuery with this code:</p> <pre><code>$.aj...
44,060,291
Diffing Sql Schema<p>I need to move some changes from database a to database b, and some from b to a. Every comparison tool I've used requires you to pick a direction first and if you want to go the other direction, well then you get to wait for it to completely re-compare all over again.</p> <p>Also the tools I've us...
<p>The best tool for doing this action is from redgate called sql compare.</p> <p><a href="http://www.red-gate.com/products/sql-development/sql-compare" rel="nofollow noreferrer">http://www.red-gate.com/products/sql-development/sql-compare</a></p>
Diffing Sql Schema
sql|diff
-1
32
1
44,060,320
44,060,320
2
true
2017-05-19T02:02:15.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Diffing Sql Schema<p>I need to move some changes from database a to database b, and some from b to a. Every comparison tool I've used requires you to pick a ...
44,156,184
How to select last li in ul including the il element?<p>I have the following code:</p> <pre><code>&lt;ul class="offers-list row"&gt; &lt;li class="column large-3 offers-image" name="orden-1"&gt; &lt;a title="Title" href="my-ofer-link"&gt; &lt;img src="my-image-src" border="0"&gt; &lt;/a&gt; &lt;/li...
<p>You can use <code>.outerHTML</code> with dom object of returned element</p> <pre><code>$('.offers-list.row li').last()[0].outerHTML </code></pre>
How to select last li in ul including the il element?
jquery
-1
49
1
44,156,234
44,156,234
2
true
2017-05-24T10:49:19.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select last li in ul including the il element?<p>I have the following code:</p> <pre><code>&lt;ul class="offers-list row"&gt; &lt;li class="column ...
44,171,417
weird error when execute a command typed from keyboard on Linux with C<p>I'm studying code C on Linux.</p> <p>I have a program to execute a command line which is typed from keyboard.</p> <p>This is my code</p> <pre><code>char* command; scanf("%s", command); execl("/bin/sh", "sh", "-c", command, NULL); </code></pre> ...
<pre><code>char* command; scanf("%s", command); </code></pre> <p>memory is not allocated to command when scanf is being called so its leading to undefined behaviour, you should allocate memory by either</p> <pre><code>command = malloc(256); </code></pre> <p>or declare it as</p> <pre><code>char command[256]; </code...
weird error when execute a command typed from keyboard on Linux with C
c|linux|scanf
-1
37
2
44,171,435
44,171,435
2
true
2017-05-25T02:39:30.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: weird error when execute a command typed from keyboard on Linux with C<p>I'm studying code C on Linux.</p> <p>I have a program to execute a command line whi...
44,256,806
Python and SQL: store value, query, and parse the next one<p>I have a logic dilemma. </p> <p>I'm trying to retrieve all restaurants in France with Yelp. In order to do so I'm writing a web crawler to scrap Yelp API and retrieve the data. The query is like this:</p> <pre><code>https://api.yelp.com/v3/businesses/sear...
<p>Assuming there's a <a href="https://www.python.org/dev/peps/pep-0249/" rel="nofollow noreferrer">python db-api compliant</a> connector for your database (you didn't mention the vendor...) you just have to iterate over your cursor:</p> <pre><code>def get_restaurants_for(country, city): # your api calls etc here ...
Python and SQL: store value, query, and parse the next one
python|sql|yelp
-1
540
2
44,257,000
44,257,000
2
true
2017-05-30T08:06:53.953Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python and SQL: store value, query, and parse the next one<p>I have a logic dilemma. </p> <p>I'm trying to retrieve all restaurants in France with Yelp. In...
44,281,065
Python Pandas table manipulation<p>I have a pandas dataframe which looks like:</p> <pre><code> broker1 broker2 broker3 ticker 0 val1 val2 val3 tick1 1 val4 None val6 tick2 </code></pre> <p>I will like to manipulate it (not sure what is the term for this: pivot? reverse groupby?) in a...
<p>Use <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.melt.html#pandas.DataFrame.melt" rel="nofollow noreferrer"><code>melt()</code></a>, which "unpivots" a table:</p> <pre><code>In [46]: df = pd.read_table(io.StringIO(""" broker1 broker2 broker3 ticker ...: 0 val1 val...
Python Pandas table manipulation
python|pandas
-1
55
2
44,281,536
44,281,536
2
true
2017-05-31T09:35:55.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python Pandas table manipulation<p>I have a pandas dataframe which looks like:</p> <pre><code> broker1 broker2 broker3 ticker 0 val1 val2 va...
44,315,172
How to remove characters inside parenthesis in r<p>I have a data.table with a column that has to be ordered and the month abbreviation is throwing it off. How can I remove just the month abbreviation from within the parenthesis? I've tried a bunch of gsub variations, but haven't been able to achieve the desired results...
<pre><code>x &lt;- c("K (May 04)", "M (Jun 04)", "Q (Aug 04)") gsub("\\([A-Z][a-z]{2} ", "(", x) </code></pre> <p>Or for the second option:</p> <pre><code>gsub(" \\([A-Z][a-z]{2} ([0-9]+))", "\\1", x) </code></pre>
How to remove characters inside parenthesis in r
r|regex|gsub
-1
56
1
44,315,286
44,315,286
2
true
2017-06-01T19:00:57.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove characters inside parenthesis in r<p>I have a data.table with a column that has to be ordered and the month abbreviation is throwing it off. Ho...
43,936,307
How To add * in Textbox Starting value and print into label in C#<p>I have some <code>text boxes</code> in my form where the user need to enter the different prices of article, what I want to do is to automatically add Starting value <code>*</code> whenever text is changed . So when the user types <code>1</code> it is ...
<p>You can use the <code>PadLeft</code> method for a string:</p> <pre><code>textBox1.Text = textBox1.Text.PadLeft(6, '*'); </code></pre> <p>See an example here: <a href="https://dotnetfiddle.net/GPfFsx" rel="nofollow noreferrer">https://dotnetfiddle.net/GPfFsx</a></p>
How To add * in Textbox Starting value and print into label in C#
c#
-1
71
2
43,936,377
43,936,377
3
true
2017-05-12T11:06:33.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How To add * in Textbox Starting value and print into label in C#<p>I have some <code>text boxes</code> in my form where the user need to enter the different...
44,289,689
For loop not recognizing special characters inside an array as single chars<p>The below code is not finding '/n' and replacing with '/0'. Looks like the compiler thinks '/n' and '/0' are more than single characters and are expecting integer values. I have tried atoi(), however this did not work.</p> <p>Thanks in advan...
<p>You probably meant to use a backward slash to represent the special characters:</p> <pre><code>\0 \n </code></pre> <p>The forward slash does not make it a escape sequence, <code>/0</code> are two characters.</p>
For loop not recognizing special characters inside an array as single chars
c|arrays
-1
37
1
44,289,746
44,289,746
3
true
2017-05-31T16:08:24.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: For loop not recognizing special characters inside an array as single chars<p>The below code is not finding '/n' and replacing with '/0'. Looks like the comp...
43,991,929
Null navigation property in view<p>I am learning ASP.NET Core MVC. I got confused with difference between using <code>@Model.NavigationProperty.SubProperty</code> and <code>@Html.DisplayFor(modelItem=&gt;modelItem.NavigationProperty.SubProperty</code> to access navigation property. Details are presented below.</p> <p>...
<p>Using <code>@Model.NavigationProperty.SubProperty</code> requires that both <code>Model</code> and <code>NavigationProperty</code> are not <code>null</code>. It is no different from accessing the <code>SubProperty</code> property in a method.</p> <p>Using <code>Html.DisplayFor()</code> however uses the models metad...
Null navigation property in view
c#|asp.net-mvc|razor|asp.net-core
-1
526
1
43,992,174
43,992,174
5
true
2017-05-16T03:18:40.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Null navigation property in view<p>I am learning ASP.NET Core MVC. I got confused with difference between using <code>@Model.NavigationProperty.SubProperty</...
44,053,024
Pointer initialization of a struct array<p>my application crashes when it comes to it.</p> <p>So I have a struct like this for example(but in reality it has many more things)</p> <pre><code>struct Record { float m_fSimulationTime; unsigned char m_szflags; }; </code></pre> <p>In my class I have it declared li...
<p>The variable <code>m_record</code> is an array of pointers. You need to initialize the pointers first before you access them.</p> <p>For example:</p> <pre><code>for (int i = 0; i &lt;= 32; i++) { m_record[i] = new Record[9]; // Make the pointer actually point somewhere for (int j = 0; j &lt; 9; j++) ...
Pointer initialization of a struct array
c++|struct
-1
61
1
44,053,075
44,053,075
5
true
2017-05-18T16:17:10.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pointer initialization of a struct array<p>my application crashes when it comes to it.</p> <p>So I have a struct like this for example(but in reality it has...
43,956,352
New R user unstacking data<p>My data has multiple rows per memberID. I mocked it up below (see #this is what I have). I need to convert it to a the shape where I have one row per memberID, creating mulitple columns. I mocked up the desired output below as well (see #this is what I want). I am looking for the simplest w...
<p>We can use <code>dcast</code> from <code>data.table</code> which can multiple <code>value.var</code> columns</p> <pre><code>library(data.table) dcast(setDT(df), ID~rowid(ID), value.var = c("Date", "Score"), sep="") # ID Date1 Date2 Date3 Score1 Score2 Score3 #1: 1 2015-01-01 2016-01-03 &lt;N...
New R user unstacking data
r|rstudio
-1
78
1
43,956,368
43,956,368
-2
true
2017-05-13T18:04:25.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: New R user unstacking data<p>My data has multiple rows per memberID. I mocked it up below (see #this is what I have). I need to convert it to a the shape whe...
44,358,874
Equation within JLabel doesn't work?<p>I am trying to display a JLabel that holds the final points, the number of aliens found in the game and the percentage out of 30 aliens. Whenever I run my program the score/30*100 part just produces 0 instead of the actual percentage. I've tried creating a separate variable called...
<pre><code>((score/30)*100) </code></pre> <p>You are using integer math so (score/30) is 0 (assuming score is less than 30).</p> <p>Instead use:</p> <pre><code>((score * 100) / 30) </code></pre>
Equation within JLabel doesn't work?
java
-1
28
1
44,358,892
44,358,892
-1
true
2017-06-04T21:17:26.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Equation within JLabel doesn't work?<p>I am trying to display a JLabel that holds the final points, the number of aliens found in the game and the percentage...
43,959,266
declare this property in your class or use a local variable<p>excuse my English I am presenting an extension on phpbb, but this has been <strong>rejected for this</strong>.</p> <p><strong><em>Line 25: please declare this property in your class or use a local variable.</em></strong></p> <p>I can not figure out what to...
<p>They would like you to declare the properties before using them like this:</p> <pre><code>class banner_scroll_module { public $u_action; private $table; function main($id, $mode) { ... $this-&gt;table = $table_prefix . 'banner'; } } </code></pre> <p>Or, if they will only be use...
declare this property in your class or use a local variable
variables|local
-1
44
1
43,959,318
43,959,318
0
true
2017-05-14T00:30:16.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: declare this property in your class or use a local variable<p>excuse my English I am presenting an extension on phpbb, but this has been <strong>rejected for...
43,988,610
Uncaught TypeError: Cannot set property 'className' of undefined in js<p>when I trying to add a classname into my js code which looks like this</p> <pre><code>var a = document.querySelectorAll('.nav-tabs'); for(var i=0 ; i&lt;a.length; i++){ a[i].addEventListener('click',function(){ a[i].classList.add(...
<pre><code>var a = document.querySelectorAll('.nav-tabs'); for(var i=0 ; i&lt;a.length; i++){ a[i].addEventListener('click',function(){ this.classList.add("active"); }); } </code></pre>
Uncaught TypeError: Cannot set property 'className' of undefined in js
javascript|html|css
-1
3,328
3
43,988,634
43,988,634
0
true
2017-05-15T20:51:15.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Uncaught TypeError: Cannot set property 'className' of undefined in js<p>when I trying to add a classname into my js code which looks like this</p> <pre><co...
43,994,145
Insert image into html code variable<p>I have a PHP variable like this:</p> <p><strong>Example1</strong></p> <pre><code>$data = '&lt;p&gt;This is paragraph.&lt;/p&gt; &lt;p title="not-special"&gt;No!&lt;/p&gt; '; </code></pre> <p><strong>Example2</strong></p> <pre><code>$data = '&lt;p&gt;This is pa...
<p>You can accomplish it in various different ways, a working one could be:</p> <pre><code> $data = '&lt;p&gt;This is paragraph.&lt;/p&gt; &lt;p title="special"&gt;Yes!&lt;/p&gt; '; if (strpos($data, 'special') !== false) { $data = '&lt;p&gt;This is paragraph.&lt;/p&gt; &lt;p title="special"&gt;Yes!&lt;/p&g...
Insert image into html code variable
php|html
-1
41
3
43,994,614
43,994,614
0
true
2017-05-16T06:40:48.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Insert image into html code variable<p>I have a PHP variable like this:</p> <p><strong>Example1</strong></p> <pre><code>$data = '&lt;p&gt;This is paragraph...
44,081,360
URL still contains subdirectory after primary domain's been redirected<p>Could you tell me what I need to edit in this so that my URL doesn't contain the subdirectory it is in?</p> <pre><code># Justhost.com # .htaccess main domain to subdirectory redirect # Do not change this line. RewriteEngine on # Change exampl...
<p>Got it, it's just a setting in settings > general. I changed the site URL and wordpress URL</p>
URL still contains subdirectory after primary domain's been redirected
wordpress|.htaccess
-1
15
1
44,081,687
44,081,687
0
true
2017-05-20T02:34:38.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: URL still contains subdirectory after primary domain's been redirected<p>Could you tell me what I need to edit in this so that my URL doesn't contain the sub...
44,115,258
Activerecord or Raw SQL<p>I have some RAW sql and I'm not sure if it would be better as an Activerecord call or should I use RAW sql. Would this be easy to convert to AR?</p> <pre><code>select * from logs t1 where log_status_id = 2 and log_type_id = 1 and not exists ( select * f...
<p>You could do this using AREL. See <a href="https://stackoverflow.com/questions/7152424/rails-3-arel-for-not-exists">Rails 3: Arel for NOT EXISTS?</a> for an example.</p> <p>Personally I often find raw SQL to be more readable/maintainable than AREL queries, though. And I guess most developers are more familiar with ...
Activerecord or Raw SQL
ruby-on-rails|activerecord
-1
318
1
44,115,697
44,115,697
0
true
2017-05-22T14:18:14.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Activerecord or Raw SQL<p>I have some RAW sql and I'm not sure if it would be better as an Activerecord call or should I use RAW sql. Would this be easy to ...
44,117,284
How do I check if 2 clients are accessing the same data?<p>I have a page which tells me which orders are pending to verify. I have a verification team which accesses the page and accesses each and every order. How do I make sure that no two clients are verifying the same order at a time. I want to make the background o...
<p>I would create another table, where you store following data:</p> <ul> <li><code>orderID</code>: foreign key to Orders table of order in process of verification</li> <li><code>accountID</code>: foreign key to table listing your verification team</li> <li><code>lockedOn</code>: a timestamp, for when someone from ver...
How do I check if 2 clients are accessing the same data?
php
-1
20
1
44,117,689
44,117,689
0
true
2017-05-22T15:57:21.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I check if 2 clients are accessing the same data?<p>I have a page which tells me which orders are pending to verify. I have a verification team which ...
44,184,070
Fragments in TabLayout do not bind to viewmodel<p>I've been struggling with this for 2 days now and am quite simply stuck. The binding of the fragments simply will not kick in for some reason. The page is shown correctly and the tabs do work fine. I can swipe from tab 1 to 2 and vice versa. The TextView should show som...
<p>You need to use <code>BindingInflate()</code>instead of the default Android inflater since it doesn't know how to process the <em>MvxBind</em> properties.</p> <pre class="lang-cs prettyprint-override"><code>using MvvmCross.Binding.Droid.BindingContext; ... public override View OnCreateView(LayoutInflater inflater...
Fragments in TabLayout do not bind to viewmodel
c#|android|mvvmcross|android-tablayout
-1
1,287
1
44,184,477
44,184,477
0
true
2017-05-25T15:19:33.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fragments in TabLayout do not bind to viewmodel<p>I've been struggling with this for 2 days now and am quite simply stuck. The binding of the fragments simpl...
44,199,055
Cycle through pages of search results and parse data<p>I am just trying to make Python look through all the web pages of a search results of a website:</p> <pre><code>remainder = "latter_part_of_url" page = '?s=0' urlstring = 'https://domain/search/' + str(page) + str(remainder) pagenumber = str(page)+120 for i in...
<p>wouldn't that be a simple:</p> <pre><code> for new_page_num in range(int(page)+120, 100000, 120): urlstring = 'https://domain/search/' + str(new_page_num) + str(remainder) </code></pre> <p>I would use some string formatting rather than + though. </p>
Cycle through pages of search results and parse data
python|beautifulsoup
-1
53
1
44,199,466
44,199,466
0
true
2017-05-26T10:17:58.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cycle through pages of search results and parse data<p>I am just trying to make Python look through all the web pages of a search results of a website:</p> ...
44,213,685
Python, accessing list/ndarray<p>This is the output of one of my variables.</p> <p>I am trying to access each f the elements. But I am not able to </p> <pre><code>a = [array([[[ 326., 50.], [ 570., 16.], [ 574., 259.], [ 342., 274.]]], dtype=float32)] </code></pre> <p>I tried converting this to nda...
<p>Try using the <code>a[()]</code> notation. </p> <p>For example, <code>a[(0,0,0)]</code> will return you <code>array([ 326., 50.], dtype=float32)</code>. </p>
Python, accessing list/ndarray
python|numpy|multidimensional-array
-1
52
1
44,213,772
44,213,772
0
true
2017-05-27T06:23:14.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python, accessing list/ndarray<p>This is the output of one of my variables.</p> <p>I am trying to access each f the elements. But I am not able to </p> <pr...
44,215,507
Issues parsing JSON data with Swift from API<p>I am attempting to get data from an API and bring it into swift. I have managed to connect to th API and get the data come into the console however when I attempt to parse the data I have an issue - below is the function that does the connection and should parse the data.<...
<p>Your <code>JSON</code> response is <code>Dictionary</code> not <code>Array</code> and the array you are looking for is <code>opportunities</code> that you need to get from the dictionary.</p> <pre><code>do { let fetchedData = try JSONSerialization.jsonObject(with: data!, options: []) as! [String:Any] let op...
Issues parsing JSON data with Swift from API
swift|swift3
-1
331
1
44,215,527
44,215,527
0
true
2017-05-27T10:04:38.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Issues parsing JSON data with Swift from API<p>I am attempting to get data from an API and bring it into swift. I have managed to connect to th API and get t...
44,220,734
submit button is depending on radio button<p>When a radio button is selected, the submit button should refer to the page associated with that radio button</p> <p><strong>HTML</strong></p> <pre><code>&lt;label class="input-group"&gt; &lt;span class="input-group-addon"&gt; &lt;input type="radio" name="betalen" ...
<p>1st add <code>onsubmit="setaction()"</code> to form element.</p> <pre><code>&lt;form action="#default_action" id="form_id" onsubmit="setaction()"&gt; </code></pre> <p>Then add id to bitcoin radio input</p> <pre><code> &lt;input type="radio" id="bitcoin" name="betalen" value="bitcoin" /&gt; </code></pre> <p>th...
submit button is depending on radio button
php|html|forms|submit
-1
51
1
44,221,005
44,221,005
0
true
2017-05-27T19:16:44.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: submit button is depending on radio button<p>When a radio button is selected, the submit button should refer to the page associated with that radio button</p...
44,229,809
error tracking for server on flask<p>I have a server written on flask and I need to do error tracking (name of error, what caused the error, name of file and line with error). How should I do it? I'll appreciate any help.</p>
<p>enable the flask debugger, by setting debug to True for your flask app.</p> <pre><code>app = Flask(__name__) app.config['DEBUG'] = True </code></pre> <p>As you shouldn't enable debug for a production server, you can create a logging handler as follows: <a href="http://flask.pocoo.org/docs/0.12/errorhandling/" rel=...
error tracking for server on flask
python|flask|error-handling
-1
32
1
44,229,838
44,229,838
0
true
2017-05-28T16:52:41.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: error tracking for server on flask<p>I have a server written on flask and I need to do error tracking (name of error, what caused the error, name of file and...
44,246,770
How do i check if 2 Lists have the same Sprites in c#<p>the question is, how do i compare two lists of the same type(in this case Sprite) and check if they are equal. To get into my code, i have GameObjects symbol, shadow and cable and those change their sprite with a buttonclick(different script). On the other hand i...
<p>The default comparer used in SequenceEqual will check to see if the reference pointer of the class instance of Sprite in CompareList is the same "memory reference pointer" as is stored in ActualList. Without seeing the full lifecycle of this we cannot be sure, but if the GetComponent() ever creates a new instance of...
How do i check if 2 Lists have the same Sprites in c#
c#|unity3d
-1
325
1
44,247,000
44,247,000
0
true
2017-05-29T16:17:21.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do i check if 2 Lists have the same Sprites in c#<p>the question is, how do i compare two lists of the same type(in this case Sprite) and check if they a...
44,305,954
Build object-introspection failed: yocto build<p>I had errors when I built Yocto for the embedded device. I searched it on the Internet but nothing working. Please help me!</p> <pre><code>Caught exception: &lt;type 'exceptions.IOError'&gt; IOError(122, 'Disk quota exceeded') | &gt; /data/phonghoang/build_yocto/tmp...
<p>Well,</p> <pre><code>Caught exception: &lt;type 'exceptions.IOError'&gt; IOError(122, 'Disk quota exceeded') </code></pre> <p>seems to indicate that you're running out of disk. How much space do you have left on the partition where you're building?</p> <p>Try to free up some space.</p>
Build object-introspection failed: yocto build
embedded-linux|yocto
-1
289
1
44,309,949
44,309,949
0
true
2017-06-01T11:11:13.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Build object-introspection failed: yocto build<p>I had errors when I built Yocto for the embedded device. I searched it on the Internet but nothing working. ...
43,975,727
Showing selected option in JavaScript<p>I have a problem displaying the default selection "Choose School" in my second select.What should i add in my JavaScript just to show this selection?</p> <p>For example right after loading the page.The default selected item for first dropdown is showing "Choose Location" which ...
<p>Add class inside "chose school" option as <code>class="0"</code> and find extra parameter as <code>option.0</code>.</p> <pre><code>$set = $items.find('option.0, option.' + rel); &lt;option class="0"&gt;Choose school&lt;/option&gt; </code></pre>
Showing selected option in JavaScript
javascript
-1
50
1
43,975,877
43,975,877
1
true
2017-05-15T09:23:33.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Showing selected option in JavaScript<p>I have a problem displaying the default selection "Choose School" in my second select.What should i add in my JavaScr...
43,991,401
PHP files get edited by spammers<p>Anti-spam conditions disappear from mailer PHP files while contact form is being simultaneously attacked by spammers. </p> <p>This is the second time in a week this has happened. Lines of spam-preventing code just get removed from my PHP file (nothing gets added). I have contacted t...
<p>It could be possible that you're simply overwriting your files with versions that don't have the tags in them. Double-check that your plugins and upload scripts don't have permission to overwrite these files without <strong>your</strong> permission.</p> <p>If you are worried about your security though, the most com...
PHP files get edited by spammers
php|.htaccess|security
-1
53
2
43,991,492
43,991,492
1
true
2017-05-16T02:03:13.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP files get edited by spammers<p>Anti-spam conditions disappear from mailer PHP files while contact form is being simultaneously attacked by spammers. </p>...
43,996,253
How to trigger an sql routine on query column values and merge result into powerquery<p>I am working with office 2016 excel and connecting to an Oracle db</p> <p>I am creating a file for fetching orders, the part number, their desired delivery dates, the actual delivery dates, the average lead time, the average consum...
<p>Stian,</p> <ol> <li>If your procedure is not a stored procedure, but a function, then you can create separate query for this function, and then add new column to a filtered table. This column is getting its value by executing this function with a parameter from another column(s).</li> <li>The other way doing this i...
How to trigger an sql routine on query column values and merge result into powerquery
sql|excel|powerquery|m
-1
55
1
44,004,973
44,004,973
1
true
2017-05-16T08:31:34.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to trigger an sql routine on query column values and merge result into powerquery<p>I am working with office 2016 excel and connecting to an Oracle db</p...
44,028,058
How to use bluebird promise for specific scenario<p>I need to use bluebird promise for following scenario (already implemented in native promise using sequential approach), but confuse how to do it in bluebird.</p> <pre><code>data : [ { field1 : value1, field2 : [ subfield1 : sub...
<p>The import thing to understand is that promises are <em>result</em> values. You must not forget to <code>return</code> them, otherwise they will get ignored. You don't need to "resolve anything", all you need to do is <code>return</code> the promises and they will chain automatically:</p> <pre><code>function prepar...
How to use bluebird promise for specific scenario
node.js|promise|bluebird
-1
44
1
44,030,163
44,030,163
1
true
2017-05-17T14:42:53.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use bluebird promise for specific scenario<p>I need to use bluebird promise for following scenario (already implemented in native promise using sequen...
44,058,629
How to do Nested loops in Python 2.7<p>I am trying to traverse a 2d array with a nested for loop, and it has different values when I graph it, but when I try to access the data, it the elements are all the same. I have tried different styles of for loops but get the same errors. This is more of an error that I don't un...
<p>The problem isn't the loops: it's that you don't realize the semantics of Python list short-hand. Here's your nested list with a shorter name and a simple change:</p> <pre><code>&gt;&gt;&gt; pv = 2*[2*[0]] &gt;&gt;&gt; pv [[0, 0], [0, 0]] &gt;&gt;&gt; pv[0][1] = "new" &gt;&gt;&gt; pv [[0, 'new'], [0, 'new']] </cod...
How to do Nested loops in Python 2.7
python|loops|matplotlib|multidimensional-array|nested-loops
-1
327
1
44,058,705
44,058,705
1
true
2017-05-18T22:17:32.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to do Nested loops in Python 2.7<p>I am trying to traverse a 2d array with a nested for loop, and it has different values when I graph it, but when I try...
44,066,486
C# - Reading text file, comparing the dictionary data and finding frequency of each<p>I have a text file called <strong>data.txt</strong> which contains data of replaced text.</p> <p>Contents of <strong>data.txt</strong>: </p> <blockquote> <p>Line 1: System1 -> MachineA</p> <p>Line 2: System2 -> ...
<p>Why not just count how many times it occurs?</p> <p>First get the unique records:</p> <pre><code>for (int i = 0; i &lt; arrayofLine.Length; i++) { //Your original logic here } //This is an additional code: Frequency = Frequency.GroupBy(s =&gt; s.Value) .Select(g =&gt; g.First())...
C# - Reading text file, comparing the dictionary data and finding frequency of each
c#|dictionary
-1
52
4
44,066,724
44,066,724
1
true
2017-05-19T09:36:50.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# - Reading text file, comparing the dictionary data and finding frequency of each<p>I have a text file called <strong>data.txt</strong> which contains data...
44,079,997
Android newbie, button text not changing<p>I'm trying to teach myself android and I'm completely stuck. I've got an array of 9 buttons, whose default text is "button", and a TextView whose default text is "Hello World!". </p> <pre><code>I can get the TextView's text to change to Lorem Ipsum, but I can't get the butto...
<p>Your for loop is instantiated improperly here, it will never execute. You've set <code>i=0</code> and tell the loop to execute so long as <code>i&lt;0</code>, which of course is never true. </p> <pre><code>for(i = 0; i &lt; 0; i++) { bArr[i].setText("Btn " + i); //Doesn't Work rv.setTextViewText(bArr[i].get...
Android newbie, button text not changing
java|android
-1
55
1
44,080,039
44,080,039
1
true
2017-05-19T22:48:13.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android newbie, button text not changing<p>I'm trying to teach myself android and I'm completely stuck. I've got an array of 9 buttons, whose default text is...
44,087,866
Targeting different screen sizes for Android<p>How should be the Android manifest.xml for separately targeting the following screen sizes in Google store: 800px*1280px, 600px*1024px, 360px*640px, 320px*530px </p> <p>Thank you. </p>
<p>Those are not screen sizes. They are screen resolutions. There is nothing that you do in the manifest for screen resolutions.</p> <p>You may wish to read <a href="https://developer.android.com/guide/practices/screens_support.html" rel="nofollow noreferrer">the documentation</a> on supporting different screen sizes ...
Targeting different screen sizes for Android
android|screen
-1
30
1
44,087,912
44,087,912
1
true
2017-05-20T15:46:48.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Targeting different screen sizes for Android<p>How should be the Android manifest.xml for separately targeting the following screen sizes in Google store: ...
44,103,165
Period in a Filename recognizing as extension<p>I have an admin page that can upload files into my database, the problem is whenever the file has a period (.) on it's name, the script reads it as an extension. For example: I upload a file named "flower1.1.jpg" it became as "flower1.1" without the jpg extension. My php ...
<p>Why are you even trying to get an extension? You're just exploding and concating them back together again:</p> <pre><code>function upload_file() { if ( isset($_FILES["user_image"]) ) { $destination = './upload/' . $_FILES['user_image']['name']; move_uploaded_file($_FILES['user_image']['tmp_n...
Period in a Filename recognizing as extension
php|mysql|file-upload
-1
43
1
44,103,207
44,103,207
1
true
2017-05-22T00:43:30.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Period in a Filename recognizing as extension<p>I have an admin page that can upload files into my database, the problem is whenever the file has a period (....
44,102,932
How do I refresh every WebBrowser in a Control/Tab page?<p>Yeah I'm kinda just starting out and I was wondering how you could refresh every WebBrowser that is in a control such as a TabPage (which is my situation) or a form.</p> <p>I've looked it up, but can't seem to find anything. I've tried experimenting and figuri...
<p>Try this:</p> <pre><code>Dim ctrl As Control For Each ctrl In Me.Controls 'or tabpage If (ctrl.GetType() Is GetType(WebBrowser)) Then Dim wbr As WebBrowser = CType(ctrl, WebBrowser) wbr.Refresh() End If </code></pre>
How do I refresh every WebBrowser in a Control/Tab page?
vb.net
-1
71
1
44,103,379
44,103,379
1
true
2017-05-22T00:00:58.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I refresh every WebBrowser in a Control/Tab page?<p>Yeah I'm kinda just starting out and I was wondering how you could refresh every WebBrowser that i...
44,131,846
how can i get value from dynamically generated edittexts?<p>I am getting only a single value.how can i get data from all of the editText which i have created dynamically so that i can pass all editText data using comma after every editText .</p> <p>Here is my code:</p> <pre><code>Diagnolist.setOnClickListener(new Vi...
<p>do changes as per below code.</p> <pre><code>final List&lt;EditText&gt; allEds = new ArrayList&lt;EditText&gt;(); </code></pre> <p>declare above list after class define.</p> <pre><code>Diagnolist.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { EditText ed; ...
how can i get value from dynamically generated edittexts?
android
-1
65
2
44,132,454
44,132,454
1
true
2017-05-23T10:10:22.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can i get value from dynamically generated edittexts?<p>I am getting only a single value.how can i get data from all of the editText which i have created...
44,144,010
Telegram: add callback data to reply_markup<p>I am trying to add callback data to <code>reply_markup</code>.</p> <p>This is my code:</p> <pre><code>$option[] = array("test"); $replyMarkup = array('keyboard'=&gt;$option,'one_time_keyboard'=&gt;false,'resize_keyboard'=&gt;true,'selective'=&gt;true); $encodedMarkup = js...
<p>It looks you try to use <a href="https://core.telegram.org/bots/api#replykeyboardmarkup" rel="nofollow noreferrer">ReplyKeyboardMarkup</a>. It defines a keyboard with templates of messages which an user can send by tapping on a button.</p> <p>But you want to get specific key so take a look at <a href="https://core....
Telegram: add callback data to reply_markup
php|api|telegram
-1
3,343
1
44,150,364
44,150,364
1
true
2017-05-23T20:00:05.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Telegram: add callback data to reply_markup<p>I am trying to add callback data to <code>reply_markup</code>.</p> <p>This is my code:</p> <pre><code>$option...
44,153,090
Display dynamic table on page (re)load?<p>I'm trying to find a solution for a table that is populated with $.ajax(), but the content doesn't display when the page loads. How can I do that? Maybe there is something missing on my <code>$.ajax()</code> function?</p> <p>HTML:</p> <pre><code>&lt;div class="row"&gt; &l...
<p>If you want to load data when page reloads..do a ajax call in document ready function..like below $(document).ready(function() {</p> <pre><code>// do ajax call </code></pre> <p>});</p>
Display dynamic table on page (re)load?
javascript|jquery|ajax
-1
61
4
44,154,568
44,154,568
1
true
2017-05-24T08:32:47.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display dynamic table on page (re)load?<p>I'm trying to find a solution for a table that is populated with $.ajax(), but the content doesn't display when the...
44,184,783
Mysql split string on punctuation<p>I have a database where office users have created a "poo man's categorization" by prefixing the administrative title field with a category. For instance, you have records like </p> <pre><code>Applications - When to Apply Applications- Fees Admission: GPA requirements Admissions: Bur...
<p>AFAIK, this isn't possible with any of the built-in MySQL functions. There's no function for searching a string for a character outside a set, e.g. the first non-alphanumeric character.</p> <p>You can write a stored function that does it, by looping over the string and calling <code>SUBSTR()</code>. But you're prob...
Mysql split string on punctuation
mysql|regex|string
-1
56
1
44,191,156
44,191,156
1
true
2017-05-25T15:54:21.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mysql split string on punctuation<p>I have a database where office users have created a "poo man's categorization" by prefixing the administrative title fiel...
44,196,210
shape-outside property not working at all<p>I have just started trying out the <code>shape-outside</code> property in css but I am not able to make it work,no matter how many documentation or blogs I go through. I may have done a silly mistake but I am not not sure about it. Can someone point out the mistake?</p> <p>...
<p>You can't use the <code>outside-shape</code> on the element itself, but you can use <code>:before</code> or <code>:after</code> pseudo-element to add a <code>outside-shape</code> to the element. See the following solution using <code>:before</code>:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-...
shape-outside property not working at all
css|css-shapes|clip-path
-1
329
1
44,196,724
44,196,724
1
true
2017-05-26T07:41:32.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: shape-outside property not working at all<p>I have just started trying out the <code>shape-outside</code> property in css but I am not able to make it work,n...
44,208,117
What is wrong with my file name?<p>I copied this web page from <a href="http://www.sqlsaturday.com/588/Sessions/Schedule.aspx" rel="nofollow noreferrer">here</a> to a Windows machine then I renamed it from <em>SQLSaturday #588 - New York City 2017 Sessions Schedule.htm</em> to <em>SQLSaturday #588 - New York City 201...
<p>I think the biggest problem is the # sign. When I encode it with %23, it works for me. </p> <p>The really correct encoding is SQLSaturday%20%23588%20-%20New%20York%20City%202017%20%20Sessions.html</p> <p>but for Firefox, only the %23 seems to matter.</p>
What is wrong with my file name?
html|web
-1
38
1
44,208,219
44,208,219
1
true
2017-05-26T18:32:37.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is wrong with my file name?<p>I copied this web page from <a href="http://www.sqlsaturday.com/588/Sessions/Schedule.aspx" rel="nofollow noreferrer">here...
44,211,572
How do I make sure .mp3 files open with Windows Media Player in Python?<p>I have a program that needs to open a file in Windows Media Player because after the file is finished, it needs to kill wmplayer.exe. I've tried using <code>subprocess.Popen(["C:\Program Files (x86)\Windows Media Player\wmplayer.exe", my_file])</...
<p>WMP probably expects a full path to the media to play and doesn't care where your script is executing from. Try:</p> <pre><code>wmp = r"C:\Program Files (x86)\Windows Media Player\wmplayer.exe" media_file = os.path.abspath(os.path.realpath(my_file)) subprocess.call([wmp, media_file]) </code></pre>
How do I make sure .mp3 files open with Windows Media Player in Python?
python|windows|python-3.x|subprocess
-1
1,024
2
44,211,691
44,211,691
1
true
2017-05-26T23:55:31.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I make sure .mp3 files open with Windows Media Player in Python?<p>I have a program that needs to open a file in Windows Media Player because after th...
44,219,920
Display map coordinate in input fields<p>I have two input fields and a map under them, what i want to do is to display the longitude and latitude when i click on the map in any location, how can i do that? here is my code: </p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="fa...
<p>You can click event listener on map.</p> <p>below is the code for that </p> <pre><code> google.maps.event.addListener(map, 'click', function(event) { alert(event.latLng); }); </code></pre> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-c...
Display map coordinate in input fields
javascript|html|google-maps
-1
38
1
44,219,976
44,219,976
1
true
2017-05-27T17:43:57.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display map coordinate in input fields<p>I have two input fields and a map under them, what i want to do is to display the longitude and latitude when i clic...
44,266,257
Can't properly create a maven project with Intellij<p>When i try and create a maven project with intellij <a href="https://ibb.co/ek7Lfv" rel="nofollow noreferrer">https://ibb.co/ek7Lfv</a> and the project has been created i can't create any java files? when ever i clikc on the folders <a href="https://ibb.co/c7DnSa" r...
<p>IntelliJ has unintuitive default behaviour for maven projects. It does not apply changes from <code>pom.xml</code> to project structure.</p> <p>So every time I create or import maven project I manually select a checkbox <a href="https://www.jetbrains.com/help/idea/import-from-maven-page-1.html" rel="nofollow norefe...
Can't properly create a maven project with Intellij
java|maven|intellij-idea|project
-1
61
1
44,266,419
44,266,419
1
true
2017-05-30T15:26:45.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't properly create a maven project with Intellij<p>When i try and create a maven project with intellij <a href="https://ibb.co/ek7Lfv" rel="nofollow noref...
44,275,866
Android- Set time on TimePicker from SharedPrefs ints<p>I have a TimePicker set in the 24 hour format. I have tried something like this in the onCreate() method of my activity class that uses it, but it doesn't seem to keep the time I change when I back out and reload the activity. Is something wrong with this? Do I ne...
<p>Are you doing this- editor.commit()?</p>
Android- Set time on TimePicker from SharedPrefs ints
java|android|sharedpreferences|timepicker|android-sharedpreferences
-1
57
1
44,275,959
44,275,959
1
true
2017-05-31T04:48:33.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android- Set time on TimePicker from SharedPrefs ints<p>I have a TimePicker set in the 24 hour format. I have tried something like this in the onCreate() met...
44,303,737
pdf preview in browser in asp.net<p>i'm having a trouble to preview my generated pdf file in browser when clicking a button i used Reponse.Redirect to pdf location but all i get is the older version of the pdf file, in my application i'm trying to rewrite in the same output pdf file, when i open the pdf with acrobat r...
<p>if acrobat displays the new content then may be cleaning up your browser's cache would fetch the new file from the location specified.</p>
pdf preview in browser in asp.net
c#|asp.net|pdf
-1
571
1
44,303,878
44,303,878
1
true
2017-06-01T09:30:17.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: pdf preview in browser in asp.net<p>i'm having a trouble to preview my generated pdf file in browser when clicking a button i used Reponse.Redirect to pdf l...
44,370,861
Python sort strings with dot/separated numbers and strings at the end<p>I have an array of dicts like:</p> <p><code>array_x = [{'title': 'Copy -- @1.1 true files'}, {'title': 'Copy -- @1.11 true files'}, {'title': 'Copy -- @1.3 true files'}, {'title': 'Copy -- @1.2 true files'}, {'title': 'Copy -- @1.12 true files'},...
<p>How about this: discard everything before and including the <code>@</code> sign, then convert each period-separated section into ints. That should fix the problem of the digit sequences being sorted lexicographically.</p> <pre><code>&gt;&gt;&gt; array_x = [{'title': 'Copy -- @1.1'}, {'title': 'Copy -- @1.11'}, {'ti...
Python sort strings with dot/separated numbers and strings at the end
python|sorting
-1
831
1
44,370,933
44,370,933
1
true
2017-06-05T14:07:31.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python sort strings with dot/separated numbers and strings at the end<p>I have an array of dicts like:</p> <p><code>array_x = [{'title': 'Copy -- @1.1 true...
44,067,415
Return the list of keys in object if its true<p>I want to create my own script in React that adds the className if the key of an object is true. Now I'm using the for..in loop, but I get only the one of my true statement. </p> <pre><code> let btnClass = this._classNames({ 'btn': true, 'active': ...
<p><a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/filter" rel="nofollow noreferrer">Array.prototype.filter()</a> is suitable for these scenario, first create an <code>array</code> of all the keys by using <code>Object.keys()</code> then use <a href="https://developer.mozill...
Return the list of keys in object if its true
javascript|reactjs
-1
48
2
44,067,515
44,067,515
2
true
2017-05-19T10:17:28.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return the list of keys in object if its true<p>I want to create my own script in React that adds the className if the key of an object is true. Now I'm usin...
44,147,650
.NET to .NetCore/.netstandard<p>I am upgrading my application from .Net to .Netstandard(Which is Core compliant)</p> <p>Now, I came across a lot of articles but none of them specifically answers my questions. I have following questions:</p> <ol> <li>Most of the articles refer to Project.json. Well, we are VS2017 .NEt...
<p>The new csproj format works with all files in the folder by default. Your best course of action is to create a new .net core console application project and any files you put in its directory will become part of the project.</p> <p>You state that this is a console application, but talk about targeting .Net Standard...
.NET to .NetCore/.netstandard
.net|.net-core
-1
55
1
44,147,706
44,147,706
2
true
2017-05-24T01:48:36.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: .NET to .NetCore/.netstandard<p>I am upgrading my application from .Net to .Netstandard(Which is Core compliant)</p> <p>Now, I came across a lot of articles...
44,194,600
How to lead in postgresql?<p>I have a table in the below format</p> <pre><code>id task_start_time task_end_time __ _______________ _____________ 1 2017-03-21 00:09:10 2017-03-21 00:12:18 1 2017-03-21 00:12:19 2017-03-21 00:12:56 1 2017-03-21 00:12:57 2017...
<p>Use <a href="https://www.postgresql.org/docs/current/static/functions-window.html" rel="nofollow noreferrer">window function</a> <code>lag</code>.</p> <pre class="lang-sql prettyprint-override"><code>SELECT id, task_start_time, task_end_time , LAG(task_end_time) OVER (PARTITION BY id ORDER BY task_end_time) AS...
How to lead in postgresql?
java|sql|database|postgresql
-1
44
1
44,194,900
44,194,900
2
true
2017-05-26T05:58:21.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to lead in postgresql?<p>I have a table in the below format</p> <pre><code>id task_start_time task_end_time __ _______________ ...
44,280,529
IOError: [Errno 22] Invalid argument<p>I am trying to concatenate all the pdf into one pdf thereby using PyPDF2 library. I am using python 2.7 for the same.</p> <p>My error is :</p> <pre><code>&gt;&gt;&gt; RESTART: C:\Users\Yash gupta\Desktop\first projectt\concatenate\test\New folder\test.py ['Invoice.pdf', 'Invo...
<p>I believe you are looping through collected files incorrectly (Python is indentation-sensitive).</p> <pre><code># Loop through all the PDF files. for filename in pdfFiles: pdfFileObj = open(filename, 'rb') pdfReader = PyPDF2.PdfFileReader(pdfFileObj) # Loop through all the pages for pageNum in rang...
IOError: [Errno 22] Invalid argument
python|pypdf2
-1
3,072
1
44,280,685
44,280,685
2
true
2017-05-31T09:14:09.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: IOError: [Errno 22] Invalid argument<p>I am trying to concatenate all the pdf into one pdf thereby using PyPDF2 library. I am using python 2.7 for the same....
44,329,379
Why do collapsing/expandable iOS UITableView rows disappear on interaction?<p>I am new to iOS Development and I just implemented a simple expandable sections UITableView. I am not able to understand why some rows disappear and sometimes change position when the row heights are recalculated on tapping the section header...
<ul> <li><p>You're using cells for the header. You shouldn't do that, you need a regular UIView there, or at least a cell that's not being dequeued like that. There's a few warnings when you run it that give that away. Usually just make a standalone xib with the view and then have a static method like this in your head...
Why do collapsing/expandable iOS UITableView rows disappear on interaction?
ios|swift|uitableview
-1
816
2
44,330,290
44,330,290
2
true
2017-06-02T12:48:28.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do collapsing/expandable iOS UITableView rows disappear on interaction?<p>I am new to iOS Development and I just implemented a simple expandable sections...
44,356,072
Trigger on SQLite not working<p>I have built 2 tables (t_top and t_rest) on a db and the first should contain up to 5 numbers, while the second should contain more. We can only insert number to the t_top using an active trigger that saves 5 numbers to t_top and then if a sixth is inserted, then if it's greater than one...
<pre><code>DELETE FROM t_min SELECT MAX(id) AS max_id FROM t_min WHERE id = max_id; </code></pre> <p>-this does not have sense because the syntax of DELETE is <code>DELETE FROM table WHERE ...</code> I guess you wanted something like this:</p> <pre><code>DELETE FROM t_min WHERE id=( SELECT MAX(id) FROM t_min ); </cod...
Trigger on SQLite not working
sqlite|triggers
-1
44
1
44,356,730
44,356,730
2
true
2017-06-04T16:08:59.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trigger on SQLite not working<p>I have built 2 tables (t_top and t_rest) on a db and the first should contain up to 5 numbers, while the second should contai...
43,966,548
Whats the difference between UID and UDID?<p>What is the difference between <code>UDID</code> and <code>UUID</code>? I know that <code>UDID</code> stands for <code>U</code>nique <code>D</code>evice <code>ID</code>entifier and <code>UUID</code> is <code>U</code>niversally <code>U</code>nique <code>ID</code>entifier but ...
<p>This explains it well: <a href="https://stackoverflow.com/questions/21872233/differences-between-udid-and-uuid">Differences between UDID and UUID</a></p> <p>UUID (Universally Unique IDentifier), what you call UI - An id that's per app. It's also per install so if a user reinstalls the app it will be different.</p>...
Whats the difference between UID and UDID?
android|ios
-1
8,007
1
43,966,627
43,966,627
3
true
2017-05-14T16:54:10.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Whats the difference between UID and UDID?<p>What is the difference between <code>UDID</code> and <code>UUID</code>? I know that <code>UDID</code> stands for...
44,147,665
Diference between two code of: constant pointer to a constant integer initialization<p>What is the difference between these two codes?</p> <p>1.</p> <pre><code>const int ic = 2; const int* const p3; p3 = &amp;ic; </code></pre> <p>2.</p> <pre><code>const int ic = 2; const int* const p3 = &amp;ic; </code></pre> <p>1...
<p>This may be a bit confusing at first. Here you have a <code>const</code> pointer to a <code>const int</code>, so the variable itself (the pointer) is <code>const</code>. Everything marked <code>const</code> has to be initialized in C++ at construction (creation). In your first snippet, you leave it un-initialized,</...
Diference between two code of: constant pointer to a constant integer initialization
c++|initialization|constants
-1
35
1
44,147,725
44,147,725
3
true
2017-05-24T01:50:32.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Diference between two code of: constant pointer to a constant integer initialization<p>What is the difference between these two codes?</p> <p>1.</p> <pre><...
44,235,089
can you use a wild card for C_INCLUDE_PATH<p>If I downloaded a source tree with a number of folders with source files in them can I use </p> <pre><code>c_include_path=/some/directory/* </code></pre> <p>so it searches through all the folders for the files?</p>
<p>AFAIK, this is not possible, you need to provide each directory path separately, most probably using <code>-I</code> option.</p> <p>The usual convention is, however, to have a top level header at the directory root which includes other required headers with relative path, something like</p> <p><em>root.h</em></p> ...
can you use a wild card for C_INCLUDE_PATH
c|header|include
-1
80
1
44,235,168
44,235,168
3
true
2017-05-29T05:22:18.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: can you use a wild card for C_INCLUDE_PATH<p>If I downloaded a source tree with a number of folders with source files in them can I use </p> <pre><code>c_in...
44,150,158
Publishing a different apk in the play store<p>I have already published an app for the google play store, and now it is in use by around 1000 users and is still growing. However, I find that the code which I used is quite cluttered for me to add new features, and so I am planning to write a different version of the app...
<p>NO it is not possible to publish an app with a different package name but you can change the version code and republish this app with new code by signing the app with the same credential. hope it will help.</p>
Publishing a different apk in the play store
android|google-play
-1
63
1
44,150,294
44,150,294
4
true
2017-05-24T06:03:22.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Publishing a different apk in the play store<p>I have already published an app for the google play store, and now it is in use by around 1000 users and is st...
44,292,581
Python codes work in 3.61 but not 2.7.12<p>I have few lines of python below and it runs fine under 3.61 but not 2.7.12. It looks like file=log_file throws the error for some reasons. How do I fix it?</p> <p>Also, I think my codes are not best practice, what is a better approach?</p> <p>Thank you for your help everyon...
<p>Python3 is significantly different from Python2. <a href="https://docs.python.org/3/whatsnew/3.0.html" rel="nofollow noreferrer">Changelist for Python3</a></p> <p>To use "file=" (which was introduced to print() in Py3), add</p> <pre><code>from __future__ import print_function </code></pre>
Python codes work in 3.61 but not 2.7.12
python|file|compatibility|incompatibility
-1
54
1
44,292,640
44,292,640
4
true
2017-05-31T18:50:10.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python codes work in 3.61 but not 2.7.12<p>I have few lines of python below and it runs fine under 3.61 but not 2.7.12. It looks like file=log_file throws th...
44,217,516
Prime numbers up to n in JQuery<p>I'm trying to make a program which prints prime numbers up to n. </p> <p>Here is my code, but it doesn't work.</p> <pre><code>$(document).ready(function(){ $('#g').click(function(){ var n = $('#a').val(); for (a=2; a&lt;n; a++) { ...
<p>In your code the checking modulus have some error. <code>if (a%i=0)</code> if condition needs <code>==</code> to checking. single <code>=</code> is storing the value. Also semicolon missing after <code>break</code> in next line. There is an unwanted closing bracket also. I have removed the else condition and set a v...
Prime numbers up to n in JQuery
jquery
-1
270
1
44,217,636
44,217,636
-2
true
2017-05-27T13:36:55.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Prime numbers up to n in JQuery<p>I'm trying to make a program which prints prime numbers up to n. </p> <p>Here is my code, but it doesn't work.</p> <pre><...