date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/14
1,139
4,069
<issue_start>username_0: I have a simple jenkins pipeline build, this is my jenkinsfile: ```groovy pipeline { agent any stages { stage('deploy-staging') { when { branch 'staging' } steps { sshagent(['my-credentials-id']) { ...
2018/03/14
1,361
5,280
<issue_start>username_0: I'm trying to develop a library that try to detect auto-click on a page. The library will be imported on several different pages, some will have jquery, some other will not, or will have other different libraries, so my solution should be **vanilla javascript**. the goal is to have several sec...
2018/03/14
902
3,495
<issue_start>username_0: I want to change the height and width of glyphicon-comment and how to display text inside the glyphicon-comment.i am using predefined comment which is present in the bootstrap.when i try to change the height and width by using inline style it is not working.but if i changing the color of commen...
2018/03/14
416
813
<issue_start>username_0: ``` list = [(u'SFG2',), (u'FG2',), (u'FG3',), (u'SFG1',), (u'RM1',), (u'RM2',), (u'RM3',), (u'FG1',)] ``` expected output: ``` u'SFG2' u'FG2' u'FG3' ```<issue_comment>username_1: Iterate over your list and use `index`. **ex:** ``` my_list = [(u'SFG2',), (u'FG2',), (u'FG3',), (u'S...
2018/03/14
1,286
5,891
<issue_start>username_0: I am new in swift moved from java. And some implementaion of dessign patterns confuse me. For example I have presudo pattern observer (callback) in java code (there is example below). Namely UI passed own listener to Manager class and listen callbacks isConnected and isDisconnected. If a callb...
2018/03/14
523
1,707
<issue_start>username_0: I have HashMap where key is bird specie and value is number of perceptions. Here is my code: ``` public class Program { public static void main(String[] args) { HashMap species = new HashMap<>(); Scanner reader = new Scanner(System.in); species.put("hawk (buteo jamaicensis)", 0); spe...
2018/03/14
443
1,566
<issue_start>username_0: There is somthing wrong with the page I want to test. My first try: When I clicked manually on a button, then I will be forwarded normally on the next page. When I tried to click on the same button with selenium, then I get an error page "Sorry...something gone wrong...blabla". I think this p...
2018/03/14
2,700
6,800
<issue_start>username_0: Ok so there are a number of questions like this but after having experimented with the code in some of the answers given to other similar questions, I'm still stuck! I've managed to get 2 flex rows working in a flex column, with the brand image vertically centered, but I'm having trouble with ...
2018/03/14
1,025
3,776
<issue_start>username_0: I have a problem where the order of de index of the loop keeps changing in the callback. See the code below for what I've tried, the goal I'm trying to achieve is to add markers based on the available layers. However the order on which I loop over the layers has to be the same order in which I ...
2018/03/14
243
998
<issue_start>username_0: ``` sudo apt-get -y install python-pip ``` I was trying to install a package from a tutorial and cam across this line of code. I could not figure what is the function of '-y' flag? What does '-y' flag do in the above line of code?<issue_comment>username_1: Automatic yes to prompts; assume "ye...
2018/03/14
694
2,477
<issue_start>username_0: The command `npm run` will run the command which I set in the package.json, and I think it does not new a `child process` to run the command. What does npm do to run the command without new a `child process`?<issue_comment>username_1: **Npm run** has nothing to do with the node child process if...
2018/03/14
1,238
5,459
<issue_start>username_0: I'm having a hard time figuring out how to write Unit tests in Spring. This is the method I'm trying to test: ``` @Service public class ActionRequestHandler { @Autowired private Vertx vertx; @Autowired private InventoryService inventoryService; @Autowired private Re...
2018/03/14
783
2,456
<issue_start>username_0: I'm currently stuck on an issue with powershell regex since I am not able to get the desired output of Servername, instance name, and port if available. Admittedly, I have much to understand since I am new with regex. Here is my setup and my findings so far ``` Data: ZP000042 QRMLD1001\...
2018/03/14
657
2,249
<issue_start>username_0: I am trying to get my head around both composed functions and pure functions. I have an object with a mixture of data. On some values I need to: 1. remove the value's units 2. parse string to integer 3. Convert to value decimal I have written three functions attempting to make them pure in t...
2018/03/14
888
2,673
<issue_start>username_0: i'm working on php, i need to convert an array to javascript array.How to change? Please help below is my output value. I am trying from long time to debug but not getting any leads. my php code: ``` php include "db_connection.php"; $locations=array(); $query = $conn-query('SELECT...
2018/03/14
762
2,665
<issue_start>username_0: I'm having a bit of a comprehension issue with mapping values from an instance of a base class to an extended class. Is there a way to do this without specifying all of the individual properties in a constructor? I don't want to do that in case more optional params are added to the base class b...
2018/03/14
943
3,107
<issue_start>username_0: I'm writing a plugin that creates metaboxes on the admin page. I wrote a class thinking that it should work but I don't see where it fails. The idea is that if a new object is loaded there is a possibility to set a custom name. ``` php class Loader{ public function __construct() { ...
2018/03/14
619
2,308
<issue_start>username_0: recently I solved the following problem: Given a chronologically ordered list of LocalDateTime, find the average duration between neighbours. I did the following: ``` @Test public void canCalculateAverageDuration() { final LocalDateTime now = LocalDateTime.now(); final List localDate...
2018/03/14
494
1,821
<issue_start>username_0: I have a SQL table name MarketRates. In this table has one column, the name is `Rate`. Each month the rate will change. I have solved this issue. My doubt is any other better solution for this. My table schema and data like [![enter image description here](https://i.stack.imgur.com/60czS.png)]...
2018/03/14
568
2,068
<issue_start>username_0: I'm using wordpress and I'm attempting to add this <http://davidjbradshaw.github.io/iframe-resizer/> to the my wordpress sites. This is the page I'm adding as an iframe: <http://www.abc-legal.reviews/abc-embed/> I've added this JS at the top of that page: ``` var iframes = iFrameResize( [{op...
2018/03/14
736
2,537
<issue_start>username_0: i'm trying to run a jar executable from a shell file. the path of my jar : ``` /home/flussi/xmlEncoder/encoder.jar ``` but I always get this error: ``` Exception in thread "main" java.lang.NoClassDefFoundError: smaf.encoder.Encoder at java.lang.Class.initializeClass(libgcj.so.7rh) Ca...
2018/03/14
1,192
3,448
<issue_start>username_0: Iterators have a `skip` method that skips the first `n` elements: ``` let list = vec![1, 2, 3]; let iterator = list.iter(); let skip_iter = iterator.skip(2); //skip the first 2 elements ``` I could not find a method to skip only the `n`-th element in the iterator. Do I need to implement some...
2018/03/14
1,283
3,722
<issue_start>username_0: SQL function in Oracle Database: ``` FUNCTION init(id in number, code out varchar2) RETURN number; ``` I have SQL (Oracle database) in my java code: ``` private static final String MY_FUNCTION_SQL = "SELECT live.api.init(?,?) FROM DUAL"; ``` And my method: ``` void myMethod() throws SQLE...
2018/03/14
726
2,730
<issue_start>username_0: I have a Grid in a Vaadin application. For one column I want to apply a `DateRenderer`. The following problem occurs: [![enter image description here](https://i.stack.imgur.com/NDHdl.png)](https://i.stack.imgur.com/NDHdl.png) What am I doing wrong? The [example](https://github.com/vaadin/book...
2018/03/14
458
1,688
<issue_start>username_0: I have a dataframe like this: ``` In [23]: df Out[23]: scope 0 {'range': 2, 'category': '234'} 1 {'range': 1, 'category': '222'} ``` I would like to filter rows by condition "range==1".How can I do it?<issue_comment>username_1: You can do it in `addColumn()` f...
2018/03/14
461
1,305
<issue_start>username_0: I created a map of some large ports. With 'x' and 'y' latitude and longitude and 'text' the port names. ``` x,y = map(lonA, latA) map.scatter(x, y, s=Size, c=color, marker='o', label = 'Ports',alpha=0.65, zorder=2) for i in range (0,n): plt.annotate(text[i],xy=(x[i],y[i]),ha='right') ``` ...
2018/03/14
526
1,426
<issue_start>username_0: I have 3000 raw data with time and the amount of consumed energy. But this energy value is cumulative sum and I need to get the monthly consumption value for each month. I want to know how can I loop through the data from the same month and subtract the last value of each month from the firs...
2018/03/14
943
3,565
<issue_start>username_0: In firestore I want a user to only access a document if the user is in the `teamid` mentioned in the document. Now I have a different collection called `teams` where I have users mapped as `{ user_id = true }`. So I have the following in the Firestore rules ``` return get(/databases/$(database...
2018/03/14
634
2,460
<issue_start>username_0: How to write a json configuration file to deploy verticles in vertx dynamically ?<issue_comment>username_1: Shameless plug, I wrote a library for that: <https://github.com/username_1/vertx-boot> It works on HOCON, which is a superset of JSON. You write a configuration file in HOCON, where valu...
2018/03/14
736
2,772
<issue_start>username_0: I'm looking to try and do a querySelector for text that avoids picking up a div within the content. Any thoughts gratefully appreciated. **JS** ``` domdoc.querySelector('li.list_item').textContent ``` **HTML:** ``` - Hello world, Please ignore this how are you ``` Returns: ``` Hello...
2018/03/14
1,238
4,197
<issue_start>username_0: I am facing a MISRA C 2004 violation of rule 1.2 "likely use of null pointer. The code that I am using is as below: ``` tm_uint8* diagBuf = 0u; diagBuf[0] = diagBuf[0] + 0x40u; diagBuf[2] = 0x01u; diagBuf[0] = diagBuf[0] + 0x40u; diagBuf[2] = 0x01u; ``` This is just a part of the code that ...
2018/03/14
384
1,342
<issue_start>username_0: Let's say that someone executes the result from the select: ``` ALTER LOGIN [myLOGIN] WITH PASSWORD = '<PASSWORD>' MUST_CHANGE, CHECK_POLICY = ON; ``` How is the correct way to execute a new `ALTER LOGIN` statement, which removes the `MUST_CHANGE` policy? Is something like this ok or there i...
2018/03/14
400
1,405
<issue_start>username_0: I am trying to generate all possible keys on a known `key_length` on Python. Keys are defined as a list of integers between 0 and 255. I am having trouble to generate all the possible keys... If `key_length` were a constant number such as 2, I would have known how to handle this - it's just 2 ...
2018/03/14
563
2,095
<issue_start>username_0: I use react native and redux as following (working): **App.js** ``` export default class App extends React.PureComponent { constructor (props) { super(props); this.state = { ...store.getState()}; store.subscribe(() => { // i can read the state but no write it cons...
2018/03/14
937
2,210
<issue_start>username_0: For input type as time in **hh:mm** format validation, tried below pattern ``` pattern="^([01]\d|2[0-3]):([0-5]\d)$" ``` Requirement is need to restrict *00:00* and allow *24:00*, so updated pattern as ``` pattern="^(24:00)|(([01]\d|2[0-3]):([0-5]\d))$" ``` Now it is allowing 24:00, Pleas...
2018/03/14
2,208
6,091
<issue_start>username_0: I'm having some trouble calculating the RMSE (root-mean-squared-error) in my LSTM model. The model fits fine and I'm getting a good loss reduction, however when trying to inverse\_transform my yhat results I get the following error: ``` non-broadcastable output operand with shape (399,1) does...
2018/03/14
1,329
4,852
<issue_start>username_0: So, I have this function which takes a map, where a name is associated with one of a number of different indexes into an array. The index numbers will only ever have one name associated with them, so no duplicates and no nulls so it's safe to flatten the hierarchy using the following function. ...
2018/03/14
1,269
4,613
<issue_start>username_0: I am use a PHP google sdk for my project. I want to create a account if authenticated user is a admin of the gsuite account. I try to find that but not able to find any single link which help me to identify account . Can anyone help me to check that user is admin of the gsuite or not? Here ...
2018/03/14
575
1,734
<issue_start>username_0: i have a object like ``` obj = {name:"xxx" , des1:"x",des2:"xx",des3:"xxx" , age:"12"}. ``` But the property of des can be incresed as `des1,des2,des3,des4 ...` according to the users inputs. So basically we don't know how much of "des" properties are there in the object. I want do someth...
2018/03/14
332
1,328
<issue_start>username_0: I have a SQL script in SQL Server Management Studio (2012) that consists of my main query and then a local temp table. I'm constantly working on the main script, but the temp table is static. Is there a shortcut for running the script without the temp table. In other words, `F5` runs the whol...
2018/03/14
343
1,345
<issue_start>username_0: I have a JavaScript code snippet which is as following: ```js var obj = { message: "Hello", innerMessage: !(function() { console.log(this.message); })() }; console.log(obj.innerMessage); ``` It outputs: `undefined true` The function which gets executed for evaluating `innerM...
2018/03/14
520
1,762
<issue_start>username_0: I have the following code which worked at some point but now throws me an error at ".SourceData = rng.Address(True, True, xlR1C1, True)" ``` Dim rng As Range Set rng = ActiveSheet.Range("A1:F" & LastRow) Set shTotalsPivot = ActiveWorkbook.Sheets("Totals Pivot") With shTotalsPivot.PivotTables...
2018/03/14
1,055
2,889
<issue_start>username_0: I'm not good in html, css, i want to apply boarder to dev, which contains image in right ```css .amount-2 { border: 3px solid #4CAF50; padding: 5px; width: 70%; float:left; } .sample { float: right; width: 30%; margin-top: -100px; } ``` ```html Files m...
2018/03/14
403
1,599
<issue_start>username_0: I'm not used to c or c++ or AHK. My problem is the following: There exists a tool called "TI Helper", which is composed of 1 EXE and several text files. This EXE enables you to press "CTR+SPACE" in TM1 application, which will popup a (right-click kind of menu) based on the text files... I ope...
2018/03/14
421
1,511
<issue_start>username_0: How to automate the Facebook login without hard-coding my username and password?<issue_comment>username_1: You should use Facebook OAuth API, never hard-code password, some references: [Facebook SDK for Python](https://facebook-sdk.readthedocs.io/en/latest/index.html) [Python Social Auth docu...
2018/03/14
1,298
4,274
<issue_start>username_0: I am use `mgp25/Instagram-API` How can l get my instagram posts with the likes of a particular user? My code: ``` set_time_limit(0); date_default_timezone_set('UTC'); require __DIR__.'/vendor/autoload.php'; $username = 'myInstagramUsername'; $password = '<PASSWORD>'; $debug = false; $trunca...
2018/03/14
3,414
9,533
<issue_start>username_0: I want to copy a column from a table to another column in another table with the condition of id in first table is equal id in the second one please i want to know as possibile as you can if the syntax is right and if not how to correct it thanks ``` INSERT offerte SET tipo_offerta = ...
2018/03/14
934
3,414
<issue_start>username_0: I am getting the following error while implementing the multiple validation for single input field using Angular4. Error: ``` ERROR in src/app/about/about.component.ts(30,7): error TS1117: An object literal cannot have multiple properties with the same name in strict mode. src/app/about/about...
2018/03/14
831
2,832
<issue_start>username_0: My code for jQuery datepicker works fine. But when I include a jQuery slider/banner on same page, the datepicker doesn't work. I think the script tags may conflict with other. ``` Scripts under head tag: //for datepicker //for slider/banner html: Search By Date $(window).on('load', funct...
2018/03/14
340
1,084
<issue_start>username_0: I have a collection, and I am looping over it. ``` | | | ``` `ng-value` is set to the entire `account object`. **Now, the row is being highlighted but the button is not checked.** In controller, ``` vm.selectAccount = function (account) { account.rowIsSelected = account; } ``` What ...
2018/03/14
503
1,976
<issue_start>username_0: I need to call a action from static navigationOptions but cannot access my action through this.props. How to call this action? I am getting error "Cannot read property 'logout' of undefined" in console. ```js static navigationOptions = ({navigation}) =>( { title: 'Home', head...
2018/03/14
469
1,830
<issue_start>username_0: I dont know about how to open `NSFileManager`. How to open `NSFileManager` in iPhone and upload document from `NSFileManager` please suggest any easy way. How can open it and upload the document and also get the path for saved file. Where I can find file physically.(Any location). **::EDIT::...
2018/03/14
578
2,438
<issue_start>username_0: There is the use-permission and use-feature like below: ``` ``` I am just not quite clear about the "android:requiredFeature" attribute. Is it the same effect as the "android:required" in use-feature? I just cannot find the android:requiredFeature related infomation in the android developer ...
2018/03/14
601
2,040
<issue_start>username_0: So I'm using Basecamp's Trix editor for a Ruby on Rails project. What I'm trying to do is make the uploaded/ attached image fit to the width of its parent. Trix automatically embeds the height and width of the image on the element itself. Any way I can stop trix from doing this?<issue_commen...
2018/03/14
712
2,646
<issue_start>username_0: Currently I'm using this code to handle decoding some data: ``` private func parseJSON(_ data: Data) throws -> [ParsedType] { let decoder = JSONDecoder() let parsed = try decoder.decode([ParsedType].self, from: data) return parsed } private func parsePlist(_ data: Data) throws ->...
2018/03/14
547
2,051
<issue_start>username_0: I am looking for ways to check weather the selected pvob is under the group given, else the view should not be created.<issue_comment>username_1: If you look at the swift stdlib for [JSONEncoder](https://github.com/apple/swift/blob/master/stdlib/public/SDK/Foundation/JSONEncoder.swift) and [Pro...
2018/03/14
634
2,429
<issue_start>username_0: I need to establish an initial understanding of this term before I can understand it in all the general contexts that I've seen. (And I'm fairly certain this is a well-known term.) What does @parm mean? It's used a lot by basic programmers, (I am definitely new to programming) and it's always ...
2018/03/14
1,008
2,931
<issue_start>username_0: I've seen this sort question asked many times but unfortunately for me this time it comes with a bit of a twist. I have a dictionary in the format: ``` name: (job, score) ``` example: ``` dict = {bob: (farmer, 9), sue: (farmer, 9), tim: (farmer, 5), jill, (chef, 8)} ``` now if i use: ``...
2018/03/14
932
2,546
<issue_start>username_0: *(I know for loops aren't the preferred choice in R but this was the best I could come up with)* I'm trying to loop through a vector and return the vector value once a condition is met. Once the next condition is met I would like to drop the variable. So far I've gotten to the following: `...
2018/03/14
762
2,534
<issue_start>username_0: given the following code ``` List radia = Arrays.asList(1.0, 1.3, 1.6, 1.9); List listOfBalls = new ArrayList<>(); radia.forEach(radius -> listOfBalls.add(new Ball(radius))); listOfBalls.stream().map(b -> b.getVolume()) .filter(d -> d>10) .forEach(d -> pprint(d)); ``` How do I retain whi...
2018/03/14
854
2,986
<issue_start>username_0: I tried the following code to print all the files to default printer. But now challenging task is that once files are moved to printer, I have to delete the folder. I tried to delete but files are getting deleted before the all files are moved to printer. How to check that once the files are m...
2018/03/14
1,374
3,933
<issue_start>username_0: I'm trying to create an HTML file, which certains Python variables that have to be evaluated. My code looks like this: ``` name = ['Nora', 'John', 'Jack', 'Jessica'] html = """ Names * Mother: <%= name[0] %> * Father: <%= name[1] %> * Son: <%= name[2] %> * Daughter: <%= name[3] %> """ H...
2018/03/14
1,251
3,647
<issue_start>username_0: I am new to git. I changed my current branch via terminal by using ``` git checkout -b branch1 ``` After that I created another branch ``` git checkout -b branch2 ``` Now I am not able to change the branch back to branch1. I dont know whats wrong.I tried the following code ``` git che...
2018/03/14
153
567
<issue_start>username_0: I have a dropdown as follows. ``` {{TeacherDetail.TeacherName}} ``` Now this.userService.TeacherDetails is an array of Teacher objects which i am iterating.I have a value already set in UpdateTeacher.TeacherId as 2 When displaying the drop down 2 option must be pre selected. How to achiev...
2018/03/14
276
892
<issue_start>username_0: I have the following txt-file containing a block of three lines and repeating (4000 lines total): ``` Printer1 /900 HBA/8/7 Printer2 /800 HBA/7/2 ``` Now I would like to move the second line to the end of the third line and then repeat (5th line to end of 6th; 8th line to end of 9th and so o...
2018/03/14
961
3,549
<issue_start>username_0: Please take a look at the following ASP.NET code: ```asp <%@ Page Language="C#" %> <%Response.Write("This is sentence 1.");%> <%Response.Write("This is sentence 2.");%> ``` I expected it to build a short paragraph by joining two strings together, with a white space between them (please not...
2018/03/14
1,060
3,852
<issue_start>username_0: i am getting crazy with filtering a (postgres) JSONField in Django 2.0.3. The json is stored as an array. E.g. ``` tasks = [{"task":"test","level":"10"},{"task":"test 123","level":"20"}] ``` What i've tried: ``` myModel.objects.filter("tasks__task__contains"="test") myModel.objects.filter("...
2018/03/14
611
2,089
<issue_start>username_0: I have a class in java that builds some sophisticated Spark DataFrame. ``` package companyX; class DFBuilder { public DataFrame build() { ... return dataframe; } } ``` I add this class to the pyspark/jupiter classpath so its callable by py4j. Now when I call it I get str...
2018/03/14
833
3,302
<issue_start>username_0: I have reached out in several place and the help has been good but hasn't managed to make it work for me. Hopefully you guys can help me here. I am using JS inside a template page of a Flask application. I am using parsley validation to verify a web form. I have also created a custom validat...
2018/03/14
3,287
12,417
<issue_start>username_0: I'm trying to use Python's asyncio to run multiple servers together, passing data between them. For my specific case I need a web server with websockets, a UDP connection to an external device, as well as database and other interactions. I can find examples of pretty much any of these individua...
2018/03/14
256
871
<issue_start>username_0: I am new to Java 8. I have a list of objects of class A, where structure of A is as follows: ``` class A { int name, boolean isActive } ``` Now I have a list of elements L of class A, in that list I want to update an element having name="test" with inactive=false. I can do this very e...
2018/03/14
330
1,182
<issue_start>username_0: Im facing a problem with my Wordpress Dashboard , Its displaying a warring in the main page and when adding a menu page, its states: ``` Warning: htmlspecialchars(): charset `Windows-1256' not supported, assuming utf-8 in /home1/khaledal/public_html/site/wp-admin/includes/template.php on line...
2018/03/14
676
1,828
<issue_start>username_0: ``` df A B C 0 500 515 Jack 1 510 515 Helen 2 520 515 Mathiew 3 530 515 Jordan ``` I want to get a new `df1` with next conditions: * Select the rows where *A = B*. * If it doesn´t exist any row where *A = B*, select the first existing row where *A > B*. In ...
2018/03/14
1,876
6,277
<issue_start>username_0: Recently I got question about which one is the most fastest thing among `iterator`, `list comprehension`, `iter(list comprehension)` and `generator`. and then make simple code as below. ``` n = 1000000 iter_a = iter(range(n)) list_comp_a = [i for i in range(n)] iter_list_comp_a = iter([i for...
2018/03/14
584
2,613
<issue_start>username_0: I am exploring nodejs and js frameworks. I noticed that when I create a project, for example with `vue` ``` vue init webpack my-project ``` I get a HUGE directory named `node_modules` containing a lot of things not related to my project. Newbie in this field my only wish is to gitignore this...
2018/03/14
827
2,510
<issue_start>username_0: I have a class To Do and it has a dead line property. ``` class ToDo(models.Model): ... ... dead_line = models.DateTimeField() user = models.ForeignKey(User, on_delete=models.CASCADE) ``` I would like to get all the to-do's except for the to-do's whose dead line value has cro...
2018/03/14
808
3,079
<issue_start>username_0: I have a parent jsx component that has 2 different jsx components within it. The one component is a button and the other is a div that opens and closes itself when you click on it (it has a click handler and a state of open or closed). I now want to add the ability for the button to open and ...
2018/03/14
985
2,999
<issue_start>username_0: I have 2 div elements on a HTML page. The first div is supposed to be the top header section (fixed), with the one below it a scrollable content div. The header section is using position fixed and does not scroll. However, when I scroll the second div, it ends up moving up behind the div abov...
2018/03/14
355
1,324
<issue_start>username_0: I want to get a string of numbers and add commas to create a more readable format for a long number. Normally I'd use `toLocaleString()` but it's not working as expected with a controlled input. In my code I'm doing: ``` handleChange(event) { const parseNumber = parseInt(event.target.v...
2018/03/14
1,343
3,258
<issue_start>username_0: I'm working with a huge dataframe in python and sometimes I need to add an empty row or several rows in a definite position to dataframe. For this question I create a small dataframe df in order to show, what I want to achieve. ``` > df = pd.DataFrame(np.random.randint(10, size = (3,3)), col...
2018/03/14
1,243
3,032
<issue_start>username_0: I have strings such as 'pXoX prawa', they might contain a random number of X's. I want to replace these X with polish special characters ``` ['ą', 'ć', 'ę', 'ł', 'ń', 'ó', 'ś', 'ź', 'ż'] ``` and generate strings with all possible variants. In the case of "pXoX prawa" there are two X's, so a...
2018/03/14
720
2,458
<issue_start>username_0: **Can an XML start with anything other than a `<` character?** It was a random thought I just had, when I was trying to define how to differentiate a string containing a XML and one containing a path to a XML. I believe the answer is no, but I'm looking to be certain.<issue_comment>username_1...
2018/03/14
295
857
<issue_start>username_0: How to extract make and model from this json output. ``` [ "{\"_id\":{\"$oid\":\"5a81d2136da3cd4c41b21509\"},\"make\":\"maruti\",\"model\":\"astar\",\"year\":1998}" ] ```<issue_comment>username_1: To extract JSON data in jQuery you can do following. ``` var d = $.parseJSON(data); var make ...
2018/03/14
322
1,003
<issue_start>username_0: I use YQL to get weather data for that woeid is needed, but to get woeid when i call following url it return result null ``` https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%3D%27delhi%27&format=json ``` Result i received ``` {"query":{"count":0,"cre...
2018/03/14
551
2,343
<issue_start>username_0: Does anyone know if exists any official or most accepted reference for React naming conventions to use when we build our applications? React has a lot of different type of components such as React.Component, directives, services and so on. Wouldn't you agree that having a reference naming conv...
2018/03/14
652
2,402
<issue_start>username_0: My spigot plugin doesn't work. On the console, it says the plugin is enabled but i can't run the command in the plugin. Pls help. This is the main code Plugin.java ``` package lol.quacnooblol.mypvpplugin; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command....
2018/03/14
1,480
5,145
<issue_start>username_0: So when got this trouble in Angular-CLI app. Here is what happening: `ng serve`, `ng serve --aot` produces no exceptions, everything works fine. Only running `ng serve --prod` breaks while surfing the app. [ERROR TypeError: (void 0) is not a function](https://i.stack.imgur.com/NYAd7.png) Was...
2018/03/14
593
1,897
<issue_start>username_0: I have table: ``` CREATE TABLE MyTable ( RootId int, Direction bit, .... ); ``` Now, I must write select from this table and join some tables to it. Joined tables depends on Direction parameter. How to join MyTable3 like here: ``` select Root, Direction, Type from MyTabl...
2018/03/14
2,559
7,106
<issue_start>username_0: I am playing with 7.2 version of solr. I've uploaded a nice collection of texts in German language and trying to query and highlight a few queries. If I fire this query with hightlight: <http://localhost:8983/solr/trans/select?q=trans:Zeit&hl=true&hl.fl=trans&hl.q=Kundigung&hl.snippets=3&wt=x...
2018/03/14
1,069
3,977
<issue_start>username_0: I'm building a very simple application using Flask as server and C# as client. The server receive an image via HTTP POST request and process it. My server seems to work fine because I tested it both with Postman and a python client. However the POST request with image attached from my C# client...
2018/03/14
1,567
5,426
<issue_start>username_0: Ok, so I have some data that I want to convert from multiple rows to multiple columns. My input data looks loosely like this - ``` +----------+----------------+-----------------+ | SKU | Attribute Name | Attribute Value | +----------+----------------+-----------------+ | Product1 | Colo...
2018/03/14
1,450
5,015
<issue_start>username_0: I am a newbie on the AWS & Python and trying to implement a simple ML recommendation system using AWS Lambda function for self-learning. I am stuck on the packaging the combination of sklearn, numpy and pandas. If combined any two lib means (Pandas and Numpy) or (Numpy and Skype) is working fin...
2018/03/14
1,029
3,686
<issue_start>username_0: I want to open Google Street View Android directly from my app. Can anyone help me in doing this? I have successfully opened the Maps app with Streeview thanks to SO but that's not what I am looking for. I actually want to open Streetview camera directly from my app so I can take a panoramic ...
2018/03/14
1,061
3,705
<issue_start>username_0: ``` { "code": 200, "status": "OK", "developerMessage": "OK", "userMessage": "Operation Successful", "data": { "settings": { "countries": { "1": "Afghanistan", "2": "Albania", "3": "Algeria", ...
2018/03/14
172
768
<issue_start>username_0: I have created a project on Google Actions. I would like to share the action with my friend. I tried giving them Viewer and Role Viewer access but they are not able to access the action on their mobile's Google Assistant App. Could you tell me which Role shall I give it to them so that they ca...
2018/03/14
550
1,978
<issue_start>username_0: i am getting data from database which in need to group so i am converting database result set in to array and then passing it to laravel collect helper but i gives me error ``` Call to undefined function collect() ``` Code ``` $user_profile=collect(UserProfileItem::where('type', "age_gr...
2018/03/14
1,223
4,231
<issue_start>username_0: For what reason(s) could this code fail (*no element found*)... ``` element(by.id('loginButton')).click(); // triggers route change browser.wait(element(by.tagName('myComponent')).isPresent(), 10000, 'timeout'); element(by.tagName('myComponent')).click(); ``` ...while this code work...
2018/03/14
681
1,886
<issue_start>username_0: I have a list like this one: ``` l1 = [{'id':'78798798','gender':'Male'}, {'id':'78722228','gender':'Female'}, {'id':'33338','gender':'Male'}] ``` I need to check the length of a list obtained using a list comprehension and filtered by 'gender'. I try ``` len([x for x in l1 if x...
2018/03/14
1,125
4,147
<issue_start>username_0: I have a problem when I try to use the function similarity proposed in the academic knowledge API. I tested the following commad to compute the similarity between two string: ``` curl -v -X GET "https://api.labs.cognitive.microsoft.com/academic/v1.0/similarity?s1={string}&s2={string}" -H "O...
2018/03/14
700
2,597
<issue_start>username_0: I have a user register APIView. view: ``` class UserCreateAPIView(CreateAPIView): serializer_class = UserCreateSerializer permission_classes = [AllowAny] queryset = User.objects.all() ``` serializer: ``` class UserCreateSerializer(ModelSerializer): """ User register ...