date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/10
2,256
5,562
<issue_start>username_0: I have a sympy poly that looks like: ``` Poly(0.764635937801645*I**4 + 7.14650839258644*I**3 - 0.667712176660315*I**2 - 2.81663805543677*I - 0.623299856233272, I, domain='RR') ``` I'm converting to mpc using the following code: ``` a = val.subs('I',1.0j) b = sy.re(a) c = sy.im(a) d = mpmath...
2018/03/10
946
3,393
<issue_start>username_0: I had this all working in Swift 3 and earlier but with Swift 4 no matter what variation I use this code will instead output text as a URL. If I put in "This is my sample text" the output after pasting the clipboard will be "This%20is%20my%20sample%20text". I have tried KuTTypeFileURL but that d...
2018/03/10
557
1,426
<issue_start>username_0: I have data in below format in multiple files ``` file1 123 dhhdha hkhdkhld ABC123.khdllajld file2 48-385-83 ABC456.7070 file3 CYX hdlhlahl gdiad file4 lddf ABC456.12345 ``` I am trying to get all filename and the complete string ( not line ) which contains ABC . I tried using grep but it ...
2018/03/10
517
1,579
<issue_start>username_0: I had found online at one time how to do this I think with javascript and that it had the page Faded out until someone clicked Yes or No and if you clicked no it took you back to the front of the site and if you clicked yes it unfaded the adult area? I dont actually need that but it would be ni...
2018/03/10
1,394
5,114
<issue_start>username_0: I want next: From my website to be able to start virtual server (Ubuntu, linux, windows server). I dit this with AWS and there was simple to find via IAM the access key and token. I would like to do the same if possible with Azure, to get the access key and token. I found some tutorials on ho...
2018/03/10
907
2,654
<issue_start>username_0: This is just snippet of my code. I can't seem to lock the image inside the div, if i set a margin-top: 50% it just flows out of the div. How do I stop that? Also I want to set a the image at dead center of the div that it is contained in. ```js var twitchArr = ["ESL_SC2", "OgamingSC2", "cretet...
2018/03/10
647
2,093
<issue_start>username_0: I am trying to redirect from a show action to a custom collection action, but the id param is being carried over, causing the routing to fail. A minimal example: routes.rb: ``` resources :first_models, only: [:show] resources :second_models do get 'custom_action', on: :collection end ``` ...
2018/03/10
1,105
3,610
<issue_start>username_0: I am building a simple application with Ruby on Rails. I have three tables in my database: **users**, **events** and **invites**. Any user can create an invite via form, where he/she selects the **user**, that he/she wants to invite, and the **event**, that he/she wants to invite that person t...
2018/03/10
945
3,291
<issue_start>username_0: I am trying to validate the input of a email address that exists but only when the company\_id is the same as the company\_id which is passed in with the request. I am getting this error... > > SQLSTATE[42S22]: Column not found: 1054 Unknown column '1' in 'where clause' (SQL: select count(\*...
2018/03/10
846
2,981
<issue_start>username_0: C# - Windows Form Application I have some troubles with a button BackgroundImage. I want to check if 2 buttons have the same background image, i try this: ``` if (button1.BackgroundImage == button2.BackgroundImage) MessageBox.Show("works!"); ``` but is not working. How can i che...
2018/03/10
1,250
4,212
<issue_start>username_0: I'm trying to use OpenCV <https://opencv.org/> via [Origami](https://github.com/hellonico/origami) using [lein-lambda](https://github.com/paulbutcher/lein-lambda) to deploy. However my `target/` directory ends up being 350Mb while lambda requires the uncompressed upload to be max of 250Mb. If ...
2018/03/10
640
2,081
<issue_start>username_0: For some reason or another, it appears that depending on where I copy and paste a url from, urllib.request.urlopen won't work. For example when I copy <http://www.google.com/> from the address bar and run the following script: ``` from urllib import request url = "http://www.google.com/" res...
2018/03/10
669
2,328
<issue_start>username_0: I've read plenty of question on this subject & gone over the documentation for React as well, but I'm still no wiser this. I cannot get an input field to emit anything (an event) on click or change. My code is below and other than using materialzecss, I'm using basic HTML/JSX & no other javasc...
2018/03/10
731
2,219
<issue_start>username_0: Assume on some x86-64 platform we have some 64-bit value stored in some 64-bit register (let it be the *RAX*). The challange is to *XOR* all bytes of initial value in fewer instruction calls (it doesn't matter where to store result). Here is my 8-instruction solution (in NASM): ``` mov rbx,...
2018/03/10
1,009
3,109
<issue_start>username_0: I've just installed DSX Desktop with RStudio. I'm unable to load new packages, e.g. `lubridate`, and get the error below. If I check for package updates, I get the message "all packages are up-to-date", but the error below suggests it needs a newer version of `Rcpp`. ``` installing to /user-h...
2018/03/10
1,478
5,303
<issue_start>username_0: So I got my Google Analytics set up via Google Tag Manager. Page views tracking is working fine. But when I try to track any events, the data is just not getting through to Analytics. The event tracking did not work with traditional Analytics code either. Analytics debug is showing several "Cr...
2018/03/10
560
1,863
<issue_start>username_0: ``` import time import giphy_client from giphy_client.rest import ApiException from pprint import pprint # create an instance of the API class api_instance = giphy_client.DefaultApi() api_key = '<KEY>' # str | Giphy API Key. q = 'cheeseburgers' # str | Search query term or prhase. limit = 1 # ...
2018/03/10
300
1,091
<issue_start>username_0: I've got a product title which I'm splitting and inserting a linebreak using javascript like this: ``` function myFunction() { var str = "How are you - doing today?"; var res = str.split("-").join('<br>'); document.getElementById("demo").innerHTML = res; } ``` This works for most case sc...
2018/03/10
449
1,490
<issue_start>username_0: I am new to Sqlite. Prior I tried deleting a row in my table using trick\_id ``` public void deleteTrick (int trick_id) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(Constants.TRICKS_TABLE, Constants.TRICK_ID + " ?= ", new String[]{ String.valueOf(trick_id)}); db.clos...
2018/03/10
483
1,743
<issue_start>username_0: I need to remove an element from a jQuery Cycle2 slide as it is causing accessibility problems. This is the first slide in a slide show, with HTML content and so it is in the sentinel div. A simple jQuery command like this does not work: ``` $( '.cycle-sentinel .cycle-search' ).destroy(); `...
2018/03/10
3,358
12,882
<issue_start>username_0: I am using... * Laravel 5.4 * tymon/jwt-auth : 1.0.0-rc.2 I have application with two authentications API one is `customers` and the other is `drivers` each one has it's own table. now let me describe shortly `JWT` package installation and the updates I did on it. * I installed the package ...
2018/03/10
987
2,450
<issue_start>username_0: I have a pandas DataFrame that i transform to numpy array like this ``` training_set = dataset_train.iloc[:, 1:2].values X_train = [] for i in range(60, 1258): X_train.append(training_set[i-60:i, 0]) y_train.append(training_set[i, 0]) X1_train = np.array(X1_train) ``` ...
2018/03/10
681
2,468
<issue_start>username_0: I am studying Java and my teacher has passed an exercise to the class where there are 4 candidates for an election, and the problem is to check which candidate is the winner and whether or not there will be a second round (show the candidates present and the corresponding votes ). The problem i...
2018/03/10
538
2,572
<issue_start>username_0: While looping through a collection, I check for "Billing Address" pattern and then would like to read and capture all lines until the index position of "Shipping Address". How to find the index Position of a string\_pattern in a collection when inside a for loop of the same collection. Is ther...
2018/03/10
261
1,012
<issue_start>username_0: I need to invoke a child function named toggle() which is placed in a 'my-app' component (my-app is the child component). How to invoke this function from parent component? Child component: ``` @Component({ selector: 'my-app', templateUrl: './my-app.component.html' }) export class MyA...
2018/03/10
684
1,965
<issue_start>username_0: If i've got an array: ``` $grades = array("A+"=>"5", "A"=>"4", "B"=>"3", "C"=>"2", "D"=>"1", "F"=>"0"); ``` and i've got a variable: ``` $score = 5; ``` is there a way to compare the value within the `$score` variable and the `$grades` array and store the result in a variable `$grade`? S...
2018/03/10
1,956
4,303
<issue_start>username_0: I got the workaround to work to add claims to the token using a custom REST API, however I realized this is the Id token and not the Access token. I need the custom claims to be the Access token to use for authorization in the service. I haven't inspected the Access token yet but are these cl...
2018/03/10
601
2,781
<issue_start>username_0: So, I have a localhost website where you can press a button to start a while loop. My intent is to loop through this while loop and "wait" for button clicks from the additional buttons, until 135 seconds have passed. Then, it is supposed to exit the loop. When the code (which is embedded in htm...
2018/03/10
7,641
20,269
<issue_start>username_0: I would like to use the apple style mobile menu on non-mobile larger screens. The menu is part of several elements visible in the body and it does not cover the entire screen. Is it possible to prevent scrolling when the menu is opened? I know I could do that with ``` position: fixed; over...
2018/03/10
368
1,110
<issue_start>username_0: any idea how i can create a column C based on the test of 3 columns in a dataframe? so far i have ``` df.loc[df['Negative'] > df['Neutral'] and df['Negative'] > df['Positive'], 'C'] = 'Bad' ``` this gives me ValueError: The truth value of a Series is ambiguous<issue_comment>username_1: Ad...
2018/03/10
681
2,274
<issue_start>username_0: I want to validate a "price" field in Laravel. The price should only contain numbers without (.) or (,) and cant start with 0 as well. Eg **2500 // Pass** **02500 // Fails** **12.12 // Fails** **12,12 / Fails** The rule I have now looks like this: ``` 'price' => 'required|integer|not_in...
2018/03/10
1,603
4,676
<issue_start>username_0: I have the following code in an `rmd` file which leverages `tikz` for diagrams: ``` --- title: "TestNonTufteLua" author: "Me" output: pdf_document : latex_engine: lualatex --- Prove tikz works: ```{r tikTest1, engine = "tikz"} \usetikzlibrary{shapes} \begin{tikzpicture} \node[ellips...
2018/03/10
950
3,808
<issue_start>username_0: Just FYI I posted this question [originally](https://forums.aws.amazon.com/thread.jspa?threadID=275399&tstart=0) in the AWS AppSync forum (in case in the future AWS answers it). I have been trying to make a simple Posts app like the one in the [docs](https://docs.aws.amazon.com/appsync/latest/...
2018/03/10
1,973
5,364
<issue_start>username_0: I found a pet adoption dataset that includes the age of a pet when adopted. However, the age variable contains strings like "3 months" or "4 years" or "3 weeks" all in the same column. The dataset is otherwise tidy. How can I convert these variables into year values? I've tried something like ...
2018/03/10
2,309
7,364
<issue_start>username_0: Coming from java, I'm confused as to why this works ``` int y = 1; int *x; x = &y printf(β€œ%d\n”, *x); // 1 y = 2; printf(β€œ%d\n”, *x); // 2 ``` What exactly is `y`? It seems to be a name for a constant location in memory, since reassigning it does change `*x`, and reassigning `y` changes the ...
2018/03/10
802
2,435
<issue_start>username_0: i've searched for answers to my question with partial success but unfortunately the answer i found only changes one field not ALL fields. I have a table on my website as follows: ``` | | | | | --- | --- | --- | | 1 | DL-001 | Description 1 | | 2 | DL-002 | Description 2 | | 3 | DL-003 | D...
2018/03/10
772
2,332
<issue_start>username_0: I am trying to create a conditional loop to create a new variable called BigSales which should be given a value of 'yes' if either the date occurred before 2012 or the total gross for the day exceeded $65 million. Otherwise, it should be given a value of 'no'. I tried: ``` for(i in 1:45){...
2018/03/10
826
2,489
<issue_start>username_0: I try to scrape a page and I have problems to check if the one beautifulsoup element contains numbers. I would like to clean the string, if it contains numbers. In this case, i would like just to keep the number, which is a zipcode. But before I clean it, I have to check, if the element even ha...
2018/03/10
1,249
4,068
<issue_start>username_0: Following [this Quickstart](https://cloud.google.com/kubernetes-engine/docs/quickstart) I set a default project like this ``` $ gcloud config set project lfs258 Updated property [core/project]. $ gcloud config get-value project lfs258 ``` The project lfs258 doesn't exist on my GCP account, t...
2018/03/10
665
2,246
<issue_start>username_0: What is actually difference between [] and ' ' I'm asking because when I wrote the query I couldn't write ``` SELECT * FROM 'Order Details' WHERE OrderID = 11077 ``` only possibility was ``` SELECT * FROM [Order Details] WHERE OrderID = 11077 ``` but I can rename `AS 'some name for co...
2018/03/10
874
2,926
<issue_start>username_0: I have found examples of basic arduino to arduino serial communication but have been unable to get those working on ESP32 boards. I am trying to make the same thing work between two ESP32's The two are connected: ``` esp1 esp2 gnd to gnd tx2 to rx2 rx2 to tx2 ``` Simple sketches: ``` //t...
2018/03/10
734
2,297
<issue_start>username_0: I am getting this error sometimes then it goes away automatically. Unable to track why I am getting this error. And I think it get's fixed when the session expires. This is the error screen ``` (1/1) Exception DateTime::__construct(): Failed to parse time string (2018-03-10 18:06:52.-955808) a...
2018/03/10
709
2,322
<issue_start>username_0: I am trying to get the last id of my table, I want this to know what is the next number of my counter and to show it to the user, I've tried with the `last()` method but I got this: ``` >>> $trans = Transferencia::last() BadMethodCallException with message 'Call to undefined method Illuminate\...
2018/03/10
785
2,721
<issue_start>username_0: I am trying to make my bot code a bit more manageable and put some dialogs which belong together in different files. [There is an old, similar question here for javascript.](https://github.com/Microsoft/BotBuilder/issues/1457) But I am struggling to do the same with Typescript. Probably this ...
2018/03/10
1,326
4,633
<issue_start>username_0: I have created a JS fiddle <https://jsfiddle.net/95r110s9/#&togetherjs=Emdw6ORNpc> HTML ``` ``` JS ``` validateinputentries(){ landlordstreetaddress2 = document.getElementById('landlordstreetaddress2').value; goodcharacters = "/^[a-zA-Z0-9#.,;:'\s]+$/gi"; for (var i = 0; i < landlords...
2018/03/10
3,327
10,573
<issue_start>username_0: I am trying to add HWIOAuthBundle to my project by running the below command. ``` composer require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle ``` HWIOAuthBundle github: <https://github.com/hwi/HWIOAuthBundle> When I try to run composer require I am getting the out of ...
2018/03/10
2,994
9,672
<issue_start>username_0: Using Vapor for return model to node : ``` func indexView(request: Request) throws -> ResponseRepresentable { let acro = try Acronym.makeQuery().sort(Acronym.idKey, .ascending) return try acro.all().makeNode(in: <#T##Context?#>) } ``` It always return error and don'...
2018/03/10
597
2,303
<issue_start>username_0: I'm new to linux programming and i want to know is it possible to increase the heap size of a running process. If it is possible, please help me how to do it right. Thanks anyone for helping.<issue_comment>username_1: Just use a function like `malloc()` or `calloc()` to allocate memory dynamica...
2018/03/10
377
1,232
<issue_start>username_0: How do i loop only the database names that starts with `solarsystem` inside a dropdown list. ``` +---------------------+ | dbname | +---------------------+ | electronics | | vegetables | | solarsystem_sun | | solarsystem_mercury | | solarsystem_venus | | sol...
2018/03/10
520
1,923
<issue_start>username_0: Say I have 2 methods that look like this: ``` private static boolean validate1(String line) private static boolean validate2(String line) ``` The method I use depends what the user passes in as an argument so I only ever want to use one of the methods. If I wanted to loop through a list o...
2018/03/10
658
2,360
<issue_start>username_0: How can I determine whether a function was called using the function's name or by the name of an alias of that function? I can inspect a function to get its name from within the body of a function by doing: ``` import inspect def foo(): print(inspect.stack()[0][3]) foo() # prints 'foo' ...
2018/03/10
1,260
3,975
<issue_start>username_0: Let say we have the vector `v=[1,2,3]` and we want to build the matrix of all the combinations of the numbers contained in `v`, i.e. ``` 1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1 ``` Since I'm not good in recursion, firstly I tried to write the...
2018/03/10
1,272
4,733
<issue_start>username_0: Okay, So I have a habit of over thinking. While I am relatively new to javascript and my instructor might cover this later, I am having a tough time understanding **How does event handler work inside a function** For example, I am attaching multiple events handler to an object. ``` functio...
2018/03/10
934
2,813
<issue_start>username_0: I have a list that is comprised of DataFrames where I would like to iterate over the list of DataFrames and insert a column to each DataFrame based on an array. Below is a small example that I have created for illustrative purposes. I would do this manually if it was only 4 DataFrames but my ...
2018/03/10
798
2,702
<issue_start>username_0: Currently, I made script, which after onclick event,sending question to the database and showing data in console.log( from array ). This all works correctly, but.. I want to show data from array in the different position in my code. When I try to use DataType 'json' and then show some data, the...
2018/03/10
446
1,430
<issue_start>username_0: in my form, i am using two submit buttons. when i submit the button, first need to check button id and execute function accordingly. please check my code. ```js $scope.saveme = function(user,data) { alert(id); } ``` ```html Name : Age : Save Save with Exit ``` actually i need t...
2018/03/10
1,434
4,742
<issue_start>username_0: I have the following string ``` $text =" Wireless sensor networks (WSNs) enable new applications and require\r\nnon-conventional paradigms for protocol design due to several constraints. Owing to the\r\nrequirement for low device complexity together with low energy consumption (i.e., long\r...
2018/03/10
1,082
3,714
<issue_start>username_0: I'm working on an open mapping project and am trying to create a map that would enable website visitors to add markers to the map with some info input fields (markers would be visible by all after approved). I discovered OpenLayers and Leaflet which both seem promising, and spent some time put...
2018/03/10
556
1,512
<issue_start>username_0: I would like to sort the files of a directory using `stat -c %n%Y \*`, this command gives you the name of the file concatenated with the time of last modification. Problem is that I don't know how to take last number characters (last modification time) in order to sort the files with a pipe, I ...
2018/03/10
408
1,584
<issue_start>username_0: I have a Vue component `foo` inside my HTML and I pass a parameter to it like this: Now inside the `foo` component I define the property type and default value like so: ``` export default { name: "foo", props: { some: { type: String, default() { return...
2018/03/10
290
1,127
<issue_start>username_0: Inline script works, I just need to use onclick='document.getElementById("").innerHTML However, I cannot get it to work in an external file. Do I need to define an onclick function -- something already preset in HTML5?<issue_comment>username_1: > > Every component instance has its own isolat...
2018/03/10
759
2,642
<issue_start>username_0: I have a summary metric for endpoint latency "my\_metric\_api\_latency\_seconds" with a few quantiles calculated by the client for e.g. p50, p90, p95, p99 etc and I also have a set of labels associated with the metric. consider I have the following time-series as: my\_metric\_api\_latency\_sec...
2018/03/10
1,143
4,563
<issue_start>username_0: i was exploring Ajv with ajv-errors for validating json schema and producing custom error messages. everything works as of now but i can't set custom error message for type for individual values. ``` const emailSchema = { type: 'object', required: ['foo', 'bar', 'car'], properties: { foo:...
2018/03/10
491
1,820
<issue_start>username_0: I'm writing a simple api for training using `express`. Here's my testing code: ``` var express = require('express'); var app = express(); app.post("/api/:var_name", function(req, res) { res.send(req.params.var_name); }); ``` is simply testing to see if `POST` is working. When I call `htt...
2018/03/10
280
1,105
<issue_start>username_0: Is there an API I can use to create a live chat on my website ? Like I can customize the html but all the messages are hosted on an external website.<issue_comment>username_1: There are many API's you could find by doing a google to do this for you. Or you could use something like Firebase whi...
2018/03/10
393
1,558
<issue_start>username_0: I need to read from `istream` some strings, of which there are two types: 1. `" strings with leading and trailing spaces "` which should look like `"strings with leading and trailing spaces"` (only leading and trailing spaces are trimmed, what's within them is kept) 2. `" <NAME> \n <NAME>"`. H...
2018/03/10
628
2,076
<issue_start>username_0: I am trying to run this command on CMD and the command "appears" to run without errors but I am not sure if it is actually making the request. The results should be returned in a Json file. ``` curl -H "Accept: application/json+v3" -H "x-api-key: " \https://beta.check-mot.service.gov.uk/trade/...
2018/03/10
683
2,443
<issue_start>username_0: `Progress dialog` should appear before display `Alert dialog in Android app` . I am using android studio. Alert dialog content will be from Async task in separate class file. So excuting Progress dialog from async task. But i am not able to see progress dialog screen before AlertDialog opens...
2018/03/10
2,047
4,167
<issue_start>username_0: I'm having problems after filtering or subseting dates in a dataframe. I'm extracting Adwords data cost (adCost) from GA API using googleAnalyticsR package. adCost matches with GA per se. But after subsetting of filtering by month I'm getting different results. This is a normal API CALL th...
2018/03/10
725
2,338
<issue_start>username_0: After reading this code to teach how a simple vector of doubles is built: ``` class vector { int sz; double* elem; public: vector(int s) :sz{s}, elem{new double[sz]} { for (int i = 0; i < sz; ++i)elem[i] = 0.0; } vector(initializer_listlst) :sz{ int(ls...
2018/03/10
587
2,059
<issue_start>username_0: On one of my Informix tables, there are two indexes that have only 1 different column out of three. Here are the indexes: ``` CREATE INDEX informix.ix_1 ON informix.test(date, operator, rn) CREATE INDEX informix.ix_2 ON informix.test(choice, date, operator) date is from type Date ope...
2018/03/10
988
3,020
<issue_start>username_0: I am trying to create a condition within a GP database whereby I must only be able to insert appointments which are equal to or greater than todays date. Query: ``` CREATE TABLE Appointment_Table( AppointmentID Number(6) NOT NULL Primary Key, DateAndTime Timestamp(0) NOT NULL, Check (DateAndT...
2018/03/10
680
2,906
<issue_start>username_0: I want to avoid passing multiple identically typed parameters into my method to avoid the potential to misorder the parameters. For example: ``` void createBook(String publisher, String illustrator, String author) ``` My instinct is to create 3 new types extending String, so that I can have ...
2018/03/10
1,011
3,746
<issue_start>username_0: This is the module section of my webpack.config.js file ```js module: { loaders: [ { test: /\.jsx?$/, exclude: /node_modules/, // loader: 'babel', loader: 'babel-loader', query: { presets: ['es...
2018/03/10
904
2,809
<issue_start>username_0: I want to divide a file in a two random halfs with python. I have a small script, but it did not divide exactly into 2. Any suggestions? ``` import random fin = open("test.txt", 'rb') f1out = open("test1.txt", 'wb') f2out = open("test2.txt", 'wb') for line in fin: r = random.random() i...
2018/03/10
316
1,053
<issue_start>username_0: ``` var widthValue : Int = 0 var heightValue : Int = 0 var result : Int = 0 @IBOutlet weak var widthText: UITextField! @IBOutlet weak var heightText: UITextField! @IBOutlet weak var resultText: UILabel! @IBAction func calculate(_ sender: Any) { widthText.text = "\(widthValue)" heightTe...
2018/03/10
379
1,579
<issue_start>username_0: For my project, I need to harvest data from Twitter. I am currently facing two design choices: 1. What is the best software architecture? I read that spark has Twitter support but I am not familiar with Scala. On the other hand, Apache Spark seems a good option, but then I'm not sure on how t...
2018/03/10
621
2,371
<issue_start>username_0: How can I create a class interface with async and sync methods? I'm creating a interface service that implements: ``` public Interface IService where T : class{ T Get(int id); bool Add(T entity); bool Remove(int id); bool Update(T entity); } ``` But some operations in the application co...
2018/03/10
1,251
5,111
<issue_start>username_0: I need to fetch two different MongoDB collections (`db.stats` and `db.tables` ) for the same request `req`. Now, in the code below, I am nesting the queries within the callback function. ``` router.post('/', (req, res) => { let season = String(req.body.year); let resultData, resultTable; db....
2018/03/10
1,250
4,955
<issue_start>username_0: I have the following code for, uploading the file using ajax because I don't want to use form action . But I unable to do so. The code is : ``` Select xml file to upload: ``` The ajax code is: ``` $('#upload_xml').on('click', function() { var file_data = $('#uploadFile').prop('files')[0]; ...
2018/03/10
1,673
6,429
<issue_start>username_0: I've just downloaded and installed Android Studio but there is no **Android** submenu in **Tools** menu and no **AVD Manager** icon on the instrument panel. When I start **SDK Manager**, there is an error message: > > Please specify a Android SDK location > > > [SDK Manager screenshot: "...
2018/03/10
631
2,467
<issue_start>username_0: I have read this this post about using lombok `@Bulider` with inheritance <https://reinhard.codes/2015/09/16/lomboks-builder-annotation-and-inheritance/> All works good. But in my case I need also use builder for `Parent class`, and this workaround doesn`t work. I tried add `@Builder` to `Pare...
2018/03/10
824
4,225
<issue_start>username_0: [![](https://i.stack.imgur.com/EOXZf.jpg)](https://i.stack.imgur.com/EOXZf.jpg) ``` FirebaseDatabase.getInstance().getReference("Block").addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { for (DataSnapshot s...
2018/03/10
728
2,380
<issue_start>username_0: First I want to say I am new to R. This problem is frustrating beyond belief. I have tried apply, lapply, and mapply. All with errors. I am lost. What I want to do is take the time from "Results" and place it in the time in "Records" **IF** Records does not have a time (where it is NA). I hav...
2018/03/10
728
2,454
<issue_start>username_0: I just noticed that iterating an array using a while and array\_shift behaves differently from a simple for loop when encounters an empty string. Here's a sample: While loop: ``` $arr=[1, "",1,""]; while ($elm = array_shift($arr)) { var_dump($elm); } ``` For loop: ``` $arr=[1, "",1,""]...
2018/03/10
1,442
4,917
<issue_start>username_0: To explain my problem, I will show you a screenshot of what happens. After that, I will show the storyboard and the code that I use. There are actually two problems, which I think are related. My app UI looks as follows: [![enter image description here](https://i.stack.imgur.com/wUVZ0...
2018/03/10
701
2,521
<issue_start>username_0: I've the below code, where I'm trying to post a sales order transaction, with date and qty, once I', `getting` the day of the transaction date, it is lagging 31 days, and apparently the Dec 1st is considered to be day number 1 in he year!! Anything wrong in my code, or how can I fix it?! ``` i...
2018/03/10
949
3,060
<issue_start>username_0: I need help with my program which I think is almost there. I'm going off the equation {n k} = n! / k!(n – k)!. I'm not sure if I'm calculating it properly. Thanks in advance for the help. ``` #include ``` I'm not sure if declaring my factorial function as a float is messing anything up but...
2018/03/10
983
3,203
<issue_start>username_0: I am attempting to automate some work we are doing. We work on fire alarm systems, and prior to testing we have to demonstrate what will happen in the program prior to testing. So if we hit this smoke detector this will be the result. I am a relatively new coder. The panel programming is in ...
2018/03/10
470
1,658
<issue_start>username_0: The HTML is: ``` Cena 233 zΕ‚ ``` Using BeautifulSoup and CSS selector, how do I access "233 zΕ‚"? I tried: ``` airbnb_soup.select('.hylizj6 span span') ``` but no go, even though ``` airbnb_soup.select('.hylizj6 span') ``` will get "Cena"<issue_comment>username_1: `LocalDate.monthV...
2018/03/10
941
3,558
<issue_start>username_0: Like the title says. If I recall correctly, statement shouldn't return any value, then how could C retrieve the value from a statement? (Yes I know compilers can do that, but that would need a little hack, and not beautiful.) And the increment part of for loop is a expression, which is very co...
2018/03/10
634
1,717
<issue_start>username_0: I have a string like this one: `var s = 'Lorem ipsum dolor sit amet';` I want an array like this one: ``` var l = [3, 3, 3, 1, 2, 5, 4, 1, 2, 1]; var a = ['Lor', 'em ', 'ips', 'u', 'm ', 'dolor', ' sit', 'a', 'me', 't']; ``` The subdivisions do not have the same length. I know a priori th...
2018/03/10
779
3,014
<issue_start>username_0: I have a VS 2017 C# developed Azure Function App deployed on the consumption plan using the VS 2017 Publish mechanism. All functions are timer or Service Bus triggered. I see a status of running in the Azure Portal and the functions appear to be working e.g. writing rows to a SQL Azure database...
2018/03/10
926
2,750
<issue_start>username_0: Is there a way to return the keyword by which the result was found when using multiple or conditions, for example: ``` "SELECT post_id FROM wp_posts WHERE wp_posts.post_content LIKE '%ABC%' OR wp_posts.post_content LIKE '%DEF%' OR wp_posts.post_content LIKE '%GHI%'" ``` This is the orig...
2018/03/10
707
2,430
<issue_start>username_0: Let's say I have a method with the following signature: ``` public string Foo(Expression expression) { ... } ``` Is it possible to call this method directly, without using proxy methods, and if it is, how? As a bonus question (to understand why am I trying to do this), is it possible to...
2018/03/10
847
2,544
<issue_start>username_0: If I make a simple text file such as the following: ``` first line. second line. ``` And apply fread in the following way: ``` $fh = fopen("test_file_three.txt",'r') or die("Error attempting to open file."); $first_word = fread($fh,5); $second_word = fread($fh,6); $third_word = fread($fh,1...
2018/03/10
579
1,943
<issue_start>username_0: ``` import openpyxl, os cwd = os.getcwd() print(cwd) wb = openpyxl.load_workbook('Hello.xlsx') print (type(wb)) sheetNames = wb.sheetnames print(sheetNames[1]) sheet0 = sheetNames[0] print (sheet0['A1']) <--TypeError: string indices must be integers ``` I have tried to use .value at the ...
2018/03/10
792
2,702
<issue_start>username_0: Many other questions address similar issues, but I have yet to find an answer to this specific issue. I am getting the following error: ``` error: β€˜nullptr’ was not declared in this scope ``` When compiling with the following command: ``` g++ -std=gnu++0x file1.cpp file2.cpp file3.cpp file4...
2018/03/10
1,597
4,812
<issue_start>username_0: I have to write a program that has external C files. I originally wrote this program in Visual Studio, but I must now switch to `gcc` on Linux. I included the `.h` file that allows me to call a function in another C file. This works in Visual Studio, but gcc doesn't accept the reference. It bre...
2018/03/10
588
1,979
<issue_start>username_0: I login into my VM login MySQL. I run: ``` mysql -u root -p CREATE USER 'bheng'@'172.16.31.10' IDENTIFIED BY '**********'; GRANT ALL PRIVILEGES ON * . * TO 'bheng'@'172.16.31.10'; FLUSH PRIVILEGES; ``` I see this ``` select User,Host from mysql.user; +------------------+---------------+ |...