date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/05
546
1,766
<issue_start>username_0: ``` #include #include int main(int argc, char \*\*argv) { int l = 0; char a[] = "Madam, I'm Adam."; int h = strlen(a) - 1; while (h > 1) { if (a[l++] != a[h--]) { printf("%s is not a palindrome\n", a); return 1; } } } ``` This would work for strings like "madam" without any sy...
2018/03/05
678
2,823
<issue_start>username_0: Assume in my company, we have same application written in C++, running in machines of RHEL5, 6 and 7. I want to build from one single build server (which is running RHEL7) to get the executable that runs in old previous versions of RHEL. May I know if it is achievable? I expect if I am buildi...
2018/03/05
2,220
6,674
<issue_start>username_0: On EMR Spark, writing an `RDD[String]` to S3 via a dataframe. ``` rddString .toDF() .coalesce(16) .write .option("compression", "gzip") .mode(SaveMode.Overwrite) .json(s"s3n://my-bucket/some/new/path") ``` Save mode is `Overwrite` and `s3n://my-bucket/some/new/path` does not yet...
2018/03/05
564
1,976
<issue_start>username_0: When I trying to install keras with pip3 this message shows. ``` Requirement already satisfied: keras in /usr/local/lib/python3.5/dist-packages Requirement already satisfied: pyyaml in /usr/local/lib/python3.5/dist-packages (from keras) Requirement already satisfied: six>=1.9.0 in ./.local/lib...
2018/03/05
869
2,990
<issue_start>username_0: Is there a way I can pass through an argument to an Action without using an anonymous function? Eg, the following code works fine: ``` private void doSomethingAndLogIt(string log, Action dosomething) { Debug.WriteLine(log); dosomething(); } private void multiplyIt() { ...
2018/03/05
1,188
4,283
<issue_start>username_0: I have read a lot of the responses to previous versions of this issue but none seem to work. Every time I open my script component in Visual Studio 2015 (v14.0.25431.01 update 3) it tells me I am missing a reference to Newtonsoft.Json. So I go into NuGet Package manager and it asks me to Resto...
2018/03/05
1,497
3,576
<issue_start>username_0: I have a text file that has text in this format: ``` ptr[0] = Alloc(1) returned 1000 (searched 1 elements) Free List [ Size 1 ]: [ addr:1001 sz:99 ] Free(ptr[0]) returned 0 Free List [ Size 2 ]: [ addr:1000 sz:1 ] [ addr:1001 sz:99 ] ptr[1] = Alloc(7) returned 1001 (searched 2 elements...
2018/03/05
1,051
2,714
<issue_start>username_0: ``` SELECT address FROM user_address WHERE username = '$user->name' ORDER BY time DESC LIMIT 1 ``` Here is the SQL query that I can understand. How is it possible to convert it into Drupal's 7 PHP? I'm trying to figure that out for a day, and I tried different approaches, but it seems t...
2018/03/05
1,048
2,655
<issue_start>username_0: I have a problem where i am trying to exclude the first ten days of each month from a query. My date is in format yyyy-mm-dd. How is the best method to exclude days 1-2-3-4-5-6-7-8-9-10 from each month in the query? I am using the Wide World Importers database.<issue_comment>username_1: if `pe...
2018/03/05
926
3,254
<issue_start>username_0: I am currently using mpdf to generate my pdfs from html. So far with my current html that I am passing in, I am able to generate a one page pdf with a header and footer. However, if there is more than one page, my footer goes all the way to the bottom of the second page. Is there a way to add a...
2018/03/05
1,319
5,407
<issue_start>username_0: I am trying to do a very basic setup of Envoy for load balancing and discovery features of my GRPC services. Say for a very basic setup i have two GRPC services running in Docker containers. According to Envoy docs i should use "envoy.tcp\_proxy" filter type. Here i make a very simple yml confi...
2018/03/05
748
2,649
<issue_start>username_0: Attempting to install a [theme](https://mmistakes.github.io/minimal-mistakes/docs/installation/) for Jekyll while learning Jekyll/Ruby from scratch, I messed up something. Now I get an error message whenever I execute `bundle`. Anyone know how to fix? ``` $ bundle -v /usr/local/bin/bundle:23:...
2018/03/05
654
2,805
<issue_start>username_0: Suppose I have this straightforward event listener registration pattern: ``` function registerElement(){ var element = document.getElementById("element"); element.addEventListener("click", sayHello, false); } function sayHello(event){ event.preventDefault(); console.log...
2018/03/05
1,171
3,470
<issue_start>username_0: I'm trying to make type-safe handlers for redux actions relying on action type. For example, any action could be described as: ``` type ActionType = { type: T }; ``` For a specific action one can have: ``` type MyAction = ActionType<'hey' | 'there'>; ``` Now, I'd like to restrict a handl...
2018/03/05
848
2,837
<issue_start>username_0: I have the following code, which I want to use with a large, center-aligned button to redirect visitors to a website to one of an array of URLs at random: ``` <!-- // Create an array of the links to choose from: var links = new Array(); links[0] = "http://www.google.com/"; links[1] = "http://...
2018/03/05
1,356
4,493
<issue_start>username_0: I send my Azure Functions `TraceWriter` output to Application Insights, via the [App Insights integration](https://github.com/Azure/Azure-Functions/wiki/App-Insights). When I look for the traces, they don't appear in order. For example, I can run a query like ``` traces | where operation_Id ==...
2018/03/05
1,784
5,687
<issue_start>username_0: Hello all I am trying to bubble sort in shell but I am getting an operand expected error. I have initialized the variables I need to use, and am making sure I am using the correct syntax( correct me if i didn't ). The error I am getting is on this line: **x=${array[$i]}** Thank you ``` #!/b...
2018/03/05
444
1,581
<issue_start>username_0: I am having an incredibly hard time with recursive data types in Haskell. I am trying some practice problems before I do the actual assignment, but I am finding one problem that is continuously keeping me from figuring out some of these problems. We have ``` data Person = MakePerson String [P...
2018/03/05
874
2,551
<issue_start>username_0: I have several strings that look like: > > longname1, anotherlongname2, has1numbers2init3 > > > I would like to use `str_split` to split off the last character of the strings. Eg: ``` Array ( [0] => longname [1] => 1 ) Array ( [0] => anotherlongname [1] => 2 ) Array ( [0] => has1numbers2...
2018/03/05
1,881
5,846
<issue_start>username_0: I'm looking for advice on the best (most efficient) way to compute the top 5 values in magnitude for multiple columns, and I also need to compute the sum for another column. Say I have data with the headings: (person, daydate, month, dailyqty, dailymax1, dailymax2), where for each day for each...
2018/03/05
1,468
5,012
<issue_start>username_0: I have an ASP.Net data bound GridView, which I want on clicking a row to open a URL passing the ID of selected row. The ID is a column in the database table, howewver I don't want to show it to the user. If I set the ID column visibility to false, it doesn't populate the column with the data....
2018/03/05
459
2,233
<issue_start>username_0: I'm trying to select the date on my database and compare it to the date today. My current code has no error but it doesn't give me any result. My code: ``` $query = mysqli_query($mysqli, "select *, date_format(date, '%Y-%m-%d') from appointment LEFT JOIN doctor...
2018/03/05
1,208
4,692
<issue_start>username_0: I am trying to understand what is difference between AWS Athena service and the newly released S3 select (still in preview). How are use cases different for both of those? It seems both help in selecting partial data from S3.<issue_comment>username_1: Athena is (from the little I've used it) m...
2018/03/05
514
1,496
<issue_start>username_0: I have a data table with two columns. For each column, I want to count the number of rows with the same value for row 1 and a row 2 value that is +/- 10 of it's value for column 2. Here is an example of what some data and the result may look like: ``` Table: info C1 C2 near a 5 ...
2018/03/05
524
1,830
<issue_start>username_0: Well, I have 3 spring profiles: dev, prod, test, and I want to use different log4j2 configuration in different profiles. I checked the the [spring-boot reference](https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#_profile_specific_configuration) and followed the way...
2018/03/05
2,064
6,212
<issue_start>username_0: I am learning GOLANG, in particular for its concurrency capabilities. Have tried to further develop one of the worker\_pool examples so that each worker receives a job id and a job load, represented in a random duration of the job. The duration is used by a time.sleep command to wait the allo...
2018/03/05
604
1,856
<issue_start>username_0: I'm trying to extract the authors and paper titles from DBLP API for a specific venue. Here is my approach: ``` import json import pandas as pd url = "http://dblp.uni-trier.de/search/publ/api?q=bioinformatics%20type%3AJournal_Articles%3A%20venue%3ABioinformatics%3A&h=1000&format=json" obj = u...
2018/03/05
893
3,247
<issue_start>username_0: I need to send HTTP POST with Google FCM. With code below, it's OK to send English message but Chinese characters. I did many trials by adding UTF-8 here and there... Need help. The payload of my message is str2 in the code below. The result shown in Android APP is Hello+%E6%88%91 E68891 is...
2018/03/05
1,003
3,756
<issue_start>username_0: Currently I am: ``` // Save defaults.set(Settings.hostname, forKey: "hostname") defaults.set(Settings.current_user, forKey: "current_user") defaults.set(Settings.access_token, forKey: "access_token") // Load Settings.hostname = defaults.string(forKey: "hostname") Settings.current_user = defau...
2018/03/05
3,110
10,767
<issue_start>username_0: I am trying to implement an icon that when clicked will save a variable to the user's clipboard. I have currently tried several libraries and none of them have been able to do so. How do I properly copy a variable to the user's clipboard in Angular 5?<issue_comment>username_1: **Solution 1:**...
2018/03/05
3,501
12,038
<issue_start>username_0: ``` set some_host to "test.mydomain.com" try -- Ping the host. do shell script "ping -c 1 -t 1 " & some_host -- Set ipAddr. set ipAddr to word 3 of result -- Combine the IP with the URL & port. set urlAddr to "http://" & ipAddr & ":80" display dialog "Connection Suc...
2018/03/05
1,031
3,974
<issue_start>username_0: I am developing an app receiving UPD broadcast packet from Wi-Fi camera. It used to be good before I found the problem in receiving UPD broadcast packet at Google Pixel 2 / Pixel 2 XL. To figure out the reason, I made 2 test apps: one is UPD broadcast sender( <https://senatech.box.com/s/gmhr39...
2018/03/05
386
1,244
<issue_start>username_0: I have a column called item and I would like to add whitespace at the START of each row in the item column. I would also like to remove the 3 and insert the result into a new column called item\_n. ``` item item_n -------------------|----------- to go 3 | 1 2 3 ...
2018/03/05
591
1,713
<issue_start>username_0: When I run the following code, I get the expected answer `[3, 4]`, which is the index of the 2 numbers that add up to my target variable. However, when I change the myArray input to `[]int{1,2,3,4,6,11,4,12}` (I deleted the last 6), I get a panic. Please help me understand why this is happening...
2018/03/05
2,863
10,351
<issue_start>username_0: I am currently being attacked with a URL of the form: ``` /act/test.php?CourseId=66'+and(%2f**%2fsElEcT+1+%2f**%2ffRoM(%2f**%2fsElEcT+count(*),%2f**%2fcOnCaT((%2f**%2fsElEcT(%2f**%2fsElEcT(%2f**%2fsElEcT+%2f**%2fcOnCaT(0x217e21,ifnull(MailingDate,char(32)),0x217e21)+%2f**%2ffRoM+contin5_Mailin...
2018/03/05
1,279
5,128
<issue_start>username_0: I created a custom `QPushButton` that allows to pick a color from a menu or a `QColorDialog`. Since it's part of a "theme" editor, I also added support for a QUndoStack: every time the color of a custom button is changed, it creates a subclass of QUndoCommand, which is pushed to the QUndoStack....
2018/03/05
998
3,511
<issue_start>username_0: ``` with open("zipcodes.txt", "r") as ins: array = [] for line in ins: array.append(line.split(",")) print(array) userInput = input("Please enter the codes your looking for: ") print(array.index(userInput)) ``` First off, this is for a school assignment, so I am not looking fo...
2018/03/05
1,198
3,085
<issue_start>username_0: I got a HTML code in the following using bootstrap 3.3.7, using thumbnail class the images can be resized and fit into the grid perfectly. ``` Project Pictures of Coffee ------------------ ![](https://d2lm6fxwu08ot6.cloudfront.net/img-thumbs/960w/04LDEYRW59.jpg) ![](https://d2lm6fxwu0...
2018/03/05
942
3,338
<issue_start>username_0: I'm trying to implement this SQL to my Sequelize ``` SELECT file_id FROM table WHERE datediff(curdate(),create_date) > 5; Here is my Sequelize findOverPeriodFile: function () { return table.findAll({ where:{ 60: {lt: Sequelize.fn('')} } }); } ``` ...
2018/03/05
469
1,566
<issue_start>username_0: I have a following XML ``` xml version="1.0" encoding="UTF-8"? test test ``` I am trying to get all **`name`** elements irrespective of their position in **`stationary`** I have tried using the following syntax but it didn't work: ``` stationary/*/name/text() ```<issue_comment>usernam...
2018/03/05
2,036
6,746
<issue_start>username_0: (Q1)I have a test.so with some functions that I need to use.I've surveyed for a while but no answers. Could anyone have some advise of how to include a shared library in gn file of chromium project? Many thanks. Below is the content of my gn file: ``` import("//third_party/WebKit/Source/core/...
2018/03/05
991
2,268
<issue_start>username_0: I have a dataframe whihc looks like ``` Date Value1 Value2 Value3 Value4 2018-02-10 1 2 4 3 2018-02-09 2 4 1 2 2018-02-08 3 1 1 3 ``` Considering today as 2018-02-13, how can i add two rows one for 2018-02-11 and 2018...
2018/03/05
1,039
2,793
<issue_start>username_0: I'm developing an ASP.NET Core (2.0) Web App and I have the following two classes: 1.The team class ``` public class Team { public int Id { get; set; } [Required] public string Name { get; set; } public string ImageUrl { get; set; } } ``` 2.And the Match class ``` public cl...
2018/03/05
1,265
2,986
<issue_start>username_0: I've got a housing csv that looks like this: ``` year,title_field,value 2014,Total Housing Units,49109 2014,Vacant Housing Units,2814 2014,Occupied Housing Units,46295 2013,Total Housing Units,47888 2013,Vacant Housing Units,4215 2013,Occupied Housing Units,43673 2012,Total Housing Units,45121...
2018/03/05
1,339
4,990
<issue_start>username_0: **java code as follow.** ``` import java.lang.reflect.Field; import java.lang.reflect.Modifier; public class Test { public static void main(String[] args) throws NoSuchFieldException, IllegalAccessException { C c = new C(); Field field = c.getClass().getDeclaredField("NAME...
2018/03/05
4,146
15,335
<issue_start>username_0: I want to check the code style of my project. Then I apply `checkstyle` plugin. In `build.gradle` of root project, I add a new task into every sub project. ``` subprojects { project -> apply plugin: 'checkstyle' task checkstyle(type: Checkstyle) { description 'Runs Checkstyle ...
2018/03/05
560
2,266
<issue_start>username_0: I wanted to delete an entire collection in firestore. I used the firebase command - `firebase firestore:delete product/` > > Error: Must pass recursive or shallow option when deleting a collection. > > > Again tried - `firebase firestore:delete product/1` > > Error: Document has childr...
2018/03/05
1,541
5,047
<issue_start>username_0: alright so this is where I am stuck. For my last conditional in this basic program. I want to add an image if the user receives a score of 0. How do i add an image. I already put a picture in the folder where the .js and .html files are. But whats the code to insert that image i have on file. I...
2018/03/05
985
3,146
<issue_start>username_0: Hello this is my parent component code ``` renderMenu() { if (this.props.menu) { return ( ); } } render() { console.log(this.props); const { ContainerStyle } = styles; return ( {this.renderRestaurantName()} {this.renderSpinner()} {this.renderMenu()} ); } ``` Inside List I re...
2018/03/05
954
3,287
<issue_start>username_0: thanks in advance for taking a look at this. I am attempting to set the class on page load of my element to pending, and then onClick, remove the pending class and add the completed class: Currently, the state of completed and pending change accordingly; however, the classes do not change (pen...
2018/03/05
1,401
5,063
<issue_start>username_0: I want to overlay two images (maybe different format (channels) with opencv. Originally I use addWeighted, however, it fails on two images with different channels. Is there any way in opencv that can handle this case? Thanks<issue_comment>username_1: **No**, there is no API in OpenCV that offer...
2018/03/05
1,038
3,986
<issue_start>username_0: I'm trying to listen to click events (To be exact, magnet pull from google cardboard) on Android Chrome, but this seems to not work if the device goes into VR mode. I'm using Samsung Galaxy S7 for testing: JS: ``` window.addEventListener('click', function (evt) { console.log("test") }); ...
2018/03/05
377
998
<issue_start>username_0: I'm using phpMyAdmin and I've this SQL table: \_\_\_SalesTaxes ``` |--------|----------|------------| | STX_Id | STX_Name | STX_Amount | |--------|----------|------------| | 1 | Tax 1 | 5.00 | | 2 | Tax 2 | 13.50 | |--------|----------|------------| ``` How can I ...
2018/03/05
1,168
3,061
<issue_start>username_0: Given a data set like this: ``` TT <- c(23.67, 23.67, 23.68, 23.67, 23.67, 23.67, 23.66, 23.59, 23.54, 23.30, 20.65, 16.13, 13.39, 12.81, 12.04, 11.70, 11.42, 11.24, 10.86, 10.63, 9.88, 9.19, 8.79, 8.37, 7.85, 7.36, 7.10, 6.99, 6.88, 6.69, 6.39, 6.35, 6.31, 6.25, 6....
2018/03/05
701
2,372
<issue_start>username_0: I am building an attendance application for my college, where in I want to mark student attendance through the network. Every class room has seperate router and I want to basically check if student are sitting in the router's range and mark their attendance accordingly. How can I check if there...
2018/03/05
867
2,657
<issue_start>username_0: **I am trying to find the least frequent element of an array, I tried to sort the array by using insertion sort and then used two loops; the outer loop for picking each element and inner loop for comparison.** ``` # include void LeastFrequentnum(int arr[],int n); void InsertionSort(int arr[],...
2018/03/05
1,382
4,888
<issue_start>username_0: I am working on a project to get the transcript out of an audio file. Audio files are of the format flac. I am using AWS Lambda and have written the code in node. Also, I am using IBM Speech to text service and using the basic example code given by them which can be found [here](https://www.ibm...
2018/03/05
1,226
3,990
<issue_start>username_0: I try to run an example code about client and server but some errors appear : Server : ``` import socket HOST = '' # Symbolic name meaning all available interfaces PORT = 50007 # Arbitrary non-privileged port s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)...
2018/03/05
649
2,462
<issue_start>username_0: I am trying to change Stata code to SAS. In Stata I rename all variables using ``` rename *_* ** ``` How can I do this in SAS?<issue_comment>username_1: The problem is the javascript event loop is empty so Lambda thinks it's done. You can download an npm module `async/await` which will help...
2018/03/05
773
2,789
<issue_start>username_0: I am using a formula in excel to add all the data with the same date in the column before with `=SUMIF(A2:A150,C1,B2:B150)` Is there any way to copy the formula down the column but with the same range but different row: `=SUMIF(A2:A150,C(the row it is in),B2:B150)` Instead, when i copy the fo...
2018/03/05
1,014
3,256
<issue_start>username_0: I want to count the number of elements with the value Z. I will give an example of what I need. I have a huge number of tags (millions) stored in a data frame and they are in the form < X >. as shown in the figure below. I need to get the count of each tag to find the top 10 tags (The tags t...
2018/03/05
503
1,974
<issue_start>username_0: I have created a dialog with an enter animation from top. like that: ``` @Override protected void onCreate(Bundle savedInstanceState) { ... Window dialogWindow = getWindow(); assert dialogWindow != null; WindowManager.LayoutParams lp = dialogWindow.getAttributes(); DisplayMetr...
2018/03/05
1,370
4,708
<issue_start>username_0: I've been trying to install composer with XAMPP on Windows 10 and the installer gave the following error: ``` The PHP exe file you specified did not run correctly: C:\xampp\php\php.exe The php.ini used by your command-line PHP is: C:\xampp\php\php.ini A setting in your php.ini could be causi...
2018/03/05
1,219
4,189
<issue_start>username_0: I have a function defined as: def f2(x) in my code and I want to get a list of x and y values for that function. Here is my code to do this: ``` x = np.linspace(-2, 2, 100) print("\nx values:\n ", x) f2y = np.zeros(len(x)) # print("f2y, empty array of y values: ", f2y) ...
2018/03/05
1,190
4,313
<issue_start>username_0: Here is the HTML source ``` Ownership: Private Institute Type: Affiliated College ``` How can I extract only Private and Affiliated College from the following source. Also both information should be separately extracted into two different variable. The method should be scalable so that it c...
2018/03/05
326
1,133
<issue_start>username_0: I'm using multer s3 to upload images from my node.js app to my amazon bucket. I'm using the date together with the original filename to create the new filename; however, when I try to display the new filename it just displays as undefined. This is my code: ``` var upload = multer({ stora...
2018/03/05
406
1,370
<issue_start>username_0: I am learning vueJS and have 2 clickable divs that share the same method. So when I click one of the divs the action happens for both of them. What is the best way to action an @click on a div (This div) the one that is being clicked. So I'm trying to open and close a menu only on the one (di...
2018/03/05
877
2,743
<issue_start>username_0: I'm trying to align 4 elements side-by-side in a div. Two of them are images and two of them are paragraph tags. like this: [img1] -- [p1] -- [img2] -- [p2] Below is my code. However, the elements are displaying vertically on top of each other. I want them to be on the same line. How can I d...
2018/03/05
720
2,564
<issue_start>username_0: ``` int[] numbers = { 1, 2, 3, 4, 5, 6 }; int search = 10; bool found = false; foreach(var eachNum in numbers) { if (eachNum.Equals(search)) { found = true; Console.WriteLine("found"); Console.WriteLine(search); break; } } if (!found) // !found == fa...
2018/03/05
324
866
<issue_start>username_0: I encountered a problem in leetcode named `246. Strobogrammatic Number` ``` class Solution(object): def isStrobogrammatic(self, num): return all(num[i] + num[~i] in '696 00 11 88' for i in range(len(num)/2+1)) ``` i am curious of what `num[~i]` means?<issue_comment>username_1: ``...
2018/03/05
1,189
3,459
<issue_start>username_0: I'm a beginner of golang and I'm learning the goroutine and channel. Intuitively, I consider a gorountine in golang is essentially a thread running independently. Therefore, if there are more than one goroutine, the execution order won't be guaranteed. Hence, the following code should output "p...
2018/03/05
1,523
5,686
<issue_start>username_0: I am working on a large project and need to fix some accessibility issues. I need to navigate to a Profile icon and then to a Dropdown menu using Tab on the keyboard. If you hover over the Profile icon you can see a Dropdown menu. To tab to the Profile icon I added tabindex="0" which worked f...
2018/03/05
476
1,993
<issue_start>username_0: 1. I haven't used any location related feature in my app. 2. have already removed NSLocationWhenInUseUsageDescription key from info.list 3. Build Phases -> Link binary with Libraries : removed the coreLocation. However, when I extract the app, I could still see the reference of coreLocation li...
2018/03/05
311
1,369
<issue_start>username_0: I'm a complete newbie and have been trying to use NodeJs for like two days now and nothing is working. If somebody could please explain to me step by step how to start using Node efficiently(Brackets preferred but any is welcome I'm so desperate right now:) If you use Node, please help me throu...
2018/03/05
832
2,826
<issue_start>username_0: I am trying to deploy a Flask project on Ubuntu 16 server (Apache2). In this project, I am using Python3 libraries. So I want to set Flask to use Python 3 on the server. But I am really having a terrible time. Here is what I am doing: ``` sudo apt-get install apache2 sudo apt-get update sudo a...
2018/03/05
603
2,031
<issue_start>username_0: I'm using Eclipse to build a web app, in which I want to use the framework Struts 2 and Hibernate. I'm not using Maven this time, only because I want to know how to make it work if I do not use Maven. Version: * Struts 2.5 * Hibernate 5.2.14 Now, the work set is: ![enter image description h...
2018/03/05
756
2,740
<issue_start>username_0: I'm trying to read a file that the user uploads in a React component and set the state of the React component to the file contents. However, in the `read.onloadend` callback function, I can't access the state through `this`. Here is the actual form part (I am using react-bootstrap) ``` ``` ...
2018/03/05
1,167
4,294
<issue_start>username_0: I have a one to many relationship for `EntityA` & `EntityB` with another entity, lets call it `DependentEntity`; Here `EntityAOrBId` in `DependentEntity` stores the keys for `EntityA` & `EntityB`. Is this a good design or should I separate the foreign key relationship & have `EntityAId` and `...
2018/03/05
1,234
4,612
<issue_start>username_0: I have tried to get a property type for array properties ``` [Serializable] public class Orders { public long OrderID { get; set; } public string CustomerID { get; set; } public int EmployeeID { get; set; } public double Freight { get; set; } public string ShipCountry { ge...
2018/03/05
355
1,115
<issue_start>username_0: I am looking for a way to attach the debugger in Rider through CLI. I noticed that when the debugger attaches, it emits the following ``` C:\Users\USERNAME\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-1\173.3994.2442\bin\runnerw.exe C:\Users\USERNAME\AppData\Local\JetBrains\Toolbox\apps\Rider...
2018/03/05
1,976
6,299
<issue_start>username_0: I understand that the parens force a different order of operations, but I don't quite understand the first result: ``` >> (fmap length Just) [1, 2, 3] 1 ``` Whereas the following makes perfect sense - we are lifting the length function over the Just structure, so we should get "Just [length ...
2018/03/05
579
1,562
<issue_start>username_0: ``` var seaSlt1 = "Init1"; var seaSlt2 = "Init2"; var seaSlt3 = "Init3"; var seaSlt4 = "Init4"; var seaSlt5 = "Init5"; var seaSlt6 = "Init6"; for(var i=1;i<7;i++) { alert(seaSlt+i); } ``` Why the result is nothing? The correct result should be: ``` Init1 Init2 Init3 Init4 Init5 Init6...
2018/03/05
1,711
5,607
<issue_start>username_0: I am trying to select a list of employees who are supervisors. Employee table: ``` +--------+----------+-----------+------------+----------+-----------------+---------+--------------------+--------------------+ | emp_id | fname | lname | start_date | end_date | superior_emp_id | dept_i...
2018/03/05
207
620
<issue_start>username_0: How can I convert `string(6) "8,9,10"` to `8,9,10` or `'8,9,10'` ? Thanks.<issue_comment>username_1: you can use this code to change string number into int number. ``` $myVar= (int)$comma_separated; var_dump($myVar); ``` Upvotes: -1 <issue_comment>username_2: you can set all to int by `int...
2018/03/05
1,136
4,387
<issue_start>username_0: issue of dynamically adding button,so how can i make button go to next row automatically Like this : The Output that I want : ![The Output that I wanna](https://i.stack.imgur.com/qVIes.jpg) The Output I got : ![The Output I got](https://i.stack.imgur.com/fiUFX.png) Here is my code: ``` ...
2018/03/05
2,425
7,979
<issue_start>username_0: I am passing data returned from an API to the client via EJS. I am unsuccessfully accessing the returned JSON array on the client side. On the server side I am successfully passing the client the returned data like this: ``` fetch(url) .then(res => res.json()) .then(data => res.render('pa...
2018/03/05
772
3,227
<issue_start>username_0: I've been digging deep into OAuth2 / OpenID Connect(OIDC) and in many ways I feel smarter, but in many ways, I'm worried that a simple mistake will leave me vulnerable. I'm building super standard business apps. So time to ask for directions: * **Platform**: Pivotal Cloud Foundry / UAA * **Bac...
2018/03/05
387
1,400
<issue_start>username_0: This is my XML code. I have an outer vertical linear layout. Inside this there is a horizontal linear layout that contains two TextViews. Below the horizontal layout is another TextView. But this is not visible. ``` xml version="1.0" encoding="utf-8"? ``` This is the output [![enter image d...
2018/03/05
1,350
4,604
<issue_start>username_0: I am trying to add a new blog post when an event (custom post type) is created and edit the post when the event is updated. So far I have been able to add the new post when an event is created but it also creates a new post when the event is saved so I need to check if the post already exists i...
2018/03/05
711
2,398
<issue_start>username_0: I am looking for a diff tool that allows me to compare 2 xml (or json) files ignoring the order of its elements. Example: ``` ``` The 2 Node elements should be considered similar and the only difference to be shown is that Node1 has a child name "Alpha" which is "Alpha2" in the other node. ...
2018/03/05
539
1,761
<issue_start>username_0: the statement keeps on repeating. ``` int number; int i = 0; System.out.print("Enter a number: "); number = input.nextInt(); while(i < number) System.out.println("Welcome to Java!"); ```<issue_comment>username_1: ``` while(i < number) { System.out.println("Welcome to Java!"); ...
2018/03/05
721
2,792
<issue_start>username_0: I'm using react-navigation in my React Native project that I'm setting up automated testing for using Detox. Unfortunately, I don't see anything in the docs about how to tell detox to find (and then of course tap) the Tab of a Tab Navigator. I tried looking through component tree using react-...
2018/03/05
1,794
6,018
<issue_start>username_0: When a GitHub user signs up for an account, GitHub provides a default profile picture that looks something like this: [![enter image description here](https://i.stack.imgur.com/frlIf.png)](https://i.stack.imgur.com/frlIf.png) The user can set a custom profile picture based on instructions [he...
2018/03/05
451
1,760
<issue_start>username_0: My end goal is to display the latest LinkedIn post for a company on their company website. I've managed to use the LinkedIn API to pull in updates. However, I have to be logged into the admin LinkedIn account in order for the data to load. If i'm not logged in, it doesn't load anything. The gen...
2018/03/05
487
1,637
<issue_start>username_0: I am extremely new to React as this is my First Lesson. Following is my code: index.html: ``` Hello World with React ``` index.js: ``` const title = React.createElement( 'h1' {id: 'title', className: 'header'}, 'Hello World' ) ReactDOM.render( title, document.get...
2018/03/05
1,217
4,681
<issue_start>username_0: i try to create function for change password member via Dashboard Admin, and when i am trying to do a login then get this error, and i am sure i enter correct values this is my function for update member password ``` public function update(Request $request, $id) { $rules = array( 'use...
2018/03/05
911
3,074
<issue_start>username_0: I was going through a piece of code which i was not able to understand. Thought of checking this with our community. In the below code, i am not able to understand what the line count[ch-'a']++ does. or how can we write the same in java 7. What the explanation says is that we have a String s a...
2018/03/05
1,445
3,844
<issue_start>username_0: I have dataframe like this ``` +----+------------+------------+------------+ | | | type | payment | +----+------------+------------+------------+ | id | res_number | | | +----+------------+------------+------------+ | a | 1 | toys ...
2018/03/05
793
2,950
<issue_start>username_0: I am trying to understand the basic of dynamic layout using the intrinsic content size. As attached in the image, i have two UILabel's in horizontal which will be my default layout. How do make the layout constraints so that * If the content size of either of two labels are greater than the ot...
2018/03/05
1,397
4,867
<issue_start>username_0: I am newbie to programming. I want to build a web app using ASP Classic to pull out data from SQL Server and display it on a web page. In my test database in SQL Server Express, I have 3 tables with the following structure: [![enter image description here](https://i.stack.imgur.com/KdKLa.jpg)...