date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/18
1,040
3,248
<issue_start>username_0: I have following table in PostgreSQL and need to get all ancestors of person with given ID. It is also necessary to be able to distinguish father and mother from the results. ``` Person table - has about 1M rows, schema looks like this: +-----+--------+--------+ | id | father | mother | +-...
2018/03/18
966
3,107
<issue_start>username_0: I have a ListView with few image items. I want to get the item path (image) when its is clicked in a string and get it into a database as VALUES. Thank you. XML ``` ``` Button Function ``` private void btnRegSucces_Click(object sender, RoutedEventArgs e) { try { ...
2018/03/18
1,001
3,355
<issue_start>username_0: I have an input form that asks a user to enter their name. I have an event listener that listens if the form has been submitted. I am able to access the input the user enters from within a function but after many attempts I have been unable to get the user input to be stored in a global variabl...
2018/03/18
917
2,920
<issue_start>username_0: I'm trying to build a scoreboard in HTML and JS, and I'm wondering is there anyway I can add 2 or 3 event listener to one function for different button? My first thought is using switch statement like: ```js document.getElementById("1").addEventListener("click", score); document.getElementBy...
2018/03/18
904
3,769
<issue_start>username_0: I have three tabs on activity: "camera", "gallery", "added in posts" and I would to make camera fragment whole screen. Screenshots shows everything what i would to do. It is my app: [screenshot](https://i.stack.imgur.com/0XQ8t.jpg) and i would to make it like whatsapp (actionbar is hiding): ...
2018/03/18
1,101
3,773
<issue_start>username_0: I'm trying to block access to my PostgreSQL and allow access only to Localhost and my machine external IP, something like: "172.211.xx.xx". This IP is provided by my ISP (Internet Service Provider). In `postgresql.conf` I set the following line: ``` listen_addresses = '179.211.xx.xx' ``` Bu...
2018/03/18
462
1,575
<issue_start>username_0: I'm programming against a web api that, for some of the fields, only returns them if you specify them in the query. ``` {a:"hello", b:"world", c:"of goo", d:"i am always present"} ``` and I called ``` api.getResponse(["a","b"]) ``` I would get ``` {a:"hello", b:"world", d:"i am always p...
2018/03/18
706
1,848
<issue_start>username_0: When I try to slice a Numpy array (3d), something unexpected occurs. ``` import numpy as np x=np.array( [ [[1., 2., 3., 4., 5.], [6., 7., 8., 9., 0.], [1., 2., 3., 4., 5.], [6., 7., 8., 9., 0.]], [ [11., 12., 13., 14., 15.], [16., 17., 18., 19., 10.], [11., 12., 13., 1...
2018/03/18
1,308
4,339
<issue_start>username_0: I have a float32Array from decodeAudioData method, which I want to convert it to Uint8Array while **preserving the float32 IEEE 754 audio data**. So far I tried, ``` var length = float32Array.length; var emptyBuffer = new ArrayBuffer(length * 4); var view = new DataView(emptyBuffer); for (v...
2018/03/18
1,172
3,427
<issue_start>username_0: I have two lists: ``` a = ['A', 'B', 'C', 'D'] b = ['B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'] ``` I would like to check list A against list B, so that if an item in list A exists in list B, I get a True result, and if not, False. i.e. ``` c = [False, True, True, True] ``` I've tried the f...
2018/03/18
349
1,239
<issue_start>username_0: I need to use method `setStartTimestamp(OffsetDateTime startTimestamp)` but my minSdk is 21 so it shows me `Call requires API level 26`. Is there any way how can I use OffsetDateTime on lower apis?<issue_comment>username_1: `java.time` APIs on Android require API 26. For older API levels you c...
2018/03/18
426
1,493
<issue_start>username_0: I want to do this action: [![enter image description here](https://i.stack.imgur.com/UEo2a.png)](https://i.stack.imgur.com/UEo2a.png) using Heroku CLI. If I have the remote git on my computer I can do `git push my-heroku-remote master` But because my heroku app is already connected to the gi...
2018/03/18
542
1,941
<issue_start>username_0: Sorry if this has been asked before, I have been looking for an answer for hours without success. So, I have a number (it's actually a class object, but for example's sake it may be better to explain using integers): 1, and a list of unique numbers (my number not included). Example: [2, 5, ...
2018/03/18
367
1,309
<issue_start>username_0: I want to delete onAction to dissociate my view and my controller this is the javaFx code : ``` ``` I want to associated id on button with my controller thanks<issue_comment>username_1: I prefer the GitHub auto-deployment over the `git push heroku master` because it works great with a Git...
2018/03/18
466
1,537
<issue_start>username_0: ``` function truncate(str, num) { if (str.length >= num) { if (num > 3) { str.substr(0, num - 3) + '...'; } else { str.substr(0, num) + '...'; } } return str; } console.log(truncate("A-tisket a-tasket A green and yellow basket", 11)); ...
2018/03/18
417
1,560
<issue_start>username_0: I need to implement a function in javascript that runs an async process in the next way: 1. The process will run async checking if a variable is set to true 2. When true, the async process will stop 3. When the variables is set to false, the async process will start again. What is the best ap...
2018/03/18
485
1,838
<issue_start>username_0: Webpack v4 has introduced two sets of defaults: `production` and `development`. My question is: Is there a way to refer to those inside a configuration file? I know I can still pass environment variables as: ``` --env.NODE_ENV=development ``` by doing this I have two independent environment ...
2018/03/18
824
2,719
<issue_start>username_0: I need to write a python code for Shuffle a pack of cards and distribute it among four players. You need to stop the game when someone has 4 hearts and say who is the winner. As im a beginner in python and finished it straight forward way. can anyone give me optimized way to code this ??. here ...
2018/03/18
549
2,178
<issue_start>username_0: I have an application backed by Neo4j database written in python. Does anyone know what is the best approach to unit test my application ? I have found this can be easily done in Java with usage of ImpermanentGraphDatabase. Is there a similar approach in python ? Any tips are appreciated....
2018/03/18
622
2,434
<issue_start>username_0: I have to make a program where we replace any two/three words (in a string) of our choosing (e.g. replace "AWAY FROM KEYBOARD" with "AFK") without using replace, find, translate, or encode. I'm not sure exactly how this would be done. I've managed to be able to do this by replacing one word and...
2018/03/18
1,812
5,633
<issue_start>username_0: I'm using celery (solo pool with concurrency=1) and I want to be able to shut down the worker after a particular task has run. A caveat is that I want to avoid any possibility of the worker picking up any further tasks after that one. Here's my attempt in the outline: ``` from __future__ impo...
2018/03/18
346
1,125
<issue_start>username_0: I'm trying to add a class to using: ``` document.getElementById("sp1").classList.add("fa fa-hand-rock-o"); ``` But it is showing error: > > String contains an invalid character > > ><issue_comment>username_1: The white space between two class name is creating the issue.If need to add ...
2018/03/18
816
2,534
<issue_start>username_0: I want to get one boat item from the `Boat` table only if that boat is not in the `RentBoat` table and has a value on the `IsOnRent` column set to true. This is my code so far: ``` db.Boats.SingleOrDefault(x => !db.RentBoats.Any(s => s.BoatID == x.BoatID && s.IsOnRent == true)); ``` The err...
2018/03/18
1,411
4,191
<issue_start>username_0: I am trying to do a fairly complex (for me) query that will grab a Description field from a Main Table and then append it with titles and values from related Look-Up-Tables. Not all records have records in the Look-up tables. I'll pose further questions as subsequent questions as I go along, bu...
2018/03/18
965
3,855
<issue_start>username_0: I have this odd issue when building a form in design view for an Access (2016) database. I have various fields with a data type of Yes/No. When creating a new form based on this table and dragging in fields from the Field List a text box appears instead of a checkbox. When I right click on the ...
2018/03/18
341
1,155
<issue_start>username_0: I was wondering whether it is possible to change the **FOR** loops to **WHILE** loops using C++. Here is part of the code below. ``` int sum = 0; for (int i = 0; i < length; i++) { sum = sum + MyList[i]; } cout << "The Total is: " << sum < largest ) cout << "The Largest Value is: "...
2018/03/18
273
1,018
<issue_start>username_0: I just deleted all unnecessary files by deleting them in the directory. How do I delete all deleted files with git without individually git rm-ing each of the file names?<issue_comment>username_1: you can also just do "git add ." then all deleted files within the directory get status updated a...
2018/03/18
317
1,113
<issue_start>username_0: I need to load datasource properties from properties file db.properties: ``` url = my_url user = user_name password = <PASSWORD> ``` this is dataSource (camelcontext.xml): I'm trying like this, it is not working. ``` ``` My routes are implemented in java dsl.<issue_comment>username_1: y...
2018/03/18
853
2,382
<issue_start>username_0: So my input values are as follows: ``` temp_dict1 = {'A': [1,2,3,4], 'B':[5,5,5], 'C':[6,6,7,8]} temp_dict2 = {} val = [5] ``` The list `val` may contain more values, but for now, it only contains one. My desired outcome is: ``` >>>temp_dict2 {'B':[5]} ``` The final dictionary needs to on...
2018/03/18
542
1,934
<issue_start>username_0: i'm trying import pygame on anaconda. I have try it by open spyder, type code as follows: ``` import pygame ``` Then something happens as follows: ``` Traceback (most recent call lasat): file "", line 1, in ModuleNotFoundError: No module named 'pygame' ``` I have done some research on go...
2018/03/18
708
2,536
<issue_start>username_0: I've got XML source that I'm trying to catalog with Glue: ``` xml version="1.0"? XML Developer's Guide Computer 44.95 2000-10-01 An in-depth look at creating applications with XML. Gambardella, Matthew ... ``` The book entries are being picked up just fine, but how do I configu...
2018/03/18
1,668
5,302
<issue_start>username_0: I have been working for some functionality in checkboxes, but this makes me bit confused when changing the styles of checkbox. I tried setting the color to the checkbox after clicked, but not worked. ``` .container input:checked ~ .checkmark:after { display: block; color: #000 !import...
2018/03/18
1,027
4,476
<issue_start>username_0: I have been working on machine learning problems lately as part of my internship. So far I have been using Tensorflow with python because that's what I am most comfortable with. Once a problem is solved using deep learning, I am left with the architecture of the network and the weights. Now, my...
2018/03/18
643
2,231
<issue_start>username_0: I really can't find out what i'm doing wrong! ```js setInterval(function() { var time = document.getElementById("timer").innerHTML; var x = time * 1000 - 400; setTimeout(function() { var x2 = document.getElementById("2x-total").innerHTML; ...
2018/03/18
3,206
9,243
<issue_start>username_0: I was trying to retrieve a file from SFTP server - while connecting to this SFTP works with FileZilla - SFTP method. For JSch I have tried this code using JSch ``` JSch jsch = new JSch(); Properties config = new Properties(); config.put("StrictHostKeyChecking", "no"); config.put("PreferredAu...
2018/03/18
387
1,332
<issue_start>username_0: I have two classes that are defined in different ways like below: ``` template class Stack { T data[N]; }; template // Both defaulted class Stack { T data[N]; }; ``` I want to know if these are two different ways to define a class, or do they have a different meaning?<issue_comment>usern...
2018/03/18
454
1,693
<issue_start>username_0: I'm new in Ionic and i try to use the ion-select dynamically with preselect option. I just want edit my profile with some value. In this example i can set multiple language that the user can speak. First i get all languages set in my database with my API and i set my result in var LanguagesDa...
2018/03/18
777
3,070
<issue_start>username_0: The exact warning I get is ``` warning C4715: "spv::Builder::makeFpConstant": not all control paths return a value ``` and `spv::Builder::makeFpConstant` is ``` Id Builder::makeFpConstant(Id type, double d, bool specConstant) { assert(isFloatType(type)); switch (getScalarTy...
2018/03/18
803
2,743
<issue_start>username_0: So, I'm attempting to fork some open source code and upon compilation I am greeted with these errors: > > C2039 'TransactionId': is not a member of 'CryptoNote' > > > C2061 syntax error: identifier 'TransactionId' > > > I'm relatively inexperienced with `C++` usually confining myself to...
2018/03/18
597
2,142
<issue_start>username_0: For my public google bucket I used ``` img src="https://storage.cloud.google.com/[bucketname]/[innerpath]/[filename]" ``` it was very handy because I only needed "inner path" and filename to make "full image url", but turns out its only working when you signed with Google Acccount. Is ther...
2018/03/18
1,815
5,750
<issue_start>username_0: I am trying to save JSON data into my Class. I've tried different ways but didn't succeed. Here is my class: ``` class YoCurrency { public string Currency { get; set; } public double high { get; set; } public double low { get; set; } public double avg { get; set; } public d...
2018/03/18
1,102
3,240
<issue_start>username_0: Alright so I stuck on the code reading docs. Iam starting with JS so go easy one me =]. I've got and array calld `Area` which contains few arguments ``` let Area = ["Kanig Village", "Fort Chune", "Shadowy Heights", ...]; ``` I cannot change this array till specific part of my code is execut...
2018/03/18
1,298
3,990
<issue_start>username_0: I'm building small SPA web app with react, react router and semantic. Problem appeared when I decited to move my routes from main .jsx to separate file. I wanted to create something similar to [this](https://alligator.io/react/react-router-map-to-routes/) and theoretically everything works well...
2018/03/18
386
1,371
<issue_start>username_0: To play/pause an audio file on Web page I am currently using two different buttons one for playing the audio and the other for pausing the audio. Here is the code I am using : ``` Play Pause ``` Javascript : ``` var song=document.getElementById("ad"); function playSong() { song.play(); }...
2018/03/18
1,032
3,101
<issue_start>username_0: I am working on a project where I have to loop through large arrays (lists), accessing each item by index. Usually this involves checking each element against a condition, and thereafter potentially updating its value. I've noticed that this is extremely slow compared to, for example, doing a...
2018/03/18
1,003
3,499
<issue_start>username_0: When I click on the Signup button I receive the following error: Array to string conversion. I think that the error occurs when I call `fileInput()` method but i don't know how to solve it. This is the partial code of the view ``` php $form = ActiveForm::begin(); ? = $form-field($model, 'us...
2018/03/18
489
1,757
<issue_start>username_0: So, I am getting a dynamic URL which I want to open in new tab. PS: I am currently writing this in content script. for example ``` var newURL = document.querySelectorAll("a")[lengthA].href ``` I want to open this in new tab. In javascript, We simple do window.open to open URL in new t...
2018/03/18
575
2,209
<issue_start>username_0: I'm invoking a function like below and understand this is why im getting this error. Is there a way to not invoke the function but still pass the event property? ``` onMouseOver={(event) => { this.moveBall(event) }} ``` The reason for wanting to do this is so I can do a check in the function...
2018/03/18
901
2,635
<issue_start>username_0: I can't get connection chain with ssh one liner to work. Chain: My PC -> jumphost -> Bastion -> my app X host(sharing subnet with Bastion) -Jumphost expect private key A -Bastion and X host both expect private key B ``` my pc> ssh -i /path_to_priv_key_for_X/id_rsa -o StrictHostKeyChecking=...
2018/03/18
610
2,069
<issue_start>username_0: I am trying to create an Interface called `IService` and have an instance of it created in the constructor of my `MainViewModel`, similar to how we pass `IRegionManager` in prism, i.e like this: ``` public MainViewModel(IService service, IRegionManager regionManager) { _service = service; ...
2018/03/18
298
1,207
<issue_start>username_0: everybody, I am relatively new to SQL and I am currently testing my database tables using Oracle Live SQL. I have a table called Customer and a table called Contact. Within the Contact table, I am trying to add a FOREIGN KEY constraint of the Customer\_ID column into my Contact table, but keep ...
2018/03/18
713
2,458
<issue_start>username_0: I have a react front-end with an express back end. The express just serves the static build files from the react side in production. I was having a problem with React routing working in production, as many have had, so I fixed it as so: server.js: ``` app.get('/*', function (req, res) { re...
2018/03/18
881
3,418
<issue_start>username_0: I know this is not an usual requirement, but is it possible to create a role based authorization system using React Navigation? If yes, is there a complementary tool to achieve that? Or can this be made using only React Navigation?<issue_comment>username_1: There are a lot of ways to do authori...
2018/03/18
833
3,419
<issue_start>username_0: I'm a bit confused on how to use closures or in my case a completion block effectively. In my case, I want to call a block of code when some set of asynchronous calls have completed, to let my caller know if there was an error or success, etc. So an example of what I'm trying to accomplish mig...
2018/03/18
690
2,670
<issue_start>username_0: I am mining data from a website through Data Scraping in Python. I am using `request` package for sending the parameters. Here is the code snippet in Python: ``` for param in paramList: data = get_url_data(param) def get_url_data(param): post_data = get_post_data(param) h...
2018/03/18
544
2,093
<issue_start>username_0: Here is a basic class I have set up to calculate earnings with stocks. Focus on the "Stock" constructor here: ``` public class Stock{ private String symbol; private int totalShares; private double totalCost; public void Stock(String symbol){ this.symbol = symbol; ...
2018/03/18
1,384
5,083
<issue_start>username_0: I am trying to create a subclass of javascript's Array. I want to initiate subclass with array-type argument and add a method to remove an element from the array (subclass). My code looks like this: ```js class CustomArray extends Array { constructor(array) { console.log('Initiating ...
2018/03/18
593
1,882
<issue_start>username_0: It's really basic stuff but it gets on my nerves; Why this code doesn't work properly? ``` for i in range(0, 101): if i % 3 == 0 and i != 0: print '{} Three'.format(i) elif i % 5 == 0 and i % 3 == 0 and i != 0: print '{} FiveThree'.format(i) else: print "{}".format...
2018/03/18
1,018
2,801
<issue_start>username_0: **This** is for anyone if they are looking for a solution of such kind of a problem. I will try to explain the problem here and put the answer after that. **Question** I have `two csv` files (`file1.csv` and `file2.csv`): in which `cookieid` column is common in both. When I load it in dataf...
2018/03/18
955
2,975
<issue_start>username_0: I'm new to dynamoDB and I'm trying to write some data to the table using Lambda. So far I have this: ``` 'AddFood': function () { var FoodName = this.event.request.intent.slots.FoodName.value; var FoodCalories = this.event.request.intent.slots.FoodCalories.value; console.log('Fo...
2018/03/18
854
2,314
<issue_start>username_0: Every time I try to launch my project I get this error: `$ ng serve` > > Your global Angular CLI version (1.7.3) is greater than your local > version (1.6.8). The local Angular CLI version is used. > > > To disable this warning use "ng set --global > warnings.versionMismatch=false". > ...
2018/03/18
1,026
4,397
<issue_start>username_0: We are working on a system that is supposed to 'run' jobs on distributed systems. When jobs are accepted they need to go through a pipeline before they can be executed on the end system. We've decided to go with a micro-services architecture but there one thing that bothers me and i'm not sur...
2018/03/18
1,565
5,570
<issue_start>username_0: I've learned that there are 4 kinds of types in method reference. But I don't understand the difference between "***Reference to a static method***" and "***Reference to an instance method of an arbitrary object of a particular type***". For example: ``` List weeks = new ArrayList<>(); wee...
2018/03/18
1,193
2,917
<issue_start>username_0: Suppose I have the following data frame in Spark Scala: ``` +--------+--------------------+--------------------+ |Index | Date| Date_x| +--------+--------------------+--------------------+ | 1|2018-01-31T20:33:...|2018-01-31T21:18:...| | 1|2018-01...
2018/03/18
1,316
5,099
<issue_start>username_0: my issue i am having is that selenium is saying that the **next arrow button** is enabled when it is disabled/grayed out. what i am trying to do is this 1 click next arrow button 2 sleep for 5 seconds 3 check if disabled 4 click next arrow button 5 check if disabled ( loop repeat steps 1 -5) ...
2018/03/18
741
2,723
<issue_start>username_0: I am getting the > > Sorry, the page you are looking for could not be found. > > > On Laravel 5.5. I am sure I'm missing something very small. But not sure what it is because I'm a laravel learner. Please see below: ROUTE ``` Auth::routes(); Route::get('/curriculum-sections','Curricu...
2018/03/18
367
1,304
<issue_start>username_0: I am trying to learn C++. Currently I ran into a tutorial, which mentioned how to create a constant sized vector like this: `vector v(10);` Now I'm wondering how to create a constant sized vector of constant sized vectors, something like: `vector (10)> v(10);` This code doesn't work, so I wan...
2018/03/18
754
2,831
<issue_start>username_0: How do I do rake style commands in my test file (Jest) with sequelize seeder files? I'm trying to do the same thing as this, but with sequelize. ``` describe('routes : movies', () => { beforeEach(() => { return knex.migrate.rollback() .then(() => { return knex.migrate.latest(); }) ...
2018/03/18
673
2,564
<issue_start>username_0: I've created an account in Firebase using phone authentication. However, from the documentation, it mention that: > > If you use phone number based sign-in in your app, you should offer it > alongside more secure sign-in methods, and inform users of the > security tradeoffs of using phone n...
2018/03/18
277
911
<issue_start>username_0: I have a custom dropdown with some text options, and I need to set a fixed height. Seems simple enough, I added `max-height` and `overflow-y: scroll`. It works great! but on Chrome on device mode, with big resolutions it blurs the text. I made a pen that shows this. <https://codepen.io/a40637f...
2018/03/18
149
556
<issue_start>username_0: I looked into go list but couldn't find a flag that does this. <https://golang.org/pkg/math/> has a Round function but it's not found in my local install.<issue_comment>username_1: golang.org always documents the latest released version of Go. See <https://golang.org/doc/devel/release.html> for...
2018/03/18
878
3,763
<issue_start>username_0: I have been using Jmeter for performance testing my web application. I have recorded the jmeter script by excluding js,css and other static content files. While running the script, Jmeter doesnt execute javascript files so ajax XHR request are not sent. To overcome this i have recorded the scr...
2018/03/18
930
3,414
<issue_start>username_0: I'm writing a simple program which receives integer inputs from a Scanner object, determines whether it's a palindrome or not, and returns the boolean value. For most numbers, it works well. However, at this code snippet: ``` private static void programRunner() { System.out.print("Insert ...
2018/03/18
466
1,550
<issue_start>username_0: I have an assignment to count all the changes from all the files from a git open-source project. I know that if I use: ``` git log --pretty=oneline | wc -l ``` I will get the number of changes of that file ( I use git bash on Windows 10) My idea is to use ``` find . ``` and to redirect...
2018/03/18
677
2,564
<issue_start>username_0: I have this in my route.ts ``` path: 'profile/:id', component: ProfileComponent, canActivate: [SiteRouteGuard], children: [ { path: 'albums', component: AlbumsComponent, ...
2018/03/18
733
3,001
<issue_start>username_0: I've created a new WinForms project in Visual Studio 2017. Then I've added a button and textbox to Form1 ([screenshot](https://i.stack.imgur.com/QjHal.png)). Code: ``` using System; using System.Net; using System.Windows.Forms; namespace TestWinForms { public partial class Form1 : Form ...
2018/03/18
363
889
<issue_start>username_0: Consider a vector `x`: ``` set.seed(123) x <- rnorm(100) ``` We can get the order of `x` and the ordered `x` with: ``` y <- order(x) z <- x[y] ``` If I only kown `y` and `z`, how can I get original `x`?<issue_comment>username_1: EDIT: The old solution (to the original question) is: ``` s...
2018/03/18
856
3,159
<issue_start>username_0: Suppose I have the following function, `doWork`, that starts some work in a goroutine and returns a `Result` to check for completion and error: ``` func doWork() *Result { r := Result{doneCh: make(chan struct{})} go func() { var err error defer func() { r.e...
2018/03/18
336
963
<issue_start>username_0: I have question to regarding a query I am writing: I have two different (columns) data sets which I want to combine the result of, for instance: ``` Set 1: Set 2: 1 A 2 B 3 C ``` I want to create a query with the result: ``` resultset:...
2018/03/18
958
3,375
<issue_start>username_0: i am trying to implement the datepicker using the django bootstrap datepicker widget, but the datepicker is not showing on the webpage ("welcome.html) i have passed the form to the views and called the form in the webpage any help will be appreciated **forms.py** ``` class DateForm(forms.Form...
2018/03/18
754
2,848
<issue_start>username_0: I am getting below sample json data as input, ``` var JSONDATA = { "MainNode": { "_attributes": { "class": "ABC", "projectclass": "MyProject", "prjname": "PrjName", "enabled":"true" }, ...
2018/03/18
1,210
4,216
<issue_start>username_0: in my table I have an attribute called 'messages' with this exact data type: ``` ARRAY, id STRING, message STRING>> ``` and I have defined a UDF named my\_func() Because UDF function in Big Query don't support the type DATETIME I need to cast the attribute created\_time. So I tried this: ...
2018/03/18
1,276
4,290
<issue_start>username_0: I'd want a query to fetch all columns of a tuple according to a column's lowest value in the table: ``` SELECT *, MIN(Opened) FROM Account ``` And for some reason this throws an error: > > ORA-00923: FROM keyword not found where expected > > > This is basic stuff in my opinion, coming ...
2018/03/18
953
3,589
<issue_start>username_0: I have a HashMap of Products. Each Product has a Price. I know how to find the Product with the max Price. But using Java 8 Streams is really puzzling me. I tried this but no luck: ``` public Product getMostExpensiveProduct(HashMap items) { Product maxPriceProduct = items.entrySet() .stream...
2018/03/18
430
1,565
<issue_start>username_0: I did some research and there are many questions about changing src of an image in JavaScript. However I want to change src of three images when clicking on button at once. HTML: ``` * [Shoes](#!) * [T-shirts](#) ![](img/t-shirt.jpg) ![](img/hoodie.jpg) ``` JavaScript: ``` function chang...
2018/03/18
386
1,382
<issue_start>username_0: I need my web application to behave as a native mobile app. For this I needed to prevent pinch-to-zoom and double tap zooming on all browsers. In Chrome and Firefox it was easy: ``` ``` On Safari its a challenge. [Here](https://stackoverflow.com/a/38573198/8864418) I found how to prevent pin...
2018/03/18
488
1,790
<issue_start>username_0: Porting code over from VS for Windows to VS for MAC. Part of one function opens a file using File.Open (System.IO) with a string that, on windows at least, would provide the absolute path and file to open. The same code (on VS for MAC seems to bolster the string to include the path to the curre...
2018/03/18
727
2,842
<issue_start>username_0: I am trying to fetch the records from an API but it returns unsuccessful response when I am using the below code. But at the same time, it is giving me proper response with status code 200 in postman. Here is my code. Please help: ``` import React, {Component} from "react"; const urlEndPo...
2018/03/18
611
2,268
<issue_start>username_0: I'm using the django-filter package. My page displays all books. I have 5 genres. I want someone to be able to click a "scary" button, and have that filter my book list (user shouldn't have to also click "submit", just the genre button). But right now when I click a genre button, it doesn't f...
2018/03/18
457
1,743
<issue_start>username_0: I am trying to push my code to the beanstalk but I am getting an error when I hit the `eb create` command ``` WARNING: You have uncommitted changes. Starting environment deployment via CodeCommit Could not push code to the CodeCommit repository: ERROR: CommandError - An error occurred while ha...
2018/03/18
445
1,591
<issue_start>username_0: I am trying to launch a debug session for my react-native app inside vscode (I have setup a debug configuration in the ./vscode/launch.json file which has been working fine until a few days). 1. I start the debug session from the debug dropdown and I select the "expo" configuration: [![enter ...
2018/03/18
872
3,181
<issue_start>username_0: I am trying to ignore case sensitivity on a string. For example, a user can put "Brazil" or "brasil" and the fun will trigger. How do I implement this? I am new to Kotlin. ``` fun questionFour() { val edittextCountry = findViewById(R.id.editTextCountry) val answerEditText = edittextCount...
2018/03/18
941
3,610
<issue_start>username_0: I want to add status field to error response, so instead of this: ``` { "errors": [ { "message": "Authentication credentials were not provided", "locations": [ { "line": 2, "column": 3 } ] } ], "data": { "viewer": null }...
2018/03/18
1,746
5,066
<issue_start>username_0: I am trying to get some encrypted connection parameter from s3 bucket in my sample Spring application. Here is the method I am using to run inside a container: ``` public void encryptionOnly_KmsManagedKey() throws NoSuchAlgorithmException { AmazonS3Encryption s3Encryption = AmazonS3Encry...
2018/03/18
810
2,536
<issue_start>username_0: How is it that you would create a tensorflow vector from a tensorflow constant/variable etc? For example I have a constant `x` and I want to create a vector which is `[x]`. I have tried the code below and it doesn't work. Any help would be appreciated. ``` x = tf.placeholder_with_default(1....
2018/03/18
386
1,435
<issue_start>username_0: I have a "sign up" button. When it is clicked, I would like for it to render a new component, called "SignUp". I would like for the new component to replace the "sign up" button. Currently, I am using setState so that when the button is clicked, a new component is rendered. However, the butto...
2018/03/18
1,559
5,362
<issue_start>username_0: If a module `A` relies on module `B` and module `B` is upgraded, `A` may break due to changes. My idea is to retest both `A` and `B` after upgrading `B`. I think the easiest way is just to retest everything that can be retested: download every installed module from CPAN and execute its test sc...
2018/03/18
2,223
5,257
<issue_start>username_0: I have a file with mixed delimiters `,` and `/`. When I import it into SAS with the following data step: ``` data SASDATA.Publications ; infile 'R:/Lipeng_Wang/PATSTAT/Publications.csv' DLM = ',' DSD missover lrecl = 32767 firstobs = 3 ; input pat_publn_id :2...
2018/03/18
375
1,425
<issue_start>username_0: I'm trying dynamically to add additional text to html. I get the text but it's not in h3. Any ideas why? ``` let brElement = document.createElement("br"); let pickCategory = document.createElement("div"); let h3Element = document.createElement("h3"); let newPick = document.crea...
2018/03/18
259
853
<issue_start>username_0: my main menu is aligned in left I want to move my main menu items in the center of the page.I'm using protostar template.<issue_comment>username_1: Assuming you are using Joomla 3.5 or later, create a file at: `templates/protostar/css/user.css` if it doesn't already exist and add the following ...