date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/03 | 1,030 | 4,025 | <issue_start>username_0: Let's say I have a model:
```
class Employee(models.Model):
first_name = models.CharField(max_length=40)
last_name = models.CharField(max_length=60)
salary = models.DecimalField(decimal_places=2)
```
I want anyone to be able to access first\_name and last\_name but only want cert... |
2018/03/03 | 502 | 1,621 | <issue_start>username_0: When I try to execute this code (excerpt):
```
// ####_##_##_######_create_items_table.php
$table->string('seller_sku')->default('')->unique();
// ItemFactory.php
return [
'seller_sku' => $faker->optional($default = '')->word,
];
```
and run: `php artisan migrate:refresh --seed`
it yield... |
2018/03/03 | 540 | 1,928 | <issue_start>username_0: I have an app with this components tree:
```
App
Header
Main
Searcher
List_of_albums
Album
```
So, the idea is that in the main page I have a searcher of albums and this displays a list of albums after the search. To do this, I am reading a .json file in the component ... |
2018/03/03 | 400 | 1,327 | <issue_start>username_0: I am trying to setup an environment for apache-spark and found out it is incompatible to Java9. (Well I regret for not finding out this earlier.).I am not able to make spark work or java9 uninstalled.
I tried both approaches [here](https://www.java.com/en/download/help/mac_uninstall_java.xml)... |
2018/03/03 | 1,050 | 3,835 | <issue_start>username_0: I would like to pass in a parameter `@CompanyID` into a `where` clause to filter results. But sometimes this value may be `null` so I want all records to be returned. I have found two ways of doing this, but am not sure which one is the safest.
Version 1
```
SELECT ProductName, CompanyID
FRO... |
2018/03/03 | 650 | 2,180 | <issue_start>username_0: I am making a middleware function in nodejs and express js framework and I want to check if the url contains a number in it or not just like this
/invoices/21 or /invoices/45
so I am trying to do something like this
```
if (req.path.startsWith('/invoices/[^0-9]') {
next();
}
```
... |
2018/03/03 | 1,345 | 4,965 | <issue_start>username_0: I am working with a script to autocomplete a search field. I am trying to add a "No Results Found" option when nothing is found with a hyperlink behind it. I am struggling to figure out how to add an else() to it to show the Text.
How do I add this script? Thank You.
```
$(document).ready(fun... |
2018/03/03 | 817 | 2,288 | <issue_start>username_0: I have a piece of code that I don't understand, I would appreciate it if someone could help me out.
```
list1 = [48, 33, 46, 46, 87, 11, 50, 99, 65, 87]
list2 = [48, 33, 46]
duplicates = [list1.pop(list1.index(i)) for i in list1 if i in list2]
```<issue_comment>username_1: Walk throug... |
2018/03/03 | 855 | 2,540 | <issue_start>username_0: I have two only records in a database table and I want to delete only one of them.
The problem is that I don't have any primary key nor unique identifier, so how could I delete one and only one record?
It seems a easy question but I didn't find out how to do it ¿?.
```
CREATE TABLE `ToDo` (
... |
2018/03/03 | 843 | 2,897 | <issue_start>username_0: For below Dataset I need to get a Summary Data based on Selected Column The sample Dataset contains Following Below Data.
```
+---------+----------+--------+---------+
| Column1 | Column2 | Expend | Expend2 |
+---------+----------+--------+---------+
| School1 | Student1 | 5 | 10 |
... |
2018/03/03 | 396 | 1,335 | <issue_start>username_0: Struggling this the following sql statment.
The database is MySQL with score being DECIMAL(5,1)
Im looking to order by the average score within the column
```
...AVG(COALESCE(score,0)) AS scoreAvg ... ORDER BY scoreAvg DESC
```
but the results are not as expected, I have products with a hi... |
2018/03/03 | 2,733 | 10,548 | <issue_start>username_0: The statement:
```
volatile unsigned char * volatile p = (volatile unsigned char * volatile)v;
```
Generates a warning C4197 in MSVC v14.1:
>
> Warning C4197: 'volatile unsigned char \*volatile ': top-level volatile in cast is ignored
>
>
>
The 2011 C standard (section [N1570] 6.7.3 4.... |
2018/03/03 | 788 | 2,542 | <issue_start>username_0: Actually I can boot Android Things "0.6.1 Developer Preview" in Raspberry Pi 3 (RPI3), I'm develop a project with Computer Module 3 Lite (CM3L) this have the same processor of the Raspberry Pi 3 (RPI3) but I only see the rainbow screen, never continue, I suppose the problem is relatad with DTB ... |
2018/03/03 | 1,667 | 6,467 | <issue_start>username_0: I looked into Sony's developer website (3 March 2018) and while the design is changed, the contents seem to lag behind.
<https://developer.sony.com/develop/cameras>
I do not see any details of the APIs of A9 and 3rd gen A7 cameras.
I know these cameras have WiFi and indeed Bluetooth. They a... |
2018/03/03 | 496 | 1,615 | <issue_start>username_0: I'm trying to do my best to explain what I'm trying to do, please let me know if something wasn't understandable.
I have a file called `www` where I'm setting up my socket like that
```
var server = http.createServer(app);
var io = require('socket.io')(server);
require('../store.js')(io);
``... |
2018/03/03 | 671 | 2,560 | <issue_start>username_0: I have a simple controller e.g.
```
@Controller
public class FooController
{
@Autowired
private BarService barService;
@RequestMapping(value = "/foo", method = RequestMethod.GET)
public String displayFoo()
{
return "foo";
}
}
```
When I want to do a `@WebMvcT... |
2018/03/03 | 419 | 1,616 | <issue_start>username_0: I am relatively new in this field, and really stuck here as how to get the current schemaVersion of realm.
I tried Below code to check my schemaVersion
```
let configCheck = Realm.Configuration();
let configCheck2 = Realm.Configuration.defaultConfiguration;
let schemaVersion = configC... |
2018/03/03 | 1,400 | 5,101 | <issue_start>username_0: I want to simplify this piece of code with a T variable but could not succeed in compiling it. Hope could you give me the way.
here is the "duplicate" code I want to rewrite :
```
func getIntegerValue (listValues: [Any], numValueToRead: Int, readValue: inout Int) -> Bool {
if numV... |
2018/03/03 | 485 | 1,615 | <issue_start>username_0: Basically, I'm messing around in Python (3) and I'm trying to define some functions to do some common tasks in single lines, using as less memory as possible
For example, in video games, you might want a character to turn some degrees left/right, but not 0 degrees. So, given an integer `x`, ho... |
2018/03/03 | 1,220 | 5,121 | <issue_start>username_0: I am building a WebAPI as a learning project and attempting to use best practices. My first attempt is a authentication API, which takes an authentication object (JSON):
```
{
username: myusername,
password: <PASSWORD>
}
```
it calls my API on /api/authenticate as a POST, passing the ... |
2018/03/03 | 2,272 | 8,167 | <issue_start>username_0: I am kinda of new to retrofit and i am not sure how to handle a nested json structure like this. if any one can help how to parse this type of structure . i would really i appreciate it . i have been stuck for days
```
{
"status": "ok",
"totalResults": 20,
"articles": [
{
"source": {
"id": nu... |
2018/03/03 | 911 | 2,578 | <issue_start>username_0: Why are the implementations of the static method `compare` for `Long`, `Integer` and `Short` in Java's library different?
For `Long`:
```
public static int compare(long x, long y) {
return (x < y) ? -1 : ((x == y) ? 0 : 1);
}
```
For `Integer`:
```
public static int compare(int x, int ... |
2018/03/03 | 561 | 1,649 | <issue_start>username_0: I am trying to get Apache Flink Scala project to integrate with Apache Kafka 1.0.0. When i attempt to add the flink-connector-kafka package in my build.sbt file I get an error saying it cannot resolve it.
When i then look at the options available in the maven repository, there is no maven dep... |
2018/03/03 | 2,092 | 7,006 | <issue_start>username_0: I'm trying to get into Django and I'm following tutorials here and there. I'm trying to add a login page to the polling app from the official Django tutorial but even though I'm following [this simple tutorial](https://simpleisbetterthancomplex.com/tutorial/2016/06/27/how-to-use-djangos-built-i... |
2018/03/03 | 527 | 2,142 | <issue_start>username_0: I am a new in AngularJS and cannot understand something
In this code:
View:
```
Messages
...
Cource name: {{order.Title}}
Description: {{order.Description}}
Teacher name: {{order.TeacherName}}
Success
Reject
```
And JS code:
```
app.controller('ordersCtrl', function ($scope, ... |
2018/03/03 | 399 | 1,235 | <issue_start>username_0: I checked all relevant questions but it seems that lookbehinds do not allow words needed in my pattern.
So this is my question:
i need to match this pattern:
```
word1.*word3
```
but don't match if there is word2 inside, such as:
```
word1 word2 word3
```
Is there a way to do this ... |
2018/03/03 | 2,052 | 8,288 | <issue_start>username_0: There are similar questions about it, but it's not very clear how to apply the solution, and keep to receive an error.
I explain. I'd like to create a simply html/js app using service worker technology.
I have:
* Index.html
* js/app.js
* js/sw.js
in app.js the code is (see //\*\*\* comments ... |
2018/03/03 | 1,453 | 6,007 | <issue_start>username_0: I'm trying to make a search query using firebase and it works really well.
```
Query searchQuery = usersRef.orderByChild(child).startAt(text).endAt(text + "\uf8ff").limitToFirst(limit);
searchQuery.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public v... |
2018/03/03 | 1,292 | 5,195 | <issue_start>username_0: I have searched many threads here but could not find something more peculiar to my needs. I have a logo image 50x50px and h2 text element. I want to keep both elements side by side but in the absolute center of my header. I have tried various CSS techniques but cannot get it done. Below is simp... |
2018/03/03 | 1,145 | 3,865 | <issue_start>username_0: I have a user model with the following schema, all fields required
```
name:String,
country:String,
age:Number
```
From frontend i press update button and update only the age field, and on backend i have the following
```
var body = _.pick(req.body, ["candidateId","name","age","country"]);... |
2018/03/03 | 1,053 | 3,933 | <issue_start>username_0: I'm learning some PHP while trying to build my own framework as apractice excersice, currently I have a config.php file where I store the database info to connect to plus some PDO settings, both stored into two different arrays.
I also have a Conectar.php file to stablish connection, in this t... |
2018/03/03 | 853 | 3,038 | <issue_start>username_0: At first, I would like to use bazel to help me run tensorflow with SSE and avx so I tried this within work space:
```
bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both --copt=-msse4.2 --config=cuda -k //tensorflow/tools/pip_package:build_pip_package
```
but it g... |
2018/03/03 | 240 | 828 | <issue_start>username_0: Can anyone explain this T-SQL statement:
```
select *
from (select getdate()) as func(param)
```
You can copy & paste the code, and then run it<issue_comment>username_1: There is no table valued function or dynamic SQL at all. It is simple subquery:
```
inner query: select getdate()
outer ... |
2018/03/03 | 549 | 2,174 | <issue_start>username_0: I find a lot of resources on how to hide the navigation bar on scroll, but I would like to have the navigation bar hidden on start, and then appear when starting to scroll. Like this animation from Design+Code app: <https://i.stack.imgur.com/qMSLl.jpg><issue_comment>username_1: You can use `UIS... |
2018/03/03 | 675 | 2,480 | <issue_start>username_0: If I use aggregate on a dataframe with formula, ie.
```
aggregate(cbind(a,b,c)~d+e+f,df,sum)
```
Does the order of the model columns (d,e,f) matter?
I have this question because I have read something on other website stating that the ordering matters in Reshape.
>
> The basic arguments of... |
2018/03/03 | 470 | 1,425 | <issue_start>username_0: I am trying to develop a SPA. In this regard I am using vue.js 2 in front end and Laravel 5.5 API in back end. Now I would like to display images in front end. I wrote below code in HTML
```
![]()
```
Where should I put images in Laravel and how can I access that image in vue.js ?<issue_comm... |
2018/03/03 | 558 | 2,168 | <issue_start>username_0: As the title says how can I run rest of code (which is below the main function), only when some condition is done? For example:
```js
function foo() {
count = 0;
var interval = setInterval(function() {
count++;
if (count == 10) {
clearInterval(interval);
con... |
2018/03/03 | 501 | 1,958 | <issue_start>username_0: I know I can select a value with
```
selector: 'select[id="country"] option[value="2"]'
```
but I got different enviroments with multiple vars. How can I select the first value in the dropdown?<issue_comment>username_1: You can wrap the `console.log` in a function and then can call the func... |
2018/03/03 | 708 | 2,226 | <issue_start>username_0: I intend to combine columns of a Pandas DataFrame after `groupby`. I looked for options that I can use but none of them does what I'm looking for. The closest option was `.agg()` which performs on values of a column, however, I want to calculate a statistic of all `features` for every given gro... |
2018/03/03 | 443 | 1,795 | <issue_start>username_0: I would like to use natural numbers (actually record IDs) as unique identifiers, but I'm not sure if there are two natural numbers that satisfy the following condition:
```
md5(number1) === md5(number2)
```
Is the previous condition possible?<issue_comment>username_1: The answer is "yes", be... |
2018/03/03 | 718 | 1,891 | <issue_start>username_0: I want to extract a number after every ":" (colon) in a string using python 3.5
my string is:
```
x= "RTD - Shanghai Indices - STD DLY - Indices - 11054 - ID:1053 (INACTIVE) RTD - SIX Swiss incl. SWX Europe - STD L1 - Equity - 10969 - ID:1096 (INACTIVE)"
```
I have used:
```
re.findall('\... |
2018/03/03 | 584 | 2,113 | <issue_start>username_0: I read an [article](https://medium.com/@michelestieven/organizing-angular-applications-f0510761d65a) about organizing folders in Angular and the author uses one called `core`, in which he creates the core module and insert only services which will be called once.
Currently, I'm working on a p... |
2018/03/03 | 369 | 1,404 | <issue_start>username_0: ```
```
this share button working in local
when i put into blogger it's not working.
If anyone know about that issue please let me know.<issue_comment>username_1: Your **CoreModule** contains code that will be used to instantiate your app and load some core functionality.
To get more idea ... |
2018/03/03 | 606 | 2,075 | <issue_start>username_0: I am trying to call a C code from Julia v0.6.2, Windows 10.
Here is the C code I compiled into a DLL with [Cygwin](https://cygwin.com/) gcc.
```
int timesTwo(int x) {
return 2*x;
}
```
The compile commands:
```
gcc -c mydll.c
gcc -shared -o mydll.dll mydll.o
```
I tested the DLL with... |
2018/03/03 | 443 | 1,597 | <issue_start>username_0: I have a LEFT JOIN query
```
SELECT
a.id_user,b.id_post, COUNT(a.*) as total_users
FROM
posts as b
LEFT JOIN .....
LEFT JOIN .....
WHERE ....
ORDER BY .....
GROUP BY
a._id_user
LIMIT 3,10
```
If I use `COUNT(a.*) AS total_users` to retrieve the number of users, but I get an er... |
2018/03/03 | 1,381 | 4,377 | <issue_start>username_0: I have a table looking like this
```
hashtag Daily_Freq men women
#a 10 6 4
#b 15 5 10
#c 20 8 12
```
I want to plot for each data frame line, i.e. for each hashtag, the frequency of men an... |
2018/03/03 | 512 | 1,620 | <issue_start>username_0: <https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf>
The cheat sheet above lists the following syntax to generate a bulleted list in R Markdown. `*` is the primary solid bullet. `+` is a secondary hollow bullet. And `-` is a tertiary solid square.
`* unordered list
+ sub-it... |
2018/03/03 | 321 | 1,120 | <issue_start>username_0: I have got a div container with an absolute position. I want to place two canvas containers in it, but they should be above each other and not next to each other.
All three containers will have the same dimensions.
HTML:
```
```
Sorry for the question, I'm not very experienced with css.<is... |
2018/03/03 | 264 | 800 | <issue_start>username_0: On the Chrome console, you can get the return value of the last expression
```
> 1+1; 2+1;
< 3
```
How to implement this function in javascript?
```
$expressions = '1+1; 2+1;' // from user input
new Function($expressions).call() // return 3, not 2
```
Can only be inserted in the last expr... |
2018/03/03 | 608 | 2,164 | <issue_start>username_0: Given a time zone such as EDT or CEST is there a way to get a `time.Location` reference to use it to with `func (t Time) In(loc *Location) Time`?
It is possible to initialize the location for e.g. CEST with `time.LoadLocation("Europe/Berlin")` but how to do the same for the actual time zone n... |
2018/03/03 | 656 | 2,340 | <issue_start>username_0: I installed [Tensorflow on macOS](https://www.tensorflow.org/install/install_mac) with Virtualenv. Everything went okay ("Successfully installed six-1.11.0 tensorflow-1.6.0" is the last output of the terminal, once i run the command `pip3 install --upgrade tensorflow`). So, with the virtualenv ... |
2018/03/03 | 645 | 2,267 | <issue_start>username_0: Now I know there are lots of other questions out there with the same problem, however, none of them are crashing at the point mine is.
```
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withI... |
2018/03/03 | 1,720 | 5,164 | <issue_start>username_0: I am trying to solve a problem where I want to find the max product of any 3 integers in an array.
I tried my solution:
```
def maximumProduct(nums):
"""
:type nums: List[int]
:rtype: int
"""
list_of_ints = nums
t = sorted(list_of_ints[:4])
max_pos = t[2]
m... |
2018/03/03 | 349 | 1,284 | <issue_start>username_0: I am trying to convert the if else clause to a ternary within a while loop, however it's not allowing me to have a break after the question mark, pointing an error at the break as an invalid expression.
How would I go about turning this simple if else into a ternary like so.
```
while (true)... |
2018/03/03 | 1,013 | 3,872 | <issue_start>username_0: I have a page with a few containers.
How to give focus to one of them on page load, so that the user can use arrow keys to scroll (or even `SPACE` to scroll) without having to click on the `div` first?
I have tried:
```
```
but `autofocus` doesn't seem to work on non-input `div`.
\_
Th... |
2018/03/03 | 983 | 3,762 | <issue_start>username_0: I am trying to query some documents from my MongoDB database, then add the documents to an array, and then send it to a rendered view. However, it seems that the line that I have to render the page is getting executed before the db query is completed. Below is the code:
```
router.get('/blog/:... |
2018/03/03 | 709 | 1,890 | <issue_start>username_0: I have several image names in my directory that I want to read.
```
sq_of_images = listdir('images/sequence1/')
sq_of_images = [img for img in sq_of_images if img.endswith(".jpg")]
print(sq_of_images)
```
>
> ['im\_001.jpg', 'im\_002.jpg', 'im\_003.jpg', 'im\_004.jpg', 'im\_005.jpg',
> ... |
2018/03/03 | 615 | 1,707 | <issue_start>username_0: I want to display parts of a filname which is stored inside an array.
At the moment, I'm using filenames like this:
```
Brand-Product-Variation-ID-EAN-SKU-1.jpg
Brand-Product-EAN-SKU-24.jpg
Brand-Product-SKU-100.jpg
```
I need the filename in this format:
```
Brand-Prdocut-Variation-ID-EAN-... |
2018/03/03 | 754 | 2,611 | <issue_start>username_0: I making an app using Firebase. Structure of my data storage is-

I am calling subject and description in another activity to show them. I added a button in that activity which delete that particular key(-L6g7ttOxr... highli... |
2018/03/03 | 333 | 852 | <issue_start>username_0: I have the string **"508 519 401,00"**
If i use (`float`) function I receive **508519401.0** (With one 0)
But I need to set in db `decimal` (10,2) value in this case I need to receive clear 508519401.00 decimal value, How can I get this?<issue_comment>username_1: Use **number\_format()** functi... |
2018/03/03 | 1,233 | 5,285 | <issue_start>username_0: I have function in Firebase Cloud Functions which is used to send notifications to specific users within my app and has as the `notificationContent` the following code:
```
const notificationContent = {
notification: {
title: "My Notification Title",
body: "My Notification ... |
2018/03/03 | 978 | 3,441 | <issue_start>username_0: I am trying to write a closure with two inner functions, but I am getting the below error
```
def factory(n=0):
#n=0
def current():
return n
return current
def counter():
n=n+1
return n
return counter
f_current,f_counter = int(input())
print(f_coun... |
2018/03/03 | 808 | 2,943 | <issue_start>username_0: What should I do with this variable to make it store following large number without downloading any new libraries.I am talking about using some manipulation like hashing or arrays or something I don't know.<issue_comment>username_1: That looks more like what you want:
```
def factory(n=0):
... |
2018/03/03 | 3,512 | 9,220 | <issue_start>username_0: I am trying to s3 sdk with very basic test and getting below error.
Caused by: java.lang.NoSuchFieldError: SIGNING\_REGION
at com.amazonaws.services.s3.AmazonS3Client.createRequest(AmazonS3Client.java:4227)
at com.amazonaws.services.s3.AmazonS3Client.createRequest(AmazonS3Client.java:4203)
at... |
2018/03/03 | 763 | 2,410 | <issue_start>username_0: ```
username = {
1:['Satinder',43000,'855799170'],
2:['Rishabh',45000,'8557999170'],
3:['Aman',47000,'8557999170']
}
balance = username[1][1]
amt = 20000
balance = balance - amt
```
How do I update balance at `username[1][1]`?<issue_comment>username_1: Thank you everyone, issue... |
2018/03/03 | 712 | 2,409 | <issue_start>username_0: I'm trying to create a countdown in user.setGame, can someone help me create the code for the countdown?
```
const bot = new Discord.Client();
bot.on('ready', () => {
console.log('I am ready!');
user.setGame(countdown)
});
```
Thanks!<issue_comment>username_1: Thank you everyone, issue ... |
2018/03/03 | 831 | 2,769 | <issue_start>username_0: I installed the newest version of ArangoDB on my Mac (macOS High Sierra) and when I try to connect to the server via
```
*localhost:~ davidoff$ arangosh --server.username "root" --server.database _SYSTEM*
```
I get the following error message:
>
> Could not connect to endpoint 'http+tcp:/... |
2018/03/03 | 914 | 3,122 | <issue_start>username_0: I'm developing an Electron+Vue app on Windows 10 (generated though vue-cli and [this](https://github.com/SimulatedGREG/electron-vue) template).
At the moment I've managed to display a transparent window. As soon as the frame loose focus, a title at the top of the page appears.
What I've figur... |
2018/03/03 | 921 | 2,882 | <issue_start>username_0: I currently have two tables with the following data:
**TableA**
```
**ID** | **Item**
1 | Hat
2 | Coat
3 | Jacket
```
**TableB**
```
**ID** | **TableA ID** | **Store** | **Quantity**
1 | 1 | A | 3
2 | 1 | B | 2
3 | 1 | C | 1
4 | 2 | A | 2
5 | 2 | B | 4
6 | 2 | C | 3
7... |
2018/03/03 | 574 | 2,750 | <issue_start>username_0: With traditional software development, tests represent what you meant for the software to say. By executing the tests on the software you see if the software means what you think it means. “*This is what I meant to say, did I actually say that?*”
Alloy instances show you what you said in the m... |
2018/03/03 | 1,568 | 3,630 | <issue_start>username_0: I never had troubles to read a json from a url or anything that's builded like this:
```
{ success: true,
name: 'Dekirai',
clan: null,
level: 7,
exp: 3193,
playtime: 0,
tdrate: 0,
kdrate: 0,
matches_played: 0,
matches_won: 0,
matches_lost: 0,
last_online: '2018-03-02T23:0... |
2018/03/03 | 1,455 | 4,657 | <issue_start>username_0: I have a question, I'm making a javascript that shows and hide a div by clicking another div but because divs don't have a value or a name I can't find out a way to do this.
I'm using input type hidden because it can have a value, but still it doesn't work as it should.
I hope somebody can help... |
2018/03/03 | 906 | 4,007 | <issue_start>username_0: Websites like makemytrip fetches flight booking details from different airlines api providers like jetairways, indigo and so on.
when we visit there home page we see flight booking details of various airlines.
Since this information cant be cached.
How will they make rest calls to all those ... |
2018/03/03 | 1,039 | 3,291 | <issue_start>username_0: I have recently started using rabbitmq and celery with django. i am using django-celery, django-celery-email and post office to send emails in async way.
After installing all these packages my settings.py looks like
```
INSTALLED_APPS = [
#other apps
'djcelery',
'djcelery_email',
'post_office... |
2018/03/03 | 439 | 1,402 | <issue_start>username_0: I have csv with sample data below.
```
column1,column2,column3
abc,123,sample_test_FT.txt
abc,123,sample_test_IFT.txt
```
I need to print only the lines whose character after the last underscore of column 3 is equals to "I"
desired output:
```
column1,column2,column3
abc,123,sample_test_I... |
2018/03/03 | 444 | 1,531 | <issue_start>username_0: I set up the twitter stream from [here](https://github.com/rob-murray/jekyll-twitter-plugin) and got it to work on localhost, but Github Pages isn't rendering it.
[This](http://keitaito.com/blog/2017/01/20/embedding-tweets-in-github-pages.html) page says that all Pages sites are generated usi... |
2018/03/03 | 578 | 1,522 | <issue_start>username_0: May I ask what is the difference between:
```
return float((Y2-Y1))/(X2-X1)
```
and:
```
return float((Y2-Y1)/(X2-X1))
```
My whole code is:
```
class Line(object):
def __init__(self,coor1,coor2):
self.coor1 = coor1
self.coor2 = coor2
def slope(self):
x1,y... |
2018/03/03 | 430 | 1,461 | <issue_start>username_0: I have a list `messages` of messages, when each message in this list, is an object with a 5 items - `name, message, action, date, location`.
I want to fill my data frame with this information.
Currently, I'm doing it like the following:
```
j = 1
df = pd.DataFrame(index=range(1, len(messages)... |
2018/03/03 | 1,161 | 3,201 | <issue_start>username_0: I need to return a particular column as an element in the xml returned with the FOR XML AUTO clause in the sql server. Automatic return turns all fields into attributes of the corresponding element. Okay, but one field or another I need it to be an element.
I have two tables:
```
SET ANSI_NUL... |
2018/03/03 | 948 | 3,081 | <issue_start>username_0: my dear StackOverflow community! I would really appreciate help from a person who has used MPAndroidChart for a while or just knows the things about this library.
This post can be a bit long, but please if you know some tips or tricks, or you have used this library - **please read a bit, maybe... |
2018/03/03 | 553 | 2,123 | <issue_start>username_0: I have a folder with images called " LaptopsImages ".
In my file called laptops.php i have an array list with different laptops with variables like: title, brand, price, description, spec and pictures names. My array list is convert to XML DOM tree.
On my file called product.html i wrote a c... |
2018/03/03 | 274 | 898 | <issue_start>username_0: why on earth i see this ??
[Aborting commit due to empty commit message.](https://i.stack.imgur.com/baDcN.png)<issue_comment>username_1: I think that you have some problems in your git configs(see [core.editor](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#Basic-Client-Confi... |
2018/03/03 | 767 | 2,336 | <issue_start>username_0: I'm trying to align 4 buttons horizontally in the center top of the page with css. this is what I have
```css
button {
background-color: rgb(243, 243, 243);
border: 5px;
color: #000000;
padding: 15px 32px;
text-align: center;
margin: 4px 2px;
cursor: pointer;
-webkit-tr... |
2018/03/03 | 1,597 | 5,368 | <issue_start>username_0: In [book.realworldhaskell.org](http://book.realworldhaskell.org/read/types-and-functions.html), types and functions part under *Conditional evaluation* section, it is given the following example:
```
-- file: ch02/myDrop.hs
myDrop n xs = if n <= 0 || null xs
then xs
... |
2018/03/03 | 539 | 1,863 | <issue_start>username_0: I have this piece of code:
```
int main() {
const vector sorted\_strings = { "zzzу", "zzzzу",
"zzzzzу", "zzzzzzzу" };
cout << \*lower\_bound(begin(sorted\_strings),
end(sorted\_strings), "zzzy");
}
```
I expect the `cout` to print `"zzzу"`, because `lower_bound` shou... |
2018/03/03 | 1,080 | 3,729 | <issue_start>username_0: Im trying to add service details for a vehicle. On the show page for my vehicle I've put a button which links to add new service details
```
<%= link_to 'Add Service Details', {:controller => :services, :action => :new, :vehicle_id => @vehicle.id}, {class: "btn btn-secondary"} %>
```
The ur... |
2018/03/03 | 769 | 2,894 | <issue_start>username_0: Hi I am working on an angular 4 web app. I am trying to set the initial selected state of a drop down menu. No matter what I do though the initial selected state of the drop down menu is not being set. See my html below ( am trying to set the healthy option of a recipe to either be 'yes' or 'no... |
2018/03/03 | 297 | 1,072 | <issue_start>username_0: I am working on a project in which I am facing a problem with Profile image. I am using Windows 10 as a system and XAMPP (apache, mariadb, php) as a development tool.
I have created one `profile.php` page which simply shows user info and options for updating user information. When I want to di... |
2018/03/03 | 1,516 | 3,645 | <issue_start>username_0: I want to apply partition over on some months columns and group them in a quarter.
```
Months
Jan-18
Feb-18
Mar-18
Apr-18
May-18
Jun-18
Jul-18
Aug-18
Sep-18
Oct-18
Nov-18
Dec-18
```
My calendar starts from Jun
So
```
Jun,Jul,Aug is considered as 1st quarter .
Sep,Oct,Nov is considered as... |
2018/03/03 | 919 | 3,300 | <issue_start>username_0: I'm trying to return a JSON result to my client using IHttpActionResult.
My .Net code, looks like this:
```
[AllowAnonymous, HttpPost, Route("")]
public IHttpActionResult Login(LoginRequest login)
{
if (login == null)
return BadRequest("No Data Provided");
var loginResponse =... |
2018/03/03 | 564 | 2,355 | <issue_start>username_0: How can I use SharedPreferences on Android Studio to save some data like the value of a boolean?
```
SharedPreferences.Editor editor = getSharedPreferences(MY_PREFS_NAME,MODE_PRIVATE).edit();
editor.putBoolean("firststart",false);
editor.apply();
SharedPreferences prefs = getShared... |
2018/03/03 | 432 | 1,334 | <issue_start>username_0: I have a list of images like so:
```




```
How to select and remove parent element by which include an img child with specific src attribute
My guess:
```
var imgElmnt = document.querySelectorAll("imgCnr > img[src='def.jpg']");
img... |
2018/03/03 | 2,553 | 8,529 | <issue_start>username_0: The problem is that my application throws an exception when the token expires and I can't catch that exception.
I want to catch that exception and do another thing. Tried commenting exception statement on catch block but no progress.
Exception:
```
**03-Mar-2018 18:32:16.941 SEVERE [http-ni... |
2018/03/03 | 634 | 2,430 | <issue_start>username_0: I am currently using the Devise Gem to control user authentication and I want to record the current user ID in a field modified\_by of my tables. I have sucessfully recorded the user when creating a record by doing this
```
# POST /weightsets
def create
@weightset = Weightset.new(weightset_p... |
2018/03/03 | 614 | 2,144 | <issue_start>username_0: I am trying to append an empty array with vectors. Yet, no matter what command I use the result is not what I wanted because the result is a vector, and I wanted an array. Here is the sample of my code (s is an array of binary data):
```
import pandas as pd
import numpy as np
s=pd.read_csv('da... |
2018/03/03 | 705 | 2,940 | <issue_start>username_0: Our project at work depends on a dynamic library that is called "LibraryAlpha". Also, our project at work depends on a dynamic library that is called "LibraryBeta". And also, it just so happens to be that "LibraryBeta" also depends on "LibraryAlpha".
Our project embeds .framework's built by di... |
2018/03/03 | 658 | 2,223 | <issue_start>username_0: I am trying to create a greeting UI that fades out before displaying main content.The desired effect can be found [HERE](http://help.apple.com/macOS/high-sierra/macbook-pro-13/?lang=en&cases=kIFAGHvXTAepRptQXiXe5w,N0bfKOvERSiAp06mHOcgOQ#outro)
When a certain scroll input, say 100px from the to... |
2018/03/03 | 1,155 | 1,957 | <issue_start>username_0: ```
require(tibble)
set.seed(1)
var_names <- c('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')
for (variable in var_names) {
assign(variable, sample(0:9, 10))
}
tibble(a, b, c, d, e, f, g, h, i, j)
> tibble(a, b, c, d, e, f, g, h, i, j)
# A tibble: 10 x 10
a b c d ... |
2018/03/03 | 1,922 | 5,367 | <issue_start>username_0: I'm having difficulty converting a structured array loaded from a CSV using `np.genfromtxt` into a `np.array` in order to fit the data to a Scikit-Learn estimator. The problem is that at some point a cast from the structured array to a regular array will occur resulting in a `ValueError: can't ... |
2018/03/03 | 1,262 | 3,718 | <issue_start>username_0: An example:
```
let foo: number[];
foo = [1, 2, 3]
.map(number => number === 1 ? number : null)
.filter(number => number);
```
I get an error:
>
> 8: .map(number => number === 1 ? number : null)
> ^ Cannot assign `[...].map(...).filter(...)` to `foo` because null [1](https://flow.org... |