date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/21
585
1,711
<issue_start>username_0: Is there a simple way to find all binary strings whose digits add up to a value of x points, assuming that all ones are worth 2 points, and all zeros are worth 1 point. Let me explain: Considering that I receive a number 5, how could I get all possible strings such that 2\*(number of ones) + 1...
2018/03/21
743
3,376
<issue_start>username_0: I used Oracle for the half past year and learned some tricks of sql tuning,but now our DB is moving to greenplum and the project manager suggest us to change some of the codes that writted in Oracle sql for their efficiency or grammar. I am curious that Are sql tuning ways same for different D...
2018/03/21
4,754
10,288
<issue_start>username_0: Im trying to run docker with tensorflow using Nvidia GPUs, however when I run my container I get the following error: ``` pgp_1 | Traceback (most recent call last): pgp_1 | File "/opt/app-root/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in pgp\_1 | from t...
2018/03/21
596
2,076
<issue_start>username_0: I've been following <NAME>'s [Pro Git Book](https://git-scm.com/book/en/v2) and I'm reaching the end of chapter 3 in which we have just done a three way merge. See the diagram below (my own drawn diagram not a screen grab of the book): [![enter image description here](https://i.stack.imgur.com...
2018/03/21
579
2,193
<issue_start>username_0: I am doing an ordering app in android studio. I want to show the list of orders when the "cart" button is clicked Here is what I have when "order" button is clicked ``` btnCart.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ...
2018/03/21
589
2,456
<issue_start>username_0: I define mSelectedItem as a public var in the class CustomAdapter, I think `mSelectedItem=getAdapterPosition()` will be Ok when I use mSelectedItem in inner class ViewHolder. But it failed, and display "Unresolved reference: mSelectedItem" error, why? And more, what is good way for `getAdapte...
2018/03/21
1,483
4,898
<issue_start>username_0: I'm trying to have a header banner in my html assignment however I cannot get the header image to appear.. or any background-image. Here is my code All of the files are in a folder named `assign1_1`, images are in a folder named `images`, css is in a folder named `styles`. Everything else in...
2018/03/21
598
1,864
<issue_start>username_0: Run the the following C++ program twice. Once with the given destructor and once with `std::fesetround(value);` removed from the destructor. Why do I receive different outputs? Shouldn't destructor be called after function `add`? I ran both versions on <http://cpp.sh/> and Clang++ 6.0, and g++ ...
2018/03/21
648
2,441
<issue_start>username_0: I'm learning a lot about a11y and making my site WCAG AA compliant and I'm finding big-name sites all over the web that seem to violate contrast ratios. For example, here is a screen shot from DuoLingo with color contrast ratios for text all below 3.0: <http://prntscr.com/iu2syg> I also unders...
2018/03/21
815
2,799
<issue_start>username_0: I've been unable to get my test jasmine test suite running with webpack 4. After upgrading webpack, I get the following error for almost every test: ``` Error: : getField is not declared writable or has no setter ``` This is due to a common pattern we use to create spys for simple function...
2018/03/21
513
1,462
<issue_start>username_0: ``` #include using namespace std; int main() { int x; cout << "How many rows would you like? " << endl; cin >> x; cout << endl; cout << "Number| Power 1| Power 2| Power 3| Power 4| Power 5" << endl; for (int j=0; j<=x; j++) { cout << j << "\t" << j << "\t" << pow(j,2) << "\t" << po...
2018/03/21
460
1,442
<issue_start>username_0: ``` if __name__ == '__main__': string =[' \n Boeing Vancouver\n ', '\n Airbus\n ', '\n Lockheed Martin\n ', '\n Rolls-Royce\n ', '\n Northrop Grumman\n ', '\n BOMBARDIER\n ', '\n Ray...
2018/03/21
791
2,785
<issue_start>username_0: Lets say I have a constructor or a method with 3 integer arguments. Object.h ``` Object::Object(int alenght, int awidth, int aheight); ``` Is there a way to make sure at compile type that I pass them in the right order? ``` int l = 10; int w = 15; int h = 5; ``` main.cpp ``` Object myOb...
2018/03/21
1,678
5,573
<issue_start>username_0: Hi everyone I have the next Table ``` Name | Gender | Count(Gender) BBC | M | 31 BBC | F | 1 BBC | B | 3 BBC | N | 160 M: Male F: Female B: Both N: Not Specified ``` I need to group this in only three categories. M, F, N. How can I make a Case ...
2018/03/21
1,195
3,063
<issue_start>username_0: When i cast datetime in SQLLite, it truncates the string. for example ``` select cast("2017-04-23 9:12:08 PM" as datetime) as dt ``` returns ``` 2017 ```<issue_comment>username_1: The closest I could come up with is: ``` select date(datetime(strftime('%s','2017-04-23 09:12:08'), 'unixepoc...
2018/03/21
663
2,320
<issue_start>username_0: ``` Mixed Content: The page at 'https://yourwebsite.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://otherwebsite.com/'. This request has been blocked; the content must be served over HTTPS. ``` After running into this error a few times, I have learned in...
2018/03/21
885
3,798
<issue_start>username_0: As the title says, I'm trying to create a mechanic that decides what landing the third person controller should play. The player has a "HardLanding" and a "NormalLanding" animation. At first I tried achieving this with a timer, but this doesn't deliver the expected behaviour (When the player ju...
2018/03/21
1,135
4,224
<issue_start>username_0: I recently was reading a JavaScript book and discovered using innerHTML to pass plain text poses a security risk, so I was wondering does using the `html()` jQuery method pose these same risks? I tried to research it but I could not find anything. For Example: ``` $("#saveContact").html("Save...
2018/03/21
861
3,579
<issue_start>username_0: I'm trying to understand how I can do a signature capture in React Native. My App is created with `create-react-native-app` and `Expo` and I'd prefer to not have to eject the app to get this functionality to work. Would it be possible to wrap something like this in a webview? <https://github....
2018/03/21
2,692
7,592
<issue_start>username_0: I'm having some trouble coming up with a working algorithm for the following problem. Given determined quantities of available coins from 100, 50, 25 and 10 cents, I need to find how to fit a combination of these coins into a given value x. (it doesn't have to be optimal, any combination from ...
2018/03/21
513
2,007
<issue_start>username_0: I have a table called mytable that has four fields (id, field2, field3, field4). I want to make another table called tablecopy that will take components from mytable. In one field I want to copy over JUST the column name and pk constraints from mytable. Then in the other fields of tablecopy I ...
2018/03/21
944
3,276
<issue_start>username_0: I am going through 'The C language by K&R'. Right now I am doing the bitwise section. I am having a hard time in understanding the following code. ``` int mask = ~0 >> n; ``` I was playing on using this to mask n left side of another binary like this. 0000 1111 1010 0101 // random number ...
2018/03/21
2,638
7,134
<issue_start>username_0: In the picture below are three groups of touching squares where each individual square is numbered. [![enter image description here](https://i.stack.imgur.com/XaBTum.png)](https://i.stack.imgur.com/XaBTum.png) I have been able to use the spatial library ArcPy to construct the dictionary below...
2018/03/21
507
1,619
<issue_start>username_0: How do I hide an entire table column in printing mode (using JS javascript:print())? Because I'm using Bootstrap I tried its .hidden-print class to hide the last column (Operation column) in printing mode: ``` | No | Name | Operation | | --- | --- | --- | | 1 | <NAME> | [Edit](edit.php) [De...
2018/03/21
857
2,576
<issue_start>username_0: I am trying to create horizontal bar plot and would like to fill the individual bar as per their log fold values, white for lowest value and darkest for highest value. However, I am not able to do it. Here is my work, can somebody help me fix it? ``` df <- data.frame(LogFold = c(14.20, 14.00,...
2018/03/21
1,050
4,154
<issue_start>username_0: I cannot uncheck initial radiobutton after setting default checked button. Problem situation :: XML Code ----------------------------- ``` ``` ### Problem situation :: Initial state -> Works well [![enter image description here](https://i.stack.imgur.com/ZdXfX.png)](https://i.stack.imgur.c...
2018/03/21
384
1,187
<issue_start>username_0: I have an empty list and I want to append to it a raw string. For example, I have list1 = [] and I want to append the following string '\"quote\"', so I would get ['\"quote\"']. However when I do the following ``` list1 = [] text = '\"quote\"' list1.append(text) list1 ``` I get ['"qu...
2018/03/21
310
1,157
<issue_start>username_0: I'm trying to understand the details of WCAG AA compliance. Would the unselected checkboxes in this image be considered too low-contrast to be compliant? [![Heading Yesterday with a group of checkboxes: Last 7 days, Last 30 days, All time, Custom Range. The Last 7 days checkbox is checked. The...
2018/03/21
629
2,563
<issue_start>username_0: Java is saying there is an error on the code below and I cant find it. I have indicated the 2 problem lines with a comments right above the lines reading "Problem line" and I have indicated the method closely related to this problem lines with a "Closely related" comment right above it. The err...
2018/03/21
536
1,901
<issue_start>username_0: I have a table with following columns: item (varchar) date (date) revision (datetime) value (numeric) I have this SQL statement that finds the last revision for each item: ``` select item, max(revision) as 'last_revision' from [mytable] group by item ORDER BY last_revision ASC ``` Howeve...
2018/03/21
560
2,074
<issue_start>username_0: When I run this code, ``` public static void read_all_lines(){ String file_name = "input.txt"; File input_file = new File(file_name); Scanner in_file = null; try{ in_file = new Scanner(input_file); } catch(FileNotFoundException ex){ System.out.println("E...
2018/03/21
460
1,682
<issue_start>username_0: In numpy, when I have a vector with size `(m,)` and another vector with size `(m, 1)`, adding the two gives a matrix with size `(m, m)`. However, I just want the vector result. How do I go about doing this? Edit: I am in fact using tensorflow and the `(m, 1)` vector is actually `(m, ?)`. Howev...
2018/03/21
403
1,555
<issue_start>username_0: I have this code for parsing RSS to HTML. ``` php $channel_desc = $channel-getElementsByTagName('description') ->item(0) ->childNodes ->item(0) ->nodeValue; ``` I want to get only 150 char...
2018/03/21
443
1,524
<issue_start>username_0: Would it be possible to alert and block submission of a simple form if it has a url in it? Or, to be more specific. I need it to block any of these input types: > > https //domain.com/... > > > or > > www domain.com// > > > or > > domain.com > > > The form must accept anything...
2018/03/21
382
1,544
<issue_start>username_0: I am an experienced BizTalk developer who is now moving on to Azure logic apps. I have installed Visual Studio 2017 and added the "Azure Logic Apps Tools for Visual Studio" through the **Tools|Extensions and Updates** menu. However, I don't see an option for creating/editing XML schemas(.xsd fi...
2018/03/21
291
1,133
<issue_start>username_0: I have a couple questions in Kafka. 1) Does Kafka have a default web UI? 2) How can we gracefully shutdown a standalone kafka server, kafka console- consumer/console-producer. Any solutions will be highly appreciated. Thank you.<issue_comment>username_1: 1) No Kafka does not have a default...
2018/03/21
508
1,769
<issue_start>username_0: I have searched for this error, in the context of jQuery and data tables, and none of the suggestions worked (in case this is marked duplicate immediately!) I have .Net project (C#) and in master page I have references to jQuery, Datatables and date picker (among other things): ``` ``` In a...
2018/03/21
1,439
3,974
<issue_start>username_0: I have a menu that spans across the page. I have its wrapper set to 100% and correctly, it spans completely across its container. I have for menu items set at 25% each however, there is around 20px space to the left of the menu revealing the background color. Regardless of sizes and margin:0 au...
2018/03/21
417
1,478
<issue_start>username_0: I have a TextField named `custDoe_TextField` and I have set the editability disabled as follows: ``` custDoe_TextField.setEditable(false); ``` Now I want to check if the editability is disabled or not and I planned to use `if` function as follows: ``` if (custDoe_TextField.setEditable == fa...
2018/03/21
2,444
9,356
<issue_start>username_0: I was working on a project where we wanted to validate that a parameter could actually be raised as an exception if necessary. We went with the following: ``` def is_raisable(exception): funcs = (isinstance, issubclass) return any(f(exception, BaseException) for f in funcs) ``` This ...
2018/03/21
884
2,997
<issue_start>username_0: I am posting on Postman to my api route (in api.php) and when the data fails in validation, it returns me the errors in 200 response under this: [![enter image description here](https://i.stack.imgur.com/4CeCE.png)](https://i.stack.imgur.com/4CeCE.png) The above response is when I try: ``` {...
2018/03/21
779
2,785
<issue_start>username_0: appending a form field value to the next url. I am trying to pass a form field value on form submission to the next page URL. So far; **The form snippet:** ``` <NAME> ``` At the script section where the url for the next page is created; ``` var fn = document.getElementById('first\_...
2018/03/21
624
2,216
<issue_start>username_0: I've recently published my very first app to Play Store. I asked a friend to download and test it and it crashed on his phone. However, I have an exact phone as him with the same version of Android, and when I tested it the app runs without error. So what do I need to know about a device to re-...
2018/03/21
964
3,059
<issue_start>username_0: I am reading a snippet of TensorFlow [codes](https://github.com/davidsandberg/facenet/blob/28d3bf2fa7254037229035cac398632a5ef6fc24/src/compare.py#L85) (line 85-89) and get confused. I made some changes to clarify: ``` with tf.Graph().as_default(): gpu_options = tf.GPUOptions(per_process_g...
2018/03/21
395
1,402
<issue_start>username_0: When setting up a Google App Engine instance you can configure a [cron.yaml](https://cloud.google.com/appengine/docs/standard/python/config/cronref) to set up Cron jobs. There does not seem to be any documentation on how to configure jobs that run say every 30 seconds. I tried ``` schedule: ...
2018/03/21
796
2,412
<issue_start>username_0: I have this following program for map with custom keys: ``` class MyClass { public: MyClass(int i): val(i) {} bool operator< (const MyClass& that) const { return val <= that.val; } private: int val; }; int main() { MyClass c1(1); MyClass c2(2); MyClass c3(3); m...
2018/03/21
1,662
5,441
<issue_start>username_0: I keep on getting error squiggles on std::string\_view, but I am able to build just fine. Is there a way to tell intellisense or the C++ linter to use C++17? The specific error I get is: ``` namespace "std" has no member "string_view" ```<issue_comment>username_1: There's a posting in their ...
2018/03/21
1,291
3,789
<issue_start>username_0: I have a table called `votes` with 4 columns: `id`, `name`, `choice`, `date`. \*\*\*\*`id`\*\*\*\*`name`\*\*\*\*`vote`\*\*\*\*\*\*`date`\*\*\* \*\*\*\*`1`\*\*\*\*\*`sam`\*\*\*\*\*\*\*`A`\*\*\*\*\*\*`01-01-17` \*\*\*\*`2`\*\*\*\*\*`sam`\*\*\*\*\*\*\*`B`\*\*\*\*\*\*`01-05-30` \*\*\*\*`3`\*\*\...
2018/03/21
1,290
4,058
<issue_start>username_0: In my project, I have a table and I have fetched data to that table using a while loop. Here's is the code for that. ``` ### Return Document | No | Document ID | Put the tick for returns | | --- | --- | --- | php while ($\_r = mysqli\_fetch\_assoc($q\_set)) { ?| php echo $\_r['n...
2018/03/21
892
2,924
<issue_start>username_0: For the record, I've read these following threads but none of them seems to fulfill my need: * [Python pandas - filter rows after groupby](https://stackoverflow.com/questions/27488080/python-pandas-filter-rows-after-groupby) * [Pandas get rows after groupby](https://stackoverflow.com/questions...
2018/03/21
436
1,313
<issue_start>username_0: I need to find the parameters in a method which is a `string` ``` "MyMethod1(int a ,int b){Console.WriteLine("the sum is"); return(a+b);}" ``` **Required output** ``` "int a ,int b" ```<issue_comment>username_1: You can use this ``` (?<=\().*?(?=\)) ``` **Explanation** * Positive Look...
2018/03/21
1,221
4,576
<issue_start>username_0: How to determine the exact error message instead of `Illegal argument Exception`? I am using a visual studio and avd manager to launch android emulator. The following is the code but when I click the `click` button, the error message is just `ILLEGAL ARGUMENT EXCEPTION`. **index.html** ``` ...
2018/03/21
951
3,629
<issue_start>username_0: I want to detect a credit card sized card in image. The card can be any card eg identity card, member card. Currently, I am thinking to use Canny Edge, Hough Line and Hough Circle to detect the card. But the process will be tedious when I want to combine all the information of Hough Line and Ho...
2018/03/21
843
2,921
<issue_start>username_0: If bar calls bar(i/2) if i is an even integer and bar(3\*i + 1) otherwise, the recursive function bar would tail-recursion. ``` const int bar(const int i) { if (i < 2) return i; return i % 2 ? bar(i/2) : bar(3*i + 1); } ``` However, what if bar calls either bar or foo, who has a comple...
2018/03/21
523
1,660
<issue_start>username_0: I have a table with a bunch of columns, but we only need to look at two of them. I'm trying to join another table on this table, but all we know about these two columns is that one will be null and the other won't: ``` client_id | note_id ``` The main table wants to join `client_id` (if not ...
2018/03/21
1,475
3,838
<issue_start>username_0: Background -> I'm trying to remove all old forest out of certain forest types by using the overlay function. If the forest is type 1 and the age is > 250, then I want that cell to be 0, if it's type 2 and > 200 I want it to be 0, otherwise it can be what it is. Problem -> I get two different ...
2018/03/21
1,955
7,438
<issue_start>username_0: I am using MySQL server via Amazon could service, with default settings. The table involved `mytable` is of `InnoDB` type and has about 1 billion rows. The query is: ``` select count(*), avg(`01`) from mytable where `date` = "2017-11-01"; ``` Which takes almost 10 min to execute. I have an i...
2018/03/21
555
1,790
<issue_start>username_0: Using <https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/group_post_members> to add a member to a group ``` POST /groups/{id}/members/$ref { "@odata.id": "https://graph.microsoft.com/v1.0/users/xxx@yyy.com" } ``` returns error ``` { "error": { "code": "Requ...
2018/03/21
762
3,035
<issue_start>username_0: I'm trying to follow a course to create apps using C#, unfortunately I'm using a Mac so I can't follow all the step as the y do it on the videos. I.E. the method to create an empty class is different, Had to manually include the Entity Framework Dependency and create the Models folder.... but n...
2018/03/21
844
3,041
<issue_start>username_0: I have KIE Workbench deployed on Minishift instance. I want to clone the repository. First of all I know, I should make ssh port reachable. To do this I use the following command: ``` $ oc port-forward workbench-1-vfd6k 8001:8001 ``` To check the port exposed as expected, I use 'telnet' and...
2018/03/21
892
2,823
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/TYhC5.png)](https://i.stack.imgur.com/TYhC5.png) I am getting Unexpected token on the `React Component Name` while running `npm test`. Tried reading several other similar questions but none seems to be working for me. I have added cont...
2018/03/21
359
1,328
<issue_start>username_0: > > ImportError: Could not find 'nvcuda.dll'. TensorFlow requires that > this DLL be installed in a directory that is named in your %PATH% > environment variable. Typically it is installed in > 'C:\Windows\System32'. If it is not present, ensure that you have a > CUDA-capable GPU with the ...
2018/03/21
1,568
5,314
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/Ym9GR.png)](https://i.stack.imgur.com/Ym9GR.png) I want to give name to the green and right pin annotation above. I see a video tutorial, and he can give name to the annotation by using `annotation.title =` but I don't know why I can ...
2018/03/21
464
1,442
<issue_start>username_0: I am trying to run a Python script a.py from another Python script scheduler.py and I want to pass a list as argument something like: Scheduler.py: ``` t = {"code": 161123134, "name": "task2", "domain": "www.google.com", "type": "Type1", "keywords": ["bai2", "yin4", "jiao3", "yi8", "ping1", "...
2018/03/21
1,031
3,053
<issue_start>username_0: I'm using Window Linux Subsystem (Debian stretch). Followed the instruction on Docker website, I installed docker-ce, but it cannot start. Here is the info: ``` $ sudo service docker start grep: /etc/fstab: No such file or directory [ ok ] Starting Docker: docker. $ sudo service docker status ...
2018/03/21
983
2,911
<issue_start>username_0: I have imported numpy library in my python code. Now my question is, is it possible to get a list of all the functions that are covered under the numpy library? I know documentation is a thing, but I am looking for something else. I use spyder.<issue_comment>username_1: Perhaps a good signal <...
2018/03/21
1,202
3,560
<issue_start>username_0: My colleague and I have been on a six month quest for a VBA macro that can run in a Read-Only, password protected PowerPoint. Is it possible or will PowerPoint always block the VBA macro from running in the presentation, because of the read-only status? ``` Private Sub CheckBox1_Click() Dim p...
2018/03/21
1,251
4,842
<issue_start>username_0: I use work with relationship in laravel 5.6. I create `product` table with migration: ``` Schema::create('products', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('slug'); $table->text('description'); $ta...
2018/03/21
866
3,574
<issue_start>username_0: I am migrating a code that I myself made in Java to Scala which does an aggregation in MongoDB. But I was stuck on how to accumulate the results of aggregation inside a collection using MongoDB Scala Driver. Java code: ``` mongoCollection.aggregate(aggregatePipeline) .map(document -> { ...
2018/03/21
581
1,845
<issue_start>username_0: I have an array of strings. I want to search in that array for and string that contains a specific string. If it's found, return that string WITHOUT the bit of the string we looked for. So, the array has three words. "Strawbery", "Lime", "Word:Word Word" I want to search in that array and f...
2018/03/21
656
2,625
<issue_start>username_0: I am trying to get a better hang of doing this and have been playing around with strings. What I am trying to do is collect a user input as a string and manipulate it so that when I display the text, whatever they wrote would be first displayed in all lower case, then all uppercase, then all of...
2018/03/21
598
2,243
<issue_start>username_0: I know how to get a data attribute using .data('id') for example.. But I cannot figure out how to get the "attachment\_id" value contained within "data-kgvid\_video\_vars" ? this is what im trying to get it into so I can then use it elsewhere.. ``` alert(jQuery(this).find('.kgvid_videodiv')....
2018/03/21
749
2,370
<issue_start>username_0: I have password-protected .xls files in a directory. I would like to open each of these files and save them without the password. However, the files can be opened by using either of the sample passwords listed below. ``` pwd1 = "123" pwd2 = "456" pwd3 = "789" 'Check if pwd1 opens Applicatio...
2018/03/21
651
2,170
<issue_start>username_0: The line and the commented line below produces the same results: ``` public class StringEscapeMain { public static void main(String[] args){ String fileName = "C:\\Dev\\TryEclipseJava\\StringEscape\\\\\\f.txt"; /* String fileName = "C:\\Dev\\TryEclipseJava\\StringEscape\\f...
2018/03/21
816
2,856
<issue_start>username_0: I'm following the [example](https://www.styled-components.com/docs/advanced#media-templates) in the docs for creating media templates, and I'm really struggling to type the arguments to pass to the `css` function (plain JS version from example): ``` const sizes = { desktop: 992 } const medi...
2018/03/21
671
2,225
<issue_start>username_0: I have an array A of 1s and 0s and want to see if the larger array of bits B contains those bits in that exact order? Example: A= [0 1 1 0 0 0 0 1] B= [0 1 0 0 1 1 0 0 0 0 1 0 1 0 1] would be true as A is contained in B Most solutions I have found only determine if a value IS contained in ano...
2018/03/21
809
3,013
<issue_start>username_0: I have the following tables user table, post table and profile table. the post belongs to a user and the profile belongs to a user. I also have a forum were people can post I want the users username to show instead of their name. But The username is in the profiles table and I don't know how to...
2018/03/21
1,164
4,029
<issue_start>username_0: Visual C++ 2017 compiles the following cleanly, calling the user-defined `log`: ``` // Source encoding: UTF-8 with BOM ∩ #include // std::for\_each #include #include // ::(sin, cos, atan, ..., log) #include // std::string void log( std::string const& message ) { std::clog << "-- log entr...
2018/03/21
404
1,714
<issue_start>username_0: Currently I have a service that returns that returns a list of parameters. if there are 4 parameters I need to perform one request per parameter to the same endpoint using the each of the parameter. After that I need to save the list of results of all the request into a collection. If I don't k...
2018/03/21
696
2,000
<issue_start>username_0: Here is the code ``` class A { x = 0; y = 0; visible = false; render() { } } type RemoveProperties = { readonly [P in keyof T]: T[P] extends Function ? T[P] : never//; }; var a = new A() as RemovePropertiesa.visible // never a.render() // ok! ``` I want to remove " vi...
2018/03/21
538
2,082
<issue_start>username_0: I have successfully use JSch library to create a SSH connection to a server, but I have trouble figuring out how to add the subsystem NETCONF to SSH connection. When doing it manually, the command line that establishes SSH connection with sybsystem NETCONF is `ssh -p 4444 nerconf@myserver -s n...
2018/03/21
1,596
6,471
<issue_start>username_0: I have a Spring boot application that requires the use of properties in files different from the standard application.properties. I wanted to map my properties files to a specific properties class and be able to use the properties class inside of a Configuration class. The code is the following...
2018/03/21
2,943
11,608
<issue_start>username_0: I using [Node-Mongo-Native](https://github.com/mongodb/node-mongodb-native) and trying to set a global connection variable, but I am confused between two possible solutions. Can you guys help me out with which one would be the good one? 1. Solution ( which is bad because every request will try ...
2018/03/21
1,258
2,982
<issue_start>username_0: I have a series that looks like this: ``` s = pd.Series(['abdhd','abadh','aba', 'djjb','kjsdhf','abwer', 'djd, 'kja']) ``` I need to select all rows whose strings begin with 'dh' or 'kj' I attempted to use .startswith() and .match(); but i get boolean returns of True and False instead of th...
2018/03/21
1,582
3,958
<issue_start>username_0: The following recursive method is intended to produce a Fibonacci number for a given integer (written in Java) ``` public static long fib(int n) { if (n == 0) return (long)0; else if (n == 1) return (long)1; else return fib(n - 1) + fib(n - 2)...
2018/03/21
638
2,471
<issue_start>username_0: I'm using Spring frameworks for my Java Project. When I start the module sometimes spring beans are not correctly initialized and the bean will be null and program will have exception (Null Pointer Exception) . Is there any way to make sure that during start up all the beans are initialized pro...
2018/03/21
679
2,585
<issue_start>username_0: In Angular Documentation I frequently found the word data-bound properties, but meaning of that I searched in google and found [What is data-bound properties?](https://stackoverflow.com/questions/39367423/what-is-data-bound-properties) It not fully explained in the answer. Under the answer p...
2018/03/21
299
1,077
<issue_start>username_0: I am new to JetBrains Rider and find it extremely handy for C# developing. Just in our solution we have a certain type of exception that is thrown frequently. When I debug I don't want it to break on this type of exception while I do want it to break on all other exceptions thrown. It can be ea...
2018/03/21
551
1,999
<issue_start>username_0: I got 2 cases for a class, one is like this: ``` class User { private val name:Name = NameGenerator() fun sayName() { println(this.name.fakeName) } } ``` The other one is: ``` class User(suggestion:String) { private val name:Name = NameGenerator(suggestion) fun...
2018/03/21
1,220
4,625
<issue_start>username_0: I'm working on Recyclerview, and I want to set an image to center imageview from Recyclerview's selected item [![enter image description here](https://i.stack.imgur.com/gaLkD.jpg)](https://i.stack.imgur.com/gaLkD.jpg) > > Error : You must pass in a non null View > > > here I'm trying to...
2018/03/21
625
2,355
<issue_start>username_0: I'm fairly new to Git and Github and also gotten very confused at Git's vast array of command line. Today I push my commit like usual and create a pull request. But when my coworker tries to merge, it shows: > > This branch has conflicts that must be resolved > > > Use command line to resol...
2018/03/21
1,010
3,660
<issue_start>username_0: How do I disable the second set of radio buttons if the radio button on the first set is set to Yes? And enable if set to No? First set: ``` No Yes ``` Second set: ``` No Yes ```<issue_comment>username_1: ```js // Onload disable $.each($("input[name='xsecondset']"), function(index, rad...
2018/03/21
6,419
12,212
<issue_start>username_0: I understand that Numpy can generate index of an array given the value that we are looking for with `numpy.where`. My question: Is there a function that can generate index **given multiple values**. For example, with this array ``` a = np.array([1.,0.,0.,0.,1.,1.,0.,0.,0.,0.,...,1.,1.]) ``` ...
2018/03/21
633
2,427
<issue_start>username_0: For example, I log in and selected `en` as my language and then I select `zh` (chinese) and then log out. Is there any way to retain the localization after you log-out the app? this is the way I implement locale. web.php: `Route::post('change-locale', 'LocaleController@changeLocale')->name('...
2018/03/21
470
1,434
<issue_start>username_0: So I try to make a map and then choose its begin() as first iterator position. Then I try to use it in a range based for loop. Have a look at this code here: ``` long int lilysHomework(map& a,int n,map& p) { long int c=0; map::iterator pos; pos=p.begin(); for(auto& elem : a) { if((pos-...
2018/03/21
1,008
3,967
<issue_start>username_0: I'm very new at Java and I have been trying to figure this out, the assignment is to let the user put in an undefined amount of integers into the program and then the program should be able to dived and then print out the # of integers into each category. The categories are Integers that are ov...
2018/03/21
1,636
5,690
<issue_start>username_0: I'm working on an application in Python that takes a list provided by a program and attempts to process the text for closed captioning. I’m using IBM Watson to transcribe audio files, then return a JSON with the transcribed words and a timestamp that notes the start time and end time of each wo...
2018/03/21
761
2,852
<issue_start>username_0: I'm trying to import my excel to my database but the problem is that i get nothing in my array of inserts. When i try to dd($inserts), it only shows me "[]". ``` public function importExcel() { $path = Input::file('import_file')->getRealPath(); $inserts = []; Excel::load($path, f...
2018/03/21
859
2,891
<issue_start>username_0: I have a case class that represents 3D vectors and I'm trying to use traits to mark each one with reference frames relevant to each problem domain. More specifically, I'm trying to do something like this: ``` trait bFrame type bVector = Vector with bFrame /** Inertial position of the point re...
2018/03/21
274
904
<issue_start>username_0: I have a csv and I need to be able to print the total number of records how is this done? I have tried using sum statements and count but nothing seems to be working<issue_comment>username_1: Try this: ``` with open(adresse,"r") as f: reader = csv.reader(f,delimiter = ",") data = list(...