date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/02/26
364
1,363
<issue_start>username_0: Let's say I have a javascript function called `capturedata();` I need to call this function when this button is clicked ``` ``` For some reasons, I do not want to use any event handler on the html like `onclick='capturedata()'` Now I have use Jquery this way ``` $(document).ready(functi...
2018/02/26
538
2,312
<issue_start>username_0: I've the following issue and would require a second opinion. A user signs up via a form for a digital service (several input fields). Only one field can be filled out later, but it is required within several days (fieldName: apple). I'd like to make it as easy as possible for the user to sub...
2018/02/26
583
1,782
<issue_start>username_0: I'm trying to compare first and second half of an array. For example: `[3, 7, 7, 3]` , `3, 7` is the first half and `7, 3` is the second half. I tried with nested loops but it haven't worked so far. Here is my code and the question is what is wrong with it? ``` int [] arr = {3, 7, 7, 3}; boole...
2018/02/26
848
2,759
<issue_start>username_0: I am trying to create a multidimensional array in javascript. The following code generates the following error: 0x800a138f - JavaScript runtime error: Unable to set property '0' of undefined or null reference ```js var data = [["Timestamp", "kWh Produced", "kWh Used"]]; data[1][0] = "test"...
2018/02/26
867
2,944
<issue_start>username_0: I'm writing a Webpack plugin. During module resolution, this plugin should dynamically add a specific loader for *some modules*, but not for all. My idea right now is to tap into `normal-module-factory`'s `after-resolve` event. There, I could modify the array `data.loaders`. Some debugging sho...
2018/02/26
610
2,451
<issue_start>username_0: I find somewhat contradicting information from Google about which data storage solution I should use for my web app. Since I'm not too interested in using Mobile SDKs and like the server frameworks offered from Cloud Datastore, I would choose that option according to [this flowchart](https://cl...
2018/02/26
770
2,450
<issue_start>username_0: I have 2 tables: **TABLE\_1** : ``` id | equipment | 1 | voltimeter | 2 | amperemeter | 3 | wattimeter | 4 | eletrical gloves | ``` **TABLE\_2** ``` id | id_table1 | inspection_date 1 | 2 | 2017-01-05 1 | 2 | 2017-02-07 1 | 3 ...
2018/02/26
1,176
4,263
<issue_start>username_0: I have a main.scss file: ``` @import '../../node_modules/animate.css/animate.css'; @import '../../node_modules/perfect-scrollbar/css/perfect-scrollbar.css'; @import 'abstracts/variables'; @import 'abstracts/mixins'; @import 'abstracts/modifiers'; @import 'abstracts/utilities'; @import 'base/...
2018/02/26
283
1,013
<issue_start>username_0: So I'm running an express app in a shared hosting (FastComet) but if I want to get to '/' I get this message > > Cannot GET /index.html.var > > > Apparently it has something to do with the `.htaccess` file<issue_comment>username_1: The way I solved this is adding ``` DirectoryIndex disa...
2018/02/26
612
2,111
<issue_start>username_0: I have an html file that's a dataframe class. I added click event to each row. I want to send fName, lName, Address, Zip to django views.py to do some internal querying. I am under the impression that I need to use ajax for this. I'm new to javascript and Ajax and have no idea how to incorporat...
2018/02/26
299
943
<issue_start>username_0: Using Angular 5, I am trying to show all properties of an object. With a collection of objects such as: ``` testobjects = [ {"customer": "Me", "ID": "1"}, {"customer": "You", "ID": "2"}, {"customer": "Him", "ID": "3"}, {"customer": "Her", "ID": "4"} ]; ``` and with HTML: ``...
2018/02/26
619
2,220
<issue_start>username_0: In an application I need to send an event on input debounce. I'm trying this : ``` @ViewChild('messageInput') messageInput: ElementRef; private inputTimeOutObservable: any; setTypingTimeOut(){ this.inputTimeOutObservable = Observable.fromEvent(this.messageInput.nativeEle...
2018/02/26
1,050
3,590
<issue_start>username_0: Here is my code. The code is supposed to get the string from a user and output a the length of the string. I am using pointers because I was trying to get the code to work before having to move it to a function. ``` #include #include #include int main() { //init variables char \*userInpu...
2018/02/26
983
3,900
<issue_start>username_0: I am using NetworkX's simple\_cycles to generate all cycles, and I iterate through on the condition of breaking if a cycle of size k is found (k being supplied by the user). ``` try: for cycle in nx.simple_cycles(G): if len(cycle) == k: checkval = True break...
2018/02/26
898
2,699
<issue_start>username_0: I am needing something similar to dotimes in clojure but will allow me to return something at the end other than nil. Have not found anything myself but need it to be able to take in a vector, do some formatting on each element then cons that element onto a new vector. Any help would be great. ...
2018/02/26
909
2,937
<issue_start>username_0: I'm looking for the 'description' part of [this page](https://www.usine-digitale.fr/annuaire-start-up/innovsante,579743). It contains multiple tags. I can retrieve them using this `xpath` : ``` response.xpath('//div[@itemprop="description"]/p/text()').extract() ``` But the result is in the ...
2018/02/26
703
2,364
<issue_start>username_0: i dont know how to ask this question in proper english. i have a query ``` select * from user ``` it return ``` id, username, status, owner_id ``` when i print ``` 1 - john - 1 - 0 2 - paul - 1 - 0 3 - adam - 1 - 1 (where adam is owned by john) 4 - tony - 1 - 2 (where tony is owned by p...
2018/02/26
655
2,160
<issue_start>username_0: I have the following `exec-path` (according to `describe-variable`): ``` ("/usr/local/bin/" "/usr/bin/" "/bin/" "/usr/sbin/" "/sbin/" "/usr/local/Cellar/emacs-plus/25.3/libexec/emacs/25.3/x86_64-apple-darwin16.7.0/") ``` This is the `lein` executable path: ``` /usr/local/bin/lein ``` Thi...
2018/02/26
2,438
10,574
<issue_start>username_0: I wrote a piece of server code in C and I would like to send data continuously to my client application every iteration. ``` while (1) { startInt = mymillis();//capture starting time Sensor_raw_data_float = Sensor_Read_Values_(); float data = Sensor_raw_data_float.x * 0.007; ...
2018/02/26
589
2,290
<issue_start>username_0: ``` void pal_string_copy(char * source, char * destination){ for(int i = 0; i < *source.length(); i++) { if(isalpha(*source[i])) { destination += toupper(*source[i]) ; } } ``` We have to use this function with those parameters to make a copy of a string while stripping...
2018/02/26
523
2,067
<issue_start>username_0: I see react components have "this.state" but why does it have that if I could just have various "this.var1", "this.var2", ie class variables. If it's defined as a **class** in es6, then it already has its own state. I see that if I change the state with "setState" then it rerenders. but wouldn...
2018/02/26
989
3,654
<issue_start>username_0: I am a newbie in C++ and I have encountered a problem that I need to define a new data types (unions concretely) via typedef in my class. The relevant code snippet of .h module of my class is following ``` class Manager { public: static const uint8_t NO_BYTES_IN_PACKET; static cons...
2018/02/26
706
2,652
<issue_start>username_0: I'm trying to get a list of all cards associated with a video id. I've looked at the different Youtube APIs, but no success. [example of cards in a video](https://i.stack.imgur.com/lBjBE.jpg) Does anyone have an idea how to do this? Thanks<issue_comment>username_1: If you don't *odr-use* th...
2018/02/26
1,012
3,204
<issue_start>username_0: So I'm trying to print a table of characters with their corresponding integer values. Below is my code:- ``` #include using namespace std; int main() { char i = 'a'; while (i <= 'z') { cout << i << '\t' << 'a' + 1 << '\n'; ++i; } } ``` I tried to put char('a' + 1) in the code which ...
2018/02/26
1,899
6,916
<issue_start>username_0: Suppose we want to write our own `sum` function in Haskell: ``` sum' :: (Num a) => [a] -> a sum' [] = 0 sum' (x:xs) = x + sum' xs ``` Why can't we do something like: ``` sum' :: (Num a) => [a] -> a sum' [] = 0 sum' (xs++[x]) = x + sum' xs ``` In other words why can't we use `++` in patter...
2018/02/26
2,068
7,628
<issue_start>username_0: I work on PLC programming and supervisors. My plant is composed of: supervisor, one or more PLC, modem for remote access. * The supervisior has 192.168.2 ip address * The PLC has 192.168.3 ip address * The modem has 192.168.1 ip address * The local PC has 192.168.4 ip address Setting the fun...
2018/02/26
971
3,648
<issue_start>username_0: I'm writing a Webpack loader that should be cacheable. The [documentation for `this.cacheable`](https://webpack.js.org/api/loaders/#this-cacheable) says: > > A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed. > > > Now I wonder: Do the loade...
2018/02/26
877
3,363
<issue_start>username_0: What do colon and dollar given below mean in React? **Example for colon:** **Example for dollar, (its used right before the expression but why):**<issue_comment>username_1: The dollar is an es6 syntax to use variables in strings. Upvotes: 0 <issue_comment>username_2: $ is not of react. But ...
2018/02/26
1,157
3,952
<issue_start>username_0: I know your first reaction will be "why on earth would you do this, your method names are clearly ridiculous" but it's because I'm using Spring Boot JPA where you can use the method name to construct the query for you by reflection (it's amazing). But when querying based on a few different colu...
2018/02/26
327
889
<issue_start>username_0: like this, two columns, however, not only three lines ``` 1 21 1 21 1 21 ``` ... to become ``` 1 a21 1 a21 1 a21 ``` ... still two columns, just add **same word** "a", I guess maybe can be solve by “**awk**” or “**sed**”, but didn't find how to realize this, thanks in advan...
2018/02/26
858
2,791
<issue_start>username_0: We have wrote an oracle function that returns nvarchar2 . it works fine when it return small value like 'hello'. However it return "ORA-06502 : character string buffer too small" error when the nvarchar2 goes long (about 3000 character). is there a limit in the size of function's return value? ...
2018/02/26
1,851
6,788
<issue_start>username_0: MailChimp campaign content docs - <https://developer.mailchimp.com/documentation/mailchimp/reference/campaigns/content> I'm trying to replace some placeholders in a campaign content with actual values via the API. At first, I thought there might be some syntax errors or internal logic errors l...
2018/02/26
474
1,480
<issue_start>username_0: Hi I would like to query some data from a sql database for birthdays. I only want to find a record that matches dd/MM , how can I do this? The DOB is in the format of this: YYYY-MM-dd 00:00:00.000 ``` sql = "SELECT * FROM [myDb].[dbo].[TblPeople] WHERE txtLeavingDate IS NULL...
2018/02/26
653
2,002
<issue_start>username_0: I have a question about web scraping the price of an amazon article. I tried to get the price of an article and it works unfortunately not always. I get randomly the status code 503 (server unavailable). I can work around that problem with a while loop that ends if status code == 200. I want t...
2018/02/26
465
1,452
<issue_start>username_0: I have a prop in React, I am trying to use with CSS style settings. You eventually will be able to change the direction. I have created a prop with CSS and an object. Heres the code for it. ``` export const styling = (props: any) => { let styles = { box: { transform:...
2018/02/26
881
2,453
<issue_start>username_0: Sample code: ``` import numpy as np a = np.zeros((5,5)) a[[0,1]] = 1 #(list of indices) print('results with list based indexing\n', a) a = np.zeros((5,5)) a[(0,1)] = 1 #(tuple of indices) print('results with tuple based indexing\n',a) ``` Result: ``` results with list based indexing ...
2018/02/26
983
3,345
<issue_start>username_0: The R package networkD3 provides an interface for R users to make network plots in D3, but the input data and ability to map data to network aesthetics differs over the available plots (e.g., simpleNetwork, forceNetwork). Recently I've been trying to apply custom colors to each node in a radia...
2018/02/26
614
2,207
<issue_start>username_0: I have a while loop that loops from one date to the other date. And I want to submit some data to the firebase realtime database. I want to submit, and wait till the result is back. And then go to the next iteration. ``` var loop = moment(startDate, 'MM-DD-YYYY').toDate(); var end = moment(e...
2018/02/26
574
1,776
<issue_start>username_0: In one Cloudformation template, I create an SNS topic and export it. Note that you cannot export an SNS topic's `Arn` because that attribute is not available to `GetAtt` on [docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). **BaseS...
2018/02/26
2,464
6,222
<issue_start>username_0: I'm using TypeScript 2.7.1 and ngrx. My Actions look like this: ``` import { Action } from '@ngrx/store'; export const HEALTH_FORM_CONTENT_CHANGED = '[setupHealthForm] Content Changed'; export const HEALTH_FORM_TITLE_CHANGED = '[setupHealthForm] Title Changed'; export class SetupHealthFormCo...
2018/02/26
735
2,547
<issue_start>username_0: Sorry for asking this question I am sure this was already answered somewhere else but I don't even know what keywords or how to explain it properly... So... I have this perl code that connects to sql server.. ``` my $user = ''; my $pass = '.'; my $connection = "dbi:Sybase:server=;database=Adve...
2018/02/26
367
1,128
<issue_start>username_0: I would like to validate date column of a table with format 'YYYY-MM-DD HH24:MM:SS'. The query i used so far is ``` select count(*) from table-name where not regexp-like(datefield,'/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/' ``` I would like to validate using a different method for ...
2018/02/26
542
1,973
<issue_start>username_0: When I try to run this query in CodeIgniter 3, it gives me this error: ``` Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'forum.phrases.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full...
2018/02/26
399
1,302
<issue_start>username_0: I'm trying to use regular expressions to work on some strings. At the moment i'm using this expression `$var1=trim(preg_replace('/[^A-Za-z0-9\-\']/', ' ', $myString));` But with this one i'm loosing some characters i want to keep. Those characters are '.' '\' and ':'. Can someone give me some ...
2018/02/26
1,037
2,852
<issue_start>username_0: I have a list which I have ordered by score like this: ``` var orderedList = outcomeRequestModels .Where(m => m.Score > 0) .OrderByDescending(m => m.Score).ToList(); ``` What I would like to do, is randomise the items in the list with the same score. So if I have a list of items like...
2018/02/26
545
2,139
<issue_start>username_0: this is probably a simple fix. The element is supposed to slide out from the top of the page on hover. My code is working as intended, but I am getting this error. error: ``` [Angular] Identifier 'compartmentOpen' is not defined. The component declaration, template variable declarations, and ...
2018/02/26
544
1,919
<issue_start>username_0: I was looking for my problem on the internet, but the solutions given still do not work. How to transfer data from first Activity to second?(plain text) MainActivity ``` btn.setOnClickListener { val player1= findViewById(R.id.et1) as EditText val player2= findViewById(R.id.et2) as E...
2018/02/26
1,728
4,401
<issue_start>username_0: Hi I have a pandas dataframe which has event columns and other columns as well. I want to perform a group by on id and on that group by i want to take 2 records out of all continues 0s i want to find out a pattern of continues 5 0's could be more but it has to always followed by 1 as well and t...
2018/02/26
1,065
3,171
<issue_start>username_0: I was deployed a Twitter Heron cluster with Aurora and Mesos. The components of the cluster as following list: 1. Scheduler: Aurora scheduler 2. State Manager: zookeeper 3. Uploader: HDFS The instances of Aurora are always pending status after I submitted the example topology named WordCountT...
2018/02/26
1,205
4,160
<issue_start>username_0: I seem to have run into a chicken and egg problem. I want to have a structure that as one of its members is a function pointer. However this function pointer wants to use that same structure as it's argument. This creates an issue where I have to define the function pointer before I can includ...
2018/02/26
759
2,626
<issue_start>username_0: I want to list the user who have a common privilege. For example, I wwant to liste all users who cant execute a specific stored procedure. Any ideas ? Thank you in advance<issue_comment>username_1: So I had searched through stack exchange and couldn't find anything so humbled myself to asking...
2018/02/26
474
1,822
<issue_start>username_0: I'm starting a project that I'm hoping to make mostly cross-platform with [react-native-web](https://github.com/necolas/react-native-web). I'm using this react-native starter template here: <https://github.com/react-everywhere/re-start> And the only thing I'm struggling to get working is URL ...
2018/02/26
1,167
2,868
<issue_start>username_0: I am using C++Builder XE4. I am trying to compile some C code into a console application. The C file is large so I have tried to focus on the problem. The code sets up two structures and then tries to call a value which is failing. ``` struct ephloc { long first_item_ordinal; long last_it...
2018/02/26
1,509
3,480
<issue_start>username_0: The program is as follows. The issue occurs when I try to run the code for >~80 years, at which point the code apparently 'runs' instantly, generating an empty text file. The code runs fine for smaller timescales. ``` PROGRAM NBody IMPLICIT NONE DOUBLE PRECISION:: m(1:10), deltaR(1:3) DOUBLE...
2018/02/26
1,178
3,688
<issue_start>username_0: I'm developing a simple app to return a random selection of `exercises`, one for each `bodypart`. `bodypart` is an indexed `enum` column on an `Exercise` model. DB is PostgreSQL. The below achieves the result I want, but feels horribly inefficient (hitting the db once for every `bodypart`): ...
2018/02/26
1,297
4,101
<issue_start>username_0: when I run the following program which is to create a random array of integers and then sort them in www.jdoodle.com, I get this error message: --- ``` arr = [18, 85, 93, 81, 8, 7, 18, 26, 46, 41, 69, 48, 50, 16, 3, 26, 27, '\n’ 31, 47, 71] Exception in thread "main" java.lang.ArrayInde...
2018/02/26
293
939
<issue_start>username_0: Currently have a oj-panel with another oj-panel inside but I want that, the second one to have the background color covered till the border of the first one... [current state of project](http://prntscr.com/ik0klx) Current code: ``` ``` [example of what I want to implement](http://prntscr.co...
2018/02/26
2,578
7,632
<issue_start>username_0: [Current picture](https://i.stack.imgur.com/0QJ6k.png) [Goal picture](https://i.stack.imgur.com/wtW2r.png) I am trying to move this element to fit at the bottom of flex-body. I have tried a bunch of solutions, but this is the only way I could get it to even move part of the way down. Any help w...
2018/02/26
392
1,574
<issue_start>username_0: I have added a custom validator to parsley which is working as expected but the only problem I have is that the `data-parsley-error-message` is being used over the `data-parsley-required-message` when the field has been left empty. How can this be prevented so that the error message is used wh...
2018/02/26
2,166
9,190
<issue_start>username_0: I'm trying to create a XF component whose some properties are of a type that inherits from `BindableObject`. For illustrating, I have class `Shadow` with `double Radius` and `Color ShadowColor` properties and a class `MyBoxText`, that have a `bool IsLoading` and a `Shadow Ghost` properties. M...
2018/02/26
1,873
8,000
<issue_start>username_0: I'm currently working on an application that implements the MVVM architecture, where I am trying to do the login logic. I have a pretty good idea of what the main responsibilities of both `INotifyPropertyChanged` and `ICommand` are, and have already implemented them to all my view models tha...
2018/02/26
878
3,112
<issue_start>username_0: How do I set the height a [React Navigation](https://reactnavigation.org) modal view so once it has appeared it will only cover about half of the screen from the bottom up, and the view below remains visible? **Update:** I'm trying to create a ux flow similar to the App Store purchase modal, ...
2018/02/26
849
3,021
<issue_start>username_0: I am learning react and trying to set up routes with react-router-dom. All the routes are working except the default route. The content of the default route component displays on all other components when i navigate to their routes. here is the code and the output below ``` import React from '...
2018/02/26
748
2,137
<issue_start>username_0: i hope you dng good,i m working in school project that manage all influence inside it,i got a problem as the image descrip it [duplicate each row](https://i.stack.imgur.com/wcIjt.png) my purpose is to show just one 'MATIERE' with all 'NOTE\_DEVOIR'(devoir in the table),but i got each matiere du...
2018/02/26
1,898
7,355
<issue_start>username_0: I'm using Spring Webflux WebClient to make a REST call from my Spring boot application. And every time getting a timeout in 30 seconds. Here is some code I tried to set socket timeout in WebClient of Spring webfulx. ``` - ReactorClientHttpConnector connector = new ReactorClientHttpConnector(...
2018/02/26
804
2,257
<issue_start>username_0: I have a large dataset for which I want to get the value of each row plus the previous row. With a for loop, it is fairly simple but with my large dataset, it takes much longer. I've been told that apply with a function is MUCH faster, but I don't know how to write a function and I can't find e...
2018/02/26
1,071
3,242
<issue_start>username_0: I have a (huge) file like this: test\_file ``` a b a c a d b a b b a g a j c g ``` And I am trying to split it into multiple files based on the first field. However, repeated but not consecutive values should create a new file (i.e. every time the value in field one changes ...
2018/02/26
257
757
<issue_start>username_0: I am new to python and I am not getting how to print the list in which, the list should not contain ' while printing. if give `print list` I am getting the result as `['xyz', 'ysfe']` I need to eliminate that single quotes.<issue_comment>username_1: try this, it will work ``` mylist = ['abc',...
2018/02/26
946
2,531
<issue_start>username_0: I want to show to the user in the datagridview the source of the articles informations ( famille1 or famille2) : my code : ``` Dim dt1 As DataTable = New db_con().selectdata( _ "SELECT famille1.ID, famille1.Article, famille1.quantité, famille1.prixch, famille1.prixvn, famille1.d...
2018/02/26
486
1,569
<issue_start>username_0: I'm not able to enforce web browser (chrome) to save (anywhere) a file from web api controller method. `[HttpGet("download/{id}")] public FileContentResult DownloadFile(int id) { try { var result = classARepository.Get(id); var vm = mapper.Map(result); var jsonResult = JsonConvert.Seriali...
2018/02/26
789
2,748
<issue_start>username_0: I am trying to map a service model to a view model using **Mapster**. My service model contains a list of strings. My View Model contains a list of type RolesViewModel. RolesViewModel has a string property named RoleName. Below are my models ``` public class UserViewModel { [Display(...
2018/02/26
1,177
3,704
<issue_start>username_0: Neo4j has recently introduced `call db.labels();`, which yields all labels used in the database, presumably without the need to do a full scan. Is there something similar for property keys, ie, some instruction to return all keys used in the DB, whatever the nodes? And is there something param...
2018/02/26
1,324
4,071
<issue_start>username_0: I have 2 local SVN working copy, /copyA and /copyB. I need to merge this two folders in one /copyA+B, and to keep this merged folder up to date, as long as commits flows in copyA and copyB. To do that, I created a script that run a "svn diff --summarize" command on each source. The command giv...
2018/02/26
237
876
<issue_start>username_0: I have an array of variable length and i want to pass the array into mysql get query. var ids = [1, 3, 7, 8] And my query is ``` return Connection.query("select student from registrations where id in (?)", [ids], callback); ``` Is it possible?<issue_comment>username_1: Yes the query will...
2018/02/26
369
1,212
<issue_start>username_0: Used to print the fibonacci in normal order, but can't figure out how to reverse it, from 4181 to 0. ``` int[] numbers = new int[20]; numbers[0] = 0; numbers[1] = 1; System.out.println("Fibonacci sequence:"); System.out.println( numbers[0] ); System.out.println( numbe...
2018/02/26
1,312
4,327
<issue_start>username_0: I'm trying to send out an email with two seprate tables. How do I do that? Adding sample data, per someone's request. This is what the email should look like Items ``` Item Price Apples 1.25 Oranges 2.24 Banana 0.29 ``` Sales ``` Month Item Sold Feb Apples $5.00 Feb Oranges $10...
2018/02/26
1,433
4,594
<issue_start>username_0: This code gets the first tuple element satisfying a test (in this case, if it derives `Base`). **How can I static\_assert that only one element satisfying that condition may exist?** (much like C++17's `std::get` fails to compile if there exists more than one element of the provided typename.) ...
2018/02/26
909
3,249
<issue_start>username_0: I was using an iterator on a `String`'s characters: ``` pub fn is_yelling(message: &str) -> bool { let letters = message.chars().filter(|c| c.is_alphabetic()); message.chars().any(|c| c.is_alphabetic()) && letters.all(|c| c.is_uppercase()) } ``` This raises a compilation error: ```...
2018/02/26
648
2,421
<issue_start>username_0: I am trying to design a footer with two rows. First one with 4 columns and the second row just one column 3 columns first row width. And the whitespace must be filled for the last column in first row. Check the attached picture to understand the problem. <https://i.stack.imgur.com/SrgQr.png> ...
2018/02/26
915
3,200
<issue_start>username_0: I want to test file uploader component using Jest and vue/test-utils. I have this: ``` describe('show progress bar of uploading file', () => { const wrapper = mount(FileUploaderComponent) // create csv file let csv = new Blob([''], { type: 'text/csv;charset=utf-8;' }) csv.na...
2018/02/26
637
2,468
<issue_start>username_0: Didn't manage to find an aswer for the problem. Therefore, decided to share it here. Hope it will help anybody and professionals will share more efficient solution I created a function in MSSQL that takes a parameter and try to find corresponding record in a mapping table. The extraction of ma...
2018/02/26
1,054
3,949
<issue_start>username_0: I'm building an anchor link using `Url.Action` in my view. When built, it does not contain controller method: ``` function showDetails(data) { var link = "@Url.Action("Index", "Detail")" + "/" + data; var returnText = "[" + data + "](" + link + ")"; return returnText; } `...
2018/02/26
601
2,313
<issue_start>username_0: I am making a game and I'm trying to display the highscore. honestly I don't know what I am doing. I could really use some help. I want to display the highscore in two digits (e.g. 01, 02, 03 ... 09, 10, 11). ``` private class MainActivity extends Activity { private TextView highscore; ...
2018/02/26
1,125
4,213
<issue_start>username_0: I looked for this question everywhere but, I haven't found it. I'm using Sequelize for Postgres, and I'm trying to add content to a model. It's not throwing any errors, except just a warning that says that string based operations have been deprecated, but this isn't an operation. sequelize dep...
2018/02/26
505
1,961
<issue_start>username_0: I created a fresh Laravel framework. I created a controller named PostsController: ``` php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Post; use App\Http\Controllers\Controller; class PostsController extends Controller { public function index() { $p...
2018/02/26
432
1,746
<issue_start>username_0: I'm trying to check if a JSON response contains a value already inside an array and if it doesn't add it in. The problem I'm having is understanding how to approach this in reactjs. I'm checking before I append it but it doesn't want to work. I've tried passing in user `object` & `user.id` but ...
2018/02/26
1,435
4,980
<issue_start>username_0: I am wondering what is the cleanest way to initialize a custom `UIView` with a specific frame. The `UIView` is designed from a `XIB` file. **Here is my implementation** : ``` class CustomView : UIView { @IBOutlet var outletLabel: UILabel! public required init?(coder aDecoder: NSCod...
2018/02/26
1,596
5,593
<issue_start>username_0: I am not really sure why its showing the default route once I did a query param change. Is there a better approach for this kind of issue? maybe I shouldn't be using query param? Open to get educated! Version "react": "^16.2.0", "react-dom": "^16.2.0", "react-router": "^4.2.0", "react-router-d...
2018/02/26
715
2,293
<issue_start>username_0: I have a DIV that is declared with ***style="direction:ltr***" in-order to display right to left items. My issue that if I declare a div with a right margin (***margin-right***), this margin does not automatically switch to the left side when the div is RTL. This forces me to style every div ...
2018/02/26
518
1,984
<issue_start>username_0: Say I am running my app in GKE, and this is a multi-tenant application. I create multiple Pods that hosts my application. Now I want: Customers 1-1000 to use Pod1 Customers 1001-2000 to use Pod2 etc. If I have a gcloud global IP that points to my cluster, is it possible to route a request b...
2018/02/26
1,328
3,920
<issue_start>username_0: I have a table A that has call count number of employees for last 30 days. However, if the employee does't have call for last 30 days, it won't show up in this table. How can I insert those employee into this table (say employee list is in table B) ``` Table A: Employee Date Call_count Jim ...
2018/02/26
524
1,731
<issue_start>username_0: Another question on powershell import CSV options I have two files in the folder File1 (most recent) File 2 ( Second most recent) I selected most recent file with below command ``` $Filerecentdir = "Dir path" $Filter = "*.csv" $Filerecent = Get-ChildItem -Path $Filerecentdir -Filter $Filter |...
2018/02/26
777
2,438
<issue_start>username_0: How to call a class variable by different names? I mean similarly to something like this: ``` class test{ int values[2]; #define right values[0] // <- something like this #define left values[1] }; int main(){ test obj; obj.values[1] = 23; // this is the same thing obj.left = 23; ...
2018/02/26
779
2,428
<issue_start>username_0: I am trying to run python script inside my load script in Qlik Sense app. I know that I need to put `OverrideScriptSecurity=1` in `Settings.ini` I put ``` Execute py lib://python/getSolution.py 100 'bla'; // 100 and 'bla' are parameters ``` and I get no error in qlik sense, but script is n...
2018/02/26
792
2,547
<issue_start>username_0: Given this tables: BOOKS ``` id | data ----+------------------------------------------------------- 1 | { title: 'Book 1', price: 10.5, authors: [{ id: 1}, { id: 2 }]} 2 | { title: 'Book 2', price: 11.5, authors: [{ id: 2 } } ``` AUTHORS ``` id | data -----+--------------------------...
2018/02/26
213
898
<issue_start>username_0: I want to know if there is a standard distributed event bus in Vertx to use for communication between a sender in a VM and a consumer in another VM without using a cluster manager. Thanks<issue_comment>username_1: > > without using a cluster manager. > > > No, the cluster manager is the s...
2018/02/26
2,520
10,954
<issue_start>username_0: I have a simple program here where function create\_truck needs to return truck data structure which I named as lol, and my question is that why this line `struct truck lol = { asd, length, weight, crg };` won't take `asd` as an input. This needs to be done without dynamical allocation and copy...
2018/02/26
1,673
5,527
<issue_start>username_0: I want one of my ONLY ONE of my features to be converted to a separate binary features: ``` df["pattern_id"] Out[202]: 0 3 1 3 ... 7440 2 7441 2 7442 3 Name: pattern_id, Length: 7443, dtype: int64 df["pattern_id"] Out[202]: 0 0 0 1 1 0 0 1 ... 7440 0 1 0 ...
2018/02/26
436
1,677
<issue_start>username_0: We are currently using AWS RDS as our databases. In tables, we defined some insert or update triggers on tables. I would like to know if Bigquery also support triggers? thanks<issue_comment>username_1: BigQuery is a data warehouse product, similar to AWS Redshift and AWS Athena and there is no...
2018/02/26
475
1,480
<issue_start>username_0: I have zero idea why this is happening. I don't even know where to begin searching for this. I have two pictures from two different phones viewing the same webpage: [Not displaying](https://i.stack.imgur.com/xS5ry.png) [Displaying](https://i.stack.imgur.com/HXiqf.jpg) There is no difference ...