date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/19
2,307
7,905
<issue_start>username_0: Hi everyone I am new to Python and have been trying out how to create lists within lists containing multiples from 1 to 4, with each of them containing the same number of multiples as the number they are being multiplied with. In particular, applying the use of `lambda` and `map` function. ``...
2018/03/19
769
2,039
<issue_start>username_0: Given the DataFrame: ``` import pandas as pd df = pd.DataFrame([6, 4, 2, 4, 5], index=[2, 6, 3, 4, 5], columns=['A']) ``` Results in: ``` A 2 6 6 4 3 2 4 4 5 5 ``` Now, I would like to sort by values of Column A AND the index. e.g. ``` df.sort_values(by='A') ``` Returns ```...
2018/03/19
1,440
3,884
<issue_start>username_0: I am having a hard time in finding a way to filter this array by id value, and generate a new one preserving coords with it's filter. Array example: ``` var herbs =[ { "coords":[3300,2796],"items":[ {id: "dandelion",qty: 72}, {id: "sage",qty: 4}, {id: "valerian",qty: 1}, ]}, { "coords":[3300,...
2018/03/19
2,970
8,114
<issue_start>username_0: I'm trying to learn R, and I decided to figure it out by building a thing to read the live election results that my state puts up on election night. Unfortunately, I've hit a snag in computing a `Margin` value to use for map fills. My state (WA) uses a Top 2 primary, which means that in some ra...
2018/03/19
1,328
5,067
<issue_start>username_0: I'm using Redux-Saga in a React Native app. When I get the authentication token back from the server, how do I save it to local storage? I tried using `await AsyncStorage.setItem("token", token);` but React Native complained and said `await` was a reserved word. Am I misunderstanding some...
2018/03/19
1,033
3,886
<issue_start>username_0: Researching this has been a little difficult due to I'm not precisely sure how the question should be worded. Here is some pseudo code summarizing my goal. ``` public class TestService { Object someBigMehtod(String A, Integer I) { { //block A //do some long database ...
2018/03/19
1,088
3,574
<issue_start>username_0: I am a Common Lisp beginner, but not so in C++. There's a simple C++ program that I am trying to mirror in CL (see [Pollard's Rho algorithm variant example in C++](https://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm#Variants) ). The C++ program runs without errors. One requirement is that a...
2018/03/19
1,938
14,879
<issue_start>username_0: I have implemented the logic for this problem but it succeeds only for smaller strings and time limit exceeds as well as the memory usage is very high for larger string inputs ( as below ). My intent is to implement the problem in the same approach as I did below but with possible enhancements....
2018/03/19
387
1,260
<issue_start>username_0: I would like to check them in one line code. Is it possible? Otherwise, the code I have currently is: ``` while True: player_number = int(input('Determine first player Random(0) or AI(1):')) player_number2 = int(input('Determine second player Random (0) or AI (1):')) if player_num...
2018/03/19
751
2,614
<issue_start>username_0: In Access VBA, I am trying to print the values of a parsed Parameter array but keep getting a Runtime Error 13 - Type Mismatch. The values in the array are mixed types i.e. Double, String, Long. Code as follows: ``` Function MyArray() as Variant Dim MyParams(2) as Variant MyParams(0) = "3459...
2018/03/19
831
3,137
<issue_start>username_0: I have been trying to figure out how to find a Gridlayout in a fragment using findViewById. I've looked everywhere and am surprised to not have found this instructed by anyone in a similar situation of mine. I have used a tab layout in android studios, the tabs are different fragments, and with...
2018/03/19
290
1,069
<issue_start>username_0: i don't know how to customize a calendar view to be the same as the picture for my application. Here is my example picture. [![enter image description here](https://i.stack.imgur.com/sjRyr.png)](https://i.stack.imgur.com/sjRyr.png)<issue_comment>username_1: Yes u can define a custom calender v...
2018/03/19
2,000
7,387
<issue_start>username_0: ``` let message = "heY, WHAt are you dOING?"; let count_changes = 0; let isLetter = (letter) => { if (('a'<=letter && letter >='z') || ('A'<=letter && letter >='Z')) { return letter; } else { return -1; } } for(let i = 0; i <= message.length; i++) { if (isLetter...
2018/03/19
612
2,081
<issue_start>username_0: Every time I change any of the settings in VSCode, the command plate to come up with "null password (Press 'Enter' to confirm or 'Escape' to cancel)". Hitting enter is enough to make things work fine, however, it is still annoying. I am not sure of the reason behind this and was wondering if an...
2018/03/19
1,195
4,271
<issue_start>username_0: I currently have a list hard coded into my python code. As it keeps expanding, I wanted to make it more dynamic by reading the list from a file. I have read through many articles about how to do this, but in practice I can't get this working. So firstly, here is an example of the existing hardc...
2018/03/19
462
1,390
<issue_start>username_0: Based on the Google Form input I have the following data collected from the user ``` +-------+--------+--------+--------+ | Name | Col1 | Col2 | Col3 | +-------+--------+--------+--------+ | name1 | | | 1 | | name2 | 3 | | | | name3 | | 2 ...
2018/03/19
534
1,761
<issue_start>username_0: I'm using jQuery to create a to-do list and centered everything on the page using `text-align: center` with body in my CSS file. But how can I left-align newly added list items below the form? Here's the JavaScript portion of the code I'm currently using (my guess is this is what I'd need to c...
2018/03/19
1,041
3,010
<issue_start>username_0: I'm using *ionic 3.2* and angular, for install `HTTP` (<https://ionicframework.com/docs/native/http/>) I use this commands: ``` ionic cordova plugin add cordova-plugin-advanced-http npm install --save @ionic-native/http ``` In script `autenticar.ts` I added the `import { HTTP } from '@ionic-...
2018/03/19
1,300
4,249
<issue_start>username_0: I'm very new to web development so have mercy with your responses. I have a grid of images that I want to modify. When the mouse hovers over an image, I want an overlay with text to appear over the image (this may require the cell in the grid to expand to contain all the text). When the ima...
2018/03/19
764
2,578
<issue_start>username_0: I am having a problem with my D3 code. ``` const hexagon = this.hexagonSVG.append('path') .attr('id', 'active') .attr('d', lineGenerator(hexagonData)) .attr('stroke', 'url(#gradient)') .attr('stroke-width', 3.5) .attr('fill', 'none') const totalLength = (hexagon).node().getTotalLength(...
2018/03/19
1,046
3,602
<issue_start>username_0: I am using `split()` and `split(" ")` on the same [string](http://www.ccs.neu.edu/home/vip/teach/Algorithms//7_hash_RBtree_simpleDS/hw_hash_RBtree/alice_in_wonderland.txt). But why is `split(" ")` returning less number of elements than `split()`? I want to know in what specific input case this ...
2018/03/19
510
1,762
<issue_start>username_0: Can't get my SQL `LIMIT` to work: ``` $sql = mysqli_query($conn, "SELECT url, code, count FROM zipit WHERE uid='".$uid."' LIMIT '".$this_page_first_result."','".$results_per_page."'"); ```<issue_comment>username_1: Try this: ``` $sql = mysqli_query($conn, "SELECT url, code, count FROM zipit ...
2018/03/19
744
2,460
<issue_start>username_0: I have 2 different tables and I want to make them in one drop down list, Is this possible? this for my dropdownlist Controller. I added some items because that items are not in table. ``` var engineer = (from x in up5.V_Pekerja.Where(x => x.KodeBagian == "E15320" && x.NamaJabatan....
2018/03/19
837
3,003
<issue_start>username_0: I have four cells in a table (UITableView), the first and second cells take me to a "ViewController" and with the following code works perfectly for me. ``` func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let segueIdentifier: String switch indexPath.row...
2018/03/19
876
2,840
<issue_start>username_0: I just want to have a loading animation with grayed-out background upon clicking TestLoading button. But I can't get it right. The loading gif is slightly in the left side but I want it in the center. Also grayed-out background is not working. Here's my css: ``` .divLoader { margin: 0px; ...
2018/03/19
698
2,205
<issue_start>username_0: I have the following string: ``` my_string = '1) ServerName sn = ProtobufUtil.toServerName(request.getServer());\\n2) String msg = "Region server " + sn +\\n3) " reported a fatal error:\\\\n" + errorText;\\n4) LOG.error(msg);' ``` I need to convert that string into a list split by symbol `\...
2018/03/19
1,211
2,906
<issue_start>username_0: I have dictionary by the name of temp ``` dict_items([('/history/apollo/', ['6245', '6245', '6245', '6245', '6245', '6245', '6245', '6245']), ('/shuttle/countdown/', ['3985', '3985', '3985', '3985', '3985', '3985', '3985', '-', '-', '-', '0', '3985', '4247', '3985', '3985', '3998', '0', '3985...
2018/03/19
510
1,480
<issue_start>username_0: I have database like below: ``` WITH TB AS( SELECT 1 NONB FROM DUAL UNION ALL SELECT 89 NONB FROM DUAL UNION ALL SELECT 193 NONB FROM DUAL ) SELECT * FROM TB ``` I want change column NONB `to_char(NONB)` and display zero before the number like below. > > 001 > > > 089 > ...
2018/03/19
836
2,803
<issue_start>username_0: When I save a python source code file, I want to re-run the script. Is there a command that works like this (sort of like nodemon for node)?<issue_comment>username_1: While there are probably ways to do this within the python ecosystem such as watchdog/watchmedo ( <https://github.com/gorakhargo...
2018/03/19
902
3,078
<issue_start>username_0: In a `NSAttributed` type statement, I want to keep the existing attributed value and give it a new attributed value. The problem is that `replacingOccurrences` is only possible for string types, as I want to give a new value every time the word appears in the entire sentence. If I change `N...
2018/03/19
1,364
4,323
<issue_start>username_0: I am running tomcat on RHEL 7 machine with 1GB RAM. I have setup tomcat and java both to have Xmx=1G and below statements support that, > > [root@ip-172-31-28-199 bin]# java -XX:+PrintFlagsFinal -version | grep > HeapSize Picked up \_JAVA\_OPTIONS: -Xmx1g > uintx ErgoHeapSizeLimit = 0 {prod...
2018/03/19
1,352
3,784
<issue_start>username_0: I have some unix times that I convert to timestamps in `sparklyr` and for some reasons I also need to convert them into strings. Unfortunately, it seems that during the conversion to string `hive` converts to EST (my locale). ``` df_new <- spark_read_parquet(sc, "/mypath/parquet_*", ...
2018/03/19
1,005
3,264
<issue_start>username_0: I was trying to write a function that took in N bytes of little endian hex and made it into an unsigned int. ``` unsigned int endian_to_uint(char* buf, int num_bytes) { if (num_bytes == 0) return (unsigned int) buf[0]; return (((unsigned int) buf[num_bytes -1]) << num_byte...
2018/03/19
508
1,985
<issue_start>username_0: I'm doing what I would have expected to be a fairly straightforward query on a modified version of the imdb database: ``` select primary_name, release_year, max(rating) from titles natural join primary_names natural join title_ratings group by year having title_category = 'film' and year > 198...
2018/03/19
865
3,042
<issue_start>username_0: I made an app with Construct 2 and I exported to Intel XDK. Then I exported to cordova and everytime I try to build with "cordova build android" I get this error: ERROR: In FontFamilyFont, unable to find attribute android:t tcIndex FAILED FAILURE: Build failed with an exception. * What went...
2018/03/19
1,198
3,773
<issue_start>username_0: I'm having a hard time trying to figure this out. New to coding. I'm trying to read a .txt file, tokenize it, pos tag the words in it. Here's what I've got so far: ``` import nltk from nltk import word_tokenize import re file = open('1865-Lincoln.txt', 'r').readlines() text = word_tokenize(f...
2018/03/19
617
1,875
<issue_start>username_0: In Google Sheet, I have a list of name ``` +-------+ | Name | +-------+ | name1 | | name2 | | name3 | +-------+ ``` And then I have a list of attendance ``` +-------+ | Name | +-------+ | name1 | | name3 | +-------+ ``` I would like to generate a list that didn't attend the event ``` +...
2018/03/19
605
2,064
<issue_start>username_0: I'm having a hard time figuring out a solution to this situation. I need assistance, I am trying to disable the send button if my fields are not filled using a textwatcher. Here is part of the code: ``` public class Main5Activity extends AppCompatActivity { TextView shoppinglist, fullnam...
2018/03/19
742
3,024
<issue_start>username_0: I am trying to pass props and functions from a parent to a child component in React. However, when I try to call the function in the child component, I receive the error: "**Uncaught TypeError: Cannot read property 'bind' of undefined**". This would suggest that the function created in the pa...
2018/03/19
489
1,485
<issue_start>username_0: I am following this tutorial to publish a topic to Pub/Sub from a golang project and here's the code I have for that project at the moment: ``` package main import "cloud.google.com/go/pubsub" import "fmt" func main() { fmt.Printf("hello, world\n") } ``` All it does is simply imports t...
2018/03/19
1,102
2,657
<issue_start>username_0: I'm implementing an algorithm to get the factorial of a certain number for a programming class. ``` fn factorial(number: u64) -> u64 { if number < 2 { 1 } else { number * factorial(number - 1) } } ``` When I tried with 100 or even with 25 I get this error `"thread...
2018/03/19
419
1,474
<issue_start>username_0: I want a regex to match something like `_Hello_` or `_Hell No_` So the requirements are `_` on both sides and some text in between. However the text cannot start with or end with whitespace (they can however contain whitespace inside the text). I have tried `_[\S]+.*[\S]+_` but this fails to ...
2018/03/19
459
1,523
<issue_start>username_0: The following code is using page control to display images. I would like to use the same loop to display a single element of the array on each page. Right now the code displays a,b,c on all of the pages. I want it to display just one letter so page 1 a page 2 b etc. ``` @IBOutlet var lz: UILa...
2018/03/19
360
1,125
<issue_start>username_0: As you can see in my website: <http://erdemcalikoglu.cf/> I have the menu on the top of the screen but my problem is: when I press the 2nd and the 4th button the conten is not centered. Can you help me with that please?[I want this when I press the SERVICES button on menu](https://i.stack.imgur...
2018/03/19
293
940
<issue_start>username_0: Saw this question in an interview repository. Is there a way for it to be done? My guess is, it is a trick question. There is no way to do it in constant space , as strings are immutable.<issue_comment>username_1: You did not provide enough info but by using Inspect Element, you need to add a ...
2018/03/19
841
2,800
<issue_start>username_0: I have a C# .NET program (4.7.1) which I want to use the default system proxy if one is available. When I put the following code in my App.Config file: ``` xml version="1.0" encoding="utf-8"? ... rest of the file ``` The application crashes on startup in KERNELBASE.dll with no error and e...
2018/03/19
411
1,619
<issue_start>username_0: Hi I am currently having an error that says illegal string offset and i already searh here I just know that you get that warning if you are treating a string as if it is an array but I am certain that I am using it as an array can anybody help me thanks ``` $data2 = array('EquipmentName' => $t...
2018/03/19
481
1,954
<issue_start>username_0: When I copy java Code A to a Kotlin project in Android Studio 3.01, the Code A is converted to Code B automatically. And I add `override` for `fun override onMenuItemClick(item: MenuItem)` in Code B by the hint of Android Studio 3.01. But I get still the error "Expecting member declaration" i...
2018/03/19
298
817
<issue_start>username_0: I want to create the following function ``` Left_padded(n, width) ``` That returns, for example: ``` Left_padded(6, 4): ' 6' #number 6 into a 4 digits space ``` ``` Left_padded(54, 5) ' 54' #number 54 into a 5 digits space ```<issue_comment>username_1: You can use [`rjust`](https://...
2018/03/19
1,183
3,021
<issue_start>username_0: Apologies, I'm very new to unix. I've searched for the answer, but to be honest would probably not recognise it at this stage of my unix journey. I have a tab-delimited file (large - 800 columns by 5000 rows). I would like to change a word to a number every time that word is found, but only w...
2018/03/19
2,608
9,665
<issue_start>username_0: I'm trying to use TypeScript's compiler API to perform very basic type inference, but I couldn't find anything helpful from the documentation or google search. Essentially, I want to have a function `inferType` that takes a variable and return its inferred definition: ``` let bar = [1, 2, 3...
2018/03/19
2,854
10,101
<issue_start>username_0: ``` let nums = [-1, 50, 75, 200, 350, 525, 1000]; nums.every(function(num) { console.log(num < 0); }); ``` *true* *=> false* --- When I run this code in <https://repl.it/@super8989/BraveFunctionalSale>, this returns "true" then "=> false". According to .every() description, the return...
2018/03/19
2,609
9,592
<issue_start>username_0: I need click a div to pop the options in the event. My code are as followed. ``` one two three ``` I use Vue get Dom element by ref and bind onClick on div ``` this.$refs.selectNative.dispatchEvent(new MouseEvent('click', { 'bubbles': false })); ``` but it doesn't work. I want to get...
2018/03/19
1,378
2,889
<issue_start>username_0: I have a huge data set in R. Each observation has a categorical label to it and a numerical value in this case a mass. I’m looking to find summary statistics (Mean, Median, Mode) for my mass values grouped by each subset label I have. I’m completely stumped so any help would be appreciated. ...
2018/03/19
640
2,068
<issue_start>username_0: Let's say I have a struct with a bool field ``` struct pBanana { bool free; }; ``` Now I have another struct that contains a vector of the pBanana struct ``` struct handler_toto { std::vector listBananas; }; ``` Now I would love to return how many time...
2018/03/19
377
1,263
<issue_start>username_0: I have a table like this ``` id alias_word language original 1 word1 es changed_word 2 word1 en orig_word 3 word1 fr changed_word 4 word2 de other_original ``` Supposing reference column `language` = `es` How to make a query to have resul...
2018/03/19
719
2,141
<issue_start>username_0: So I have a problem on a homework assignment that asks for a text file to be used to create a dictionary containing keys as students names and corresponding values as NumPy 1-dimensional Matrixes. The text file would be formatted as follows: ``` John 23 53 54 56 58 Jane 89 54 56 76 93 ...
2018/03/19
151
568
<issue_start>username_0: In React given a prop that provides true/false how would one conditionally add `readOnly` to an input field in JSX? So if I had `this.props.boolean` whats a terse option for adding readOnly when this.props.boolean == false readOnly isn't attached, when this.props.boolean == true readOnly is at...
2018/03/19
773
2,699
<issue_start>username_0: Hi I currently have a list of dictionaries I am trying to insert into DynamoDB (each dict as an item). Each item having a hashkey and label1,label2,...label3000 key/value pairs with label# being the key and a string as the value pair. Some of my items have up to label fields. Is this a problem ...
2018/03/19
1,030
3,606
<issue_start>username_0: I recently compiled Qt 5.10.1 statically (mingw32) and the routine below now fails to work. I modified the code to include the full path for windows cmd "c:\windows\system32\cmd.exe" but that still doesn't work. Attempted with Windows 7 & 10. The code below works fine with Qt 5.6. Its job is to...
2018/03/19
344
1,245
<issue_start>username_0: How do I navigate to another webpage using the same driver with Selenium in python? I do not want to open a new page. I want to keep on using the same driver. I thought that the following would work: ``` driver.navigate().to("https://support.tomtom.com/app/contact/") ``` But it doesn't! Navi...
2018/03/19
830
3,117
<issue_start>username_0: I'm kind of a newbie to PowerShell and I am currently making a simple service monitoring script. Right now I have a list of computer names and a list of service names that I scan for. I save the scan to a log. I am wondering if there is any way I can speed up my PowerShell code? I'm not sure ...
2018/03/19
579
2,226
<issue_start>username_0: I am building application on laravel. Now application itself should PCI DSS compliant. Hence we can't store card details on file.Now we don't store details anywhere itself.But when request hits at server.Then laravel logs that information into laravel.log. Is there a programmable way so that w...
2018/03/19
1,581
5,984
<issue_start>username_0: I am trying to create a custom object that passes all non-existent method calls down to a member attribute. This works under normal custom method invocations, but fails when attempting to call arithmetic operators. Below is a console snippet of an example class, a test function, and a cleaned ...
2018/03/19
1,212
4,398
<issue_start>username_0: I want to crawl data from a website. In this website : HTML : ``` * [Place1](http://.../place1) * [Place2](http://.../place2) ``` Inside "<http://.../place1>": ``` Place 1 ![](...) ``` How can I crawl data inside href using 'Nokogiri" gem? (Data in other page when we click ) When...
2018/03/19
1,281
4,973
<issue_start>username_0: I am using codeigniter and the problem is that when i submit this ajax: ``` $("#checkstudnumbutton").click(function(e){ e.preventDefault(); $.ajax({ type: "POST", url: 'php echo base_url();?member/Uploadv2/checkAuthor', dataType: 'json', ...
2018/03/19
957
3,268
<issue_start>username_0: I have several float values that have necessary zeros at the ends. One number that I have is `0.0013790`. When finding the length of this, I get `8` when I should be getting `9`, since the zero at the end is dropped. I can not use `.format()`, since some numbers are shorter than others and ...
2018/03/19
1,317
3,146
<issue_start>username_0: I am new to writing queries in Postgres and am interested in understanding how one can count the **number of unique first time users per day**. If the table only has two columns- `user_id` and `start_time` which is a timestamp that indicates the time of use. If a user has used on previous day...
2018/03/19
1,083
4,688
<issue_start>username_0: I have developed one login form in Android. I have to implement validation part to my login class. This is my login class. I'm using api for connect the db. Please help me this. public class LoginActivity extends AppCompatActivity { ``` private static final int REQUEST_READ_CONTACTS = 0; Soap...
2018/03/19
1,388
5,501
<issue_start>username_0: I'm using ASP.NET Core 2 with Entity Framework Core 2.0.2. I created a context and `Add-Migrations` command in Package Manager Controller works fine. However when `Update-Database` command is used, I get an error: > > System.Data.SqlClient is not supported on this platform > > > I can't ...
2018/03/19
3,059
8,114
<issue_start>username_0: I have a transparent firewall (running VyOS) that passes BGP traffic between the routers on each side. When the link on one side of the bridge goes down, I want to bring down the link on the other side so the router will clear its BGP information without waiting for the 2:30 minute timer to exp...
2018/03/19
1,266
5,310
<issue_start>username_0: I'm looking to use API Gateway + Lambda + Cognito User Pools to build a simple REST API. The API will be used in two ways. The first is to support a basic web app (hosted on CloudFront + S3). Authentication for the web application uses the hosted Cognito sign in / sign up flow and is working f...
2018/03/19
587
2,065
<issue_start>username_0: I am following this [link](https://sendgrid.com/docs/API_Reference/SMTP_API/getting_started_smtp.html) for a test. But I receive > > 451 Authentication failed: Could not authenticate > > > at step 4: > > 4.Enter your Base64 converted API key in the next line as the password. > > > D...
2018/03/19
607
2,516
<issue_start>username_0: I'm planning to build an IoT project for an oil palm plantation through the use of an Arduino and an Android Mobile application for my final year project in University. As plantations have low to no communication signals which includes wifi, it is possible to implement LoRaWAN without access to...
2018/03/19
666
2,401
<issue_start>username_0: *All versions numbers are shown at the bottom of this question.* When I add a new Unit Test (Universal Windows) project to my solution and build it, it builds fine, and the template `TestMethod1` shows up in VS Test Explorer. When I run this test from Test Explorer however, I get the above err...
2018/03/19
317
1,243
<issue_start>username_0: I just started using Castle.Windsor for a couple of reasons, one of which is to get away from using both static classes and the singleton pattern. I'm not new to the general concepts of DI, but am a little new to implementation details. The one I'm dealing with now: how do I get the instance o...
2018/03/19
188
707
<issue_start>username_0: I want to implement some navigation buttons (no text, only image, like flat button). I add default button with BackgroundImage property. And it has a small gap between border and image. How can I remove that gap?<issue_comment>username_1: Set border property to None will make the button fully...
2018/03/19
685
2,634
<issue_start>username_0: I'm trying to upload a multiple files/images using vue.js and axios. My backend is ASP.NET Core. But the problem is, whenever I put breakpoint in my request method, I always get a Count = 0 in my controller. Here are my simple HTML and my codes: HTML ``` Upload ``` My JS ``` import axi...
2018/03/19
365
1,336
<issue_start>username_0: it tries to connect to npm server and throws red screen, I want to test some offline on-load features. or is there someway to debug without npm server?<issue_comment>username_1: To debug on an android device (usb connected) you need to do the following: 1. Enable USB debugging on your androi...
2018/03/19
1,820
6,800
<issue_start>username_0: So I have an entity Book ``` public class Book { private String id; private String name; private String description; private Image coverImage; private Set chapters; //Sets & Gets @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Book)) ...
2018/03/19
1,588
4,607
<issue_start>username_0: I can change the color of the checkbox, but I cannot seem to get the color of the text label to change. I want to do this with CSS. Here is my code. ```css .container { display: block; position: relative; padding-left: 35px; margin-bottom: 12px; cursor: pointer; font-size: 22...
2018/03/19
1,393
4,179
<issue_start>username_0: When I try to use the function `List.nth`, the sml shell returns this error message: ``` - List.nth([1,2,3],0); [autoloading] unexpected exception (bug?) in SML/NJ: Io [Io: openIn failed on "/Users/jhr/Work/smlnj/osx-dist/smlnj.dst/sml.boot.x86-unix/smlnj/basis/.cm/x86-unix/basis.cm", No such...
2018/03/19
962
3,053
<issue_start>username_0: I am getting this error in the log? Though I am running this on the simulator, will this matter in the testing stage? > > canOpenURL: failed for URL: "tel://0478733797" - error: "This app is not allowed to query for scheme tel" > callNumber button pressed > > > Here is my function. The...
2018/03/19
209
720
<issue_start>username_0: I have to display the names of employees,salary and job where salary must be greater that minimum salary in table and his/her job should be starting with letter 'M'. i tried this ``` select ename,sal,job from emp where sal>min(sal) and job like "M%"; ``` but it says ``` Invalid use of grou...
2018/03/19
890
2,567
<issue_start>username_0: ``` @echo off goto :food SETLOCAL EnableDelayedExpansion for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do ( set "DEL=%%a" ) :fruits set i=0 for %%a in (apple banana grape lime) do ( set /A i+=1 set fruit[!i!]=%%a ) set /a fruit=%random%%...
2018/03/19
1,149
3,637
<issue_start>username_0: I want to get table contents from this website: "<https://www.premierleague.com/stats/top/players/red_card?se=42&cl=2>". When I Inspect Element, on Chrome browser, I can find the table entries in the DOMTree as displayed in the browser. But when I run the following code, I get a different tabl...
2018/03/19
367
1,256
<issue_start>username_0: I am trying to define vectorizer parameters for use in a model, but python keeps saying that I am missing a parameter. Reviews is a list of restaurant reviews I have web scraped from yelp. The problem is occurring with .fit\_transform(), I have the following: ``` from sklearn.feature_extracti...
2018/03/19
1,055
3,353
<issue_start>username_0: I'm trying to learn c++ template metaprogramming by implementing some functions. I know the solution to this specific problem has been provided on stackoverflow, what I'm interested in is *understanding why this solution doesn't work*. Here's the code: ``` template < std::size_t... Ns , typena...
2018/03/19
682
2,735
<issue_start>username_0: Suppose, while the user is using the app he long taps the home button and siri opens up. Is there any way to know this through some event or notification or delegate methods? I want to know if siri is launched while my app is running. Is there any sure way to know?<issue_comment>username_1: Ba...
2018/03/19
841
3,124
<issue_start>username_0: My problem is that I have br's in my html in order to make the nav vertical for the 480px viewport, but I need the nav to be horizontal and centered for the 1024 and 1280px viewports. Here is my html: ``` ### Links [Home](index.html) [Mission](mission.html) [About Us](about.html) [P...
2018/03/19
306
970
<issue_start>username_0: The following code raises `TypeError: input expected at most 1 arguments but got 3`. I am unsure how to fix this. ``` def leg_count(w): x = input("How many legs does a", w, "have? ") print("A", w, "has", x, "legs") leg_count("crocodile") ```<issue_comment>username_1: The function `in...
2018/03/19
2,168
6,633
<issue_start>username_0: Hi I am trying to design multi select drop-down list using css class. I am trying to develop multi select drop-down list box exactly below. [![enter image description here](https://i.stack.imgur.com/Z9gDW.png)](https://i.stack.imgur.com/Z9gDW.png) I have below html code. ```css .checkbox { ...
2018/03/19
329
1,001
<issue_start>username_0: ``` Dim i As integer = 0 while i < 10 gridview.RowCount = gridview.RowCount + 1 gridview.Row(i).Cells(0) = i i++ End while ``` I want to increase the grid view count each time I added a new row by the above code. But it only update the row, but it skips the existing rows in the data grid vi...
2018/03/19
657
2,183
<issue_start>username_0: I tried to go through the numa\_distance() and other related functions (From the 1st link ), But couldn't understand. I am just trying to understand how linux calculates the NUMA distance between two nodes when this distance is said to vary based on architecture and NUMA interlink. I referred ...
2018/03/19
562
2,040
<issue_start>username_0: I would like to replace string in file contains ${user.home} using sed in Linux but I'm unable to do it. I tried below options using sed but failed. The input file: =============== ``` ``` Tried code to replace `${user.home}`: ===================================== ``` sed -i "s/$${user.hom...
2018/03/19
1,575
5,001
<issue_start>username_0: I am currently trying to send a float value across two Arduinos via SPI. Currently I am working to send a static value of 2.25 across and then read it via the `Serial.println()` command. I would then want to pass a float value from a linear displacement sensor. My end goal is to be able to have...
2018/03/19
2,057
6,445
<issue_start>username_0: <NAME> ISBN-13: 978-0321714114 Page 280-281, it says: > > **Making A Member Function a Friend** > > > Rather than making the entire Window\_mgr class a friend, Screen can > instead specify that only the clear member is allowed access. When we > declare a member function to be a friend, w...
2018/03/19
1,101
3,414
<issue_start>username_0: Say I have copied the string for a cookie from a browser request. ``` _some_session=RXF6SVF5RHdV... ``` I want to open the rails console and paste something like ``` > session[RXF6SVF5RHdV...] ``` To retrieve the decrypted data from the session. If this is possible, how do I do it?<issue_...
2018/03/19
1,455
5,449
<issue_start>username_0: I have this structure ``` struct Event { const string event; const int order; Event(const string& _event, const int& _order):event(_event),order(_order) {} }; struct EventCompare { bool operator()(const Event& lhs, const Event& rhs) { return (lhs.order < rhs.order...
2018/03/19
395
1,493
<issue_start>username_0: My friend and I have been working in a `react-native` project for a company where he is working on a windows for Android and I am working on IOS part beside `Google Maps` and `PlacesPicker`. But now after my friend have added `googleSignin` I try to add it to my `Podfile` for IOS and install t...