date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/14
476
1,375
<issue_start>username_0: I have the following code that uses `sql`: ``` val yesterdayDate = "2018-03-13" df.createOrReplaceTempView("myTable") val result = spark.sql("select * from myTable where date(field_date) = '" + yesterdayDate) ``` The values of `field_date` have the following format `2018-02-13 23:55:11.38292...
2018/03/14
1,619
6,603
<issue_start>username_0: I have created two scripts in a unity game I am developing. The first is a script called Changetext (See below) and this seems to work fine, however, I would like it to only run when a player enters a set area in the game world so I created a second script called TRigger (See below) which I tri...
2018/03/14
1,656
6,012
<issue_start>username_0: I have an entity which has multiple fields, some of which are associations. Assume the entity has similar structure to the following: ``` @Entity @Table(name="foos") public class Foo { public Foo() {} @Id private Long id; @Column private String name; @OneToOne(fetch = FetchType...
2018/03/14
1,450
5,313
<issue_start>username_0: ``` create table project_supervisor ( supervisor_ID VARCHAR2 (5) Primary key, last_name varchar2 (250), other_names varchar2 (250) ); CREATE TABLE Project_description ( project_id VARCHAR2 NOT NULL, project_title varchar, project_summary varchar, PRIMARY KEY (projec...
2018/03/14
1,025
3,109
<issue_start>username_0: Given a MapSet, how can one detect if it's empty using pattern matching? ``` # What goes in the question marks? def my_func(????), do: IO.puts("This mapset is empty") def my_func(%MapSet{}), do: IO.puts("This mapset is not empty") my_func(MapSet.new()) ``` If this were a list, I would have ...
2018/03/14
489
1,522
<issue_start>username_0: Hello I have the following dictionary: ``` dictionary = {'key1': ['color1','color2'],'key2':['car1','car2'],'key3':['frut1']} ``` from it I would like to get the following lists: ``` key1 = ['color1','color2'] key2 = ['car1','car2'] key3 = ['frut1'] ``` I need to create this lists on the ...
2018/03/14
1,634
5,620
<issue_start>username_0: I probably did not make the title correctly but please someone explain why I can't create prototype for person object? Only works when I put hit to Object.prototype chain. ``` const person = { isHuman: false, printIntroduction: function () { console.log(`My name is ${this.name}. Am I h...
2018/03/14
1,564
3,983
<issue_start>username_0: I learned that Python lists can also be traversed using negative index, so I tried to slice/sublist a list using negative index, but I cannot slice it till end. My list is: ``` areas = ["hallway", 11.25, "kitchen", 18.0, "living room", 20.0, "bedroom", 10.75, "bathroom", 9.50] ``` Knowing ...
2018/03/14
212
671
<issue_start>username_0: How can i get die value of a field **folder.x\_code** inside a div script data-configid ``` --- " style="width:100%; height:371px;" class="issuuembed"> ```<issue_comment>username_1: You can use t-attf-$name syntax in QWeb like this: ``` ``` I have not used this with data attributes bu...
2018/03/14
706
2,750
<issue_start>username_0: I'm using the core [React Native Modal component](https://facebook.github.io/react-native/docs/modal.html). Within the modal content I have a `Done` button. Pressing `Done`is the only way we want users to close the modal. But the Modal component allows swiping down from the top of the screen ...
2018/03/14
389
1,420
<issue_start>username_0: When trying to use mapped types with interface, i get a weird error - which makes me think its not possible to use them together at all.. See identical type and interface declarations: ``` type AllWorks = { [K in keyof T]: T[K]; } interface DoesNotWork { [K in keyof T]: T[K]; } ``` While...
2018/03/14
271
953
<issue_start>username_0: ``` print W.shape ``` outputs (7,12288) as it supposed to do. However, ``` print W[0].shape ``` outputs 12288, when it should be 7. What am I doing wrong?<issue_comment>username_1: So far in TypeScript (as of version 2.7.2), union type signatures in interfaces are not allowed and instead...
2018/03/14
415
1,768
<issue_start>username_0: I have access to a Java library that let's me pass it an OutputStream object and it writes a report to it. The reports consists of data, each column is delimited by tabs and each record is on a new row i.e. separated by newline. Currently I am passing it a fileOutput stream as below. I need to ...
2018/03/14
1,102
3,898
<issue_start>username_0: Why the stored output of SQLCMD has only `Length` property instead of `column names`?. Is it not possible to store `sqlcmd` output with its properties? `Invoke-sqlcmd` stores it correctly but `Invoke-SQLcmd` takes a bit longer to process so I'm trying to make it work with SQLcmd as this metho...
2018/03/14
276
1,029
<issue_start>username_0: I am trying to adopt a git branching strategy in our office, but it requires that all merges are made without using fast forward. Since we all use different tools to work with git, I would like to know if it's possible to configure Gitolite to prohibit pushes with fast forward merges? Is it eve...
2018/03/14
2,900
11,082
<issue_start>username_0: I have what may be a rather complicated issue. I have an extended gridview control that I swear used to work all the time, but I went away for a while, came back, and it doesn't work anymore (I'm the sole programmer). The extended gridview is designed so that it always shows a footer row (for ...
2018/03/14
519
2,342
<issue_start>username_0: Since I am trying hard to understand the microservice architecture pattern for some work, I came across the following question: It's always said that a microservice usually has its own database. But does this mean that it always has to be on the same server or container (for example having **o...
2018/03/14
2,483
8,840
<issue_start>username_0: So here is my problem, I collect data via the API of the movie DB in a provider called "TheMoviedbServicesProvider" and which is stored in a **model**. I manage to collect the data in the HTML part, but when I try to retrieve the informations in the .ts file it worries me that the variable is *...
2018/03/14
1,077
2,608
<issue_start>username_0: Let's assume I have one table in postgres with just 2 columns: * `ID` which is PK for the table (`bigint`) * `time` which is type of `timestamp` Is there any way how to get IDs grouped by time BY YEAR- when the time is date 18 February 2005 it would fit in 2005 group (so result would be) ```...
2018/03/14
780
2,916
<issue_start>username_0: In my code below I have created an array of items in my .JS file. I was then able to pass this array to the .Jade and use each value in the array as an item in a dropdown list. I now want to pass the user input of which item they will click in the dropdown back to the server side (.js) so that ...
2018/03/14
373
1,311
<issue_start>username_0: for the past couple of hours I was trying to change an image in Xcode with a delay. I have tried achieving this using the following code: ``` UIImageView.animate(withDuration: 1, delay: 2, options: [], animations: { self.TapTap_intro.image = UIImage(named: "Second TapTap") }, completion: n...
2018/03/14
3,432
10,847
<issue_start>username_0: i have problem in constructing a `object` in desired format. i want to get the object in this manner ``` {"pendrive":['went to each object and picked "TEST_HOME" value'],"minichip":['went to each object and picked "TEST_PROXY" value']} ``` the value of the above `array` must be collected fr...
2018/03/14
4,001
12,505
<issue_start>username_0: I have a grid built using flexbox to not only improve the flexibility (wordplay!) but to also more easily make the element heights the same within the grid. I'm running into issues with controlling the vertical alignment of content within the boxes. Each parent container has two nested contain...
2018/03/14
3,036
9,650
<issue_start>username_0: I'm trying to parse a `.dita` file, but there is a node inside another node, and while that isn't weird, there is actually text surrounding the inner node, it looks a bit like this: ``` Hello this is a LINK that you may click ``` I can get the text from `node` and i can get all instances o...
2018/03/14
1,142
3,744
<issue_start>username_0: I wanted to implement a overload for `operator<<` that allowed me to call a given function and output the result. I therefore wrote an overload, but the conversion to bool is selected and when writing a function myself, it would not compile. EDIT: Know that I do not want to call the lambda, bu...
2018/03/14
332
976
<issue_start>username_0: I'm trying to build a lookup table in jq. Input: ``` { "Object1": { "id": 1, "name": "object1name" }, "Object2": { "id": 24, "name": "object2name" } } ``` Expected output: ``` { "object1name":1, "object2name":2 } ``` I tried ...
2018/03/14
622
2,334
<issue_start>username_0: I want have a small table with two columns `[Id] [bigint]` and `[Name] [nvarchar](63)`. The column is used for tags and it will contain all tags that exist. I want to force an alphabetical sorting by the Name column so that a given tag is found more quickly. Necessary points are: 1. The Id is...
2018/03/14
725
2,785
<issue_start>username_0: I've a serial queue and I use that queue to call a `performSelectorWithDelay` like below `dispatch_async(serialQueue, ^(void) { [self performSelector:@selector(fetchConfigFromNetwork) withObject:nil afterDelay:rootConfig.waitTime]; });` However, the method `fetchConfigFromNetwork` never get...
2018/03/14
1,036
4,196
<issue_start>username_0: I am trying to execute a loop while ignoring exceptions. I think `pass` or `continue` will allow me to ignore exceptions in a loop. Where should I put the `pass` or `continue`? ``` class KucoinAPIException(Exception): """Exception class to handle general API Exceptions `code` value...
2018/03/14
911
3,387
<issue_start>username_0: I have this in a module: ``` export const Category = require('./category'); export const Roles = require('./roles'); export const FunctionalTeams = require('./functional-team'); export const WorkSteams = require('./workstream'); ``` I tried changing it to TS imports: ``` export * as Categor...
2018/03/14
300
1,170
<issue_start>username_0: I have a question to all the experienced Teamcity users out there. I would like to exit out of a job based on a particular condition, but I do not want the status of the job as a failure. Is it possible to mark a job as successful even when you exit out of the job with an "exit code 1" or any p...
2018/03/14
706
2,294
<issue_start>username_0: for my Unity game I created a JSON file that holds the speedrun times. The saved times are Timespan strings. When loading the data I parse the strings to Timespan values. When saving the time I save the Timespan as a string to the file. Example level in the JSON file: ``` { "id": 1, "pers...
2018/03/14
600
2,181
<issue_start>username_0: I would like to make a **`PLAY/PAUSE`** button to **`responsive-voice.js`** lib. It will start reading after clicking PLAY and change button label on PAUSE When again I will click this button it will of course pause and change the label on RESUME. After click RESUME it will continue reading the...
2018/03/14
1,036
2,973
<issue_start>username_0: I have this string: ``` var s = '/channels/mtb/videos?page=2&per_page=100&fields=uri%2Cname%2Cdescription%2Cduration%2Cwidth%2Cheight%2Cprivacy%2Cpictures.sizes&sort=date&direction=asc&filter=embeddable&filter_embeddable=true' ``` I want to repace per\_page number (in this case 100, but it c...
2018/03/14
820
2,973
<issue_start>username_0: I have this: ``` validateForm = () => { for (let i = 0; i < formInputs.length; i++) { const inputName = formInputs[i]; if (!this.state.form[inputName].length) { return false; } } } ``` which im refactoring in to this: ``` validateForm2 = () => {...
2018/03/14
668
2,372
<issue_start>username_0: So I just installed the latest version of rabbitmq and I've been trying to get it to work. The server is running and I've restarted it once just to be sure it's a consistent problem. If I `telnet localhost 5672`, I get ``` Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. ...
2018/03/14
1,220
3,989
<issue_start>username_0: I am trying to send an email to multiple contacts in my database list from an input form, it works when i hard code a specific email address, but when i try to refer to my database, i get the error: **Message: mail(): SMTP server response: 503 5.0.0 Need RCPT (recipient) Filename: libraries/Em...
2018/03/14
1,237
3,775
<issue_start>username_0: I have created a variable scope in one part of my graph, and later in another part of the graph I want to add OPs to an existing scope. That equates to this distilled example: ``` import tensorflow as tf with tf.variable_scope('myscope'): tf.Variable(1.0, name='var1') with tf.variable_scop...
2018/03/14
991
3,090
<issue_start>username_0: I have difficulties with understanding: ``` key = lambda x: x[1] list = [(i,sum(1 for y in lower_letters if y==i)) l.sort(cmp=lambda x,y: cmp(x[1],y[1]))) #only 2.x??? cmp(a,b) ``` Does it return anything unlike '.sort'? Can someone explain me what it supposed to do? Why we just don...
2018/03/14
1,121
4,040
<issue_start>username_0: I am trying to add data from a split range (X5:X?,AX5:AX?) into a VBA dictionary. ? Is determined as the last row of data within the sheet. I am new to VBA and trying to force my way through this. ``` Public Sub Test 'Creates a dictionary object Dim orderstatus As Object, path As String Set ...
2018/03/14
701
2,467
<issue_start>username_0: ``` Scanner s = new Scanner(System.in); System.out.println("Type a number"); int n = s.nextInt(); int start = 0; int largest = 0; int occurrence = 0; while(n > start){ int number = (int)(Math.random()*100); if(number > largest){ largest = number; } n--; System.out....
2018/03/14
6,736
19,244
<issue_start>username_0: I pulled a table of Tour de France winners from wikipedia using BeautifulSoup, but its returning the table in what appears to be a dataset, but the rows are separable. First, here is what I did to grab the page and table: ``` import requests response = requests.get("Https://en.wikipedia.org/w...
2018/03/14
596
1,921
<issue_start>username_0: I want to update multiple records from table "a" depending on each other. The values of the table "a" look like: ``` +------------+---------------+-------+ | date | transfervalue | value | +------------+---------------+-------+ | 01.03.2018 | 0 | 10 | | 02.03.2018 | 0 ...
2018/03/14
836
3,366
<issue_start>username_0: Most of [Jest](https://facebook.github.io/jest/docs/en/expect.html)'s expect(arg1).xxxx() methods will throw an exception if the comparison fails to match expectations. One exception to this pattern seems to be the toMatchSnapshot() method. It seems to never throw an exception and instead store...
2018/03/14
729
2,073
<issue_start>username_0: I created a Dataframe with two columns and would like to append them based on the counting of values from other array. ``` cols = ['count_pos','count_neg'] df_count = pd.DataFrame(columns=cols) ``` I have the array y with values like y = [1,-1,-1,1,1,1,1,-1,-1] Now i want to update for ever...
2018/03/14
291
1,023
<issue_start>username_0: `Color.GREEN` looks like an attribute and not an object if so then how can I assign class member(`Color.GREEN`) to an object reference of type Color? ``` import java.awt.*; public class StopLight { public static final Color GREEN = Color.GREEN; public static final Color YELLOW = Col...
2018/03/14
589
2,165
<issue_start>username_0: In sql-server, There are three column in same table,i want to make Column\_C from Column\_A and Column\_B i want to get in same table in sql ``` Column_A Column_B Column_C 1,2,3,4 2,3 1,2,3 1 Column_A Column_B Column_C 1,2,3,4 2,3 1,4 1,2,3 1...
2018/03/14
2,028
5,924
<issue_start>username_0: With `java.time` , I'm trying to format the time as the following "2018-03-15T23:47:15+01:00" . With this formatter I'm close to the result in Scala. ``` val formatter: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssZ") ZonedDateTime.now() // 2018-03-14T19:25:23.397+01:00 ...
2018/03/14
2,910
7,478
<issue_start>username_0: I am working with Azure Functions on Premises V2 (Runtime). Trying to test a simple function that is executed each minute and write in logs. However Function is not executed, and I am getting this error. It is running on a Virtual Machine with Windows server 2016. (what I think could be caus...
2018/03/14
708
2,371
<issue_start>username_0: Given this example class template: ``` template class Stack { T \* data; int size; int nextIndex; public: Stack(int size = 100); Stack(const Stack& stack); ~Stack(); Stack& operator=(const Stack& s); void push(const T& t); void pop(); T& top(); const T& top() const; int getSize() c...
2018/03/14
935
2,411
<issue_start>username_0: I want to split binary with input. i try to divide with input '6', so I get an error. because the length of binary string not a multiple of 6. the result must be show the last binary even though not a multiple of six. **My code** ``` static String s=""; public static String countBit(Strin...
2018/03/14
720
2,585
<issue_start>username_0: I am trying to do a basic chaining of RxJS HTTP calls where the first call is going to pass the ID of an object that was created server-side into the second call. What I am observing with my implementation is that only the first call is made and the second chained call is never executed. Below...
2018/03/14
2,546
8,534
<issue_start>username_0: I am trying to create a stacked bar chart like in the following example: <http://jsfiddle.net/fct1p8j8/4/> The chart it self works just fine when hard coding the data, everything is good there. I am struggling to figure out how to get the data in the correct format from my database structure....
2018/03/14
1,992
6,705
<issue_start>username_0: With a multidimensional array of dynamic length, how can I get an array of just the specefic key values. Let's say I just want color values. ``` 0 { color => green, size => large, } 1 { color => green, size => small, } 2 { color => orange, ...
2018/03/14
556
1,976
<issue_start>username_0: I need to go through an array of objects in javascript but no for, forEach loop, of filter function would recognize the array elements. Array length shows as 0. When I log the array variable in Chrome, it does contain in some way the elements I need to go through though and the array length sho...
2018/03/14
799
2,941
<issue_start>username_0: I am new to AWS. I created a VPC and created 2 subnets (1 private and 1 public). Enabled the internet gateway and updated the Route table with internet gateway entries. Then created 2 Linux EC2 Instances for the private subnet and public subnet and associated security groups accordingly i.e....
2018/03/14
878
3,246
<issue_start>username_0: I have the below code that I am running ``` try: child = pexpect.spawn( ('some command --path {0} somethingmore --args {1}').format( ,something), timeout=300) child.logfile = open(file\_name,'w') child.expect('x\*') child.sendline(something) child.expect('E\*') c...
2018/03/14
722
2,932
<issue_start>username_0: I am wondering if it is possible how to add a similar to flattened layer for images of variable length. Say we have an input layer for our CNN as: ``` input_shape=(1, None, None) ``` After performing your typical series of convolution/maxpooling layers, can we create a flattened layer, such...
2018/03/14
1,497
5,515
<issue_start>username_0: I tried many ways to solve this problem, but I couldn't. My `tableView` jumps after it loads more data. I call the downloading method in `willDisplay`: ``` func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { let lastObject = objects....
2018/03/14
1,195
4,604
<issue_start>username_0: I'm trying to deploy my nginx on docker container with Cloudflare. docker-compose.yml ``` version: "3.5" services: nginx: image: xxx/panel-nginx:VERSION volumes: - type: volume source: panel_nginx_certs target: /etc/nginx/certs ports: - target: 443 ...
2018/03/14
460
1,746
<issue_start>username_0: I am stuck in a query; if you have time can you let me know how to fix it? I have a (hypothetical) table with TypeID, SubTypeID, Option1, Option2 and Option3 columns; last three columns are Boolean. So, I might have something like this: ``` TypeID SubTypeID Option1 Option2 ...
2018/03/14
818
3,175
<issue_start>username_0: **Please read the whole Q before disliking or commenting something. I have searched on internet before posting it here.** I'm having the below project structure. ``` pages(package) > Homepage.java test(package) > Flipkart.java ``` Inside **Homepage.java** i have declared all the Web...
2018/03/14
780
3,024
<issue_start>username_0: I have a xaml which contains a tab control (Name="MyTabControl"). I'm a beginner with wpf and in code and I want to dynamically add tab items that I then add a list box to each created tab item. Below is the code I have so far. ``` ListBox listbox = new ListBox() TabItem tab = new TabItem() ta...
2018/03/14
768
2,940
<issue_start>username_0: I'm opening a new html file on button press using this: ``` window.location = "menu.html"; ``` I want to go back to the index.html file in my "menu" activity after a button press. I tried using ``` window.location = "index.html"; ``` But it creates a new screen and if I click the return ...
2018/03/14
1,263
3,511
<issue_start>username_0: I am trying to publish an sbt plugin to a local file repo. In the plugin's build.sbt I have: ``` publishTo := Some(Resolver.file("localtrix", file("/Users/jast/repo/localtrix"))) ``` I run the `publish` task and it gets published fine to `/Users/jast/repo/localtrix/org/me/sbt-plugin_2.12_1.0...
2018/03/14
1,386
4,965
<issue_start>username_0: I am implementing the json parsing using retrofit but I didnot get any response from url. The Json data is in the form of Array inside which there are objects.I tried to set the response coming from Url in the TextView. I have implemented as follows: My JSON structure is as follows: ``` [{ ...
2018/03/14
2,029
5,626
<issue_start>username_0: I have three tables in SQL Server 2014, each table has millions of data and keep growing. I am trying to find discrepancies between the tables, for example: ``` DECLARE @ab TABLE ( k1 int, k2 int, val char(1) ) DECLARE @cd TABLE ( k1 int, k2 int, val char(1), add_c...
2018/03/14
903
3,219
<issue_start>username_0: I'm having problems with my Printer-Counter School Problem. It's supposed to be a multithreading application and runs fine so far. But when I running it the second or third time it won't work anymore.. No error message. Looks like Threads sleep forever or so. Also when I test it with a JUnit te...
2018/03/14
660
2,422
<issue_start>username_0: I have an EC2 instance (Ubuntu 14). I've defined port 27017 in its security group to be accessed from anywhere. I'm trying to connect from my PC (Windows 10) to the EC2 instance, but getting the following error: > > MongoDB not running on the provided host and port > > > which is not tru...
2018/03/14
481
1,560
<issue_start>username_0: I'd like to select a row by searching for some words in a specific column. Here is what I came up with but it's obviously not working: ``` SELECT * FROM 'list' WHERE 'Name' LIKE '%cat%' AND '%bengal%' AND 'Color' LIKE '%navy%'` ``` Basically I want to find this row: ``` ID | Name ...
2018/03/14
419
1,364
<issue_start>username_0: I want to have method that will give me resized image, if i call this method on object, how can i do this with Pillow? my model: ``` class Item(models.Model): title = models.CharField(max_length=255, null=True) img = models.ImageField() def __str__(self): return self.owne...
2018/03/14
1,918
5,929
<issue_start>username_0: Below is my sample json. I have used ng-repeat="(key, value) as below to get desired output but it is not working. ``` | | | | --- | --- | | {{key}} | {{ value }} | ``` Sample JSON: ``` { "accessPointDetails": { "kernelVersion": "4.4.0", "videoAppVersion": "1.2.3", "zigbe...
2018/03/14
3,377
8,113
<issue_start>username_0: I want to split a matrix into square regions with the given dimensions (k) starting from the upper left corner and then sum the maximum value of each region. This is what I've done so far. ```js arr = [ [ 0, 8, 1, 1, 10, 6 ], [ 6, 8, 7, 0, 3, 9], [ 0, 7, 6, 8, 6, 5], [ 4, 0, 2, 7, ...
2018/03/14
412
1,097
<issue_start>username_0: How to display only non-duplicate word in the line of the text file using bash. For example, I have following lines in the text file: ``` 1001 1002 1003 1002 1003 ``` I want to display only 1001 . I don't want to display any word of the line which is duplicate. I am trying ``` #!/bin/bas...
2018/03/14
1,128
4,018
<issue_start>username_0: Trying to run following command in the ubuntu 16.04 docker container ``` root@mytest:/Linux_Insight_Agent# systemctl start ir_agent.service ``` I have installed neede packages but at the time of starting the service following issue is coming. ``` Failed to connect to bus: No such file or d...
2018/03/14
1,296
4,427
<issue_start>username_0: Trying to lookup a value from multiple sheets. The first code is working. But the code from `IF FUNCTION` is throwing an error - > > Type mismatch runtime error 13 > > > after first lookup, for all `#NA` in the column E, i need to lookup the value in the second sheet. ``` Sub Vlookup()...
2018/03/14
769
2,344
<issue_start>username_0: > > Table1: > > > ``` ====================== | id |id_feature| ====================== | 1 | 4 | | 2 | 2 | | 3 | 9 | ====================== ``` > > Table\_feature4 > > > ``` ====================== | id | size | =================...
2018/03/14
340
1,225
<issue_start>username_0: I drop into debugger in my jupyter notebooks using: ``` from IPython.core.debugger import set_trace set_trace() ``` But the text boxes (the ones following the `ipdb>` prompt) for entering commands are really short. How can I make them bigger by default? Thanks!<issue_comment>username_1: It's...
2018/03/14
531
1,849
<issue_start>username_0: I'm trying to parse the output of a program, which is given like this: ``` Status : OK (97 ms) ``` Those are all spaces, no tabs. I don't know if that spacing will remain consistent over different versions, so I want to treat spaces *and* colons as delimiters. I'm well aware that th...
2018/03/14
440
1,723
<issue_start>username_0: I have a site. I want to create Google AMP code for my site. What is the best way to transfer data between my existing site & new google AMP site. I make a decision to create a new domain for my existing site. Is it good or bad?<issue_comment>username_1: > > transfer data between my existing s...
2018/03/14
1,338
3,850
<issue_start>username_0: How to find values of weight1, weight2, and bias? What's generalized mathematical way to find these 3 values for any problem! ``` import pandas as pd weight1 = 0.0 weight2 = 0.0 bias = 0.0 test_inputs = [(0, 0), (0, 1), (1, 0), (1, 1)] correct_outputs = [False, False, False, True] outputs = ...
2018/03/14
2,532
7,367
<issue_start>username_0: I have an object array with duplicates. The data at the root level of the objects are identical, but the nested array of objects are not. That is what I need to merge before running a lodash uniqBy or whatever function to remove the duplicates. This is the object array with duplicates. ``` ...
2018/03/14
530
2,107
<issue_start>username_0: Modal gets closed when clicked on the close modal button as well as when mouse clicked outside the modal I want to call the same function that I call when I click on the close modal button also when I click outside the modal. I am not sure how to do this in Angular 2. Could you please share you...
2018/03/14
946
3,502
<issue_start>username_0: I'm building a trivia game, and all the questions, answer choices and correct answers are to be stored in different multidimensional arrays arranged by category. example: historyArray contians all the history data, etc. I'm also using bootstrap from my front end UI and would like to be able to...
2018/03/14
465
1,694
<issue_start>username_0: I'm using **React Native** and [this library](https://github.com/Elyx0/react-native-document-picker) to pick files in my app. Native **Google Drive** files (docs, sheets, slides) started appearing to be **unselectable** on **iOS**, meanwhile on Android they appear selectable as PDF (it seems ...
2018/03/14
900
2,727
<issue_start>username_0: This returns only the array a. I need to do an array that is equal to the array a but when the element is multiple of 3 i need to add the next even number. Like a=[1,3,4,6,1], the array would look like [1,7,4,6,1]. How would I do it? Thank you. ``` public static void main(String[] args) { ...
2018/03/14
539
2,131
<issue_start>username_0: I have a Python dictionary containing recipes. I have to find key values inside it and then return results depending on where those keys where found. ``` recipes = { 'recipe1':{ 'name': 'NAME', 'components': { '1':{ 'name1':'NAME', ...
2018/03/14
2,224
6,587
<issue_start>username_0: I am trying to build a war from a grails 2.5.4 project but I am getting an error. ``` .Error | WAR packaging error: error=2, No such file or directory ``` Here is the command I ran and the full trace. ``` grails dev war --plain-output --stacktrace --verbose Base Directory: /Users/anupshre...
2018/03/14
537
1,989
<issue_start>username_0: is there a way to loop through two sets of JSON arrays and identify the additional array items from File 2 compared to File 1? Example below: File 1: ``` { "Cars": [{ "type": "Ford" }, { "type": "BMW" } ] } ``` File: 2 ``` { "Ca...
2018/03/14
2,210
6,475
<issue_start>username_0: I applied 10 Cross-Validation and the output is 10 folds on confusion matrix so how can I find the average of the folds by confusion matrix? and is my work is correct? this my code : ``` set.seed(100) library(caTools) library(caret) library(e1071) folds<-createFolds(wpdc$out...
2018/03/14
920
3,478
<issue_start>username_0: I am interested in finding the people whose birthday is today using ofbiz. This is the entity for the user: ``` ``` This is the **broken** code that searches for the users that have birthday today: ``` SimpleDateFormat monthDayFormat = new SimpleDateFormat("MM-dd"); Calendar cal = Calendar...
2018/03/14
2,431
7,929
<issue_start>username_0: I want to be able to assign an object property to a value given a key and value as inputs yet still be able to determine the type of the value. It's a bit hard to explain so this code should reveal the problem: ``` type JWT = { id: string, token: string, expire: Date }; const obj: JWT = { id: ...
2018/03/14
3,317
9,094
<issue_start>username_0: I know how to squash commits together and drop messages: ``` pick A do thing pick B debug fixup C more debugging pick D do another thing ``` This will result in 3 commits, with the 2 debugging commits squashed together into one, with the message "debug". However, I wanted to know if there is...
2018/03/14
924
3,205
<issue_start>username_0: *Route Config* ``` /** * Author: Rahul * Date: 25 Feb 2018 * * Routes * @flow */ import React from 'react'; import { View, Text } from 'react-native'; import { StackNavigator } from 'react-navigation'; import LoginScreen from 'src/containers/login'; import HomeScreen from 'src/containers...
2018/03/14
1,233
4,048
<issue_start>username_0: I am trying to create an array of unique values based on the properties of a number of identical Objects. These properties will have identical values, but some of them will be `null`, like so: ``` Object obj1 = new Object("Value 1", "Value 2", null); Object obj2 = new Object("Value 1", null, "...
2018/03/14
1,382
4,305
<issue_start>username_0: I am using Draft-04 of JSON Schema. Is it possible to set dependencies based on the existence of a sub-property, and/or depend on a sub-property? Or am I forced to use `allOf` to manage these kinds of dependencies? I have the following (you can play with it at <https://repl.it/@neverendingqs/J...
2018/03/14
429
1,518
<issue_start>username_0: I'm trying to check if the sha256 hash in my sqlite database matches the sha256 hash of the password the user sent to my NodeJS server. The Auth() function should return either true or false. How do I access the variable "refpw" in the if statement? ```js function Auth(username, password){ ...
2018/03/14
704
2,090
<issue_start>username_0: I have a blank array and i need to add the numbers from 1 to 20 to this array. After that i need to sum these number totally. I am stucked in here: ``` for(i=1;i<=20;i++){ push() } ``` What do you think, please answer. Thank you<issue_comment>username_1: Let's see... First you need to de...
2018/03/14
949
3,038
<issue_start>username_0: I apologize in advance if the answer to this question is somewhere on this site. I am new to this and if the answer is on stack overflow the main reason why I couldn't find it is because I don't know the correct termanology. I have a very simple project in class which is to make an animal in ...
2018/03/14
289
971
<issue_start>username_0: I'm wondering why I can't return result with getData() function? it is empty in browser (PHP 7.1), I'm trying to understand why. I can print/echo it just fine o.O ``` class testObject { public $data; function __construct($data) { $this->data = $data; } fu...