date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/20
323
1,168
<issue_start>username_0: declared loginObj in login.component.ts as below ``` public loginObj: Object = { email:'', password:'' }; public registerObj: Object = { email:'', name:'', password:'' }; ``` HTML ``` ```<issue_comment>username_1: The error is right this property is not existing. You need t...
2018/03/20
577
1,950
<issue_start>username_0: Javascript function that takes a single argument. Use that argument value which is a string to return the appropriate value from the matched object key. ``` function someFunction(someArg) { var message = { bob: "<NAME>", mike: "Hello mike", tara: "Hello tara" } console.log(messa...
2018/03/20
544
1,798
<issue_start>username_0: I'm working on a mailing and I'm having problems with setting a width in a table element in IE/ Outlook. I have tried several things which I've seen in other questions but none of them seems to work. The code is this, it includes some solutions I've tried. The div which wraps the table is us...
2018/03/20
959
3,141
<issue_start>username_0: ``` import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class MyMap { public static void main (String[] args) { Map cars = new HashMap<> (); cars.put ("ID1", new Car("Dave", "LT12 DDS")); cars.put ("ID2", new Car("Steve", "GB14 HHG")); cars.put ("ID...
2018/03/20
512
1,901
<issue_start>username_0: I tried changing the replica factor from 3 to 1 and restarting the services. But the replication factor remains the same Can anyone suggest me how to change the replication factor of existing files? **This is the fsck report:** ``` Minimally replicated blocks: 45 (100.0 %) Over-replic...
2018/03/20
1,168
4,666
<issue_start>username_0: Could you explain why: * when I access an array value using array.first it's optional * when I access from an index value it is not? Example: ``` var players = ["Alice", "Bob", "Cindy", "Dan"] let firstPlayer = players.first print(firstPlayer) // Optional("Alice") let firstIndex = players[0...
2018/03/20
1,329
5,526
<issue_start>username_0: I have developed the demo app with the square payment SDK with sandbox credential to take payment. Every time I am getting failed error and it' saying ``` Error Domain=SCCAPIErrorDomain Code=6 "User not activated. Please visit https://squareup.com/activate. The logged-in account cannot take...
2018/03/20
1,145
4,620
<issue_start>username_0: I need the background image to be horizontally centered, but vertically the bottom of the image should always be in y=350px. I have tried with calc(100% - 350px) but that isn't the right answer. The problem is that it is calculating from the top of the image instead of the bottom.<issue_commen...
2018/03/20
906
2,965
<issue_start>username_0: I would like to tell SQL-Server that a number is of a given type. Here is a little example: ``` drop table if exists test declare @i int = 100000 SELECT 4 pwr, cast(10000 * @i as bigint) val into test insert test SELECT 5, cast(100000 * @i as bigint) insert t...
2018/03/20
630
2,213
<issue_start>username_0: guys, I m new to loopback so don't know how I can do. here is my code ``` module.exports = function(Customer) { Customer.beforeRemote('create', function (ctx, user, next) { var companyprofile=app.models.customerdetail companyprofile.create(ctx.args.data.cust_cmp_profile,user,next...
2018/03/20
556
2,003
<issue_start>username_0: We have a website deployed on azure web app, sharing the same app service plan with function app. The website just has two HTML pages within it has a button click to call json service exposed by function app. Since it is plain HTML just embedding JavaScript to carry out the json call. Questio...
2018/03/20
557
1,923
<issue_start>username_0: I am new to python and boto3. Pardon me if this is not the right place to ask. Can anyone help me to write a script to fetch all the **Users who doesn't activated their MFA device**. I can get the same from credentials reports. But i want to fetch the info using script. Thanks<issue_comment>u...
2018/03/20
734
2,269
<issue_start>username_0: This is what I have tried so far (Oracle SQL): ``` UPDATE table1 SET table1.ADDRESS = (SELECT table2.ADDRESS FROM table2 INNER JOIN table1 ON table1.ID = table2.ID WHERE table1.ADDRESS <> table2.ADDRESS AND table1.DATE BETWEEN TO_DATE...
2018/03/20
906
2,783
<issue_start>username_0: I use sql server an i try to run the query below: ``` declare @ProductID int set @ProductID=322 INSERT INTO table_Customer (ProductID,Type,CompanyID) SELECT @ProductID,' ',CompanyID FROM table_Companies WHERE CompanyActive=1 ``` And i get the error below: > > Msg 2627, Level 14, State ...
2018/03/20
408
1,265
<issue_start>username_0: Is there any difference between the two methods for the Ruby Hash, or is it just "there is more than 1 way to do it"? I could not see any measureable difference between the two. Thanks,<issue_comment>username_1: According to the [Ruby source](https://github.com/ruby/ruby/blob/798316eac260e...
2018/03/20
734
2,518
<issue_start>username_0: I have a table with two columns: "users" has a full text index, "x" is a simple int column. The table contains just under 2 million entries. Using `match...against` to select rows containing a certain user returns quickly. Searching by the value of x (which is not indexed) returns in ~3 second...
2018/03/20
548
1,539
<issue_start>username_0: Right now I have this code. I am intending to write code that calculates the number of days between today and January 1 of this year. As you can see in the output below, it prints the number of days and the time. How can I rewrite the code so that it says just '78', not '78 days, 21:04:08.256...
2018/03/20
963
2,790
<issue_start>username_0: I have two datetime pickers (from, to). I need to get difference between FROM and TO dates in minutes (1505 min) and in day and time (2 day 1h 35min). I use moment.js ``` var now = moment('2018-03-28 14:02'); var end = moment('2018-06-02 00:00'); // another date var duration = moment.duration...
2018/03/20
840
2,918
<issue_start>username_0: The first time I used .bind() I was tripped up by the fact that the optional arguments passed to the bound function are prepended. This got me when I was trying to hand things off to anonymous event handling functions, sort of like this: ``` $('#example').on('change', function(arg1, arg2, evt)...
2018/03/20
655
2,498
<issue_start>username_0: let's say I have the following database entity: ``` @Document(collection = "users") public class User { @Id private String id; private String firstname; private String lastname; private String email; } ``` How can I enforce the field email to be unique? That means M...
2018/03/20
844
2,976
<issue_start>username_0: I just created a Jenkins Pipeline DSL job where I cloned a Java code from SCM and tried to run `mvn clean`. But the pipeline continuously throwing an error saying: ``` mvn clean install -Dmaven.test.skip=true -Dfindbugs.skip=true /var/lib/jenkins/workspace/@tmp/durable-77d8d13c/script.sh: 2: ...
2018/03/20
521
1,613
<issue_start>username_0: ```js const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']; for (const day of days) { console.log(day); } ``` I need to print the days with the first letters capitalized...<issue_comment>username_1: ``` days.map(day => day[0].toUpperCase() + day.sub...
2018/03/20
564
1,840
<issue_start>username_0: I have a JSON file displayed as a table, I want to search inside this table using two steps: 1. Selecting an option from a select menu to choose in which column you want to search. 2. an input, for typing the keyword you want to search for. So how can I concatenate the value of the "selected ...
2018/03/20
510
1,946
<issue_start>username_0: I have to found **uninstallers** in all the subdirectories inside a specified directory. Once the **uninstaller** is found then, I need to run it. ``` @setlocal enabledelayedexpansion @for /r %%i in ( un*.exe) do ( @echo Found file: %%~nxi %%i ...
2018/03/20
1,254
5,059
<issue_start>username_0: I can change it to SizeWE in e.g. Loaded, Initialized, MouseEnter event handler, but after column resize it is changed back to default. Trying to change it in e.g. MouseUp or DragCompleted event handler to SizeWE does not work. When mouse button is released in the end of the resize the cursor i...
2018/03/20
1,180
4,623
<issue_start>username_0: Hi I have been working through several different tutorials on getting data from a sql database into a listview. I can add data, get data from database and populate the list view, and have a working onclick listener (will fire off a Toast message). However I can not get any data from the listvie...
2018/03/20
1,018
2,518
<issue_start>username_0: I have a 3-d array. I find the indexes of the maxima along an axis using argmax. How do I now use these indexes to obtain the maximal values? 2nd part: How to do this for arrays of N-d? Eg: ``` u = np.arange(12).reshape(3,4,1) In [125]: e = u.argmax(axis=2) Out[130]: e array([[0, 0, 0, 0], ...
2018/03/20
1,320
4,243
<issue_start>username_0: I want to deploy my application to a tomcat in version 7 and I get the following Exception `java.lang.NoClassDefFoundError: javax/el/ELManager` But if I try to deploy this application to tomcat version 8 it works fine. Do you have any ideas how to fix this? Why do i switch from tomcat 8 to 7?...
2018/03/20
680
2,071
<issue_start>username_0: I am doing some conditional concatenations on pairs of strings. if the condition is not satisfied, then a space should be added between the two The following is a small subset of my larger code but replicates my problem ``` a = "ai"; b = "b"; res = ""; if (a.match(/ai$/)) { ...
2018/03/20
1,911
6,039
<issue_start>username_0: i followed a Youtube Video to implement ActiveAdmin Theme in my Rails App,- and everything worked like a charm (i thought). <https://www.youtube.com/watch?v=i2x995hm8r8> I followed every Step he took and i am a little confused right now because i can't create posts. Whenever i try to create a...
2018/03/20
602
1,808
<issue_start>username_0: my table is here customers ``` CREATE TABLE `customers` ( `customer_id` int(11) DEFAULT NULL, `account_num` double DEFAULT NULL, `lname` varchar(50) DEFAULT NULL, `fname` varchar(50) DEFAULT NULL, `mi` varchar(50) DEFAULT NULL, `address1` varchar(50) DEFAULT NULL, `address2` var...
2018/03/20
1,958
5,745
<issue_start>username_0: Say I have a string ``` "1974-03-20 00:00:00.000" ``` It is created using `DateTime.now()`, how do I convert the string back to a `DateTime` object?<issue_comment>username_1: `DateTime` has a `parse` method ``` var parsedDate = DateTime.parse('1974-03-20 00:00:00.000'); ``` <https://api....
2018/03/20
2,085
6,149
<issue_start>username_0: I have some strings which have line breaks inside, in console they are shown with breaks: ``` string1: test 1 test 2 test 3 ``` I need to split the string and make something like this: ``` string1: test 1 test 2 test 3 ``` For most of them the next code works: ``` string1.split('\n\n')...
2018/03/20
718
2,990
<issue_start>username_0: I am using a third party jar that has lots of `System.out.println()`. I am not interested in those messages. It also uses slf4j logs that I am interested in. So how do I filter out `System.out.println()` messages in my stdout. Is there a quick way? I am trying to avoid writing any script to par...
2018/03/20
966
3,834
<issue_start>username_0: I have this simple form pictured below. Depending on the format selected the appropriate input field will show when clicked. [![enter image description here](https://i.stack.imgur.com/xlGMl.jpg)](https://i.stack.imgur.com/xlGMl.jpg) This is what I have so far. I have this form in 2 different ...
2018/03/20
264
951
<issue_start>username_0: I am working on below jQuery code and target is to change content of any tag is clicked by the user. I am fine with getting the id of clicked element but not able change its content. ``` $(document).ready(function(){ $("td").click(function(){ var elementID = $(this).attr('id'); alert(ele...
2018/03/20
789
3,023
<issue_start>username_0: I've saved `terraform plan -out=my-plan` and intend to save it to source control and inject further to custom tool for ingestion and performing testing etc. However, the file contents of `my-plan` are jumbled and I'm wondering what the encoding used is. What is the encoding being used for the...
2018/03/20
729
2,309
<issue_start>username_0: I need folder's full path given it has .txt file Currently I am using the following command ``` D:\Testfolder\_dn>for /r %i in (*.txt) do @echo %~dpi ``` And getting the following output ``` D:\Testfolder\_dn\2nd\ D:\Testfolder\_dn\3rd\ D:\Testfolder\_dn\4th\ D:\Testfolder\_dn\5th\ D:\Test...
2018/03/20
794
2,503
<issue_start>username_0: I have the following json object I am trying to parse with python 3: ``` customerData = { "Joe": {"visits": 1}, "Carol": {"visits": 2}, "Howard": {"visits": 3}, "Carrie": {"visits": 4} } ``` I am using the following python code to parse the object: ``` import json def gree...
2018/03/20
2,646
9,971
<issue_start>username_0: I am working on an existing Angular application. The version is Angular 4. The application makes HTTP calls to a REST API from lot of various components. I want to show a custom spinner for every HTTP request. Since this is an existing application, there are lot of places where calls to REST ...
2018/03/20
1,349
5,067
<issue_start>username_0: Given ``` case class Fruit(name: String, colour: String) ``` I'd like to deprecate the case class field `colour`. I tried to achieve the former by both employing Scala `@deprecated` ``` case class Fruit(name: String, @deprecated("message", "since") colour: String) ``` and Java `@Deprecat...
2018/03/20
923
3,189
<issue_start>username_0: I am trying to write a custom php script in my Drupal site root that checks if the user is logged in. To check this I import bootstrap.inc. However when I do this it throws me this error [![enter image description here](https://i.stack.imgur.com/8vgqs.png)](https://i.stack.imgur.com/8vgqs.png) ...
2018/03/20
4,369
12,955
<issue_start>username_0: Doing small helping tool for combining two text files into one. These files stores a big 2D arrays of float values. Here is some of them: ``` File 1 -0,1296169 -0,1286087 -0,1276232 ... -0,1288124 -0,1278683 -0,1269373 ... -0,1280221 -0,1271375 -0,12626 ... ... File 2 -0,1181779 -0,1200798 -...
2018/03/20
11,702
31,002
<issue_start>username_0: I'm very new to java and android studio i have about 5 days under my belt from just going at it but I've ran into a snag i need help figuring out how to have android studio recognize the file path of a photo. This program should open and display a imageView on the mainActivity and when you cli...
2018/03/20
568
1,750
<issue_start>username_0: I am trying to plot a marker in X range chart. (For example: After Sprint4, I would like to show a circular milestone in DEV category). Refer following JS fiddle. Demo: <https://jsfiddle.net/amrutaJgtp/jgn9bLak/56/> ``` { type: "scatter", x: Date.UTC(2014, 5, 3), //x2: Date.UTC(20...
2018/03/20
1,563
4,682
<issue_start>username_0: i want it trigger when number is 0. when number is 1 or 2, when number is 3 or 4, when number is 5 or 6. when trigger it will change height some element. for now it always return 70px. ``` if(y == 0){ $('slpage').style.height = '0px'; }else if(y >= 1){ $('slpage').style...
2018/03/20
828
2,342
<issue_start>username_0: I am trying to produce a variable number of rectangles (layers) in a ggplot of a zoo object. I would like to do this in a loop since I do not know ahead of time how many rectangles I will need. Here is a toy example. ``` library("zoo") library("ggplot2") set.seed(1) y <- runif(50, min = 1, max...
2018/03/20
430
1,338
<issue_start>username_0: Inside my **app.component.html** I have the following code: ``` ``` When I enter in `http://localhost:4200` it loads the `AppComponent` (no problems so far), but when I enter in `http://localhost:4200/success` (which loads another route) it reloads `AppComponent`. How can I prevent Angular ...
2018/03/20
326
1,218
<issue_start>username_0: I am trying out Rail 5.2.0.rc1 Active Storage, using its included JavaScript library to upload PDF docs directly from the client to the cloud. But on submitting a form I get a browser error in both Firefox & Chrome: ``` Cross-Origin Request Blocked... (Reason: CORS header ‘Access-Control-Allo...
2018/03/20
629
2,103
<issue_start>username_0: As i understand from documentation, Azure AD B2C creates a new local account for every user that comes from a social login such as GMail/Facebook while signin first time (Correct me, if i'm wrong). However i want to intercept this and link the user to an already existing (user's own) local acco...
2018/03/20
1,672
5,738
<issue_start>username_0: I have a list of songs setup with Subject and Observable (shown with `| async` in view), and now I want to delete a song off the list, do some `filter()` and call `next()` on the Subject. **How and where do I filter?** Right now I am doing `getValue()` on Subject and passing that to `next()` o...
2018/03/20
1,518
4,773
<issue_start>username_0: My issue is simple but I'm really out of ideas; My raw data looks like: ``` xxx,1593,7 \N yyy,1094,4 ddd,1015,0,2 zzz,1576,5 \N aaa,1037,6 ``` I run the following code: ``` list_data = data.split('\n') for line in list_data: if len(line.split(',')) >= 3 : flag = Tr...
2018/03/20
679
1,952
<issue_start>username_0: I've made a horizontal list using flexbox that fills its container evenly. But when i try to change the background of the list items during hover etc. you can see there is empty space between each element. Is there any way to get rid of this while still making the list items fill the entire wi...
2018/03/20
910
2,275
<issue_start>username_0: I am trying to learn R and I have a data frame which contains 68 continuous and categorical variables. There are two variables -> x and lnx, on which I need help. Corresponding to a large number of 0's & NA's in x, lnx shows NA. Now, I want to write a code through which I can take log(x+1) in o...
2018/03/20
595
2,123
<issue_start>username_0: Trying to test angular services with Jest and got this error: ``` [$injector:nomod] Module 'superag' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. ``` How do I mock my mod...
2018/03/20
957
3,225
<issue_start>username_0: ``` long seed = 0; Random rand = new Random(seed); int rand100 = 0; for(int i = 0; i < 100; i++) rand100 = rand.nextInt(); System.out.println(rand100); ``` I wrote this code to get 100th random integer value of given seed. I want to know if there is a way to get 10...
2018/03/20
953
3,294
<issue_start>username_0: I want to source an asynchronous background processes using System() and Rscript but it doesn't seem to run the script. The line I'm using is below: system("Rscript -e 'source(\"/Users/Federico/Documents/R/win-library/3.4/taskscheduleR/extdata/PriceTesting.R\")'", wait=FALSE) In the sourced s...
2018/03/20
930
3,199
<issue_start>username_0: I want to count total number of rows in a file. Please explain your code if possible. String fileAbsolutePath = "gs://sourav\_bucket\_dataflow/" + fileName; ``` PCollection data = p.apply("Reading Data From File", TextIO.read().from(fileAbsolutePath)); PCollection count = data.apply(Co...
2018/03/20
784
2,993
<issue_start>username_0: I'm trying to catch the first time someone logs in so I can redirect him/her to another page then normally. I'm working with groups. A admin can make a group with multiple users (with generated usernames and passwords). So it can be that a user is already created before the user logs in (Ther...
2018/03/20
1,635
4,208
<issue_start>username_0: I want to be able to extract specific characters from a character vector in a data frame and return a new data frame. The information I want to extract is auditors remark on a specific company's income and balance sheet. My problem is that the auditors remarks are stored in vectors containing t...
2018/03/20
523
2,117
<issue_start>username_0: Is it possible to know the hostname of the source of an incoming request to a cloud firestore document? I would like to write a database rule of the form `allow write: if request.resource.data.source_host_name == some_predefined_value`. This is a web application so I'm trying to find a good way...
2018/03/20
861
3,137
<issue_start>username_0: Following is legit, because [consolidating data frames in R](https://stackoverflow.com/questions/9807945/consolidating-data-frames-in-r) has not the answer, nor has [How to make a great R reproducible example?](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-examp...
2018/03/20
482
1,572
<issue_start>username_0: I want to add a range of OUTPUT chain ports using firewall-cmd using its direct rule method, something like this: ``` firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 -p tcp -m tcp --dport=80-1000 -j ACCEPT ``` This says `success` however not seem to work<issue_comment>usern...
2018/03/20
779
2,734
<issue_start>username_0: Here is simplest piece of code ``` Dim testInvoiceDate As DateTime? = If(String.IsNullOrEmpty(Nothing), Nothing, New DateTime(2018, 3, 20)) ``` Why variable `testInvoiceDate` is not `Nothing` , but `#1/1/0001 12:00:0...
2018/03/20
340
1,059
<issue_start>username_0: I have the following query :- ``` select actual_ssd from tblsales ``` Is it possible to return records from `tblsales` where `actual_ssd` is dynamically 2 months ahead? So, if I ran the query today, it would return all records between 01/05/2018 and 31/05/2018. And if I ran it on 04/04/201...
2018/03/20
3,657
7,157
<issue_start>username_0: I have a problem with creating a dataframe which holds a time interval where a measurement of temperature is in. As for now the dataframe has its index as time and another column as the measurements and i would like to have the time converted to an interval of 12 hours and the measurement to be...
2018/03/20
1,185
4,041
<issue_start>username_0: I'm creating a website which handles payment from stripe using wp simple pay plugin. I created a webhook that will allow me to know if the payment is successful or not. If it is success, I will create an order that has data in it but postman always returning 500 Internal Server Error and I can...
2018/03/20
872
2,486
<issue_start>username_0: I am wanting a hidden div to slide down from the top of the screen when the user clicks on "Services". When the div does slide down, I want the height to be `height: 35vh;`. I am unsure of what I am doing wrong. Does anyone see the issue? ```js $('#serviceClick').click( function () { $(...
2018/03/20
721
1,884
<issue_start>username_0: In tensorflow, I would like to sum columns of a 2D tensor according to multiple sets of indices. For example: Summing the columns of the following tensor ``` [[1 2 3 4 5] [5 4 3 2 1]] ``` according to the 2 sets of indices (first set to sum columns 0 1 2 and second set to sum columns 3 4)...
2018/03/20
522
1,825
<issue_start>username_0: I have below insert running into pl/sql code: ``` PROCEDURE insertA(param in varchar2) IS v_col VARCHAR2(32000) := 'colA, colB, colC'; v_ins VARCHAR2(32000) := 'INSERT INTO '||getU||'.'||My_TABLE||' ('||v_col||') ' || '(SELECT 'A', ...
2018/03/20
700
1,917
<issue_start>username_0: I would like to calculate this mathematical summation: ``` Σ(n=1 to 36) (C(36,n))*((-1)**(n+1))*0,23*(0,29**(n-1)) ``` where 36 C n means the combination of these two numbers. I already got the function for that: ``` def C(n,k): C = factorial(n)/(factorial(k)*factorial(n-k)) return...
2018/03/20
725
2,780
<issue_start>username_0: I am rather new to programming and have begun designing a text-adventure game in Java. I am currently having difficulty finding out how to make the text-adventure playable on machines that don't have a JRE such as BlueJ or Eclipse installed. I would like to share my game with friends but don't ...
2018/03/20
847
3,174
<issue_start>username_0: I'm using argparse.ArgumentParser.parse\_known\_args to perform some heuristics on the command-line given to an external utility, while only specifying the relevant parts of its syntax in my Python code. However when known and unknown arguments are given in short form and are joined together in...
2018/03/20
580
1,874
<issue_start>username_0: I'm attempting to write a program that fills an 8x8 checkerboard with two alternating colors, but I am struggling in creating a method `public void fillCheckerboard(Color[][] board)` to test it. I'm trying to print out an array that shows 'x' for black and 'x' for white.<issue_comment>username...
2018/03/20
1,008
4,087
<issue_start>username_0: It's possible to install Application Insights via the extensions section in Azure App Services, but it's also possible to just install the packages via NuGet and define the `APPINSIGHTS_INSTRUMENTATIONKEY` application setting. You can also do both. What is the difference? Edit: I have found ...
2018/03/20
339
1,130
<issue_start>username_0: I want to send a text to a field and submit it. HTML code was shown. How should I do? This is my HTML code: ``` ``` I want send a text to box with this code: ``` driver.execute_script("arguments[0].value = arguments[1]", driver.find_element_by_css_selector("textarea._bilrf"), "nice!") ``` ...
2018/03/20
1,894
6,857
<issue_start>username_0: ``` ClassicEditor .create( editorElement, { ckfinder: { uploadUrl: 'my_server_url' } } ) .then( ... ) .catch( ... ); ``` What should be my server response? I am using Java in the backend. Whatever my response is, it throws a dialog box 'cannot uploa...
2018/03/20
2,722
9,339
<issue_start>username_0: So, I try to create my own neural network. Something really simple. My input is the MNIST database of handwritten digits. Input: 28\*28 neurons (Images). Output: 10 neurons (0/1/2/3/4/5/6/7/8/9). So my network is as follow: 28\*28 -> 15 -> 10. The problem remains in my estimated output. Indee...
2018/03/20
2,205
6,247
<issue_start>username_0: How do i use an if statement to only do what's inside the brackets when a character is entered. But when an integer/nothing is entered send them to the else statement. ``` #include #include #include #include int main(void) { // use boolean for printing if user fails(true) or passes(false)...
2018/03/20
688
2,493
<issue_start>username_0: I'm trying to get all the properties, in a watchlist(s) where the list has a user id. The relationship is set up as follows. Each watchlist is related to a user id. Each Property has a watchlist id. I need all properties, in all the watchlists belonging to that user. The watchlist gets the ...
2018/03/20
767
2,390
<issue_start>username_0: I have tried adding a where clause in my join statement, at the ON, However i am receiving syntax errors, i am not sure where to put this as i need it to pull the data from a table called systemlookup ``` DECLARE @OptionalModules TABLE (moduleid INT, name VarChar(200)) INSERT INTO @Optio...
2018/03/20
481
1,667
<issue_start>username_0: I have CSS: ``` @media (max-width: 480px) { #creating_products { max-height: 400px; overflow-y: scroll; } } ``` HTML: ``` {section name=foo start=1 loop=11 step=1} * ........ {/section} ``` When I tested this code on my Android, part of the "creating\_products" div was hi...
2018/03/20
514
2,099
<issue_start>username_0: I'm trying to switch my local Pycharm + Django to docker based dev env. I run on mac and use Docker-Compose (few dockers: my django app, some db and nginx). All runs fine, code change immediately reflected in docker and correct packages available while coding in Pycharm. Once docker-compose st...
2018/03/20
389
1,263
<issue_start>username_0: I have two arrays, one of them is sparse. I'd like to perform what is essentially an *outer join* on them. ``` const a = ['a', 'b'] a[3] = 'c' // a is Array(4) [ "a", "b", <1 empty slot>, "c" ] R.zipSparse([1, 2, 3, 4], a) // expected output: [[1, 'a'], [2, 'b'], [3, undefined], [4, 'c']] ``...
2018/03/20
649
2,159
<issue_start>username_0: I've tried ``` 'field1'+'field2'+'field3' as combination ``` and tried: ``` ((((field_1||'_')||field_2_yes)||'_')||field_3_yes) AS combination ``` tried: ``` field1 || field2 as combination ``` i've also tried Concat, coalesce, can't seem to get it to work. Also I am querying SQL ser...
2018/03/20
767
2,620
<issue_start>username_0: Hi I am building a Django application and during this I am doing test uploads into my database, then deleting the data. I understand that when I do this, the next insert will 'pick up where it left off' when inserting the auto-increment primary key int. I.e: I insert 3 rows into my table 'Sam...
2018/03/20
427
1,441
<issue_start>username_0: Suppose I have two list of `T`, I need to remove from list `A` all the elements that are not in list `B`. I did this: ``` A.RemoveAll(item => !B.Contains(item)); ``` this working pretty well, but if the list `B` does not contains any elements, this code will remove all the items from the lis...
2018/03/20
499
1,531
<issue_start>username_0: I am trying to get the last record from my tinyDB, so I want to make a query that looks like that: `"SELECT * FROM table ORDER BY id DESC LIMIT 1"` which should give me the last row. though I can't figure out how to do it with TinyDB.<issue_comment>username_1: If you want to order db by time de...
2018/03/20
622
1,672
<issue_start>username_0: I am currently working on a stenography assignment on how to embed secret image to a cover image using Wang's algorithm. Basically i just want to change for eg: **3d matrix** ``` A(:,:,1) = [5 7 8; 0 1 9; 4 3 6]; A(:,:,2) = [1 0 4; 3 5 6; 9 8 7]; A(:,:,3) = [7 9 3; 4 5 9; 1 9 9]; To Str = '...
2018/03/20
517
1,654
<issue_start>username_0: I am a beginner in Cordova and Phonegap, can anybody guide me how to run Cordova and Phonegap application after making changes without build.phonegap. Because my index.html not run directly on web. Is there any other way to run and build the application quickly because when I build does any sm...
2018/03/20
626
1,930
<issue_start>username_0: When I try to compile, in emacs, my file with ``` ocamlbuild -use-ocamlfind main.native ``` I have this error : ``` ocamlbuild -use-ocamlfind main.native Failure: ocamlfind not found on path, but -no-ocamlfind not used. ``` When I compile it with the same command but in my terminal (zsh)...
2018/03/20
871
2,479
<issue_start>username_0: ``` var str=" hello world! , this is Cecy "; var r1=/^\s|\s$/g; console.log(str.match(r1)); console.log(str.replace(r1,'')) ``` Here, the output I expect is "hello world!,this is Cecy", which means remove whitespaces in the beginning and the end of the string, and the whitespace befor...
2018/03/20
667
2,457
<issue_start>username_0: I'm trying to insert `values` using mysql in nodejs. I had written the following code and installed MySQL support via npm,But canot to INSERT INTO the table due to this problem. My code; ``` var mysql = require('mysql'); var values=randomValueHex(8); var sql = "INSERT INTO `activationkeys`(...
2018/03/20
1,158
4,052
<issue_start>username_0: I have the following vuex getters ``` import { isEmpty } from 'lodash' // if has token, we assume that user is logged in our system export const isLogged = ({ token }) => !isEmpty(token) // get current user data export const currentUser = ({ user }) => user export const timeLimit = ({ token_t...
2018/03/20
847
3,840
<issue_start>username_0: It seems it's possible to remove packages (or package versions) for Pypi: [How to remove a package from Pypi](https://stackoverflow.com/questions/20403387/how-to-remove-a-package-from-pypi) This can be a problem if you've completed development of some software and expect to be able to pull the...
2018/03/20
813
3,763
<issue_start>username_0: I have created an android app on android studio with firebase database. Now I want to develop an administrative website through which the admin will control all the operations of the app. I want to know how to connect the app to the website. Also, should the database be connected to the app ...
2018/03/20
1,070
2,562
<issue_start>username_0: I have data in Excel in the following format: ``` Column A Column B 20/03/2018 300 21/03/2018 200 22/03/2018 100 23/03/2018 90 24/03/2018 300 25/03/2018 200 26/03/2018 100 27/03/2018 50 28/03/2018 90 29/03/2018 100 30/03/2018 110 31/03/2018 120 ``` I would like to get the dat...
2018/03/20
1,557
4,618
<issue_start>username_0: I'm trying to learn haskell by solving some online problems and training exercises. Right now I'm trying to make a function that'd remove adjacent duplicates from a list. > > Sample Input > > > "acvvca" > > > "1456776541" > > > "abbac" > > > "aabaabckllm" > > > > > --- > > > Ex...
2018/03/20
1,189
4,290
<issue_start>username_0: I have a requirement where I need to create a list of objects from another list based on 2 conditions. **Either the object should be in session or should be active.** [This question is vaguely related to- [Create list of object from another using java8 streams](https://stackoverflow.com/questi...
2018/03/20
1,333
5,173
<issue_start>username_0: In my sql database `WorkDay` field is in string format and in model it is `nullable DayOfWeek`, i.e `public DayOfWeek? WorkDay { get; set; }`. While Converting database `WorkDay` field into model `WorkDay` field it will generate an error like: > > Could not translate expression 'Table(StaffSc...