date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/07 | 494 | 1,590 | <issue_start>username_0: I have .zip archive with filename.xlsx inside it and I want to parse Excel sheet line by line.
How to proper pass filename into pandas.read\_excel in this case?
I tried:
```
import zipfile
import pandas
myzip=zipfile.ZipFile(filename.zip)
for fname in myzip.namelist():
with myzip.open(fn... |
2018/03/07 | 732 | 2,478 | <issue_start>username_0: I'm trying to execute a custom preprocessor I wrote called `RemoveCellsWithNoTags` on the command line. Following the [documentation](https://nbconvert.readthedocs.io/en/5.3.1/config_options.html), this is my attempted command
```
jupyter nbconvert --Exporter.preprocessors=["custompreprocesso... |
2018/03/07 | 423 | 1,511 | <issue_start>username_0: I have just started using Class-based views and I am trying to pass the parameters to class-based view as:
```
return HttpResponseRedirect(reverse('myView'), kwargs={'method': 'learning'})
```
My view is:
```
class MyView(View):
form_class = MyForm
initial = {'key': 'value'}
tem... |
2018/03/07 | 761 | 2,724 | <issue_start>username_0: I have a MasterDetailPage that contains the following constructor:
```
public MainPage()
{
NavigationPage.SetHasNavigationBar(this, false);
NavigationPage.SetHasBackButton(this, false);
InitializeComponent();
MessagingCenter.Subscribe(this, "OpenMenu", ... |
2018/03/07 | 265 | 953 | <issue_start>username_0: I'm working on react-router-dom and in console this error is appearing.
>
> Warning: Hash history cannot PUSH the same path; a new entry will not be added to the history stack
>
>
><issue_comment>username_1: Basically, the problem is that if you are on page `/here` and click a link to `/her... |
2018/03/07 | 1,439 | 4,586 | <issue_start>username_0: I'm looking to improve my code efficiency by turning my code into arrays and loops. The data i'm working with starts off like this:
```
ID Mapping Asset Fixed Performing Payment 2017 Payment2018 Payment2019 Payment2020
1 Loan1 1 1 1 ... |
2018/03/07 | 666 | 2,426 | <issue_start>username_0: I am trying to create a script to sort a table on the current active sheet/tab but I am getting an error that I could not identify. I keep getting `The coordinates of the range are outside the dimensions of the sheet.`. My table has data in them from columnA to columnQ. Data in columnA are iden... |
2018/03/07 | 577 | 1,944 | <issue_start>username_0: I have a bash file, it works fine when executed from terminal.
```
#!/bin/bash
source activate tensorflow_p36
python /home/ec2-user/abc/wsgi.py
```
*Note: `tensorflow_p36` being an in-built conda environment, does not require to be called from specific `/env/bin` directory. It can be activat... |
2018/03/07 | 572 | 1,863 | <issue_start>username_0: I'm need to run a calculation for month every day. If the month period, exists already, I need to update it, else I need to create a new row for the new month.
Currently, I've written
```
declare @period varchar(4) = '0218'
DECLARE @Timestamp date = GetDate()
IF EXISTS(select * from #output... |
2018/03/07 | 711 | 2,277 | <issue_start>username_0: I'm trying to learn memoization in C++ and have implemented two Fibonacci functions using `map` and `vector`. I've submitted them to the Coursera data structures course. The `vector` implementation fails due to taking too much time and the `map` passes OK. As both implement memoization could an... |
2018/03/07 | 294 | 943 | <issue_start>username_0: I have a snippet of code in which the function foo returns a dictionary.
```
def foo():
# do something here
# get data from web
return {
"book": {ln : wd for ln, wd, _ in data["book"]},
"note": {ln : wd for ln, wd, _ in data["note"]},
}
def bar():
data = fo... |
2018/03/07 | 1,075 | 4,252 | <issue_start>username_0: I'm trying to fade from one image to another, using a **SINGLE** UIView (**Yes!** have seen Q&As on stackoverflow, that use 2 UIViews - on top of each other).
**I have a current UIView image, would like to fade it out and replace it with another image, and fade the new image in.**
I have trie... |
2018/03/07 | 1,088 | 4,216 | <issue_start>username_0: I'm working on a simple Rails bookmarking app that lets users save Items and organize them in Collections.
I'd like to add an index page with staff picks that includes both selected Items and Collections. The result would be a feed that ranks these Items and Collections by the time they were s... |
2018/03/07 | 655 | 2,659 | <issue_start>username_0: So I recently updated my online portfolio, just a few minor changes to the design, it looked great in browsersync, then when I upload it, it looks horrible. It's like some of the CSS isn't being read. I can't figure it out. When I view it in an incognito browser, it looks just how it is suppose... |
2018/03/07 | 958 | 3,538 | <issue_start>username_0: I'm using Sublime Text 3 to write C libraries. I want to be able to reference the lib build directory, and see that a binary actually got built. However, Sublime shows the directory as empty.
[](https://i.stack.imgur.com/L5Rqt.png)
How can ... |
2018/03/07 | 1,479 | 5,308 | <issue_start>username_0: I am using ExpressJS 4.16 on Node v8.9.4, and have created base controller that handles default routes. Here is an sample example:
```
class BaseController {
constructor(name, app, router, data) {
this._name = name;
this._app = app;
this._router = router;
this._data = data;
... |
2018/03/07 | 562 | 2,232 | <issue_start>username_0: ```
choice outcome
1 correct
2 incorrect
2 correct
2 correct
1 no response
1 incorrect
2 c... |
2018/03/07 | 769 | 1,933 | <issue_start>username_0: I am trying to search a pandas df I made which has a tuple as an index. The first part of the tuple is a date and the second part is a forex pair. I've tried a few things but I can't seem to search using a date-formatted string as part of a tuple with .loc or .ix
My df looks like this:
```
... |
2018/03/07 | 424 | 1,089 | <issue_start>username_0: New to R.
Brain size of pea.
Suppose I have two separate data frames.
```
df1 = tibble(
date = as.Date(c("1990-10-01", "1991-11-01", "1992-11-01")),
wage = c(4, 5, 6)
)
df2 = tibble(
date = as.Date(c("1990-01-01", "1991-01-01", "1992-01-01")),
cpi = c(2, 3, 4)
)
```
I wish to add... |
2018/03/07 | 626 | 2,593 | <issue_start>username_0: I use PHPStorm and have the following message "Multiple definitions" for the `PHPUnit\Framework\TestCase`. I am not sure exactly but it looks like PHPStorm used compose autoload system. So I tried to find directories where unnecessary class definitions live and exclude them.
I found that I can... |
2018/03/07 | 1,067 | 4,310 | <issue_start>username_0: so I'm at the point where I think I'm comfortable enough to start trying some frameworks/apis so I am thinking of learning the qt framework so I can start developing some simple gui applications,
anyway I noticed one strange thing in the qt MainWindow.cpp file
```
MainWindow::MainWindow(QWi... |
2018/03/07 | 1,358 | 2,632 | <issue_start>username_0: How can I format this string in a list
from :
```
('1496\n8584\n172\n5988\n7184\n704\n3448\n6580\n8504\n', '')
```
to :
```
('1496','8584','172','5988','7184','704','3448','6580','8504')
```
I think the way is to use re.sub() but I'm having trouble with the '\n' not escaping<issue_commen... |
2018/03/07 | 256 | 929 | <issue_start>username_0: Our team works with WildFly as a standart application server. We would like to add Apache Nifi to our set of technologies. The problem is that according to this comment (<http://mail-archives.apache.org/mod_mbox/nifi-dev/201605.mbox/%3C3B44DF8F-B111-4EAC-8D5F-6BEE8557584F%40gmail.com%3E>) Apach... |
2018/03/07 | 403 | 1,307 | <issue_start>username_0: I'm building a page that displays transactions using API.
I have the following code atm:
```
/* Transactions */
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://nodes.wavesnodes.com/transactions/address/3PBqH72f4Nkf9K5cEvsNaKttYbqMLFDrqa4/limit/5",
CURLOPT_RETU... |
2018/03/07 | 699 | 3,355 | <issue_start>username_0: I have a shiny app that has been hosted on shinyapps.io for a while.
I downloaded the app and tested locally and one of the features behaves a little differently. I believe that is due to different versions of some libraries.
I wonder if there is a way to check the versions of the libraries o... |
2018/03/07 | 756 | 3,512 | <issue_start>username_0: I am trying to write a statistic about the data warehouse tables that are used.
Therefor I should make a query to bring the used tables.
I have a list of table names and I have a database table, where the querys stored in.
How can I select the rows with the table names that used in?
```
Rep... |
2018/03/07 | 1,169 | 3,473 | <issue_start>username_0: I migrated my project from Java 8 to Java 9. Now when I run maven install on this project inside Intellij Idea it fails with the following error:
>
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project tutorial: Fatal error ... |
2018/03/07 | 1,340 | 4,123 | <issue_start>username_0: I have a struct's array inside other struct's array and I wanna create a binary file which contains this data (only elements no null).
My structs are:
```
struct viaje {
char identificador[30+1];
char ciudadDestino[30+1];
char hotel[30+1];
int numeroNoches;
char tipoTran... |
2018/03/07 | 723 | 2,291 | <issue_start>username_0: So imagine an existing code base with files {A, B, C, D, E}.
I clone the repo, create a branch, and issue a series of changes
```
Commit 1 changes files {A, B}
Commit 2 changes files {C, D}
Commit 3 changes files {D, E}
```
In this example, I need to merge to the parent the files that **chan... |
2018/03/07 | 1,556 | 4,804 | <issue_start>username_0: I am developing a hardware platform that requires the SSSE3 instruction set. When looking at a processor such as the Intel Atom® x5-Z8350 the [datasheet](https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/atom-z8000-datasheet-vol-1.pdf) says it has support for SSE4.1 and SS... |
2018/03/07 | 3,709 | 10,550 | <issue_start>username_0: I'm installing a three node non-secure nifi cluster (1.5) with embedded zookeeper.
The installation has completed, the cluster startup up and election have finished, without any obvious issues.
However when I hit the gui I see the following:
javax.ws.rs.ProcessingException: java.net.ConnectE... |
2018/03/07 | 702 | 2,113 | <issue_start>username_0: I'm writing a memdump application in C and the goal is to print a real piece of the application memory of a specific address. The code I already have is this:
```
void memdump(byte_t *ptr, long size ) {
```
...
```
typedef unsigned char byte_t;
byte_t data[size];
//&data[0] = &ptr
b... |
2018/03/07 | 627 | 2,281 | <issue_start>username_0: I have a `runGUI.sh` script and I want to run a Python script through it. The Python Script is a `GUI.py` that I want to make it run as an App, by either double clicking the Shell script or the Python Script itself (ideally I would like to have both ways).
I tried everything that others recomm... |
2018/03/07 | 1,528 | 5,555 | <issue_start>username_0: My service worker is throwing this error in Chrome when I open the WAVE (Web Accessibility Evaluation Tool) extension:
>
> Uncaught (in promise) TypeError: Request scheme 'chrome-extension' is
> unsupported
> at sw.js:52 (anonymous) @ sw.js:52 Promise.then (async) (anonymous) @ sw.js:50 Pro... |
2018/03/07 | 654 | 2,727 | <issue_start>username_0: I don't understand this paragraph :
>
> Exporting functions in a .def file gives you control over the export ordinals. When you add an exported function to your DLL, you can assign it a higher ordinal value than any other exported function. When you do this, applications that use implicit lin... |
2018/03/07 | 1,075 | 3,732 | <issue_start>username_0: I have a table with duplicates and I want to partition by the ID and select only the row with the most information (where the most fields contain values).
```
+----+------+------+-------+---------+-------+
| ID | Name | City | Zip | Address | Phone |
+----+------+------+-------+---------+-... |
2018/03/07 | 446 | 1,531 | <issue_start>username_0: My encoder is printing -31 instead of "99" I want to output to be
8 5 12 12 15 0 23 15 18 12 4 99 for the input Hello World!
```
function fnEncode() {
var msg = $("textin").value.toUpperCase();
$("textin").value = msg;
var outstr = "";
var allowed = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
fo... |
2018/03/07 | 558 | 2,074 | <issue_start>username_0: How can I get started at finding a recursive/dynamic solution to the problem?
For example, how many adjacent swaps is at least needed to convert the given string `abaaccbabaabcab` (representing all other characters as `c`) to one without any instances of "ab"? It's elusive for me to come up wi... |
2018/03/07 | 626 | 2,304 | <issue_start>username_0: When I try to upload the app to the app store using Xcode archive, following validation errors are coming up:
>
> iTunes Store Operation Failed Invalid Bundle. The bundle at
> 'Dvp.app/Frameworks/AlamofireSwiftyJSON.framework' contains disallowed
> file 'Frameworks'.
>
>
> iTunes Store Op... |
2018/03/07 | 464 | 1,700 | <issue_start>username_0: Spring Boot allows for exposing git commit and build information on the actuator `/info` endpoint. I have used the [1.5.10.RELEASE integration](https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#production-ready-application-info-git) for setting this up.
However the d... |
2018/03/07 | 699 | 2,480 | <issue_start>username_0: I have a basic SQL query where I am selecting data from a core records table. I want to add an `AND` clause to my statement to filter out the results based on a table variable, only if data actually exists in there.
```
SELECT
*
FROM
TABLE
WHERE
field = '123'
AND
(gender IN... |
2018/03/07 | 373 | 1,118 | <issue_start>username_0: I have two numpy arrays:
```
import numpy as np
a=np.array([1,-2,3])
b=np.array([-2,-1,4])
```
I know how to create an array of the minimum of each pair of entries:
```
np.minimum(a,b)
array([-2, -2, 3])
```
And how to get an array of the absolute value of the smallest magnitude vales
... |
2018/03/07 | 701 | 2,309 | <issue_start>username_0: >
> highlight current date in python using Calendar library.
> Below is my program.
>
>
>
```
import calendar
c = calendar.TextCalendar(calendar.MONDAY)
str = c.formatmonth(2018,1)
print (str)
```
[Output](https://i.stack.imgur.com/A1dO7.png)<issue_comment>username_1: I switched to HTML... |
2018/03/07 | 872 | 3,037 | <issue_start>username_0: I'm using spring's NamedParameterJdbcTemplate because I have a SELECT ... IN () in my SQL query, as explained [here](https://stackoverflow.com/questions/4504592/how-to-use-select-in-clause-in-jdbctemplates).
In our specific case, the business logic should be:
- If the list of id's to check is... |
2018/03/07 | 558 | 2,217 | <issue_start>username_0: I am trying to replace a largish if-elif block in python with something a bit more like java switch. My understanding is this should be a bit faster and we are parsing lots of data so if I can get speed improvement I will take it. However, what is happening is the code is always acting as if th... |
2018/03/07 | 1,452 | 5,032 | <issue_start>username_0: I am sending payslip mails with payslips as attachment with phpmailer class. the problem is the first mail is going with one attachment but the sedonf mail is going with the first and the second attachments together.
For example:
mail for employee name : A is going with A.pdf
mail for employee ... |
2018/03/07 | 1,587 | 5,060 | <issue_start>username_0: I am beginner.I have a file which has lines like MONSTER,ERRTU,14,2 . when i tried to read the lines and store them into a dynamic memory allocated array. it seems like it worked at first but then when i tried to print the elements of it later , it doesnt work properly.Is it about using char \*... |
2018/03/07 | 389 | 1,458 | <issue_start>username_0: I installed node.js v9.7.1 in Windows 10. The files are located in Program Files. The Node.js command prompt states it is installed.
I then installed the Hyper terminal and installed Bash and then ZSH. In ZSH, `node -v` command is not found. Do I need to install a separate copy of nodejs in ZS... |
2018/03/07 | 1,308 | 5,008 | <issue_start>username_0: First of all, apologies for this question. Let me write first, I've tried the below code for calling a `SOAP` web service using `C#` that worked perfectly. Now I am stuck with the conversion of the code into `VB.NET`:
```
public void CallService(string username, string password)
{
HttpWebR... |
2018/03/07 | 667 | 2,485 | <issue_start>username_0: I try to send a picture weight some mb over Networking (UNet) API of Unity.
If try [ClientRpc] call, but it complain about the size of the packet... of course.
I know I could use WWW to send this file, but think it is not possible to receive such packet over Lan Networking. It is ?
Do you know... |
2018/03/07 | 486 | 1,754 | <issue_start>username_0: In the following line of code I am expecting the printing of `here` every 2 seconds. But nothing is being printed:
`Rx.Observable.interval(1000).debounceTime(2000).subscribe(x => console.log('here'))`
However in the following line of code, `here` is printed every 2 seconds, as expected:
`Rx.... |
2018/03/07 | 1,371 | 4,926 | <issue_start>username_0: I'm building a simple filtering UI. I want to filter a collection of objects using a logical AND, where the object’s match depends on multiple potential values for each in an arbitrary set of keys. The objects to filter look like:
```
collection = [
{
'Kind': 'Instrument',
'Color': '... |
2018/03/07 | 708 | 2,934 | <issue_start>username_0: I would like to send Data to a NewsletterStore Job. But it's failing with the following error. Any suggestions?
I also tried to remove the SerializesModels Models trait. Without any success.
**Error**
```
Exception
Serialization of 'Closure' is not allowed
```
**Controller**
```
public f... |
2018/03/07 | 669 | 2,687 | <issue_start>username_0: Cant upload an image to server...
Here is the code:
```
let chosenImage = info[UIImagePickerControllerEditedImage] as! UIImage
let data = UIImageJPEGRepresentation(chosenImage, 1)
Alamofire.upload(multipartFormData: { multipartFormData in
multipartFormData.append(data, withName: "avatar_... |
2018/03/07 | 793 | 3,018 | <issue_start>username_0: I want put 2 radio buttons for male and female on an alertcontroller. I've got this:
```
let prompt = this.alertCtrl.create({
title: 'Add Participant',
inputs: [
{
name: 'name',
placeholder: 'Name'
},
{
name: 'surname',
placeholder: 'Surname'
},
... |
2018/03/07 | 897 | 3,401 | <issue_start>username_0: I am getting an error in U-SQL query:
```
E_CSC_USER_SYNTAXERROR: syntax error. Expected one of: '.' ALL ANTISEMIJOIN ANY AS BROADCASTLEFT BROADCASTRIGHT CROSS DISTINCT EXCEPT FULL FULLCROSS GROUP HASH HAVING INDEXLOOKUP INNER INTERSECT JOIN LEFT LOOP MERGE ON OPTION ORDER OUTER OUTER UNION PA... |
2018/03/07 | 1,023 | 3,469 | <issue_start>username_0: I tried to find activecell and copy current region. But I need to copy entire rows instead.

Existing code:
```
Sub findRange(valueToFind)
Dim ra As Range
Dim xlSheet As Worksheet
Dim DestSheet As Worksheet
Dim lastRow ... |
2018/03/07 | 494 | 1,463 | <issue_start>username_0: This simple command below works perfectly:
```
pts.cnt1.1deg <- rasterToPoints(boxCnt.1deg, fun=function(r){r>=1})
```
However, I need to do that for many values (1:100). For instance, I tried this option bellows and it doesn't work this way.
```
for(i in 1:100){
pts.cnt[i].1deg <- rast... |
2018/03/07 | 520 | 1,725 | <issue_start>username_0: I have recently upgraded to Python 3 with `brew`. My awscli has stopped working because it is trying to use the old version of Python. I would like to try to reinstall it, but currently I am not able to uninstall it.
```
➜ ~ python --version
Python 3.6.4
➜ ~ aws confgure
zsh: /usr/local/bin/... |
2018/03/07 | 1,176 | 3,652 | <issue_start>username_0: still very new to COBOL. I have a simple program that runs to read a file, then read the contents of that file and format it out to another a file. My main problem lies in fact that for some reason, my module will test the condition, see it is false, then execute the statements inside. Afterwar... |
2018/03/07 | 837 | 3,908 | <issue_start>username_0: In arithmetic operation, add and subtract operations takes less complexity while division has high complexity. Does all the relational operations have the same complexity or differs for <= and >= operations.<issue_comment>username_1: >
> Does all the relational operations have the same complex... |
2018/03/07 | 557 | 2,297 | <issue_start>username_0: I had a test web page that used a restricted SQL user to query an Azure SQL DB to get data from masked fields. It returned the data and it was masked. I rejoiced.
I changed the user with a button and voila! I could see the actual data.
Then today, for some reason, it stopped working and I crie... |
2018/03/07 | 426 | 1,393 | <issue_start>username_0: I am in a situation where I need to make a `shared_ptr` either `null` or contain an instance of class `Bar`.
The approach below does not work though since, `Bar` and `nullptr` are not of the same type. How can achieve this?
```
class Bar {};
class Foo {
private:
shared_ptr b;... |
2018/03/07 | 4,518 | 16,867 | <issue_start>username_0: Is there a way to remove blank/null cells from datagrid view?
```
private void button1_Click(object sender, EventArgs e)
{
DataTable dvpdt = new DataTable();
HtmlAgilityPack.HtmlDocument doc;
doc = new HtmlWeb().Load("https://rotogrinders.com/grids/nba-defens... |
2018/03/07 | 3,209 | 12,083 | <issue_start>username_0: I am trying to make a page for the user to change their password when they want, not had any issues with this until now.
I have set the $Username variable, and call it in the SQL Statement along with $oldpw variable.
When I echo the query, the username is always missing.
if I reverse Password... |
2018/03/07 | 1,233 | 5,016 | <issue_start>username_0: I created an array that takes in random numbers when you click the button and that is all working. then i have a button to sort the numbers using bubble sort and show it in a other `textbox`, but when I click the sort button, all i get is repeated 0's. I need help fixing my error please.
```
n... |
2018/03/07 | 1,277 | 3,762 | <issue_start>username_0: Given the code in MSP430:
```
CLR R6
MOV #5, R5
L1: DEC R5
CMP #0, R5
JL L1
INC R6
```
I was told the value of R5 after execution is 4 and not 0.
Is this something specific to JL instruction?<issue_comment>username_1: `JL` i... |
2018/03/07 | 1,641 | 5,236 | <issue_start>username_0: I have views A and B.
View A has two different segues to view B, and my prepareForSegue:
```
override func prepare(for segue: UIStoryboardSegue, sender: Any?)
{
let nextView = segue.destination as! LabelWithTextView
nextView.HeaderLabel = UILabel()
nextView.TextToD... |
2018/03/07 | 3,077 | 10,805 | <issue_start>username_0: I'm trying to create a database for a soccer registration application. I'm trying to keep it simple right now and once I feel comfortable then make it more detailed. I'm trying to run my sql but I keep getting these errors. I was wondering if someone could look at my sql because I don't believe... |
2018/03/07 | 1,570 | 4,348 | <issue_start>username_0: I have source data like the following
```
Site_Id name Phone
150 dan 916-654-8585
150 sasha 916-654-8794
150 Sam 916-654-8589
161 Jeff 916-654-8255
161 Danny 916-654-8535
120 Ali 916-654-8575
```
and i wrote my R code to cre... |
2018/03/07 | 2,856 | 9,406 | <issue_start>username_0: I am trying to generate a jetty 9.4.8 embedded webapp with javalite activeweb that is a servletFilter based framework.
I develop a server main with a webappContextHandler, but i obtain always that exception:
```
2018-03-07 18:28:54 DEBUG AbstractLifeCycle:177 - STARTED @2308ms default@5c13d6... |
2018/03/07 | 1,057 | 3,454 | <issue_start>username_0: I'm currently trying to set up a new subdomain via route53 and ec2, but receiving timeout errors whenever I try to access it via my browser. Amazon security group is set up to allow all traffic over port 80.
I wrote the follow vhosts file and stored it under sites-available as "new.mysite.com.... |
2018/03/07 | 1,182 | 3,061 | <issue_start>username_0: I can't work out why the border between my list items isn't clickable. I've managed it in the past, but even looking at previous efforts isn't helping me see it. I've tried box-sizing, using flex like older working navigation menus, increasing heights - with no luck. I could write it again, or ... |
2018/03/07 | 1,264 | 3,995 | <issue_start>username_0: I would like to link two of my tables together, however, I have no idea how to do this.
I have two tables, system and booking, here is the sql for the two tables:
```
CREATE TABLE `system` (
`id` int(11) NOT NULL,
`date` date NOT NULL,
`time` varchar(20) NOT NULL,
`user_id` int(11) NOT... |
2018/03/07 | 821 | 2,951 | <issue_start>username_0: I am trying to create some argument parameters for my python file. I only want to accept String type as arguments. Below is my code of foo.py -
```
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
# options to the user
parser.add_argument('--source_... |
2018/03/07 | 1,735 | 6,062 | <issue_start>username_0: I have a class-based view (**IndexView** at *views.py*) that shows a table with all the data stored in the database.
This view is rendered in *index.html* using a `def get_queryset(self)` to obtain all the data. No issues yet.
The difficult part for me is trying to do it using a form, to be ab... |
2018/03/07 | 1,825 | 6,323 | <issue_start>username_0: The [Luacheck linter](https://github.com/mpeterv/luacheck/) produces a warning when an if statement branch doesn't include any statements. For example, if I have a file called `test.lua` with the following code
```lua
local function f(x)
if x == "hello" then
-- nothing to do
el... |
2018/03/07 | 1,029 | 2,753 | <issue_start>username_0: Let's say I have a NumPy array: `x = np.array([1, 2, 3, 4, 5])`. How do I convert this array into the integer `12345`?<issue_comment>username_1: Just use the `sum()` function with a generator:
```
>>> sum(e * 10 ** i for i, e in enumerate(x[::-1]))
12345
```
or, alternatively:
```
>>> sum(e... |
2018/03/07 | 1,121 | 3,021 | <issue_start>username_0: I have a time variable `startDate`:
```
startDate = 2018-01-01 00:00:40.554
```
And I want to calculate `endDay` which is 24 hours from the `startDate`, and `endHour` which is 60 minutes from the `startDate`.
```
dayDiff = Days.daysBetween(startDate.toLocalDate(), 24hours.toLocalDate()).get... |
2018/03/07 | 680 | 2,608 | <issue_start>username_0: I have a textfield with a default decimal pad. I have created a button and so when the button is pressed, it gets the current numbers in the textfield and makes it into a minus. E.g. if 5 was in the textfield and the button was pressed, -5 would now be in the textfield. I've got this part worki... |
2018/03/07 | 891 | 2,926 | <issue_start>username_0: I have a String ArrayList filled with dates + time. The format is: "11 04 2017 - 12:45:54"
I would like to change the format so it only shows the date: "11 04 2017" and save it to another array.
How can i cut the last few characters of an array?
```
package com.example.hodor.stringcut;
... |
2018/03/07 | 591 | 1,474 | <issue_start>username_0: I want to extract the following pattern using R:
When I have a string "a|c, d", and from that I want to extract:
```
a,d
c,d
```
Other examples:
* a|c:
```
a
c
```
* x|y|z, d:
```
x,d
y,d
z,d
```
* a,b:
```
a,b
```
I saw that with gsub | means an alternate character, but I can't... |
2018/03/07 | 3,186 | 6,969 | <issue_start>username_0: I am trying to extract the text from a .json file which i extracted. The problem is, that every time I am trying I am getting the aforementioned error(title). Here is my code:
```
import json
with open('grtwe.json.json', 'r') as f:
line = f.readline()
tweet = json.loads(line)
prin... |
2018/03/07 | 440 | 1,708 | <issue_start>username_0: So I have to implement file transfer using socket programming (TCP), and one of the commands is to delete a file. We were asked to do it in the following way:
DELF:
1. Client sends operation (DELF) to delete a file from the server. Note: you can create a test file called "delete.txt" with ran... |
2018/03/07 | 353 | 1,215 | <issue_start>username_0: I have an input with two span "buttons":
```
Adults:
```
Simple JS works for console.log() but doesn't apply that value to the actual input value. Is there any method in JS/JQuery which can handle this?
```
var adultsValue = $('#adults').val();
$('.plus').click(function () {
if(adults... |
2018/03/07 | 488 | 1,513 | <issue_start>username_0: I want to use Safari as the browser from python, and the code is fairly easy:
```
from selenium import webdriver
driver = webdriver.Safari()
url = 'https://www.gmail.com/'
driver.get(url)
```
I am using the latest version of Safari, 11.0.3,
In preferences-extension, I have WebDriver install... |
2018/03/07 | 409 | 1,119 | <issue_start>username_0: I want to get the current date via:
```
date('YYYY-MM-DD hh:mm:ss', time())
```
but this will return:
>
> 2018201820182018-MarMar-WedWed 0909:0303:4949
>
>
>
Why?<issue_comment>username_1: You only need to put each letter once:
```
echo date('Y-M-D h:i:s', time());
```
*Result*
>
... |
2018/03/07 | 505 | 1,810 | <issue_start>username_0: I have a for loop like so:
```
var currentLargest
for (var site in sites) {
// Each site is a website (www.mysite1.com, www.mysite2.com, etc.)
$.getJSON(site).then(function(data) {
if (data > currentLargest) {
currentLargest = data
}
});
}
// Here is where ... |
2018/03/07 | 405 | 1,351 | <issue_start>username_0: Hello I am trying to make two tables (one with an image) horizontal on the same line. I want it to be so when the screen changes to mobile, the table on the left goes on top of the right one vertically.
```
| |
| --- |
| |
| |
| --- |
|
text1, text 2”
*-HAEGARDA Advocate*
|
```<iss... |
2018/03/07 | 343 | 1,237 | <issue_start>username_0: Is there a way to display so many images ? Maybe something like google maps, that would show all images at once as tiles and you could zoom in and see the picture in detail... ?<issue_comment>username_1: You need to use a async loop and then execute a callback once all the async getJSON request... |
2018/03/07 | 555 | 1,870 | <issue_start>username_0: Angular Material documentation has something that I would like to reuse, and I would like to do it in correct way:
<https://material.angular.io/components/categories>
I would like to have buttons on the top bar with the same div.mat-button-focus-overlay which have:
```
.mat-button-focus-overla... |
2018/03/07 | 346 | 1,197 | <issue_start>username_0: I want to implement documentum cmis restful api with android. So where i can get all the materialsand learn about it . I am very new to this and want to understand documentum and cmis restful api. So that i can integrate with android.<issue_comment>username_1: Your starting point for CMIS shoul... |
2018/03/07 | 367 | 1,259 | <issue_start>username_0: ```
UPDATE Game
SET endTime = (SELECT DATEADD(hh, 1, startTime)
FROM GameInfo
WHERE Game.idGame = GameInfo.idGame);
```
I want to set the hours of endTime to be 1 hour later than the startTime, when I run this code I get the error:
```
ERROR 1728 (HY000): Cannot load from mysql.proc. The tab... |
2018/03/07 | 551 | 1,696 | <issue_start>username_0: I was given a prompt that asks,
Finish the function canYouHearMe. Assume that there is a function
called hello. It takes no parameters. Inside canYouHearMe, make a
for loop that concatenates param with the result of invoking the
function hello, 10 times.
This is what I have so far,
```js... |
2018/03/07 | 705 | 2,214 | <issue_start>username_0: How do I return an integer that is the sum of the integer values input in an ArrayList for Java at the indices 19, 9, and 14? So far I have:
Write a public static method named q3 that takes an ArrayList of Integers as a \* parameter and returns an int. The returned int should be the sum of t... |
2018/03/07 | 846 | 2,642 | <issue_start>username_0: I'm trying to get the last completed task id of the child table while counting all the child records and completed child records:
```
set @tmp := 0;
select
count(*) total,
count(if(completed=1, 1, null)) completed,
@tmp:=if(completed=1, task_id, @tmp) last_completed_task_id
from child_ta... |
2018/03/07 | 498 | 1,586 | <issue_start>username_0: I'm looking for a way to validate the beginning of a credit card pattern. So for example, let's take MasterCard.
It says that (ref: <https://www.regular-expressions.info/creditcard.html>):
>
> MasterCard numbers either start with the numbers 51 through 55...
>
>
>
I'm looking for a rege... |
2018/03/07 | 505 | 2,265 | <issue_start>username_0: I am new to redux-react. I want to know which properties need to be declared inside components and which properties need to be declared in reducers. Hope i am correct that connect is used to maps the properties declared in reducers so that the state change in redirected through store.<issue_com... |
2018/03/07 | 499 | 2,134 | <issue_start>username_0: If I train a classifier two times, like:
```
clf.fit(X,y)
clf.fit(X,y)
```
Will it overwrite the existing classifier or will it just train it one time?<issue_comment>username_1: Well, If you are using redux in your application, I recommend saving everything in redux store. The entire state o... |
2018/03/07 | 1,162 | 2,724 | <issue_start>username_0: I'm trying to grab some historical data from binance (exchange, API) and I'm using their modules. I can get the data but whenever is use the code below it creates 0's and new lines for the 'close' and 'volume':
```
ticker = 'NANOETH'
interv = "1d"
period = "1M"
rest_client.klines(ticker, perio... |