question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
44,302,444
Display multiple UIViewControllers in Storyboard by implementing codes<p>More specific,</p> <p>Let's say I have a <code>UIViewController</code> <strong>A</strong>, when I press a <code>button</code> in <strong>A</strong> that is created by code, I would like to display another <code>UIViewController</code> <strong>B</...
<p>Absolutely,</p> <p>Make sure you have added the storyBoardIdentifier to ViewController B.</p> <p>Finally, In your ViewController A :</p> <pre><code>let YourStoryBoard = UIStoryboard(name: "YourStoryBoard", bundle: nil) let vc = YourStoryBoard.instantiateViewController(withIdentifier: "VCB_StoryBoard_Identifier") ...
Display multiple UIViewControllers in Storyboard by implementing codes
ios|swift|xcode
-2
63
3
44,302,594
44,302,594
3
true
2017-06-01T08:33:49.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display multiple UIViewControllers in Storyboard by implementing codes<p>More specific,</p> <p>Let's say I have a <code>UIViewController</code> <strong>A</s...
43,949,242
How String object is not receiving data from the editText? - Android<p>I have a problem with this, the editText in the log is sending data but the String is null and the object is null this is my code:</p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState)...
<p>Move this <code>final String lel = mGetText.getText().toString();</code> inside the click listener and it will work.</p> <pre><code>mSendMessage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { final String lel = mGetText.getText().toString(); ...
How String object is not receiving data from the editText? - Android
android|string|android-edittext
-2
26
1
43,949,274
43,949,274
1
true
2017-05-13T04:40:38.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How String object is not receiving data from the editText? - Android<p>I have a problem with this, the editText in the log is sending data but the String is ...
44,128,041
how to get ppbValue information from SLGetWindowsInformation from c++<p>Presently i am getting the output for "pcbValue" and "peDataType" but not understanding how to get the value for "ppbValue"</p> <p>Following is the code I am trying:</p> <pre><code>ULONG Type = 0; SLDATATYPE DataType; UINT value = 0; PBYTE Value...
<p>This is explained in the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa965834.aspx" rel="nofollow noreferrer">documentation</a>. It would be wise to read it once again, to make sure you did not miss anything first time.</p> <p>The documentation explains how to find out the type of data contain...
how to get ppbValue information from SLGetWindowsInformation from c++
c++|winapi
-2
63
1
44,129,083
44,129,083
1
true
2017-05-23T07:11:24.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get ppbValue information from SLGetWindowsInformation from c++<p>Presently i am getting the output for "pcbValue" and "peDataType" but not understandi...
44,351,259
image can't be displayed from within function<p>I have a simple GUI tryout where I want to display few images on my screen. I start with setting the window with gray squares allover it and resizing the desired image and now I want to put it on the frame:</p> <pre><code>img = [img_resize(yellow_square, img_size), "text...
<p>This is a common problem. You have to keep a reference to the image, or else python deletes it from memory. If you aren't in a function then the variable is a global variable, which keeps the reference. But in a function you need to do something like this: </p> <pre><code>panel = Label(root) panel.img = im[0] panel...
image can't be displayed from within function
python-3.x|tkinter
-2
24
1
44,351,285
44,351,285
1
true
2017-06-04T06:09:54.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: image can't be displayed from within function<p>I have a simple GUI tryout where I want to display few images on my screen. I start with setting the window w...
43,986,910
Iam kind of new into dictionaries, so can you explain how can i write a function like the below one<p>i want to write a function that takes a list and returns a dictionary containing lists of indices for every item that appears in the list for example:</p> <pre><code>input: indices(['a','a','b','b']) output: {'a':[0,1...
<pre><code>def indices(aList): aDict = {} for i in range(0, len(aList)): letter = aList[i] if letter in aDict: aDict[letter] += [i] else: aDict[letter] = [i] return aDict print( indices(['a','a','b','b']) ) # For testing only </code></pre> <p>Out...
Iam kind of new into dictionaries, so can you explain how can i write a function like the below one
python
-2
43
2
43,987,071
43,987,071
0
true
2017-05-15T18:59:00.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Iam kind of new into dictionaries, so can you explain how can i write a function like the below one<p>i want to write a function that takes a list and return...
44,357,769
rand function value<p>i create rand funtion for generating random value and concatenate with other value and show in the text field through ajax before insert this value. but here how can i check this random generating value is exists or not in database before inserting this value in database.if value is exists then ag...
<p>I know that i should explain how its works, but its really a big amount of information about this in google...</p> <p>In a link below i attached the url for it with some explain:</p> <p><a href="http://www.dummies.com/web-design-development/site-development/how-to-create-a-radio-button-in-an-html5-form/" rel="nofo...
rand function value
javascript|php|mysql|ajax
-2
61
1
44,357,912
44,357,912
0
true
2017-06-04T19:02:52.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: rand function value<p>i create rand funtion for generating random value and concatenate with other value and show in the text field through ajax before inser...
43,926,630
How to guarantee sending message using class chain in sequence in multi-threading scenario<p>I used a chain A-B-C to send <code>Message</code> of PAUSE and PLAY. I want to guarantee <code>Class C</code> to send message PAUSE followed by PLAY in sequence. (I expect C to send PAUSE-PLAY, but sometimes it became PLAY-PAU...
<p>In your code there is nothing about multi-threading. All run in sequence. If you see output not in sequence it is not about how messages processed actually.</p> <p>Just add timestamp to your output and you will see it. like:</p> <pre><code>System.out.println("Sending message " + Message.id + " at " + System.nanoTi...
How to guarantee sending message using class chain in sequence in multi-threading scenario
java|multithreading
-2
62
1
43,927,170
43,927,170
0
true
2017-05-11T22:33:34.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to guarantee sending message using class chain in sequence in multi-threading scenario<p>I used a chain A-B-C to send <code>Message</code> of PAUSE and P...
44,208,480
Rails: undefined method `map' for nil:NilClass<p>I know that there are a lot of questions with the same error but i didn't find any that solves my problem. So, I have a "Bairro" and there are "Clientes" and "Imoveis" thats belongs to. The problem is that creating a customer "Cliente" works just fine, but when I go to c...
<p>It is very likely that the error is because the form re-renders in your update action and you don't set <code>@bairros</code> there.</p> <pre><code>def update if object.save # works else # doesn't work @bairros = Bairro.all # or something render 'edit' end end </code></pre> <p>or if you re-r...
Rails: undefined method `map' for nil:NilClass
ruby-on-rails
-2
1,284
1
44,208,528
44,208,528
1
true
2017-05-26T18:57:12.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rails: undefined method `map' for nil:NilClass<p>I know that there are a lot of questions with the same error but i didn't find any that solves my problem. S...
44,309,374
how to send an object from controller to view (Twig) in Symfony 3<p>Imagine that we have the controller <code>AdvertController.php</code> with the edit action <code>public function editAction(Request $request)</code> that sends an object <code>$user</code> to the view <code>edit.html.twig</code>, <code>$user</code> con...
<p>Its in the array() part you already defined.</p> <pre><code>$x = 'someothervalue'; $this-&gt;render('template', [ 'somekey' =&gt; 'somevalue', 'someotherkey' =&gt; $x ]); </code></pre> <p>Then in twig:</p> <pre><code>{{ somekey }}, {{ someotherkey }} </code></pre>
how to send an object from controller to view (Twig) in Symfony 3
php|symfony
-2
2,582
2
44,309,417
44,309,417
1
true
2017-06-01T13:48:46.183Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to send an object from controller to view (Twig) in Symfony 3<p>Imagine that we have the controller <code>AdvertController.php</code> with the edit actio...
43,957,145
ListView does not show content<p>I try to retrieve data from <code>firebase</code> and use an <code>adapter</code> to show them in <code>listview</code>. Everything is ok with retrieving data, I checked through debugger, however nothing is shown. Here is updated <em>resource_layout.xml:</em></p> <pre><code>&lt;?xml v...
<p>Your <code>ListView</code> height is <code>0dp</code> and it has a weight. It will not work on <code>RelativeLayout</code>. Change it like that.</p> <pre><code>&lt;ListView android:id="@+id/listViewBooks" android:layout_height="match_parent" android:layout_width="match_parent" android:layout_alignPa...
ListView does not show content
android|listview|firebase|firebase-realtime-database|adapter
-2
74
2
43,957,209
43,957,209
0
true
2017-05-13T19:22:57.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ListView does not show content<p>I try to retrieve data from <code>firebase</code> and use an <code>adapter</code> to show them in <code>listview</code>. Ev...
44,052,707
Javascript looping through object to find match pair url<p>I am working on a reactjs project - where I have say an English url like "/en/how-it-works" and wish to loop through the json tree to find the position/child level at which this link is set -- and find its German matching pair.</p> <p>So basically -- a functio...
<p>You will have to loop through 'en' and 'de' simultaneously and use recursion since you have nested links. Here is my version. I already took out the 'en' and 'de' array and used them in the function.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="sni...
Javascript looping through object to find match pair url
javascript|json
-2
46
1
44,053,797
44,053,797
1
true
2017-05-18T16:02:50.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript looping through object to find match pair url<p>I am working on a reactjs project - where I have say an English url like "/en/how-it-works" and wi...
44,337,411
Searching for a python package reading excel and not auto formating its raw values<p>I encountered with several python packages which auto convert date strings values in cells to <code>datetime</code> representation automatically upon loading the excel with the package, can you point me to several packages which have a...
<p>I believe <a href="http://pypi.python.org/pypi/xlrd" rel="nofollow noreferrer">xlrd</a> reads the date as a number by default. However you can always convert it to a Python datetime via xlrd's <code>xldate_as_tuple</code> function.</p> <p>See the following links for more information:</p> <ul> <li><a href="http://w...
Searching for a python package reading excel and not auto formating its raw values
python|excel|python-2.7
-2
31
1
44,337,454
44,337,454
2
true
2017-06-02T21:04:27.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Searching for a python package reading excel and not auto formating its raw values<p>I encountered with several python packages which auto convert date strin...
44,132,293
instead of xpath what can i select from the below code<p>Please help me to find locator in this case as id is dynamic and it changes every time when I refresh the page. </p> <p>type="text" also I will not be able to use because, for the next fields, eveything is same from the down code except, the label changes fr...
<p>You can use <code>preceding-sibling</code> or <code>following-sibling</code> feature from <code>xpath</code>. As per code mentioned above your <code>xpath</code> should be like this:</p> <pre><code>//input[@type='text'][following-sibling::label[contains(text(),'First name')]] </code></pre> <p>But I think in html <...
instead of xpath what can i select from the below code
selenium|testing|selenium-webdriver
-2
58
2
44,132,536
44,132,536
0
true
2017-05-23T10:30:54.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: instead of xpath what can i select from the below code<p>Please help me to find locator in this case as id is dynamic and it changes every time when I refres...
44,213,336
Read a file to List<int><p>I am needing to create a list of numbers from an uploaded file, if the numbers have "-" representing a range, I need to split the numbers, making the first number a start, iterate through til it gets to the second number. I know I will be storing the numbers in a List, I'm just not sure on ho...
<p>I didn't agree with Badiparmagi's answer as its adding string/character to int list, its not compilable code. Here giving you my tested attempt. I hope it may help you.</p> <pre><code>if (string.IsNullOrEmpty(fileName.Text)) return; var _MissingInt = new List&lt;int&gt;(); var lines = File.ReadAllL...
Read a file to List<int>
c#|wpf|csv|csvtoarray
-2
1,056
3
44,213,496
44,213,496
-1
true
2017-05-27T05:39:57.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Read a file to List<int><p>I am needing to create a list of numbers from an uploaded file, if the numbers have "-" representing a range, I need to split the ...
44,041,351
Image not displaying in chrome<p>I want to show.Image from this path //dan/images/img 12.jpg Which is working on I.E.</p> <p>I want to display it in ,chrome like it is displaying in IE</p>
<p>You can simply drag the image directly into your browser, <br> in addition to display the picture, it will also show the path. </p> <p>And so you should have something like this : <a href="https://i.stack.imgur.com/AR7Ko.png" rel="nofollow noreferrer">link</a></p> <p>Now you juste have to copy/paste the url and ...
Image not displaying in chrome
html
-2
554
2
44,041,404
44,041,404
1
true
2017-05-18T07:31:48.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Image not displaying in chrome<p>I want to show.Image from this path //dan/images/img 12.jpg Which is working on I.E.</p> <p>I want to display it in ,chrome...
44,061,164
How to add missing numbers to a List<p>I have an array list. Which contains month number and data as comma separated. Now I want to loop through this list and check if any month number is missing. If then need to add that month number in order with data part as zero.</p> <pre><code> List&lt;string&gt; MyData = new Li...
<p>You could use <code>contains</code> like this</p> <pre><code> var result = new List&lt;string&gt;(); for (int i = 1; i &lt;= 12 ; i++) { var firstMatch = myData.FirstOrDefault(x =&gt; x.Contains(i + ",")); if (firstMatch == null) { result.A...
How to add missing numbers to a List
c#|asp.net|list
-2
293
5
44,061,275
44,061,275
1
true
2017-05-19T03:53:07.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add missing numbers to a List<p>I have an array list. Which contains month number and data as comma separated. Now I want to loop through this list an...
44,105,606
errer in code loading in perl<p>What is the problem I do not want to Please Wait be repeated</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>#!/usr/bin/perl Win32::Console...
<p>You are putting <code>print "Please wait"</code> inside the while loop, so it will keep printing. Also use <code>\b</code> after the <code>$chars</code> print and not after <code>Please wait</code></p> <pre><code>#!/usr/bin/perl use Win32::Console; use strict; use warnings; $|++; # turn off output buffering; my @c...
errer in code loading in perl
perl|progress-bar
-2
56
1
44,105,798
44,105,798
1
true
2017-05-22T06:01:18.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: errer in code loading in perl<p>What is the problem I do not want to Please Wait be repeated</p> <p><div class="snippet" data-lang="js" data-hide="false" da...
53,359,512
Send Multiple XMLHTTP Requests JavaScript<p>Am I able to send multiple XMLHttpRequests at once? I want to get data from three urls at once and two out of the three return status code 0</p>
<blockquote> <p>Am I able to send multiple XMLHttpRequests at once?</p> </blockquote> <p>Yes. The browser may or may not do all three at once (some mobile browsers limit themselves to two parallel requests), but most will, and if it doesn't your code won't really notice (one of the requests will just take a while lo...
Send Multiple XMLHTTP Requests JavaScript
javascript|xmlhttprequest
-2
57
1
53,359,528
53,359,528
0
true
2018-11-18T09:39:53.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Send Multiple XMLHTTP Requests JavaScript<p>Am I able to send multiple XMLHttpRequests at once? I want to get data from three urls at once and two out of the...
53,360,212
thread hungs,high cpu, c++<p>i have code like this:</p> <pre><code>bool isActive = false; DWORD WINAPI 123Thread(LPVOID); DWORD WINAPI 123Thread(LPVOID) { while (1) { if (GetAsyncKeyState(VK_NUMPAD1)) { MessageBox(0,L"1234456",L"6544321", MB_OK); } return 1; } } ...
<p>Your 123 tread is looping infinitely keeping the cpu busy all the time. Put a sleep after GetAsyncKeyState call:</p> <pre><code>std::this_thread::sleep_for(std::chrono::milliseconds(x)); </code></pre> <p>While sleeping, your process won't consume CPU resources. There might be some overhead since the kernel has ...
thread hungs,high cpu, c++
c++|multithreading|dll
-2
37
1
53,360,903
53,360,903
0
true
2018-11-18T11:14:22.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: thread hungs,high cpu, c++<p>i have code like this:</p> <pre><code>bool isActive = false; DWORD WINAPI 123Thread(LPVOID); DWORD WINAPI 123Thread(LPVOID) {...
53,369,620
Is it good to go ahead with webservice load testing?<p>We have an application which is meant for Android, iOS and desktop all 3 and all 3 are consuming webservices.</p> <p>What I would like to know is that, should we record scenarios from Android, iOS and desktop seperately and make script or we can just hit the web s...
<p>Well-behaved load test should represent application under test real-life usage as close as possible. If desktop, Android and iOS applications use the same endpoint and send the same requests in terms of parameters - it will be enough to come up with only one <a href="https://jmeter.apache.org/usermanual/component_re...
Is it good to go ahead with webservice load testing?
web-services|jmeter
-2
44
1
53,376,441
53,376,441
0
true
2018-11-19T06:50:17.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it good to go ahead with webservice load testing?<p>We have an application which is meant for Android, iOS and desktop all 3 and all 3 are consuming webse...
53,396,252
assigning protocol parameter to object member<p>In my header file i am defining a class member:</p> <pre><code>id&lt;IAdmobTestSuite&gt;* testSuite; </code></pre> <p>Later i want to assign this variable using this function:</p> <pre><code>- (void) setTestSuite:(id&lt;IAdmobTestSuite&gt;)_testSuite { if(testSuite == ...
<p><code>id</code> is a pointer, to fix the error you should remove the <code>*</code> in your header</p> <pre><code>id&lt;IAdmobTestSuite&gt; testSuite; </code></pre>
assigning protocol parameter to object member
objective-c|objective-c-protocol
-2
37
1
53,396,403
53,396,403
0
true
2018-11-20T15:25:44.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: assigning protocol parameter to object member<p>In my header file i am defining a class member:</p> <pre><code>id&lt;IAdmobTestSuite&gt;* testSuite; </code>...
53,406,537
Export WindowsForm with images and files<p>Well, I don't if I asked well this question because I have the next problem: <a href="https://i.stack.imgur.com/kvO8y.png" rel="nofollow noreferrer">Code</a></p> <p>As you can see here, in one of my many WindowsForms I read a specific file.exe as well with file.txt with their...
<p>If you have created exe for that, best suggestion that store those files in C drive as there will be no such folder of debug or release when you export exe. And even instance will be running from another folder which may be not same as you have provided folder path in your application. You should provide a path of f...
Export WindowsForm with images and files
c#|file|export
-2
37
1
53,407,007
53,407,007
0
true
2018-11-21T06:42:52.090Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Export WindowsForm with images and files<p>Well, I don't if I asked well this question because I have the next problem: <a href="https://i.stack.imgur.com/kv...
53,413,285
Access97 Compare two Dates<p>I'm trying to compare 2 dates with an SQL Query,</p> <p>My query is this : </p> <pre><code>"SELECT table.toto FROM table WHERE table.date &lt; $date" </code></pre> <p><code>$date</code> is a variable that comes from my PHP code</p> <p>In my table, my date is formatted like this : <code...
<p>Well, I found a solution to my problem.</p> <p>I don't know why but I just have set the "$date" format to : <code>n/d/Y</code> and to wrap it between "#" in code like this :</p> <pre><code>"SELECT table.toto FROM table WHERE table.date &lt; #date#" </code></pre>
Access97 Compare two Dates
php|sql|date
-2
40
1
53,413,780
53,413,780
0
true
2018-11-21T13:36:57.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Access97 Compare two Dates<p>I'm trying to compare 2 dates with an SQL Query,</p> <p>My query is this : </p> <pre><code>"SELECT table.toto FROM table WHERE...
53,414,527
How to add a new return type in LINQ<p>Hi I need to add a new stored procedure in my file dmbl I can to add but I do not know how to add a new return type </p> <p><a href="https://i.stack.imgur.com/AhUUa.jpg" rel="nofollow noreferrer">please see the image link</a></p>
<p>My problem was result the root cause was my stored procedure used a #table instead of @table <a href="http://riteshkk2000.blogspot.com/2010/08/error-unknown-return-type-return-types.html" rel="nofollow noreferrer">http://riteshkk2000.blogspot.com/2010/08/error-unknown-return-type-return-types.html</a></p>
How to add a new return type in LINQ
linq-to-sql
-2
19
1
53,415,957
53,415,957
0
true
2018-11-21T14:43:40.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add a new return type in LINQ<p>Hi I need to add a new stored procedure in my file dmbl I can to add but I do not know how to add a new return type </...
53,421,528
How can i assign a sequence of random string values to a variable? (Python)<pre><code>import random for x in range (10): print (random.choice('GACT'), end=random.choice('GACT')) </code></pre> <p>So I want the output of this code into a variable.</p>
<pre><code>&gt;&gt;&gt; x = ''.join([random.choice('GACT') for i in range(10)]) &gt;&gt;&gt; x 'CGGTGCCCTG' </code></pre> <p>Maybe something like this is what you are looking for?</p>
How can i assign a sequence of random string values to a variable? (Python)
python-3.x
-2
31
1
53,421,575
53,421,575
0
true
2018-11-21T22:50:16.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i assign a sequence of random string values to a variable? (Python)<pre><code>import random for x in range (10): print (random.choice('GACT'), en...
53,428,087
first steps in Angular and Laravel - re-compiling failed<p>I want to make changes in a new script. This is based on laravel and angularjs. With both in have no experience.</p> <p>So it seems that this work completely different as i normally work with standalone php and js files. I read that i have to re-compile the co...
<p>It was a problem with the server-setup.</p> <p>After uninstall angularjs and reinstall all commands work successful.</p>
first steps in Angular and Laravel - re-compiling failed
angularjs
-2
51
1
53,451,223
53,451,223
0
true
2018-11-22T09:49:21.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: first steps in Angular and Laravel - re-compiling failed<p>I want to make changes in a new script. This is based on laravel and angularjs. With both in have ...
53,459,785
Anylogic Error: <unknown> (Path) : The length is zero<p>I created a job shop model and when I try to run the model, the system give me the feedback:</p> <blockquote> <p>Error during model creation:</p> <p>root:</p> <p> (Path) : The length is zero</p> <p>java.lang.RuntimeException: root:</p> <p> (...
<p>This may happen when the length of a path is zero, meaning that the initial point of the path and the end point of the path are in the exact same location, so the relative points will be always zero: <a href="https://i.stack.imgur.com/aT85p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aT85p.png...
Anylogic Error: <unknown> (Path) : The length is zero
anylogic
-2
789
1
53,460,913
53,460,913
0
true
2018-11-24T15:45:30.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Anylogic Error: <unknown> (Path) : The length is zero<p>I created a job shop model and when I try to run the model, the system give me the feedback:</p> <bl...
53,459,031
Search bar widget custom design?<p>I want to create a custom search exactly like image below.</p> <p>Thanks very much</p> <p><a href="https://i.stack.imgur.com/xrH6z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xrH6z.png" alt="enter image description here"></a></p>
<p>Create new xml layout and replace with this code </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"&gt; &...
Search bar widget custom design?
android|android-layout
-2
38
1
53,461,471
53,461,471
0
true
2018-11-24T14:13:11.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Search bar widget custom design?<p>I want to create a custom search exactly like image below.</p> <p>Thanks very much</p> <p><a href="https://i.stack.imgur...
53,469,175
Invocation message while running gdb<p>Why does it give me this when i try to run in gdb ?</p> <pre><code>(gdb) run Starting program: /home//Cfile/./ginr Invocation: /home/Cfile/./ginr &lt;test case file&gt; &lt;results file&gt; [-repeat] [Inferior 1 (process 3615) exited with code 01] Missing separate debuginfos, u...
<p>That looks like a message from the program itself. If you try to run <code>/home/Cfile/./ginr</code> in a terminal without arguments you probably get the same results.</p> <p>You need to provide arguments when running the program, which is done almost the same inside <code>gdb</code>:</p> <pre><code>(gdb) run test...
Invocation message while running gdb
c|gdb
-2
25
2
53,469,211
53,469,211
0
true
2018-11-25T15:51:15.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Invocation message while running gdb<p>Why does it give me this when i try to run in gdb ?</p> <pre><code>(gdb) run Starting program: /home//Cfile/./ginr I...
53,445,206
Power Bi calender<p>please I need to make a calendar table to enjoy the privileges of some functions but my date field is formatted with hour minute and seconds and is not related to the automatic calendar that creates power bi.</p> <p>Who can help me gratefully.</p> <p>regards</p>
<p>You can add a calculated column to extract just the date part of your DATETIME field. Something like:</p> <pre><code>DateOnly = DATE ( YEAR ( TableName[DateTimeField] ), MONTH ( TableName[DateTimeField] ), DAY ( TableName[DateTimeField] ) ) </code></pre>
Power Bi calender
powerbi|powerbi-desktop|powerbi-datasource
-2
55
1
53,479,314
53,479,314
0
true
2018-11-23T10:47:10.233Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Power Bi calender<p>please I need to make a calendar table to enjoy the privileges of some functions but my date field is formatted with hour minute and seco...
53,497,793
Replace values in column with matching column in different DF<p>I have two data frames:</p> <pre><code>DF &lt;- data.frame(A=letters[1:5],B=1:5) DF_2 &lt;- data.frame(match_col = c("a","a","c")) </code></pre> <p>Here we have to get only matching columns of <code>DF_2$match_col</code></p> <pre><code>final_df &lt;- d...
<p>Your question here is not very clear. For youR DF_2, I am not sure if there is a column of B in it. I assume you forgot to include it, as I assume you need that column to perform matching.</p> <p>Please see below:</p> <pre><code>DF &lt;- data.frame(A=letters[1:5],B=1:5) DF_2 &lt;- data.frame(match_col = c("a","a"...
Replace values in column with matching column in different DF
r|dplyr|data.table
-2
52
1
53,499,336
53,499,336
0
true
2018-11-27T10:39:35.280Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace values in column with matching column in different DF<p>I have two data frames:</p> <pre><code>DF &lt;- data.frame(A=letters[1:5],B=1:5) DF_2 &lt;-...
53,418,684
How to change the name of the factors of the variable based on keywords in R?<p>I have a variable in which there are several levels containing "games" as key word.I can not manually change the levels of the variables .Instead I want to change all levels containing games to a common level.</p> <pre><code>For example C...
<p>Another way is with package <a href="https://cran.r-project.org/web/packages/forcats/index.html" rel="nofollow noreferrer"><code>forcats</code></a>, a CRAN package to work with factors.<br> I will work with <code>df2</code>, a copy of the original data.frame.</p> <pre><code>library(forcats) df2 &lt;- df new_games...
How to change the name of the factors of the variable based on keywords in R?
r
-2
42
2
53,419,249
53,419,249
1
true
2018-11-21T18:45:19.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change the name of the factors of the variable based on keywords in R?<p>I have a variable in which there are several levels containing "games" as key...
53,455,407
Swift Embedded ViewController in UIView Resize<p>I am adding a ViewController within a UIView using this code below...</p> <pre><code>let view = CustomerBusinessChat(collectionViewLayout: UICollectionViewFlowLayout()) view.otherUser = otherUser self.messagesView.addSubview(view.view) </code></pre> <p>The problem is t...
<p>This view <code>view.view</code> is like any other view — it needs to be given a <code>frame</code> to place it with respect to the bounds of its superview <code>self.messagesView</code>. Or, you can add autolayout constraints to size and position it.</p> <p>However, there is much more wrong with your code than tha...
Swift Embedded ViewController in UIView Resize
ios|swift
-2
74
1
53,455,556
53,455,556
1
true
2018-11-24T05:20:52.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Swift Embedded ViewController in UIView Resize<p>I am adding a ViewController within a UIView using this code below...</p> <pre><code>let view = CustomerBus...
53,488,218
Matlab Reading the coordinates from txt file and store them in a matrix<p>I generate 4 multivariate normal samples from given mu and sigma and store them in a txt file. The file consists of the x1-x2 pairs as following.</p> <p>1 2</p> <p>3 4</p> <p>5 6</p> <p>7 8</p> <p>So, what I try to do is read them from txt f...
<p>Use <code>dlmread</code>.</p> <pre><code>A = dlmread('vals.txt') </code></pre>
Matlab Reading the coordinates from txt file and store them in a matrix
matlab
-2
32
2
53,488,459
53,488,459
1
true
2018-11-26T20:04:38.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Matlab Reading the coordinates from txt file and store them in a matrix<p>I generate 4 multivariate normal samples from given mu and sigma and store them in ...
53,367,896
Jquery input multiple base on another input value<p>I wanna try multiplying input text base on another input. Example if i'm input value 3, it gonna show 3 input text, or if i'm input 4 is gonna show 4 input text. But my problem is every time i'm change input value it not resetting but still adding input.<br> Here my c...
<p>Simply by resetting the HTML content inside the $div element to ("") before the loop is called again, like this:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>$( "#numcol...
Jquery input multiple base on another input value
javascript|jquery
-2
37
3
53,367,953
53,367,953
2
true
2018-11-19T03:23:48.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jquery input multiple base on another input value<p>I wanna try multiplying input text base on another input. Example if i'm input value 3, it gonna show 3 i...
53,416,782
Benefit of defining model class in angular2+<p>While creating <strong>service</strong> for my domain i realized i can simply implement service using <strong>any</strong> type like this :</p> <pre><code>list(): Observable&lt;any&gt; { const url = this.appUrlApi + this.serviceUrlApi; return this.http.get(url, { ...
<p>You're effectively asking, "why use strong typing" since this isn't Angular specific. </p> <p>In a word: scalability. The bigger the program, the greater likelihood of mistakes. Types narrow down the what could possibly be going wrong. </p>
Benefit of defining model class in angular2+
angular|typescript
-2
36
2
53,417,390
53,417,390
2
true
2018-11-21T16:41:56.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Benefit of defining model class in angular2+<p>While creating <strong>service</strong> for my domain i realized i can simply implement service using <strong>...
53,459,475
Invalid Memory Address with http.SetCookie<p>I am working on an auth package called persona.</p> <p>Every thing works fine except one thing, when I try to set a cookie, I have an invalid memory address.</p> <pre><code>func Signup(user interface{}, username string, w http.ResponseWriter) error { key := []byte(rand...
<p>I think the problem might not be the <code>http.Cookie</code> object, but perhaps the <code>ResponseWriter</code> object (since <code>ResponseWriter</code> is an interface). For debugging, try checking it for <code>nil</code> before setting the Cookie. If it is <code>nil</code>, you’ll probably have to look up the s...
Invalid Memory Address with http.SetCookie
go|go-http
-2
29
1
53,459,745
53,459,745
2
true
2018-11-24T15:07:12.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Invalid Memory Address with http.SetCookie<p>I am working on an auth package called persona.</p> <p>Every thing works fine except one thing, when I try to s...
53,466,615
create a file at launch of ec2 instance<p>I have a file <code>file.txt</code> in my local machine.</p> <p>I want to create the same file with the same content automatically when the ec2 instance starts (let's say in the root directory for example).</p> <p>There is the <code>UserData</code> parameter of the <code>crea...
<p>You need to ask yourself "How can a computer on the Internet access <code>file.txt</code> on my local machine?"</p> <p>The answer, if you are following good security, is: "It can't!"</p> <p>Instead, think about where you can place <code>file.txt</code> such that the EC2 instances <em>can</em> gain access. The easy...
create a file at launch of ec2 instance
python|amazon-ec2|boto3
-2
2,628
1
53,469,952
53,469,952
2
true
2018-11-25T10:32:09.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: create a file at launch of ec2 instance<p>I have a file <code>file.txt</code> in my local machine.</p> <p>I want to create the same file with the same conte...
53,449,720
How can I use all classes from namespace instead of listing them all individually?<p>In my Controller I list all entities I have:</p> <pre><code>use App\Entity\Members; use App\Entity\Products; use App\Entity\Projects; </code></pre> <p>But because new Entities will automatically be created, I need instead something l...
<p>There is no available option in PHP to import all classes from particular namespace at once. </p> <p>In order to use a particular class you need to define so called Fully-qualified class name so it means to use <code>use</code> keyword for each class OR the other option is to import the namespace but when instantia...
How can I use all classes from namespace instead of listing them all individually?
php|symfony|controller|namespaces|entity
-2
40
1
53,449,955
53,449,955
3
true
2018-11-23T15:58:39.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I use all classes from namespace instead of listing them all individually?<p>In my Controller I list all entities I have:</p> <pre><code>use App\Ent...
53,357,942
Can not read proper buildozer logcat<p>Could you please help me to find location of error in my main.py code. Below is extract of logcat:</p> <pre><code>I/python ( 6494): Traceback (most recent call last): I/python ( 6494): File "main.py", line 17, in &lt;module&gt; I/python ( 6494): Builder.load_file('ver...
<p>The anwser is in inside your question.</p> <pre><code>&gt; File "main.py", line 17, in &lt;module&gt; </code></pre>
Can not read proper buildozer logcat
python|kivy|logcat|buildozer
-2
61
1
53,358,011
53,358,011
0
true
2018-11-18T04:37:34.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can not read proper buildozer logcat<p>Could you please help me to find location of error in my main.py code. Below is extract of logcat:</p> <pre><code>I/p...
53,365,644
How can i find if the user input was the same as an array's value<p>I have tried many thing's but still no success.</p> <pre><code>let rolearr = ["member", "nsfw", "minecraft", "lol", "dota", "gta", "rule"] if(rolearr.indexOf(args[0] &gt; -1 )){ //somthing } </code></pre> <p>args is the user input.</p>
<p>Try this, the <code>indexOf</code> function param should be <code>args[0]</code> that i'm supposing is a <code>string</code>, in your code you are passing a <code>boolean</code> as a result of evaluate <code>args[0] &gt; -1</code></p> <pre><code>let rolearr = ["member", "nsfw", "minecraft", "lol", "dota", "gta", "r...
How can i find if the user input was the same as an array's value
javascript|arrays|node.js
-2
23
1
53,365,671
53,365,671
0
true
2018-11-18T21:28:14.173Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i find if the user input was the same as an array's value<p>I have tried many thing's but still no success.</p> <pre><code>let rolearr = ["member", ...
53,440,816
How to POST checkbox values to array?<p>With the following I have a list of checkboxes:</p> <pre><code>&lt;form action="" method="POST" autocomplete="off"&gt; &lt;div class="form-group"&gt; &lt;?php $categories = get_categories( array( 'parent' =&gt; 184, 'hide_empty' =&gt; 0 ) ...
<p>Set the name as input arrays - </p> <pre><code>&lt;input type='checkbox' name="sample[]" value=".$cat-&gt;cat_ID."&gt; </code></pre> <p>And the code would be - </p> <pre><code> $arr = $_POST['sample']; wp_set_post_categories( $id, $arr, FALSE ); </code></pre>
How to POST checkbox values to array?
php
-2
27
1
53,440,853
53,440,853
0
true
2018-11-23T04:53:03.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to POST checkbox values to array?<p>With the following I have a list of checkboxes:</p> <pre><code>&lt;form action="" method="POST" autocomplete="off"&g...
53,471,267
GoogleMaps list results<p>I've been trying to make a nearby places app, and I've been wondering if there is any function that shows the results like on the image down below:</p> <p><img src="https://i.stack.imgur.com/t9GdB.png" alt="Screenshot"></p>
<p>To show the results like in the image above, you can create a custom view that will display each place informations, then use a recyclerview and an adapter. Then you can make a nearby search request based on the location of your choice and parse the results. </p> <p>You can find more explainations about nearby sear...
GoogleMaps list results
android
-2
22
1
53,471,804
53,471,804
0
true
2018-11-25T19:51:00.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GoogleMaps list results<p>I've been trying to make a nearby places app, and I've been wondering if there is any function that shows the results like on the i...
53,473,195
How to reason about levels of an enum<p>I have an account model with an enum defined as</p> <pre><code>enum access: [:basic, :silver, :gold, :platinum] </code></pre> <p>I would like to reason about the level of the account e.g</p> <pre><code>account.gold! account.access &lt; 'silver' </code></pre> <p>but <code>acco...
<p>Given the underlying value of access in the database is integer, then this can be done using the rails <code>_before_type_cast</code> method e.g.</p> <pre><code> def access_lt(level) access_before_type_cast &lt; Account.accesses[level] end </code></pre> <p>so then</p> <pre><code>account.gold! account.acces...
How to reason about levels of an enum
ruby-on-rails
-2
28
1
53,473,196
53,473,196
0
true
2018-11-25T23:53:53.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to reason about levels of an enum<p>I have an account model with an enum defined as</p> <pre><code>enum access: [:basic, :silver, :gold, :platinum] </co...
53,492,472
Regex, Separate according to punctuation R?<p>I know this is a <code>regex</code> question, which has probably been answered but I cannot figure out the answer to this particular question. I have a dataset of 5000 addresses, and some of the addresses are presented as:</p> <pre><code>199 REEDSDALE ROAD MILTON, MA (42.2...
<p>One option is to extract the numeric part with a regex lookaround</p> <pre><code>library(tidyverse) data_frame(lat = str_extract(lines, "(?&lt;=\\()-?[0-9.]+"), lon = str_extract(lines, "-?[0-9.]+(?=\\))")) # A tibble: 5 x 2 # lat lon # &lt;chr&gt; &lt;chr&gt; #1 42.252352 -71.07...
Regex, Separate according to punctuation R?
r|regex
-2
43
1
53,492,499
53,492,499
3
true
2018-11-27T03:50:44.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex, Separate according to punctuation R?<p>I know this is a <code>regex</code> question, which has probably been answered but I cannot figure out the answ...
53,458,793
How to debug a DLL exception in OpenCV?<p>There is no error in the code. The build is also successful. This is a problem that happens when I try to debug.</p> <p>My code</p> <p><a href="https://i.stack.imgur.com/cyQMr.jpg" rel="nofollow noreferrer">This is code I wrote in Visual Studio</a></p> <p>The error</p> <p><...
<p>First, you should improve your questioning format. Use this guide <a href="https://stackoverflow.com/help/how-to-ask">https://stackoverflow.com/help/how-to-ask</a></p> <p>On the right bottom of your code there is the call stack. You can see in penultimate line there is a call from line 10 of main function that trig...
How to debug a DLL exception in OpenCV?
opencv
-2
58
1
53,459,208
53,459,208
-1
true
2018-11-24T13:47:45.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to debug a DLL exception in OpenCV?<p>There is no error in the code. The build is also successful. This is a problem that happens when I try to debug.</p...
53,498,397
How to signing digital signature for macos app bundle and linux executable<p>I have an java swing application and building executable for three platform Window (exe), macOS(.app) an linux(.sh). I also have a .p12 file and need to signed for three platform executable.</p> <p>I have signed for exe file on windows by <co...
<p>you can extract the private key form the .p12 (pfx) with this command</p> <pre>openssl pkcs12 -in file.p12 -nocerts -out key.pem</pre> <p>then you can sign your file<pre>openssl rsautl -sign -inkey key.pem -in yourfile -out sigfile</pre></p> <p>and verify with<pre>openssl pkeyutl -verify -pubin -inkey pubkey.pem ...
How to signing digital signature for macos app bundle and linux executable
linux|digital-signature
-2
326
1
53,499,448
53,499,448
0
true
2018-11-27T11:12:19.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to signing digital signature for macos app bundle and linux executable<p>I have an java swing application and building executable for three platform Wind...
53,359,959
Could I replace or slice dash in array<p>Can I replace the dash in array until end of the string in array? If I have </p> <pre><code>["Doni-night", "Mike-night" ] </code></pre> <p>And I wantr the output to be array</p> <pre><code>["Doni", "Mike"] </code></pre> <p>Or we should use loop to slice them?</p>
<p>You can use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="nofollow noreferrer"><code>map()</code></a> and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split" rel="nofollow noreferrer"><code>split()</code><...
Could I replace or slice dash in array
javascript|arrays|regex|loops|replace
-2
288
3
53,359,993
53,359,993
1
true
2018-11-18T10:40:41.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Could I replace or slice dash in array<p>Can I replace the dash in array until end of the string in array? If I have </p> <pre><code>["Doni-night", "Mike-ni...
53,478,732
RegExp for specific string containing any number<p>This is probably a super simple RegExp, but I'm really bad and can only get so far. So can some one help please :)</p> <p>I want to test for a specific string that contains a number. So for example, <code>string/[0-9]/[*]</code>. So some examples:</p> <pre><code>/str...
<p>It looks like you need to ensure that after <code>/string/</code>, there are one or more digits, followed by either <code>/</code> or the end of the string:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lan...
RegExp for specific string containing any number
javascript|regex|string
-2
53
1
53,478,820
53,478,820
1
true
2018-11-26T10:04:39.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RegExp for specific string containing any number<p>This is probably a super simple RegExp, but I'm really bad and can only get so far. So can some one help p...
53,392,036
Get preview image for remote video<p>I have a link to the video (for example: <a href="http://example.com/video.mp4" rel="nofollow noreferrer">http://example.com/video.mp4</a>). I need to get the first frame of the video. I use:</p> <pre><code>func getPreviewImage(_ url: URL) -&gt; UIImage? { let asset = AVURLAsse...
<p>Try this.</p> <pre><code>func getThumbnailImageFromVideoURL(fromUrl url: URL) -&gt; UIImage? { let asset: AVAsset = AVAsset(url: url) let imageGenerator = AVAssetImageGenerator(asset: asset) do { let thumbnailImage = try imageGenerator.copyCGImage(at: CMTimeMake(value: 1, timescale: 60) , actua...
Get preview image for remote video
ios|swift|xcode|avkit
-2
583
1
53,392,107
53,392,107
1
true
2018-11-20T11:28:45.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get preview image for remote video<p>I have a link to the video (for example: <a href="http://example.com/video.mp4" rel="nofollow noreferrer">http://example...
53,492,604
sum up variables into new dataframe in r<p>I have two dataframes:</p> <pre><code>Name A1 A2 A3 B1 B2 B3 banana 1 2 1 5 1 2 apple 2 0 8 9 1 5 pear 3 8 7 0 1 2 </code></pre> <p>and </p> <pre><code>Name Group A1 A A2 A A3 A B1 B B2 B B3 B </code></pre> <p>I would like to make a new dataframe, which the variables are s...
<p>We <code>split</code> the 'Name' column of 'df2' by the 'Group' into a <code>list</code> of <code>vector</code>s, use it to subset the columns of 'df1', get the <code>rowSums</code> and create a new dataset with 'Name' column from 'df1' and the sum columns from the <code>lapply</code> output</p> <pre><code>df3 &lt;...
sum up variables into new dataframe in r
r
-2
73
3
53,492,653
53,492,653
1
true
2018-11-27T04:08:00.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: sum up variables into new dataframe in r<p>I have two dataframes:</p> <pre><code>Name A1 A2 A3 B1 B2 B3 banana 1 2 1 5 1 2 apple 2 0 8 9 1 5 pear 3 8 7 0 1 ...
53,378,623
ASP.NET Razor MVC Core WebApplication - problem with Sessions<p>following to <a href="https://www.c-sharpcorner.com/article/how-to-use-session-in-asp-net-core/" rel="nofollow noreferrer">this link</a></p> <p>When im trying to build app maked like this, i have problem in HomeController.cs :</p> <blockquote> <p>Error...
<p>Add <code>Nuget package</code> <code>Microsoft.AspNetCore.Http.Extensions</code> to your project.</p> <p>This will give you the extension methods for Session, such as <code>SetString</code> <code>GetString</code>, etc.</p> <p>Remember to add:</p> <blockquote> <p>using Microsoft.AspNetCore.Http;</p> </blockquote...
ASP.NET Razor MVC Core WebApplication - problem with Sessions
c#|asp.net|.net|asp.net-mvc
-2
285
1
53,378,691
53,378,691
1
true
2018-11-19T16:10:27.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ASP.NET Razor MVC Core WebApplication - problem with Sessions<p>following to <a href="https://www.c-sharpcorner.com/article/how-to-use-session-in-asp-net-cor...
53,473,658
How to clear every TextBox inside a GroupBox<p>I am having problem with emptying every TextBoxes inside a GroupBox, because my loop only clears all TextBoxes if <code>textbox1</code> has value but if I try to bypass <code>textbox1</code> and jump to input data to <code>textbox2</code>, my <code>ClearCtrlText</code> met...
<p>I would be tempted to write this as an extension method:</p> <pre><code>Imports System.Runtime.CompilerServices Public Module ControlExtensions &lt;Extension&gt; Public Sub ClearTextBoxes(source As Control) For Each child As Control In source.Controls Dim tb = TryCast(child, TextBox) ...
How to clear every TextBox inside a GroupBox
vb.net|winforms|textbox
-2
1,085
2
53,473,867
53,473,867
3
true
2018-11-26T01:22:18.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to clear every TextBox inside a GroupBox<p>I am having problem with emptying every TextBoxes inside a GroupBox, because my loop only clears all TextBoxes...
53,422,698
Remove parentheses from array value converted to string<p>I have a textview and when displaying text there are parentheses in the text. I want to eliminate them. This is my code:</p> <pre><code>self.txtpstn.text = "\(self.no_pstn.self as NSArray)" self.txtmobile.text = "\(self.no_mobile.self as NSArray)" </code></pr...
<p>Use join:</p> <pre><code>self.txtpstn.text = "\((self.no_pstn.self as NSArray).componentsJoined(by: ","))" self.txtmobile.text = "\(self.no_mobile.self as NSArray).componentsJoined(by: ","))" </code></pre>
Remove parentheses from array value converted to string
ios|swift|textview
-2
63
1
53,422,744
53,422,744
1
true
2018-11-22T01:29:58.370Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove parentheses from array value converted to string<p>I have a textview and when displaying text there are parentheses in the text. I want to eliminate t...
53,374,791
Why this Scala code is apparently not running on the Spark workers instead only on the Spark driver node?<p>I was using the code mentioned <a href="https://stackoverflow.com/questions/53371286/how-to-create-an-immutable-map-in-scala-using-foldings/53372180#53372180">here</a> to create an HashMap in Scala. Copy-pasting ...
<p>Things need to be in <code>RDD</code>, <code>Dataset</code>, <code>Dataframe</code> et al. for spark to distribute your computations. basically everything happens on the driver except for things that are in HoFs like <code>map</code> and <code>foreach</code> on one of those structures.</p>
Why this Scala code is apparently not running on the Spark workers instead only on the Spark driver node?
scala|apache-spark
-2
256
2
53,374,842
53,374,842
5
true
2018-11-19T12:35:02.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why this Scala code is apparently not running on the Spark workers instead only on the Spark driver node?<p>I was using the code mentioned <a href="https://s...
53,443,123
Convert an array of objects to string<p>I have <code>Person[] people</code> how could I transform this array into a string containing the CSV of each <code>Person</code>'s <code>Name</code>?</p> <pre><code>John, Donald, Jessika, ... </code></pre>
<pre><code>string.Join(", ", people.Select(p =&gt; p.Name)); </code></pre>
Convert an array of objects to string
c#|arrays|linq|.net-4.5
-2
70
3
53,443,145
53,443,145
3
true
2018-11-23T08:35:16.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert an array of objects to string<p>I have <code>Person[] people</code> how could I transform this array into a string containing the CSV of each <code>P...
37,995,070
Angular2 Universal, where and how to learn?<p>Angular2 Universal seems to me some kind of black magic, I can't find where I can learn this language from the beginning, neither in the official web site have an introduction to the language, only an documentation. Where I can learn this? Thank you.</p>
<p>Even thought there are <a href="https://www.youtube.com/watch?v=_-CD_5YhJTA" rel="nofollow noreferrer">some</a> really good video tutorials but I prefer <a href="https://www.ng-book.com/2/" rel="nofollow noreferrer">this</a> book which is the only complete reference that I found for Angular2 apart from the documenta...
Angular2 Universal, where and how to learn?
angular|angular2-universal
-2
329
2
40,537,182
40,537,182
3
true
2016-06-23T14:50:37.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular2 Universal, where and how to learn?<p>Angular2 Universal seems to me some kind of black magic, I can't find where I can learn this language from the ...
37,612,172
google maps direction not working on addEventListener<p>i follow tutorial on this link : <a href="https://developers.google.com/maps/documentation/javascript/examples/directions-complex" rel="nofollow">https://developers.google.com/maps/documentation/javascript/examples/directions-complex</a> to create maps direction. ...
<p><code>calculateAndDisplayRoute()</code> currently only removes the markers, but doesn't draw the routes.</p> <p>Fixed script:</p> <pre><code> var map; var markerArray = []; var markers = []; var feature = []; var i, marker,markerss; var content = '&lt;html&gt; &lt;style type=...
google maps direction not working on addEventListener
javascript|google-maps|google-maps-api-3
-2
565
1
37,613,089
37,613,089
0
true
2016-06-03T10:38:56.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: google maps direction not working on addEventListener<p>i follow tutorial on this link : <a href="https://developers.google.com/maps/documentation/javascript...
37,603,943
What is wrong with this my codes and its working<p>i want to use this code to fecth the selection of the usear and use for some further calculation but it aint working:</p> <p>my codes are as below</p> <p><strong>html codes</strong></p> <pre><code>&lt;select class="form-control" name="currency"&gt; &lt;option ...
<p>this codes worked for me</p> <p><strong>html codes</strong></p> <pre><code> &lt;div id="calculator"&gt; &lt;h3&gt;Calculator&lt;/h3&gt; &lt;form class="form-horizontal" action="index.php" method="POST" role="for...
What is wrong with this my codes and its working
php|html
-2
67
2
37,613,461
37,613,461
0
true
2016-06-02T23:55:47.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is wrong with this my codes and its working<p>i want to use this code to fecth the selection of the usear and use for some further calculation but it ai...
37,620,098
Html Http request read source<p>When I view a website in my browser (for example <a href="https://www.homedepot.ca/en/home/p.725-inch-miter-saw-with-laser.1000748698.html" rel="nofollow">https://www.homedepot.ca/en/home/p.725-inch-miter-saw-with-laser.1000748698.html</a>), it contains information that is not in the sou...
<p>Short answer: just by reading the source, you can't. The price is dynamically loaded from their servers (using javascript), after the page loaded. </p> <p>Using appropriate tools (such as the network tab in Chrome/Firefox's developer console) you can figure out where they retrieve the price from (in this case JSON ...
Html Http request read source
html|http|web
-2
32
1
37,620,229
37,620,229
0
true
2016-06-03T17:14:38.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Html Http request read source<p>When I view a website in my browser (for example <a href="https://www.homedepot.ca/en/home/p.725-inch-miter-saw-with-laser.10...
37,628,645
Newbie - I cant learn status of my enum or boolen after my activty gone to background?<p>I have app where I play one of my three music files. After the activity goes to the background, I reopen this UI activity toggle button comes as "Off" even if I changed its status last time. By the way I read android developer docu...
<p>You can use sharedPreferences to same the value of that boolean into cache. Do this in the onPause() method</p> <pre><code>Context context = getActivity(); SharedPreferences sharedPref = context.getSharedPreferences(Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit(); editor.putBoolean("MyBo...
Newbie - I cant learn status of my enum or boolen after my activty gone to background?
android|enums|android-mediaplayer
-2
32
1
37,628,776
37,628,776
0
true
2016-06-04T09:32:05.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Newbie - I cant learn status of my enum or boolen after my activty gone to background?<p>I have app where I play one of my three music files. After the activ...
37,628,956
Servlet doesn't go to JSP<p>When i am my ConfirmServlet at the end of the doPost() it should open my ResultServlet. But instead the link stays /Confirm at the end and i get a blank page. Could anyone help me whats wrong with my code.</p> <p><strong><em>ConfirmServlet</em></strong></p> <pre><code>package Servlet; imp...
<p>The problem was here Had to add " at getInitParameter. At both Servlets</p> <pre><code>@Override public void init() throws ServletException { // TODO Auto-generated method stub super.init(); new DriverLoader(); Confirmpage = getInitParameter("Confirmpage"); ResultURL = ge...
Servlet doesn't go to JSP
java|jsp|servlets
-2
44
1
37,629,258
37,629,258
0
true
2016-06-04T10:10:12.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Servlet doesn't go to JSP<p>When i am my ConfirmServlet at the end of the doPost() it should open my ResultServlet. But instead the link stays /Confirm at th...
37,620,917
java: Precision in double numbers<p>Been working with this code, from How to program in java 9th edition (Deitel), exercise 5.20...</p> <p>Calculate the value of π from the infinite series. π = 4 – 4/3 + 4/5 – 4/7 + 4/9 – 4/11 + … Print a table that shows the value of π approximated by computing the first 200,000 term...
<p>This works pretty good, remember that the author hasn't teach how to compare strings or anything like that yet, the code works ok now.</p> <pre><code>import javax.swing.JOptionPane; public class Pi { public static void main (String args[]){ double pi = 4; double fraccion = 3.0; double c...
java: Precision in double numbers
java|double|precision
-2
1,290
3
37,632,655
37,632,655
0
true
2016-06-03T18:08:15.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: java: Precision in double numbers<p>Been working with this code, from How to program in java 9th edition (Deitel), exercise 5.20...</p> <p>Calculate the val...
37,636,635
How to return -1 value?<p>Write a function called day_diff that takes four scalar positive integer inputs, month1, day1, month2, day2. These represents the birthdays of two children who were born in 2015. The function returns a positive integer scalar that is equal to the difference between the ages of the two children...
<p>You just need to assign a value to <code>dd</code> of <code>-1</code>:</p> <pre><code>... else dd = -1; return end </code></pre>
How to return -1 value?
matlab
-2
842
1
37,637,947
37,637,947
0
true
2016-06-05T01:39:21.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to return -1 value?<p>Write a function called day_diff that takes four scalar positive integer inputs, month1, day1, month2, day2. These represents the b...
37,662,854
When using Deployment Risk Analytics, what types of criteria can I use?<p>In IBM Bluemix Deployment Risk Analytics, I want to create different criteria for my tools to check and determine whether the users can move forward to the next step in the deployment pipeline. What are my options for the scope of those criteria...
<p>In its current release, Deployment Risk Analytics criteria is scoped for the user organization. All users and applications of the same Bluemix organization have access to the criteria.</p>
When using Deployment Risk Analytics, what types of criteria can I use?
ibm-cloud|deployment-risk-analytics
-2
53
1
37,665,882
37,665,882
0
true
2016-06-06T16:49:10.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: When using Deployment Risk Analytics, what types of criteria can I use?<p>In IBM Bluemix Deployment Risk Analytics, I want to create different criteria for m...
37,668,481
Trying to write a method to create an array list<p>I'm using Netbeans/GUI to make a fantasy basketball game program. I'm trying to create methods that create arraylists, that way I can call the method for the array every time I need it for one of my button events, rather than recode the array under each individual even...
<p>The declaration for <code>alCTeams</code> should be located under the <code>class</code> not the <code>method</code>.</p> <p>Like this:</p> <pre><code>public class JFMarchMadness extends javax.swing.JFrame { ArrayList&lt;BasketballTeam&gt; alCTeams=new ArrayList &lt;&gt;(); public JFMarchMadness() { initCom...
Trying to write a method to create an array list
java|user-interface|arraylist|methods|listbox
-2
56
3
37,668,504
37,668,504
0
true
2016-06-06T23:48:09.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to write a method to create an array list<p>I'm using Netbeans/GUI to make a fantasy basketball game program. I'm trying to create methods that create...
37,681,585
Save cropped image in SQL<p>I would like to save an photo in my SQL database, in a BLOB field. Now I'm doing it saving a byte array, but too much effort for the app to work...I changed the dimensions (BitmapFactory) in order to reduce app work, but the image is a sort of mosaicon and lacks of resolution. Actually I'm t...
<p>Try this</p> <pre><code> private void selectImage() { final CharSequence[] options = { "Take Photo", "Choose from Gallery","Cancel" }; AlertDialog.Builder builder = new AlertDialog.Builder(ProfileSettings.this); builder.setTitle("Profile Picture!"); builder.setItems(options, new Di...
Save cropped image in SQL
android|sqlite|photo
-2
58
1
37,681,959
37,681,959
0
true
2016-06-07T14:02:29.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Save cropped image in SQL<p>I would like to save an photo in my SQL database, in a BLOB field. Now I'm doing it saving a byte array, but too much effort for ...
37,749,575
Android Studio: can not git add new sub package<p>I have a strange problem with Android Studio. I checked out into a brand new branch. There I create a sub package to an existing main package. Inside that package I create some classes.</p> <p>Essentially it looks like this</p> <pre><code>com.package.stuff | som...
<p>Okay I tried it with the git terminal and it gave me the actual reason for that.</p> <p>The subpackage name was <code>out</code> and in my <code>.gitignore</code> I ignored <code>/out</code>. Apparently it doesn't consider if it has a different path.</p> <p>So well, I renamed the package and now it works again. Le...
Android Studio: can not git add new sub package
android|git|android-studio
-2
77
1
37,750,012
37,750,012
0
true
2016-06-10T13:30:04.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android Studio: can not git add new sub package<p>I have a strange problem with Android Studio. I checked out into a brand new branch. There I create a sub p...
37,785,996
migrate svn local repository to git repository<p>I have a svn local repository in svn://localhost/monprojet I want to convert it in git repository for example in D:\Repos\Git\test2 . I tried svn2git and git svn but always it failed . So what's the correct command to do that ? thanks .</p>
<p>1st you have to exportyour files from SVN repository. step-rightclick on your Repo then select tortoisesvn => export</p> <p>Then you have to create a new github repository. finally you can upload your SVN exported content into GIT repository</p>
migrate svn local repository to git repository
git|svn
-2
30
1
37,786,145
37,786,145
0
true
2016-06-13T09:20:05.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: migrate svn local repository to git repository<p>I have a svn local repository in svn://localhost/monprojet I want to convert it in git repository for exampl...
37,788,734
I have an Image View in a layout in android, how can i zoom it for a short time after clicking?<p>I'm a beginner in android programming. I only need to show to the user that he clicked on the image view by this short duration zooming. I need for this simple effect.</p>
<p>Here i am sending you code which can use for fadein and out:</p> <pre><code>Animation fadeIn = new AlphaAnimation(0, 1); fadeIn.setInterpolator(new DecelerateInterpolator()); //add this fadeIn.setDuration(1000); Animation fadeOut = new AlphaAnimation(1, 0); fadeOut.setInterpolator(new AccelerateInterpolator()); //...
I have an Image View in a layout in android, how can i zoom it for a short time after clicking?
android
-2
40
2
37,788,831
37,788,831
0
true
2016-06-13T11:32:01.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have an Image View in a layout in android, how can i zoom it for a short time after clicking?<p>I'm a beginner in android programming. I only need to show ...
37,650,699
How to separate a group of genres I'm scraping and updated to a nested attribute?<p>I'm scraping a site and I'm collecting the genres for each book. For example I'm getting "Action, Drama, Romance" into a string a now i want to separate each genre to add it to a collection so the book can be in the action list or roman...
<p>I figured it out with the code below. </p> <pre><code>genre_scrape = doc.css('div:contains("Genres")').text.split(' ')[1..-1] genre_text = genre_scrape.blank? ? "" : genre_scrape genre = [] genre_text.each do |g| genres = g.gsub(/\,/,"") genre &lt;&lt; Genre.where(title: genres).first_or_create do |genre| ...
How to separate a group of genres I'm scraping and updated to a nested attribute?
ruby-on-rails|ruby|nokogiri
-2
80
2
37,794,770
37,794,770
0
true
2016-06-06T06:19:25.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to separate a group of genres I'm scraping and updated to a nested attribute?<p>I'm scraping a site and I'm collecting the genres for each book. For exam...
37,819,559
How to get the updated Apk file from the android studio.?<p>I am developing an android application. All the things is going well when I run the application into genymotion virtual device.And Since the apk is stored in F:...\app\build\outputs\apk location. So I just want to collect it from this location and download it...
<p>Go to <em>Build > Build APK</em> to generate a normal APK. Go to <em>Build > Generate Signed APK</em> to generate signed APK.</p> <p>Signed APK are those which we generate to release our application. Here it is, why is it necessary to generate signed APKs: <a href="https://stackoverflow.com/questions/23906799/why-s...
How to get the updated Apk file from the android studio.?
android|apk
-2
8,240
4
37,819,747
37,819,747
0
true
2016-06-14T18:29:14.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the updated Apk file from the android studio.?<p>I am developing an android application. All the things is going well when I run the application i...
37,825,637
Deleted anaconda to remove python3 in the hopes of going back to python2<p>I installed python3 with anaconda when I did some of my ML stuff. Now I wanted to use python2 for a script I'm building but python defaults to python3 and I couldn't find any solution to switch or remove python3 so I deleted anaconda folder hopi...
<p>Try</p> <pre><code>python2 myscript.py </code></pre> <p>instead of</p> <pre><code>python myscript.py </code></pre> <p>Since python points to python3 in your case. If you want to uninstall python3: <a href="https://superuser.com/questions/276840/uninstalling-python-3-on-a-mac">refer this</a></p> <p>Alternatively...
Deleted anaconda to remove python3 in the hopes of going back to python2
python|macos|python-2.7|python-3.x
-2
335
2
37,826,799
37,826,799
0
true
2016-06-15T03:33:42.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Deleted anaconda to remove python3 in the hopes of going back to python2<p>I installed python3 with anaconda when I did some of my ML stuff. Now I wanted to ...
37,833,649
Lightbox stacking?<p>Just wondering, is it possible to open a lightbox in an already opened lightbox? I'm currently using Featherlight to open a lightbox, and I want to open a featherlight gallery lightbox from within that lightbox. (Does that make sense? XD )</p>
<p>Yes, <code>featherlight</code>s can be nested (no limit).</p>
Lightbox stacking?
javascript|jquery|html|css|featherlight.js
-2
67
1
37,835,760
37,835,760
0
true
2016-06-15T11:05:59.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Lightbox stacking?<p>Just wondering, is it possible to open a lightbox in an already opened lightbox? I'm currently using Featherlight to open a lightbox, a...
37,849,374
how to send data with a link tag from a servlet<p>In my servlet I do this :</p> <pre><code>protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); ...
<p>If you take out the string concatination and look at the tag that you are building</p> <pre><code>s += "&lt;a href='#' onclick=hideDiv('')&gt;&lt;/a&gt;&lt;br&gt;"; </code></pre> <p>You can see that you are not enclosing the value of the onclick attribute properly in qoutes.</p> <pre><code>"&lt;a href='#' oncl...
how to send data with a link tag from a servlet
javascript|java|servlets
-2
64
1
37,849,457
37,849,457
0
true
2016-06-16T03:24:24.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to send data with a link tag from a servlet<p>In my servlet I do this :</p> <pre><code>protected void processRequest(HttpServletRequest request, HttpSer...
37,610,726
Exported PDF file is not scaled as per setting<p>My Excel file is in A4 paper size but the export PDF is in Letter paper size. <a href="http://i.stack.imgur.com/SyFb6.png" rel="nofollow">Excel file</a> and the <a href="http://i.stack.imgur.com/PTups.png" rel="nofollow">Exported PDF using MS Excel</a></p>
<p>I think, this might be due to application setting. In MS Excel, File->Option->Advanced-> disable Scale to A4 or 8.5 * 11 option. This might resolve your issue.</p> <p><a href="http://i.stack.imgur.com/ptYSP.png" rel="nofollow">Setting screen shot</a></p>
Exported PDF file is not scaled as per setting
excel
-2
31
1
37,611,133
37,611,133
1
true
2016-06-03T09:28:58.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Exported PDF file is not scaled as per setting<p>My Excel file is in A4 paper size but the export PDF is in Letter paper size. <a href="http://i.stack.imgur...
37,691,130
How to download a URL in JavaScript (Nodejs)?<p>I used this link to make an original link into a download link: <a href="https://milanaryal.com/2015/direct-linking-to-your-files-on-dropbox-google-drive-and-onedrive/" rel="nofollow">https://milanaryal.com/2015/direct-linking-to-your-files-on-dropbox-google-drive-and-one...
<p>It's easiest to use a module such as <a href="https://github.com/request/request" rel="nofollow">Request</a> to do a HTTP get from a node script.</p> <p>For example:</p> <pre><code>var request = require('request'); request.get('https://drive.google.com/uc?export=download&amp;id=FILE_ID', function(err, res, bod...
How to download a URL in JavaScript (Nodejs)?
javascript|node.js|parsing|url|download
-2
590
2
37,691,205
37,691,205
1
true
2016-06-07T23:38:54.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to download a URL in JavaScript (Nodejs)?<p>I used this link to make an original link into a download link: <a href="https://milanaryal.com/2015/direct-l...
37,760,476
github Push permission denied over both SSH and HTTPS<p>New to git and Github. An author suggested in an issue discussion that I make a pull request. I cloned his repo <a href="https://help.github.com/articles/which-remote-url-should-i-use/" rel="nofollow noreferrer">with the recommended HTTPS link</a> on my personal m...
<p>In order to open a pull request you'll need to "fork" the repo. You can do this from the GitHub web interface.</p> <p>Once you've created a fork, you can add it as a remote for your local clone:</p> <pre><code>$ git remote add my-fork &lt;uri-for-my-fork&gt; </code></pre> <p>Then you can push your branch to your...
github Push permission denied over both SSH and HTTPS
git|github|ssh
-2
538
1
37,760,702
37,760,702
1
true
2016-06-11T05:56:53.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: github Push permission denied over both SSH and HTTPS<p>New to git and Github. An author suggested in an issue discussion that I make a pull request. I clone...
37,762,458
Java vector resizing could be problematic like in C++?<p>If I have, for example, an hashmap of this type:</p> <pre><code>HashMap&lt;String,ArrayList&lt;Integer&gt; &gt; tag_posizioni; tag_posizioni.put( "A",new ArrayList&lt;Integer&gt;() ); tag_posizioni.get("A").add(3); </code></pre> <p>So, I have resized my Arrayl...
<p>There is nothing wrong with this code, when you call:</p> <pre><code>tag_posizioni.get("A").add(3); </code></pre> <p>then <code>tag_posizioni.get("A")</code> returns a reference to object on which <code>add(3)</code> is called. This object (ArrayList) changes its internal data structures, what it does internaly i...
Java vector resizing could be problematic like in C++?
java|arrays|memory|memory-management
-2
55
1
37,762,581
37,762,581
1
true
2016-06-11T10:07:27.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java vector resizing could be problematic like in C++?<p>If I have, for example, an hashmap of this type:</p> <pre><code>HashMap&lt;String,ArrayList&lt;Inte...
37,764,728
RegEx Skip last part of a string if it has a forbidden word<p>For a couple of example strings I'd like to strip the end of the string if the parentheses contain a forbidden word.</p> <p>Example list of strings:</p> <pre><code>Test House (selled) Seahouse (selled) Motorbike (unconfirmed) Bike (very good) </code></pre>...
<p>I think you're making this way harder than it needs to be.</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>var d = $("div"), str = d.html(); str = str.replace(/ \((selled|unconfirmed)\)/...
RegEx Skip last part of a string if it has a forbidden word
regex
-2
52
1
37,764,791
37,764,791
1
true
2016-06-11T14:14:04.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RegEx Skip last part of a string if it has a forbidden word<p>For a couple of example strings I'd like to strip the end of the string if the parentheses cont...
37,655,015
Why values in 'main' are not changed using pointers?<p>I have some problems when I use pointers. In this program I want to input a text with <code>ElaboraTesto</code> and after with <code>Sdoppia</code> to put tokens into two different arrays: </p> <ul> <li><code>StructTesto Pari[]</code> if their length is even. </li...
<p>In the <code>Sdoppia</code> function you have these four lines:</p> <pre><code>int j=0; int k=0; ld = &amp;j; lp = &amp;k; </code></pre> <p>The problem with this is that the pointers to the variables in the <code>main</code> function you pass in will be overwritten with the pointers to the local variables <code>j<...
Why values in 'main' are not changed using pointers?
c
-2
46
1
37,655,177
37,655,177
2
true
2016-06-06T10:24:18.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why values in 'main' are not changed using pointers?<p>I have some problems when I use pointers. In this program I want to input a text with <code>ElaboraTes...
37,801,559
I can't save Image to file<pre><code>public void selectAndConvert(){ DirectoryResource dr = new DirectoryResource(); for (File f : dr.selectedFiles()){ ImageResource inImage = new ImageResource(f); ImageResource gray = makeGray(inImage); String fname = inImage.getFi...
<p>getFileName is probably returning a complete path (eg c:\...\images\test.png). Prepending "gray-" would result in gray-c:\...</p> <p>Try finding the last '\' and then inserting "gray-" right after that.</p>
I can't save Image to file
java
-2
54
1
37,801,582
37,801,582
2
true
2016-06-14T01:25:10.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I can't save Image to file<pre><code>public void selectAndConvert(){ DirectoryResource dr = new DirectoryResource(); for (File f : dr.selecte...
37,797,734
which clustering algorithm is best for clustering one-dimensional features?<p>Which clusetring machine learning algorithm is best to be used for clustering one-dimensional numerical features (scalar values)? Is it Birch, Spectral clustering, k-means, DBSCAN...or something else?</p>
<p>All of these methods are better for multivariate data. Except for k-means which historically was used on oneudimensional data, they were all <strong>designed with the multivariate problem in mind</strong>, and none of them is well optimized for the particular case of 1-dimensional data.</p> <p>For one-dimensional d...
which clustering algorithm is best for clustering one-dimensional features?
algorithm|machine-learning|scikit-learn|cluster-analysis|scalar
-2
844
2
37,803,586
37,803,586
2
true
2016-06-13T19:31:10.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: which clustering algorithm is best for clustering one-dimensional features?<p>Which clusetring machine learning algorithm is best to be used for clustering o...
37,640,809
Compile time error in dereferencing the map pointer<pre><code>#include &lt;iostream&gt; #include &lt;map&gt; #include &lt;vector&gt; using namespace std; struct node{ int data; struct node *left; struct node *right; }; struct node* newNode (int data) { struct node *temp = new struct node; temp-&gt;data...
<p>Because of <a href="http://en.cppreference.com/w/cpp/language/operator_precedence" rel="nofollow"><em>operator precedence</em></a> the expression</p> <pre><code>*m[index].push_back(root) </code></pre> <p>is the same as</p> <pre><code>*(m[index].push_back(root)) </code></pre> <p>In other words, you try to derefer...
Compile time error in dereferencing the map pointer
c++
-2
45
2
37,640,836
37,640,836
3
true
2016-06-05T10:21:28.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Compile time error in dereferencing the map pointer<pre><code>#include &lt;iostream&gt; #include &lt;map&gt; #include &lt;vector&gt; using namespace std; s...
37,821,303
Python evaluating/compiling a string<p>I want to evaluate a string to accomplish the following. The string will be coming from an xml config file. This is how I would configure a serial option without a config file:</p> <pre><code>import serial ser = serial.Serial(/dev/ttyUSB0) ser.parity = serial.PARITY_MARK ...con...
<p>Are you looking for <code>getattr</code>?</p> <pre><code>getattr(serial, 'PARITY_MARK') == serial.PARITY_MARK </code></pre>
Python evaluating/compiling a string
python
-2
70
1
37,821,340
37,821,340
3
true
2016-06-14T20:15:41.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python evaluating/compiling a string<p>I want to evaluate a string to accomplish the following. The string will be coming from an xml config file. This is ...
37,633,899
Confused with MainActivity.java in android studio<p>I'm fairly new to java and android studio in general,and I'm trying to follow a tutorial on YouTube on how to make a simple android calculator by Andy York. I made it to part 2 of 2 until he started coding in MainActivity.java, when I noticed that ours were different ...
<p>Those are coming because you select a that theme. So, Select the Empty Activity. Then nothing will make problem . </p> <p><a href="https://i.stack.imgur.com/segxK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/segxK.png" alt="enter image description here"></a></p>
Confused with MainActivity.java in android studio
android|android-studio
-2
73
2
37,633,953
37,633,953
0
true
2016-06-04T18:57:57.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Confused with MainActivity.java in android studio<p>I'm fairly new to java and android studio in general,and I'm trying to follow a tutorial on YouTube on ho...
37,657,462
My wordpress blog is getting more views and visitors but my website does not while it has same data over it<p>I have created a wordpress blog previously and it is working very fine and getting lot of visitors and users but when I have created/hosted my website using same wordpress blog but it is not getting that much v...
<p>This may be because you are not continuously upgrading your website so that it can be easily searchable in google's or search engine's searching. Wordpress blogs are continuously getting upgraded using keywords to get the ranking in search engines. In simple words, you should focus on your website's SEO (Search engi...
My wordpress blog is getting more views and visitors but my website does not while it has same data over it
wordpress
-2
26
1
37,672,085
37,672,085
0
true
2016-06-06T12:26:28.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My wordpress blog is getting more views and visitors but my website does not while it has same data over it<p>I have created a wordpress blog previously and ...
37,764,841
Java networking, cant figureout what's wrong with multithread server<p>my name is Jędrzej and I am new here. I was trying to write a simple chat in java. I am trying to make multithread server so multiple clients can connect to this server. My client works fine, but if I run two clients, they dont see each others resp...
<p>The way you've implemented this, you're reading a message from one client and then writing it back to the <em>same</em> client.</p> <p>You'll need to revise your program so that you can write the message to the <code>Socket</code> of the other connected client.</p>
Java networking, cant figureout what's wrong with multithread server
java|multithreading
-2
49
1
37,765,715
37,765,715
0
true
2016-06-11T14:26:13.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java networking, cant figureout what's wrong with multithread server<p>my name is Jędrzej and I am new here. I was trying to write a simple chat in java. I ...
37,608,515
delete the number one by one from vector after every 30 seconds input taken from console<p>I want to delete the after every 30 seconds of the current time and the input should be taken form console.So After deletion of 1st number, after 30 sec 2nd number should be deleted</p> <pre><code> #include &lt;time.h&gt; #incl...
<p>Hum..</p> <p>To answer your main problem, you can use in C++11 the thread library like that.</p> <pre><code>#include &lt;thread&gt; #include &lt;chrono&gt; int main(int argc, char **argv) { std::vector&lt;int&gt; v(1000); std::iota(std::begin(v), std::end(v), 0); for (int i=0;i&lt;v.size();i++) { ...
delete the number one by one from vector after every 30 seconds input taken from console
c++
-2
48
1
37,609,240
37,609,240
1
true
2016-06-03T07:31:20.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: delete the number one by one from vector after every 30 seconds input taken from console<p>I want to delete the after every 30 seconds of the current time an...
37,759,110
am i using @font face incorrectly?<p>can anyone tell me why i cant seem to get a font to work on my site</p> <p>css</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>@fontface { font-family...
<p>you have a typo, missing a <code>-</code> between @Font and Face,</p> <p>Anyhow, his is how you should use <code>@font-face</code> correctly (using Google Fonts sample)</p> <pre class="lang-css prettyprint-override"><code>@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: lo...
am i using @font face incorrectly?
html|css
-2
39
1
37,759,133
37,759,133
1
true
2016-06-11T01:28:42.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: am i using @font face incorrectly?<p>can anyone tell me why i cant seem to get a font to work on my site</p> <p>css</p> <p><div class="snippet" data-lang="...
37,828,461
How to make array inside array where common id is found multiple times in php<p>This is what my Array looks like:</p> <pre><code>( [0] =&gt; stdClass Object ( [question_id] =&gt; 2 [question] =&gt; Which career is help to achive mca? [answer_id] =&gt; 1 [answ...
<p>You can use a simple <code>foreach</code> loop to incrementally construct an associative array comprising of questions and the associative answers, like this:</p> <pre><code>// Declare $result_arr array to store the result array $result_arr = array(); // Suppose $arr is your original array foreach($arr as $obj){ ...
How to make array inside array where common id is found multiple times in php
php|arrays|json
-2
59
1
37,829,291
37,829,291
1
true
2016-06-15T07:12:19.987Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make array inside array where common id is found multiple times in php<p>This is what my Array looks like:</p> <pre><code>( [0] =&gt; stdClass Ob...
37,698,267
How to update Multiple radio button value into database using id<p>I have listed my table(leaveform) records(50) using datatable API. In my table I have a column to approve leave. This column consist of two radio buttons(Approve and Reject). Each record have its own unique id. Now I want to update the values into datab...
<p>You can create one function and that function is called by clicking on 'Approve' or 'Reject'. Let me give you example.</p> <p>For e.g. : you have two radio button as below. Approve and Reject</p> <p>Now, You have to create one function that will be called by clicking on radio button. as explained below.</p> <pre>...
How to update Multiple radio button value into database using id
php|jquery|mysql
-2
1,330
3
37,699,337
37,699,337
2
true
2016-06-08T09:18:41.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to update Multiple radio button value into database using id<p>I have listed my table(leaveform) records(50) using datatable API. In my table I have a co...
37,825,435
Excel Conditional Formatting based on the data on the right cell<p>I want to set conditional formatting where the cell is equal to "3", then color red the cell on the left of it. Refer example below:</p> <p><a href="https://i.stack.imgur.com/eBj4x.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eBj4...
<p>In the below image (complete with column letters and row numbers) I selected B3:G6 and created a new <a href="https://support.office.com/en-au/article/Use-a-formula-to-apply-conditional-formatting-fed60dfa-1d3f-4e13-9ecb-f1951ff89d7f" rel="nofollow noreferrer">Conditional Formatting</a> rule based on the following f...
Excel Conditional Formatting based on the data on the right cell
excel|excel-formula
-2
72
1
37,825,767
37,825,767
2
true
2016-06-15T03:06:00.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel Conditional Formatting based on the data on the right cell<p>I want to set conditional formatting where the cell is equal to "3", then color red the ce...
37,678,768
objective c-how can i decrement the number in uilabel when text is type in texfield in ios?<p>Here is my code: </p> <pre><code>(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { //_length -= 1; //[self.lbl setText:[NSStrin...
<p>First of all set delegate for this textField. Try this code: </p> <pre><code>- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { if (textField == AnswerText) { if (([AnswerText.text length] + [string length]) &gt; 15) { ...
objective c-how can i decrement the number in uilabel when text is type in texfield in ios?
objective-c|iphone
-2
68
1
37,678,942
37,678,942
0
true
2016-06-07T11:58:49.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: objective c-how can i decrement the number in uilabel when text is type in texfield in ios?<p>Here is my code: </p> <pre><code>(BOOL)textField:(UITextFie...
37,689,119
How do I return the number of items found after I do a search?<p>Please help me to figure out how I can get a count of the result when I do a search against a specific folder? </p> <p>Also how can I ask the user if they want to perform another search?</p> <pre><code>// Importing utilities import java.io.File; import...
<p>If you want to count your matches you can do the following</p> <pre><code> int i=0; // Posting the contents for(String folders : content) { if(folders.toUpperCase().startsWith(userInput.toUpperCase())) { System.out.println("Name: " + folders); i++; } ...
How do I return the number of items found after I do a search?
java
-2
47
4
37,689,272
37,689,272
0
true
2016-06-07T20:51:43.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I return the number of items found after I do a search?<p>Please help me to figure out how I can get a count of the result when I do a search against ...
37,779,087
Google Cloud Messaging Fee for sending to many number of users<p>I need to use Google Cloud Messaging to send new news as push notifications for over 6000 users, but I need to know the estimated costs for that. Any help would be appreciated.</p>
<p>As stated in the <a href="https://developers.google.com/cloud-messaging/gcm" rel="nofollow">GCM Overview</a> doc:</p> <blockquote> <p>Google Cloud Messaging (GCM) is a <strong><em>free service</em></strong> that enables developers to send messages between servers and client apps.</p> </blockquote> <p>And if you'...
Google Cloud Messaging Fee for sending to many number of users
google-cloud-messaging
-2
48
1
37,781,193
37,781,193
0
true
2016-06-12T21:07:15.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google Cloud Messaging Fee for sending to many number of users<p>I need to use Google Cloud Messaging to send new news as push notifications for over 6000 us...
37,628,917
Program produces wrong Output<p>Having trouble with the program below. I am basically novice in Java right now.</p> <p>The code looks like below:</p> <pre><code>public class IfElseIf{ public static void main(String []args) { int date=26; int month=9; int year=1995; if ((date...
<p>You're using the wrong operators; <code>|</code> is bitwise "OR", and you want logical "AND", which is <code>&amp;&amp;</code>.</p>
Program produces wrong Output
java
-2
48
1
37,628,964
37,628,964
1
true
2016-06-04T10:06:27.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Program produces wrong Output<p>Having trouble with the program below. I am basically novice in Java right now.</p> <p>The code looks like below:</p> <pre>...
37,750,737
Setting primary key for two tables<p>How to set some_id column in a table which is integer to be a primary key for two different tables? some_id is a column of a second table, but doesn't exist in the first one. Do I need to add some_id in the first table too and how to connect them? </p>
<p>Yes, if you want to have a foreign key to another table you'll need that column's primary key as a field.</p> <p>For example Table A: books</p> <pre><code>id name author_id </code></pre> <p>Table B: authors</p> <pre><code>id first_name last_name </code></pre> <p>If you created books without a reference to auth...
Setting primary key for two tables
ruby-on-rails|primary-key
-2
59
1
37,752,179
37,752,179
1
true
2016-06-10T14:26:09.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting primary key for two tables<p>How to set some_id column in a table which is integer to be a primary key for two different tables? some_id is a column ...
37,769,946
Trouble getting a value from <a> link - PHP<p>My problem is that I need to save a value from the link as a variable which will then do something. Below is my main code for this problem.</p> <pre><code>&lt;table&gt; &lt;? foreach ($csv as $row) : ?&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="?GoToProfile"&gt;...
<p>Use an ampersand (<strong>&amp;</strong>) instead of a question mark</p> <pre><code> &lt;a href="?GoToProfile&amp;id=&lt;?php $row[0]; ?&gt;"&gt;&lt;? echo $row[0]; ?&gt;&lt;/a&gt; </code></pre> <p>The <strong>?</strong> indicates the beginning of the query string, which is the data sent on a <strong>GET</strong> ...
Trouble getting a value from <a> link - PHP
php|get|href
-2
38
1
37,769,959
37,769,959
1
true
2016-06-12T01:32:53.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trouble getting a value from <a> link - PHP<p>My problem is that I need to save a value from the link as a variable which will then do something. Below is m...
37,656,845
How to modify the Verilog code to avoid syntax error?<p>the function is: when h posedge come, start count clk, if count to 105, r set 0, if count to 517, r set to 1; if count over 600,do nothing; h is a periodic singal;</p> <pre><code> module make_counter(h, clk, P); input wire h; input wire clk; ...
<p>Buddy you have some sort of bad code,</p> <ul> <li>Don't use always block inside always block</li> <li>Make variable name meaning full i.e. <code>cnt</code> instead of <code>n</code></li> <li><p>Use reset, and avoid value assignment at declaration </p> <pre><code>module make_counter(h, clk, P); input wire h; input...
How to modify the Verilog code to avoid syntax error?
verilog|fpga
-2
260
1
37,657,426
37,657,426
0
true
2016-06-06T11:57:27.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to modify the Verilog code to avoid syntax error?<p>the function is: when h posedge come, start count clk, if count to 105, r set 0, if count to 517, r s...