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
37,810,992
compiler is not able to find the given paths<p>I have included the headers in Qt for my project, but the compiler is still not able to identify the headers. Libraries once included created its own includepath and depend.</p> <p>Any help appriciated:</p> <pre><code>`INCLUDEPATH += $$PWD/../HDE/x86.linux/include DEPEND...
<p>All you have to do is also include the path for the header files in .pro file. for instance if the header file is at location /home/jack/Myproject then just write the below in the .pro file</p> <p>INCLUDEPATH +=$$PWD/../Myproject</p>
compiler is not able to find the given paths
c++|qt|.profile
-1
56
1
37,811,084
37,811,084
2
true
2016-06-14T11:40:56.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: compiler is not able to find the given paths<p>I have included the headers in Qt for my project, but the compiler is still not able to identify the headers. ...
37,815,624
list of attributes associated with every element of text file<p>I have a text file : </p> <pre><code>Name Attribute A b1 B b2 C b3 B b4 A b5 C b7 </code></pre> <p>I want the output to be </p> <pre><code>Name Attribute A (b1,b5) B (b2,b4) C (b3...
<p>try this:</p> <pre><code>In [301]: df.groupby('Name')['Attribute'].apply(lambda x: tuple(x.tolist())).reset_index() Out[301]: Name Attribute 0 A (b1, b5) 1 B (b2, b4) 2 C (b3, b7) </code></pre>
list of attributes associated with every element of text file
python|pandas
-1
48
3
37,815,674
37,815,674
2
true
2016-06-14T14:59:50.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: list of attributes associated with every element of text file<p>I have a text file : </p> <pre><code>Name Attribute A b1 B b2 C ...
37,825,667
Display second query first - SQL Server<pre><code>ALTER PROCEDURE [dbo].[SP] AS BEGIN SELECT CMS_ORG.GUID, CM_ORG.NAME AS Name FROM CMS_ORG UNION SELECT CMS_ORG.GUID, CMS_ORG_HISTORY.NAME FROM CMS_ORG_HISTORY INNER JOIN CMS_ORG ON CMS_ORG_HISTORY.GUID = CMS_ORG.GUID UNION SELECT CMS_SHARE....
<p>Add another parameter and order by it:</p> <pre><code>ALTER PROCEDURE [dbo].[SP] AS BEGIN SET NOCOUNT ON; SELECT CMS_ORG.GUID, CM_ORG.NAME AS Name, 1 as ord FROM CMS_ORG UNION SELECT CMS_ORG.GUID, CMS_ORG_HISTORY.NAME, 2 as ord FROM CMS_ORG_HISTORY INNER JOIN CMS_ORG ON CMS_ORG_HISTORY.GUID...
Display second query first - SQL Server
sql|sql-server|stored-procedures
-1
54
1
37,825,686
37,825,686
2
true
2016-06-15T03:36:31.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display second query first - SQL Server<pre><code>ALTER PROCEDURE [dbo].[SP] AS BEGIN SELECT CMS_ORG.GUID, CM_ORG.NAME AS Name FROM CMS_ORG UNIO...
37,837,764
I'm in need of assistance with this if/else statement<p>I'm doing a contact page for my site, the text is in Portuguese because I'm Brazilian, but my problem is the following: when I send parameters with <code>?resp=true</code> it always enters in the first condition and I'm not able to figure out what is going wrong.<...
<p>All values recieved via the POST or GET methods (ie. in the REQUEST) are automatically seen as strings. So trying to check:</p> <pre><code>&lt;?php if($_GET['resp'] == true) {} ?&gt; </code></pre> <p>will return false, and thus not enter the loop. What you want is to check the string value (instead of the boolean...
I'm in need of assistance with this if/else statement
php|html
-1
64
2
37,837,927
37,837,927
2
true
2016-06-15T14:04:35.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I'm in need of assistance with this if/else statement<p>I'm doing a contact page for my site, the text is in Portuguese because I'm Brazilian, but my problem...
37,689,768
C - place integer in a char array and extract it<p>String manipulation in C is the bane of my existence, I have tried to understand how to manipulate char arrays and fall short of grasping it every time. I simply want to do this in C.</p> <pre><code>Method1 passes ["1298","9"] Method2 receives and converts them both t...
<pre><code> char *values[2]; </code></pre> <p>The above line is parsed as <code>char *(values[2]);</code>, i.e., <code>[]</code> take precedence over <code>*</code>. This means that <code>values</code> is an array with 2 elements. The type of the elements is <code>char *</code>. So, <code>values[0]</code> and <c...
C - place integer in a char array and extract it
c|arrays|string|char|scanf
-1
1,302
4
37,690,188
37,690,188
3
true
2016-06-07T21:34:37.953Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C - place integer in a char array and extract it<p>String manipulation in C is the bane of my existence, I have tried to understand how to manipulate char ar...
37,710,416
How can I provide parameter values to a Stored Proc called by a Stored Proc (SQL Server)?<p>Based on the answer <a href="https://stackoverflow.com/questions/653714/insert-results-of-a-stored-procedure-into-a-temporary-table">here</a>, I've got a start on a test SP that I plan to eventually build up to call several time...
<p>It doesn't matter whether the local parameters are the same name as the parameters of the procedure to be called or not. So there is no difference between the two ways you are asking about doing it.</p> <p>What does matter is that you should not separate the parameters with semi-colons. You should use commas.</p...
How can I provide parameter values to a Stored Proc called by a Stored Proc (SQL Server)?
sql-server|tsql|stored-procedures|query-parameters
-1
257
4
37,711,000
37,711,000
3
true
2016-06-08T18:41:37.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I provide parameter values to a Stored Proc called by a Stored Proc (SQL Server)?<p>Based on the answer <a href="https://stackoverflow.com/questions/...
37,744,512
How to use custom function in jquery chaining<p>Is it possible to make something like this:</p> <pre><code>function hideThisObject(objectName){ $(objectName).css({ "transition":"200ms", "opacity":"0" }); setTimeout(function(){ $(objectName).remove(); },250); } $('p').hideThisOb...
<p>You need to use jquery <code>$.fn.*</code> to declaring jquery custom function.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>$.fn.customFunc = function(){ $(this).css("background-color...
How to use custom function in jquery chaining
javascript|jquery
-1
29
1
37,744,862
37,744,862
3
true
2016-06-10T09:19:52.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use custom function in jquery chaining<p>Is it possible to make something like this:</p> <pre><code>function hideThisObject(objectName){ $(object...
37,761,354
How to center map around area or markers?<p>I have a map that displays "check-ins" of a user. I need to cater for the first-time display of this map in 2 scenarios:</p> <ol> <li>The user has never checked in: In this case I would like to zoom out to such a level that it display a specific "area". That area is called "...
<p><code>google.maps.LatLngBounds</code> is an object, which is designed to contain rectangular bounds. It can be created in two ways: </p> <ol> <li>By passing it's bounds as parameters into constructior: <code>var my_bounds = new google.maps.LatLngBounds({east: -34, north: 151, south: -34, west: 151});</code></li> <l...
How to center map around area or markers?
javascript|google-maps|google-maps-api-3
-1
791
2
37,763,174
37,763,174
3
true
2016-06-11T07:57:13.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to center map around area or markers?<p>I have a map that displays "check-ins" of a user. I need to cater for the first-time display of this map in 2 sce...
37,769,396
Is it possible to assign to an html form input the value of a java String?<p>Is it possible to do something like this:</p> <pre><code>&lt;form action="foo" method="get"&gt; &lt;input type="hidden" name="ID" value="&lt;% classInstance.getID(); %&gt;"&gt; &lt;/form&gt; </code></pre> <p>? Each time I try, the receivi...
<p>Try this instead :</p> <pre><code>&lt;%= classInstance.getID() %&gt; </code></pre>
Is it possible to assign to an html form input the value of a java String?
java|servlets
-1
47
1
37,769,418
37,769,418
3
true
2016-06-11T23:31:56.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to assign to an html form input the value of a java String?<p>Is it possible to do something like this:</p> <pre><code>&lt;form action="foo" ...
37,641,904
`#region ... implementation` of interfaces doesn't work<p>I tired to write Unit-Tests for a Unity3D project. There is this big issue with <em>MonoBehaviours</em>, making it quite hard. To solve that issue I used <a href="http://blogs.unity3d.com/2014/06/03/unit-testing-part-2-unit-testing-monobehaviours/" rel="nofollow...
<p>You seem to think that using <code>#region ISomething implementation</code> actually defines the interface.</p> <p>It doesn't. <a href="https://stackoverflow.com/questions/14103434/region-descriptions-compiled-into-exe-in-net"><code>#region</code>s have no effect on the code. They are just informational</a>.</p> <...
`#region ... implementation` of interfaces doesn't work
c#|unity3d|interface
-1
591
2
37,641,941
37,641,941
4
true
2016-06-05T12:27:39.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: `#region ... implementation` of interfaces doesn't work<p>I tired to write Unit-Tests for a Unity3D project. There is this big issue with <em>MonoBehaviours<...
37,760,206
Java calendar format is not printing the desired output<p>MY CODE</p> <pre><code> String strtime="15:30"; Duration="60"; DateFormat formatter = new SimpleDateFormat("hh:mm"); Date date = formatter.parse(strtime); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.HOUR...
<p>Use capital 'H' to get 24-hour format:</p> <pre><code>DateFormat formatter = new SimpleDateFormat("HH:mm"); </code></pre> <p>See the Javadoc: <a href="http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html" rel="nofollow">http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html</a...
Java calendar format is not printing the desired output
java|datetime
-1
36
2
37,760,237
37,760,237
4
true
2016-06-11T05:16:39.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java calendar format is not printing the desired output<p>MY CODE</p> <pre><code> String strtime="15:30"; Duration="60"; DateFormat formatter = n...
37,820,896
Creating a multiplying function<p>I don't understand how to make a function and then make it work which will allow me to multiply. For E.g.</p> <pre><code>def Multiply(answer): num1,num2 = int(2),int(3) answer = num1 * num2 return answer print(Multiply(answer)) </code></pre> <p>I Had a go at making one...
<p>I believe you have your parameter as your return value and you want your paramters to be inputs to your function. So try</p> <pre><code>def Multiply(num1, num2): answer = num1 * num2 return answer print(Multiply(2, 3)) </code></pre> <p>As for the second script, it looks fine to me. You can just print the ...
Creating a multiplying function
python|function|multiplication
-1
51,252
9
37,820,979
37,820,979
4
true
2016-06-14T19:50:31.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating a multiplying function<p>I don't understand how to make a function and then make it work which will allow me to multiply. For E.g.</p> <pre><code>...
37,665,051
What does [int.,int] means in Maple?<p>I have a code that works as non linear system equation solver. I have so much trouble with a command that goes like this:</p> <pre><code>newt[0]:=[-2.,20]: </code></pre> <p>I don't know what does that dot works there! I thought it may be for showing that it is <code>-2.0</code>,...
<p>After a little working with that I finally found what it does!</p> <p>short answer: it calculate the result of expression where those 2 integers are inputs.</p> <p>extended answer:(example)</p> <p>given 2 functions, we want to calculate Jacobin matrix for this equation system</p> <pre><code>with(linalg); with(pl...
What does [int.,int] means in Maple?
maple
-1
50
2
37,667,942
37,667,942
-1
true
2016-06-06T19:05:17.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does [int.,int] means in Maple?<p>I have a code that works as non linear system equation solver. I have so much trouble with a command that goes like th...
37,765,961
How do I remove the nested box in a highlighted menu item in my Android app?<p>When I click on a menu item in my Android app, I get this nested box inside the highlighted item:</p> <p><a href="https://i.stack.imgur.com/XX4gC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XX4gC.png" alt="enter image...
<p>Took a bit of time but did it myself.</p> <p><a href="https://i.stack.imgur.com/b29YR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b29YR.png" alt="enter image description here"></a></p> <p><a href="https://i.stack.imgur.com/HQ2yw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur....
How do I remove the nested box in a highlighted menu item in my Android app?
android|android-layout
-1
64
1
37,805,047
37,805,047
-1
true
2016-06-11T16:21:33.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I remove the nested box in a highlighted menu item in my Android app?<p>When I click on a menu item in my Android app, I get this nested box inside th...
37,611,822
REGEX: getting value of src="" SPECIAL CHARACTERS<p>Here's my regex code</p> <pre><code>(?i)\\s*src\\s*=\\s*(?:\"[^\"]*(?&lt;!\\.css|\\.ico)\"|'[^']*(?&lt;!\\.css|\\.ico)'|[^'\"&gt;\\s]+(?&lt;!\\.css|\\.ico)) </code></pre> <p>i want to get all the value inside of src="" then change it to what the business whats.. som...
<p>So you want to replace <code>src="../images...</code> to <code>src="images...</code>. This is how you can do that:</p> <pre><code> String str = "asdf='jkl' src=\"../images/example.jpg\" asrc='../images/as' src='../images/example.png'"; System.out.println(str.replaceAll("(\\ssrc=['\"])../(images)", "$1$2")); ...
REGEX: getting value of src="" SPECIAL CHARACTERS
java|regex
-1
47
2
37,612,358
37,612,358
0
true
2016-06-03T10:21:54.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: REGEX: getting value of src="" SPECIAL CHARACTERS<p>Here's my regex code</p> <pre><code>(?i)\\s*src\\s*=\\s*(?:\"[^\"]*(?&lt;!\\.css|\\.ico)\"|'[^']*(?&lt;!...
37,617,591
Menu DIV not getting 100% of the window<p>My site in mobile layout (<code>max-width: 767px</code>) has a collapse menu as you can see <a href="http://ahseamodapega.provisorio.ws/" rel="nofollow">here</a> </p> <p>But before was <code>100%</code> of the window and now it isn't getting full <code>width</code> anymore.</p...
<p>The .navbar-collapse element's parent has a width of zero. Set width:100%; on it's parent element (#ItensMenuFixoTop) and it should be fixed. Setting a width as percentage will be relative to the item's parent, not the window.</p>
Menu DIV not getting 100% of the window
html|css|width|navbar
-1
34
1
37,617,723
37,617,723
0
true
2016-06-03T14:55:34.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Menu DIV not getting 100% of the window<p>My site in mobile layout (<code>max-width: 767px</code>) has a collapse menu as you can see <a href="http://ahseamo...
37,625,057
Serial Communication Between Arduino and EPOS: CRC Calculation Problems<p>I am trying to interface with an EPOS2 motor controller over RS232 Serial with an Arduino Duemilanove (because it's what I had lying around). I got it to work for the most part - I can send and recieve data when I manually calculate the CRC check...
<p>Where to begin.</p> <p>First off, you are using <code>commsSize--</code> for your loop, which will go through six times when you have only three words in the <code>warray</code>. So you are doing an out-of-bounds access of <code>warray</code>, and will necessarily get a random result (or crash).</p> <p>Second, the...
Serial Communication Between Arduino and EPOS: CRC Calculation Problems
arduino|serial-port|crc
-1
1,282
1
37,627,045
37,627,045
0
true
2016-06-04T00:01:44.183Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Serial Communication Between Arduino and EPOS: CRC Calculation Problems<p>I am trying to interface with an EPOS2 motor controller over RS232 Serial with an A...
37,632,045
AndroidStudio order mixed up when using Intents to open Activities<p>In my app I have 3 activities: LoginPage RegisterActivity TeacherRegistration</p> <p>I have a button in LoginPage activity that when I press it , the RegisterActvity is open and I implement this by creating Intent and start it when the button is pres...
<p>You need to set OnClickListener of <code>continueRegister</code> the same way as you do it in the first activity. Currently you effectively start intent immediately in onCreate().<br> Kind of </p> <pre><code>public void onContinueRegisterBtnListener() { continueRegister = (Button) findViewById(R.id.btn_continu...
AndroidStudio order mixed up when using Intents to open Activities
android|android-studio|android-intent
-1
68
1
37,632,215
37,632,215
0
true
2016-06-04T15:39:04.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AndroidStudio order mixed up when using Intents to open Activities<p>In my app I have 3 activities: LoginPage RegisterActivity TeacherRegistration</p> <p>I ...
37,633,881
PHP file uploading error - UNDEFINED INDEX<p>*****What's my error in <strong>brief</strong> : ->>></p> <p>i am uploading multiple image files at a time , for that i m using POST method to post FILES to uploader.php For my testing purpose <strong>i m trying to upload only first file (i.e "allotment"). Now</strong> <s...
<p>Right here was the Error... You are dealing with a File not posted Data.</p> <pre><code> // NOT $_POST[] GLOBAL BUT RATHER $_FILES[] GLOBAL if (isset($_POST['allotment'])){ echo $_POST['allotment']['name']; . . . --- and rest of uploading code (its working fine)-- ...
PHP file uploading error - UNDEFINED INDEX
php
-1
75
1
37,634,003
37,634,003
0
true
2016-06-04T18:56:51.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP file uploading error - UNDEFINED INDEX<p>*****What's my error in <strong>brief</strong> : ->>></p> <p>i am uploading multiple image files at a time , f...
37,647,938
Can't find my wordpress site when using www<p>If I do <code>example.com</code> my site is there, but when adding <code>www.</code> or <code>http://www.</code> I get the error message: server DNS address could not be found.</p> <p>I'm pointing my domain to EC2 on Amazon Web Services.</p> <p>What am I missing?</p>
<p>You have to add a CNAME record for the www subdomain pointing at your EC2 Ip and also I recommend you to make a permanent redirect on your virtual host config file of your web server (apache for example) to redirect <a href="http://myexample.com" rel="nofollow">http://myexample.com</a> to <a href="http://www.myexamp...
Can't find my wordpress site when using www
wordpress|amazon-web-services|amazon-ec2
-1
34
2
37,648,000
37,648,000
0
true
2016-06-05T23:56:19.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't find my wordpress site when using www<p>If I do <code>example.com</code> my site is there, but when adding <code>www.</code> or <code>http://www.</code...
37,672,498
ibm mobile first development server .. run as options missing sometimes.. unable to start application<p>Build and deploy settings are missing from ibm mobile first development server hybrid project. After clicking on Run as(as in attachment) even from a newly created project..not finding any options. Unable to start ap...
<p>Something is wrong with your installation. </p> <p>Try again in a new Eclipse workspace.<br> If it fails as well, re-install the Studio plug-in in a fresh Eclipse instance.</p>
ibm mobile first development server .. run as options missing sometimes.. unable to start application
ibm-mobilefirst
-1
36
1
37,673,981
37,673,981
0
true
2016-06-07T06:58:40.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ibm mobile first development server .. run as options missing sometimes.. unable to start application<p>Build and deploy settings are missing from ibm mobile...
37,674,463
php restfull Url for API<p>I’m creating API , I should get the response in the JSON format. I would like to know the best practices and the API should be created. I have Googled for many REST API tutorials. They were good and I have acquired some knowledge on it, But I want to get a sample model of the code so that I ...
<p>You can see some useful resources here :</p> <ul> <li><p><a href="http://www.lornajane.net/posts/2012/building-a-restful-php-server-routing-the-request" rel="nofollow">Building A RESTful PHP Server: Routing the Request</a></p></li> <li><p><a href="https://docs.phalconphp.com/en/latest/reference/tutorial-rest.html" ...
php restfull Url for API
php|api|rest
-1
79
1
37,674,598
37,674,598
0
true
2016-06-07T08:39:26.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: php restfull Url for API<p>I’m creating API , I should get the response in the JSON format. I would like to know the best practices and the API should be cr...
37,694,441
Building webpages that are indexed for mutiple items and such<p>I'm moreless curious about webpages that are indexed. An example is gamestop. When you are looking through their product lists they have indexed for multiple tabs like 123456 on the near the bottom of the page. I also notice this with many search engines a...
<p>Actually the INDEXING you are referring is called <code>Pagination</code>. Whenever you have multiple items/Records and you want to show only some of them in one page and rest on the other. e.g. you have 100 records in the database and you want to show all of them but loading all at once will slow down your page. So...
Building webpages that are indexed for mutiple items and such
php|web|web-applications|dynamic-programming
-1
23
1
37,694,711
37,694,711
0
true
2016-06-08T06:05:45.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Building webpages that are indexed for mutiple items and such<p>I'm moreless curious about webpages that are indexed. An example is gamestop. When you are lo...
37,720,801
Custom sorting for an array of strings<p>I have a text file with several lines</p> <pre><code>abc 122 aaaaaaa cba 165 aaaaaaaa aaa 123 aaaaaaaaa bvc 443 aaaaaaaaaa rdc 993 aaaaaaaaaaa qwe 103 aaaaaaaaaaaa </code></pre> <p>Each line contains a decimal number. Can I sort this lines using decimal number as a marker for ...
<p>Try this.</p> <p>Store the grouping elements in a temporary variable and perform sort from that variable.</p> <pre><code>use warnings; use strict; my @ar = &lt;DATA&gt;; my $m; my $n; foreach (sort{ ($m)=$a=~/(\d+)/; ($n)=$b=~/(\d+)/; $m &lt;=&gt;$n } @ar) { print "$_"; } __DATA__ abc 122 aaaaaaa cba 165 aa...
Custom sorting for an array of strings
perl|sorting
-1
73
4
37,720,954
37,720,954
0
true
2016-06-09T08:35:51.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Custom sorting for an array of strings<p>I have a text file with several lines</p> <pre><code>abc 122 aaaaaaa cba 165 aaaaaaaa aaa 123 aaaaaaaaa bvc 443 aaa...
37,740,918
How do I parse a number from a div string?<p>I'm trying to scrape a site and grab the number in the 'data-itemId' field below (1234567):</p> <pre class="lang-html prettyprint-override"><code>&lt;div class=&quot;submission&quot; data-itemId=&quot;1234567&quot; data-membershipId=&quot;00000&quot; data-page=&quot;0&quot;&...
<p>You could do it this way:</p> <pre><code>for Submission in soup.find_all('div', 'submission'): print Submission['data-itemid'] </code></pre> <p>And you confused me with your last line:</p> <blockquote> <p>I'm trying to get all numbers from 'data-membershipId' into an array</p> </blockquote> <p>So do you wa...
How do I parse a number from a div string?
python-2.7|beautifulsoup
-1
46
1
37,742,076
37,742,076
0
true
2016-06-10T06:02:28.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I parse a number from a div string?<p>I'm trying to scrape a site and grab the number in the 'data-itemId' field below (1234567):</p> <pre class="lang...
37,742,562
Function for URL doesn't return correct value<p>I'm using 2 functions in my webshop to Auto set the <code>href</code> in my anchor tag</p> <p>This is what they look like before the script :</p> <pre><code>&lt;a class="Motifyer" data-query="Brand" data-value="@brand.Item1" href="#"&gt; &lt;a class="Motifyer" data-quer...
<p>The code looks fine to me, this might work as a "quick" solution for your.</p> <p>Insert this line: <code>url = url.replace("?" + query + "=" + value + "&amp;", "?");</code></p> <pre><code>if (url.indexOf(query) &gt; -1) { if (getParameterByName(query) == value) { ----&gt; Insert Right here &lt;---- ...
Function for URL doesn't return correct value
jquery
-1
29
1
37,742,613
37,742,613
0
true
2016-06-10T07:38:24.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Function for URL doesn't return correct value<p>I'm using 2 functions in my webshop to Auto set the <code>href</code> in my anchor tag</p> <p>This is what t...
37,746,094
New Permission System (Integration of Location)<p>This is my first question here. I study computer science and am trying to improve my skills in android development. Therefore I wanted to make a simple weather app. I am not used to the new permission system of android 6.0, so I need your help. </p> <p>I always have th...
<p>you need to handle <code>Permissions Result</code></p> <pre><code>@Override public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) { switch (requestCode) { case MY_PERMISSIONS_REQUEST_LOCATION: { // for your case 10 // If request is cancelled, the result ar...
New Permission System (Integration of Location)
android|android-studio|location|weather-api
-1
69
1
37,747,251
37,747,251
0
true
2016-06-10T10:37:14.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: New Permission System (Integration of Location)<p>This is my first question here. I study computer science and am trying to improve my skills in android deve...
37,753,863
Not able to understand where white spaces are or indentation is missing in Python code : Line 6: SyntaxError: bad input (' ')<pre><code>def name_to_number(name): if name=='rock' number=0 elif name=='Spock' number=1 elif name=='paper' number=2 elif name=='lizard' number=3...
<p>Try this:</p> <pre><code>def name_to_number(name): if name=='rock': number=0 elif name=='Spock': number=1 elif name=='paper': number=2 elif name=='lizard': number=3 elif name=='scissors': number=4 else: print 'Not a valid input' return ...
Not able to understand where white spaces are or indentation is missing in Python code : Line 6: SyntaxError: bad input (' ')
python
-1
62
2
37,753,919
37,753,919
0
true
2016-06-10T17:16:36.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not able to understand where white spaces are or indentation is missing in Python code : Line 6: SyntaxError: bad input (' ')<pre><code>def name_to_number(na...
37,764,972
python selenium getting all text in ul class<p>How can I get selenium to locate and click on each of these links in python, and copy the texts that pops up from it?</p> <p>I'm looking to not do it via xpath because i'm still very new to it, but it you could give me some pointers how I can do it by the usual CSS Select...
<p>Oh, I solved it.. </p> <pre><code>element = driver.find_element_by_id("keyDev-A") element.click() element2 = driver.find_element_by_class_name("content") print(element2.text) </code></pre> <p>All I have to do now is to iterate <code>keyDev</code> from <code>A</code> to <code>F</code> :)</p>
python selenium getting all text in ul class
python|selenium
-1
549
1
37,765,070
37,765,070
0
true
2016-06-11T14:40:21.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python selenium getting all text in ul class<p>How can I get selenium to locate and click on each of these links in python, and copy the texts that pops up f...
37,779,702
How to remove offers4u(Adware) completely from Google chrome on windows 8.1?<p>When I visit the websites,this adware is showing too many ads, &amp; it covers all the webpage.I tried to uninstall it, and block it by chrome extensions but it doesn't work. I tried different software to remove it, even I uninstalled chrome...
<p>I'm not sure this will be applicable, as I had to fight different "brand" of adware, but I suppose it's usually all the same around.</p> <p>First of all I highly recommend doing a complete scan with <a href="https://www.malwarebytes.org/antimalware/" rel="nofollow">Malwarebytes Antimalware</a>, as it mostly does re...
How to remove offers4u(Adware) completely from Google chrome on windows 8.1?
google-chrome|ads|malware-detection|trojan
-1
587
2
37,779,793
37,779,793
0
true
2016-06-12T22:30:08.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove offers4u(Adware) completely from Google chrome on windows 8.1?<p>When I visit the websites,this adware is showing too many ads, &amp; it covers...
37,782,735
css method doesn't work with variable<pre><code>var slidemenu_width = $('.inverse').css('width'); $('#slide-nav .navbar-toggle').css({'left':slidemenu_width + 'px'}); </code></pre> <p>what's wrong with this code? I don't see the css been applied to my selector.</p>
<p>Try this example:</p> <pre><code>&lt;div class="inverse" style="width:25px;"&gt;&lt;/div&gt; &lt;div class="navbar-toggle"&gt;&lt;/div&gt; var slidemenu_width = $('.inverse').css('width'); $('.navbar-toggle').css('left',slidemenu_width); // add css like this </code></pre>
css method doesn't work with variable
javascript|jquery
-1
28
2
37,782,773
37,782,773
0
true
2016-06-13T06:02:44.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: css method doesn't work with variable<pre><code>var slidemenu_width = $('.inverse').css('width'); $('#slide-nav .navbar-toggle').css({'left':slidemenu_width ...
37,784,728
Openpyxl with python2.7<p>I wanted to open excel file on python with using this code.</p> <pre><code>import openpyxl wb= openpyxl.load_workbook('testfile.xlsx') </code></pre> <p>Error:No such file or directory: 'testfile.xlsx'</p> <p>Where should I locate this file?</p> <p>I am using Python2.7 on Spyder</p>
<p>Make sure that there is that file in the folder... Try this command to list the files in that folder just to make sure that python atleast recognizes or reads the files.</p> <pre><code>import os print (os.listdir('your path')) </code></pre> <p>Try giving an absolute path. I mean give a leading slash which means an...
Openpyxl with python2.7
python|python-2.7|openpyxl
-1
302
1
37,784,771
37,784,771
0
true
2016-06-13T08:13:52.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Openpyxl with python2.7<p>I wanted to open excel file on python with using this code.</p> <pre><code>import openpyxl wb= openpyxl.load_workbook('testfile.xl...
37,771,663
How to parse(append) value to existing xml file in oracle?<p>How to parse(append) value to existing xml file in oracle??? (I have standard fields in my xml file, i want to change that field value dynamically from oracle database).</p> <p>Thank you.</p>
<p>SELECT UpdateXML(XMLTYPE('<b>d</b>'), '/a/b/text()', 'c') FROM dual;</p>
How to parse(append) value to existing xml file in oracle?
xml-parsing|plsqldeveloper
-1
41
1
37,787,468
37,787,468
0
true
2016-06-12T07:10:24.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to parse(append) value to existing xml file in oracle?<p>How to parse(append) value to existing xml file in oracle??? (I have standard fields in my xml f...
37,789,937
Find top N highest values with column names in R<p>Here is the <a href="https://www.dropbox.com/s/ckagulynefkoni5/sample.csv?dl=0" rel="nofollow">sample</a> of the data I'm using in the analysis. What I need to do is to extract top 3 values for each of the rows, with column names. For example, this would be an output f...
<p>We can use <code>apply</code></p> <pre><code>res &lt;- cbind(df1[1], t(apply(df1[-1], 1, function(x) { i1 &lt;- order(-x) c(rbind(names(df1)[-1][i1][1:3], x[i1][1:3]))} ))) </code></pre> <p>Then, we can do the type conversion </p> <pre><code>res[] &lt;- lapply(res, function(x) {x1 &lt;-...
Find top N highest values with column names in R
r
-1
287
2
37,789,987
37,789,987
0
true
2016-06-13T12:31:13.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find top N highest values with column names in R<p>Here is the <a href="https://www.dropbox.com/s/ckagulynefkoni5/sample.csv?dl=0" rel="nofollow">sample</a> ...
37,791,573
htaccess redirects incorrectly<p>hope you can help me, when i tried to access www.boxer-motors.com "articulos"/"entrevista" and then click in "seguir leyendo", should redirect to the full entrevista article, but insted redirects me to "articulos"/"editorial". Thanks in advance</p> <pre><code>RewriteEngine On RewriteR...
<p>The problem seems not to be in your <code>.htaccess</code> file:</p> <p>calling this url: <a href="http://boxer-motors.com/articulos/entrevistas/glauco-rivera/" rel="nofollow">http://boxer-motors.com/articulos/entrevistas/glauco-rivera/</a></p> <p>will internally call: <a href="http://boxer-motors.com/articulo_det...
htaccess redirects incorrectly
.htaccess|redirect
-1
27
1
37,791,814
37,791,814
0
true
2016-06-13T13:53:11.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: htaccess redirects incorrectly<p>hope you can help me, when i tried to access www.boxer-motors.com "articulos"/"entrevista" and then click in "seguir leyendo...
37,790,903
Wordpress SEO for google search reasult<p>I am using wordpress yoast seo plugin and trying to create similar like this google serach result, what should i do for this</p> <p><a href="http://www.awesomescreenshot.com/image/1322528/5746372fa3932e7e9f86203072707b96" rel="nofollow">http://www.awesomescreenshot.com/image/...
<p>Log into Google Webmaster Tools</p> <blockquote> <p><a href="https://www.google.com/webmasters/tools/" rel="nofollow">https://www.google.com/webmasters/tools/</a></p> </blockquote> <p>Search Appearance > Sitelinks</p> <blockquote> <p><a href="https://support.google.com/webmasters/answer/47334" rel="nofollow">...
Wordpress SEO for google search reasult
wordpress|seo
-1
60
2
37,794,269
37,794,269
0
true
2016-06-13T13:19:09.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Wordpress SEO for google search reasult<p>I am using wordpress yoast seo plugin and trying to create similar like this google serach result, what should i d...
37,818,941
Javascript onSubmit basic form validation<p>Hi I am just curious why the onsubmit function won't respond if the validation function is enclosed inside: (function(){ })();</p> <pre><code>&lt;form id="testform" name="entform" onsubmit="return promptChar()" method="post"&gt; &lt;input id="input-text" name="entchar" type...
<p>Inline event listeners expects handler function to be under <code>global-scope</code> but in your script, handler is in the local scope of <code>IIFE</code></p> <p><a href="https://en.wikipedia.org/wiki/Immediately-invoked_function_expression" rel="nofollow noreferrer"><strong><code>(function(){})();</code></strong>...
Javascript onSubmit basic form validation
javascript
-1
61
1
37,819,030
37,819,030
0
true
2016-06-14T17:53:08.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript onSubmit basic form validation<p>Hi I am just curious why the onsubmit function won't respond if the validation function is enclosed inside: (func...
37,829,904
How c# asp.net read by separate between xml and string in xml node?<p>I got result from some system and don't know how to read by separate btw xml and string as below example.</p> <pre><code>&lt;result&gt; &lt;xmldataHeader&gt; &lt;HeaderId&gt;1&lt;/HeaderId&gt; &lt;xmldataDetail&gt; &l...
<p>If your XML structure remains almost static as given in this question, you will be able to access the "success" text with <code>doc.SelectSingleNode("result").LastChild.OuterXml);</code>Please find the sample code below.</p> <pre><code>XmlDocument doc = new XmlDocument(); doc.LoadXml($@" ...
How c# asp.net read by separate between xml and string in xml node?
c#|asp.net|xml
-1
45
2
37,831,063
37,831,063
0
true
2016-06-15T08:23:28.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How c# asp.net read by separate between xml and string in xml node?<p>I got result from some system and don't know how to read by separate btw xml and string...
37,834,785
Twitter or Facebook Like Live Status Updates On User Interface<p>Hi fellow programmers,</p> <p>I am using Twitter Streaming API to search for tweets containing specific keywords. My requirement is to build a user interface which will show the tweets to the user of my system just like Twitter i.e. in real time. As soon...
<p>Hi you will want to use <a href="http://www.asp.net/signalr" rel="nofollow">SignalR</a>. It is an .NET library that give you the ability to push from the server. It uses WebSocket for compatible browsers and fallback to polling for old browsers.</p> <p>You will simply have to create a hub and then call <code>Client...
Twitter or Facebook Like Live Status Updates On User Interface
user-interface|twitter|live-streaming|tweets
-1
39
1
37,836,241
37,836,241
0
true
2016-06-15T11:55:59.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Twitter or Facebook Like Live Status Updates On User Interface<p>Hi fellow programmers,</p> <p>I am using Twitter Streaming API to search for tweets contain...
37,838,792
What's wrong in this recursive algorithm?<p>Problem statement:</p> <p>An N-element permutation is an N-element sequence of distinct numbers from the set {1, 2, ...,n}. For example the sequence 2,1,4,5,3 is a 5-element permutation. P is an N-element permutation. Your task is to sort P in ascending order. But because it...
<p>One problem is that you are computing the cost based on pos[n[a]]. </p> <p>pos[n[a]] returns the position in the original array, but the cost should be based on the position in the current array P (i.e. with some elements moved to Q).</p> <p>For example, if P is originally {4,1,2} then the position of the 2 is x=...
What's wrong in this recursive algorithm?
c++|algorithm|sorting|dynamic-programming|memoization
-1
67
1
37,839,862
37,839,862
0
true
2016-06-15T14:49:30.177Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What's wrong in this recursive algorithm?<p>Problem statement:</p> <p>An N-element permutation is an N-element sequence of distinct numbers from the set {1,...
37,618,619
How to create a preview within a browser (browser within a browser with predefined contents)<p>I am wondering how I would go about creating a 'preview' of a page within a browser. That acts as a browser itself. I might not be explaining it very well. I mean something like what is done on www.bootstrapbay.com when you c...
<p>On www.bootstrapbay.com , they are using a <strong>canvas</strong> designed to look like a browser ... If you want a webpage preview within a webpage, this can be done using an <strong>Iframe</strong> .</p> <p><strong>Example.</strong></p> <pre><code>&lt;iframe src="http://www.bootstrapbay.com"&gt; &lt;p&gt;Your...
How to create a preview within a browser (browser within a browser with predefined contents)
javascript|html|css
-1
34
2
37,618,879
37,618,879
1
true
2016-06-03T15:47:11.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a preview within a browser (browser within a browser with predefined contents)<p>I am wondering how I would go about creating a 'preview' of a ...
37,627,887
Swift: How do you set up a function with no parameters to return a random array of numbers?<p>I'm trying to return at least 10 random numbers but i am only able to return 1 random number. My code is:</p> <pre><code>func randNumbers () -&gt; [Int]{ var numbers: [Int] = [] numbers.append(Int(arc4random_uniform(50) + 1))...
<p>You need to append at least 10 numbers into the array, so you can use a loop for this.</p> <pre><code>func randNumbers () -&gt; [Int]{ var numbers: [Int] = [] for _ in 1...10 { numbers.append(Int(arc4random_uniform(50) + 1)) } return numbers } </code></pre>
Swift: How do you set up a function with no parameters to return a random array of numbers?
swift
-1
58
2
37,627,938
37,627,938
1
true
2016-06-04T08:01:16.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Swift: How do you set up a function with no parameters to return a random array of numbers?<p>I'm trying to return at least 10 random numbers but i am only a...
37,635,711
transparent border-top around .panel driving me crazy. Can't find the cause<p>I am making a template for my website and I have a mysterious transparent line on top of one of the panels. Though i suspect it will be on them all just that the way the parallax works is preventing it from looking bad. </p> <p><a href="http...
<p>It happen because inside your 'SKILLS' container there is only either empty or floating element. You are using bootstrap so a clearfix should do the trick at the level of col-lg-12 bg-2:</p> <pre><code>&lt;div class="col-lg-12 bg-2 clearfix"&gt; &lt;h2 class="profile-header"&gt;SKILLS&lt;/h2&gt; &lt;p class...
transparent border-top around .panel driving me crazy. Can't find the cause
css|twitter-bootstrap
-1
28
1
37,636,233
37,636,233
1
true
2016-06-04T22:37:20.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: transparent border-top around .panel driving me crazy. Can't find the cause<p>I am making a template for my website and I have a mysterious transparent line ...
37,642,802
Vlookup or Hlookup or something else?<p>On a single table of musicians and instruments, musicians will be playing multiple instruments and multiple musicians may play each instrument. </p> <p>Ultimately, I want to collect two lists: Who is playing each instrument and What each person is playing?</p> <p>How can I do t...
<p>You can do this with two filter formulas: </p> <p>For the first chart marking who is on each instrument:</p> <pre><code>=TRANSPOSE(FILTER(A6:A10,B6:B10="x")) </code></pre> <p>if you want to make this one more dynamic by just pointing to the instrument name you modify it to this:</p> <pre><code>=transpose(filter(...
Vlookup or Hlookup or something else?
google-sheets|gs-vlookup
-1
75
1
37,651,279
37,651,279
1
true
2016-06-05T14:04:21.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Vlookup or Hlookup or something else?<p>On a single table of musicians and instruments, musicians will be playing multiple instruments and multiple musicians...
37,706,032
search a text file for some text if exists change text inside ""<p>ok i was wondring what is the best way to attempt to read a whole text file for some text if it finds the text it changes the text inside the "" i know this can be done but i never really looked into this or had to do this before and im not sure how to ...
<p>Your question is quite vague but if I understand what you're looking for - you want to replace all instances of some text (in a text file) with a different value. Because you were talking about regex, here is a short example to get you started for doing this using regex:</p> <pre><code>const string FILENAME = &lt;p...
search a text file for some text if exists change text inside ""
c#-4.0
-1
28
1
37,707,097
37,707,097
1
true
2016-06-08T14:54:08.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: search a text file for some text if exists change text inside ""<p>ok i was wondring what is the best way to attempt to read a whole text file for some text ...
37,721,570
Why wont my footer center?<p>basically i want the footer to be 40em wide and be centered at the bottom of the page, the nav does it but for some reason the footer stays at the left margin. </p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true"> <div class="snippet-code"> <pre class="snippet-...
<p><div class="snippet" data-lang="js" data-hide="true" data-console="true"> <div class="snippet-code snippet-currently-hidden"> <pre class="snippet-code-css lang-css prettyprint-override"><code>/* RESET */ html, body, div, span, h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, img, fieldset, form, label, legend, ta...
Why wont my footer center?
html|css
-1
28
1
37,721,655
37,721,655
1
true
2016-06-09T09:11:17.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why wont my footer center?<p>basically i want the footer to be 40em wide and be centered at the bottom of the page, the nav does it but for some reason the f...
37,720,391
Select Range of DocProperty<p>I have endless Word-Documents, all with the same DocProperty somewhere in it. Now I have to modify the font style of this specific DocProperty (e.g. make it bold), any other DocProperty has to been skipped.</p> <p>How do I select this DocProperty with VBA?</p> <p>I looked into the <code>...
<p>You were on the right track. In short you want: -</p> <ul> <li>To look in <code>Field.Type</code> for a value of 85 (WdFieldDocProperty) </li> <li>Then check the <code>Field.Code</code> for the property name/label</li> </ul> <p>A sample of checking a document for it is below with comments to explain what is happen...
Select Range of DocProperty
vba|ms-word
-1
290
1
37,725,558
37,725,558
1
true
2016-06-09T08:15:55.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select Range of DocProperty<p>I have endless Word-Documents, all with the same DocProperty somewhere in it. Now I have to modify the font style of this speci...
37,792,254
Activate Cron job from a PHP page<p>I googled but didn't found any solution</p> <pre><code>I have a PHP page that takes 45 minutes to execute. </code></pre> <p>What I am trying to achieve is: 1. Whenever I run a URL abc.com/test.php the script should check the cron job and activate it (run myscript.php) . 2. And shou...
<p>Why set a new cronjob, if you only want to execute it once?</p> <pre><code>exec('php -f /path/to/script &gt;&gt; /dev/null 2&gt;&amp;1 &amp;'); </code></pre> <p>This will run the script. Echo all the output into the nowhere and use fork, so it will run in the background and your Request won't wait for a return.</p...
Activate Cron job from a PHP page
php|cron
-1
51
1
37,792,762
37,792,762
1
true
2016-06-13T14:24:14.697Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Activate Cron job from a PHP page<p>I googled but didn't found any solution</p> <pre><code>I have a PHP page that takes 45 minutes to execute. </code></pre>...
37,794,185
What is the hreflang-equivelant way of targeting different regions?<p>One of my projects is going through a global expansion and we have multiple top-level domains with local TLDs for the different countries (I've seen <a href="https://webmasters.stackexchange.com/questions/403/how-should-i-structure-my-urls-for-both-s...
<p>You don't need a way that's equivalent to hreflang -- you need hreflang :)</p> <p>Hreflang was designed to signal not just the correlation between pages that have different languages but also scenarios like yours where you have the same language but targeting different geos. </p> <p>So go ahead and use en-GB, en-B...
What is the hreflang-equivelant way of targeting different regions?
seo|hreflang
-1
50
1
37,795,781
37,795,781
1
true
2016-06-13T15:53:10.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the hreflang-equivelant way of targeting different regions?<p>One of my projects is going through a global expansion and we have multiple top-level d...
37,817,325
Python: Making a list that includes functions but has as-yet undefined arguments<p>Generally, what I would like to do is make a list that involves some function or functions, but the argument of that function will change based on an "i" of a for loop, and so the argument is not fully defined when I define the list. Im...
<p>I suspect that for your 2d array there are better ways of defining the diagonal than iterating through the rows and calculating a function like this. But to focus on the issue of 'delaying' the evaluation of a function I'll try this:</p> <p>Define a simple function</p> <pre><code>In [438]: def func(x): .....: ...
Python: Making a list that includes functions but has as-yet undefined arguments
python|arrays|function|numpy
-1
80
2
37,818,345
37,818,345
1
true
2016-06-14T16:19:31.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python: Making a list that includes functions but has as-yet undefined arguments<p>Generally, what I would like to do is make a list that involves some funct...
37,623,720
How to change the navbar position? CSS & HTML<p>I hope I can explain all what I need of you guys here :)</p> <p>I want to get some like this: <a href="http://i.imgur.com/OzyQlHC.png" rel="nofollow">http://i.imgur.com/OzyQlHC.png</a></p> <p>But on my code, I tried a few things, but I can't get that end :S I don't know...
<p>You don't have to use any tricks.</p> <p>Just put your code in <code>div</code> with class of <code>container</code>. Set top and bottom margin to <code>body</code> and that is it.</p> <p>HTML:</p> <pre><code>&lt;div class="container"&gt; &lt;nav class="navbar navbar-default"&gt; &lt;div class="container-fl...
How to change the navbar position? CSS & HTML
html|css|twitter-bootstrap|navbar
-1
19,462
1
37,624,019
37,624,019
2
true
2016-06-03T21:28:56.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change the navbar position? CSS & HTML<p>I hope I can explain all what I need of you guys here :)</p> <p>I want to get some like this: <a href="http:...
37,658,675
Put inline element on horizontal form<p>I created a form with form-horizontal bootstrap class.</p> <p>I need to insert a text next to an input field.</p> <p>Here the example, "next text" needs to be next to the input text field.</p> <pre><code>&lt;div class="row" style="margin-left: 0; margin-right: 0;"&gt; &lt;fo...
<p>You can use an <a href="http://getbootstrap.com/components/#input-groups" rel="nofollow">input group</a> with an <code>.input-group-addon</code> to do this.</p> <pre><code>&lt;div class="col-xs-9"&gt; &lt;div class="input-group"&gt; &lt;input id="data" type="text" class="form-control" /&gt; &lt;div clas...
Put inline element on horizontal form
twitter-bootstrap
-1
28
1
37,658,969
37,658,969
2
true
2016-06-06T13:23:51.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Put inline element on horizontal form<p>I created a form with form-horizontal bootstrap class.</p> <p>I need to insert a text next to an input field.</p> <...
37,662,992
django submit answer per user<p>I have a text:</p> <pre><code>class QuestionText(models.Model): text = models.TextField() def __str__(self): return "{0}".format(self.text) </code></pre> <p>and a Answer:</p> <pre><code>class ElementShortAnswer(models.Model): question = models.ForeignKey(QuestionT...
<p>You need to add a User foreign key to <code>ElementShortAnswer</code> model and change the question field in ElementShortAnswer model to OneToOne, because every question should be answered once per user.</p> <pre><code> from django.contrib.auth.models import User </code></pre> <p>and include this line in your Elem...
django submit answer per user
django|models
-1
47
1
37,664,690
37,664,690
2
true
2016-06-06T16:58:07.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: django submit answer per user<p>I have a text:</p> <pre><code>class QuestionText(models.Model): text = models.TextField() def __str__(self): ...
37,771,118
Display columns into row SQL<p>So I encountered a table where it has a design like so:</p> <pre><code>t_Schedule t_Prof ---------- ---------- Date ID ProfID Name ProfID1 </code></pre> <p>What I want to achieve is something like:</p> <pre><code>Date | Name -----...
<p>Try following query:</p> <pre><code>SELECT s.[Date], x.Name FROM dbo.t_Schedule s INNER/*LEFT OUTER when column ProfID allows NULLs*/ JOIN dbo.t_Prof p ON s.ProfID = p.ID LEFT OUTER JOIN dbo.t_Prof p1 ON s.ProfID1 = p1.ID CROSS APPLY ( SELECT p.Name WHERE p.Name IS NOT NULL UNION ALL SELECT p1.Name...
Display columns into row SQL
sql-server|tsql
-1
36
2
37,771,261
37,771,261
2
true
2016-06-12T05:48:21.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display columns into row SQL<p>So I encountered a table where it has a design like so:</p> <pre><code>t_Schedule t_Prof ---------- -------...
37,784,594
Convert base64 PDF to base64 image, without saving it to any file<p>I do not know if it's a valid question to ask here but I'm tired of finding the solutions/libraries, so I had to ask for help from you guys.</p> <p>Basically I'm generating a PDF using <a href="http://www.tcpdf.org/" rel="nofollow noreferrer">TCPDF</a>...
<p>You can use imagemagick to do that.</p> <pre><code>$imagick = new Imagick(); $imagick-&gt;readImageBlob($pdfBlob); $imagick-&gt;setImageFormat(&quot;jpeg&quot;); $imageBlob = $imagick-&gt;getImageBlob(); </code></pre> <p>see <a href="http://php.net/manual/book.imagick.php" rel="nofollow noreferrer">http://php.net/ma...
Convert base64 PDF to base64 image, without saving it to any file
php|base64|tcpdf
-1
5,934
1
37,785,192
37,785,192
2
true
2016-06-13T08:06:07.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert base64 PDF to base64 image, without saving it to any file<p>I do not know if it's a valid question to ask here but I'm tired of finding the solutions...
37,845,523
Instantiating a class in python and error points at variable name<p>I am following a youtube tutorial on creating a neural network. I came across this error while attempting to instantiate my class to check that everything was working </p> <pre><code> File "neuralnet.py", line 24 n = Neural_Network(X) ^ SyntaxE...
<p>This line</p> <pre><code> return 1/(1+np.exp(-z) </code></pre> <p>Is missing a close parenthesis. Try this:</p> <pre><code> return 1/(1+np.exp(-z)) </code></pre> <p>Often times, otherwise unexplainable "syntax error" messages are the result of errors in the <em>previous</em> line(s).</p>
Instantiating a class in python and error points at variable name
python|oop
-1
65
2
37,845,557
37,845,557
2
true
2016-06-15T20:50:29.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Instantiating a class in python and error points at variable name<p>I am following a youtube tutorial on creating a neural network. I came across this error ...
37,653,953
Nullpointer in Volley<p>i´m getting a NullPointerException when i do the connection to my API using Volley, this is the method i'm using:</p> <pre><code> List&lt;Empresas&gt; empresas = rellenar(); private List&lt;Empresas&gt; rellenar() { final List&lt;Empresas&gt; empresas2 = null; JsonObjectRequest js...
<p><code>final List&lt;Empresas&gt; empresas2 = null;</code> is NULL assign in your code.</p> <p>Replace with:</p> <pre><code>List&lt;Empresas&gt; empresas2 = new ArrayList&lt;Empresas&gt;(); </code></pre>
Nullpointer in Volley
java|android|android-volley
-1
38
1
37,653,988
37,653,988
3
true
2016-06-06T09:32:11.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Nullpointer in Volley<p>i´m getting a NullPointerException when i do the connection to my API using Volley, this is the method i'm using:</p> <pre><code> Li...
37,816,000
How to query not available value in the column?<p>I've a table as follows:</p> <p><a href="https://i.stack.imgur.com/JgmGi.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JgmGi.jpg" alt="enter image description here"></a></p> <p>From this, I'm trying to get the user_id's where status IS NOT <strong...
<p>You are going to need to do a subquery for this. For example:</p> <pre><code> Select user_id from table Where user_id not in (select user_id from table where status = 4 and user_id is not null); </code></pre> <p>This allows you to exclude all user_id's that are in a status of 4.</p>
How to query not available value in the column?
mysql|sql|resultset
-1
65
2
37,816,057
37,816,057
4
true
2016-06-14T15:16:04.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to query not available value in the column?<p>I've a table as follows:</p> <p><a href="https://i.stack.imgur.com/JgmGi.jpg" rel="nofollow noreferrer"><i...
37,842,844
State where the resulting state is the argument provided and the value is unit<p>Exercise <code>23.8.2</code> in the haskell book asks me to construct a state like the following:</p> <pre><code>put' :: s -&gt; State s () put' s = undefined -- should act like: -- Prelude&gt; runState (put "blah") "woot" -- ((),"blah") ...
<pre><code>put' s = state $ \s -&gt; ((), s) ^ ^ </code></pre> <p>You reused the variable <code>s</code> for two different bindings. Try using a different name, and the solution will be obvious ;-)</p> <p>By the way, you should enable warnings using the <code>-Wall</code> flag in GHC / GHCi. This woul...
State where the resulting state is the argument provided and the value is unit
haskell|state-monad
-1
59
1
37,842,921
37,842,921
4
true
2016-06-15T18:13:49.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: State where the resulting state is the argument provided and the value is unit<p>Exercise <code>23.8.2</code> in the haskell book asks me to construct a stat...
37,842,224
MarkLogic knowledge base<p>I am supposed to do a proof of concept for my company using MarkLogic to turn flat files as well as data sources from the web to create an ODS (operational data store).</p> <p>I do not have any web development experience so my company has suggested I learn javascript, node, and angular.</p> ...
<p>There are several projects that allow you to stand up a fully functioning basic search app on top of MarkLogic in mere minutes, for instance these two:</p> <ul> <li><a href="https://github.com/marklogic/slush-marklogic-node" rel="nofollow">slush-marklogic-node</a>, with a NodeJS middle-tier</li> <li><a href="https:...
MarkLogic knowledge base
javascript|database|web|marklogic
-1
43
1
37,844,206
37,844,206
4
true
2016-06-15T17:41:19.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MarkLogic knowledge base<p>I am supposed to do a proof of concept for my company using MarkLogic to turn flat files as well as data sources from the web to c...
37,625,569
How can I create something in java to resize and position images based on aspect ratios?<p>I would like to write a program to take a displayed image, and have a transparent rectangle on top of the image at a fixed aspect ratio. I want to have this rectangle be able to be moved and resized to visually select a portion o...
<p>Use an <a href="https://stackoverflow.com/questions/8150276/what-java-library-should-i-use-for-image-cropping-letterboxing">image cropping library</a>.</p> <p>Alternatively, if you're trying to do-it-yourself:</p> <ul> <li>Create a <code>java.awt.Canvas</code></li> <li>Draw your image on the canvas</li> <li>Create...
How can I create something in java to resize and position images based on aspect ratios?
java|image
-1
72
1
37,625,823
37,625,823
-1
true
2016-06-04T01:45:15.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I create something in java to resize and position images based on aspect ratios?<p>I would like to write a program to take a displayed image, and hav...
37,674,659
how to add passes that get dynamic info from my app to wallet from in swift?<p>I created the my own .pkpass file with dummy data</p> <p>I need to change the data in the pass according to the data in the app</p> <p>like boarding pass</p> <p>if I missed something , could please help me ?</p>
<p>You will require a new .pkpass bundle for every change to the pass.</p> <p>A new bundle will need to be signed. For security reasons, this should not take place on the device as it risks compromising your Pass Type ID certificate.</p> <p>When you want to change the data, you should request a new pass bundle from y...
how to add passes that get dynamic info from my app to wallet from in swift?
ios|swift|passbook|wallet
-1
2,098
2
37,680,569
37,680,569
0
true
2016-06-07T08:48:38.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to add passes that get dynamic info from my app to wallet from in swift?<p>I created the my own .pkpass file with dummy data</p> <p>I need to change the...
37,713,051
Get the mask of the smallest network possible<p>How do I get the mask of the smallest network possible that includes these 2 IP adresses: 87.25.78.79 and 87.110.78.76?</p> <p>I am new in this area, according to me (it is just a shot in the dark) I need 110-25=85 which is smaller than 2^7=128. So the mask would be /(32...
<p>You should exclusive-or the two addresses and count leading zeroes of the result. It's the bit pattern that counts, not the numeric difference.</p>
Get the mask of the smallest network possible
networking
-1
59
1
37,713,138
37,713,138
0
true
2016-06-08T21:15:14.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get the mask of the smallest network possible<p>How do I get the mask of the smallest network possible that includes these 2 IP adresses: 87.25.78.79 and 87....
37,714,773
combining specific values in python list<p>Here is my list </p> <pre><code>['INQ/DATA', 'ENTRY', '1', 'MONETARY', '0', 'TRAN', 'GRID', '0', 'BCR', '0', 'ENVIRONMENT', 'TBL', '0', 'PRODUCT', 'FILE', '0', 'STOP/HOLD', '1', 'QUERY', '0', 'LOOKUP', 'FILE', '0', 'REPORT', 'FILE', '0'] </code></pre> <p>I want the answer se...
<p>Merge the list items into a string literal using <code>.join</code> then <code>split</code> the string with <code>re</code> into a list of items using the numbers. </p> <p>Build the final list by using a list comprehension on the splitted items to <code>strip</code> and <code>filter</code> whitespace characters: </...
combining specific values in python list
python|python-2.7
-1
57
2
37,714,882
37,714,882
0
true
2016-06-08T23:51:34.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: combining specific values in python list<p>Here is my list </p> <pre><code>['INQ/DATA', 'ENTRY', '1', 'MONETARY', '0', 'TRAN', 'GRID', '0', 'BCR', '0', 'ENV...
37,719,137
Shared object in R<p>I want to run a FORTRAN subroutine from R. I read that, I need a shared object (.so file) to run the subroutine. For creating the shared object I successfully compiled the FORTRAN subroutine. But when creating shared object it gave the following error </p> <pre><code>/usr/bin/ld: temain.o: relocat...
<p>You need <code>-fPIC</code> as the error message says. </p> <p>See the Writing R Extensions manual and use <code>R CMD COMPILE myfile.f</code>.</p>
Shared object in R
r|fortran|shared-objects
-1
71
1
37,719,188
37,719,188
0
true
2016-06-09T07:12:02.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Shared object in R<p>I want to run a FORTRAN subroutine from R. I read that, I need a shared object (.so file) to run the subroutine. For creating the shared...
37,732,038
using $resource in angularjs in proper way<p>If I want to consume restful webservice where I should query service with two parameters how would I do that using <strong>angularjs 1x $resource</strong></p> <p>If my backend expects following query</p> <blockquote> <p><a href="http://myserver:8080/?country=usa&amp;city...
<p>You can add methods to the resource like:</p> <pre><code>$resource('your_location_rest_url', { 'find': {method: 'GET', url: 'your_location_rest_url/find', params: {country: @country, city: @city} }); </code></pre> <p>That adds a method location to your resource so you could do:</p> <pre><code>var location = new...
using $resource in angularjs in proper way
javascript|angularjs
-1
34
1
37,732,221
37,732,221
0
true
2016-06-09T16:57:20.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: using $resource in angularjs in proper way<p>If I want to consume restful webservice where I should query service with two parameters how would I do that usi...
37,733,090
MySQL update set join and user join<p>hi I need help with this judgment MySQL</p> <pre><code>UPDATE table1 SET table1.campo1= '1' FROM table1 INNER JOIN tabala2 ON tabale1.campo2 = table2.campo1 WHERE table1.campo3 = table2.campo2 </code></pre>
<p>Update don't use from .. the table and the join first . then the set and last the where clause </p> <pre><code>UPDATE table1 INNER JOIN tabala2 ON tabale1.campo2 = table2.campo1 SET table1.campo1= '1' WHERE table1.campo3 = table2.campo2 </code></pre>
MySQL update set join and user join
mysql
-1
27
1
37,733,165
37,733,165
0
true
2016-06-09T17:58:41.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL update set join and user join<p>hi I need help with this judgment MySQL</p> <pre><code>UPDATE table1 SET table1.campo1= '1' FROM table1 INNER JO...
37,751,533
sql server - data backing into local - is it necessary<p>In all the years of my experience, I always connected to a database by creating a new connection using IP address, username and password. I recently joined a company where they use a desktop application written in <strong>VB6</strong> that has an <strong>SQL</st...
<p>Your ability to do that is really a functional and/or procedural issue. There's nothing technical that prevents you from having a single, shared database for dev/test. The challenge is, dev/test environments tend to be destructive and/or disruptive. </p> <p>If you have a single DB used for all development and testi...
sql server - data backing into local - is it necessary
sql-server|database|vb6
-1
53
4
37,753,154
37,753,154
0
true
2016-06-10T15:05:38.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: sql server - data backing into local - is it necessary<p>In all the years of my experience, I always connected to a database by creating a new connection usi...
37,759,397
Beautiful Soup Returning Unwanted Characters<p>I'm using Beautiful Soup to scrape pages trying to get the height of certain athletes:</p> <pre><code>req = requests.get(url) soup = BeautifulSoup(req.text, "html.parser") height = soup.find_all("strong") height = height[2].contents print height </code></pre> <p>Unfortun...
<p>Those aren't "extra characters". <a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/#contents-and-children" rel="nofollow"><code>.contents</code> returns a list</a>, the element you chose only has one child, and so you're getting a list containing one element. Python prints a list as pseudo Python code...
Beautiful Soup Returning Unwanted Characters
python|beautifulsoup|python-unicode
-1
262
2
37,759,421
37,759,421
0
true
2016-06-11T02:35:40.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Beautiful Soup Returning Unwanted Characters<p>I'm using Beautiful Soup to scrape pages trying to get the height of certain athletes:</p> <pre><code>req = r...
37,762,970
Template class with operator overload<p>Here is my question about template class</p> <pre><code>aclass&lt;int&gt; A{1,2}; aclass&lt;float&gt; B{3.0,4.0}; aclass&lt;int&gt; C; int main() { C=A+B; //How to overload this operator in a simple way? B=A; //And also this? return 0; } </code></pre> <p>How can I ov...
<p>You can have member function templates inside your class template:</p> <pre><code>template &lt;typename T&gt; struct aclass { aclass(aclass const &amp;) = default; aclass &amp; operator=(const aclass &amp;) = default; template &lt;typename U&gt; aclass(aclass&lt;U&gt; const &amp; rhs) : a_(rhs.a_),...
Template class with operator overload
c++|class|templates|operator-overloading
-1
63
1
37,763,023
37,763,023
0
true
2016-06-11T11:02:57.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Template class with operator overload<p>Here is my question about template class</p> <pre><code>aclass&lt;int&gt; A{1,2}; aclass&lt;float&gt; B{3.0,4.0}; ac...
37,767,314
BookYourSeats: How to Disable the link once the counter reaches zero in AngularJs<p>I am in the middle of creating an app that helps you to book your seats.</p> <p><img src="https://i.stack.imgur.com/FYEyx.png" alt="This is the interface of my seat layout"></p> <p>My problem is that I cannot disable the selecting of ...
<p>You can add a logic like this in execute function:</p> <pre><code>$scope.execute = function(i, j, itemVal, itemLetter) { angular.forEach($scope.obj, function(v, k) { if (v[i].val == itemVal &amp;&amp; v[i].letter == itemLetter) { if ($scope.isDisabled &amp;&amp; v[i].check == false) return; ...
BookYourSeats: How to Disable the link once the counter reaches zero in AngularJs
javascript|angularjs|frameworks|frontend
-1
331
3
37,768,575
37,768,575
0
true
2016-06-11T18:40:35.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: BookYourSeats: How to Disable the link once the counter reaches zero in AngularJs<p>I am in the middle of creating an app that helps you to book your seats.<...
37,777,347
Stop .setText from overwriting ? From database cursor result<p>I am using a method with a cursor to return all values that has the same id, like for example:</p> <p>ID_Owner | ID_Car </p> <p>1 -------- 1</p> <p>1 -------- 2</p> <p>The owner with the id, has the car 1 and 2..</p> <hr> <p>With my method im returnin...
<p>You have to use the StringBuilder and append the result to StringBuilder object and then set text the stringbuilder object.</p> <pre><code>Cursor res2 = dal.selectMotivosWhereId(position); res2.moveToFirst(); StringBuilder sb = new StringBuilder(); while (!res2.isAfterLast()) { sb.append(res2.getString(res2.ge...
Stop .setText from overwriting ? From database cursor result
java|android|android-database
-1
43
1
37,777,499
37,777,499
0
true
2016-06-12T17:52:01.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stop .setText from overwriting ? From database cursor result<p>I am using a method with a cursor to return all values that has the same id, like for example:...
37,823,995
Search object for object containing 2 values?<p>I have a Object which holds the configs of each product variant basically i want to be able to search which object has 2 specific values and then grab the v_id value for it, there will ONLY be 1 result.</p> <p>code:</p> <pre><code>//object product_1: { p_id: 11, // Pe...
<pre><code>var results = Object.keys(product_1.variants).map(function (key) { return product_1.variants[key]; }).filter(function (object) { return object.color === 'gold' &amp;&amp; object.size === '20|50'; }); </code></pre> <p>Where <code>product_1.variants</code> is a reference to the variants object.</p>
Search object for object containing 2 values?
javascript
-1
40
3
37,824,027
37,824,027
0
true
2016-06-14T23:53:02.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Search object for object containing 2 values?<p>I have a Object which holds the configs of each product variant basically i want to be able to search which o...
37,833,775
Replace switch instruction in that code<p>I wanted to find how many times 1 number appears in provided another number. I've found a solution for finding 2-digit numbers in another number, but what I wanted to do is to find 1-digit, 2-digit, ..., n-digit numbers in provided number. I dont want to create another case in ...
<p>Well you already got your answer. Just use your variable a.</p> <pre><code>while(number1 &gt; 0){ if(number1 % a == number2){ counter++; } number1 = number1/10; } </code></pre>
Replace switch instruction in that code
java
-1
48
2
37,833,828
37,833,828
0
true
2016-06-15T11:11:47.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace switch instruction in that code<p>I wanted to find how many times 1 number appears in provided another number. I've found a solution for finding 2-di...
37,625,980
HTML from input element (search box) can't be selected with the mouse<p>At <a href="https://staging.whitewreath.org.au/" rel="nofollow">this site</a>, the search box at top right does not function.</p> <p>I tried adding a z-index to the parent element:</p> <pre><code>.col-right-one-thirds { max-width: 22.38033333...
<p>The div <code>.col-full</code> is overlayed atop the header because of the floated divs <code>.col-right-one-thirds</code> and <code>.col-left-two-thirds</code></p> <p>Add <code>clear: both</code> to <code>.woocommerce-active .site-header .col-full</code></p> <pre><code>.woocommerce-active .site-header .col-full {...
HTML from input element (search box) can't be selected with the mouse
html|css
-1
26
1
37,626,022
37,626,022
1
true
2016-06-04T03:16:09.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: HTML from input element (search box) can't be selected with the mouse<p>At <a href="https://staging.whitewreath.org.au/" rel="nofollow">this site</a>, the se...
37,634,324
Ignoring Special Characters in an Island Grammar<p>I've the following island grammar that works fine (and I think as expected):</p> <pre><code>lexer grammar FastTestLexer; // Default mode rules (the SEA) OPEN1 : '#' -&gt; mode(ISLAND) ; // switch to ISLAND mode OPEN2 : '##' -&gt; mode(ISLAND); OPEN3 : '###' -&gt; mod...
<p>You could try to do more work in the parser and less in the lexer. Allow <code>#</code> and <code>~</code> inside <code>text</code> and not inside <code>TEXT</code>, something <em>similar</em> to:</p> <pre><code>text : TEXT : OPEN1 : TEXT text : OPEN1 text ; </code></pre> <p>Adjust the rules fo...
Ignoring Special Characters in an Island Grammar
parsing|antlr4
-1
76
1
37,634,556
37,634,556
1
true
2016-06-04T19:43:25.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ignoring Special Characters in an Island Grammar<p>I've the following island grammar that works fine (and I think as expected):</p> <pre><code>lexer grammar...
37,655,537
How to copy/paste all the contents from terminal to notepad using keyboard?<p>I ran a script in 'cygwin' terminal. Now I have more than 10000(10k) line as output. I want to copy all the contents using keyboard, like we have in Windows </p> <pre><code>'ctrl +A' - Select All 'ctrl +c' - Copy 'ctrl +v' - Paste </code></p...
<p>To redirect the stderr and stdout outputs to a file (similar to as you would see on the terminal), use:</p> <pre><code>mycommand &gt; output_and_error.txt 2&gt;&amp;1 </code></pre> <p>This will take the output from your <code>mycommand</code> and pipe it into a file called output_and_error.txt You can then open t...
How to copy/paste all the contents from terminal to notepad using keyboard?
linux|ubuntu|terminal|command-line-interface
-1
2,069
1
37,655,994
37,655,994
1
true
2016-06-06T10:52:03.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to copy/paste all the contents from terminal to notepad using keyboard?<p>I ran a script in 'cygwin' terminal. Now I have more than 10000(10k) line as ou...
37,744,554
How sum String array numbers from a sqlite column in swift<p>I have a sqlite table on my <code>iOS</code> app and I want to sum all String numbers of a column of it. The column name is : &quot;count&quot;</p> <p>I Wrote this code to get the numbers :</p> <pre><code> let kiwi = DB.getInstance() let records = kiwi....
<pre><code>let kiwi = DB.getInstance() let count:Int = 0 let records = kiwi.executeQuery("SELECT * FROM zekrlist") for record in records { let structContact = StructContact() structContact.id = record.column["id"]?.asInt() structContact.count = record.column["count"]?.asString() count = count + structCo...
How sum String array numbers from a sqlite column in swift
swift|sqlite
-1
334
2
37,744,676
37,744,676
1
true
2016-06-10T09:22:16.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How sum String array numbers from a sqlite column in swift<p>I have a sqlite table on my <code>iOS</code> app and I want to sum all String numbers of a colum...
37,762,627
Did I understand the following quicksort algorithm correctly?<p>I'm trying to understand the given algorithm and here are my thoughts:</p> <p><code>A</code> is the given array... <code>x</code> stands for the number which is on the left side of the pivot element, <code>y</code> stands for the number which is on the ri...
<p>From the algorithm it looks like x and y mark the left and right bounds of the sorting algorithm within an array (to sort the complete array, you'd use x = 0 and y = A.length). The pivot element is the rightmost one (at index y).</p> <p>Then, i starts at x (the left bound) and compares each element with the pivot A...
Did I understand the following quicksort algorithm correctly?
algorithm|sorting
-1
43
1
37,762,950
37,762,950
1
true
2016-06-11T10:25:39.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Did I understand the following quicksort algorithm correctly?<p>I'm trying to understand the given algorithm and here are my thoughts:</p> <p><code>A</code>...
37,786,642
Countdown with timer using python decorator<pre><code>import time def sleep_dec(function): def wrapper(*args, **kwargs): time.sleep(2) return function(*args, **kwargs) return wrapper @sleep_dec def countdown(n): while n &gt; 0: print(n) n -= 1 print(countdown(5)) </code></pre> <p>Am trying to ...
<pre><code>def countdown(n): while n &gt; 0: return n n -= 1 </code></pre> <p><code>n -= 1</code> will never be reached. In fact, the <code>while</code> loop will only iterate once and your function simply return <code>n</code>.</p> <p>You want to use <code>yield</code> instead.</p> <p>But, it st...
Countdown with timer using python decorator
python|decorator
-1
308
1
37,786,823
37,786,823
1
true
2016-06-13T09:51:51.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Countdown with timer using python decorator<pre><code>import time def sleep_dec(function): def wrapper(*args, **kwargs): time.sleep(2) return func...
37,845,935
DB2 Linux to Windows Migration<p>We have a RHEL server running DB2 with one failing hard drive that is several years out of support. I've been tasked with migrating DB2 to a newer Windows server. </p> <p>What is the easiest way to do this? Is it possible to take a backup of the entire database and restore it on Window...
<p>You cannot restore on Windows a backup taken on a Linux server. Use <code>db2look</code> to extract the DDL statements, then <code>db2move</code> to export and load tables <em>en masse</em> (you can specify schemas or table name patterns). </p> <p>More info <a href="https://www.ibm.com/support/knowledgecenter/SSEP...
DB2 Linux to Windows Migration
sql|db2|database-migration|ibm-data-studio
-1
806
1
37,846,354
37,846,354
1
true
2016-06-15T21:18:05.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DB2 Linux to Windows Migration<p>We have a RHEL server running DB2 with one failing hard drive that is several years out of support. I've been tasked with mi...
37,734,013
PLS-00103: Encountered the symbol "IS" when expecting one of the following<p>I am trying to create a function right now (instead of a package) that selects the column data that is currently inside of my OP_GUIDE_VIEW.</p> <p>Just need a function that selects what's there. Not modifying anything, don't think I need par...
<p>You're trying to create a package header and body at the same time. You have to create an header, then a body, with separate queries; <a href="https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_6006.htm" rel="nofollow">here</a> you find something more. An example of how you could edit your code:</p> ...
PLS-00103: Encountered the symbol "IS" when expecting one of the following
sql|oracle|cursor
-1
3,866
1
37,734,087
37,734,087
2
true
2016-06-09T18:52:34.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PLS-00103: Encountered the symbol "IS" when expecting one of the following<p>I am trying to create a function right now (instead of a package) that selects t...
37,753,012
Bootstrap : Get Image from modal<p>I have a modal with a bunch of images. The images are selectable and after I click on then i change the modal button text to the image name. However I'd also like to grab the image and display. I have no idea how to do this as I have no experience with javascript.</p> <p>html modal c...
<p>How about something like this?</p> <pre><code>&lt;script type="application/javascript"&gt; $('#myModal').on('shown.bs.modal', function () { $('#myInput').focus() }) $(".img").click(function () { var img = $(this).attr('src'); $("#modal-btn").text(img); $('#div_img_name')....
Bootstrap : Get Image from modal
javascript|html|django|twitter-bootstrap
-1
1,050
1
37,753,177
37,753,177
2
true
2016-06-10T16:24:24.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bootstrap : Get Image from modal<p>I have a modal with a bunch of images. The images are selectable and after I click on then i change the modal button text ...
37,765,526
Can we say that a method-local class is a type of Inner class?<p>Since we can not use the <code>static</code> modifier with a local class defined inside a method, and since Nonstatic nested classes are Inner classes, we could probably say that a method local class is a type of an Inner class. </p> <p>But on the other ...
<blockquote> <p>we say that instances of Inner classes CAN NOT exist without a Live instance of the enclosing class</p> </blockquote> <p>No. From <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.1.3" rel="nofollow noreferrer">the JLS</a> (emphasis mine):</p> <blockquote> <p>An inner class C ...
Can we say that a method-local class is a type of Inner class?
java|inner-classes|anonymous-inner-class|local-class
-1
26
1
37,765,769
37,765,769
2
true
2016-06-11T15:38:32.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can we say that a method-local class is a type of Inner class?<p>Since we can not use the <code>static</code> modifier with a local class defined inside a me...
37,846,092
Why is my mock method not being invoked?<p>When I run the JUnit test, ShuffleTest, I get the response, "Wanted but not invoked: shuffler.shuffle();" I have seen this question asked many times on SO, but as far as I can tell, I am doing what those answers say. I am instantiating my interface as a mock, and injecting it ...
<p>You're creating two separate shuffler objects. Try removing <code>shuffler = mock(Shuffler.class);</code> from the <code>createFullDeck</code> method as <code>shuffler</code> is already a mock when passed in.</p>
Why is my mock method not being invoked?
java|mockito
-1
277
1
37,846,282
37,846,282
3
true
2016-06-15T21:28:50.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is my mock method not being invoked?<p>When I run the JUnit test, ShuffleTest, I get the response, "Wanted but not invoked: shuffler.shuffle();" I have s...
37,711,089
Updating the input text value based on user input and display the value<p>I want to get the user input in an input field and then display a return message on click. Code is like this:</p> <pre><code>var link = document.getElementById("link"); var getNames = document.getElementById("getName"); var lastName = getNames.v...
<p>You need to pass <code>getNames.value</code> to your function:</p> <pre><code>link.addEventListener('click', function(){ link.innerHTML += showName(getNames.value); }); </code></pre> <p>This is because you set <code>lastName</code> at a moment when the user has not yet input anything.</p> <h3>Remark</h3> <p>...
Updating the input text value based on user input and display the value
javascript|input
-1
76
1
37,711,128
37,711,128
4
true
2016-06-08T19:18:48.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Updating the input text value based on user input and display the value<p>I want to get the user input in an input field and then display a return message on...
37,619,027
Need to get text info into Explorer toolbar(via plugin xml)<p>This is probably a so simple thing that some of you will facepalm but here it goes anyway. I am working on a eclipse RCP project. I have to make a new Explorer which can be called from the context menus of items in other context menus. I need to get informat...
<p>You can set the top line of the view (like Type Hierarchy) by calling the </p> <pre><code>setContentDescription(String) </code></pre> <p>method of your <code>ViewPart</code>.</p>
Need to get text info into Explorer toolbar(via plugin xml)
xml|eclipse|eclipse-plugin|eclipse-rcp
-1
23
2
37,619,735
37,619,735
0
true
2016-06-03T16:10:19.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need to get text info into Explorer toolbar(via plugin xml)<p>This is probably a so simple thing that some of you will facepalm but here it goes anyway. I am...
37,615,232
how to display share button in bigcommerce quickview popup<p>how can I show share button in bigcommerce quickview popup.I have used <code>%%GLOBAL_QuickViewShareLinks%%</code> variable.but no use.</p> <p>Any help is appreciated.</p>
<p>Depending on the theme, the share options should be there anyway. You shouldn't need to customize them. Make sure you aren't running something like uBlock as that can prevent them from showing. </p> <p>Alternatively, you can use <a href="http://www.addthis.com/" rel="nofollow">AddThis</a> to implement them yourself...
how to display share button in bigcommerce quickview popup
bigcommerce
-1
57
1
37,620,307
37,620,307
0
true
2016-06-03T13:06:49.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to display share button in bigcommerce quickview popup<p>how can I show share button in bigcommerce quickview popup.I have used <code>%%GLOBAL_QuickViewS...
37,716,479
How to modal in PHP with delete confirmation<p>I'm trying to add a modal in my system that when you click it a modal will appear and ask you a confirmation if you want to delete that certain data.</p> <p>But in my present code, when you click the button, it will direct you to a blank page without modal. The <code>id</...
<p>On <code>modal_delete.php</code> you need to trigger the modal using javascript after the DOM is ready.</p> <pre><code>&lt;script&gt; $(function () { $('#myModal').modal('show'); }); &lt;/script&gt; </code></pre>
How to modal in PHP with delete confirmation
javascript|php|jquery|twitter-bootstrap
-1
800
1
37,716,571
37,716,571
0
true
2016-06-09T03:52:03.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to modal in PHP with delete confirmation<p>I'm trying to add a modal in my system that when you click it a modal will appear and ask you a confirmation i...
37,788,829
Records returned from executeFetchRequest is empty if the app is run the second time<p>Im facing a weird data loss while using core data.</p> <p>Im using the following code to save records to core data.</p> <pre><code> for (int i = 0; i &lt; [domains count]; i++){ NSString *is_active = [[domains objectAtI...
<p>You have not save the context.So that you lost the data on second time. Change your code like this</p> <pre><code>for (int i = 0; i &lt; [domains count]; i++){ NSString *is_active = [[domains objectAtIndex:i] objectForKey:@"is_active"]; NSString *domain_id = [[domains objectAtIndex:i] objectForKey:@"domain...
Records returned from executeFetchRequest is empty if the app is run the second time
ios|objective-c|core-data
-1
65
1
37,789,121
37,789,121
0
true
2016-06-13T11:36:32.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Records returned from executeFetchRequest is empty if the app is run the second time<p>Im facing a weird data loss while using core data.</p> <p>Im using th...
37,628,405
like button not working from aritical 2<h3>Like button not working from article 2</h3> <p><strong>Note: Like button works well for Article 1.</strong><br> Article 2 like button is not toggled. I am using toggleClass to toogle fontawesome icon. The code is given below. </p> <p>Please help me to solve this problem.</p...
<p>Just a little change in your script Use class and not id and it works fine</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $(".love").click(function(){ $(this).find('i').toggleClass('fa-heart-o fa-heart'); }); }); &lt;/script&gt; </code></pre>
like button not working from aritical 2
javascript|jquery|css
-1
33
2
37,628,557
37,628,557
1
true
2016-06-04T09:02:39.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: like button not working from aritical 2<h3>Like button not working from article 2</h3> <p><strong>Note: Like button works well for Article 1.</strong><br> A...
37,643,572
Extract images and text from a sequence of urls<p>I'm trying to make an script to extract images and text from a sequence of urls. The urls are from the same website but with differents parameters. Reading Stackoverflow and another sites I have "created" a script that works, but I have a problem when I try to make a se...
<p>Depending on what main() does, something like this:</p> <pre><code>def getUrl(opt, baseUrl): out_folder = "/monedasWiki/monedas" print "Instrucciones del script \n No te preocupes, no es complicado pero atiende a los pasos" print "Introduce 1 para obtener los archivos del 00001 al 00010" print "Intr...
Extract images and text from a sequence of urls
python
-1
41
2
37,643,716
37,643,716
1
true
2016-06-05T15:29:20.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extract images and text from a sequence of urls<p>I'm trying to make an script to extract images and text from a sequence of urls. The urls are from the same...
37,661,691
ember liquid-tether modals<p>I am using - <a href="http://pzuraq.github.io/liquid-tether/#/examples?a=hello-world" rel="nofollow">http://pzuraq.github.io/liquid-tether/#/examples?a=hello-world</a></p> <p>Scroll down to 'Animation With Context'. i have put the code in as on these pages.</p> <p>I get the error: gte is ...
<p>Didn't you forget to import <code>Ember.computed.gte</code>?</p> <pre><code>import Ember from 'ember'; const gte = Ember.computed.gte; export default Ember.Controller.extend({ showFirstModalDialog: gte('currentModalDialogStep', 1), showSecondModalDialog: gte('currentModalDialogStep', 2), showTh...
ember liquid-tether modals
ember.js|ember-cli
-1
257
1
37,662,033
37,662,033
1
true
2016-06-06T15:48:56.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ember liquid-tether modals<p>I am using - <a href="http://pzuraq.github.io/liquid-tether/#/examples?a=hello-world" rel="nofollow">http://pzuraq.github.io/liq...
37,662,173
In AWS, which type of IP to use if I want to keep a site private?<p>New to AWS and I wanted to host a website and share it with only a bunch of people and keep it private. I realized that each time I stop then start the EC2 instance, the public DNS and public IP are both reassigned a new one.. </p> <p>I read that you ...
<p>You cannot secure a site using a Elastic Ip address. If you want to keep the site private password protect it from the server side. Follow this link <a href="http://www.thesitewizard.com/apache/password-protect-directory.shtml" rel="nofollow">http://www.thesitewizard.com/apache/password-protect-directory.shtml</a></...
In AWS, which type of IP to use if I want to keep a site private?
amazon-web-services|amazon-ec2
-1
30
2
37,662,248
37,662,248
1
true
2016-06-06T16:12:28.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In AWS, which type of IP to use if I want to keep a site private?<p>New to AWS and I wanted to host a website and share it with only a bunch of people and ke...
37,662,420
minimum amount of android sdk files needed to build a release apk from command line<p>I have the android SDK installed on a aws Ubuntu server (14.04). I have a ruby application which builds an APK and it is working fine on my development environment.</p> <p>However the android SDK is very large and has taken up half o...
<p>For <code>platforms</code>, you only need whichever one(s) that you are using in your project(s) that you are building. So, examine those project(s) and see what you have for <code>compileSdkVersion</code> values. You can remove the <code>platforms</code> subdirectories corresponding to ones that you do not need.</p...
minimum amount of android sdk files needed to build a release apk from command line
android|gradle|android-gradle-plugin|android-sdk-tools|android-build
-1
323
1
37,662,771
37,662,771
1
true
2016-06-06T16:25:52.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: minimum amount of android sdk files needed to build a release apk from command line<p>I have the android SDK installed on a aws Ubuntu server (14.04). I have...
37,719,048
OpenGL - Can't get Vertex Array Objects and Vertex Buffer Objects to draw<p>I'm using OpenGL with SDL2 on MacOSX 10.10. I've been trying to use VAOs and VBOs in modern OpenGL, but I am not able to get them to draw. My shaders are super simple, but according to tutorials I've been trying to follow they're supposed to wo...
<p>A VAO basically stores the attribute bindings set by <code>glVertexAttribPointer</code>. In order to store them, they have to be set while the VAO is bound. In your case, you first unbind it and then set the attribute binding.</p> <p>Additionally, one should <strong>never</strong> generate buffers or vaos in each f...
OpenGL - Can't get Vertex Array Objects and Vertex Buffer Objects to draw
c++|opengl
-1
272
1
37,722,369
37,722,369
1
true
2016-06-09T07:07:37.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: OpenGL - Can't get Vertex Array Objects and Vertex Buffer Objects to draw<p>I'm using OpenGL with SDL2 on MacOSX 10.10. I've been trying to use VAOs and VBOs...
37,758,170
What Registration Properties are needed to get Database Workbench up and running?<p>I am a <a href="http://www.upscene.com/database_workbench/" rel="nofollow">Database Workbench</a> fan from way back, but bizarrely have not used it for quite awhile.</p> <p>I downloaded a trial version and am trying to "Register Server...
<p>The instance is not the database in the server you are connecting to. You can actually have more than one Sql Server running in the same operating system. You're using the default instance, so don't use that field or leave it blank. </p> <pre><code>Host: PlatypusSQL42 Username: youinnocentdog Password:contrasena </...
What Registration Properties are needed to get Database Workbench up and running?
sql-server|database-connection
-1
60
1
37,758,337
37,758,337
1
true
2016-06-10T22:53:20.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What Registration Properties are needed to get Database Workbench up and running?<p>I am a <a href="http://www.upscene.com/database_workbench/" rel="nofollow...
37,797,260
Add a column with partially matching pattern from a different file<p>I have two files with similar structure (tab-delimited and many, many lines, column 3 minus column 2 = 1) that look somewhat like this:</p> <p>File 1:</p> <pre><code>1 170023 170024 A - 1 170024 170025 T - 1 170026 170027 A - 1 170028 170029 G - 1 1...
<p>I could think and provide a simple solution using <code>join</code> and <code>awk</code> for this. May not be the most efficient ways of solving it with <code>awk</code> (might get bashed from experts for this :)), but I was able to solve this.</p> <p><strong>Solution-1:-</strong></p> <p>All you need to do is to f...
Add a column with partially matching pattern from a different file
bash|terminal|pattern-matching|paste|data-manipulation
-1
298
1
37,809,178
37,809,178
1
true
2016-06-13T19:00:49.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add a column with partially matching pattern from a different file<p>I have two files with similar structure (tab-delimited and many, many lines, column 3 mi...
37,787,488
OpenCL: Object not getting initialized with value<p>If I do the following:</p> <pre><code>this-&gt;bufferParams = cl::Buffer(context, CL_MEM_READ_ONLY, sizeof(Params), &amp;params, NULL); </code></pre> <p>My buffer doesnt seem to get populated with my params object. However if I do this</p> <pre><code>this-&gt;queue...
<p>Just do this:</p> <pre><code>this-&gt;bufferParams = cl::Buffer(context, CL_MEM_READ_ONLY| CL_MEM_COPY_HOST_PTR, sizeof(Params), &amp;params, NULL); </code></pre> <p>If you don use the flag to copy from the host pointer it is not going to copy. That pointer may be used for other things (like acquire memory) so you...
OpenCL: Object not getting initialized with value
opencl
-1
43
1
37,793,299
37,793,299
4
true
2016-06-13T10:34:19.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: OpenCL: Object not getting initialized with value<p>If I do the following:</p> <pre><code>this-&gt;bufferParams = cl::Buffer(context, CL_MEM_READ_ONLY, size...
37,830,232
No Task in ThreadPoolExecutor , will the ThreadPoolexecutor die?<p>I have created the static object for ThreadPoolExecutor class and in my web application I'm adding tasks to ThreadPoolExecutor for every request. </p> <p>My question is after all the requests are processed and what happen to ThreadPoolExecutor class(in...
<p>If you don't shut it down with <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html#shutdown()" rel="nofollow"><code>executor.shutdown()</code></a> it'll stay running of course, waiting for tasks that may never come.</p> <p>I'm sure this is described in the Javadocs for th...
No Task in ThreadPoolExecutor , will the ThreadPoolexecutor die?
java|executorservice|threadpoolexecutor
-1
51
1
37,830,289
37,830,289
4
true
2016-06-15T08:38:06.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: No Task in ThreadPoolExecutor , will the ThreadPoolexecutor die?<p>I have created the static object for ThreadPoolExecutor class and in my web application I'...