date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/20 | 1,375 | 4,165 | <issue_start>username_0: Consider these three arrays:
```
$Trucks: Serial=> 12345 Wheels => 4 Color => Black
$Trailers: Serial=>4321 Length=>42
$Forklifts: Serial=>5678 ForkLength=>24
```
What I'm looking to do is end up with a single array, which would end up with the columns `Serial, Wheels, Color, Length, ForkL... |
2018/03/20 | 4,929 | 18,426 | <issue_start>username_0: I am following a tutorial on Spring MVC and after attempting to implement Hibernate validation, I'm now getting `HTTP Status 500 - Servlet.init() for servlet dispatcher threw exception` when running the application on the server.
I took the 3 Hibernate jar dependencies out of the POM.xml and i... |
2018/03/20 | 1,413 | 4,220 | <issue_start>username_0: So I need to compare a string against another string to see if any parts of the string match. This would be useful for checking if a list of salespeople IDs against the ones that are listed to a specific GM or if falls outside of that GMs list of IDs:
```
ID_SP ID_GM NEEDED F... |
2018/03/20 | 524 | 1,673 | <issue_start>username_0: I am in the process of learning React and trying a sample code from a book. The code is simple it is supposed to display vowels in different colors defined in the ReactDOM.render but instead it displays them all in one color coming from the style tag.
Attached below is the code
```
Styling ... |
2018/03/20 | 749 | 2,442 | <issue_start>username_0: Is there any way that I can create or modify an AzureAD App to allow the OAuth 2.0 Implicit flow via the Azure CLI 2.0?
I'm able to create app registrations without issue using [az ad app create](https://learn.microsoft.com/en-gb/cli/azure/ad/app?view=azure-cli-latest#az_ad_app_update)<issue_c... |
2018/03/20 | 904 | 2,937 | <issue_start>username_0: I've been trying to make a word generator, which displays your input in a big font in the console. For this, I need to print the respective variable based on the character's in the user's input (e.g. if the user types `"a"`, then the variable `a` should be printed). How do I do so? This is my c... |
2018/03/20 | 1,246 | 4,385 | <issue_start>username_0: So I've read around this and will provide relevant properties at the end.
I'm looking to store a custom ToolStrip button image size in my.settings and load them at startup, changing them to a user set size.. The code I run at startup is:
```
Dim tss As New List(Of ToolStrip)
tss = Ge... |
2018/03/20 | 893 | 2,516 | <issue_start>username_0: ```
cd /home/foo/
for f in `seq -w 01 10`
do
cat $f > /home/foo/cloned_files/"$f".$i
done
```
**situation:**
i have only 1 file in /home/foo.
i want to clone that file 10 times and add the iteration number to the filename. in the end, i should have 10 files identical in content but wit... |
2018/03/20 | 2,991 | 8,700 | <issue_start>username_0: I've written a regex in PHP7 for validating URI schemes, with the intention of supporting every scheme listed by IANA [here](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml "here"); permanent, provisional or historical. So far I've gotten as far as `shttp` in the permanent protoc... |
2018/03/20 | 718 | 2,994 | <issue_start>username_0: We have code similar to the following in our app
```
val pendingIntent = PendingIntent.getActivity(ctx, id.toInt(), intent, PendingIntent.FLAG_CANCEL_CURRENT)
val builder = NotificationCompat.Builder(ctx, Channel.TEST_CHANNEL.channelId)
builder.setTicker(tickerText)
.se... |
2018/03/20 | 411 | 1,695 | <issue_start>username_0: ```
int number;
// In some process
wait(&number);
```
Im doing a wait call on a process and want to know if this is safe or will I get undefined behavior?.<issue_comment>username_1: Only thing I found uncertain is **NotificationCompat.Builder**
Android oreo now uses **Notification.Builder*... |
2018/03/20 | 857 | 3,248 | <issue_start>username_0: I'm trying to style the card header on a bootstrap 4 accordion, but I can't seem to override the preset class style.
I want to change `.btn-link` so that it is not underlined when active or when visited, but `.btn-link:active` and `.btn-link:visited` don't seem to change anything in the output... |
2018/03/20 | 537 | 2,063 | <issue_start>username_0: ```
if open(file1).read() == open(file2).read():
print('match')
```
Do I need to close these files after comparing them? I know I need to when doing the following, but is this different?
```
target = open(file1)
```<issue_comment>username_1: **Yes you do**. You could also use the `with`... |
2018/03/20 | 346 | 1,145 | <issue_start>username_0: I can create a BQ view by calling client.create\_table but I could not find a way to update the SQL of the view.
To create:
```
table = bigquery.Table(table_ref)
table.view_query = view_query
client.create_table(table)
```
To update? (does not work)
```
table = client.get_table(table_ref)... |
2018/03/20 | 451 | 1,599 | <issue_start>username_0: I have a unit test with a test-specific settings file, which includes:
```
EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
EMAIL_FILE_PATH = '/my/file/path'
```
This wasn't working, so I dropped into the debugger to check the settings in the middle of running my test:
```... |
2018/03/20 | 531 | 1,881 | <issue_start>username_0: Update. Here is my code. I am importing 400 csv files into 1 list. Each csv file is 200 rows and 5 columns. My end goal is to sum the values from the 4th column of each row or each csv file. The below code imports all the csv files. However, I am struggling to isolate 4th column of data from ea... |
2018/03/20 | 1,381 | 5,445 | <issue_start>username_0: I'm trying to setup Room database backup functionality.
Problem is that sql database file doesn't contain latest set of data in the app once downloaded. It always misses some most recent records.
Is there a proper way to export room database?
P.S. I didn't face similar problems when handled ... |
2018/03/20 | 636 | 2,140 | <issue_start>username_0: [](https://i.stack.imgur.com/0jhyK.png)
I am working on an auction script with a table that looks like the attached image.
Within an auction two users can place the same bid amount, for example two players could place a bid of... |
2018/03/20 | 572 | 1,963 | <issue_start>username_0: In my application one of third party API returning timestamp in epoch.
Sometime it returns epoch time in seconds and sometime in miliseconds not confirmed. My application using below code to
convert it to java date and display to user but when I am receiving time in miliseconds it is failing o... |
2018/03/20 | 1,320 | 3,160 | <issue_start>username_0: All,
I have a dataframe with Dates on the first column and categories across as such:
```
Accounts <- c('A','B','C','D',
'A','B','C','D',
'A','B','C','D')
Dates <- as.Date(c('2016-01-31', '2016-01-31','2016-01-31','2016-01-31',
'2016-02-28','2016-02-28','201... |
2018/03/20 | 1,224 | 4,463 | <issue_start>username_0: An Apollo server is setup, and it responds correctly to the query when using graphiql.
An existing react-redux app with server side rendering needs to start using graphql and make this query.
A component of this app has been setup to do the same query, it seems to be doing the network request... |
2018/03/20 | 355 | 1,268 | <issue_start>username_0: According to [the MDN docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) the following javascript is valid:
```
const o = {foo: 1, bar: 'baz'}
console.log(Object.values(o));
```
and indeed if I run this code in the Firefox developer tools co... |
2018/03/20 | 782 | 2,674 | <issue_start>username_0: How to export data frames which are created in google colab to your local machine?
I have cleaned a data set on google colab. Now I want to export the data frame to my local machine.
`df.to_csv` is saving file to the virtual machine and not my local machine.<issue_comment>username_1: Try thi... |
2018/03/20 | 583 | 2,027 | <issue_start>username_0: I'm developing a file tree. With the code I have now I can only show and hide all the directories on the tree, it doesn't matter which node I click.
I need to be able to maintain the same class name but only show/hide the element I click on.
Check the code snippet please.
```js
function init... |
2018/03/20 | 777 | 2,985 | <issue_start>username_0: I have a visual studio package that does not write all the data needed to a blank excel file.
More specifically, the package goes through these steps:
1. Copies a template excel file to overwrite a shell file.
2. Connects to a SQL DB.
3. Runs a Select Statement.
4. Converts one column to uni... |
2018/03/20 | 201 | 668 | <issue_start>username_0: I'm using an `onclick` event to call a JS function from PHP. Here is my code:
I'm inside a function so I need to do it via PHP, because then I do a return:
```
$html = '';
return $html;
```
My JS:
```
function setGetSku(sku) { //Gettng error here
var conf = confirm("Are you sure?");... |
2018/03/20 | 1,328 | 3,348 | <issue_start>username_0: This is more of a curiosity
Say I have the following code
```
>>> my_immutable = (1, 2)
>>> my_immutable[0] += 1
TypeError: 'tuple' object does not support item assignment
```
This is expected, because unlike C, Python does not modify the underlying int, but rather creates a new one (obser... |
2018/03/20 | 1,104 | 2,560 | <issue_start>username_0: Are there any way to multiple text wording with formula?
Also how do I change the decimal to 0.00??
Thanks in advance!
Current working code
```
="Should be at " &CONCATENATE(NETWORKDAYS("3/4/2018",TODAY()-1)/35*(100))
```
I would like to add wording after formula like this
```
="Should be... |
2018/03/20 | 393 | 1,272 | <issue_start>username_0: I'm trying to write a program to delete leading spaces in a poorly formatted C++ program. I get this error in line 24: `cout << removeLeadingSpaces(s) << endl;`, please help.
```
#include
using namespace std;
string removeLeadingSpaces(string line)
{
bool start = false;
string newline;
for (... |
2018/03/20 | 2,234 | 5,569 | <issue_start>username_0: Sorry, if the title does not do this question justice, but please recommend a new title, if you have a better one.
What i need to accomplish is i need to take QtyOnHand (for a given AffectedDate) / sum(IssQty) based on a range between RecDates. So if the AffectedDate = '2015-2' then i want to... |
2018/03/20 | 1,038 | 3,749 | <issue_start>username_0: I have an `onload` function within a `for` statement that is producing unexpected results.
The `for` loop loops through an array of images. I'm wanting this loop to execute an `onload` for each image in the array, and only proceed to the next iteration in the `for` loop once that's done. The ... |
2018/03/20 | 319 | 867 | <issue_start>username_0: I need to sort the following dictionary by age but I don't figure how:
```
1 {'name':'ste', 'surname':'pnt', 'age':21}
2 {'name':'test', 'surname':'black','age':24}
3 {'name':'check', 'surname':'try', 'age':41}
```
This is the output of a `for` cycle:
```
for k, v in d.items():
pri... |
2018/03/20 | 799 | 2,097 | <issue_start>username_0: I have some data like so:
```
a <- c(1, 2, 9, 18, 6, 45)
b <- c(12, 3, 34, 89, 108, 44)
c <- c(0.5, 3.3, 2.4, 5, 13,2)
df <- data.frame(a, b,c)
```
I need to create a function to lag a lot of variables at once for a very large time series analysis with dozens of variables. So i need to lag ... |
2018/03/20 | 576 | 1,907 | <issue_start>username_0: When I'm trying to print the values of an array, its memory location is getting printed instead of values. What am I doing wrong?
```
int main()
{
int list[3];
for (int i=0; i<3; i++)
{
list[i] = i;
std::cout<
```
OUTPUT: 0x7ffffef79550<issue_comment>username_1:... |
2018/03/20 | 594 | 1,974 | <issue_start>username_0: Back with another SQL question about joins. I have 3 tables:
```
user: id, username, name, city, state, private
rides: id, creator, title, datetime, city, state
posts: id, title, user, date, state, city
```
I need to get the users from the user table, and based on the id of user, get the num... |
2018/03/20 | 747 | 2,955 | <issue_start>username_0: Given that there's no Union in scala,
I have a three functions that accept different parameters, but are otherwise exactly the same. How would I best implement this without repeating myself like I do now?
```
import scala.sys.process._
def function1(command:String):String = {
...
... |
2018/03/20 | 898 | 2,657 | <issue_start>username_0: I have a problem doing the following `SELECT` statement: I want to select only `articles` that are exactly related to some given `tags`.
Here is my (simplified) schema:
[](https://i.stack.imgur.com/O2as8.png)
And here are th... |
2018/03/20 | 1,328 | 4,522 | <issue_start>username_0: I would like the --import parameter to have a "sub-parameter" that will only work on this parameter, nowhere else. Example:
```
app.pl --import --fresh
```
output: command working
```
app.pl --export
```
output: command working
```
app.pl --export --fresh
```
output: command not found
... |
2018/03/20 | 400 | 1,416 | <issue_start>username_0: In which format should i enter IMG SRC to a Result in Javascript?
```
var result = document.getElementById('test');
result.innerHTML = price + "img src='catcoin.png'";
```<issue_comment>username_1: ```
document.getElementById('test').src = "catcoin.png";
```
Upvotes: 0 <issue_commen... |
2018/03/20 | 3,406 | 13,277 | <issue_start>username_0: So I have the following code:
```
#region Dropshadow
[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect,
int nTopRect,
int nRightRect,
int nBottomRect,
int nWidthEllipse,
int nHeightEllipse
);
[Dll... |
2018/03/20 | 3,074 | 12,267 | <issue_start>username_0: I have some interesting behavior that I am stuck on
I've got a vb.net page that allows the user to add and remove items from a form dynamically, the Add and Remove functions are both using jQuery on the front end
```
function remRow(clicked_id) {
console.log("Start remRow");
$("#hdnI... |
2018/03/20 | 699 | 2,028 | <issue_start>username_0: I have a dataset which looks like below
```
ADVERTISER YR REVENUE
---------------------------------
Altus Dental 2015 5560.00
Altus Dental 2016 48295.00
Altus Dental 2017 39920.00
```
I'm trying to find CAGR - year over year and taking an average of them, meaning
... |
2018/03/20 | 1,109 | 3,166 | <issue_start>username_0: I am trying to write a df to a csv from a loop, each line represents a df, but I am finding some difficulties once the headers are not equal for all dfs, some of them have values for all dates and others no.
I am writing the df using a function similar to this one:
```
def write_csv():
fo... |
2018/03/20 | 340 | 1,396 | <issue_start>username_0: I have a Spring boot project using spring security and Oauth2 and I'm noticing some bad behaviour which could be caused by actuator.
To be sure I want to remove it from the project but I can't find it explicitly mentionned in my Maven dependencies.
Any idea on how to do it?<issue_comment>usern... |
2018/03/20 | 291 | 1,159 | <issue_start>username_0: I am running Dgraph database and the interface through the suggested docker images. Is it possible to run a command that drops all the data from the database and keeps the schema? Or at the very least drop both the data and schema? Or would I just have to delete the docker images and rebuild th... |
2018/03/20 | 1,650 | 4,636 | <issue_start>username_0: I want to rewrite the following python code functionally:
```
lst = [0.0] * 10
for pos in [2,5]:
lst[pos] = 1.0
```
This is my attempt, but is incorrect:
```
lst = (lambda zeros:
map(
lambda pos: zeros[pos] = 1.0, [2,5])
)([0.0] * 10)
```
The error I get ... |
2018/03/20 | 805 | 2,798 | <issue_start>username_0: I have several functions, click events delegated to a `.container` (this is generated dinamically)
```
$('.Container').on('click', '.a', function(){$(document).Function1();});
$('.Container').on('click', '.b', function(){$(document).Function2();});
$('.Container').on('click', '.c',... |
2018/03/20 | 925 | 3,123 | <issue_start>username_0: How object of Derived class `D d` can be accessed in friend class of `Base B`?
Since there is no relationship between `D` and `F` then how it is possible to
access private member `b_var` of object of `D` in friend class?
```
#include
#include
using namespace std;
class B { //Base class
i... |
2018/03/20 | 303 | 1,173 | <issue_start>username_0: I have an application made of multiple microservices. I would like to visualize it for newer developer to understand the flow chart.
In some previous experiences, I have seen people draw flowchart like this one below.
**Question: What is this kind of flow chart called?
Is there any softw... |
2018/03/20 | 885 | 3,005 | <issue_start>username_0: ᕼello! I think I have a somewhat tricky postgres situation:
`parent`s have `child`ren. `child`ren have an `age`, and a flag that they are the `appreciated`.
**The rule:** a parent can't appreciate two children of the same age!
My question is: *how to enforce this rule*?
Current schema:
```... |
2018/03/20 | 1,356 | 4,897 | <issue_start>username_0: I have the following code working on my local eclipse setup which is accepting a JSON and printing it on the console using this
`System.out.println(person);`
Since, there is `toString` method in the `Person.java` class, in order to see the output, I have to pass the JSON in the
following man... |
2018/03/20 | 2,073 | 4,626 | <issue_start>username_0: I want to fill missing values in my pandas series, if there are less than 3 consecutive NANs.
**Original series with missing values:**
```
s=pd.Series(pd.np.random.randn(20))
s[[1,3,5,7,12,13,14,15, 18]]=pd.np.nan
```
Gives:
```
0 0.444025
1 NaN
2 0.631753
3 NaN
4... |
2018/03/20 | 405 | 949 | <issue_start>username_0: I have a list like this one:
```
l1 = [{'a': 123, 'b': 128}, {'a': 998, 'b': 345}]
```
I would like to create another list that contains only the `a` values:
example:
```
[123,998]
```
I try this:
```
[x,i for x in l1[i]]
```
but I get an error. Then i try this:
```
[x for x in l1[x]]... |
2018/03/20 | 509 | 1,891 | <issue_start>username_0: I have a FormArray and need to iterate through each of its members.
I see there is a `get` method in [the docs](https://angular.io/api/forms/FormControl), but I don't see where to get the keys, or even the length.
How do I iterate a FormArray?<issue_comment>username_1: You have a property `co... |
2018/03/20 | 577 | 2,337 | <issue_start>username_0: I have two table views that contain a mutable array of objects that can be instantiated by the user with various properties. The class and its properties are within separate `.h` and `.m` files that the table views access.
I would like the two table views to look identical so that when a user ... |
2018/03/20 | 1,027 | 3,600 | <issue_start>username_0: I wanted to create a context menu on my line graph. When the user hovers across a point, they can right click and will see a context menu so that they can trigger more action.
Is this possible with chart.js?
Thanks,
Derek<issue_comment>username_1: AFAIK there is no native support for context... |
2018/03/20 | 219 | 700 | <issue_start>username_0: I have a string `"[testid-1] is locked out / / Subject: / Account Domain: NM /"` and I need to extract `"testid-1"` within the square braces and domain `"NM"` out of the string using Lua script. I am trying to use the below code with no luck, I have also tried escaping `[`.
`aname=string.match... |
2018/03/20 | 2,325 | 6,403 | <issue_start>username_0: I have a squared 2D array that I would like to rotate clockwise and counter clockwise.
I was following this answer here for rotating to the right:
[Rotating a 2D pixel array by 90 degrees](https://stackoverflow.com/questions/16684856/rotating-a-2d-pixel-array-by-90-degrees?utm_medium=organic... |
2018/03/20 | 872 | 3,163 | <issue_start>username_0: My template parser looks like this (p/s the .'/'. is for readability):
```
$this->parser->parse($this->settings['theme'].'/'.'header', $data);
$this->parser->parse($this->settings['theme'].'/'.'register', $data);
$this->parser->parse($this->settings['theme'].'/'.'footer', $data);
```
I don't... |
2018/03/20 | 1,040 | 3,355 | <issue_start>username_0: When i open the html file on google chrome. It is just a blank page. Nothing is loading. If i take out the .js files it loads the content with the .css applied but never with the .js files. Whether I put the .js files in the or at the end of the it still does not show anything. I am using jquer... |
2018/03/20 | 664 | 2,154 | <issue_start>username_0: I want to create a suggestbox but the items in my "dropdown" wrap. I would like them to take as much space horizontally as they need.
How can I tell the menu to take as much space as its children need horizontally?
```css
.container {
position: relative;
width: 200px;
}
.container > ... |
2018/03/20 | 1,068 | 4,078 | <issue_start>username_0: I have some old code in CVS format ([RCS format](https://www.systutorials.com/docs/linux/man/5-rcsfile/)). I would like to avoid checking in a new revision only to fix the indentation, and not syntax. Often the original developer no longer has an account (they have left the company). If I were ... |
2018/03/20 | 1,231 | 4,427 | <issue_start>username_0: Currently I have a function to return the first elements of each list (floats), within a list to a separate list.
```
let firstElements list =
match list with
| head::_ -> head
| [] -> 0.00
```
My question is, how do I expand this to return elements at the same index into differe... |
2018/03/20 | 745 | 2,530 | <issue_start>username_0: I'm in a CS class and I'm trying to create a tic tac toe program. This is my first time using functions and I need help checking a 2d array to see if it is full with 'x' or 'o' s. I initialized to start off with all the elements to '\_' and I want a return value of true or false so I'm using `#... |
2018/03/20 | 337 | 1,188 | <issue_start>username_0: I hate css, I really do. I think this one will be trivial for most of you so please help me with this one.
I would like to create a radiobutton which have to change the background color of the label it's in. Here's the code which obviously does not work:
js:
```
```
and css:
```
.check {
b... |
2018/03/20 | 378 | 1,317 | <issue_start>username_0: I'm doing some tests and I relate to the bands and albums tables with the foreign key.
I tried deleting a row with a foreign key, but this returned parent row error
My Code:
```
DELETE FROM BANDS WHERE idBand = '13 ';
DELETE FROM albums WHERE albumId = '13 ';
```
>
> albumId is the idBand ... |
2018/03/20 | 780 | 2,496 | <issue_start>username_0: I want the result of the math function into my css file, that the kind of blur is variable. But it doesn't work and I don't know how, because there are no errors. The variable number is between 1 and 5.
This is the Javascript code I'm using:
```
var minNumber = 1;
var maxNumber = 5;
var resu... |
2018/03/20 | 629 | 2,046 | <issue_start>username_0: I am using semantic ui react and I am using NavLink with Menu.Item for routing.
Below is my navbar component:
```
const Navbar = () => (

Home
Dashboard
User
);
```
Now here is where the issue resides. The routing works fine but for some reason the 'Home' Menu It... |
2018/03/20 | 793 | 2,677 | <issue_start>username_0: *Please do not vote to close. This is about the technical reason on why this is not working. I already have a working solution and I'm not asking for it.*
Simple example where I need to make `.wrapper` height, at least, the browser height.
The following works in IE10-11, Edge, Firefox, Chrome... |
2018/03/20 | 1,137 | 3,873 | <issue_start>username_0: I first installed cuda 9.0 and cudnn for cuda 9.0 and the latest tensorflow-gpu 1.6. But I noticed my nvidia-driver 384.111 doesn't support cuda 9.0. SO I uninstalled cuda 9.0, cudnn and tensorflow-gpu 1.5 and reinstalled tensorflow-gpu 1.5, cuda8.0 and cudnn v7.1 for cuda 8.0. But when I impor... |
2018/03/20 | 769 | 2,798 | <issue_start>username_0: ```
def write(self, range, data):
'''
clears the spreadsheet, then given a range of data will write that data into the google sheets
with the id self.spreadsheet_id
'''
self.ensure_service_exists()
self.service.spreadsheets().values().clear(spreadsheetId=self.spreadsheet... |
2018/03/20 | 548 | 1,813 | <issue_start>username_0: I've tried different ways to scrape `Answer1` and `Answer2` from a website through BeautifulSoup, urllib and Selenium, but without success. Here's the simplified version:
```
Question1
**Answer1**
Question2
**Answer2**
```
In selenium, I try to find `Question1`, then go to its parent a... |
2018/03/20 | 648 | 2,520 | <issue_start>username_0: I have two functions which are almost the same. Is there a good way to remove duplicates?
I think about moving duplicated code in the separate function and pass a function as the argument.
```
private object GetValue(object key)
{
var index = GetHash(key);
var node = _tabl... |
2018/03/20 | 599 | 2,181 | <issue_start>username_0: I am trying to select data from our main database (postgres) and insert it into a temporary sqlite database for some comparision, analytics and reporting. Is there an easy way to do this in Python? I am trying to do something like this:
Get data from the main Postgres db:
```
import psycopg2
... |
2018/03/20 | 1,037 | 3,695 | <issue_start>username_0: I would like to achieve something like
```
{ _id: "A", count: 2 }
{ _id: "B", count: 1 }
```
from
```
{ userId: "A", timeStamp: "12:30PM" } <- start of 5 min interval A: 1
{ userId: "B", timeStamp: "12:30PM" } <- start of 5 min interval B: 1
{ userId: "B", timeStamp: "12:31PM" } <- ignore... |
2018/03/20 | 1,443 | 4,550 | <issue_start>username_0: ```
declare @test varchar(50) = 'F-1084-002-04-009'
```
I need to replace the value inside the last two dashes to "00"
So it should be this:
```
F-1084-002-00-009
```
I'm struggling to find the easiest way to do this.<issue_comment>username_1: If the format is always the same you could do... |
2018/03/20 | 1,119 | 4,325 | <issue_start>username_0: I am using selenium 3.9.1 and java to automate testing of a web application. The web application has some dynamic content based on pressing of a button for example. The page refreshes whenever this button is clicked. A java script runs on button click and updates the DOM I think. At this time, ... |
2018/03/20 | 772 | 2,509 | <issue_start>username_0: I would like to have a colored underline that looks like this when it breaks:
[](https://i.stack.imgur.com/ZjpsL.jpg)
`text-decoration-color` seems to be not supported widely enough.
I tried this:
... |
2018/03/20 | 1,557 | 4,371 | <issue_start>username_0: ```
def make_Ab(A,b):
n = len(A)
Ab = list(A)
for index in range(0,n):
Ab[index].append(b[index][0])
print(A)
return Ab.copy()
A = [[0.0, 1.0, 1.0, 2.0], [1.0, 3.0, 1.0, 5.0], [2.0, 0.0, 2.0, 4.0]]
b = [[1],[2],[3]]
print(A)
```
`[[0.0, 1.0, 1.0, 2.0], [1.0, 3.0... |
2018/03/20 | 1,257 | 4,347 | <issue_start>username_0: Using test config with Ignite 2.4 and k8s 1.9:
```
xml version="1.0" encoding="UTF-8"?
```
Unable to find Kubernetes API Server at <https://kubernetes.default.svc.cluster.local:443>
Can I set the API Server URL in the XML config file? How?<issue_comment>username_1: Take a look at this thread... |
2018/03/20 | 1,101 | 3,654 | <issue_start>username_0: I’m working on an app which dynamically renders a set of UI elements (currently sliders) into three columns based on the user selecting which metrics they’d like to filter a particular dataset on. The issue I’m running into is that the different metrics have wildly variable ranges (i.e. gross m... |
2018/03/20 | 835 | 2,614 | <issue_start>username_0: Haven't been able to find this in docs. Can I just pause an ECS service so it stopped creating new tasks? Or do I have to delete it to stop that behavior?
I just want to temporarily suspend it from creating new tasks on the cluster<issue_comment>username_1: You can accomplish a "pause" by adju... |
2018/03/20 | 263 | 760 | <issue_start>username_0: In a SharePoint calculated field how do I check two things?
I have the following which checks field Est OpMargin and if less than 20 sets field to BG but I would also if less than 17 set it to RG
=IF([Est OpMargin]<20,"BG","")<issue_comment>username_1: Nest the IFs:
```
=IF([Est OpMargin]<1... |
2018/03/20 | 446 | 1,537 | <issue_start>username_0: I have few questions related to NetSuite:
1. On the [NetSuite help page](https://system.netsuite.com/app/help/helpcenter.nl?fid=chapter_4387172495.html&whence=), the User Event scripts are stated to execute on servers.
In that case if a record is updated in NetSuite indirectly\*, it should st... |
2018/03/20 | 583 | 2,273 | <issue_start>username_0: I have this problem and i keep thinking about it. I'm trying to figure how this actually works and WHY?
So, I have this Base class:
```
public class Shape
{
private float width;
private float height;
public Shape(float width, float height) {
this.width = width;
this.height = ... |
2018/03/20 | 427 | 1,651 | <issue_start>username_0: I'm processing some semi-structured documents in Python and I have some code that reads the file into a tuple and loops through each line and performs a function. Is there a way of finding the exact line in the processed file where an error is encountered?
```
c = tuple(open("file", 'r'))
for... |
2018/03/20 | 690 | 2,419 | <issue_start>username_0: Trying to write an efficient algorithm to scale down YUV 4:2:2 by a factor of 2 - and which doesn't require a conversion to RGB (which is CPU intensive).
I've seen plenty of code on stack overflow for YUV to RGB conversion - but only an example of scaling for YUV 4:2:0 here which I have starte... |
2018/03/20 | 903 | 3,411 | <issue_start>username_0: In VB6 on a UserControl, I must use `UserControl.MousePointer = vbDefault` instead of `Me.MousePointer = vbDefault`. I can use `Me.MousePointer` on a Form (and `Form.MousePointer` doesn't work).
Why must I use `UserControl.MousePointer` instead of `Me.MousePointer`?
I mean literally the text ... |
2018/03/20 | 439 | 1,378 | <issue_start>username_0: I get this error when running anaconda-navigator on Linux Mint 18.1:
```
QApplication: invalid style override passed, ignoring it.
2018-03-20 19:54:36,039 - ERROR anaconda_api.is_vscode_available:871
''
Traceback (most recent call last):
File "/home/daniel/anaconda3/lib/python3.5/site-packa... |
2018/03/20 | 631 | 2,184 | <issue_start>username_0: I am running Django on localhost (development machine), and I came across this in my debug console:
```
Not Found: /robots.txt
2018-03-20 22:58:03,173 WARNING Not Found: /robots.txt
[20/Mar/2018 22:58:03] "GET /robots.txt HTTP/1.1" 404 18566
```
What is the meaning of this and if there is an... |
2018/03/20 | 714 | 2,496 | <issue_start>username_0: Im running Matlab on linux (Elementary OS)
The problem im facing is that Matlab isnt compatible with the gcc compiler higher than 4.9.
Same question as: <https://www.mathworks.com/matlabcentral/answers/348906-downgrading-gcc-g-for-use-with-mex>
When I use "sudo apt get install gcc" 5.4... |
2018/03/20 | 264 | 828 | <issue_start>username_0: Does anyone know of an expression for reporting services to return the first day of 3 years ago?
Example: Today's Date = 3/20/2018
Return date: 1/1/2015
I would like to always return 1/1/2015 regardless of what date it is during the current year.
Thank you<issue_comment>username_1: Not sur... |
2018/03/20 | 628 | 2,431 | <issue_start>username_0: I'm trying to customise the way in which Google Home handles no user input - ie. if the user just says nothing and doesn't respond, I want to handle that in my fulfilment, but currently, no matter what combination of things I try, Google Home will always say "Sorry, I didn't hear that", and the... |
2018/03/20 | 1,039 | 3,125 | <issue_start>username_0: My problem is something like I want to append some string in front of a iostream. You can say in front of std::cin.
```
#include
#include
void print(std::istream & in){// function not to be modified
std::string str;
in >> str;
std::cout<< str << std::endl;
in >> str;
std::cout<< str <<... |
2018/03/20 | 2,300 | 7,808 | <issue_start>username_0: I'm using the Django-Python Social Auth app and i'm trying to extend my pipeline so that when a user signs up using Facebook, they are simultaneously signed up to my Mailchimp mailing list (and sent an email to verify). This works fine if a user signs up using traditional input methods--but not... |
2018/03/20 | 851 | 2,384 | <issue_start>username_0: If you can explain to me, not only solve it, it will really be incredible.
FIRST: It's an exercise that my teacher gave me, it really does not have any value in my grades, but I'm trying to solve it, and I can't when I do the tests says
Input:
n: 3
Output:
10
Expected Output:
13
Console Outpu... |
2018/03/20 | 833 | 2,401 | <issue_start>username_0: I'm trying to center a label inside a custom drawing node in Godot. The label is attached to the node. The parent node is an hexagon, which (0,0) position is in the center of the hexagon (that means, there are negative coordinates in the node). When I add the label it seems to take the center o... |
2018/03/20 | 378 | 1,510 | <issue_start>username_0: I have a webform with a submit button like this
```
```
The javascript function it calls is like this
```
function processSub(){
var btnId = '<%= btnSub.ClientID %>'
var userSelection = confirm('Are you sure you wish to submit');
if (userSelection){
document.getElemen... |
2018/03/20 | 1,012 | 3,258 | <issue_start>username_0: I'm aware that the following code
```
#include
#include
int main()
{
std::string s;
s[0] = 'a';
s[1] = 'b';
}
```
says "string subscript out of range" even though std::string's size is 28 bytes. From previous posts, I read to dynamically make the string bigger as you need. What's the best... |
2018/03/20 | 1,465 | 5,877 | <issue_start>username_0: I want to setup a cognito user pool and configure my google identity provider automatically with a cloudformation yml file.
I checked all the documentation but could not find anything even close to doing this. Any idea on how to do it?
[![enter image description here](https://i.stack.imgur.co... |