date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/11
394
1,574
<issue_start>username_0: We have a Kafka service running on AWS and planning to use Athena/S3 for long term storage for our analytics data. Is it possible to use Kafka with AWS Glue service for reading from Kafka and store in s3?<issue_comment>username_1: Best bet would be to use the open source Kafka Connector for S3 ...
2018/03/11
517
1,857
<issue_start>username_0: I have two list ``` men=['x','y','z'] women=['a','b','c']; ``` and two vabriable to show in html ``` selectedMan; selectedWoman; ``` i want to create a common select method ``` select(index,source,destination){ destination=source[index]; } ``` function call ``` this.select(2,this.me...
2018/03/11
434
1,837
<issue_start>username_0: In previous projects I have typically created an `OnClickListener` for any view which needed handle click interaction. In more recent projects, I have implemented `View.OnClickListener`, and then overridden the `onClick` method of the activity to achieve the same result. Is there an advantage...
2018/03/11
633
1,696
<issue_start>username_0: I have two dataframes and one has duplicates. I would prefer to retain one of the duplicates in the output. ``` import pandas as pd df1 = pd.DataFrame(data = {'col1' : ['M', 'M', 'M', 'M', 'C','C','C'], 'col2' : [10.5,11.5,14,15.5,51,51,52]}) df2 = pd.DataFrame(data = {'col1' : ['M', 'C', 'C...
2018/03/11
1,340
5,188
<issue_start>username_0: I'm still fairly new to programming in C, and still learning the language. I'm trying to do the following (its a scaled down version of my initial program code). But every time I try to initialize `counter`, the program crashes. I've tried setting up another function to handle the initializatio...
2018/03/11
1,566
5,998
<issue_start>username_0: I am new to android development, I am trying to pass a checkbox state using findViewById method, but the app gets crashed: Here is the xml code: ``` ``` and here is the java statement to link this checkbox with java: ``` public class MainActivity extends AppCompatActivity { CheckBox hasWhi...
2018/03/11
786
3,102
<issue_start>username_0: Whenever I set the ImageView to clickable it's crashing. Is it not possible to have a clickable ImageView inside a button or am just doing it wrong? I already set the image to be clickable. \*\* **EDITED** \*\* ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCre...
2018/03/11
747
2,849
<issue_start>username_0: I am having a problem getting this working properly...at least in a way that works well. I have parent checkboxes and children checkboxes being fed from an array of objects. ``` $scope.parents = [ {name: 'check1', value: 'ck1'}, {name: 'check2', value: 'ck2'} ]; $scope.children = [ ...
2018/03/11
2,242
8,831
<issue_start>username_0: I have a requirement to return Screen class with two property one is GridConfiguration and second is GridData, GridConfiguration will be an always same type but GridData type will be changing on the basis of screenName at runtime. I have written some code and also able to achieve my goal. Can ...
2018/03/11
529
1,700
<issue_start>username_0: I'm creating a backup function to copy all files with an specific extension extension. `files()` returns `'*'` `'+'` `'./'` when it has not found file results, so I'm trying to avoid the invalid `cp [* | + | ./] /backup` with an `if` but it only works for `*`. ``` function backupByExt { # ...
2018/03/11
847
3,074
<issue_start>username_0: I stumbled upon the post, which tells that **w+** can truncate a file, whereas **r+** file mode can not. I am having difficulties understanding what **truncate** means and what **file.truncate()** does.<issue_comment>username_1: In crude terms, **truncate** is about removal of the text from yo...
2018/03/11
1,784
5,784
<issue_start>username_0: I am writing a script that allows the user to input a month by either name or number. In the statement below I can type anything I want into the input box and the line: ``` ElseIf sMonthOfMaintenance = "1" Or "2" Or "3" Or "4" Or "5" Or "6" Or "7" Or "8" Or "9" Or "10" Or "11" Or "12" Then...
2018/03/11
918
2,878
<issue_start>username_0: ``` #include #include int main(){ char name[50]; char \*top5[5] = {"user1" , "user2" , "user3" , "user4" , "user5"}; int i ; for(i=0;i<5;i++){ printf("You entered the top5. Please enter your name: "); scanf("%s", &name); top5[i] = name; } for(i=0;i<5;i++){ printf("%s" , top...
2018/03/11
828
2,712
<issue_start>username_0: I have this string working ``` php if (isset($row["image"])) echo '<a href="data:image/jpeg;base64,'.base64\_encode( $row['image']) .'" download="plexishop" '; ?> | ``` when i click the picture on the page displayed the file downloaded is named "download.jpg" . I would like to rename it ...
2018/03/11
370
1,109
<issue_start>username_0: I currently have the following code: `sed -i "/# My Comment Text/,+2d" /etc/crontab` This removes the 2 lines after this line '# My Comment Text', but I also want it to remove 1 line above this found string. How can I resolve this inside my 1 liner sed command?<issue_comment>username_1: Here'...
2018/03/11
470
1,812
<issue_start>username_0: Is there a way to rename the example Kibana Dashboards that comes with filebeat? The [Configuration Dashboard](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-dashboards.html) and [Configuration Template](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-...
2018/03/11
824
2,642
<issue_start>username_0: I have 20K objects and a set of features provided in a list. I need to extract those features from each object and save them into a dictionary. Each object has almost 100 features. For example: ``` # object1 Object1.Age = '20' Object1.Gender = 'Female' Object1.DOB = '03/05/1997' Object1.Weigh...
2018/03/11
1,158
4,569
<issue_start>username_0: **SECOND EDIT:** So! I've figured out the issue, but in-order to understand the problem you must first understand the goal: I'm currently working on an `Angular Chrome-Extension` which has a persistent background script (unlike all the examples & tutorials I found which explain only non-persi...
2018/03/11
393
1,590
<issue_start>username_0: Lately I have had problems compiling my Xamarin.Forms project which also has several web services projects in the same solution. I have been working on the project for several months and everything went well until I got to the point that the project, at the time of building, never finished comp...
2018/03/11
949
3,271
<issue_start>username_0: I apologize for this seemingly easy and almost a stupid question, but I have spent a lot of time to fix it without much success. I created a very simple maven project and then a simple text file inside the `src/resources` folder like this. [![enter image description here](https://i.stack.imgu...
2018/03/11
360
1,440
<issue_start>username_0: I am trying to copy styled pandas dataframes from Jupyter Notebooks to powerpoint without loss of formatting. I currently just take a screenshot to preserve formatting, but this is not ideal. Does anyone know of a better way? I search for an extension that maybe has a screenshot button, but no ...
2018/03/11
402
1,194
<issue_start>username_0: In R I want to Plot a smooth graph (with its shadowed margin) which contains “age” and “circumference” variables on X and Y-axis for ready Orange data What is “method” of smoothing which ggplot2 uses? I do like this but get erros: ``` x <- Orange[2] y <- Orange[3] lo <- loess(y~x) plot(x,y) ...
2018/03/11
520
1,513
<issue_start>username_0: I am new in angular 5, I am try to run angular 5 project get following error "ng serve error localhost could NOT be bound". any one can help me. ``` example: D:\workspace\newapp>ng serve Provided host localhost could NOT be bound. Please provide a different host address or hostname Error: P...
2018/03/11
1,436
4,360
<issue_start>username_0: Need help upgrading `pytest`. At 3.2.4 things work, if I move to 3.3.x or 3.4.x I get an error that I don't understand and I cannot even execute the `-h` argument. Not sure where to start or why this is happening. Perhaps an issue with my `virtualenv` ? fresh virtualenv ---------------- I di...
2018/03/11
1,401
3,337
<issue_start>username_0: I'm trying to solve the following problem in R: I have a dataframe with two variables (number of successes, and number of total trials). ``` # A tibble: 4 x 2 Success N 1 28. 40. 2 12. 40. 3 22. 40. 4 8. 40. ``` I would like to perform a prop.test or binom.test on each row and add the ...
2018/03/11
754
2,884
<issue_start>username_0: I really want to get rid of them. I keep removing these files and they always come back at some point. I understand that OSX wants to keep the organisation of folders in memory, but if I could deactivate this behavior it would be awesome.<issue_comment>username_1: How to disable MacOS .DS\_Stor...
2018/03/11
864
3,206
<issue_start>username_0: Say I have the following: ``` public class MyClass { public void myVoid(int number) { //insert code here. } } ``` Later in MyClass, the void will be called, and `number` will be a random value. In a different class, without making a new variable in MyClass, will it be po...
2018/03/11
810
2,936
<issue_start>username_0: How to implement this in javascript ! ``` var re =([0-9]+\/[0-9]+)\+([0-9]+\/[0-9]+); var str="1/2,3/4"; str.match(re); ``` error is shown! I want to allow only two '/' for a input field accepting fractions 1/2,4/6 the next fraction should not be allowed ! Can I use pattern in HTML5<issu...
2018/03/11
875
3,318
<issue_start>username_0: In RabbitMQ management plugin [documentation page](https://www.rabbitmq.com/management.html) there is a [link to latest HTTP API documentation](https://rawcdn.githack.com/rabbitmq/rabbitmq-management/v3.7.4/priv/www/api/index.html). I see that in latest documentation there are added new endpoin...
2018/03/11
943
3,465
<issue_start>username_0: I'm wondering if it's possible to reverse calculations containing **multiple `pow()`** functions, with different (but known) exponents. Given the forward calculation, I need the reverse calculation. ``` php # Forward calculation $in = 9; $out = pow($in, 2) + pow($in, 3); // = 810 # My attempt...
2018/03/11
855
2,377
<issue_start>username_0: I have a txt file and with PHP i need to get <EMAIL> and <EMAIL> How can i do it? I have 2 days searching the solution but i dont find it. I try this but don't work: ```html $filedata = file_get_contents("file.txt"); preg_match_all('~^Email:(.*)$~m', $filedata, $matches); foreach ($mat...
2018/03/11
414
1,162
<issue_start>username_0: I have a DataFrame that contains a column with lists of letters: ``` import pandas as pd df = pd.DataFrame({'id': [1, 2, 3, 4, 10], 'date': [4, 5, 6, 7, 8], 'str': [["a", "b"],["b", "c"],["c", "d"],["d", "e"],["e", "f"]]}) ``` I want to join...
2018/03/11
2,853
9,409
<issue_start>username_0: Working against an Oracle Database. It has a DATE typed column and the select(*simplified here for easy perusal*) statement issued via JDBC PreparedStatement is as follows: ``` select DATE1 from TYPE_TABLE where TYPE_TABLE.DATE1 = ? ``` The question mark parameter value at runtime is `201...
2018/03/11
550
1,953
<issue_start>username_0: How can I align symbols in a plist? Take the following examples of default `'emacs-lisp-mode` indentation ``` '(:a 1 :b 2 :c 3) (defhydra h (:color amaranth :pre some-pre :post some-post) nil) ``` How can I achieve the following indentatio...
2018/03/11
495
1,794
<issue_start>username_0: I'm using a pressure sensor (mpx5010gp) and a plastic pipe connected to an arduino board to count the number of cars passing over it. Whenever the sensor value goes above a threshold *or an average*, that is calculated dynamically, as a car passes over the pipe, the counter goes up by one. The ...
2018/03/11
1,069
3,735
<issue_start>username_0: I am learning about Redis, and how its blazing fast since its an in-memory database. In my Django application, I have a Postgres table with about 1500 rows in it. The model only has two fields 'name' and 'occurrence'. To test out how much faster it would be to query for objects out of memory, c...
2018/03/11
1,259
4,361
<issue_start>username_0: I want to pass an object of the class as the argument in one of the methods of the same class. There are some answers on Stack Overflow, but they embrace very simple examples without methods. Yes, I know, that passing an object is not different from passing an integer. The problem is that whe...
2018/03/11
605
2,487
<issue_start>username_0: Is it possible to use the same nodeJS server for two/three different domains (aliases)? (I don't want to redirect my users. I want them to see the exact URL they typed in the address bar. However, all three domains are exactly the same!) I want my users to be logged in on all three domains at ...
2018/03/11
742
2,827
<issue_start>username_0: I'm quite new at this.... its to create a quote from three sections of the phrase: start. middle and end... and randomly select one from each. The code works but I didn't want to repeat the code underneath with the Math.floor/Math.Random three times. Any ideas on how to not repeat the code? ...
2018/03/11
690
2,554
<issue_start>username_0: Can someone explain to me why the following code gives an error? ``` #include using namespace std; template auto minimum(aa a, bb b) { if (a < b) return a; else return b; } int main() { cout << minimum(7, 5.1); } ``` > > inconsistent deduction for 'auto': 'int' and then 'double' > >...
2018/03/11
1,362
4,153
<issue_start>username_0: I made a procedure that uses a cursor to generate a report. It is designed to return products with `p_qoh > avg(p_qoh)`. When i run the cursor on its own outside of the procedure, APEX tells me > > PLS-00204: function or pseudo-column 'AVG' may be used inside a SQL > statement only > > ...
2018/03/11
1,214
4,089
<issue_start>username_0: I'm looking to use `AlarmManager` to launch a specific activity (ie. not my main one) and cannot seem to figure out how to do it. I can launch the main activity (the one that opens when the application is launched normally) using the code found in another answer, but I want to launch a specif...
2018/03/11
709
2,472
<issue_start>username_0: I have four divs on my document and I want to execute some code as long as at least two of them have the same text content. I'm having trouble finding a solution that doesn't include manually comparing each divs text content to every other divs text content `while(div1.textContent === div2....
2018/03/11
480
1,663
<issue_start>username_0: I am making a macOS app with Xcode 9.0.1 and Swift 4. I want to ask if the released app (.app file) can work on macOS earlier than 10.13 (e.g., 10.9 or 10.11) or will it work only on macOS 10.13?<issue_comment>username_1: The earliest version of macOS that will be able to run your application i...
2018/03/11
438
1,580
<issue_start>username_0: I'm trying to get a script to run on Bash to transfer files from my local machine to a remote computer on my network. The bash command is : `scp \local\path\ user@remoteip:\path\to\copy\onremote` This has worked alright so far, so I thought I'd automate it using a python script. This is what ...
2018/03/11
865
2,160
<issue_start>username_0: I have two list m.list and the other r.list. The m.list has `NA` values. For those that have `NA` values, I would like to replace it with elements from r.list. The problem is when I use `replace` function in R it is taking the index of the r.list and returns a incorrect value. Below is reproduc...
2018/03/11
1,020
2,987
<issue_start>username_0: could someone give me hand please, its my 3rd day learning JS and I am trying to add do while loop until rock, paper or scissors is entered to the prompt but it seems like it doesnt work, trying to figure it out for few hours now... With this code prompt always appears doesnt matter what I ente...
2018/03/11
739
1,800
<issue_start>username_0: I am trying to parse and extract values from my time data `2018-03-11 13:15:31.734874+01:00`. I'm using `strptime()` to do this with the `%Y %m %d %H:%M:%S.%f %Z` format but I am getting this error: ``` ValueError: time data '2018-03-11 13:15:31.734874+01:00' does not match format '%Y %m %d ...
2018/03/11
791
2,031
<issue_start>username_0: I'm saving ID's to object under key what representing range of numbers. ID is valid for given range: ``` let ranges = { "1-100": 102, "101-698": 47, "699-748": 999, ... } ``` As input I give you number and I need ID (`Example: num 50 = ID 102, num 500 = ID 47`). Doing this by: ``` l...
2018/03/11
873
2,376
<issue_start>username_0: I'm working on a project using ClamAV to scan several CentOS 7 machines and a Ubuntu 16.04 machine. We need to integrate the output into a SIEM solution, but Clam's output is incompatible; ``` ----------- SCAN SUMMARY ----------- Known viruses: 33840 Scanned directories: 145 Scanned files: 226...
2018/03/11
572
2,145
<issue_start>username_0: I am building a basic react app combined with the [Pokeapi](https://pokeapi.co). Whenever the user types something in the input field of my pokedex, I want to update the state to then (onSubmit) find this pokemon in the Pokeapi. Whenever I log the state (in the state update function), it logs ...
2018/03/11
514
2,027
<issue_start>username_0: I am entirely newbie in Amazon Web services. Currently i am developed a REST API service using Laravel's micro frameworks called Lumen. I am using passport for token based authentication and all that working fine. I need a proxy server to hide my actual endpoints and do some other functionality...
2018/03/11
5,556
18,722
<issue_start>username_0: I have a string that holds a very long sentence without whitespaces/spaces. ``` mystring = "abcdthisisatextwithsampletextforasampleabcd" ``` I would like to find all of the repeated substrings that contains minimum 4 chars. So I would like to achieve something like this: ``` 'text' 2 times...
2018/03/11
4,935
16,367
<issue_start>username_0: I'm trying to write to spanner some messages from google pub/sub. Writing to bigtable works, so nothing is missing at the fundamental level. I've upgraded to `google-cloud-dataflow-java-sdk-all` v2.3.0, which includes the SpannerIO sink. I've basically followed the example for writing from th...
2018/03/11
630
2,492
<issue_start>username_0: I accidentally find the following two templates can be overloaded(don't incur a name redefined error), which I think is counter-intuitive. ``` template void func(T) {} template int func(T) {return 0;} ``` From cppreference.com, there is a related paragraph: > > When an expression that us...
2018/03/11
918
3,093
<issue_start>username_0: I tried to develop app using Flutter(using Android studio IDE).Add flutter plugin & flutter SDK in studio and Everything is configured but emulator / real time device are not listed. Its shows error like "Unable to list devices: Unable to discover Android devices. Please run "flutter doctor" to...
2018/03/11
490
1,671
<issue_start>username_0: currently I loop through arrays and check if any objects contain a specific id. These objects have a `Id` property. ``` public class MyObj { public int Id {get; set;} } ``` So when checking the locked state I go for this code ``` bool IsUnlocked(int targetId) { bool isUnlocked = false;...
2018/03/11
365
1,347
<issue_start>username_0: I am working on `UISearchBar` on `Swift 4.0`. I have `originalList[ModelItem]` and `filterList[ModelItem]`. While in searching lets say user wants to delete on filterList 5th position which is 10th item on actual originalList. It make sense to delete this item from both of the list right? Items...
2018/03/11
1,327
2,449
<issue_start>username_0: I have a text file `1.txt:` ``` cam:45c62741b9c99e1dcf3c140e8e3df635::dv:<EMAIL>:192.168.3.11 gamer:3dabd5bd7984b0286eba52d4a7db2dea:$Wm?1Z3MPErXl7%yk^Pc#%iu\9LFc{:<EMAIL>:172.16.58.3 :adc0a54f8d21694848200ae043fa99f2:GqJ:<EMAIL>:172.16.58.3 ! Aa:da99417e29ab0aa67f97db64f091836b:k_P:<EMAIL>:17...
2018/03/11
974
2,849
<issue_start>username_0: There are tons and tons of post and blogs discussing this topic, but nothing seems to work... From across the internet, here is the common consensus regarding the procedure required to install and run `gdb`. 1. Install `gdb` ``` brew install gdb ``` Homebrew "successfully" installs `gdb v8...
2018/03/11
1,071
4,027
<issue_start>username_0: I'm trying to modify xml format by grouping the Elements. In below format, Article's first three elements (ID, NAME and CITY) will be used to group MEDIA elements, Meaning if (ID, NAME and CITY) elements are having the same information holding by other three elements in another article then ME...
2018/03/11
1,381
4,823
<issue_start>username_0: I want to get a multi sub comments. How can I it don't have to use foreach() { foreach() { } }... I have three models: **strony.php** model ``` class Strony extends Model { public function komenty() { return $this->belongsToMany('App\Comment', 'taxonomies')->withPivot('...
2018/03/11
605
1,942
<issue_start>username_0: ``` using System; using System.Collections.Generic; namespace c3 { class Program { static int sumaTotala; static void Main(string[] args) { int teza; int numberOfNotes; Console.WriteLine("Numar de note: "); numberO...
2018/03/11
628
1,849
<issue_start>username_0: Please, help. Why are numbers displayed without a space? How to make phone numbers displayed through a space? ``` var phoneBook = {}; function re(command) { if (command.split(" ")[0] == "ADD") { var name = command.split(" ")[1]; var numb = command.split(" ")[2].split(","); if (!...
2018/03/11
538
1,627
<issue_start>username_0: Install `g++ 3.3` on `Debian 8` `=>` not available. Compile with `g++ 4.9` and `-m32 and -g++-3.3.2 or -std=c++98 or -std=c++03` options but it doesn't work. There are header files missing. Do I have to install old Debian version and old `g++/gcc` to compile this old code ? ###### NEW I ins...
2018/03/11
1,750
5,151
<issue_start>username_0: I would like to obtain frequencies of technologies per date from pandas data frame. A reproducible example: ``` data = pd.DataFrame( {'dates': ['2017-01-31', '2017-02-28', '2017-02-28'], 'tech': [['c++', 'python'], ['c++', 'c', 'java'], ['java']]} ) ``` The end result...
2018/03/11
624
2,287
<issue_start>username_0: I want to call private function outside of module. In Ruby I can do it via `#send` method, but it's seems to me Elixir's `apply` doesn't work with private functions. ``` apply(ExAws.S3, :url_to_sign, ["bucket", "file.jpg", ExAws.Config.new(:s3), true]) ** (UndefinedFunctionError) function ExA...
2018/03/11
1,110
3,764
<issue_start>username_0: I am trying to write a function that will take a list of lists and print them out one by one with the word UNION between them. My code looks like this: ``` def printsql(lst): print("INSERT INTO table") for x in lst: print("SELECT") print(*x, sep=', ') print("UNI...
2018/03/11
962
3,402
<issue_start>username_0: I am trying to implement the Marker Cluster with the below code is not working. When i am trying to execute this, it is displaying the Marker but it is not Clustering the Markers. I have tried to fix this but i failed. Can anyone help me how to fix this issue?<issue_comment>username_1: The brut...
2018/03/11
711
2,590
<issue_start>username_0: If designing a setup.py and there are requirements that can be fulfilled through two different modules, i.e. only one of the two needs to be installed, how do I express that in the `install_requires` line? E.g. the `setup.py` looks like this: ``` setup( name='my_module', version='0.1.2...
2018/03/11
588
1,909
<issue_start>username_0: My program was killed while serializing data (a `dict`) to disk with `dill`. I cannot open the partially-written file now. Is it possible to partially or fully recover the data? If so, how? Here's what I've tried: ``` >>> dill.load(open(filename, 'rb')) Traceback (most recent call last): ...
2018/03/11
751
2,421
<issue_start>username_0: I am new in `graph_tool`. I have installed this library using [this tutorial](https://gist.github.com/v-pravin/949fc18d58a560cf85d2). Then I launched idle (Python 3) and tried to import it, but got this error: ``` Traceback (most recent call last): File "/home/ihor/CS/Python_lessons/graph_tool...
2018/03/11
754
2,362
<issue_start>username_0: I've been trying to add 2 matrices by using 2 for loops but I keep getting the error: `'int' object is not iterable` in the line `for i in len(B):`. What am I doing wrong? ``` def add (A,B): for i in len(B): for j in len(A): A[j][i] += B[i] return A A = [[2, 8], [3...
2018/03/11
899
2,980
<issue_start>username_0: ``` //connects to mongo $collection = (new MongoDB\Client)->mfrmls->properties; //takes array with data from array of objects foreach ($obj as $k => $v){ //prints to make sure on the right record. this works fine echo "object {$v['ListingId']} \n"; // cr...
2018/03/11
729
2,410
<issue_start>username_0: I wish to run some basic OpenGL programs however on compiling with g++ I get the error ``` fatal error: GL/glew.h: No such file or directory ``` I have the following headers in my code: ``` #include #include #include #include #include ``` How can I run OpenGL on Windows 10? I could n...
2018/03/11
704
2,324
<issue_start>username_0: I have folder structure like this: **root** **includes** 1. header.php 2. nav.php **category** 1. content.php 2. content\_form.php I am trying to include file header.php from includes folder such as include('includes/header.php') in content.php page but I am getting error. It says directo...
2018/03/11
835
3,120
<issue_start>username_0: The following is a simple DcContext that we use. We are now using hundreds of tables and we want to organize our DbSets into smaller classes ``` //Working Example //ApplicationDbContext.cs public class ApplicationDbContext : IdentityDbContext { public ApplicationDbContext(DbContextOptions op...
2018/03/11
620
1,989
<issue_start>username_0: I know this error occurs when there is an incompatibility in the function's declaration and definition. I as far I can see in this code, the type and parameters of the function's (int getline) declaration and definition are the same. ``` #include #define MAXLINE 1000 int getline(char line[],...
2018/03/11
486
1,850
<issue_start>username_0: What is actual UML diagram of Hierarchical inheritance,In some of tutorials Arrows are pointing towards base class and some are pointing towards sub class. I know Arrows point towards Base class always. But wondering is there any special case in Hierarchical inheritance so that some tutorial ...
2018/03/11
471
1,959
<issue_start>username_0: I have a xml page and I want to Display in RecyclerView and in xml have I have two button, but util buttons are in xml, program cant run and when I remove the buttons The problem is solve. xml: ``` ``` logcat: ``` Process: com.example.user.classmanager, PID: 10078 ...
2018/03/11
1,647
5,885
<issue_start>username_0: i have a program where i have to print to user after each successful step my program do, i have tried using `Lock` but it really slow down my program. Basically what i want to do is to print to user (ordered) each a succesful operation, like i have some code that perform post to certain pages ...
2018/03/11
1,671
6,026
<issue_start>username_0: I have written a pigLatin code and I need the code to ignore non characters i.e. I want them to stay where they are in a string. So for instance take `'1myth'`,when this is converted to piglatin I want it to be for example `1ythmway` where the number is not affected. I tried using regex but I c...
2018/03/11
1,451
4,441
<issue_start>username_0: I have a function here that replaces the elements that are multiples of 3 & 5 with "Fizz" and "Buzz" respectively. I ran the function and it only replaces the 1st element with "Fizz", and nothing else. I'm not sure why it only replaces the 1st element, since it doesn't match any of the if else ...
2018/03/11
435
1,348
<issue_start>username_0: I have a module that I stored in the site-packages directory as suggested by several sources. I can import other packages installed via pip from that directory. Here is a minimal test case with Python 3.6.3. THE MODULE MyStuff: ``` def Dummy() return(0) ``` TEST PROGRAM: ``` try: im...
2018/03/11
199
594
<issue_start>username_0: I have input on every line: ``` A B C D E F G ``` and I would like end result to be: ``` A;B;C D;E;F G ``` with `sed 's/$/;/'` I will replace end of line with semilocom, but I struggle with every nth part.<issue_comment>username_1: Shouldn't you be using Module.function() ? Upvotes: 0 <is...
2018/03/11
387
1,449
<issue_start>username_0: Trying to follow a tutorial, setting up a Wordpress theme from scratch and can't get the menu option to show. **functions.php** ``` php function appdevwp_theme_styles() { //featured theme support add_theme_support( 'post-thumbnails' ); //Menu register_nav_menus( array( ...
2018/03/11
983
2,520
<issue_start>username_0: I have `networkx v. 2.1`. to make it work w/ pandas dataframe, i tried following: * installed via `pip3`, this did not work generated `Atrribute Error` as in title, hence uninstalled. * re-installed with '`python3 setup.py install`" Error description. > > AttributeError: module 'networkx' ...
2018/03/11
751
2,258
<issue_start>username_0: I have a MongoDB collection `users` where I want to store a dictionary with dynamic keys. I want `users` to look like this within MongoDB: ``` { "_id": { "$oid": "5a9f5b3400e2f61a0c5f449b" }, "profile": { "votes": { dynamicKey1Here: { con...
2018/03/11
775
2,370
<issue_start>username_0: I am using scrapy to scrap a list of movies: ``` import scrapy class ScrapeMovies(scrapy.Spider): name='movies-to-see' start_urls = [ 'https://www.listchallenges.com/200-movies-to-see-before-you-die/' ] def parse(self, response): for film in response.xpath('//...
2018/03/11
720
2,133
<issue_start>username_0: The current code makes console prints true when `message == '<NAME>'`, but I need it to print false when the words are out of order. Elements in array1 should come first, elements in array2 should come second and I should be able to add more arrays after array2 if I wanted to. Examples of wh...
2018/03/11
674
2,663
<issue_start>username_0: I have the code below: ``` public static int Number() { bool done = false; while (done == false) { try { string[] numbers = { "1", "2", "3", "4", "5", "6" }; Console.WriteLine("Enter a number"); ...
2018/03/11
1,023
2,561
<issue_start>username_0: Why won't these `ifelse()`s don't throw data frames (or matrices)? ``` x <- data.frame(a=1000, b=100) > x a b 1 1000 100 > ifelse(x[, 2] >= 8, x, NA) [[1]] [1] 1000 > ifelse(x[, 2] >= 8, x[1:2], NA) [[1]] [1] 1000 > ifelse(x[, 2] >= 8, cbind(x[[1]], x[[2]]), NA) [1] 1000 ``` The se...
2018/03/11
656
2,136
<issue_start>username_0: I'm not sure if this is the question directly relate to Vue or JavaScript, but as it involves 'refs' from VueJs, i have posted question here. I've multiple input text elements in my DOM. They are named as txtScore1, txtScore2, txtScore3 etc. On my click button event I want to fetch the value f...
2018/03/11
1,314
5,229
<issue_start>username_0: I'm practicing DDD, and I have a class which is a so called `ValueObject`. Inside an `Entity` I have custom list of that `ValueObject`. I'm trying to persist that collection as JSON. I have the following classes: ``` public class User : Entity { public string Username {get;set;} priv...
2018/03/11
609
2,167
<issue_start>username_0: I am building a two player game in react/redux. There is always one player whose turn it is. The turn needs to change regularly between the two. I have the following reducer. It works once, and then stops working. ``` case CHANGE_TURN: if (playerTurn === 1) { newPlayerTurn =...
2018/03/11
999
3,357
<issue_start>username_0: I am trying to implement a function that will shift a particular element in a numpy 2d array a desired number of spaces in a given direction. Empty spaces should be filled with 0's. This function will take as input a numpy array, the x and y coordinates, a desired direction, and the number of s...
2018/03/11
408
1,363
<issue_start>username_0: Consider the below ReactJs component: ``` import React from 'react'; const TestOptions = (props) => ( - props.clickTestOptions(event)}> { React.createElement( 'div', { className: 'opt-wrap', dangerouslySetInnerHTML: { \_\_html: props.details.answer } } ) } ); export default T...
2018/03/11
843
3,582
<issue_start>username_0: My current code is as shown below. I am wondering how do i unsubscribe (disconnect the ble) after writeCharacteristic? Also, is there a way to reconnect on writeCharacteristic fail? ``` Subscription subscription = device.establishConnection(false) .timeout(5000, TimeUnit....
2018/03/11
436
1,071
<issue_start>username_0: Imagine I have an array: ``` x = np.array(['1', '3', '5', '4', '8', '2']) ``` The goal is to add a whitespace element after each series of 2 terms. What should I do to get this resulting array? ``` ['1', '3', ' ', '5', '4', ' ', '8', '2'] ``` Thank you!<issue_comment>username_1: You can u...
2018/03/11
1,639
4,180
<issue_start>username_0: I have a large matrix (236680\*236680), and my pc does not have sufficient memory to read in the complete matrix so that I am thinking the Scipy sparse matrix. My goal is to multiply a generated matrix (not sparse) by np.eye(the number of observation)-np.ones(the number of observation)/the numb...