date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/09
1,150
4,019
<issue_start>username_0: I have the following String: ``` "data:audio/mp3;base64,ABC..." ``` And I'm extracting the file extension (in this case `"mp3"`) out of it. The String varies accordingly to the file type. Some examples: ``` "data:image/jpeg;base64,ABC..." "data:image/png;base64,ABC..." "data:audio/wav;base...
2018/03/09
1,643
5,735
<issue_start>username_0: ``` { { "1234": { "name": "bob" } }, { "5678": { "name": "dan" } } } ``` I have a class representing name (and other fields, I've just made it simple for this question). But the each element is key'd with the id of the person. I've tried s...
2018/03/09
811
2,578
<issue_start>username_0: I'm using `FactoryBot` to create fake data for my Rspec tests. My factory for the users is as follows: ``` FactoryBot.define do factory :user do sequence(:name) { |n| "User#{n}" } sequence(:email) { |n| "<EMAIL>" } end end ``` Creating a user creates a client automatically in my ...
2018/03/09
1,013
2,847
<issue_start>username_0: Given a list of user-supplied numbers, which I'll refer to as `myList`, I want to find out which ones have a match against table `MasterList`, and which ones are null (no match) so, given db contents ``` MasterList ---------- ID Number 1 3333333 2 4444444 3 5555555 ``` If `m...
2018/03/09
709
2,788
<issue_start>username_0: How can I perform boolean operations on columns of datatype bit? For example, how can I perform the logical "AND" of an entire column? If the bits were cast as ints, then taking the min of the column would work as "AND" and checking if the sum is greater than zero would work for "OR", but is...
2018/03/09
1,077
3,778
<issue_start>username_0: I have a branch which I pulled from master branch. Let's call it integration. In the integration branch, I made various commits (C1, C2, C3). When I am done, I made a Pull Request to the master branch. From the master branch, I did a "Squash and Merge" so it results in only a single commit in...
2018/03/09
543
2,308
<issue_start>username_0: I'm writing tests for my Rails app. My app communicates with an external API that processes customer payments, specifically BrainTree. Now, I want to make sure my app's class that communicates with BrainTree works properly e.g. that it submits user information and other parameters to BrainTree ...
2018/03/09
1,127
3,104
<issue_start>username_0: This code prints `List(1, 2, ())` ``` def f1(i:Int): Either[String,Int] = if (i > 0) Right(1) else Left("error 1") def f2(i:Int): Either[String,Int] = if (i > 0) Right(2) else Left("error 2") def f3(i:Int): Either[String,Int] = if (i > 0) Right(3) else Left("error 3") val s...
2018/03/09
962
3,501
<issue_start>username_0: I have a table that has 3 phone number fields (among other fields). 1. DayTimePhone 2. EveningPhone 3. MobilePhone I need to pull up records where there is a number in at least one of them. ``` SELECT Field1 ,Field2 ,Field3 ,DayTimePhone ,EveningPhone ,MobilePho...
2018/03/09
1,383
5,586
<issue_start>username_0: I have this issue in 2 of my activities. When I navigate using keyboard Tab keys or arrow keys - I am unable to reach any element in the App bar. 1) Activity 1 -> My appbar has a hamburger menu icon to access the NavigationView. I am not able to click on this icon. If I touch the menu icon - I...
2018/03/09
3,330
12,318
<issue_start>username_0: I'm trying to measure execution time of some commands in c++ by using the physical clock, but I have run into a problem that the process of reading off the measurement from the physical clock on the computer can take a long time. Here is the code: ``` #include #include #include #include #i...
2018/03/09
2,668
10,947
<issue_start>username_0: I am building a, let's say, chat app. The timezone on my server (API) is UTC. If I save a new message the created\_at date in the MySQL-database is set correctly by Laravel. In my app I am using [TimeAgo](https://github.com/TylerLH/react-native-timeago) to display, when the message has been po...
2018/03/09
2,521
10,403
<issue_start>username_0: I'm have to get the initial and the last hour of a TimeSpan variable. Is it possible to obtain? I haven't found anything talking about this.<issue_comment>username_1: This is so much easier in modern c++ ``` #include auto start = std::chrono::steady\_clock::now(); ..... auto stop = std::chron...
2018/03/09
453
1,599
<issue_start>username_0: I am updating an old script and came across a pattern I am unfamiliar with: ``` # NOTE The | : always returns true so the doesn't fail | : ``` I've only ever seen this pattern used in a fork bomb example. If someone were to ask me how to accomplish what is stated in the comment, I would ha...
2018/03/09
421
1,535
<issue_start>username_0: First of all, I am NOT interested in using simulated location - I need the actual real time position. I have a uBlox GPS receiver connected to a Windows 7 PC which gives NMEA sentences on COM3 in my case. The PC is running an Android simulator (BlueStacks). Is there any way of getting real time...
2018/03/09
1,156
4,043
<issue_start>username_0: This is a simple web page for calculating ideal weight. My problem is that when I enter details and I select radio button for male or female the first if condition only works and the else if condition does not work. Selecting either is giving me the first condition answer. What is the error? ...
2018/03/09
1,004
3,611
<issue_start>username_0: I'm trying to loop through tagged products to show in the the additional detail box in the backend, but I only get one product. Here is the case, I have some products tagged with warranty, so I'm implementing a condition stating that if the customers cart has - say - 3 products (2 of those tagg...
2018/03/09
697
2,482
<issue_start>username_0: It happened to me from a day to another that this error appeared after the cordova build command. It seemes an error caused by the recent release of SDK 27 P preview. here the full error > > FAILURE: Build failed with an exception. > > What went wrong: > Execution failed for task ':proc...
2018/03/09
2,261
3,953
<issue_start>username_0: I have a number of **Hive** files in **parquet** format that contain both `string` and `double` columns. I can read most of them into a Spark Data Frame with `sparklyr` using the syntax below: ``` spark_read_parquet(sc, name = "name", path = "path", memory = FALSE) ``` However, I have one fi...
2018/03/09
466
1,487
<issue_start>username_0: Starting with a `Series` of lists of strings and a `Series` of strings, create a `Series` of lists where each element of each list is concatenated with the corresponding element of the second `Series`. For example, ``` series1 = pd.Series([['a','b','c'],['d','e']]) series2 = pd.Series(['1','2...
2018/03/09
490
1,193
<issue_start>username_0: Is there a way to do this in one line of code resulting in one dataframe instead of two as seen below: ``` df1 <- mtcars %>% group_by(gear, carb) %>% distinct(gear, cyl, am) %>% summarise(UniqCnt = n() df2 <- mtcars %>% group_by(gear, carb) %>% summarise(Cnt = n()) ``` I attempted this ``...
2018/03/09
1,798
6,913
<issue_start>username_0: I'm trying to automatically bind factory classes with a certain annotation using jersey 2/HK2. Therefore, I get the provided type at runtime from a generic interface and then try to bind the factory to this type. The method that binds the factory to a class looks like this: ``` protected void ...
2018/03/09
510
1,815
<issue_start>username_0: I have a .txt file with one column consisting of 1040 lines (including a header). However, when loading it into R using the read.table() command, it's showing 1044 lines (including a header). The snippet of the file looks like ``` L*H no H*L no no no H*L no ``` Might it be an issue with R? ...
2018/03/09
1,329
4,585
<issue_start>username_0: **Delphi 10.2.2 Firemonkey Android Question**: How can I open a URL in Android's web browser from my application? I tried to understand the concepts here: [How can I open a URL in Android's web browser from my application?](https://stackoverflow.com/questions/2201917/how-can-i-open-a-url-in-an...
2018/03/09
512
1,505
<issue_start>username_0: Can Someone help me in Converting this code in VBA. Is is possible to do it Via the worksheet function. Sorry I am a Noob and just learning. ``` =INDEX($L$1:$Z$4,4,MATCH(AQ$2,$L$1:$Z$1,0)) ```<issue_comment>username_1: Something like the following (or using evaluate) but this handles not bei...
2018/03/09
662
2,170
<issue_start>username_0: So, I'm creating a program in C# that will read Income and Outgo, both provided by the user, and will store them in 2 lists. When requested, the program must show the values stored inside the lists. The problem is, the list is located in an method, and the foreach used to show the values is in ...
2018/03/09
519
2,006
<issue_start>username_0: The only docs I can find about using GCF+GCS is <https://cloud.google.com/functions/docs/tutorials/storage>. AFAICT this is just showing how to use GCS events to trigger GCF. In the docs for [GCF dependencies](https://cloud.google.com/functions/docs/writing/dependencies), it only mentions node...
2018/03/09
958
3,473
<issue_start>username_0: I have a bash script that looks like this: ``` python myPythonScript.py python myOtherScript.py $VarFromFirstScript ``` and `myPythonScript.py` looks like this: ``` print("Running some code...") VarFromFirstScript = someFunc() print("Now I do other stuff") ``` The question is, how do I g...
2018/03/09
784
2,919
<issue_start>username_0: I am developing xamarin forms application and i got the below error when running application on android emulator ``` >The package was not properly signed (NO_CERTIFICATES). 2> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) 2> at Mono....
2018/03/09
647
1,692
<issue_start>username_0: I am using Google's directions API to get an optimized routes list given several points. It returns an array with the right order for the points: ``` [4, 0, 6, 7, 1, 3, 5, 2] ``` I want to use that array to order my points as well, which is an array of objects: ``` [obj0, obj1, obj2, obj3, ...
2018/03/09
741
2,342
<issue_start>username_0: **Background:** I have two tables linked with a one-to-many relationship. 1. *Table1* contains static life-history information for a single individual (e.g. name, sex, Mother). *ID* is the primary key in *Table1*. 2. *Table2* contains life history events for every individual in Table1. There ...
2018/03/09
1,552
4,876
<issue_start>username_0: Here I am trying shewing list sorting base in same language and hobbies the users with same language and hobbies numbers ``` var user_id = req.body.user_id; /*var sql = 'SELECT * FROM `tbl_user` WHERE `user_hobbies` =? OR `user_language_id` = ? ORD...
2018/03/09
502
1,751
<issue_start>username_0: I want to get the only top parent categories(cat\_id=1) list in the front page. For that I have written this While loop in home page. ``` php while(have\_posts()) { the\_post(); ? ### [php the\_title(); ?](<?php the_permalink(); ?>) --- php echo wp\_trim\_words(get\_the\_content(), 11...
2018/03/09
1,162
3,920
<issue_start>username_0: I am trying to build a map. Normally all read can be done in parallel, except when a write comes, than all reads need to be locked. I thought I understood how Mutex work in go but clearly I do not. I first tried to use a RWMutex write lock: ``` type person struct { sync.RWMutex age in...
2018/03/09
850
3,054
<issue_start>username_0: I am a new Laravel user. When creating a form like create/edit product. After validating the form, when it's fail because of some missing fields and redirect back. At the point, Laravel auto fill the sumitted value of fields. How can I get value of the fields was submitted at last step like "n...
2018/03/09
574
1,994
<issue_start>username_0: I have an ado recordset connected to an access database. I have a SELECT \* Query. I access the fields as: ``` rs!ROMRightMinX rs!ROMRightMaxX rs!ROMRightMinY rs!ROMRightMaxY ``` When I switch Windows to Hungarian, the nY combination in rs!ROMRightMinY becomes case sensitive. Meaning ```...
2018/03/09
908
3,506
<issue_start>username_0: I am trying to use a column value as the name of tests in order for all rows to display in the Test Explorer pane in Visual Studio on a per row basis. The following is what would be my test that consumes the data from the CSV file. I tried using the "TestName" attribute and slicing ("{15:16}...
2018/03/09
288
1,055
<issue_start>username_0: I have tried with this code in JavaScript as follows: ``` var XMLHttpRequest = require("xmlhttprequest"); var xhr = new XMLHttpRequest(); xhr.open("GET", "https://www.codecademy.com/",true); xhr.send(); console.log(xhr.status); console.log(xhr.statusText); ``` When I run this code using no...
2018/03/09
276
1,002
<issue_start>username_0: I have a condition in Excel ![As seen in image](https://i.stack.imgur.com/cwkVM.png) If the type is incident and is closed on or before 4 days next column should populate "Met", else "Not Met" Also, If the type is request and is closed on or before 14 days next column should populate "Met",...
2018/03/09
266
1,002
<issue_start>username_0: I'm working on a few illustrations for an event and I have a php that echos certain data at certain times and I was wondering if I could have this PHP script in one of the slides and allow it to echo out the certain data I want. Can anyone help with this and if you don't understand ask me more ...
2018/03/09
486
1,783
<issue_start>username_0: I am creating a DAO of the User entity. I'm doing the save method, I'd like it to return the created object or the id of the created object. Similar to JPARepository's saveAndFlush. Below is the code for the save method of the UserDAO class: ``` public long save(User newUser) { ...
2018/03/09
4,328
13,520
<issue_start>username_0: How do I count the total number of parameters in a PyTorch model? Something similar to `model.count_params()` in Keras.<issue_comment>username_1: PyTorch doesn't have a function to calculate the total number of parameters as Keras does, but it's possible to sum the number of elements for every ...
2018/03/09
387
1,429
<issue_start>username_0: I have a CURSOR that runs a SQL query and gets results. Let's say the column goes 10,20,30 in values. I don't understand how I could get the least value without a GROUP BY function. I tried a for loop but that just iterates. I tried putting it in a collection, but when I call COLLECTION.FIRST, ...
2018/03/09
601
2,512
<issue_start>username_0: I'm learning C in a tutorial. They talk about prototyping but for me, the following code works : ``` double aireRectangle(double largeur, double hauteur) { return largeur * hauteur; } int main() { return aireRectangle(10, 30); } ``` They tell that we have to add a ";" after aireRect...
2018/03/09
654
2,803
<issue_start>username_0: From below table, need to fetch all records in green. For each group partitioned by `sfdc_acc` column, retrieve the latest record on the basis of status. In case if status is Available or NotAvailable in one partition, need to retrieve the latest record with Available. ![Table](https://i.stac...
2018/03/09
1,288
4,835
<issue_start>username_0: I am not able to render the component called Butcher Shop. I cannot figure out what I am missing in order for it to not be null or undefined. Can anyone spot the mistake? Nothing is printing to the DOM. This is the error I get back : TypeError: Super expression must either be null or a function...
2018/03/09
393
1,368
<issue_start>username_0: I just started on Selenium and was able to load up google but now when I run the following code it produces the error: ``` selenium.common.exceptions.WebDriverException: Message 'chromedriver' executable needs to be PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home ``...
2018/03/09
1,298
4,730
<issue_start>username_0: I created a form with input type = file. After submitting from information from this form goes to localstorage and add to some block. I can add text, but can't add image, not a file name, but a real image. So the result should look like div with some text info inside and a real image from the...
2018/03/09
950
3,495
<issue_start>username_0: Not a PHP developer, but need to get a report from the [Analytics Reporting API V4 using PHP](https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-php). I'd appreciate it if anyone can help me to convert the result in xml or json format. I am having trouble to ...
2018/03/09
1,852
5,251
<issue_start>username_0: How to concatenate two char\* but without the library functions, I want to get a better insight on how this function works. S1 = "AA" S2 = "BB" The function should return a pointer to "AABB"; This is the code I already have. ``` char * concatenate(char * s1, char * s2) { char...
2018/03/09
1,609
6,153
<issue_start>username_0: Microsoft guidance on running asp.net core projects via a Docker container advocate copying our program files to the microsoft/aspnetcore image in our Dockerfile. We are using image save and image load commands to distribute our code changes to a test server. This means the image is quite lar...
2018/03/09
1,150
4,904
<issue_start>username_0: I am using New-PSDrive to map network drives. My issue is that despite using the -Persist and -Scope Global parameters the drives no longer show up at the next Windows login for the user. The drives require credentials to access which I pass into the New-PSDrive command. I can see that the driv...
2018/03/09
973
3,685
<issue_start>username_0: Having a bit of trouble with this. Basically, I have a document where I am populating a bookmark, then creating a new line (paragraph) after it, and need to move the cursor to the same position as the start of the bookmark in the above line and enter some text there. Example: My name is: [boo...
2018/03/09
857
3,192
<issue_start>username_0: In MySQL, is it possible to delete where a field is equal to another row with a prefix? For example (psuedo-code): ``` DELETE from `table` WHERE `field` = CONCAT("duplicate-of-", field) ``` Assuming I have have these rows, I'd like to delete all of the corresponding duplicates which have th...
2018/03/09
635
1,921
<issue_start>username_0: It works when I create *string tuples as an element of **a tuple*** but doesn't work when I create *string tuples as an element of **a dictionary*** in Python 3. The Python shell status is this: ``` =============================== RESTART: Shell =============================== >>> keys = ...
2018/03/09
1,943
5,924
<issue_start>username_0: We have a solution in Delphi that calculates a travel's duration of a given vehicle, for example, 20 minutes, 25 minutes and so on. However, sometimes we have to antecipate the travel's start time, from a specific datetime, for example 09:00 to 08:40. Then, we need to substract a negative value...
2018/03/09
619
2,269
<issue_start>username_0: what is the easiest way to retrieve form values to send to localStorage as a JSON string? I started a function with a for loop but am stuck..any nudges are greatly appreciated(still very new to this) No JQuery please. Thank you ``` var userOrder=''; function getValues(){ for(var i=0; i < ...
2018/03/09
1,147
5,239
<issue_start>username_0: I'm trying to understand Best Practise for relationships between entities and aggregates. Imagine a design where you have a **Product Aggregate**, made up of of two entities: **Aggregate Root: Product** **Child Entity: Sku** Where a product can have many Skus. The part numbers and names of ...
2018/03/09
346
1,290
<issue_start>username_0: I'm writing a SQL statement for my MS Access database, and the purpose is to count values from 3 different queries, so I tried this way: ``` SELECT(query1 + query2 + query3) AS Qtd ``` Each query returns an unique value from an aggregate function count, i.e, `query1 = SELECT Count(something)...
2018/03/09
530
1,993
<issue_start>username_0: I am creating a web crawler using Scrapy and Selenium. The code looks like this: ```py class MySpider(scrapy.Spider): urls = [/* a very long list of url */] def start_requests(self): for url in urls: yield scrapy.Request(url=url, callback=self.parse_item) def parse_item(sel...
2018/03/09
207
845
<issue_start>username_0: Below is my code, I have used a mule requester to read the zip file an dthen I have used an attachment component and given the value as #[payload], and content type as multipart/x-zip but some how it is not working. can anyone please help me. ``` ```<issue_comment>username_1: Retrive the zip ...
2018/03/09
470
1,493
<issue_start>username_0: I am trying to add values to arrays in my hash so as to avoid collisions. Imagine reading in key value pairs like this: ``` my %color_of = ( apple => "red", orange => "orange", apple => "green", ); ``` How can I append the value for `apple` to an array of values like so? ``` ...
2018/03/09
817
2,493
<issue_start>username_0: I want to exactly represent my noisy data with a `numpy.polynomial` polynomial. How can I do that?. In this example, I chose legendre polynomials. When I use the polynomial `legfit` function, the coefficients it returns are either very large or very small. So, I think I need some sort of regu...
2018/03/09
978
3,441
<issue_start>username_0: I am wondering if the magnitude value of a `CLLocationAccuracy` object represents distance in meters. It is described like this in `Xcode` docs: > > Description: The magnitude of this value. //this value being accuracy > value? > > > For any value x, x.magnitude.sign is .plus. If x is not ...
2018/03/09
757
3,031
<issue_start>username_0: I am using HTMLWEBPACKPLUGIN to create an html file in the dist folder. I am using the template option of the plugin so that i can add a div in the html file for the root div where my react components will be injected. Strangely, a hashed file is created with the correct code, and another file...
2018/03/09
711
2,320
<issue_start>username_0: I'm receiving this error when trying to deploy locally using Google App Engines's sdk (PHP 7) ``` dev_appserver.py app.yaml ``` Returns ``` WARNING: The Cloud SDK no longer ships runtimes for PHP 5.4. Please set your runtime to be "php55". ``` This is my .yaml file ``` runtime: php env...
2018/03/09
570
1,897
<issue_start>username_0: I am trying to create a Dockerfile that will automatically install apache karaf and configure it to work and its working fine. I want to install list of features. I can do it with below ``` docker exec -it 7447419c89da /opt/karaf/bin/client ``` but I want to automate the process. What comm...
2018/03/09
1,262
3,818
<issue_start>username_0: ``` def minmaxsum(lst): if len(lst) == 1: return lst[0], lst[0], lst[0]+lst[0] else: min_val, max_val, total = minmaxsum(lst[1:]) if lst[0] < min_val: min_val = lst[0] if lst[0] > max_val: max_val = lst[0] total = min_val+m...
2018/03/09
1,868
6,228
<issue_start>username_0: I've searched and searched to try to figure out my issue or what I need to do here. I'm new to Django and havn't quite gotten the hang of allowing a user to change a model Object of a database through a form. What my code is doing is creating a default 'Profile' database whenever the user sig...
2018/03/09
464
1,601
<issue_start>username_0: I have two fields which both take numbers. One must always be higher than the other. For example you can have a field for `age`, and then a field for `older sibling age` which of course must be greater depending on the first field. My fields are like this: ``` ``` I've tried using `min="age...
2018/03/09
1,395
5,393
<issue_start>username_0: I need to test 200.000 VU hitting an app in 10 seconds, so I started to make a test of 10.000 VU, running Jmeter in Non-GUI mode, to see the response of my computer, my internet connection and the site response, but I got 83.50% of Errors. 95% of the errors were these: > > Non HTTP respons...
2018/03/09
722
2,582
<issue_start>username_0: Is it possible to reuse the result from a subquery in a subsequent subquery when creating a view in postgresql? For example I have the following two tables: ``` CREATE TABLE application ( id INT PRIMARY KEY, name CHARACTER VARYING(255) ); CREATE TABLE application_user ( id INT PRI...
2018/03/09
576
1,737
<issue_start>username_0: I've a form that works perfectly fine on Chrome, Safari, but not Firefox. Try#1 ===== ``` ``` --- Try#2 ===== ``` sign up ``` --- result ====== [![enter image description here](https://i.stack.imgur.com/Qi7oX.png)](https://i.stack.imgur.com/Qi7oX.png) **Network Tab** [![enter imag...
2018/03/09
1,211
4,423
<issue_start>username_0: The following two commands produce different output. ``` Get-ChildItem | Sort-Object -Property Length Get-ChildItem | Sort-Object -Property Len ``` `Len` is not a member of `System.IO.FileInfo`. Is PowerShell matching `Len` to the `Length` member? If not, then why is there no error message s...
2018/03/09
513
1,813
<issue_start>username_0: I am trying to set the X-Frame-Options to Deny on our webpage with the following: Header set X-Frame-Options DENY [![apache2.conf file](https://i.stack.imgur.com/3rM0b.png)](https://i.stack.imgur.com/3rM0b.png) All the documentation i can find says this is where it should be (inside the apach...
2018/03/09
871
2,629
<issue_start>username_0: SO I have to split the phrase: "Hello, everyone! This is: COSC-1436, SP18" into separate tokens, dismissing any punctuation minus the dash. So the output should be: Hello everyone This is COSC-1436 SP18 And I then must encrypt each token, which I got covered. I'm just having trouble usin...
2018/03/09
926
2,700
<issue_start>username_0: My data looks like this: ``` Name Status Sub status End Date AAA Active High N/A AAA Inactive Intermediate 12/1/17 BBB Inactive High 12/31/17 BBB Inactive Intermediate 12/1/17 BBB Inactive Low 12/14/17 CCC Inactive Intermedia...
2018/03/09
1,362
4,192
<issue_start>username_0: I'm stuck on the final part of my program which involves comparing two separate sorting algorithms. I am unable to call my other two classes within my main and I'm not entirely sure why. ``` import java.util.Random; import java.util.Arrays; import java.util.Scanner; // Implement two separ...
2018/03/09
311
1,152
<issue_start>username_0: I am trying to start a twincat project on my pc in order to debug it. I've disabled the EtherCAT device and isolated a CPU on my windows 10 with an 8-core ADM processor. After trying to start the run mode, I get a fatal error on the target system. With following message: > > 'TwinCat System' ...
2018/03/09
388
1,427
<issue_start>username_0: I'm using Java 8. I realize I can cycle through a collection of objects and keep certain ones taht match a condition, which I've done below ``` final List orgs = user.getOrganizations().stream().filter(org -> org.getParentOrg() != null && org.getParentOrg().getOrganizationType().isParent()) ....
2018/03/09
1,070
2,899
<issue_start>username_0: Similar to this question: [finding and replacing elements in a list (python)](https://stackoverflow.com/questions/2582138/finding-and-replacing-elements-in-a-list-python) but with a multi-dimensional array. For example, I want to replace all the N's with 0's: ``` list = [['N', 0.21], [-1, 6.6...
2018/03/09
660
2,268
<issue_start>username_0: ``` class A { public int b;//gotten from the function public string c; } class B { int func(int generator) { Values values = new Values(); return values.b + generator; } } class Values { int b; string c; string d; int i; Values() { ...
2018/03/09
871
3,026
<issue_start>username_0: I'm using a TableBlock in a StreamField. Rendering the page, including the table, is fine. But is there anyway to allow the user to enter a link into a table cell? Simply adding a URL has it rendered as text (as I would expect). Does this require a custom renderer?<issue_comment>username_1: Ou...
2018/03/09
491
2,036
<issue_start>username_0: I am new to Angular and just started learning. I have a situation where I like to use the same component across multiple projects. Let's say, I have a `CustomerComponent` and it does CRUD operations. Now I want to use the `CustomerComponent` in project A and project B. The reason is that if ...
2018/03/09
442
1,736
<issue_start>username_0: is there a way to do this in javascript? ``` if('a' in array[index] or 'A' in array[index] ): print(bArray[0], end = ' ') ``` (search array for a string, return index for that string, and then `console.log(bArray[location];`)<issue_comment>username_1: Yes. This is definitely possible. Y...
2018/03/09
416
1,024
<issue_start>username_0: I want a regex that allows letters, number and a dash, which is `([a-z0-9\-]+)`, but I don't want one or more dashes on its own without a letter(s) or a number(s) Is it possible? --- Invalid - Invalid 3e-qw Valid -3- Valid -a- Valid<issue_comment>username_1: Use the following pat...
2018/03/09
2,852
7,391
<issue_start>username_0: I am referring to the [following helloworld example](http://www.thejavageek.com/2015/12/16/jax-rs-hello-world-example-with-wildfly/) My application is successfully deployed on my eclipse using WildFly 9.x as shown in the screenshot and the console log below: [![enter image description here](...
2018/03/09
1,464
4,342
<issue_start>username_0: The `for (var of Object.values())` prints only one value and not all of them. Don't understand why is this happening as it should iterate over each value and print out the all of the values. Right now only the first block shows the values and the other one doesn't. I have put comments in `HT...
2018/03/09
1,027
3,977
<issue_start>username_0: I am using Terraform from the bash cloud shell in Azure. I am trying to add an external data source to my Terraform configuration file that will use `az cli` to query for the `virtualip` object on a Microsoft.Web/hostingEnvironment the template deploys. AZ CLI command line: `az resource show -...
2018/03/09
1,185
4,489
<issue_start>username_0: I am currently handling a form with php and calling it via an ajax request, i want to handle exceptions showing a small div instead of the basic popup so i did multiple if conditions based on the responsetext, however one of the exceptions doesnt get handled This exception is the empty fields ...
2018/03/09
845
2,634
<issue_start>username_0: I have the following in a flask view function (\_I'm using python 3.6): ``` @login_required @main.route('/dashboard', methods=['GET', 'POST']) def dashboard(): if request.method =='POST': dash_data = namedtuple('dash_data',[('posting', str), ('folder', str)]) print(request....
2018/03/09
254
930
<issue_start>username_0: In a dev environment I have the problem that my browser (Yandex) redirects (307) an `OPTIONS` request to the https version of the URL. As we don't have SSL set up the request then fails with the error `Response for preflight is invalid (redirect)`.<issue_comment>username_1: `namedtuple` objects...
2018/03/09
424
1,477
<issue_start>username_0: I'm trying to learn Sails JS and obviously REST API. I've created a user model which I think works fine (it communicates data with my db). I've also created a signup controller with 4 needed inputs to store a new record in my user collection. (Some other data are generated by this controller t...
2018/03/09
437
1,530
<issue_start>username_0: I am in the process of trying to add a main menu to my app. From the google docs: > > To define the menu, create an XML file inside your project's res/menu/ directory and build the menu with the following elements: > > > I created a "menu" file in the /res folder. However it didn't appea...
2018/03/09
791
2,017
<issue_start>username_0: I am trying to use the query : ``` SHOW COLUMNS FROM @TABLENAME.DB ``` inside html tag like: ``` ``` the output for echo statement is showing the column 'Data Type', for ex - INT(11). Whereas when I use the same query in a simple php only file, the output of $row[n] is the Column Name. ...
2018/03/09
1,072
2,913
<issue_start>username_0: I am new to codeingiter and searched everywhere for a fix on this but nothings working for me yet the issue is so simple.. i want to display my database records in a list or table and make them available to click/ use etc.. but i keep getting an undefined variable error for query (which i thoug...
2018/03/09
873
2,347
<issue_start>username_0: Let's start with: ``` CREATE TABLE "houses" ( "id" serial NOT NULL PRIMARY KEY, "name" character varying NOT NULL) ``` Imagine I try to concurrently (!) insert into the table in a single statement multiple records (maybe 10 maybe 1000). ``` INSERT INTO houses (name) VALUES ('B6717'...
2018/03/09
851
3,146
<issue_start>username_0: I have followed the [TensorFlow Layers tutorial](https://www.tensorflow.org/tutorials/layers) to create a CNN for MNIST digit classification using TensorFlow's tf.layers module. Now I'm trying to learn how to use TensorBoard from [TensorBoard: Visualizing Learning](https://www.tensorflow.org/pr...
2018/03/09
379
1,304
<issue_start>username_0: I came across some stying in my scss file which looks like this: ``` :host { &::before { content: ''; display: block; width: 100%; height: $channel-border-w; background: $color-border-divider-bg; } } ``` does this mean to style the element befo...
2018/03/09
861
2,549
<issue_start>username_0: I am trying to using sed -i command to insert a string variable in the 1st line of a text file. This command work : `sed -i '1st header' file.txt` But when i pass a variable this doesn't work. example : ``` var=$(cat <<-END This is line one. This is line two. This is line three....