input_text_instruct stringlengths 288 45.8k | output_text stringlengths 37 33.2k |
|---|---|
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GNU Makefile get directory names and concat string<p>I need to write a makefile code that would get a list of all directories under a specific path and extra... | <p>The result that you want is computable by <code>make</code> without the use of
any target or recipe:</p>
<p><strong>Makefile (1)</strong></p>
<pre><code>DIRS := $(patsubst %,foo-%,$(notdir $(wildcard mypath/*)))
$(info $(DIRS))
</code></pre>
<p>which runs like:</p>
<pre><code>$ make
foo-c foo-b foo-a
make: *** N... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Inalid column name after creating<p>I am creating SQL calls (SQL Server 17) on the fly from a C# program to update columns if they have invalid settings (siz... | <p>Couple options.</p>
<p>1) Make separate calls to the database (less efficient).</p>
<p>First call, creates column.
Second call, updates column (it exists now, so no error).</p>
<p>2) Make one call to the database, and "hide" the query so it can't be validated, in a nested dynamic SQL query.</p>
<p>ex:</p>
<pre>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Retrieving data from checkbox - php<p>I have a <code>Choice</code> list contain 4 types of Articles. The user should take one choice. Now the list become con... | <p>You could automate the looking for allowed natures like so:</p>
<pre><code>public function setNature($nature) {
$allowed_nature = ['A','B','Production'];
if(in_array($nature, $allowed_nature)){
$this->_nature = $nature;
}else{
$this->_nature = 'all';
}
}
</code></pre>
<p>The o... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Object is not subscriptable python error django<p>I have this function where i am using models 'Start' and 'End' that contain fields latitude and longitude..... | <p>Keep in mind that in your for loop the variables <code>d['start']</code> and <code>d['end']</code> each contain an instance of the <code>Start</code> model. To manipulate the fields of an instance you should use the dot <code>.</code> (you should use subscript when dealing with subscriptable objects - see <a href="h... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is passing literal string as template parameter not good<p>I'm working on a c++ project and I just defined a function as below:</p>
<pre><code>template<ty... | <blockquote>
<p>My question is if the compiler will deduce two independent functions, one is for char[4] and the other is for char[3]?</p>
</blockquote>
<p>It will.</p>
<blockquote>
<p>If I call many func with const char* as above, the compiler will generate many independent functions?</p>
</blockquote>
<p>You don't ca... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
does the filter with new date() accept format other than yyyy-mm-dd?<p>I have a response from mydatepicker in the following format</p>
<pre><code>{
"is... | <p>To get the end of a day, first convert the parse-able text into a date, then manipulate that date.</p>
<pre><code>let object = this.formGeral.value.data; // for our sanity
let jsDate = new Date(object.singleDate.jsDate);
jsDate.setUTCHours(23,59,59,999);
</code></pre>
<p>Keep the <code>formatted</code> stri... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get All index locations for specific month/day for all years<p>Given a Pandas PeriodIndex of </p>
<pre><code>x = pd.PeriodIndex(start='1/1/2000', end='12/31... | <p>Using <code>month</code></p>
<pre><code>x[x.month==10]
Out[455]:
PeriodIndex(['2000-10-01', '2000-10-02', '2000-10-03', '2000-10-04',
'2000-10-05', '2000-10-06', '2000-10-07', '2000-10-08',
'2000-10-09', '2000-10-10',
...
'2010-10-22', '2010-10-23', '2010-10-24',... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Visual Studio 2015 Community not debugging<p>If I put a break point on a line in a MVC project and then run the project. It'll break on the line and then wh... | <p>Saw this post earlier... <a href="https://stackoverflow.com/questions/33547907/is-there-visual-studio-2015-debugging-step-skipping">Is there Visual Studio 2015 Debugging step skipping?</a> but only just noticed the answer hidden in the comments rather than the answer. </p>
<p>@mituw16 - see if your "Optimize code... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I make template.Execute() to write to a file rather than to response.Writer?<p>I have a below code to parse the template file and write the parsed ht... | <p>Here's one way to do it:</p>
<pre><code>t, err := template.ParseFiles("view.html")
if err != nil {
// handle error
}
// Create the file
f, err := os.Create("parsed.html")
if err != nil {
// handle error
}
// Execute the template to the file.
err = t.Execute(f, "Hello World!")
if err != nil {
// handle... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modify Control Order in VC14 Build Menu Bar<p>You can customize the control order of the build toolbar in Tools->Customize->Commands and settings Menu Bar: t... | <p>The 'Context Menu' refers to the right-click options tab. In particular the 'Class View Context Menus' and 'Project and Solution Context Menus' refer to the options created on the solution browser. </p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL combine two columns into one column, one another row<p>I have following output</p>
<pre><code>+--------------+---------------+-----------+-----+------... | <p>You can use conditional <a href="https://dev.mysql.com/doc/refman/8.0/en/control-flow-functions.html#operator_case" rel="nofollow noreferrer"><code>CASE..WHEN</code></a> expressions to determine accordingly. </p>
<pre><code>SELECT
CASE store_update_stock.order_status
WHEN 'purchase' THEN tbl_supplier.suppli... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to create a template<p>I am trying to create a dataflow template using the below mvn command And i have a json config file in the bucket where i need ... | <p>Your code uses classic Dataflow templates, and it has several limitations. The biggest one (and what's also affecting you) is that they can't support dynamic parameters. That means, all the parameters MUST be available at the time of running.</p>
<p>The reason is, Dataflow generates a compiled template with the DAG... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RaycastHit returns no hit when objects swap positions<p>I am moving a row of boxes and want to create an infinite effect. Every last box will swap its positi... | <p>Adding a rigidbody to each box fixed my problem.</p>
<p>Edit: Well, it only works when I dont put the Boxcast check like shown above. It works when I put it in Update before the movingblocks method which is called on the next frame.</p>
<p>So by using Rigidbodys it still does not hit on the exact frame but on the ne... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to track a caller for native getters / setters of host objects in a browser?<p>Here is a use case:</p>
<p>Assume we have a web page that has an issue, w... | <p>Turns out it is possible to use <code>debug</code> function for <code>set</code> method on a <code>scrollTop</code> property descriptor.</p>
<p>The code is as follows:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
makefile not finding header file from -I include path<p>I have the makefile given below. When I do <code>make</code> I get the following error</p>
<pre><cod... | <p>You have not written a rule for building timing.o from timing.c, so Make uses the default rule it has for that.</p>
<p><strong>But</strong> that rule uses <code>CFLAGS</code>, not <code>CXXFLAGS</code>. The <code>CXXFLAGS</code> variable appears in the rule for building object files from C++ sources.</p>
<p>So mod... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot Install NPM Package - Code 128 An unknown git error occurred<p>I'm trying to install the package <code>@truffle/hdwallet-provider</code> .</p>
<p>As w... | <p>Actually, it's a well-known bug.
<a href="https://github.com/trufflesuite/truffle/issues/2852" rel="nofollow noreferrer">https://github.com/trufflesuite/truffle/issues/2852</a></p>
<p>Using this solved the problem:</p>
<pre><code>npm i @truffle/hdwallet-provider@next
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Properly storing, archiving and deleting TBs of data everyday - PostgreSQL<p>I have a system that creates a lot of data, around 3-4 TB per day.
It receives d... | <p>You'll probably want to partition on the date, drop the previous day's partitions. See <a href="https://www.postgresql.org/docs/current/ddl-partitioning.html#DDL-PARTITIONING-DECLARATIVE" rel="nofollow noreferrer">Declarative Partitioning</a> for how to do that. Be sure to use the most up to date version of PostgreS... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace missing html_nodes while using rvest in R<p>I am trying to parse an html which has a few li elements inside them.This is just a sample html I have ... | <p>Instead of parsing all of the tags in one pass, I parsed out the div.brewery into a list of elements/nodes and then extracted the requested information from each brewery individually. Not as efficient but it tracks the relevant information to each parent. This model is assuming only one child element per parent. ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot convert Matlab code to C code using Matlab Coder<p>I have a MATLAB code shown in below. I am trying to convert this code to C code using MATLAB Coder ... | <p>You have declared <code>tic, toc</code> as extrinsic which is correct since they are not supported for code generation. Since they are extrinsic, the results from these functions cannot be directly used in other expressions. Coder does not know the contents of these results at run-time. But you can provide hints on ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
A TestNg Multithreading Issue. TestNg does not respect the child threads<p>I have a very simple class that asynchronously writes a list to a file :</p>
<pre... | <p>As the files are written asynchronously, <code>FileOpsTest.asynWriteListToFile()</code> ends before the files are all written and org.testng.TestNG (or your IDE's test runner) calls <code>System.exit(int)</code> (e.g. <a href="https://github.com/cbeust/testng/blob/44f890ad06a6a76bd47cc86b8b0d1c0612ce623b/src/main/ja... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if there is a key which has a specific value in Array PHP<p>I've this array here:</p>
<pre><code>Array (
[0] => stdClass Object (
[id] =>... | <p>You could use <code>array_reduce</code>:</p>
<pre><code>if (array_reduce($my_array, function ($c, $v) { return $c || $v->pinned == 1; }, false)) {
//One value of the pinned key is 1
} else {
//No value of the pinned key is 1 -> skip
}
</code></pre>
<p><a href="https://3v4l.org/1nG6L" rel="nofollow no... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Plotting a 3d-function fails<p>I try to plot the function f(x,y)=(100-(x^2*y^2))^0.5 in Matlab using</p>
<pre><code>x = 0:0.1:10;
y = 0:0.1:5;
[X,Y] = meshgr... | <h2>Real-Component of a Matrix</h2>
<p>Try taking the <code>real()</code> component of <code>z</code>. The imaginary components are a result of <code>100-(X.^2.*Y.^2)</code> computing to a negative value at various <code>X</code>, <code>Y</code> values. The exponent <code>0.5</code> (square root) of a negative number r... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to encode values that appear less than N times with special category ("Other", for instance)?<p>I have 12 columns of type <code>object</code>, and I want... | <h4>Disclaimer: since previously I only used R language, I try to avoid the usage of for-loops and that is why this solution was not obvious for me</h4>
<p>I found for myself the following solution for my specific problem. It is based on selecting column values which length is less than <code>N</code> with a usage of <... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python syntax error in list comprehension on string for Lemmatization<p>I'm trying to only perform Lemmatization on words in a string that have more than 4 l... | <p>You could try with this list comprehension:</p>
<pre><code>[lemmatizer.lemmatize(w) if len(w)>4 else w for w in wd]
</code></pre>
<p>Then, if you want a single string considering your input sample, you can use the Python <code>join</code> operation on strings:</p>
<pre><code>' '.join([lemmatizer.lemmatize(w) if l... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is sqlconnection.open nosing around in my config file?<p>Today I thought, Oh, I'll just add some SQL logging to a C# SFTP custom (console) program we hav... | <p>The group is not needed, so far the following has got around the original issue:</p>
<pre><code><configuration>
<configSections>
<section name="CustomAppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Delete every second worksheet starting with the first (so 1, 3, 5...)<p>I am currently using a VBA code from Kutools that lets me combine all my worksheets i... | <h2>Copy Data From Every Other Worksheet</h2>
<pre class="lang-vb prettyprint-override"><code>Sub CombineEveryOtherWorksheet()
Const wsName As String = "Combined"
Dim hrCount As Variant
Dim msg As Long
Do
hrCount = Application.InputBox("The number of title rows", &... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Emulate codePen twilight theme<p>I'm trying to make sublime text to look like <a href="http://codepen.io/" rel="nofollow noreferrer">codepen.io</a> twilight ... | <p>The yellow underlined items in your example are class names (a special case of variable name in JavaScript (and most languages).</p>
<p>I don't believe a syntax scope exists in JS for class names. It seems they are scoped as simple variables. Assuming I am right you are going to need to define your own syntax scope... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Enabling intellisense in groovysh<p>Is it possible to enable intellisense in groovysh, in similar lines of what python offering? </p>
<p>Code completion fea... | <p>I found an alternative. If you use Windows Powershell, code completion works in groovy. You can type any command and use tab to code completion. It was not working on plain command shell.</p>
<p>The only tradeoff I found in Powershell (with groovysh) is: arrowkeys won't work. However you can use Ctrl P and Ctrl N.<... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python - replace string with condition yields weird result<p>I wrote a function that replace the letter if the letter is the same as the next letter in the s... | <p>You should use:</p>
<pre><code>word = word.replace(word[i],'7', 1)
</code></pre>
<p>to indicate that you want to make one character replacement. Calling <code>replace()</code> without indicating how many replacements you wish to make will replace any occurrence of the character <code>"e"</code> (as found at <code>... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA Excel Variable Sorting on Multiple Keys/Orders<p>How can I sort on multiple columns (keys/orders) at the same time? When I run my below code it re-sorts ... | <pre><code>Sub sdad()
wsLast_Row = Cells(Rows.Count, 2).End(xlUp).Row
With ActiveWorkbook.ActiveSheet.Sort
.SortFields.Clear
.SortFields.Add Key:=Range("A3:A" & wsLast_Row), Order:=xlAscending
.SortFields.Add Key:=Range("B3:B" & wsLast_Row), Order:=xlAscending
.SortFields... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I load an elixir library in a simple elixir script?<p>In ruby scripts, I could simply do:</p>
<pre class="lang-rb prettyprint-override"><code>require... | <p>There are no global package installs in Elixir like there are in Ruby. While it might be technically possible to compile the dependencies into <code>.beam</code> files and add them to the load path of your scripts (like the article you linked to does), if you want behavior somewhat similar to Ruby, I would recommend... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how do i supply textbox values to my sql statement using Dapper?<p>The error message for both button clicks is:</p>
<p>Additional information: The member Id ... | <p>You need to send the Text inside the textbox as the parameter value, not the TextBox itself</p>
<pre><code>connection.Execute(
"Delete from Student Where Id = @Id",
new { Id = txtStudentID.Text }
// ^^^^^
);
</code></pre>
<p>It would be best not to ask SQL Server to do a data con... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python script to assign id based on dataframe fields<p>I'm trying to write an iterative script in python that would see assign an id to a customer based on w... | <p>You can do that in SQL.</p>
<pre><code>select a.name
, min(b.id)
from customers a
join id_lookup b
on ( (a.attr1 = b.attr1 or b.attr1 is null)
and (a.attr2 = b.attr2 or b.attr2 is null)
and (a.attr3= b.attr3 or b.attr3 is null) )
group by a.name;
</code></pre>
<p>I'm sure you could also solve the... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i read an image, if it was dragged from another tab?<p>I found, that it is possible to read files (images in my case) on dragging from another browse... | <p>Got it. Let's add id="dropbox" to our container. So, the solution is:</p>
<pre><code>$('#dropbox').on("drop", function(e){
e.stopPropagation();
e.preventDefault();
var dt = e.originalEvent.dataTransfer,
files = dt.files;
if(files.length > 0){
// process files
}
else{
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure sticky-session/sourceIP load balancing and instance probing<p>We have a cluster of instances running as workerroles on Azure. They contain services tha... | <h3>Short story:</h3>
<p>Any flow already established will persist unless of course the destination itself dies; this is about new flows only. The ability to pin all flows from a <em>specific source to a specific VM</em> irrespective of the health status of the backend pool is not supported in Azure Load Balancer and n... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Two FKs as one PK in NHibernate-Mapping?<p>My database looks like this</p>
<pre><code> Role Role_AppUser AppUser
--------... | <p>In the mapping you can use a CompositeId:</p>
<pre><code>public class Role_AppUserMap : ClassMap<Role_AppUser>
{
public Role_AppUserMap()
{
Table("Role_AppUser")
CompositeId()
.KeyProperty(x=>x.RoleId, "Id")
.KeyProperty(x=>x.UserId, "UserId");
}
}
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wildfly TimerService unsatisfied dependencies<p>I'm having some trouble configuring a timer in java. To be precise - I'm receiving the following error when t... | <p>The <code>TimerService</code> is a JEE application server resource. It is not automatically available to CDI to be <code>@Inject</code>-ed. The way to obtain it (ref e.g. the <a href="http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html" rel="nofollow noreferrer">JEE tutorial</a>) is:</p>
<pre><code>@Resource
Ti... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Split strings into different columns not working correctly<p>I am working with a large dataset with a column for reviews which is comprised of a series of st... | <blockquote>
<p>when i use df["A"].unique() there are entries that should not be in the column. I only want 'A' to appear there</p>
</blockquote>
<p>IIUC, you wanted to create dummy variables instead?</p>
<pre class="lang-py prettyprint-override"><code>df2 = df.join(df['review'].str.get_dummies(sep=',').pipe(... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Turkish Identity Number Verification<p>How can I make sure that the given text is Turkish Identity Number? I have seen <a href="https://gist.github.com/onury... | <p>You could shorten it a little bit without losing readability to:</p>
<pre><code>private static boolean verifyNumber(String nationalityNumberStr) {
if(nationalityNumberStr.startsWith("0") || !nationalityNumberStr.matches("[0-9]{11}") ){
return false;
}
int [] temp = new int [11];
for (int i ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
combined backend calls in Angular2<p>I m trying to make a backend call in order to get some data and do the second call from it. Backend calls working perfec... | <p>You could use the following to chain promise. In this case, the final <code>then</code> callback, the response is the response of the second call.</p>
<pre><code>this.userService.performRequestLoginToBackend(
this.formLogin.value.username,
this.formLogin.value.password).then(response => {
data = r... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to recursively access every value of every key in dict, including nested ones?<p>I have a dict that has an undetermined number of elements with undetermi... | <p>How about this:</p>
<pre class="lang-py prettyprint-override"><code>def recursive_dict_access(some_dict: dict):
print (f'recursive_dict_access called on {some_dict["name"]}')
for key, value in some_dict.items():
# if value is an empty list
if isinstance(value, list) and not value:
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bootstrap select input's width appears shorter than other inputs (text)<p>I am facing a weird peroblem in bootstrap. I am sharing an image of the inputs :</p... | <p>There are many things wrong in your code. First, by using bootstrap, you start with a row, and then inside that row you fit everything you want inside of it. You have a column, and then 3 rows.</p>
<p>What you should do:</p>
<pre><code><form class="row">
<div class="col">
first ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to convert to json from excel in js i have prublem with spilt lines<p>i have excel file That I uploaded to react i'm use XLSX library
this is my excel
<a... | <p>I solved the problem using the following code I hope it will help more people who have had difficulty with it
I continue the code above</p>
<pre><code> const [items, setItems] = useState([]);
setItems(d);
let i = 0
for ( i ; i <= items.length - 1; i++) {
try {
if (items[i].Orders) {
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
# in hyperlink prevent the copy of full hyperlink<p>I have made a macro that is copying over hyperlinks from one column to another. </p>
<p>Macro works just... | <p>Try replacing the <code>newlink</code> with:</p>
<pre><code>newLink = Range("B" & i).Hyperlinks(1).Address + "#" + Range("B" & i).Hyperlinks(1).SubAddress
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
excel - hyperlink to different workbook and specific worksheet? RunTime Error 5<p>I have two workbooks Workbook1 and Workbook2. In my Workbook2 in one of th... | <p>Two things I believe are wrong with this. </p>
<p>Firstly the syntax its disliking is the <code>cells("E:E").value</code> I think you need to specify one cell value at a time. </p>
<p>Secondly the workbook address should be under address and then the sheet and cell reference under sub address. </p>
<p>Try somethi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How Hibernate process '?'<p>I'm new in Hibernate. I can't understand how Hibernate process <strong>?</strong> in <code>Restrictions.sqlRestriction()</code> m... | <p>Yes, <strong>?</strong> is a placeholder that is filled with "Fritz%".</p>
<p><strong>%</strong> it's a wildcard, and it is often used with <code>like</code> like in this case.<br />
Basically the query search for every Cat whose name start with "Fritz".</p>
<p><strong>EDIT</strong><br />
I didn'... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filter out nulls and garbage values in pandas<p>I have a dataframe as shown:</p>
<pre><code>Name Email Phone
Mohan mohan.k@gmail.com ... | <p>Use <code>to_numeric</code> and fill <code>NaN</code> values</p>
<pre><code>pd.to_numeric(df.Phone, errors='coerce').fillna('Rectify')
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to avoid the initial GET of an img tag?<p>When loading the page the following error occurs:</p>
<p><a href="https://i.stack.imgur.com/wUWK4.png" rel="no... | <p>Just use ng-src. This will create the src attribute once it is ready.</p>
<pre><code><img ng-src="{{content.images.image[0].url}}" />
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swift inherence task<p>Some days ago I moved to swift coding after objc. And when I writing adapter with MVVM pattern, I confused with next case, which could... | <p>There are a couple of approaches:</p>
<ol>
<li><p>You can override stored property with computed property that is a front-end to your own private stored property e.g.:</p>
<pre><code>class UsersViewController: IDTableViewController {
private var usersViewModel: UsersPresenter?
override var viewModel: IDCol... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Apache POI: default Excel cell styles<p>Is there are a way to use default Excel cell styles (see below) in Apache POI, similar to default data formats in <a ... | <p>If "a way to use default Excel cell styles" means to be able to style cells using a named cell style using <code>apache poi</code>, then no, this is not possible.</p>
<p>The cell style templates are exactly this, templates for cell styles. If chosen in Excel GUI, the GUI creates a cell style on workbook le... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Excel - How to use the OFFSET function where the reference is in one column but not in a static cell location?<p>So say I have data like this:</p>
<p><a href... | <p>The formula below assumes that your data don't extend outside the A1:AZ1000 range:</p>
<pre><code>=INDEX(A1:AZ1000,MATCH("production",A1:A1000,0)+1,AGGREGATE(15,6,POWER(10,LOG10((B2:AZ2>0)*COLUMN(B2:AZ2))),1))
</code></pre>
<p>(the references to row 2 are because the data in your screenshot start on tha... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace repeated value based on sequence size - Matlab<p>I have a 2D matrix composed of ones and zeros.</p>
<pre><code>mat = [0 0 0 0 1 1 1 0 0
1 1 1 ... | <p>You can use <code>diff</code> to find the start and end points of the runs of 1, and some logic based on that to zero out the runs which are too short. Please see the below code with associated comments</p>
<pre><code>% Input matrix of 0s and 1s
mat = [0 0 0 0 1 1 1 0 0
1 1 1 1 1 0 0 1 0
0 0 1 0 1 1 0 ... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
YARD how to document @return type for a method that returns fixed-size array?<p>I have the following method:</p>
<pre class="lang-rb prettyprint-override"><c... | <pre class="lang-rb prettyprint-override"><code># @return [Array(Boolean, Number)] fixed-size array(vector) of a boolean followed by a number
def foo
[true_or_false, some_integer]
end
</code></pre>
<hr />
<p>Do not confuse it with other similar <code>@return</code> tag format:</p>
<pre class="lang-rb prettyprint-over... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Count unique numbers in a line of a matrix<p>I have a matrix:</p>
<pre><code> >ACTTT ASB 0.098
0 0 1 0
0.75 0 0.25 0
... | <pre><code>$ awk 'NR>1{print gsub(/(^|[[:space:]])0([[:space:]]|$)/,"&")}' file
3
2
3
3
3
3
3
3
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Erratic encoding of byte to string on Python 3 on Ubuntu<p>I'm new to Python and am working on a sensor.
I'm building my code line by line and I have trouble... | <p>This may have have happened because your string had a non ascii character. When you ran your code again there was no non ascii character in the string and hence it ran successfully.</p>
<p>You can encode the non ascii characters by using encode() function</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I sort an IntStream in ascending order?<p>I've converted a 2D int array into a Stream:</p>
<pre><code>IntStream dataStream = Arrays.stream(data).fla... | <p>Try with </p>
<pre><code>dataStream.sorted().boxed().collect(Collectors.toList());
</code></pre>
<p>because <code>collect(Collectors.toList())</code> does not apply to a <code>IntStream</code>.</p>
<p>I also think that should be slightly better for performance call first <code>sorted()</code> and then <code>boxed... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
using link, compile and controller function together in directive<p>I am new to angular, I am still trying to learn a lot, there is one thing I came across,n... | <p>Link function is a part of compile function. If you defined compile, you override the compile function, pre link function and post link function.
Your can write your compile function like this : </p>
<pre><code>compile: function(elem,attrss){
console.log("compile function called");
return {
pre: function(... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to hide a chart in a section<p>I have a chart element in a section on my form, I need to hide the chart according to some rules, I know the way to hide a... | <p>If you see something similar to this on a form:</p>
<p><a href="https://i.stack.imgur.com/hJab5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hJab5.png" alt="chart on form" /></a></p>
<p>It's nothing more than a subgrid set as a chart:</p>
<p><a href="https://i.stack.imgur.com/L24vg.png" rel="no... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Haskell : Will GHC optimize this?<p>Can GHC simplify <code>id = (\(a, b) -> (a, b)).(\(a, b) -> (a, b))</code> into <code>id = \(a, b) -> (a, b)</co... | <p>You can ask these questions of ghc by running it with <a href="https://downloads.haskell.org/~ghc/8.0.2/docs/html/users_guide/debugging.html" rel="noreferrer"><code>-ddump-simpl</code></a>. This will cause ghc to dump the "core" code that it compiles programs into. Core is an intermediate language between the part o... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ruby object to_s gives unexpected output<p>What is the correct way to view the output of the <code>puts</code> statements below? My apologies for such a simp... | <p>Just use <code>.inspect</code> method instead of <code>.to_s</code> if you want to see internal properties of objects.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Group rows in text file and select conditionally which to keep with python<p>I have a file which i have to manipulate using Python.<br/>
The file consists of... | <pre><code>import pandas as pd
a = [['John Taylor', '2010-05-07', 'M', 'ClsA'],
['Mary Oliver', '2010-01-29', 'F', 'ClsA'],
['Peter Edwards', '2010-10-23', 'M', 'ClsA'],
['Robert Lewis', '2010-12-02', 'M', 'ClsB'],
['Emily Clark', '2009-12-04', 'F' ,'ClsB'],
['Jeremy Wood', '2009-08-15', 'M', 'ClsB'],
['Will Bennett',... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass out parameter to function from Swift FFI?<p>Let's say I have a function defined in Rust, which looks like this:</p>
<pre class="lang-rust prettyp... | <pre><code>var length = UnsafeMutablePointer<Int32>(bitPattern: 0)
</code></pre>
<p>You need to pass <em>storage</em> for your out-parameters. This is defining a null pointer. When Rust tries to write the result to address 0, it crashes, since you don't have access to write there.</p>
<p>Instead of creating two l... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Refresh dll charged by DllImport<p>I'm using an API for my C# project. I also have an installer that setup the executable (named uEye) on version 4.7.</p>
<... | <blockquote>
<p>I wonder if DllImport does not use a kind of cache?</p>
</blockquote>
<p>There is indeed a cache. The unmanaged DLL is loaded the first time that your application calls a function in that library. At that point the DLL is loaded in your .net process and it will stay loaded until that process terminat... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Map().set() does not add element in Collection, using NativeScript<p>I recently have had a problem when coding using NativeScript.
I tried using Map() object... | <p>Actually it works, if you try <code>r.get("one")</code> then you will see <code>two</code> in console.</p>
<p>May be <code>console.dir</code> does not handle <code>Map</code> as expected. You may report that in the GitHub project.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pick image without using filepicker in windows phone 8.1<p>I want to fetch image or path of an image which is stored in the specific folder and specific name... | <p>Issue solved. Actually I wasn't disposing the stream.</p>
<pre><code> using (var outputStream = stream.GetOutputStreamAt(0))
{
DataWriter writer = new DataWriter(outputStream);
writer.WriteBytes(responseBytes);
await writer.StoreAsync();
aw... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to execute "trunk serve"<p>I was getting into Rust and looking at these simple instructions for Yew framework (a frontend framework for Rust).</p>
<p>... | <p>Fix it by installing <code>wasm-bindgen-cli</code>:</p>
<p><code>cargo install --locked wasm-bindgen-cli</code></p>
<p>This is mentioned in this PR on <em>trunk's</em> GitHub: <a href="https://github.com/thedodd/trunk/pull/375" rel="noreferrer">https://github.com/thedodd/trunk/pull/375</a></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Counting trailing new line characters in a string<p>Hello I have a python string in such a way</p>
<pre><code>s = "Hello world\n\n"
</code></pre>
<p>I want... | <p>Use <a href="https://docs.python.org/3/library/stdtypes.html#str.rstrip" rel="nofollow noreferrer"><code>str.rstrip</code></a>:</p>
<pre><code>>>> s = "Hello world\n\n"
>>> s.rstrip("\n")
'Hello world'
</code></pre>
<p>Then just check the difference:</p>
<pre><code>>>> s = "Hello world\... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I crop Detected Face from the Video Streaming and store it in a folder using OpenCV Java?<p>I am using OpenCV 2.4.9, Java language and eclipse. My Fa... | <p>In your code, you are detecting Face rectangles as MatOfRect and drawing a rectangle on the video.</p>
<pre><code>Core.rectangle(webcam_image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(0, 255,0));
</code></pre>
<p>Here, you already have the roi of the image you nee... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Element-wise matrix division in Matlab is returning only binary values<p>I am reading two images as matrices in Matlab and want to create a third image, whic... | <p>It depends on your image data and how you load it. An 8-bit image loaded e.g. with <code>imread</code>, is stored as integer matrix (<code>uint8</code>). Images with higher bit-depth are stored with <code>uint16</code> or more.</p>
<p>So you could either process your image by casting the matrix to <code>double</cod... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What's different btw color.status.added and color.status.updated for git config?<p>I currently changed my git config color.</p>
<p>As I can see <a href="htt... | <p>As mentioned in the docs: "<em>added</em> <strong>OR</strong> <em>updated</em> is for files which are added but not committed".</p>
<p>The following code is from git version <a href="https://github.com/git/git/blob/53f9a3e157dbbc901a02ac2c73346d375e24978c/builtin/commit.c#L1192" rel="nofollow noreferrer">v2.18.0</a... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Discord.js error '.addChoice' is not a function<p>i have some Problems with my Code that somehow none of my friends have ...</p>
<p>Some Code to see:</p>
<pr... | <p><code>.addChoice()</code> is outdated. Now, there is only <code>.addChoices()</code> (with an s)</p>
<pre class="lang-js prettyprint-override"><code>.addStringOption(option =>
option.setName('type')
.setDescription('Specify the Equipment')
.setRequired(true)
.addChoices({
n... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Visual Studio option to turn a written code block into a method?<p>A while ago I was watching a video where the presenter cleaned up his code by highlighting... | <p>It was probably refactoring. Highlight your code, right click and select "Quick Actions and Refactorings", then select "Extract Method". (Or choose Edit Menu > Refactor > Extract Method.)</p>
<p>You'll be able to change the name of the new method. Visual Studio does its best to figure out what types are needed as p... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Understand Kivy order-of-creation, changing root widget results in crash<p>Using a <strong>Screenmanager as the root widget</strong>, I have some simple code... | <p>The problem is that you are doing this in the <code>__init__()</code> method of your <code>MainScreenManager</code>. At that point, the <code>Screens</code> have not yet been created. You can just move that logic into an <code>on_kv_post()</code> method, so that the code is not run until the <code>kv</code> rules ar... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to obtain the derived class type from base when calling a method<p>Ive searched the internet and didnt immediately see a solution, should be simple but I... | <p><code>.GetType()</code> returns actual type of current object. It doesn't return base type. So if you do <code>SomeMethod(new Derived1())</code>, <code>obj.GetType()</code> will return <code>Derived1</code> (seems like that is what you want).</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my data empty when i add it to my dataframe column?<p>I use a filter to check for conditions in my dataframe so i can mark them. </p>
<pre><code>filt... | <p>Problem is your <code>DataFrame</code> constructor, because is created default <code>RangeIndex</code> so possible different indices in both DataFrames, data are not alignes and you get NaNs column for rows with different index values.</p>
<p>Solution is converting values to numpy arrays:</p>
<pre><code>filtering... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dynamically assembling scrapy GET request string<p>I've been working with firebug and I've got the following dictionaries to query an api.</p>
<pre><code>ur... | <p>Look at the signature of the <code>Request</code> initialization method:</p>
<pre><code>class scrapy.http.Request(url[, callback, method='GET', headers, body, cookies, meta, encoding='utf-8', priority=0, dont_filter=False, errback])
</code></pre>
<p><code>GET</code> string in your case is used as a positional valu... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Including One Subitem From A List property while Making use of ThenInclude()<p>I have a function that's purpose is to pull an auction by its id from the data... | <p>This seems to be a bug in EF-core 5. The generated SQL query (with SQL Server) has incorrect aliases in one line:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT [t].[AuctionId], [t].[AuctionTypeId], [t].[BidIncrement], [t].[BidWarningCap], [t].[CreatedById], [t].[CreatedDate], [t].[Description], [t].[Lo... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what is i = i[0] for? yolo, cv2<p>I am very new to computer vision with python. I found a script to run a yolo.weights file. Everything runs smoothly until i... | <p>This means that you are trying to retrieve a value from an indexed location in a non iterable type.</p>
<p><code>i = i[0]</code> means get the first element of <code>i</code> and save it in the <code>i</code> variable.</p>
<p>So if i was iterable it would work like this:</p>
<pre><code>>>> i = `some string... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Return the 90th percentile values in R<p>For example, I have a dataset of 30-years air temperature of a city, the dataset looks like:</p>
<pre><code>Year Ju... | <p>You can first group by <code>Julian_date</code>, then use the <code>quantile</code> function to set the probability inside <code>summarise</code>.</p>
<pre><code>library(tidyverse)
df %>%
group_by(Julian_date) %>%
summarise("value (the 90th percentile)" = quantile(temperature, probs=0.9, na.rm... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Defining new policy with Terraform on AWS, but gets error in Version<p>I'm trying to create a new policy in the AWS by Terraform.<br />
But I'm getting error... | <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_version.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_version.html</a></p>
<p>You can check in the URL above. It's like the version of the policy and at this time, ther... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error: animal.image.map is not a function<p>I am currently making a shelter web app using mern stack and i am struggling to display an image from my object. ... | <p>It looks like your schema has <code>animal.image</code> defined as an object. <code>Array.prototype.map</code> only exists on arrays, not objects.</p>
<pre><code>> Object.prototype.map
undefined
> Array.prototype.map
[Function: map]
</code></pre>
<p>So you can remove the map and instead conditionally render th... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error: Could not find or load main class org.apache.tez.dag.app.DAGAppMaster<p>I have installed tez and want to run the example like this</p>
<pre><code>hado... | <p>I had solved my question by upload to hdfs an uncompressed tez package and change my tez-site.xml file.</p>
<pre><code>hadoop fs -put tez-0.10.1 /apps/tez
</code></pre>
<p>My changed tez-site.xml</p>
<p>The main different place is <strong>"tez.lib.uris"</strong></p>
<pre><code><?xml version="1.0&qu... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
read username from modified /etc/passwd file using a script<p>I want to read the users from /etc/passwd file.My /etc/passwd file is </p>
<pre><code>/etc/pas... | <p>You can use the following GNU sed command:</p>
<pre><code>sed '0,/#guest/d;/#gend/,$d;s/:.*//' /etc/passwd
</code></pre>
<p><code>0,/#guest/d</code> removes all lines until <code>#guest</code> (including it).</p>
<p><code>/#gend/,$d</code> removes everything from <code>#gend</code> to the end of input which is ex... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Power BI - Azure SQL DB connection issue<p>When I am trying to get data from "Azure SQL DB" in Power BI, I am unable to complete the authentication... | <p>This appears to be a generic issue, what you are seeing is auto signin to already signed in account. You can either logout of all existing accounts in the browser or use new private browser window to login clearing all cached and active logins from the privacy properties.</p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Matching words from a library in one column and two shorter coulmn then merging these two data frames in r<p>I have a question regarding matching words from ... | <p>I think you are missing <code>by.x</code> and <code>by.y</code> parameters:</p>
<pre><code># merge data - full join
dd <- merge(x = df, y = df2, by.x = 'words', by.y = 'library', all.x = T)
# add column from df
dd$library <- as.character(df2$library[match(dd$words, df2$library)])
print(dd)
words... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to assign an edited dataset to a new variable in R?<p>The title might be misleading but I have the scenario here:</p>
<pre><code>half_paper <- lapply... | <p>Your main issue 'This line is supposed to substitute <code>0</code> for <code>0.5</code> in all of the columns except the first one' can be remedied by placing another line in your anonymous function. The gets operator <code><-</code> returns the value of whatever is on the right hand side, so your <code>lapply</... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiple strokes with spacing<p>I want to have a button style with two strokes with some spacing between them. My first approach is not satisfying because in... | <p>Well... that's how geometry works.</p>
<p><a href="https://i.stack.imgur.com/Niy1q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Niy1q.png" alt=""></a></p>
<p>Distance <code>A</code> is not equal to <code>B</code> as long as you keep the same corner <code>radius</code> for inner and outer roun... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
htaccess mask upload directory<p>Howcome this is not working?</p>
<p>It is supposed to mask the /uploads/ directory on the server.</p>
<pre><code>RewriteCo... | <p>I have found the fault.
After redirecting ^artwork it was still redirecting ^uploads</p>
<p>So this is the new working code</p>
<pre><code>RewriteRule ^\/?artwork\/\w+\/(.{32})-(\d+)&(\d+).jpg|gif|jpeg uploads/covers/$1.jpg [L]
RewriteRule ^(?!artwork|uploads)(.*) public/$1
</code></pre>
<p>Hope this helps so... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Async Push data to Array in Node<p>I'm calling mongoose query inside of another mongoose query. When I push results to a array, When ever I check it at last ... | <p>Well, there are a number of problems with your code, but chief among them is the fact that you cannot save or act upon values you receive inside a callback to anything outside of that callback. Your example has (rewritten for clarity):</p>
<pre><code>var result = []
arry.forEach(function(opt) {
async.call(args,... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mapstruct - How to convert a DTO String parameter to an Entity object?<p>I'm new to Mapstruct and I'm trying to understand it properly.</p>
<p>What I want to... | <p>Found the solution!</p>
<p>Instead of calling directly the Mapper method <code>toEntity()</code> from the <code>@RestController</code> class, I injected the mapper in the <code>CarModelService</code> class and created a method that call the mapper.
In this way the flow is:</p>
<blockquote>
<p>Controller --> Servi... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
node-soap: createClient is not a function<p>I am trying to consume webservice using node-soap
I have referred <a href="https://github.com/vpulim/node-soap" r... | <p>On the first line, you should have:</p>
<p><code>var soap = require('soap');</code></p>
<p>NOT</p>
<p><code>var soap = require('node-soap');</code></p> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ytick descriptions in seaborn<p>I'm trying to make a heatmap a heatmap with extensive y axis descriptions.
<a href="https://i.stack.imgur.com/oZIwB.png" rel=... | <p>The labels for the rows can be set up in the graph settings, but other than that, I think the annotation function is the only way to handle this. the second level group names are set using the annotation function, and the coordinate criteria are set using the axis criteria. Axis labels are added using the text funct... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python logger: won't overwrite the original log?<p>So, when I copy paste the following x times to the python prompt,
it add the log x times to the end of ... | <p>If I understand correctly, you're running a certain Python process for days at a time, and want to rotate the log every day. I'd recommend you go a different route, using a handler that automatically rotates the log file, e.g. <a href="http://www.blog.pythonlibrary.org/2014/02/11/python-how-to-create-rotating-logs/"... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Consecutive XML serialization causes - Token StartElement in state EndRootElement would result in an invalid XML document<p>I am writing to the file XML seri... | <p>You are trying to use a single <code>XmlWriter</code> to create an XML file with multiple <a href="https://en.wikipedia.org/wiki/Root_element" rel="nofollow noreferrer">root elements</a>. However, the XML standard requires <a href="https://www.w3.org/TR/2006/REC-xml-20060816/#dt-root" rel="nofollow noreferrer">exa... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I'm confused about the assosiation in Sequelize<p>I have learned that in Sequelize, we can add foreign keys to child model by two ways. One is to use <code>h... | <p>What you're doing - adding the <code>references</code> key - will just mean that there is a foreign key set up at the database level. Using <code>hasOne</code>, <code>belongsTo</code>, <code>hasMany</code>, etc, will do what you're doing above, but in addition, it will also add relevant convenience methods to your m... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Where to store data in Python after split?<p>I read each line and get array result:</p>
<pre><code>arr = line.split("|"); // [1, 500, ABC]
</code><... | <p>Ok, so you want to read a bunch of lines, split them on <code>|</code> character, and discard lines where the first field is the same as the first field of the first line. It could be:</p>
<pre><code>line = next(file) # process first line
arr = line.split("|")
field0 = arr[0]
data = [arr[:]] # make s... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Break HTML tooltip message using line breaks<p>I'm trying to break my custom HTML tooltip that I used inside the button <strong>Hover Button</strong>.
I trie... | <p>You're using the wrong slash - new line should be \n not /n:</p>
<pre><code>tooltipData="Helo,Angular 2" + "&#013" + "This button is used to test hover message" + "\n" + "This message should come at the last"
</code></pre> |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Properly wrap text in bs4 boxes<p>I'm having a lot of trouble with my bs4 boxes that I cant sort out. The most major problem is that at some browser sizes th... | <p>You just remove the unwanted padding class like <code>mr-3,pl-2,pt-md-5</code>. Just add the <code>col-sm-4</code> to split the column and add only one equal padding class. Try this example hope this will suitable for you.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I wrote a simple code on python, but it doesn't work as intended can someone help me<p>This code will display an image where the 0 is going to be ' ', and th... | <p>A few small proposals are suggested for reference.</p>
<ol>
<li>you can use for loops when you know exactly how many times you want to loop</li>
<li>Use the <em><strong>is</strong></em> or <em><strong>not</strong></em> keyword to determine bool type data and ==</li>
</ol>
<p>try this:</p>
<pre><code>picture = [
... |
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using EF Core with WPF and I'd like to revert to initial state when a user press Cancel instead of OK on a dialog, is that possible and how?<p>I'm using EF C... | <p>Q: Is that possible and how?</p>
<p>A: Sure.</p>
<ol>
<li><p>The most straightforward way is to only "SaveChanges()" when you're "Done" (when the user clicks <kbd>OK</kbd>).</p>
</li>
<li><p>Another approach might be to make <em>copies</em> of the original objects, and perform in-process operatio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.