date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/03
902
3,367
<issue_start>username_0: I'm following the new Dagger2 support for android to implement a movies list sample application and below is my use case. * Activity Holds a fragment used to load list of movies * Fragment uses a presenter to hit an api using retrofit * Presenter has a dependency to the API interface class whi...
2018/03/03
461
1,519
<issue_start>username_0: I am struggling to use Chromes print to PDF feature via headless browsing. My code is very simple ``` var command = "C:\\Program Files(x86)\\Google\\Chrome\\Application\\chrome.exe --headless --disable-gpu --print-to-pdf=\"D:\\GitHub\\MySite\\bin\\Debug\\Temp\\createPdf180303084003.pdf\" ht...
2018/03/03
494
1,746
<issue_start>username_0: I am working on making some scripts to make my job a little bit easier. One of the things i need is too download some files to use. I first used powershell with the command Invoke-WebRequest. It is working really well, however it dont run on windows 7 computeres, as they have powershell 2. As ...
2018/03/03
582
2,164
<issue_start>username_0: Hello i want to extract certain elements from a json . **CODE:** . ``` var datas:[Usuario]? struct Usuario : Codable { let correo: String? let contrasena: String? } let urlString = "http://localhost:8080/swiftdb/logear.php" guard let url = URL(string: url...
2018/03/03
479
1,806
<issue_start>username_0: Is there any way for me to disable all sort of JavaScript inside a particular div? I initially thought the tag was meant for that, but it turns out I was wrong. Here is what I am looking for: ``` alert('test'); ``` Would get rendered as: ``` alert('test'); ``` Rather than execut...
2018/03/03
1,073
2,831
<issue_start>username_0: I can't seems to put it together on my brain after almost practicing for 24 hours.I need help on changing the button text color to white, while the rest stay the same color ```css //NAVIGATION //======================== .nav ul display: flex padding-left: 0 padding-top: 15px .nav...
2018/03/03
1,000
2,592
<issue_start>username_0: this an exemplary excerpt of my data set. It looks like as follows: ``` Description;ID;Date wa119:d Here comes the first row;id_112;2018/03/02 ax21:3 Here comes the second row;id_115;2018/03/02 bC230:13 Here comes the third row;id_234;2018/03/02 ``` I want to delete those words which contain...
2018/03/03
824
2,245
<issue_start>username_0: so i have to write a list alogside these images in the code i wrote: ``` * * * ![](img/Dedede.jpg) ![](img/tournament.jpg) ![](img/Secret.jpg) ``` biggest problem i have with it, is that the list either over or under the images. i need it to stick to the right. using float in css...
2018/03/03
886
3,489
<issue_start>username_0: Hi folks I'm having some difficulty with angularjs. I have lterally spent the whole day today trying to figure this out! I am new to this and really stuck so hoping someone can help. I'm getting an error 'Cannot read property 'length' of undefined'.. my program has an array of objects '$scope.p...
2018/03/03
1,127
4,113
<issue_start>username_0: I am very new to Angular(started today) and I'm simple trying to extend a tutorial from datafiles to the Django REST Framework and API calls. I cannot work out how to pass a variable to an http call to a Django Rest Framework api. I have my app module / route specified thus: ``` import { BarD...
2018/03/03
786
3,048
<issue_start>username_0: When I try to register a user or create a migration I get the following error: > > "A key cannot be configured on 'ApplicationUser' because it is a > derived type. The key must be configured on the root type > 'IdentityUser'. If you did not intend for 'IdentityUser' to be > included in the...
2018/03/03
456
1,870
<issue_start>username_0: My custom class: ``` public class IntegerField extends TextField { public IntegerField() { super(); restrictToNumbersOnly(); } public IntegerField(String text) { super(text); restrictToNumbersOnly(); } public void restrictToNumbersOnly() { ...
2018/03/03
800
2,920
<issue_start>username_0: In the last issue of <NAME>'s newsletter, [#255 Java 10: Inferred Local Variables](https://www.javaspecialists.eu/archive/Issue255.html), it is shown that `var` is not a reserved word in Java 10, because you can also use `var` as an identifier: ``` public class Java10 { var var = 42; // <-...
2018/03/03
590
2,181
<issue_start>username_0: In my Xamarin Forms Android app, I would like to change the color of the splash screen based on a theme that the user has selected at run time. This change should impact the next run of the app. I have tried using the built in splash\_screen.xml and using a Splash.axml file, but I cannot figur...
2018/03/03
312
1,382
<issue_start>username_0: I have the following method: ``` public IEnumerable Filter(IEnumerable products, ISpecification specification) { return products.Where(specification.IsFulfilled); } ``` Everything works fine, but after writing this method I started to wonder - how does LINQ return IEnumerable if inter...
2018/03/03
1,488
6,091
<issue_start>username_0: I used a service provider to create the archives and tags on a side bar for every view. I am following the Laracasts video series and I could swear I have done everything that the instructor has done. However I get an undefined variable error. I cannot figure out why for the life of me. Have an...
2018/03/03
434
1,713
<issue_start>username_0: I want to remove all websites that have the following strings contained in the `remo` array, however it only removes the first index. here is what i have so far. How would i be able to remove both items in the array ? So far it removes urls containing "listings" ``` with open('example.csv')...
2018/03/03
539
1,993
<issue_start>username_0: In the following code, a `vector` is constructed from an array of `int8_t`. It happens to work, but is it safe? ``` int8_t *arr; int arr_size; ... // Filling the array somehow std::vector v(arr, arr + arr\_size); // Is this safe even though we use int8\_t\* to construct a vector of int? ``` ...
2018/03/03
177
780
<issue_start>username_0: I have added AdMob support in my app as documented. The ads were showing in simulator as well as on real device. After releasing the App on the AppStore the ads are not showing. Banner ads specificaly are not showing. Interstitial also are not showing when requested. But, Rewarded video is show...
2018/03/03
916
3,256
<issue_start>username_0: I am transforming medical record data that is stored in XML with XSLT 1.0. Because these are patient records, while it is going to be okay to adjust certain text values, nothing can be removed, so I have to begin with the identity template. I need to adjust the textual content of certain node...
2018/03/03
2,470
9,208
<issue_start>username_0: I found out that an office at my work spent weeks manually going through an Excel spreadsheet containing a database with >500,000 rows looking for duplicate rows matching certain criteria. The duplicates could not simply be erased before being researched, as a single mistake could have potentia...
2018/03/03
403
1,519
<issue_start>username_0: I'm developing a rails application and it is my goal to add a button that performs a javascript onclick function. The code that I am using is: ``` <%= button_tag "Action" type: "button", onclick: "test()", class: 'btn btn-default'%> ``` Which I am led to believe is the proper method of doing...
2018/03/03
299
1,090
<issue_start>username_0: I am willing to fill a form(HTML) and pass that data into another HTML page and also insert that data into a database. **app.py** ``` @app.route('/signup') def signup(): return render_template("client_signup.html") @app.route('/registered') def registered(): userName = request.form['u...
2018/03/03
794
2,218
<issue_start>username_0: I would like to create a div that is a button, and it includes a picture of a flag and a abv of a country, I've put some code in to what I want, but its not bootstrap's way, I'm struggling to get my head around it and how I can do this with bootstrap. ``` AFG ![](../../Downloads/afghanistan...
2018/03/03
2,020
5,217
<issue_start>username_0: I have a dataframe which contains these 4 numeric columns: `['ID', 'A', 'B', 'C']` I want to filter the data in order to obtain a dataframe where, for each unique value in column ID, i get the rows, **not duplicated**, which correspond the maximum and minimum value of columns A,B,C The image ...
2018/03/03
609
1,744
<issue_start>username_0: ``` class Calculate(): def set_total_cost(self): total_cost = 1000 self.__total_cost = total_cost def get_total_cost(self): return self.__total_cost def set_down_pmt(self): down_pmt = 0.25 self.__down_pmt = down_pmt def get_down_pmt(self): return self.__down_pmt test = Calculate() test.set...
2018/03/03
792
1,959
<issue_start>username_0: I just want to set an option in R that will show all numbers with the thousand localized separator. I saw many posts that cover the **format** and **formatC**, but I need to call the function each time. ``` formatC(1:10 * 100000, format="d", big.mark=",") ``` There has to be a solution jus...
2018/03/03
842
2,210
<issue_start>username_0: I want to dynamically create a python object and add multiple labels: label1, label2, label3, etc. Based on the items that are present in each labels\_list. However, when I print my items at the end of the program they only have a label1 attribute which is actually the LAST label in the list of...
2018/03/03
544
2,053
<issue_start>username_0: The first for-loop you see does not execute and I'm not sure why. It is completely ignored, I tried it in a separate method and I tried it in the main method but something seems to be ignoring but I'm not sure how to get it to run, it simply goes to the next method run in the main method. ``` ...
2018/03/03
447
1,532
<issue_start>username_0: So if I have a dictionary like ``` mydict = {"a":[0,0], "b":[2,1], "c":[2,2], "d":[0,0], "e":[3,1]} ``` How would I search for all keys that the first number in its value is 2 (so I get "b" and "c")?<issue_comment>username_1: Assign some value to `static int numOfVals`. Java by default a...
2018/03/03
1,205
3,570
<issue_start>username_0: Assuming that i have the following database table: ``` ID | Name | Type | Value| --- --------- ---------- ------ 1 | First | A | 10 | 2 | First | B | 20 | 3 | First | C | 30 | 4 | First | D | 40 | 5 | Second | A | 10 | 6 | Seco...
2018/03/03
1,068
3,138
<issue_start>username_0: I am trying to build a chatbot using botkit anywhere and nodejs. I don't want to use any third-party messaging platform. I refer to this link <https://github.com/howdyai/botkit#build-your-bot> and try to setup chatbot in nodejs application: > > First, add it to your project: > > > npm insta...
2018/03/03
1,101
4,147
<issue_start>username_0: I'm building an application which uses jointjs / rappid and I want to be able to avoid loops from occuring across multiple cells. Jointjs already has some examples on how to avoid this in a single cell (connecting an "out" port to an "in" port of the same cell) but has nothing on how to detec...
2018/03/03
1,269
4,387
<issue_start>username_0: I am supposed to convert a nested list into a dictionary. If I have the list: ``` data=[[['1','2','-2'], ['3','-1','4']] ``` I want it to become: ``` d={(0, 0): 1, (0, 1): 3, (1, 0): 2, (1, 1): -1, (2, 0): -2, (2, 1): 4} ``` The tricky part is I you need to see this list as a matrix: ```...
2018/03/03
646
2,548
<issue_start>username_0: I'm trying to run c code on my windows. (I had been running it so far on repl.it). But it is proving harder than it is supposed to be. MinGW is not installing due to some reason. And I've spent a lot of time trying to run it some other way. From my research, I think the best way to go about it ...
2018/03/03
1,819
4,706
<issue_start>username_0: Can somebody explain me the behaviour of membership test in the last 3 lines of my code bellow, why is it False? Why is the membership test different for iterators and iterables? ``` c = [1,2,3,4,5,6,7,8,9,10,11,12] print(3 in c) # True print(3 in c) # True d = iter(c) print(2 in d) # ...
2018/03/03
1,033
3,898
<issue_start>username_0: When I hit this route and perform the code below. ``` Post_Like::create([ 'like' => 1, 'post_id' => 1, 'user_id' => 2, ]); ``` The error below occurs. **Table 'database.post\_\_likes' doesn't exist** Here is my migration file. Before I misspelled the table name. I typed...
2018/03/03
527
1,775
<issue_start>username_0: I'm using this query to get range of rows for example 0-5 , But I get an error message. Here is the code: ``` if(isset($_GET['page']) && isset($_GET['per'])){ $per = $_GET['per']; $pageNumber = $_GET['page']; $from = ($pageNumber * $per) - $per; $results = $pdo->prepar...
2018/03/03
467
1,383
<issue_start>username_0: I'm currently stuck in this right now. I have a code right here: ``` words = ["Hello","how","are","you"] arrlen = len(words) val1, val2, val3, val4 = words ``` What I want to do is add `".mp4"` in each `val1`, `val2`, `val3` and `val4`. Is there any way to achieve this? I have tried `val1 ...
2018/03/03
486
1,610
<issue_start>username_0: ``` import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int num=scan.nextInt(); String array[]=new String[num]; for(int i=0;i ``` Iam getting an error saying number format exception but i tried everything to...
2018/03/03
1,362
4,942
<issue_start>username_0: I realize that this isn't an entirely new question, but after days of trying to get this to work I seem to not understand something fundamentally, despite the extensive searches I have done as I cannot get my app to work. I have a web app with a side `nav` and a main `div` in the center. I am...
2018/03/03
580
2,300
<issue_start>username_0: I have an Angular Service and I want to return a promise with a Typed Array but i'm allways getting this error: src/app/city.service.ts(52,22): error TS2339: Property 'places' does not exist on type 'CityService'. I have no idea of what I am doing wrong. ``` getPlace(coordinates : Coordinates)...
2018/03/03
1,148
3,811
<issue_start>username_0: Ello ello, I found similar questions on the bug i'm facing, and tried the solutions offered but it didn't work for me. I'm trying to separate out my models in a different directory and import them into the app.py When I try to import the db into the python terminal, i'm getting the no appli...
2018/03/03
393
1,392
<issue_start>username_0: I have inherited a huge Rails project with hundreds of warnings, due to other people's sloppy coding habits, none of which I can fix. When I run an individual test suite, with `ruby test/function/my_controller_test.rb`, I get a clean run with no warnings. But when I run `rake test`, something ...
2018/03/03
556
1,934
<issue_start>username_0: I started learning ClojureScript this week and I stuck parsing a Transit response, I have this function: ``` (defn handler [response] (let [comment (:comment response) created_at (:created_at response) last_name (:last_name response) _ (.log js/console (str ">>> C...
2018/03/03
748
2,853
<issue_start>username_0: I am new to the Java game, and am attempting to allow the user to select a directory, and have the contents of said directory recursively searched and printed. My code gives me the error: > > No suitable constructor found for File(file) > > > On this line ``` File[] files = new File(cho...
2018/03/03
830
2,963
<issue_start>username_0: I was trying to implement a code that would allow me to find the 10 most frequent words in a text. I'm new at python, and am more used to languages like C#, java or even C++. Here is what I did: ``` f = open("bigtext.txt","r") word_count = {} ``` Basicaly, my idea is to create a dictionary ...
2018/03/03
572
2,139
<issue_start>username_0: I am working on a shopping cart sample. On each click, I am adding an object of the project to the Cart array. When I click the add cart button the first time, it doesn't update the Cart, but it updates on the second time. Although, when I click the viewCart button in the render's return sta...
2018/03/03
370
1,384
<issue_start>username_0: I have some object with different atributes' types: `String`,`Float`,`LocalDate` and so on. To turn this object into a json `String`, I use (`com.google.gson.Gson`) ``` gson.toJson(object); ``` But now I want to add a `String` to it: ``` { "warning" : "old", --Jsonified Object-- } ``` ...
2018/03/03
679
2,757
<issue_start>username_0: I have my BaseApplication lets say which looks like ``` public class ApplicationBase extends Application { String someKey; public String getSomeKey() { return someKey; } public void setSomeKey(String someKey) { this.someKey = someKey; } } ``` I have a fr...
2018/03/03
951
3,377
<issue_start>username_0: instructions for the project is to create a simple web page application that allows the user to enter one or more stock ticker symbols and display price information about these stocks. • Data has to come from a REST API (<https://www.alphavantage.co>), it is free to use and returns JSON format...
2018/03/03
526
1,951
<issue_start>username_0: After some recent update on google Maps Javascript V3 API, I noticed that contextmenu started being shown when i make a rightclick on a marker. Basically the code is ``` google.maps.event.addListener(marker, 'rightclick', function (event) { foo(marker); }); ``` I have already tried the o...
2018/03/03
403
1,510
<issue_start>username_0: i have this problem, I would like to load a text inside a div with .innerHTML but after the event click the text inside the div diseappers: index.html ``` Anagrafica My Document =========== ``` app.js ``` window.addEventListener('load',function(){ document.getElementById('submi...
2018/03/03
1,186
4,263
<issue_start>username_0: Can anyone explain me if I can recursively loop through a sorted list inside a For loop? I am looping through a column, and once I found an exact match (lets say **EALOLES** string), then I want to keep on looping until there's no more matches. [Data example](https://i.stack.imgur.com/yR5MP.p...
2018/03/03
3,376
10,082
<issue_start>username_0: How would I go about calling a method of a Cython extension type from within a Numba jitted class? My minimal example below fails with the error I record below. How would I amend my minimal example to make it work? Thanks for any help!! Minimal example --------------- I have a Cython module,...
2018/03/03
1,093
3,431
<issue_start>username_0: Im following a course online and one of the challenges is this: **Write a function called vowelCount that accepts a string and returns an object with each key being the vowel and the value being the number of times the vowel occurs in the string (the order of keys in the object does not matte...
2018/03/03
1,321
4,416
<issue_start>username_0: I'm new to `android` programming and my project needs `serial communication` with an `arduino board`. I began with building my very first project by importing the `source code` of [ArduinoUSB](https://github.com/hariharan-m/Arduino-Android-USB). In this code, I have use the `android device` in...
2018/03/03
428
1,649
<issue_start>username_0: I have searched a lot on how to deploy a Python 3 Flask project on Google Cloud. I always end up with explanations on Python 2 or old versions for Google Cloud. The YouTube videos I have seen are at least 1 or 2 years old, and most of the services, buttons, and procedures are changed now. I do...
2018/03/03
1,931
6,465
<issue_start>username_0: I am trying to train Tensorflow Object Detection API on my dataset containing apples and capsicum. For that, I generated the required files (TFrecords and images with annotations) and placed them in models/research/object\_detection directory. Then, I forked the Object detection api from github...
2018/03/03
737
2,584
<issue_start>username_0: I have a question. I have 10 classes in 10 files and one main class and class with user log. I run all tests in the main class. I would like to run 10 at once. At present, the browser opens up to 10 times with each class. I would like 10 tests to take place in 1 browser session. It is possible...
2018/03/03
823
2,649
<issue_start>username_0: One data series (nycflights13::flights) is in local time, and one is in GMT (nycflights13::weather). The problem is to merge them in such a way that DST is respected. If we look at January 1, the time difference between America/New\_York and GMT should be 5 hours. In June it should be 4 hours. ...
2018/03/03
455
1,258
<issue_start>username_0: For instance, source data: ``` some blabla, sentence, example ``` Awaited result: ``` [some,blabla,sentence,example] ``` I can split by comma, but don't know how to split by coma and space at the same time? My source code, so far: ``` string.split("\\s*,\\s*") ```<issue_comment>usernam...
2018/03/03
533
1,863
<issue_start>username_0: In this code: ``` Edit Current value: {{text}} new Vue({ //... data: { editing: false, text: 'initial value..' } methods: { onSubmit: function() { if (this.value.length < 5) alert("error") } } } ``` How can I make sure that {{text}} displays only a validated va...
2018/03/03
607
1,927
<issue_start>username_0: In golang you can define a type as a data structure ``` type MyMap map[int]int mapper := make(MyMap) ``` and go on to use it like a regular map in go ``` mapper[13] = 133 ``` But I don't understand when to use this or in what scenarios this will helpful?<issue_comment>username_1: That is...
2018/03/03
785
3,452
<issue_start>username_0: is it any different to inheriting from a normal superclass that can be implemented? atm I have an abstract class called `abstractcar` and I have `bigcar` / `smallcar` extending this `abstract class`. ``` public abstract class AbstractCar{ private int capacity; } class BigCar extends Abst...
2018/03/03
314
1,153
<issue_start>username_0: How to import `Node` (type used by flow), and `PureComponent` in one line only for code purity. Lines below don't work: ``` import type { Node }, { PureComponent } from 'react'; // or import type { Node, PureComponent } from 'react'; ``` Note: I actually use this ``` /* @flow */ import { P...
2018/03/03
633
2,416
<issue_start>username_0: I would like to create a messaging app, and therefore I would like to allow users to select the messages. The problem is that I can not find a way to make it so that cell gets selected only if tapped inside it on a specific view My source code: ``` override func tableView(_ tableView: UITab...
2018/03/03
1,323
4,779
<issue_start>username_0: I've found several suggestions for adding whitespace to R Markdown documents including , `\newpage` and some other things. These don't work for my HTML output, maybe there's a better way. I'd like to do two things in the example below: (1) Add extra whitespace between the title and the first ...
2018/03/03
2,211
6,566
<issue_start>username_0: I have a `CGRect` value and need to draw a border around it. I just want the corners to be drawn without any lines connecting them. Something like this... [![enter image description here](https://i.stack.imgur.com/rcIdN.png)](https://i.stack.imgur.com/rcIdN.png) How would I draw this figure...
2018/03/03
629
1,935
<issue_start>username_0: SQL Server 2016 I have a table with these columns: ``` CREATE TABLE [dbo].[Site] ( [Id] [int] IDENTITY(1,1) NOT NULL, [SiteId] [int] NOT NULL, [WellId] [int] NOT NULL, [TotalOil] [int] NOT NULL, ) ``` I'm creating another table like so: ``` CREATE TABLE [dbo].[Reserves] ( ...
2018/03/03
1,086
2,382
<issue_start>username_0: ``` A B C D 0 Red 10.0 11.5 12.0 1 Red 10.5 11.5 12.0 2 Red 11.0 11.5 12.0 3 Red 12.0 11.5 12.0 4 White 10.0 10.5 11.0 5 White 10.5 10.5 11.0 6 White 11.0 10.5 11.0 7 White 12.0 10.5 11.0 ``` I want to apply next condition for each *A...
2018/03/03
262
920
<issue_start>username_0: As indicated in the official loadimpact/k6 documentation, we are able to execute k6 scripts as follows: ``` k6 run github.com/loadimpact/k6/samples/http_get.js ``` Is it possible to pass in custom command line arguments into a k6 test? For instance, let's say that I would like to pass in a U...
2018/03/03
724
2,617
<issue_start>username_0: Hello im pretty new in Python and i have a simple function that looks like this: ``` def normal_list(p, data, n): cost = 0 cost_list = [] list = [] clappend=cost_list.append listappend=list.append for i in range(n): x = np.random.choice(data, p=p) if (len(list) == 0): ...
2018/03/03
1,287
3,438
<issue_start>username_0: Say I have some data that looks like this ``` Name Type Rating Dave Good 3.0 Steve Bad 0.0 Steve Good 2.0 Dave Bad 1.0 Tom Bad 2.0 Marianne Good 0.0 Tom Bad 1.0 Steve Bad 5.5 Marianne Bad 3.0 ``` And I want to take any row that meets ...
2018/03/03
2,150
6,308
<issue_start>username_0: My goal is to sort a list of words according to two criteria: * the primary criterion is increasing word length, * the secondary criterion is alphabetical order For example: ``` {red,a,three,b,four,aeoli} ``` should be sorted as: ``` {a,b,red,four,aeoli,three}. ``` I have two separate q...
2018/03/03
1,597
4,805
<issue_start>username_0: I have a list of error that I need to display with paging at the browser, however, I'm not pulling data from the database, I'm building this model based on a number of business logic and this list could be up to 1000 items or more. All items need to be available at the front end, that many item...
2018/03/03
1,906
5,939
<issue_start>username_0: The solution was to remove static from my variables in the Account class. The code now works as intended I am trying to make a method that will check if a number is in an arraylist of objects My initial thoughts were this but this is not working currently. My main class is this withoutirrelev...
2018/03/03
861
3,144
<issue_start>username_0: I am working on **Tic Tac Toe** in React (without JSX) and I get to the point where I need to learn how to use **onClick** such that when a cell is clicked an 'X' will appear in the cell. After researching, I haven't quite been able to figure it out yet due to all of the syntactical difference...
2018/03/03
813
3,110
<issue_start>username_0: So I'm having difficulty understanding the steps I need to take to accomplish my task. I want to get all the users "watchlists" for crypto coins (which I've done). Then return the updated data from the coinmarketcap api depending on what is saved in their watchlist. I was told I can accomplish ...
2018/03/03
930
3,042
<issue_start>username_0: I'm trying to kill an entire process tree in C. I am able to do this, however when I run the code, it prints "Killed". I don't want this. Is there any way I can achieve the same result without printing "Killed"? This is the code I am using: ``` #define _POSIX_SOURCE #include #include #incl...
2018/03/03
310
1,219
<issue_start>username_0: Is making JavaScript asynchronous as simple as they make it out to be here? <https://www.w3schools.com/tags/att_script_async.asp> For example, if I have this in my HTML:<issue_comment>username_1: It depends on what you want to be asynchronous. That attribute tells the browser to execute the s...
2018/03/03
871
3,348
<issue_start>username_0: I need help with how to retrieve chat history between two users in sequelize. I currently have two tables; one for *users* and the other for *messages*. My *User* table has the basic information like username, email and password while my *Message* table has information like senderId, receiver...
2018/03/03
227
865
<issue_start>username_0: I removed package.yml file to use .cabal file instead. Now I'd like to try defining everything in package.yml, and let stack to generate .cabal file auatomatically. But when I manually converted .cabal file to package.yml and delete .cabal file and ran `stack build`, it shows me this error: ...
2018/03/03
625
2,308
<issue_start>username_0: I'm trying to bulk upsert a collection in .net core 2 using the c# mongo driver. The problem I'm having is that the \_id field is always inserted as null. Here's the code: ``` public async Task UpsertEvents(IEnumerable events) { if(events.Count()>0){ List> requests = new List>(); foreac...
2018/03/03
574
2,339
<issue_start>username_0: I recently started working on [a WordPress website](https://abetterprocess.com/) that someone else setup. One odd thing I have found is that if you are running Chrome you can't scroll using your mouse - only the scroll bars on the side. Scrolling seems to work fine in Firefox and Safari. Typic...
2018/03/03
464
1,671
<issue_start>username_0: I have a simple locking mechanism where a process will win a lock, if it is able to call mkdir on a certain path x. Want I want to do is have other processes be able to search for which process owns the lock. One way to do that, would be to use `ps` and find which processes have open files - ...
2018/03/03
870
3,016
<issue_start>username_0: I have an external main dictionary where I store some values, and a secondary dictionary which I use to iterate with **only some** names and the values I define of the first dictionary, looking something like this: ``` main_dict = { 'colors': { 'foo': 'orange', 'bar': 'blue...
2018/03/03
521
1,804
<issue_start>username_0: I have the following code ``` $user; if (isset($_POST['submitLogin'])) { $GLOBALS['user'] = logIn(); // location1 } function logIn() { $user = new User("my username", "my email"); return $user; } // location2 ``` Then I want to display that information like this: ``` echo...
2018/03/03
391
1,333
<issue_start>username_0: I want to update field `data_aktualizacji` when some row in the same table is updated. I created the following compound trigger. ``` CREATE OR REPLACE TRIGGER oferta_update_trigger FOR UPDATE ON oferty compound TRIGGER id_oferty number(10); AFTER EACH ROW IS BEGIN id_oferty := :...
2018/03/03
470
1,591
<issue_start>username_0: I want to replace my project's first piece of vanilla JS with vue. I try to get the hello world example working. It works as stated, but when I nest the element in another element (these may be the wrong terms) it does not work. My source code: ``` ${ message } Nested ${ message } ```...
2018/03/03
990
3,617
<issue_start>username_0: This question is highly similar to this, but barely different: [configuring namecheap domains with heroku](https://stackoverflow.com/questions/46499677/configuring-namecheap-domains-with-heroku) Here is what I have (for the purposes of hiding the original site, I have omitted its name for the ...
2018/03/03
906
2,435
<issue_start>username_0: More of a math questions than javascript... I have this code to create a semi-circle out of smaller circles but I am not sure how to rotate it so that the semi circle starts at the top of the circle and not the side (rotate it 45º to the left). ```js var items = 9; for (var i = 0; i < items;...
2018/03/03
1,365
5,108
<issue_start>username_0: I try to write a program which has a register part. İf any user wants to create a new account then the program creates an object , thats ok . But ı dont have got the number of user , so i can not code to infinite.Everytime the program should create an object with different object name (like an ...
2018/03/03
112
398
<issue_start>username_0: Is it possible to connect a JS WebSocket to a Python server or just to webservers? When it's possible - how?<issue_comment>username_1: There's a lot of options. Take a look at [`aiohttp` primer](https://aiohttp.readthedocs.io/en/stable/web_quickstart.html#websockets) Upvotes: 2 <issue_comment>u...
2018/03/03
979
3,853
<issue_start>username_0: I have a vue.js/Phoenix app. I'm trying to understand how to properly configure the frontend assets. I'm having trouble understanding why my priv/static/js/app.js file keeps updating whenever I Change something in other files. I'm trying to research this behavior but I can't seem to find out an...
2018/03/03
901
3,371
<issue_start>username_0: SQL: how do you fetch a first day of the month? Hi, I need to fetch a first day of every month from tbl.date from column start\_date. ``` 11/1/2017 12/1/2017 1/1/2018 2/1/2018 ETC. ``` Thanks<issue_comment>username_1: As contrary as this might sound, this is exactly the behaviour Phoenix (...
2018/03/03
1,079
4,135
<issue_start>username_0: Here is my function: ``` adjusted <- c() Adjustment <- function(delta, length) { adjusted <<- vector_1 + delta*(index <= length) head(adjusted) } ``` Here is a hard-coded example of what I would like to achieve: ``` adjusted <- c() Adjustment <- function(delta, length, group = 1) { adjuste...
2018/03/03
391
1,702
<issue_start>username_0: I need to call an external API to get some data from a SuiteScript file and I'm getting an issue. The GET call needs to go with credentials (basically, it has to go with the cookies in the Request Header). If I make the API call from the chrome console setting `withCredentials = true`, but whe...
2018/03/03
689
2,177
<issue_start>username_0: I have a list of tuples which looks something like the following: ``` answer_guess_list = [('A',), ('B', 'C',), ('A', 'B', 'C', 'D',)] ``` In my templates, I have a template variable with the same name. ``` {% for guess_list in answer_guess_list %} {% for guess\_value in guess\_list %} {...
2018/03/03
1,110
2,942
<issue_start>username_0: I am trying to sum a sorted array of positive decreasing floating points. I have seen that the best way to sum them is to start adding up numbers from lowest to highest. I wrote this code to have an example of that, however, the sum that starts on the highest number is more precise. Why? (of co...