date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/18
342
1,294
<issue_start>username_0: I have to following map in scala ``` mutable.Map[String, mutable.Map[String, App]]() ``` Assuming App contains a field called Token which is not the key for the inner map. What is the best practice to extract a map of from this nested map. I did ``` val result = mutable.Map[String, Ap...
2018/03/18
246
593
<issue_start>username_0: I have a hash: ``` a = {b: {c: {d: e}}} ``` How can I save `d` from `a`? Should I write like: ``` x = [:b][:c] a(x) = "foo" ``` `a` output `{b:{c:"foo"}}`<issue_comment>username_1: As mu points out in the comments you probably want to use `dig`: ``` a = {b: {c: {d: :e}}} keys = [:b, :c] ...
2018/03/18
472
1,547
<issue_start>username_0: I'm trying to format a dataset for use in some survival analysis models. Each row is a school, and the time-varying columns are the total number of students enrolled in the school that year. Say the data frame looks like this (there are time invariate columns as well). ``` Name total.89 to...
2018/03/18
285
1,005
<issue_start>username_0: I really need to know how to clear the screen in Ruby. I've already looked all over and haven't found anything that can help. I've already tried using cls in several formats and it NEVER worked (I am on Windows, btw). All that happens is an arrow keeps showing up in the IRB console.<issue_co...
2018/03/18
486
1,964
<issue_start>username_0: We're developing a connector that creates actionable outlook messages for external users. I.E. This is a service. Can anyone please help with the below example? We're getting an error for the external users when they try to action the message by clicking on one of the action buttons. Example:...
2018/03/18
366
1,135
<issue_start>username_0: I am trying to create 46 variables, indexed from 0-45 dependent on 3 other variables, each of which is indexed from 0-45. It seems as though the array approach would be the most straightforward but I can't get it to work. So i have variables a\_0,...,a\_45,b\_0,...,b\_45,c\_0,...,c\_45 and i wa...
2018/03/18
765
2,469
<issue_start>username_0: I have a dataframe with lots of key/value columns whereas the keys and values are separated columns. ``` import pandas as pd values = [['John', 'somekey1', 'somevalue1', 'somekey2', 'somevalue2']] df = pd.DataFrame(values, columns=['name', 'key1', 'value1', 'key2', 'value2']) ``` **Remark:*...
2018/03/18
848
3,337
<issue_start>username_0: This question might be a duplicate, in that case I would love to get a reading on it, but please check if the duplicate question fits mine. I have tried looking for answers, but have not found any that fits my question correctly. I have a website built with React served from a .NET Core 2.0 pr...
2018/03/18
3,029
8,652
<issue_start>username_0: If I have the list `[1,2,3,4,5,6,7]` and I want to group 3 (or any other number) adjacent values so I end up with the list: `[[1,2,3],[2,3,4],[3,4,5],[4,5,6],[5,6,7]]` How would I go about doing this in Haskell?<issue_comment>username_1: ``` Data.List> f n xs = zipWith const (take n <$> tails...
2018/03/18
1,031
3,093
<issue_start>username_0: I have a CSS grid and in this grid articles that could be blog posts. They consist of an image on the left and text on the right. I need the articles to start at the bottom, so that newer articles appear above them. But I just can't get them to start at the bottom whatever I try it's not worki...
2018/03/18
1,481
4,974
<issue_start>username_0: <https://i.imgur.com/El9iCsP.gifv> Above is a gif of what is happening. The game is resetting fine when ever I'm just pressing the reset button however when the player actually dies (collides with a wall) the game doesn't re-initiate. Basically I'm making a kind of speed runner game for a coll...
2018/03/18
1,309
4,229
<issue_start>username_0: I'm trying to have three of divs side by side with spacing in between the div's in the middle. Here is the image of what I need: [![enter image description here](https://i.stack.imgur.com/tmPr6.png)](https://i.stack.imgur.com/tmPr6.png) Here is my current code: ``` .box { float: left; wi...
2018/03/18
1,410
4,701
<issue_start>username_0: I'm trying to find the complementary rotary "gear" shape to any input polygon shape. For example this polygon, is rotated around so that the complementary gear becomes apparent. Both shapes would be able to rotate without interferences. I'm having issues defining the second polygon, which is t...
2018/03/18
238
931
<issue_start>username_0: I want to build a button that when clicked will refresh the page (i.e. command+r shortcut on your keyboard). Is there a reload() (JavaScript) equivalent function in Elm. If not, how should I go about creating this button?<issue_comment>username_1: The easiest way is to use a port like reload -...
2018/03/18
696
2,489
<issue_start>username_0: ***Senario:*** So I am trying to simplify the usage of setting a lot of `TextViews` invisible by making a lot a lines of code into one, so decided to make a method that gets `List` and turns them all invisible. I made a test Class to show the error. (Problem bellow) **Method:** ``` private...
2018/03/18
1,981
8,237
<issue_start>username_0: I read this documentation: <https://learn.microsoft.com/en-us/azure/application-insights/app-insights-api-custom-events-metrics> There are many different API method to track exceptions, track trace etc.. I have a ASP.NET MVC 5 application. For example, I have the following controller method (...
2018/03/18
1,076
4,320
<issue_start>username_0: I am hosting a website on aws, and I am writing it using jekyll. I want to post a video that I have created (not embedding from youtube). Right now I have a separate layout for video posting, in which I have: In the frontmatter of my actual post I include the following line: video\_source: "si...
2018/03/18
1,085
4,301
<issue_start>username_0: Using while loops in Python, I have been asked to complete this task for university but I cannot seem to figure out how to do it: > > Ask for a number, and if the response is actually NOT a number (e.g. "cow", "six", "8!") then throw it out and ask for an actual number. When you do get a numb...
2018/03/18
657
2,318
<issue_start>username_0: Is there any way to do inline unpacking in a with statement in python? Right now, I have a custom context manager that returns a `sqlalchemy` `row` object, and the associated `session` needed to potentially delete it as a 2-tuple, and handles the necessary database manipulations on context exi...
2018/03/18
363
1,307
<issue_start>username_0: I have a flashing sprite css animation for an empty div. ```css #flashIt{ width: 50%; height: 100px; background: blue; margin: 10px auto; border: solid 2px black; left: 25%; animation: flash 1s linear infinite; } @keyframes flash { 0% { opacity: 1; } 50% { opacity: .1 } ...
2018/03/18
484
1,675
<issue_start>username_0: How do i pass a variable from Jquery to PHP? ``` var itemId = $(this).attr('name'); $.ajax({ url: "loaditems.php", method: "GET", success: function(result){ alert(result); }}); ``` I want to add a number in PHP at the end of my SQL request. ``` $sql = "SELECT * FROM SmiteIte...
2018/03/18
539
1,914
<issue_start>username_0: Is it possible to validate in Vuetify group of checkboxes in the same manner as group of radios? I tried to validate them 'as whole' but each checkbox is validated separately. How to enforce checking at least one of the checkbox fields? ```html ``` I would like to have just one mandatory che...
2018/03/18
1,412
5,455
<issue_start>username_0: I am attempting to implement Automatic SMS Verification with the SMS Retriever API, [as described here](https://developers.google.com/identity/sms-retriever/request). To initially test this I had planned on using the Android Emulator and manually sending SMS messages using its GUI interface: ...
2018/03/18
1,542
5,729
<issue_start>username_0: I built an application in java on android that sends the bytes of a .jpg file through a socket and an [Asynchronous Server Socket](https://learn.microsoft.com/en-us/dotnet/framework/network-programming/asynchronous-server-socket-example) in C# on windows that receives the bytes and writes them ...
2018/03/18
454
1,351
<issue_start>username_0: So I have this program that takes in PID input and a character. ``` $ ./transmit 1111 a ``` My question is. If it were ``` $ ./transmit 111a x ``` since PID are all numbers I'd need to catch that. given: ``` char *a[] = {"./transmit", "111a", "x"}; ``` how would I check if "111a" is ...
2018/03/18
464
1,608
<issue_start>username_0: I am trying to move a UIView up and off the screen by its height in ios. Below is my code for doing this. What I am finding is that the UIView does indeed move up and off the screen but instead of moving slowly as intended it continues to move off instantaneously without animation. Please can s...
2018/03/18
628
2,312
<issue_start>username_0: We have a FTL that has - `[Link](javascript:func("${event.title}");)` When the value has an apostrophe, like `<NAME>` - it breaks. We used `js_string` to fix it - `[Link](javascript:func('${event.title?js_string}');)` But we also had to change the double quotes around `$expression` to sin...
2018/03/18
621
2,401
<issue_start>username_0: I have two tables cars table and bookings table.I want to list all the cars which are available between search dates from and to date, using la-ravel query builder. ``` $cars= DB::table('bookings')->select('*') ->where('from', '>=', $from) ->where('from', '<=', $till) ...
2018/03/18
391
1,509
<issue_start>username_0: I want the variable $con to get data(country) from a JavaScript function and save it in SQL database. the insert query is working fine without JavaScript code but when I want to add $con into my database using insert query, the insert query do not add data to my SQL database Here is my code: ...
2018/03/18
2,363
7,499
<issue_start>username_0: I created a bloom filter using murmur3, blake2b, and Kirsch-Mitzenmacher-optimization, as described in the second answer to this question: [Which hash functions to use in a Bloom filter](https://stackoverflow.com/questions/11954086/which-hash-functions-to-use-in-a-bloom-filter) However, when I...
2018/03/18
808
2,928
<issue_start>username_0: I am running a telegram bot in python and i am using python3.6 on raspbian ( pi3 ) Below is my imports: ``` from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import ( bytes, dict, int, list, object, range, str, ascii...
2018/03/18
750
2,795
<issue_start>username_0: Lets say I have a `Namespace` class like follows: ``` abstract class Namespace { protected prefix; protected Map tags; public setTag(String tagKey, String tagValue) { tags.put(tagKey, tagValue); } } ``` I have been told that a good design is to have separate implementations of each...
2018/03/18
1,453
3,665
<issue_start>username_0: I've just read about HSV and what I found out is that the Hue, actually specifies that in what color range (like pink, orange,etc.) the color is, the Saturation specifies its tendency to white (the lower the value is, the whiter the color is) , and about the Value, it's just the same as Saturat...
2018/03/18
480
1,949
<issue_start>username_0: I am currently working on a react app where I am adding and changing classes based on certain state changes. It worked successfully in testing with a ternary operator but now I realized I will have to add mutiple else-if statements so I am trying to convert it to a classic if else format but am...
2018/03/18
525
2,083
<issue_start>username_0: I'm trying to make a sweetalert when the user clicks the delete button it will trigger a sweetalert and when the user clicks `Yes, Delete it!` it should make an axois request to delete the status. When the user clicks on `Yes, Delete it!` the sweetalert closes but the request is never made. If ...
2018/03/18
338
1,477
<issue_start>username_0: NetInfo returns true when connected to wifi but there is no internet. So apart from NetInfo what are the other best options to check internet connectivity in react native?<issue_comment>username_1: unfortunately there is no alternative to pinging some kind of host and wait for the response. Y...
2018/03/18
2,147
9,266
<issue_start>username_0: How does one create an enum multidimensional array in Unity Inspector and make it serializable so I can call it from a different script? ```cs public enum colors {red, blue, green, yellow, cyan, white, purple}; public int rows = 7; public int column = 4; public colors[,] blockColors; private ...
2018/03/18
2,133
9,227
<issue_start>username_0: I am trying to read the file, then create a temporary file then copy and replace the temporary file to the original file at the end. Is it possible to do the following? > > > ``` > // read the original file then save it to temporary file > fs.readFile(originalPath, function (err, data) { > ...
2018/03/18
2,816
7,607
<issue_start>username_0: I am trying to read a json file `wifi_build_audit.json` from my webpage ,match the version (lets say `9.130.28.12.32.1.31`) and click on `submit` button in "Actions" column,I was able to get the point where I can open and login using password but need some help one how to read the json file and...
2018/03/18
1,269
3,470
<issue_start>username_0: I have this data: ``` list_of_dicts_of_lists = [ {'a': [1,2], 'b': [3,4], 'c': [3,2], 'd': [2,5]} {'a': [2,2], 'b': [2,2], 'c': [1,6], 'd': [4,7]} {'a': [2,2], 'b': [5,2], 'c': [3,2], 'd': [2,2]} {'a': [1,2], 'b': [3,4], 'c': [1,6], 'd': [5,5]} ] ``` I need this result: ...
2018/03/18
387
1,598
<issue_start>username_0: We are implementing a web app where we want users to log in to our website and enter API keys that allows them to authenticate to website #2. We want to save the API keys to a database so that users only have to enter them once. What are the standard best practices for securely saving the API k...
2018/03/18
650
2,431
<issue_start>username_0: I am storing a Rich Text html string in our database, examples as follows (I have shortened the bit info): ``` data:image/png;base64,iVBORw0...ORK5CYII data:image/jpeg;base64,/9j/4AAQS...TcUQrQf/Z ``` I need to basically take this HTML and create a `System.Drawing.Image` in C# and then save ...
2018/03/18
1,252
3,938
<issue_start>username_0: Is it possible encode *IPV4* into 6 or less *ASCII* Printable Characters to create an ultra portable ID that users can tell to each other, which really represents an IP.<issue_comment>username_1: You could try this `base95` implementation it will get it down to 5 printable characters ``` publ...
2018/03/18
795
2,859
<issue_start>username_0: I want to get the date, when I click on the ***grid inside an event***. I have tried the callback functions. * dayClick: Not clickable inside events. * eventClick: No date arguments Extra information I have created an AJAX crud for *Event* and an *EventException* which goes inside the ev...
2018/03/18
1,238
5,384
<issue_start>username_0: I am attempting to use Autofac with a .NET Core console application using the `Microsoft.Extensions.DependencyInjection` and `Autofac.Extensions.DependencyInjection` packages but the load methods inside my modules never get invoked and leads to `Program` being null during resolution. I would ha...
2018/03/18
384
1,469
<issue_start>username_0: On `Android Studio 3.0` I have a `layout.xml` resource for a layout. Its dimensions, text/hint and other attributes aren't hard coded (like having `android:width="2dp"`, but instead all referencing `dim.xml` and `strings.xml` - as it is advised on google.developers (like `android:width="@dim/wi...
2018/03/18
684
2,608
<issue_start>username_0: I'm working on a Web API 2 app and I'm implementing request validation. I've included a validation check which looks like this: ``` if (string.IsNullOrEmpty(userCredentials.UserName)) return BadRequest("UserCredentials.UserName is required"); ``` A 400 response code is returned as expect...
2018/03/19
320
1,106
<issue_start>username_0: I have an outbound application that sends SMS to customers. In each SMS is a link to a web-page that they click on. Each link is unique to each customer so that I can identify who they are. I know there are short link tools around but I need to have a unique link for each customer. Does Tw...
2018/03/19
514
1,638
<issue_start>username_0: I have a sentence: `db.COLLECTION_NAME.insert(document)` 1. I need to extract whatever's between `db.` and `.insert`, which in the example is `COLLECTION_NAME`. 2. And Anything between the `()` which in the example is `document`. I tried: ``` document="${cmd#db*insert(}" ``` for `document...
2018/03/19
1,809
6,789
<issue_start>username_0: I have a cluster running with services and am also able to launch fargate tasks from the command line. I can get the taskArn as a response to launching the task and I can wait for the task to be in the running state by using "aws ecs wait". I'm stuck figuring out how to get the the public IP of...
2018/03/19
996
3,409
<issue_start>username_0: I'm using Mapbox GL JS to load in GeoJSON from an external URL on some pages. I would like to automatically fit the map to the boundaries of the polygon I'm loading. I understand that [turf.js's bbox method](http://turfjs.org/docs#bbox) can help with this, but I'm not sure how to get the GeoJS...
2018/03/19
1,220
3,820
<issue_start>username_0: I am learning Tensorflow, and this is a simple code I wrote today. It doesn't give the expected output, and I am exhausted in figuring out why. Could you give me a hint? Many thanks!! I just want TF to do a line fitting: **find 'a' and 'b' to fit a line a\*(0:99)+b**. ``` import math import n...
2018/03/19
493
1,534
<issue_start>username_0: I am having one (associative) data array `$data` with values, and another associative array `$replacements`. I am looking for a short, easy and fast way to replace values in `$data` using the `$replacements` array. The verbose way would be this: ``` function replace_array_values(array $data,...
2018/03/19
821
2,487
<issue_start>username_0: i use function script in google spread sheet. this function is used maybe... 150,000 cell. my question is... infinite loading. when i use my custom function in sheet, infinite loading appear how can i resolve that? here is my script code : ``` function s2hex(str1){ var s2hex = 0; var ...
2018/03/19
3,604
15,623
<issue_start>username_0: I have lots of code shared between web and web worker parts of my browser app. How can I tell webpack to split my code up into common chunks so that the result is garanteed to work 100%? The webworker code breaks (fails at runtime) after I tell webpack to generate the common chunks (which it ...
2018/03/19
575
1,906
<issue_start>username_0: I'm uses a previous design of shopping cart, but can't applied the option hover shoppign cart, this its a code example. My code ``` $('#cart').hover(function(e) { $(".shopping-cart").stop(true, true).addClass("active"); }, function() { $(".shopping-cart").stop(true, true).rem...
2018/03/19
660
2,205
<issue_start>username_0: I have recently moved to Visual Studio Code and have a question that I have found an answer for. When I split the editor it shows the focused file on both sides of the split. I want the focused file to be moved with the split rather than showing a duplicate view. Is there a setting or an ext...
2018/03/19
765
2,605
<issue_start>username_0: ``` import UIkit // ViewController file class ViewController: UITableViewController, UIViewController{ @IBAction func aaaSwitch(_ sender: UISwitch) { if (sender.isOn == true) { ClickCounterA+=2 UserDefaults.standard.set(aaaSwitch, forKey: "aaaSwitch"...
2018/03/19
952
3,741
<issue_start>username_0: I am trying to use React router with asp.net core. The problem is that I can't access the Blog component. Here's the error: `Failed to load resource: the server responded with a status of 404 (Not Found)` Here's my code: **webpack.config.js** ``` const path = require('path'); const...
2018/03/19
354
1,464
<issue_start>username_0: I am trying to demonstrate a buffer overflow, and I wish to overwrite a local varible with `gets`. I have compiled my program using gcc with `-fno-stack-protector`, so I know that the buffer that `gets` uses is right next to another local variable I am trying to overwrite. My goal is to overflo...
2018/03/19
5,679
18,214
<issue_start>username_0: I have been trying to create a way to stream a youtube url (preferably audio only, although this doesn't matter too much) right from python code. I have tried numerous things but none really seem to work. So far, I am able to search for videos or playlists using youtube data api, grab the first...
2018/03/19
685
2,244
<issue_start>username_0: I am working on a project involving a series of Queues. These Queues are intended to be Global in scope as they are handled and modified by a series of functions. As of right now, my implementation raises the "Initializer element is not constant" flag. I understand why, for the most part, but I...
2018/03/19
491
1,695
<issue_start>username_0: I am going through Introduction to Statistical Learning in R by Hastie and Tibshirani. I came across two concepts: RSE and MSE. My understanding is like this: ``` RSE = sqrt(RSS/N-2) MSE = RSS/N ``` Now I am building 3 models for a problem and need to compare them. While MSE come intuitively...
2018/03/19
519
1,850
<issue_start>username_0: I want to remove `basket One`div if `basket Two` div is clicked and vice versa. ```js var basketClass = document.getElementsByClassName("basketClass"); var basketOne = document.getElementById("basketOne"); var basketTwo = document.getElementById("basketTwo"); for (var i = 0; i < basketClas...
2018/03/19
698
1,720
<issue_start>username_0: How can I replace `NA`s in one column with values from another column (when all values are dates)? I can do it with numbers, but for date values when I try ``` mydata$enddate <- ifelse(!is.na(mydata$End.date.html), mydata$End.date1, mydata$En...
2018/03/19
1,460
5,061
<issue_start>username_0: I have 2 Docker containers using the following configuration: ``` version: '2' volumes: db_data: {} services: db: container_name: database-mysql-5.7 build: context: ./docker/db/ ports: - "3321:3306" volumes: - db_data:/var/lib/mysql web: containe...
2018/03/19
349
1,380
<issue_start>username_0: I have a 4 indexes Dataframe and I'd like to know how can I make sure that all combinations of indexes are displayed. I'm running this to sum : ``` df.sum(level=[0,1,2,3]).unstack(fill_value=0).stack() ``` But its only displaying all possible values of the fourth index for each one of the t...
2018/03/19
831
3,063
<issue_start>username_0: I am wanting to dynamically create input field values for each category a user creates, the issue is how can I keep track of what the user enters into the input field. As I cannot create X amount of states as it is dynamic. Any tips would be much appreciated, my code is shown below: ``` var c...
2018/03/19
538
1,521
<issue_start>username_0: I thought initializing an multi dimensional array would be easy: ``` row = Array(4).fill(0) block = Array(4).fill(row) block[2][2] = 15 ``` but that just creates an array of one row, 4 times, so if I assign block[2][2] = 15, then the whole column is 15. ``` (4) [Array(4), Array(4), Array(...
2018/03/19
695
2,741
<issue_start>username_0: I'm trying to switch a scene using a button which created by Scene Builder. That is my Controller class ``` public class Controller implements Initializable { @FXML Button LoginButton; @FXML private void handleButtonAction(ActionEvent event) throws IOException { Pare...
2018/03/19
892
3,200
<issue_start>username_0: I'm trying to remove the event listener that I've added to my `UL`; so that the listener function will only fire on the first click and will be cleared after that. Is there a way to do this with pure js? ``` var cardDeck = document.getElementById('listDeck').getElementsByTagName('li') f...
2018/03/19
862
3,162
<issue_start>username_0: I'm trying to get data from my database and after obtaining a piece of data, using that piece of data to find a new piece of data. At the end, I can piece these together and return the derived data. I'm not sure this is the best way to approach this, but this is where im at as of now. My prob...
2018/03/19
530
1,862
<issue_start>username_0: I have hundreds of excel files and I want to create a df that has the name of the excel file in one column and then the name of each tab in the second column. My script will iterate through each file name but the way I am appending is not right, and I'm not having much luck finding a solution. ...
2018/03/19
1,425
5,826
<issue_start>username_0: I created a dialog with three buttons, where the third should save a Word document (Office Pro Plus 2013, BTW) as a PDF file. ```vb Private Sub Button_Dokument_mit_Grafik_als_PDF_speichern_Click() Dim Grafik As Boolean Grafik = Options.PrintDrawingObjects Options.PrintDrawingObject...
2018/03/19
448
1,625
<issue_start>username_0: The WebSocket has the option to add a headers to the request but you can't add a SecurityContext to it. The SecureSocket has the SecurityContext so I can add the ssl certs but can't add headers. Any idea on this? **UPDATE:** I'm trying to create a websocket with a SecurityContext object As I d...
2018/03/19
652
2,124
<issue_start>username_0: I need help. I'm a complete beginner and I can't find solution anywhere, so sorry if it was already asked, but no matter what I tried I couldn't display background image on one page. **What I want to do?** Display the background image on home page. **Notes:** * I didn't have assets folder b...
2018/03/19
1,077
3,555
<issue_start>username_0: If I call the filter function, I get this array returned [ 1, , 3, , 5 ]. From where come the additional commas? I don't understand this effect. Can somebody explain it to me? The array should be that: [ 1, 3, 5 ]. ```js class List { constructor(values = []) { this._list = value...
2018/03/19
1,054
3,994
<issue_start>username_0: im newbie on android. I need to send data from ListView with customAdapter to detailActivity that show detail's item from selected item of listView. I have seen a few post about it and i still confuse about it. Would you help me? This is my data class : public class ListData { ``` private ...
2018/03/19
475
1,534
<issue_start>username_0: Using the `text-right` class on my form labels, when going responsive, I want the label to left align so it's top-left instead of top-right, however the change to `text-align:left` does not appear to take effect. ```css @media (max-width: 767px) { .form-group > label.text-right { text-...
2018/03/19
2,669
5,964
<issue_start>username_0: I want to merge a nested list of dictionaries to single list of a dictionary in python 2.6, Example data - Here is given only two iterations of thousands of iterations. ``` INPUTJSON=[ {'EXCEPTIONS': [ {'LASTOCCURED': '2018-03-12 12:11:23', 'COUNT': 25, 'NAME': 'CLF...
2018/03/19
4,594
9,070
<issue_start>username_0: I have a time series for stock prices. The data isn't always continuous, some days are missing. I'd like to fill in these days with the previous value. How can I do that efficiently? There may be over a thousand markets with 1000+ days of data. Each day has an object of timestamps and pricing....
2018/03/19
617
2,340
<issue_start>username_0: `mongo_prefix` looks ideally designed for simple and effective data separation, it seems though you need to pre-define your available prefixes in settings.py. Is it possible to create a new prefix dynamically - for example to create a new instance per user on creation of that user?<issue_commen...
2018/03/19
2,244
7,583
<issue_start>username_0: I'm looking to see if there is a better way in obtaining the same result as the following code: ``` Calendar date = Calendar.getInstance(); date.setTimeInMillis(System.currentTimeMillis()); date.set(Calendar.HOUR_OF_DAY, 0); date.set(Calendar.MINUTE, 0); date.set(Calendar.SECOND, 0); date.set(...
2018/03/19
1,842
5,931
<issue_start>username_0: I am generating .ics calendar invitation with the node package `ical-generator` and sending the attachment in an email via mandrill. The .ics calendar invite contains information for one event at a specific time and date. example generated file: ``` BEGIN:VCALENDAR VERSION:2.0 PRODID:-//se...
2018/03/19
939
3,120
<issue_start>username_0: I'm new with Bootstrap 4 and SASS. I've been struggling to learn how to make changes but have been able get a couple done. However, one of them I can't seem to figure out is the margin or padding at the top and bottom of the navbar item. Here is what I've done. On a new MVC project I installe...
2018/03/19
500
1,606
<issue_start>username_0: I am using the rails js helper image\_path to update an images source using javascript. The actual string for the new img src path lives inside of a variable and I need to inject that into the image\_path string below, which has been giving me problems. Here is what I'm working with: Object...
2018/03/19
536
1,891
<issue_start>username_0: I want to inject Service in a controller. The Service will return $http.get() method. Error : [$injector:unpr] <http://errors.angularjs.org/1.6.4/>$injector/unpr?p0=JsonFilterProvider%20%3C-%20JsonFilter Please suggest whats wrong in my code? ``` var app = angular.module("myApp", []); ap...
2018/03/19
820
2,848
<issue_start>username_0: I have followed instructions in examples like [this](https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux), and [this](https://stackoverflow.com/questions/19256127/two-versions-of-python-on-linux-how-to-make-2-7-the-default). I have this line in my ~...
2018/03/19
1,446
5,435
<issue_start>username_0: I have 3 `DateTimePicker`, one for setting date, the second adds 3 days and the 3rd one adds 5 weekdays. But my code don't calculate correctly. I calculate "manually" the future days adding more or less days deppending current day. ``` Private Sub Calculatedelivery() Dim normaldlvy As In...
2018/03/19
2,768
9,830
<issue_start>username_0: I have a reusable component that is a video.js video player. This component works fine when the data is passed in on the initial DOM load. I need to figure out why my component is not re-rendering after the state is updated in Vuex. The parent component passes down the data for the video via ...
2018/03/19
2,043
7,273
<issue_start>username_0: I am trying to setup a react component called `FullscreenImage` that displays my image as 100% of the width/height in parallax style. As I am going to use this component more often, I thought it would be a good idea to pass the URL for the picture via props. The problem is that if I pass the UR...
2018/03/19
470
1,251
<issue_start>username_0: how can I get these `loops` and `if statements` into a comprehension? ``` raw = [['-', 'bla'], ['-', 'la'], ['=', 'bla']] for one in raw: if one[0] == '-': for two in raw: if two[1] == one[1] and two[0] == '=': two[0] = '--' ``` So far: ``` [two+one for two in raw f...
2018/03/19
992
3,222
<issue_start>username_0: I am trying to determine if all letters in myString are found in myList. Here is my code so far. ``` def findLetters(myList,myString): myList = set(myList) myString = list(myString) myString = set(myString) for x in myString: if x not in myList: return bool...
2018/03/19
1,460
5,731
<issue_start>username_0: I am having difficulty with my music app. The idea is to tap a button and play more songs from the artist that is currently playing. When I am IN the app and I hit next song it works fine. However if I let the song end naturally the app would play a random song. So I added logic to say if the s...
2018/03/19
573
1,856
<issue_start>username_0: How do I check in Ubuntu 16.04, which version of aiohttp is installed? This works ``` python -V Python 2.7.12 ``` but this doesn't ``` aiohttp -V -bash: aiohttp: command not found ```<issue_comment>username_1: It is not a command line tool. That's why it says `command not found`. It...
2018/03/19
610
2,038
<issue_start>username_0: I want to create 9 sets and put them in vector.The following code error outs ``` class X{ vector > rowset(9,set()); }; Line 2: expected identifier before numeric constant ``` Following works ok. But i want to insert empty sets in vector so that i don't have to do a push\_back. Please sug...
2018/03/19
241
774
<issue_start>username_0: I have an Excel function that I want to move into Python. The BDP function is: `=BDP("IBM US Equity","BEST_EBITDA","BEST_FPERIOD_OVERRIDE","1FY")` ``` from tia.bbg import LocalTerminal resp = LocalTerminal.get_reference_data("IBM US Equity", "BEST_EBITDA") ``` how do I add overrides to thi...
2018/03/19
524
1,982
<issue_start>username_0: I'm writing a text classification system in Python. This is what I'm doing to canonicalize each token: ``` lem, stem = WordNetLemmatizer(), PorterStemmer() for doc in corpus: for word in doc: lemma = stem.stem(lem.lemmatize(word)) ``` The reason I don't want to just lemmatize is ...
2018/03/19
490
1,699
<issue_start>username_0: I have done the following snippet, a list where I went line by line and replaced the dots with commas, however in the end the list remains the same since only the line variable changes. How to update the list with the replaced values? ``` for line in mylist: line=line.replace('.',',') li...
2018/03/19
2,704
9,115
<issue_start>username_0: I have the following `Attendance` table in my Microsoft SQL Server 2016: ``` ID StudentID Date AbsenceReasonID ---------------------------------------------------- 430957 10158 2018-02-02 2 430958 10158 2018-02-03 2 430959 10158 2018-02-...