date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/02/28
806
2,596
<issue_start>username_0: There is an xml file: ``` property title property title property title property title property title some value some value some value some value some value some value some value some value some value ``` Total ~5000 properties, ~100000 items in XML. About 15-20 various pro...
2018/02/28
902
3,128
<issue_start>username_0: I have a header file which gives the definition ``` typedef struct dyn_array dyn_array_t ``` I have a .c file which implements it ``` struct dyn_array { size_t size; void* array; }; ``` In a different .c file I pass a pointer of this type to a function. ``` bool first_come_first...
2018/02/28
1,030
3,607
<issue_start>username_0: So my Component looks something like this as mentioned below. When the component is rendered for the first time, it sets the state. But for the 2nd call, the props hold new data but it never sets the state.Instead, the state has previous data.Not sure what is making the behaviour.The state I am...
2018/02/28
612
1,542
<issue_start>username_0: I am new in python programming, and I am trying writing fib based on the generator. And I tried this: ``` def fib(n): a = 0 b = 1 for _ in range(n): yield a print(a) a, b = b, a + b print((a,b)) ``` and This one: ``` def fib(n): a = 0 b = 1 for _ in range(n):...
2018/02/28
527
1,377
<issue_start>username_0: I am trying to add an article to my table but when I do and I have an article like this: ``` *this is an article example This is an article example* ``` It removes the empty line between the two sentences. How can I keep those empty lines?<issue_comment>username_1: Step through and find out...
2018/02/28
1,788
7,247
<issue_start>username_0: I have an array of latitudes and another array of longitudes that I add to an array of type CLLocationCoordinate2D. I then use the new array to annotate multiple points on the map. Some, or most, or maybe even all of the annotations are displaying on the map but as I zoom in (yes, zoom IN), som...
2018/02/28
574
2,054
<issue_start>username_0: Consider the below function definition: ``` def function(self, arg1, arg2): """Function for doing something. Args: arg1: Argument 1. arg2: Argument 2. Returns: Returns something. """ ... ... ``` What would the easiest way of selecting the w...
2018/02/28
2,354
7,949
<issue_start>username_0: On initial load, I get the error `No Toaster Containers have been initialized to receive toasts.` which is an issue, but not the topic of this question (unless fixing it happens to resolve the other problems, which I have a sneaking suspicion it will). The main issue comes when I try to pop t...
2018/02/28
1,225
4,524
<issue_start>username_0: I have come across a strange C++ crash recently after upgrading to gcc 7.2 which can be demonstrated using the following simple complete c++11 program: ``` #include #include struct MyObject { static MyObject & null\_obj() { return \*static\_cast (nullptr); } operator bool() { return v...
2018/02/28
1,092
3,881
<issue_start>username_0: I've been trying to send data through Google's FCM which will expire after 10 seconds. What I mean is that if the user wasn't connected to the internet during those 10 seconds, he won't receive it. This is my `Javascript` code for sending the request to the FCM: ``` var http = new XMLHttpRequ...
2018/02/28
1,374
5,139
<issue_start>username_0: How much faster is accessing and manipulating an array in google scripts vs accessing and manipulating data from a google sheet? Here's the application: I am working on a program to create a schedule for employees. My strategy is to create a list of available employees for each day, randomize...
2018/02/28
656
2,344
<issue_start>username_0: In TypeScript (not Java, C# or Objecive-C), is there a shorter syntax for the following code (similar to ::bind operator)? ``` const company = { rating: 5 } Company.prototype.getRating.call(company) // <----- NEED A SHORTER SYNTAX ``` given: ./Company.ts ``` class Company { rating: strin...
2018/02/28
765
2,983
<issue_start>username_0: I have a static class IDGENERATOR. it will generate id automatically like CurrentYear-CurrentMonth-Serial. Ex. 2018-02-00001 When month changed serial number set to 00000. I did this. ``` static class IDGENARATOR { private static int serial_no; static DateTime dt = DateTime.Now; s...
2018/02/28
1,308
4,144
<issue_start>username_0: Starting iOS 11, I have been noticing OpenGL-ES crashes, when we call display method on GLKView. We have made sure GLKView and EAGLContext are properly instantiated and called from appropriate thread. Below is the stack trace related to the crash. ``` Exception Type: SIGABRT Exception Codes...
2018/02/28
707
2,689
<issue_start>username_0: i am working on an Angular 5 application and i have an API that store my data. The thing is i have two components, one for displaying data and one for posting data. They both interact with the API through a service with two functions: ``` addCandidate(candidate: Candidate): Observable { thi...
2018/02/28
692
2,693
<issue_start>username_0: Back in objective-C with ARC, this wasn't safe to do: ``` MyClass* someObject = ... __weak MyClass* weakSomeObject = someObject; doSomething(^{ [weakSomeObject someMethod]; }); ``` Why? because simply calling a method doesn't cause ARC to retain the object, and thus the `someObject` inst...
2018/02/28
1,301
3,899
<issue_start>username_0: I have a very simple list comprehension I would like to parallelize: ``` nlp = spacy.load(model) texts = sorted(X['text']) # TODO: Parallelize docs = [nlp(text) for text in texts] ``` However, when I try using `Pool` from the `multiprocessing` module like so: ``` docs = Pool().map(nlp, text...
2018/02/28
441
1,488
<issue_start>username_0: I'm trying to add a second condition inside the WHERE in my foreach loop. ``` $customers = Customers::find()->where(['status' => 1])->orderBy('vip DESC, id ASC')->all(); ``` Currently, I have it filtering where status=1 but I need to also add where 'rank' does not equal the text "Can". The ...
2018/02/28
1,167
2,261
<issue_start>username_0: I have a list: ``` data = ['Other stuff',186.797\t-48', '187.272\t-48', '187.747\t-48', '188.222\t-45', '188.697\t-43', '189.172\t6', '189.646\t-23', '190.121\t12',...] ``` How do I create two lists one with value before the "/t" and another with the value afterwards. However, I only...
2018/02/28
1,274
3,697
<issue_start>username_0: I have an `if` statement that looks like this: ``` function isMaleBetween(value, index, array) { maleBetween = []; array.forEach(function (element) { if (element.active === filters.active && element.gender === filters.gender && element....
2018/02/28
736
2,894
<issue_start>username_0: I'm refactoring some code on my first react app, which is a simple login form that redirects and renders a list of items on successful login. I have a form container, connected to the redux store, that should render a login form - decorated with reduxForm. I don't understand why the form is not...
2018/02/28
955
3,057
<issue_start>username_0: I'm trying to amend an exam average calculator that I built to calculate overall average after ending the while loop, (example desired output below the code). I have functioning code that currently calculates averages for individual students, but I haven't been able to find a way to calculate a...
2018/02/28
814
2,868
<issue_start>username_0: I have an index endpoint API set up. This API controller doesn't inherit from Application Controller. ``` def index @projects = Project.all respond_with @projects end ``` Querying it returns: [{"id":7,"name":"Something","location":"United States","user\_id":54,"created\_at": {"^o":"...
2018/02/28
2,216
7,059
<issue_start>username_0: I want to develop my own signal scope in C++. So I use qt for this purpose. I add a graphicsView and a push Button in ui. At connected method to push button I update the graphicsView(finally I'll pass this method to a thread). Each time that I press push button, Despite the deleting pointer the...
2018/02/28
1,823
5,958
<issue_start>username_0: I have a huge SQL Server archival database (`MISArchival`): 250GB and it's sitting on a `E:\` drive which has only 30GB space left. I have to purge/move out some more data from production MIS database to this archival database (`MISArchival`). Now I have another drive which is `I:\` drive and...
2018/02/28
602
1,897
<issue_start>username_0: I expected x.gettf() in the following (entered in the javascript console, Chrome) to return true. Please explain what happened. It appears that gettf doesn't access the *current* value of tf, but the value when it was returned from foo? ``` function foo() { var tf=false; function get...
2018/02/28
1,563
5,420
<issue_start>username_0: Hello stackoverflow community! I've used this community for years to accomplish small one off projects for work, school, and personal exploration; however, this is the first question i've posted ... so be delicate ;) I'm trying to read every file from a directory and all subdirectories, then a...
2018/02/28
568
1,797
<issue_start>username_0: Is there a built-in log loss function in pyspark? I have a pyspark dataframe with columns: probability, rawPrediction, label and I want to use mean log loss to evaluate these predictions.<issue_comment>username_1: No such function exists directly, as far as I can tell. But given a PySpark d...
2018/02/28
841
2,434
<issue_start>username_0: I execute this query ``` SELECT Kd_penyakit, Penyakit, COUNT(case when Kd_gejala in ('G01','','G03','G04','','','','','','','','','','','','','','','','','','')then 1 else null end) / COUNT(kd_penyakit)*100 AS cases FROM tbl_casebase GROUP BY Kd_penyakit ORDER BY cases DESC ``` and the res...
2018/02/28
1,154
2,748
<issue_start>username_0: I'm having some trouble figuring out how to increment count (mults in my code) in such a way that power2's counter is equivalent to power1's. My program compares the efficiency of computing x^n in different ways. I've looked up solutions on how to count the number of times a recursion calls its...
2018/02/28
1,399
5,565
<issue_start>username_0: My employer is strictly limited to MS Office products and SharePoint. I am unable to utilize a different database solution. I am trying to implement and share an Access database to allow multiple users to enter and edit data. However, I would (of course) like to limit the ability of users to e...
2018/02/28
1,400
3,995
<issue_start>username_0: I want to split the string by commas that are not in parentheses or square brackets I'm working with the following string > > Potatoes, Vegetable Oil (Sunflower, Corn, And/or Canola Oil), Honey > BBQ Seasoning [Sugar, Salt, Dextrose, Torula Yeast, Onion Powder, > Spices], Maltodextrin Fruc...
2018/02/28
2,181
7,493
<issue_start>username_0: I need to capture each case definition and then the associated php filename. I've successfully got this expression to work on single line items ``` $re = 'case [\"|\'](.*?)[\"|\'].*=[\s|\"|\'](.*?\.php)'; ``` The string I'm working with is: ``` //--- the following 2 lines are captured cas...
2018/02/28
1,495
6,930
<issue_start>username_0: As a background, I am currently creating a student database. I am working on the log in page portion of it. As of right now, I am able to show the different user type through a dropdown list and have users input their username and password. I am able to successfully log in the users with correc...
2018/02/28
533
1,802
<issue_start>username_0: I'm looking for a shell command to run in Bash which finds the subdirectory which contains the largest number of files. Execution time isn't a huge concern; it's clear that there will need to be a big trawl/sort operation to determine this result. The question is, how to compute this? My first...
2018/02/28
454
1,807
<issue_start>username_0: i tring to do the function CityService.GetCityName , this function get CityID and give back the CityName. when i push on the function some number it is working but when i put var or somthing like this that put error and a red underline on the var. i tried to do console.log(cityID) and it was go...
2018/02/28
659
2,090
<issue_start>username_0: I need to convert an `Instant` into .Net's [`DateTime.Ticks`](https://msdn.microsoft.com/en-us/library/system.datetime.ticks), i.e. a long that represents the number of one-hundred nanoseconds since 0:00:00 UTC on January 1, 0001. Unfortunately, there is no such thing as a `ChronoUnit.HUNDRED_...
2018/02/28
1,107
3,310
<issue_start>username_0: I want to zip two list and do a pattern matching, but it seems zip and match produce error. I do not know understand why there is such error. The following example is a simplified version. This works ``` val l = List((1, 2), (3, 4), (5, 6)) l.map { case(a, b) => println(s"First is $a, secon...
2018/02/28
620
2,339
<issue_start>username_0: I have created a Consumer which takes a string and makes it uppercase. I am trying to implement it along with a map to make all the strings in a list to uppercase. I understand that this can be done easily using `String::toUpperCase` but I am trying to do it with a Consumer and I am getting the...
2018/02/28
1,081
4,301
<issue_start>username_0: I am trying to achieve a functionality where I want to update the value of a property control using another property control. Below is the example, I have a dropdown list property control named AsOfDate which holds the date information. Using the value selected in the dropdown list, I would li...
2018/02/28
389
1,278
<issue_start>username_0: Let's say I have the string ``` hello how-ar[]e-you doing ``` where `[]` is my cursor. How would I efficiently select `how-are-you` such that ``` hello [how-are-you] doing ``` So far what I could come up with is `Bvt`<issue_comment>username_1: Vim has the notion of "word" and "WORD", whe...
2018/02/28
1,404
5,971
<issue_start>username_0: So I've set up cognito and appsync and connected them both to my iOS client. Appsync works great from the console, but when i make any requests from iOS i get a 401 error without any error messages. I'm able to sign in and out of cognito fine. I think i might be passing the wrong thing in to so...
2018/02/28
936
2,379
<issue_start>username_0: I have: ``` a = [['-', '-', '-'], ['-', '-', '-'], ['-', '-', '-']] b = [['-'] * 3] * 3 # => [["-", "-", "-"], ["-", "-", "-"], ["-", "-", "-"]] a == b #=> true ``` Seems correct. ``` a[0][0] = 'X' a # => [["X", "-", "-"], ["-", "-", "-"], ["-", "-", "-"]] b[0][0] = 'X' b # => [["X", "-", ...
2018/02/28
1,066
3,032
<issue_start>username_0: How to parametrize initialisation of a class. For example, to wrap `BaseClass1` and `BaseClass2` it's possible to: ``` class BaseClass1: pass class BaseClass2: pass class Wrapper(BaseClass1): def __init__(self): pass def new_method(self): return 1 w = Wrapp...
2018/02/28
1,183
4,060
<issue_start>username_0: I tried running the code below locally (as a maven project in IntelliJ) and it runs OK. When I try to run it as a Lambda function, I always get a `java.lang.NoClassDefFoundError`. Somehow, lambda makes it so the class cannot be found when I include the AmazonS3 line below. ```java package exam...
2018/02/28
681
2,242
<issue_start>username_0: I have a lot of background jobs running that are feeding their respective log files. Using the `watch` command I am monitoring the respective last line in the log as follows. ``` watch "ls -rtdc1 base_*.log | tail -20 | xargs -I % sh -c 'tail -vn1 % | cut -c1-180'" ``` That looks nice, howev...
2018/02/28
778
1,854
<issue_start>username_0: I have a list of dictionaries. How do I count the number of elements with **'label' : 'car'** ? Also how do I create a completely new list with all the elements that have **'label' : 'car'** ? ``` result = [{'bottomright': {'x': 434, 'y': 102}, 'confidence': 0.3357535, 'label': 'car', '...
2018/02/28
378
1,361
<issue_start>username_0: I just started learning Java at school and I encountered the following piece of code. I have trouble understanding why the output shows: `no`. Since `x` is updated to `100` shouldn't the `boolean` also update to `false` and therefore output: `yes` ? Thank you in advance Here's my code: ``` ...
2018/02/28
7,117
27,973
<issue_start>username_0: I'm trying to optimize the following query: ``` SELECT a2 AS 'b_actual_pair', a1 AS 'c_actual_date', a3 AS 'd_actual_value', b1 AS 'e_1m_date', b3 AS 'f_1m_value', c1 AS 'g_2m_date', c3 AS 'h_2m_value', d1 AS 'i_3m_date', d3 AS 'j...
2018/02/28
332
1,404
<issue_start>username_0: Google Container Builder documentation says it can build a Branch or a Tag. What about building a Pull Request? This functionality is critical prior to merging code so main development branch is kept clean as much as possible. On [this page](https://cloud.google.com/container-builder/docs/runn...
2018/02/28
1,511
5,134
<issue_start>username_0: I have a few different questions on this post related to the same thing. (This code lets you insert fractions and it finds the average of them) 1.How would I be able to do this when the amount of numbers is unknown? To accomplish this for three numbers I would do `((eng1n + eng2n + eng3n) / (...
2018/02/28
1,362
4,424
<issue_start>username_0: Ok so my dataframe looks like this let's call if df ``` KEY A1 A2 A3 A4 B1 B2 B3 B4 C1 C2 C3 C4 1 120 100 NA 110 1 1 NA 1 NA NA NA NA 2 100 NA 115 NA NA NA NA NA Y N Y N ``` So what I'm trying to do is make it so that when an A columns has a value of 100 and the cor...
2018/02/28
559
2,116
<issue_start>username_0: The azure terraform resource manager has a field [`source_address_prefix`](https://www.terraform.io/docs/providers/azurerm/r/network_security_rule.html#source_address_prefix): > > CIDR or source **IP range** or \* to match any IP. Tags such as > ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Int...
2018/02/28
997
3,231
<issue_start>username_0: I'm relativity new to php and just testing out some code. The odd thing is that the code both does/doesn't work. The code should check a MySQLi database to determine the state of the check box and then apply that state to the checkbox. What the code currently does is designate the checkbox stat...
2018/02/28
352
1,237
<issue_start>username_0: Currently I'm developing page with `google-maps api`. I have a problem while implementing `InfoWindow`. I wanna use `React Component` at content of `InfoWindow` like following.. ``` const infoWindow = new google.maps.InfoWindow({ content : , position : { lat : ..., lng : ... } }...
2018/02/28
345
1,139
<issue_start>username_0: I'm trying to load a list of locations via ajax / jquery. Each time I type a letter into the input I get the first respponse back with subsequent responses appended. I've tried using .html('') and .empty() but not getting the desired results. I want the list to clear each time and return the ne...
2018/02/28
942
3,441
<issue_start>username_0: I need to export all the data from a node in Firebase database, however it seems that the file is too large to get downloaded through the "Export" option in the firebase console. Therefore, I've tried to download the json file by using the firebase REST api through Curl by making this call: `c...
2018/02/28
1,386
3,792
<issue_start>username_0: I'm working on a Bukkit plugin at the moment with a few other people, and I'm attempting to create a log system. I've been trying to fix my broken code for 2 days, and have gotten nowhere. The part that it seems to be getting stuck on is where I get the data folder for the plugin so I can move ...
2018/02/28
1,019
3,304
<issue_start>username_0: If I have a local, mutable vector, I can partition it as follows, copied from the documentation of `partition`. ``` let mut a = vec![1, 2, 3, 4]; let (even, odd): (Vec, Vec) = a.into\_iter().partition(|&n| n % 2 == 0); ``` The `a` vector is consumed (moved) in this process. However, the same...
2018/02/28
388
1,502
<issue_start>username_0: ``` def hits(): while True: hits = int(input("Number of hits :\t")) if hits>1000: print("Invalid integer. Must be from 0 to 1000.") print() **elif hit(hits)>at_bats:** #does not know how to fix that print("Hits cannot be greater...
2018/02/28
610
2,062
<issue_start>username_0: How can I search duplicate records in a table but has different years. My sample data: ``` Cus_No Item_No Ord_Dt Orders 1 A 2016 1 1 A 2017 2 1 B 2016 1 2 B 2015 1 2 B 2018 1 ``` Output needed ``` Cus_No I...
2018/02/28
664
2,275
<issue_start>username_0: I am trying to modify my program to create two empty lists: prime and non\_prime. and test if the random number in the list is a prime number or not a prime number. If the number is prime, I want to append it to prime number list. If not, I want to be able to add it to non\_prime list. I tried...
2018/02/28
1,348
5,534
<issue_start>username_0: I have a cache refresh logic and want to make sure that it's thread-safe and correct way to do it. ``` public class Test { Set cache = Sets.newConcurrentHashSet(); public boolean contain(int num) { return cache.contains(num); } public void refresh() { cache.clear(); cache.addAll(g...
2018/02/28
1,488
4,119
<issue_start>username_0: **I tried to install CKeditor but couldn't figure out a way.** Steps I tried * pip install django-ckeditor * Add 'ckeditor' to your INSTALLED\_APPS setting. * Run the collectstatic * CKEDITOR\_BASEPATH = "/static/ckeditor/ckeditor" to my settings and ``` from ckeditor.fields import RichTex...
2018/02/28
1,411
3,926
<issue_start>username_0: In linux qemu environment, one host server runs two virtual machines. I want to let two VMs write data into the same block device on host. Thus, I run the following two commands to expose host block device to two VMs. ``` sudo virsh attach-disk VM1 /dev/myblockdevice vdc sudo virsh attach-dis...
2018/02/28
831
2,426
<issue_start>username_0: ```js function strip(match, before, after) { return before && after ? ' ' : '' } var regex = /(^|\s)(?:y|x)(\s|$)/g var str = ('x 1 y 2 x 3 y').replace(regex, strip) console.log(str) str = ('x y 2 x 3 y').replace(regex, strip) console.log(str) ``` The goal is to remove all occurren...
2018/02/28
885
1,802
<issue_start>username_0: I have to convert the col5 of Unix time stamp to UTC format (YYYY-MM-DD hh:mm:ss) with python script and create a new col6 for UTC format in the following data. Data: ===== col1 col2 col3 col4 col5 0 0 0 1 1231006505 1 1 0 1 1231469665 2 2 0 1 1231469744 3 3 0 1 1231470173 4 4 0 1 12314709...
2018/02/28
1,875
4,661
<issue_start>username_0: ``` [05/Jan/2009:02:27:22 -0500] slapi_ldap_bind - Error: could not send bind request for id [cn=repl manager,cn=config] mech [SIMPLE]: error 91 (Can't connect to the LDAP server) [06/Jan/2009:17:52:04 -0500] schemareload - Schema reload task starts (schema dir: default) ... [06/Jan/2009:17:52:...
2018/02/28
1,465
5,830
<issue_start>username_0: I am having trouble conceptualizing the usages for [the new Span in C#](https://learn.microsoft.com/en-us/archive/msdn-magazine/2018/january/csharp-all-about-span-exploring-a-new-net-mainstay). 1. What construct(s) does it replace? Is ArraySegment now obsolete? 2. What functionality does it en...
2018/02/28
411
1,177
<issue_start>username_0: I have a string that contains the following: ``` "Hello my name is (0.9%) and (15%) bye (10.5%) also (C9, B6)" ``` I want to replaceAll so I get rid of the brackets containing percentages but not the other numbers like so: ``` "Hello my name is and bye also C9, B6" ``` Currently I have th...
2018/02/28
257
891
<issue_start>username_0: Right now I have this in a custom .d.ts file: ``` import { Request, Response, NextFunction } from 'express'; export type MiddleWareFn = (req: Request, res: Response, next: NextFunction) => void; ``` and I reference that file like so: ``` router.use('/foo', function(req,res,next){}); ``` ...
2018/02/28
332
994
<issue_start>username_0: I am reading a file which contains data in format: `1990 3 6.4 1.0 9` `1991 1 5.3 12.0 10` so the resulting array is `["1990"][""][""][""]["3"]....` when i only require `["1991"]["3"]["6.4"]....` I want to extract this information into an array or struct. But when I try to to: ``` let...
2018/02/28
309
1,085
<issue_start>username_0: I am creating an ArrayList of `Account`s (an object) and the `Account` constructor is ```java public Account(String name, int accNum, int balance) { myName = name; myAccountNum = accNum; myBalance = balance; } ``` I want to know how to check the ArrayList to determine if a given ...
2018/02/28
1,230
4,605
<issue_start>username_0: I am currently new to laravel and I am working on a basic project where a service provider (SP) is able to post service details by filling up a form. ![Service details form](https://i.stack.imgur.com/NT7qj.jpg) I am trying to check if SP has uploaded a featured image. If yes, then rename file...
2018/02/28
721
2,394
<issue_start>username_0: I am trying to run a simple scala program in IntelliJ. My build.sbt looks like this: ``` name := "UseThis" version := "0.1" scalaVersion := "2.12.4" libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.0" ``` And my import code looks like this: ``` package WorkWork.FriendsB...
2018/02/28
752
2,048
<issue_start>username_0: I've searched everywhere, but couldn't find the solution. I want to place multiple images randomly anywhere on webpage with different sizes and distribute them all over page randomly as shown in the sample image using css/jquery. [Sample Image](https://i.stack.imgur.com/5rohs.jpg)<issue_commen...
2018/02/28
1,152
3,367
<issue_start>username_0: I'm looking at this brief tuto for data.table ``` https://www.r-bloggers.com/r-data-table-tutorial-with-50-examples/ ``` but I get stuck when the author talks about `setkey()` I will put my example. I work with iris database so it can be easy replicated ``` mydata <- as.data.table(iris) ...
2018/02/28
1,009
3,639
<issue_start>username_0: I'm building my web app on top of Firebase cloud functions, and hosting. My client was built with create-react-app, and I have a small express server running in a cloud function that serves the app build. Everything works fine in a normal browser window however, I am having an issue where if I...
2018/02/28
330
946
<issue_start>username_0: I've got two tensors with the shape shown below, `batch.shape = [?, 5, 4]` `weight.shape = [3, 5]` by multiplying the weight with every element in the batch, I want to get `result.shape = [?, 3, 4]` what is the most efficient way to achieve this?<issue_comment>username_1: Try this: ```...
2018/02/28
518
1,983
<issue_start>username_0: I'm trying to map an **immutable** object from MongoDB to my Java POJO and i keep getting the following error: ``` org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.RuntimeException: org.mongodb.morphia.mapping.MappingException: N...
2018/02/28
1,050
3,076
<issue_start>username_0: I recently made code in C that reads a set of numbers until zero (zero ends the number set) and prints its prefix sum: ``` #include #include int main() { int x, sum; sum = 0; while(x) { scanf("%d", &x); sum += x; if(x != 0) { printf("%d,", sum); } else{ break; } } return 0; }...
2018/02/28
1,582
5,404
<issue_start>username_0: I am a beginner developer who is studying Android. The function I want to develop is "Save the data entered in EditText as JSON, save it as SharedPreference, and output it to ListView". To save it as SharedPreference is OK, but, To output it to ListView is not working now. **MainActivity.jav...
2018/02/28
1,325
4,605
<issue_start>username_0: Hi I'm having a small problem with my program which is a simple client/server. The client sends the contents of a textfile to the server. The text file is just ints and then the server is suppose to send back the largest prime number less than each int in the text file(if its prime it should ju...
2018/02/28
948
3,857
<issue_start>username_0: I think lazy var {}() should run once. But today I meet this problem troubles me. And I have on any thought. I'm crying. Here is reproduction class: ``` class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { private lazy var hotStockTableView: UITableView = ...
2018/02/28
3,765
14,176
<issue_start>username_0: Airflow is randomly not running queued tasks some tasks dont even get queued status. I keep seeing below in the scheduler logs ``` [2018-02-28 02:24:58,780] {jobs.py:1077} INFO - No tasks to consider for execution. ``` I do see tasks in database that either have no status or queued status b...
2018/02/28
312
875
<issue_start>username_0: I'd like to create a matrix of elements with each value in column i the ith power of the value in column 1. Easy with a for loop, but is there a way to combine matrix elements and their indices in expressions?<issue_comment>username_1: Do you mean something like this? ``` M = M(:,1) .^ (1:size...
2018/02/28
504
1,337
<issue_start>username_0: I want to join 2 tables with many to many relationships. I already tried the Left, Right and other Joining of table methods but I can't get my expected result. This is a sample: **tblcharge** [![enter image description here](https://i.stack.imgur.com/KDpXY.png)](https://i.stack.imgur.com/KD...
2018/02/28
359
1,172
<issue_start>username_0: I am trying to change the opacity of a div for a given interval so that the object consistently pulses. The element will continually pulse until a button is pressed. The code below doesn't get the element to continually change opacity and I don't know why. ``` function setRandomZoneOpacity(){...
2018/02/28
474
1,732
<issue_start>username_0: I have a long set of exported constants in a file. Here's an excerpt: ``` ... export const COUNTER_INCREMENT_REQUESTED = 'COUNTER_INCREMENT_REQUESTED'; export const COUNTER_INCREMENT_REQUESTED_ASYNC = 'COUNTER_INCREMENT_REQUESTED_ASYNC'; export const COUNTER_DECREMENT_REQUESTED = 'COUNTER_DECR...
2018/02/28
674
2,172
<issue_start>username_0: I make a scrip to validate if a string contain some char. But, I have a problem with this string. This is my script: ``` var special_char = ['|', '/', '&', ' ', '$', '@', ';', '*', '%', '.', ',']; var file_name_ext = upl_data.substring(upl_data.lastIndexOf("\\") + 1, upl_data.length); var f...
2018/02/28
623
2,608
<issue_start>username_0: I created a **splash screen** for my application using an **empty activity** that stays **visible** for 3 seconds with a background image. Usually, the application starts with a white screen before the background image becomes visible, however, some applications are already started with the "re...
2018/02/28
838
2,531
<issue_start>username_0: I have two points which form one line: (1,4) and (3,6), and another two which form another line: (2,1) and (4,2). These lines are continuous and I can find their intersection points by finding the equation for each line, and then equating them to find the x value at the intersection point, and ...
2018/02/28
840
2,058
<issue_start>username_0: I have a csv file with 19 columns and want to make it as a dictionary that the first 2 columns be the key (maybe a tuple or just merge them as one string), and then all other 17 columns be a list as values. the excel file looks like this: [image of the cvs file](https://i.stack.imgur.com/rWekA....
2018/02/28
647
2,506
<issue_start>username_0: I have the following setup: ### index.js ``` render( , target ); ``` ### app.js ``` class App extends React.Component { render() { return ( {this.props.children} ); } } ``` layout.js ========= ``` class Layout extends React.Component { render() { ...
2018/02/28
1,134
4,001
<issue_start>username_0: I am using splice to remove an element from an array, but it's not working. as far as I know, the code looks okay , but maybe I am missing/overseeing something. please take a look. here 'state' is an array containing objects. ``` let removeFromState = state; for(var i=0;i ``` I c...
2018/02/28
1,157
4,103
<issue_start>username_0: As a really basic example, imagine I wanted to render a div containing some text outside of my render() method. Which of these options would be better? ``` class StatefulComponent extends Component { ... render() { return ( {this.renderTextDiv(this.state.text)} ) } rend...
2018/02/28
1,108
3,883
<issue_start>username_0: I want to make a function which debug when image's name equal "aaa". So I think that I should get image's name. for example, there is a `ImageView`. ``` ImageView img1 = (ImageView) findViewById(R.drawable.button); public void passMSg(){ if(name == "button"){ // "name" means image's name....
2018/02/28
1,058
4,652
<issue_start>username_0: Hello I need to do multiple aggregate queries, and render the results to a view. My problem right now is figuring out how to make sure all the queries finish before rendering them and I have come upon async.parallel. I have been trying to mess with it but it is not working. For example, this is...
2018/02/28
669
2,427
<issue_start>username_0: I am newbie and I was playing around couple of months back with Google Cloud and by mistake I somehow have added a Version/hello world project that looks like below and it is doing some logging which is taking 100 GB of space and Google is charging me for that space. I just want to get rid of i...
2018/02/28
489
1,882
<issue_start>username_0: I create my own group in odoo hr,supervisor,employee How can i customize each groups access rights using xml? For example a hr module * Hr can access everything * Supervisor can only access his employee in his or her department * And employee can only access his own profile But when im tryin...