date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/06
743
2,772
<issue_start>username_0: ``` $( window ).on( "load", function() { myfunc(); }); $(window).resize(function() { clearTimeout(this.id); this.id = setTimeout(myfunc, 200); }); function myfunc(){ $( "#myid" ).click(function() {alert('Hello');}); } ![](https://assets.servedby-buysellads.com/p/manage/asset/id/32...
2018/03/06
452
1,478
<issue_start>username_0: My code belove gives me the error: `socket.gaierror: [Errno 11001] getaddrinfo failed` when calling the method ftp.connect(). My question is: why can I connect to google.com but when connecting to an ftp server it gives me error? And how I can connect to the ftp server from behind http proxy? ...
2018/03/06
293
948
<issue_start>username_0: Given a particular df: ``` ID Text 1 abc 1 xyz 2 xyz 2 abc 3 xyz 3 abc 3 ijk 4 xyz ``` I want to apply condition where: Grouping by ID, if abc exists then delete row with xyz. The outcome would be: ``` ID Text 1 abc 2 abc 3 abc 3 ijk 4 xyz ``` Usually I would group them by Id...
2018/03/06
382
1,601
<issue_start>username_0: I have the following buttons: ``` click ``` and the following functions are attached to this button apart from the one in its html definition. ``` $('#abcd').on('click',function(){alert("abcd");}); $('#abcd').on('click',function(){ someAjaxCallWithCallback; }); ``` Now I want a new funct...
2018/03/06
3,148
10,575
<issue_start>username_0: I have installed Flutter on Windows and checked all is ok using flutter doctor. I imported the Flutter plugin. Now, when I try to create a new Flutter app via Anroid Studio it never ends. I get "Creating Flutter Project" and that's it. The message area contains ""C:\Program Files\Flutter\flut...
2018/03/06
1,257
5,202
<issue_start>username_0: I have a create user view and here I first register a normal user and then create a player object for that user which has a fk relation with the user. In my case, I have three different types of users I created a view to handle register all three different types of users, but my player user h...
2018/03/06
984
3,848
<issue_start>username_0: I'm new to node.js and javascript. Can you please tell, why this comparison is not working? My route handler code: ``` friends = [{ id: 0, name: "Dan" }] app.get("/search", (req, res) => { if (req.query.name) { let friend = null; Object.keys(friends).forEach((id => { if (friends[...
2018/03/06
1,170
4,521
<issue_start>username_0: I have multiple directories, each of which containing any number of .xls files. I'd like to take the files in any given directory and combine them into one .xls file, using the file names as the tab names. For example if there are the files NAME.xls, AGE.xls, LOCATION.xls, I'd like to combine t...
2018/03/06
428
1,730
<issue_start>username_0: I'm trying to extract the contour of some traffic signs. The images pass through several steps in order to get a good segmented image. In the final step before applying Canny method I get this image: [![enter image description here](https://i.stack.imgur.com/Rb5nd.png)](https://i.stack.imgur.c...
2018/03/06
411
1,704
<issue_start>username_0: In the below code model, fields are returning values, but when I try to render using `@Html.Sitecore().Field` it returns `null`. I would like those fields to be editable in the Experience Editor. How can I achieve this? It is a controller rendering with a specified data source. ``` @using Sit...
2018/03/06
610
2,568
<issue_start>username_0: I want to deploy my Laravel project which has a Per-project Homestead inside it (not the global homestead). Some Vagrant and all Homestead files are included inside my Laravel project. This is the first time I'm deploying a Laravel application, and I really cannot find any information about fil...
2018/03/06
634
2,492
<issue_start>username_0: Hi I am trying to send two objects using http post method to backend my environment is angular4, typescirpt, asp.net MVC 5 but it is throwing 500 internal server error the same approach if I am passing single object to the backend my backend method is getting called here is the code with p...
2018/03/06
2,068
6,680
<issue_start>username_0: The man for `gold` states: ``` -L DIR, --library-path DIR Add directory to search path --rpath-link DIR Add DIR to link time shared library search path ``` The man for bfd `ld` makes it sort of sound like `-rpath-link` is used for recursively included sos. `ld.lld`...
2018/03/06
585
1,923
<issue_start>username_0: I have the following code in my default theme in grav after a fresh install , the code resides in the in `base.html.twig` file which is basically a `partial` , that gets used in other twig templates like so: ``` {% extends 'partials/base.html.twig' %} {% block content %} {{ page.content }...
2018/03/06
3,526
8,347
<issue_start>username_0: Calling [Flower API's](http://flower.readthedocs.io/en/latest/api.html#post--api-task-apply-(.+)) `/api/task/apply/*` is just hanging without the results returning, even though the task was processed and succeeded according to the Web UI. Reproducing the error: ``` # hangs even though task su...
2018/03/06
431
1,479
<issue_start>username_0: I am deploying Flask application in Apache2 server during this i need to run a command for enabling *mod\_wsgi* by using: ``` sudo a2enmod wsgi ``` but its showing: ``` sudo: a2enmod: command not found ``` please help thanks<issue_comment>username_1: I had the same problem with using Ubun...
2018/03/06
438
1,586
<issue_start>username_0: I am a beginner in android guys.So, I need your help, I created an android service and I want to restart that service when the device powered-on or restarts only in the situation when my service is activated. In case my service is deactivated it shouldn't be started on device being powered-on o...
2018/03/06
731
2,293
<issue_start>username_0: It's issue similar to [this question](https://stackoverflow.com/questions/35192885/method-rel-length-in-neo4j-rb-doesnt-work) , but in my case 'neo4j-core' gem version is updated from 7.0.4 to 8.1.0, and 'neo4j' 8.0.7 -> 8.3.4 ``` class Person include Neo4j::ActiveNode has_one :out, :ances...
2018/03/06
628
2,514
<issue_start>username_0: I have a requirement, where i have to run a one minute background process after returning the response for an api. That background process will do some operation on mongodb. My approach is, i am emitting an event for background process after returning the response. Is there any best approach ...
2018/03/06
599
2,327
<issue_start>username_0: What is more efficient between these two sets, and why. Thanks :) ``` Target function alertTarget(value) { alert(value); } ``` Thanks very much!<issue_comment>username_1: when you want to make asynchronous calls to db and wait for the result you need to use callback or using promises or ...
2018/03/06
509
1,967
<issue_start>username_0: I have pandas DataFrame named 'dataset' and it contains a column named 'class' when I execute the following line I get SyntaxError: invalid syntax ``` print("Unique values in the Class column:", dataset.class.unique()) ``` It works for another column names but not working with 'class' How ...
2018/03/06
925
4,003
<issue_start>username_0: I am assigning a variable, proxies, equal to an array. I am trying to add items to that array at a later point in time and then access that array in other files. The problem is, the proxyHelper.proxies value is not updating to reflect the value of proxies variable. After modifying the array,...
2018/03/06
694
2,779
<issue_start>username_0: I am new to build systems and have to work on bamboo. I wrote a pseudo code of what I am trying to achieve and want to know if it is doable: ``` let repoA = Main app let repoB = Component of Main app Scenario 1: I commit to a branch in repoA I checkout repoA [branch] I build repoA I check o...
2018/03/06
170
732
<issue_start>username_0: currently I can pass one parameter to u-sql script in data factory workflow. and with that parameter i can apply some pattern to generate files paths. is there any way to pass collection of datetimes parameters to u-sql and apply pattern to generate file paths?<issue_comment>username_1: Pass a...
2018/03/06
424
1,559
<issue_start>username_0: Note: This is org.json.simple In the below examples, I always want the "weWantThis" value. For example, we have the Json: Example1. ``` { "Header1": { "Basex": "ws", "Random": { "Something": "information" }, "age": 22, "Type": "Apa", ...
2018/03/06
342
1,302
<issue_start>username_0: I am new to Azure and setting up the backup of multiple Azure VM's, all on the Location. 2 of the 3 VM's have additional data disks attached to them. Will the Recovery Services Backup policy also back up the data on these disks or do I need to setup a separate backup policy to manage these? T...
2018/03/06
622
2,319
<issue_start>username_0: This is my registration form: ![Registration Form ](https://i.stack.imgur.com/rLYms.png) I am trying to align all of the text boxes. This is my form code; Forms.py ``` class RegistrationForm(UserCreationForm): email = forms.EmailField(required=True, label = "Email:") username = for...
2018/03/06
670
1,928
<issue_start>username_0: I have a `df` (dataframe): ``` df=data.frame(V1=c(10,20,10,20),V2=c(20,30,20,30),V3=c(20,10,20,10)) > df V1 V2 V3 1 10 20 20 2 20 30 10 3 10 20 20 4 20 30 10 ``` I have a vector `v<-list(1,3,2)` Each element represents the number of repetition of relevant column. I would like to create fol...
2018/03/06
2,041
7,053
<issue_start>username_0: I'm here to get answers to why my javascript isn't working for the follow button because I add all cdn and scripts but still not working. What am I doing wrong in my code? ```js $(document).ready(function(){ $("#follow-button").click(function(){ if ($("#follow-button").text() == ...
2018/03/06
1,544
5,266
<issue_start>username_0: I am trying to call this function ``` static inline void insert(Buffer *buf, double f, size_t index) { insert_64(buf, *(uint64_t *)&f, index); } ``` But, I am getting this error: ``` error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ``` ...
2018/03/06
827
2,961
<issue_start>username_0: I'm trying to import a text file into an Excel workbook using a cell value to determine which text file to import. The directory that houses the text file will have other text files with the date prepended to the filename. (e.g. "2018-03-06-FILENAME.txt") I want the user to be able to enter a ...
2018/03/06
677
2,144
<issue_start>username_0: I'm having problems specifically applying functions from the `roll` package using `data.table`. I'm attempting to calculate rolling metrics on column `DT$obs` for each group `DT$group`. I'm able to calculate rolling metrics using the `zoo` package, but I'd like to use some of the additional arg...
2018/03/06
557
1,831
<issue_start>username_0: I want to Find whether an array is subset of another array or not and one of the method i can think of doing it is using Hashtable but i want to implement it in python. Attached in the thread is the **c++** implementation. I'm not looking for built in functions here like set etc.. Python only ...
2018/03/06
511
1,701
<issue_start>username_0: I'm experimenting with JWT auth in a Web API project, and this is the code that fetches the token: ``` public static async Task Main(string[] args) { var login = new {username = "mario", password = "<PASSWORD>"}; var content = new StringContent(JsonConvert.SerializeObject(login), Encod...
2018/03/06
1,303
4,604
<issue_start>username_0: I am trying to insert/update +/- 10k rows with a foreach loop. The complete loop duration is about 3-5minutes. Are there any tips on my code to do the insertion of update faster? The $rows are retrieved from a xls file converted to domdocument. ``` foreach($rows as $key => $row) { if($key ...
2018/03/06
615
1,866
<issue_start>username_0: Need some advice for a regex expression I am trying to create. I need to check whether the string contains at least one digit (0-9) OR it can be left empty. This is my regex that checks for a digit: `(.*[0-9]){1}.*$` How can I modify this to allow for empty string?<issue_comment>username_1:...
2018/03/06
542
1,589
<issue_start>username_0: I have a comma separated file where I need to change the first column removing leading zeroes in string. Text file is as below ``` ABC-0001,ab,0001 ABC-0010,bc,0010 ``` I need to get the data as under ``` ABC-1,ab,0001 ABC-10,bc,0010 ``` I can do a command line replace which i tried ...
2018/03/06
762
2,114
<issue_start>username_0: I have this array of week days: ``` var weekDays = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; ``` And another array of employees: ``` var empl = ["<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>"]; ``` The employees from the 2nd array have to work on one of the days from the ...
2018/03/06
587
1,940
<issue_start>username_0: I would like Woocommerce to only allow 1 product in the cart. If a product is already in the cart and another one is added then it should remove the previous one. I found this code on net: ``` /** * When an item is added to the cart, remove other products */ function custom_maybe_empty_cart...
2018/03/06
438
1,554
<issue_start>username_0: I'm able to register a service worker successfully but when I try a simple console log I get the following result - [dev tools screenshot](https://i.stack.imgur.com/fuT5l.png) It looks like some kind of routing error but I don't know how to fix it. my code looks like this offerings.js file ...
2018/03/06
1,210
4,348
<issue_start>username_0: I am trying to cycle through a list of Div's that have all of my trivia questions inside. I know how to cycle through all of them with an iterator but i just want to know how to grab one Div, run some code, then cycle to the next object in the array after the user has clicked submit, then run t...
2018/03/06
682
1,652
<issue_start>username_0: I have two Python dictionaries - ``` dict1 = {'a' : [1, 2, 3], 'b' : [4, 5, 6], 'c' : [7, 8, 9]} dict2 = {'a' : 30, 'b' : 75, 'c' : 15} ``` I want to sort `dict1` based on the values of `dict2`. The final answer should be something like - ``` [['c', [7, 8, 9]], ['a', [1, 2, 3]], ['b', [4, ...
2018/03/06
872
2,667
<issue_start>username_0: I have series of a timestamp in an excel file (column wise) and some of the examples are below: ``` 30m1.566s 30m0.706s 30m34.197s 30m1.545s 30m1.148s 30m1.791s 30m1.903 ``` I want to convert these times to a single unit that is - milliseconds (e.g 30m1.903s time to all in milliseconds). R...
2018/03/06
444
1,481
<issue_start>username_0: I can't figure out why I'm getting a ClassNotFoundException here, since I have compiled with the appropriate jar file for WorkUtils, and the class WordUtils is clearly in the jar file. I compiled with `javac -d bin -cp lib/commons-text-1.2.jar MyClass.java` and run with `java -cp bin MyClass`...
2018/03/06
870
3,100
<issue_start>username_0: I have: * *abstract class Car* with an abstract method called *drive()*. I have two classes which extend *Car* : 1. Manual\_Car 2. Automatic\_car My problem is the method *drive()* has different number of arguments in this two cases. This is the code : ``` abstract class Car{ abstract...
2018/03/06
602
2,386
<issue_start>username_0: ``` def build_profile(first, last, **user_info): profile = {} profile['first_name'] = first profile['last_name'] = last for key, value in user_info.items(): profile[key] = value return profile user_profile = build_profile('albert', 'einstein', location='pri...
2018/03/06
796
2,908
<issue_start>username_0: I'm building an application with .net core 2.0. I have a Person object with a list of addresses. Addresses are stored in the Addresses table. I then have a joining table that relates Person to Addresses. ``` class Person { public List Addresses { get; set; } } class Address { ...address...
2018/03/06
552
1,822
<issue_start>username_0: I'm trying to make Random colour generator, but I found one problem. To make this, I have to read text in paragraph with JS. I don't want to use any libraries . Just HTML and JS.<issue_comment>username_1: Well not sure about your needs but i guess maybe u can ```js var innerText = document.ge...
2018/03/06
1,042
3,642
<issue_start>username_0: I have a 3-node Cassandra cluster with a keyspace that has a replication factor of 3: ``` CREATE KEYSPACE demo WITH REPLICATION = { 'class':'SimpleStrategy', 'replication_factor':3 }; ``` (Deployed in just one data center) When doing failure testing, ie taking one node down, I'...
2018/03/06
681
2,600
<issue_start>username_0: I want to achieve the below scenario... Table 1 - tAccessRequest of Database 1 columns - RequestId, CardNo and so on...... Table 2 - tBadge of Database 2 Columns - CardNo, CardStatus and so on... I created a Request Class as below ``` public class RequestDetails { public int RequestID {...
2018/03/06
1,205
4,351
<issue_start>username_0: I'm trying to write SQL code that pulls data from more than one field and displays it in a single field, but on multiple lines. The goal is outputting to Excel retaining multiple lines *in a single cell*. Our current procedure is just using Excel to concatenate two fields into one cell with car...
2018/03/06
1,022
3,852
<issue_start>username_0: I am having problem with NDB Migration. Currently, I have 2 replicas in NDB Cluster. I want to move the cluster into a new hardware. So, in the new machine I setup datanodes and sqlnodes & pointed the management node to the old cluster. Once the sql nodes gets sync, I shall stop the old cluster...
2018/03/06
672
1,983
<issue_start>username_0: I've got the following code that is viewed as thumbnail images beside the big preview image. ``` ![TESTING 1](images/1.jpg) ![TESTING 2](images/2.jpg) ![TESTING 3](images/3.jpg) ``` Then I've got my preview image... ``` ![TESTING 1](images/1.jpg) ``` When hovering over the thumbnail, it u...
2018/03/06
1,239
4,187
<issue_start>username_0: I'm trying to make a query where I can find all locations in my SQL database within (lets say 50 miles) of a given Longitude and Latitude points. I populated some posts, and in the Post table I have two columns where I store Longitude and Latitude when creating a post. Here is how the table l...
2018/03/06
1,778
5,929
<issue_start>username_0: I am writing a program that determines the prime factors of a range of numbers. In the program, the `startingNumber` and `endingNumber` of the range is indicated as a `std::pair`. ``` #include "stdafx.h" #include #include #include using namespace std; const long long MAX = 100000000; // O...
2018/03/06
468
1,654
<issue_start>username_0: I have used howler package in my application. I installed the typings using `npm install --save @types/howler` and in my **index.html** I have included the following script tag But still it shows the error `error TS2304: Cannot find name 'Howl'` when I try to serve my application using **ng se...
2018/03/06
631
2,228
<issue_start>username_0: I would like my code to iterate through columns to make one plot for each column. I have the below code to draw plot for one column, but I do not know how to use this code to loop through other columns and generate plots for all columns. Any idea? Here's my code: ``` import seaborn as sns sn...
2018/03/06
1,660
5,154
<issue_start>username_0: Here there is a simple test applet that I've wrote and installed on my Javacard as "default selected applet". As you see, it throw `0x6a6a` on reception of any APDU command with INS = `0X00`: ``` package testPack; import javacard.framework.*; public class TestApplet extends Applet implements...
2018/03/06
1,260
5,069
<issue_start>username_0: ``` var ohnoesEl = document.getElementById("ohnoes"); var onOhNoesClick = function(e) { e.preventDefault(); var audioEl = document.createElement("audio"); audioEl.src = "https://www.kasandbox.org/programming-sounds/rpg/giant-no.mp3"; audioEl.autoplay = "true"; document.body.appendChild(...
2018/03/06
1,146
4,690
<issue_start>username_0: I had a domain name called: <http://p2pproductions.in> Which expired a few months back since we are moving to a new site. I have downloaded the Site files and Database scripts. I wanted to log in to the existing WP dashboard but since the domain is expired I have no way to login to it.<issue...
2018/03/06
248
863
<issue_start>username_0: I'm trying to find a regex which finds 3 repeating characters appearing contiguously in a string. The character set could be alphabet, digit or any special character. I wanted the first try for alphabet and digits and then extend the expression to include special characters. The ones I tried a...
2018/03/06
912
4,127
<issue_start>username_0: I'm about to integrate performance testing on CI, but I'm having a hard time to decide which ones I should execute and how to run it: 1. Should I run load testing on individual APIs or should I run the whole workflow (e.g.: `Login -> Home Page -> Search`) 2. How long I should run it? 3. Should...
2018/03/06
828
3,038
<issue_start>username_0: I am very impressed with the powerful search feature of Sublime which we later found in Visual Studio Code and Google Chrome Developer. A very basic algorithm for searching may use Trie, I guess but this search for files of Sublime etc seems like some sort of a multi-direction Trie (if there i...
2018/03/06
2,461
7,714
<issue_start>username_0: This question is about scripting the main YouTube site, client side from JavaScript. While it looks easy as a click, I found no way to change the current video by a new *non in context* video ID without reloading. This seems to be related with the `polymer` library in use, with a lot of shado...
2018/03/06
1,054
3,758
<issue_start>username_0: I am still relatively new to python and having difficulty with a little project. I am converting a csv file to xls file which I have accomplished, and now I am wanting to perform some calculations on some parts of the new xls file. All values are stored as Text, I am trying to convert the cells...
2018/03/06
401
1,170
<issue_start>username_0: I have a problem with navigation in html5. I watched a lot of tutorials and I don't know what I'm doing wrong. I want to navigate on the same page. ``` [TOP](#top) [MIDDLE](#middle) [BOTTOM](#bottom) TOP === ![](1.jpg) ... ```<issue_comment>username_1: This will allow navigation on s...
2018/03/06
489
1,466
<issue_start>username_0: Edit: As explained below in @floydian's comment, the problem was that calling `a = np.array(a, dtype=d)` creates an a double array which was causing the problem. I am aware that this has been already asked multiple times, and in fact am looking at [Creating a Pandas DataFrame with a numpy arr...
2018/03/06
251
638
<issue_start>username_0: I know this is super basic here but can someone explain why this pushes out 31? ```js var x = 1; for (var i = 0; i < 4; i++) { x += 5 * i; } console.log(x); ```<issue_comment>username_1: I would define the array like this: ``` a = np.array([(1, 2), (3, 4)], dtype=[('x','float'), ('y', '...
2018/03/06
421
1,163
<issue_start>username_0: Please examine following code : ``` #include #include #include int main() { char mybuffer[512]; std::filebuf\* optr = new std::filebuf(); optr->pubsetbuf(mybuffer, 512); const char sentence[] = "Sample sentence"; auto ptr = optr->open("bd.bin", std::ios::binary | std::ios::trunc | std...
2018/03/06
379
1,128
<issue_start>username_0: I am looking to combine duplicate subjects, however some of my data is numerical and some is categorical. The categorical values are duplicated but the numerical data may differ. I want to average the numerical data but merge the categorical data. For example: ``` Subject A B 1 L 1 ...
2018/03/06
499
1,379
<issue_start>username_0: I am new to Scala, while running one spark program I am getting null Pointer exception. Can anyone point me how to solve this. ``` val data = spark.read.csv("C:\\File\\Path.csv").rdd val result = data.map{ line => { val population = line.getString(10).replaceAll(",","") var popNum = 0L ...
2018/03/06
878
3,033
<issue_start>username_0: I am trying to write a method that outputs the following figure: ``` * ** *** **** ***** ``` I tried everything but my code always outputs this instead: ``` ***** **** *** ** * ``` Here is my code: ``` public void outputFigure(int y) { count1 = y; count2 = y; int sp...
2018/03/06
1,729
6,856
<issue_start>username_0: When I create a constructor for my class, C++ forces me to do two things: * Define **rect** as a pointer as I am using the **new** keyword. * As I defined it as a pointer I need to use the **->** instead of the **.** to access their properties, methods. My question is, why is it like that? I ...
2018/03/06
1,757
6,673
<issue_start>username_0: I'm wanting to rename all of the files in a directory. When sorted by name in Windows Explorer, they appear in the correct order: ``` Cue 001 - 002.mp3 ... Cue 001 - 010.mp3 Cue 001 - 011.mp3 ... Cue 001 - 020.mp3 Cue 001 - 021.mp3 ... Cue 001 - 0111.mp3 Cue 001 - 0112.mp3 ``` So far I've be...
2018/03/06
1,274
2,652
<issue_start>username_0: ``` A = {0:{a:1, b:7}, 1:{a:5,b:5}, 2:{a:4,b:6}} ``` I want to attach an item `guess` to each sub dictionary based on the value `b` accounting of all `b's` in each sub dictionary. Saying, in Dictionary A: ``` 0-b-7 percentage of b: 7/(7+5+6) 1-b-5 percentage of b: 5/(7+5+6) 2-b-6 percenta...
2018/03/06
1,103
4,042
<issue_start>username_0: I have a script that scans a list of servers/computers for a service and displays the status. I am running PS version 5 Build 10586 Revision 117 on both of my computers. On my Windows 7 computer running PSv5, the StartType is outputted to the .txt ``` MachineName ServiceName ...
2018/03/06
502
1,871
<issue_start>username_0: Can anyone explain the meaning of the *"echo"* word? I know it is used commonly for printing information as output but I couldn't find any clear explanation for it. It's because the command *echoes* the passed parameters as output?<issue_comment>username_1: The default PowerShell version de...
2018/03/06
777
2,801
<issue_start>username_0: I am trying to use MariaDB ColumnStore Bulk Write SDK in Java to bulk insert 10 rows in a table with 50 columns(data type int) but it never finished had to kill the process in 10 -15 tried couple times but same results. this is the code sample from their doc <https://mariadb.com/kb/en/library...
2018/03/06
352
1,251
<issue_start>username_0: So, recently I saw a piece of C code as the following: ``` int result, input; result = read(fd, (char*)&input, sizeof(input)); if(result == sizeof(int)) return input; ``` What does the comparison `result == sizeof(int)` do?<issue_comment>username_1: `read` returns the number of bytes read ...
2018/03/06
566
2,055
<issue_start>username_0: Say if my 5 open tabs are: ``` file1 file2 file2 file2 file3 ``` I want a quick way to close just all of the duplicate `file2` tabs, when the focus is on any of the `file2` tabs. So result after running command should be: ``` file1 file2 file3 ``` The command should not have any effect ...
2018/03/06
410
1,334
<issue_start>username_0: My file contains data like this: ``` A foo(a) A foo(a) B foo(b) A foo(a) B foo(b) ``` I want them to be converted to ``` A foo(a1) A foo(a2) B foo(b3) A foo(a4) B foo(b5) ``` At present, I think an approach to use IF with line number ($), and the sed the replace with sed. But, I am not su...
2018/03/06
1,184
3,818
<issue_start>username_0: I'm having trouble understanding why the two scripts below yield different results. Could someone help me understand why these two scripts differ in the way they do? ```js var str = "this needs to be capped!", str1 = str.split(""), strarray = []; for(var i = 1; i < str.length; i++)...
2018/03/06
319
1,158
<issue_start>username_0: I'm trying to setup the "List-Unsubscribe" header in Amazon AWS SES API using the sendEmail function in PHP. I've reviewed Amazon's documentation and many other posts here but haven't found anything that works yet. This is what I'm currently using: ``` $client->sendEmail(array( // all the m...
2018/03/06
366
1,217
<issue_start>username_0: ``` Function function sum(x,y) { var z = x+y; document.write("Sum is"+z); } ``` Hi Guys, I am a beginner with JavaScript and I'm facing this little problem. If I enter 5 and 5 the result is 55. But I want to sum up these values.<issue_comment>username_1: You should covert x and y to in...
2018/03/06
914
3,387
<issue_start>username_0: I'm struggling to get the webpack dev server setup in a docker container based on `node:latest` Despite trying all the various incantations in [Node Sass could not find a binding for your current environment](https://stackoverflow.com/questions/37986800/node-sass-could-not-find-a-binding-for-y...
2018/03/06
1,388
6,135
<issue_start>username_0: I have a Spring Boot web app with several `@RestController` classes. I like the default json format returned by my REST controllers. For use in my DAO beans (which do json serialization and deserialization ), I have created a custom `ObjectMapper`: ``` @Configuration public class Config{ @...
2018/03/06
363
1,349
<issue_start>username_0: I'm using a query within a loop in TestComplete, and each time the loop completes, the variable is updated with a new value. I want to account for the possibility of an apostrophe in the variable so I can use one query. For example: ``` i = 0; while(i < companyCount) { ...
2018/03/06
573
1,938
<issue_start>username_0: I'm wondering if it is possible to use a SAS token for the authorization header in a REST API call to Azure Tables using PowerShell. I've created a test Account SAS and tried passing the actual token value starting with the "sr=" tag and also the full URI however I'm getting the following error...
2018/03/06
364
1,369
<issue_start>username_0: My problem: I have a live website in Wordpress(php) and i want to given a user action, i will send a data for a node.js script to run and return the results. So i have this: User Event -> jQuery -> PHP CURL -> NODE.JS -> NODE.JS ANSWER TO CONTINUE PHP SCRIPT. my question is how i set up a n...
2018/03/06
434
1,727
<issue_start>username_0: Here is the code that's expected to produce error: ``` public class App { public static void main (String[] args) { tick(); } public static void tick () { System.out.print("hi"); ``` Note that the closing angled bracket of both, the method `tick()` and class `Ap...
2018/03/06
1,538
5,467
<issue_start>username_0: I'm trying to build a Flutter App and learning Dart in the process, but I'm getting kind of frustrated when debugging. I have fetched a resource from an API and now I want to print the JSON string to the console, but it keeps cutting off the string. [![Screenshot of the cut off string in the c...
2018/03/06
1,161
3,893
<issue_start>username_0: Just want to preface that this question evolved from a previous question of mine which can be found [here](https://stackoverflow.com/questions/49121526/looking-up-multiple-dictionary-keys-in-a-pandas-dataframe-return-multiple-valu). I had a few follow-up's that ultimately changed the original q...
2018/03/06
599
2,021
<issue_start>username_0: I'm developing an android wifi localization app that uses a grid approach, where you select a grid tile and then it scans and collects all of the BSSIDs and RSSI values nearby that point and saves them along with the x,y coordinate of that grid tile. What would be the best way to save that dat...
2018/03/06
1,035
4,470
<issue_start>username_0: First of all, here's the C# code (even though the question is language-independent): ``` public static void PollClick(IWebElement element, int timeout = defaultTimeout, int pollingInterval = defaultPollingInterval) { var stopwatch = new Stopwatch(); stopwatch.Start(); ...
2018/03/06
864
3,022
<issue_start>username_0: Suppose I have a base class, ``` struct X{ std::container A; std::container B; void do\_this(...){...}; void do\_that(...){...}; X(classC something){ do\_this(...); do\_that(...); } } ``` And I want to create a descendant, but I need to only change a couple of lines in one of ...
2018/03/06
1,025
2,573
<issue_start>username_0: I have the following graph: ``` digraph G {rankdir="LR"; node [fontname = "font-awesome"]; subgraph cluster17 { 2 [id=2, shape=rect;color="#A4A4A4";fillcolor="white";label=< | | | --- | | 1:10 | >, style="filled",fontsize=6,fixedsize=true,width=0.5,height=0.2,shape=Mrecord]; 2 ->...
2018/03/06
4,625
14,563
<issue_start>username_0: I've been trying to setup my windows computer such that I can have a local postgreSQL with PostGIS extension. With this installed I hope to be able to create a project with geodjango locally before putting it in the cloud. I have been working with Django for a little while now on my local machi...
2018/03/06
784
2,845
<issue_start>username_0: I'm following this guide to "[Update core via Composer](https://www.drupal.org/docs/8/update/update-core-via-composer-option-4)" and I have my backups. The document says to run ``` composer update drupal/core --with-dependencies ``` When I do, I get: ``` Loading composer repositories with ...
2018/03/06
561
1,875
<issue_start>username_0: Whenever I try to run my spring boot application, my Linux machine returns me the following issue: ``` org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-80]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-...
2018/03/06
572
2,326
<issue_start>username_0: We will store comments for several objects in our database for example Customer, Product, Order, etc. Each entry can have multiple comments. For primary keys, we will go with GUIDs. Traditionally, we would do a join tables for the above such as Customer\_Comment, Order\_comment, Product\_Commen...