date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/02
439
1,595
<issue_start>username_0: I have a model class as shown below: ``` class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) bio = models.TextField(max_length=500, blank=True) location = models.CharField(max_length=30, blank=True) birth_date = models.DateField(null=True, b...
2018/03/02
330
844
<issue_start>username_0: I want to know if a list [a, b] is present in numpy ndarray. **I tried this :** ``` list1 = np.array([[1, 2], [1, 3], [2, 4]]) [1, 5] in list1 ``` **The result is :** ``` True ``` It seems that it only the presence of the first number is checked, leading to a false response. What is th...
2018/03/02
392
1,015
<issue_start>username_0: Angularjs how to print name in **localstorage** i try this `console.log($scope.storageData.name);` //output is Undifiend ``` var user = angular.toJson(response.data.user); localStorage.setItem('user', user); $rootScope.authenticated = true; $scope.storageData = localStorage.getItem("user"); c...
2018/03/02
1,514
4,837
<issue_start>username_0: I've been trying to get flutter to detect the Android SDK. ``` flutter doctor ``` returns > > PS I:\Projects\Flutter\fluttertest\flutterproject> flutter doctor -v > > [√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version > 10.0.16299.248], locale en-US) > > • Flutter ve...
2018/03/02
441
1,371
<issue_start>username_0: I have been having problems trying to find a way to replace tags in my strings in Python. What I have at the moment is the text: ``` you should buy a {{cat_breed + dog_breed}} or a {{cat_breed + dog_breed}} ``` Where `cat_breed` and `dog_breed` are lists of cat and dog breeds. What I want...
2018/03/02
629
2,244
<issue_start>username_0: I have the following php code (in a file returndata.php) to retrieve messages for a user: ``` $sql = 'SELECT * FROM usertimes WHERE receiver ="'. $messagesforaccount. '"'; $result = $conn->query($sql); $response = array(); if ($result->num_rows > 0) { while($row = $result->fetch_assoc())...
2018/03/02
519
1,911
<issue_start>username_0: I am trying to assert whether two or more strings are evident. My code currently only looks for "Good". Is there a way to look for "Good" or "Bad"? ``` public class Test { public static bool FindText() { var conf = Driver.Instance.FindElement(By.Id("foo")); if (con...
2018/03/02
842
2,584
<issue_start>username_0: How do i convert string to date in Objective C. I have tried the following but did not figure it out. ``` NSString *str = @"3/2/2018 11:44:32 AM"; NSDateFormatter *df = [[NSDateFormatter alloc] init]; [df setDateFormat:@"MM/d/yyyy h:mm:ss a"]; NSDate *resultDate = [[NSDate alloc] init]; r...
2018/03/02
804
2,306
<issue_start>username_0: i have a input with a maxlength of 13 numbers. Each time you type in a number it gets displayed on the site. This is working fine but i need a default value of 0 for each of the 13 numbers if the input isn't 13 numbers long. So if you already typed in `1234` the output should look like this: ...
2018/03/02
640
2,057
<issue_start>username_0: I am trying to write a regex expression which will capture all instances of the '@' character, *except* when two such characters appear in succession (essentially, an escape sequence). For example: `abd@ajk`: `@` should be matched `abd@@ajk`: No matches `abd@@@ajk`: The *final* `@` should ma...
2018/03/02
177
560
<issue_start>username_0: How can I select one of the options in the select field programatically (based in some variable)? This is the code for the template: ``` Action {{ op.description }} ```<issue_comment>username_1: Try as follows, ``` > {{op.description}} ``` and in component , you can set the select...
2018/03/02
1,081
3,906
<issue_start>username_0: I'm new to C# threads and tasks and I'm trying to develop a workflow but without success probably because I'm mixing tasks with for iterations... The point is: I've got a bunch of lists, and inside each one there are some things to do, and need to make them work as much parallel and less bloc...
2018/03/02
776
2,814
<issue_start>username_0: please help, i want to list of records that can be **inserted exactly on 15th day from current date** in MySQL **(no record from less than 14 days before and no records greater than 15 days )** .Suppose today's date is 05/03/2018 so exact 15 days before from now date was 18/02/2018,so i need th...
2018/03/02
513
1,360
<issue_start>username_0: I'm trying to query the Facebook Graph API using this query: ``` https://graph.facebook.com/584219068304548/feed?access_token=1822027094779314%7C_<PASSWORD>h<PASSWORD>_f4n0 ``` And this gives me the expected result, however i'd like to also get the images with the posts, so I add some parame...
2018/03/02
649
2,607
<issue_start>username_0: I have a table in my SQL Server. Currently I am using the identity column to uniquely identify each record but my changing needs required a unique key generated in a certain format (as specified by my client). I have tried to generate the unique key from my application by appending a unique int...
2018/03/02
682
2,543
<issue_start>username_0: Trying to figure out why my char array inside a class or struct does not accept all characters as it normally would do when not inside a class or struct. ``` #include using namespace std; const int SIZE = 10; struct A{ char address[SIZE]; } int main(){ char address\_from\_main[SIZE]; A ...
2018/03/02
711
2,643
<issue_start>username_0: I would like to block some API end point in nginx level. I use ``` server { listen 443; ssl on; ssl_certificate /app/cert.pem; ssl_certificate_key /app/key.pem; location = /this_api_path_should_be_blocked { return 444; } location / { proxy_pass ht...
2018/03/02
586
2,218
<issue_start>username_0: Given an array: ``` const array = [{a:1}] ``` Is there a one liner to extract the value of `a` using `destructuring`? I tried something like this which doesn't work: ``` const [{a} = array] ```<issue_comment>username_1: You can create a SEQUENCE to serve your purpose which were introduced...
2018/03/02
1,080
3,866
<issue_start>username_0: I am rather new to android developing and can't figure out how to do a double check on a button press. I am working in Android Studio and am trying to create a little simple game and have the following: two buttons (button1 and button2)declared and instantiated in an onClick method. When button...
2018/03/02
797
2,889
<issue_start>username_0: I can create a repository via defining an interface on the appropriate JPA class A like the following: ```java public interface ARepository extends CrudRepository { } ``` and I can use that in my Controller (for example) via ```java @Autowired private ARepository aRepository; ``` and jus...
2018/03/02
791
2,816
<issue_start>username_0: Im working on stack overflow data dump .csv file and I need to to find : The top 8 most frequent tags in the dataset. To do this, I see the set of tags associated with each row in the ***data1.PostTypeId*** column.The frequency of a tag is equal to the number of questions that have that tag.(i...
2018/03/02
2,865
7,788
<issue_start>username_0: I am trying to construct Gremlin queries to use within DSE Graph with geo-searches enabled (indexed in Solr). The problem is the graph is so densely interconnected that the cyclic path traversals time out. Right now the prototype graph I'm working with has ~1600 vertices and ~35K edges. The num...
2018/03/02
1,103
3,487
<issue_start>username_0: I want to position a button responsively at the right bottom corner. So far I have put the button fixed to the centered container. **The Problem** If at any time I stretch the page (up and down , or side ways up and down) it disappears/looses focus for a slight second. **Expected:** I woul...
2018/03/02
833
3,187
<issue_start>username_0: I'm using Gradle and Eclipse with the Buildship plugin. Buildship creates the `.classpath` file for Eclipse to use. I need one classpath entry (`com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER`) to appear after the `org.eclipse.buildship.core.gradleclasspathcontainer` entry, for class-loading re...
2018/03/02
718
2,385
<issue_start>username_0: I'm trying to grab every other letter from a string but i'm having some problem with print and return. Why when i use print, the output is what i want and when i use return i only get the first letter? ``` string_bits(Hello) # Return string made of every other char starting with the first de...
2018/03/02
731
2,214
<issue_start>username_0: I have a string like below: ``` std::string strl="ffffffffffffffffffffffffffffffffffffffffffff"; ``` I want to convert it into uint32\_t variable like below: ``` uint32_t val = std::stoul(strl, nullptr, 16); ``` The above operation gives a **"SIGABRT"** signal and gives error: ``` termin...
2018/03/02
789
2,443
<issue_start>username_0: I'm using a random number generating function and it's working fine but I need to reset a function variable **nSeed** every **n** times, let's say **nSeed=5323** .. how can i return it to it's starting value **5323** every **5** operations i'm not sure how to do it .. here's an example: ``` u...
2018/03/02
459
1,826
<issue_start>username_0: I have an array of objects and I want to store them in a collection using only one I/O operation if it's possible. If any document already exists in the collection I want to replace it, or insert it otherwise. These are the solutions that I found, but doesn't work exactly as I want: * `insert...
2018/03/02
925
2,975
<issue_start>username_0: Task ==== You'll be given an array of N integers and you have to print the integers in the reverse order. Constraints =========== 1<=N<=1000 1<=A\_i<=10000, where A\_i is the ith integer in the array. Input ===== 4 1 2 3 4 Output ====== 4 3 2 1 ``` #include #include #include #incl...
2018/03/02
923
3,535
<issue_start>username_0: I have this app with two checkboxes that I want to save when I close and load when I open but I cannot figure it out. Please can someone help me edit the code. I know need to save in `UserDefaults` somehow but I don't know how to code it. ``` class CheckBox: UIButton { // Images let ch...
2018/03/02
1,045
3,941
<issue_start>username_0: I have a little problem here: I want to only output things, if there are entries in the database table. Right now my code looks like this: ``` foreach ($customers as $customer) { if ($customer->CURRENT_ROWNAME != NULL) { //output stuff e.g. ID: {{$customer->customer\_id}} E-Ma...
2018/03/02
613
1,982
<issue_start>username_0: Im trying to make a method which checks if there is an odd number in an array. If there is an odd number it should return true. If there are no odd numbers in the array it should return false. For example if the array a is {1,2,3} it should return true because there is an odd number. Here is t...
2018/03/02
273
1,040
<issue_start>username_0: This issue is experienced only in Linux and Mac OS. It seems to be a jQuery spinner bug. The spinner under the link has the bug too: <https://jqueryui.com/spinner/> ``` $(".spinner").spinner("value",1); ```<issue_comment>username_1: I fixed this bug adding `onfocus` attribute to the HTML. ...
2018/03/02
651
2,421
<issue_start>username_0: I am trying to make an image change when I click on a piece of text on a website that I am building. At this moment I have created a class called device with one of them being device active as shown below: ``` ![](app/assets/images/mockup.png) ![](app/assets/images/mockup.png) ![](app/a...
2018/03/02
750
2,617
<issue_start>username_0: how to iterate through array/ list in Java. if index range is in long. As array/list only accept integer in position index. eg ``` long arr[]=new long[5]; for(long i=0l;i<5l;i++) arr[i]=i; // throw an error as arr[i] only accept integer ``` here `arr[i]` will throw an error because i...
2018/03/02
352
1,251
<issue_start>username_0: ``` window.addEventListener('keydown', (e) => { let arrowsObj = { "ArrowUp": 1, "ArrowDown": 2, "ArrowLeft": 3, "ArrowRight": 4 } let eventKey = e.key; console.log(arrowsObj.eventKey); }); ``` The above code doesn't work, so I did the following ...
2018/03/02
542
2,356
<issue_start>username_0: I have to create and remove attributes based on an api response in Objective C. For example, Now my api response contains fields "**facebook**", "**whatsapp**" and "**viber**". But in future the reponse can add "**youtube**". Based on this response, I have to remove all the attributes and valu...
2018/03/02
12,020
32,542
<issue_start>username_0: **My goal is to use the rule that I outline below to generate a signal to place a new 'stoplimit' order that replaces my trailing stop.** I don't want my stop to trail indefinitely, only until it reaches my breakeven price (if this can be achieved somehow already, please let me know). **I am h...
2018/03/02
975
3,151
<issue_start>username_0: I have a custom element which takes input whenever user clicks on it I want to focus on it and create an overlay on other elements and when the user clicks outside the div I want to remove the overlay. I am trying to do it using `iron-overlay-behavior` but not able to achieve the expected beha...
2018/03/02
915
3,616
<issue_start>username_0: I have customer's report that the upload file function on our web application doesn't work sometimes. We tested in house and it does't happen. So I used JMeter to perform Performance Test on the web application (simulating 1000 users to upload at the same time). My Manager said the Graph Resutl...
2018/03/02
932
3,880
<issue_start>username_0: I am having trouble with my UserService. It does not recognize the autowired dependencies that are defined within it. I tried both using Autowired annotation directly on the variable and on the constructor separately. `knowledgbaseDao` is null in the `loadUserByUsername`. On startup, constructo...
2018/03/02
949
2,859
<issue_start>username_0: I use method POST with Volley library. All it work fine but not display toast "Successful". Below is code that I achieve update content with my server is successful. ``` String uri = "http://192.168.0.103:3000/api/SampleParticipant"; StringRequest request = new StringRequest(Request.Method.P...
2018/03/02
2,263
6,784
<issue_start>username_0: I am doing an angular application where i have to hit a rest end point and download the file that is sent as the response but i am not understanding how to go about this. I have the response header like the following > > Content-Disposition:attachment; filename="Config.zip" > Content-Type:mu...
2018/03/02
681
2,571
<issue_start>username_0: I have a one collection of elements: ``` public class CompanyVistracksDomain { public int ID { get; set; } public string Name { get; set; } public int VistracksAccountId { get; set; } } ``` and another collection of elements: ``` public class VistrackAccountInfoDomain { ...
2018/03/02
319
1,377
<issue_start>username_0: I want to extract all the links that available in the webpage and to read it. But using HTML mode we are able to spy single link.Not as an list of links . Can anyone please help me?<issue_comment>username_1: You could use the Navigate stage action "Insert Javascript Fragment" to insert Javascri...
2018/03/02
623
2,224
<issue_start>username_0: Im trying to get value from JSONObject. Here is the value in JSONObject. ``` {name: "alice", amount: 2.3} // name (string), amount (decimal) ``` I was confused of how to get the decimal value from JSONObject. Here is my code. Is my code is correct? i was think that float and decimal is diffe...
2018/03/02
1,146
3,713
<issue_start>username_0: I have a problem with installing Homebrew on OS X. OS version is **High Sierra 10.13.3** Trying to run: ``` /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ``` It returns: ``` dyld: Library not loaded: /System/Library/Frameworks/Ruby.frame...
2018/03/02
978
3,711
<issue_start>username_0: I'm trying to communicate with a server. This server send me a certificate and a private key in order to execute my request successfully. To test the server, I use [Postman](https://www.getpostman.com/). So I fill the certificate setting in postman, and my request works fine [![Postman settin...
2018/03/02
1,382
3,701
<issue_start>username_0: I have a dataframe `df`: ``` structure(list(sample = structure(c(4L, 2L, 1L, 4L, 1L, 2L, 3L, 3L, 3L, 1L), .Label = c("A1", "B1", "C1", "D2"), class = "factor"), genotype = structure(c(4L, 2L, 2L, 2L, 4L, 4L, 1L, 2L, 3L, 1L), .Label = c("germline_private", "germline_recurrent", ...
2018/03/02
1,134
3,571
<issue_start>username_0: I Think I do not understand something but i have a very strange result with not in. I have this kind of tables TABLE membres ``` idMembre 1 2 ... ``` Table membres\_has\_domaines ``` idMembre idDomaine 1 10 1 11 1 40 2 10 2 13 2 20 3 ...
2018/03/02
345
1,188
<issue_start>username_0: I would like to use Highchart for laravel but i don't know how to pass data from controller to blade with the correct syntax. Actually i'm using static data and the graph is displayed correctly. **statistiche.blade.php** ``` ```<issue_comment>username_1: Hey Dude use special library: <https:...
2018/03/02
791
2,146
<issue_start>username_0: So i'm trying to make a program that prints out all perfect integers up to 10000, I've been able to get my program to do that but i can't seem to be able to arrange the print out properly;i would like to make it display like this: 6: 1 2 3 28: 1 2 4 7 14 496: 1 2 4 8 16 31 62 124 248 8128: ...
2018/03/02
523
2,132
<issue_start>username_0: I need to convert some `.sh` shell scripts to a Windows native script that can run in Windows environment *without* use of any external software like cygwin, migwin etc. I know for Windows 10 there is Windows Subsystem for Linux (WSL), but it's in beta and also to use it we need to enable deve...
2018/03/02
604
2,266
<issue_start>username_0: I'm trying to pass data from input fields to an api url but it seems like I'm not doing it right.it passes the input to the api minus the form inputs. How can I pass the input to the api correctly? Here is my code: component: ``` export class AppComponent { constructor(private http: Http) { ...
2018/03/02
638
2,721
<issue_start>username_0: I've implemented In-App-Purchase in my ios app. Here I've used `RequestCompletionHandler` at `SKProductsRequestDelegate` method as shown below. Some times app getting crash because `nil` value. What is wrong in my code? `completionHandler` is declared as: `fileprivate var completionHandler: Re...
2018/03/02
1,474
5,637
<issue_start>username_0: I'm trying to write a sort of proxy between a REST-Server and a calling client application, in order to enforce privacy by adding attributes to the REST call. I don't want to inspect the response from the server, I just want to pass it through to the client. I want to do this with spring-webf...
2018/03/02
1,036
4,059
<issue_start>username_0: Postgresql allows adding comments to roles and users. For example I've added a comment to role "myuser" by using this SQL command: ``` COMMENT ON ROLE myuser IS 'User comment...'; ``` My question is: If I want to use a SQL-command to get all users along with their respective comment - how wo...
2018/03/02
653
2,357
<issue_start>username_0: I'm fairly new with working with MySQL so please excuse the vague title, I wasn't sure how to ask this question or if it truly does require a subquery. Edit: Thanks @<NAME> for revising the title. I have a table of employees, which is structured like so: ``` CREATE TABLE Employees ( employe...
2018/03/02
523
1,780
<issue_start>username_0: when i run the python script it shows error like this,i want to know the procedure or any way to solve these error.can anyone help me? ``` Traceback (most recent call last): File "bus1.py", line 19, in display = Display(visible=0, size=(800, 600),use\_xauth=True) File "/usr/local/lib/pyth...
2018/03/02
603
2,387
<issue_start>username_0: I'm trying to create an abstract class SolidFigure. Both Cylinder and rectangular pirsm will inhert from it. My problem is that the height in SolidFigure which is a common property is not initialized by the constructor (it'll be zero) whenever I instantiate either of the two classes (cylinder...
2018/03/02
1,136
4,602
<issue_start>username_0: I am implementing a Change Password Screen In which i need to check the equality of Password and Confirm Password . so I am implementing a custom validation. But I am getting some exception " matcher.isErrorState is not a function".Please find my code below and let me know what is missing from...
2018/03/02
980
3,989
<issue_start>username_0: I am currently trying to port an Angular-Application to Cordova. My experience in Cordova is limited, most of the things I tried seem to work, but there is one major issue I am facing. All Assets are not loading, except those from external Sources (my Backend). This is my config.xml ``` xml v...
2018/03/02
1,195
4,361
<issue_start>username_0: I have a beginner question about Objects and storing them. I need to create a separate class called **GameEntry** with one attribute called **scores**, then I need to store these **GameEntry** Objects in an Array. Not just any Array though it has to be the one with the square brackets: [ ] Wei...
2018/03/02
296
1,185
<issue_start>username_0: I have a code that shows a notifications box when there has occurred a new earthquake in the world. I want **reduce at an icon** if the user, for 20 seconds since the box appears, **does not do anything** So if not `resize`,`scroll`,`click` and press button on keyboard. Is there a fast way t...
2018/03/02
498
1,215
<issue_start>username_0: I have a data frame i would like to perform `mode` operation in groupby function. I did that using following snippet, ``` df=df.groupby(['col1','col2']).agg([lambda x:x.mode()[0]]).reset_index() ``` After that df contains **lambda** in my data frame as a first row. Input: ``` col1 col2 ...
2018/03/02
1,649
6,319
<issue_start>username_0: I know that when a Lambda function fails (for example when there is a time out), it tries to run the function 3 more times again. Is there any way to avoid this behavior? I' have been reading the documentation, but didn't find anyting about this. Thanks!<issue_comment>username_1: It retries wh...
2018/03/02
423
1,587
<issue_start>username_0: I have a `ScrollView` at the top, inside that I have a `ConstraintLayout`. Setting height to `match_parent` doesn't work in ConstraintLayout so the height doesn't match the screen. Inside my `ConstraintLayout` I have a floating action button and it doesn't stay at the right bottom of the screen...
2018/03/02
3,636
12,270
<issue_start>username_0: I have 5 pc and i want to ping this pc's are available or no. So I'm using c# Ping class. Two pc are available but the other 3 pc are closed when i ping them my program wait min 7 seconds for response. I just want to check 1000 miliseconds and returns OK or ERROR... How can i control ping ti...
2018/03/02
1,214
4,825
<issue_start>username_0: iv got a loop that checks the values in two arrays. in the event that matching values are found those values are printed to the console. I've also included a print statement that is intended to print ONLY when no matches are found anywhere. ``` public class MatchTest { public static void ...
2018/03/02
1,173
4,068
<issue_start>username_0: I have an **Answer** class and an **User** class. Answer has a `getUser()` and User has a `getPoints()` From a list of Answer I would like to get a HashSet of User sorted by points. I tried following: ``` Set collectSet = list.stream().map(Answer::getUser) .sorted(Comparator.comparing(User...
2018/03/02
1,707
6,407
<issue_start>username_0: I have a UIView inside a TableViewCell,when users tapped in this UIView,it go to another view controller and pass a data along. **So inside TableViewCellClass I done the following :** I set up a protocol and detected the "Tap" gesture,when user table the UIView.This part is working fine: ```...
2018/03/02
249
942
<issue_start>username_0: I need to add a scrollable android TextView, which will show alot of text. I want to achieve this kind of effect: [![Soft edge textbox](https://i.stack.imgur.com/9XRkr.png)](https://i.stack.imgur.com/9XRkr.png) But I found no way of doing so. Is there any good way of doing it? Thank you!<i...
2018/03/02
728
2,632
<issue_start>username_0: So, I have a spring boot + hibernate application which has a main schema specified in the yml file (molecular) and also needs to fetch stuff from 3 others (vivax, malaria, chassis) So, all schemas have access via the same user and are all accessible via port 3306, so my dev.yml file connection...
2018/03/02
259
1,046
<issue_start>username_0: I would like to use bootstrap to a website that has already a `.row` CSS class. Do I have to change the name of the `.row` class in all css files? Or can I "tell" bootstrap to use another class name?<issue_comment>username_1: You can try specifying the schema like below. ``` @Entity @Table(na...
2018/03/02
662
2,321
<issue_start>username_0: In lua 5.2.4, when using the widely used `os.execute('sleep n')` method in an infinite loop, the program can't be stopped by `^C` (Ctrl-C). Minimal example: ``` while true do print("HELLO!") os.execute("sleep 3") end ``` My questions are: 1. Is this expected behavior? I would have ...
2018/03/02
756
2,565
<issue_start>username_0: I don't need ALL\_BUILD subproject, can I avoid generating it? Thanx.<issue_comment>username_1: It corresponds to the `all` make target, so, no, you can't avoid generating it. You can delete it from the solution manually, though. Upvotes: 2 <issue_comment>username_2: [CMake Issue #16979: "ALL\_...
2018/03/02
581
2,132
<issue_start>username_0: I have a problem with iteration of list items inside select. What I'm trying to show are list items in child component ``` - #### {{project.name}} ``` inside of select option ``` ``` but dropdown shows both item. It's important that I have to iterate list items from child component. W...
2018/03/02
1,699
6,550
<issue_start>username_0: The Azure Cosmos DB states that for the first 12 months, 400 RU/s and 5GB of storage is free. Also, it states that the minimum RU/s for purchase is 400. Does that mean minimum RU/s for each Collection? Like if I create 2 collections, would I have to purchase minimum 800 RU/s (400x2)? Or does...
2018/03/02
1,878
6,400
<issue_start>username_0: I have noticed when using Jenkins with the Docker Pipeline plugin. When I create a Jenkins file to run commands in a docker container that it always creates a volume mapping of the Jenkins workspace directory mapped to the same path in the running container. It also creates a working directory ...
2018/03/02
296
1,146
<issue_start>username_0: I am trying to access polar accesslink and provided authorization url is <https://flow.polar.com/oauth2/authorization?response_type=code&scope=>{SCOPE}&client\_id={CLIENT\_ID}&state={STATE} client\_id is correct. I am using oauth2 gem ``` client = OAuth2::Client.new(client_id, client_secret, ...
2018/03/02
697
2,229
<issue_start>username_0: I am trying to create a table in that one column should accept only 'YEAR' eg: 2017, 2018, 2019 along with 'CURRENT YEAR' as default value. I am unable to create such a column — can you please help me? Expected Output : ``` ID Today_Year ----- ----------- 100 2017 101 20...
2018/03/02
772
2,745
<issue_start>username_0: We have NodeJs backend application which interacts with mongo database. I have strict schema for retrieve the objects. NodeJs application uses `module.export` technology. I use follow dependencies: ``` "mongoose": "^4.7.8", "promise": "^8.0.1", ``` I have follow schema: account.js...
2018/03/02
409
1,280
<issue_start>username_0: I create a range of in from 1-100 doing this: ``` let array = [Int](1...10) ``` Now how do I convert that into a String array as I need it for UIPickerView Thanks in advance.<issue_comment>username_1: ``` var arr = [1,2,3] let strArr = arr.map{String($0)} ``` OR in picker you may re...
2018/03/02
690
2,345
<issue_start>username_0: friends! I figure out why `PropTypes.objectOf(PropTypes.number)` does not apply to prop `ar` ? I want to do a type checking before release, but it does not work. ``` import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import './index.css'; class Gr...
2018/03/02
408
1,261
<issue_start>username_0: When I run this code, each list item is being separated into individual letters and separated via commas. For example if I have the list `stockName` holding `'amazon'` and tickerName holding `'amzn'` as the first item in each of their respected lists, running the code below stores it as: ```n...
2018/03/02
1,325
4,748
<issue_start>username_0: I'm trying to solve a problem for a course in Python and found someone has implemented solutions for the same problem in github. I'm just trying to understand the solution given in github. I have a pandas dataframe called Top15 with 15 countries and one of the columns in the dataframe is 'Hig...
2018/03/02
525
1,715
<issue_start>username_0: The following Oracle SQL select allows me to select all the rows of a table that are *duplicated* according to some fields, eg, they have the same `COLUMN_1`, `COLUMN_2` and `COLUMN_3` ``` SELECT * FROM ( SELECT t.*, ROW_NUMBER() OVER (PARTITION BY COLUMN_1, COLUMN_2, COLUMN_3 ORD...
2018/03/02
480
1,935
<issue_start>username_0: Im writing a java program and I have a SQL statement that currently is outputting wrong: so the code is: ``` String sql = "SELECT Name from Users WHERE Name LIKE "+t; ``` and the Output is: ``` SELECT Name from Users WHERE Name LIKE David ``` But I need it to be with single quotes...
2018/03/02
290
1,090
<issue_start>username_0: I am getting an error that says "duplicate class: (package name).(class name)" This is the code the line that says the error is "public class Enemy" ``` package rpgdemo; public class Enemy { String name; int weaponId; int baseAtk; int baseDef; int hitRate; int hp; ...
2018/03/02
417
1,544
<issue_start>username_0: I was wondering how can I hide a form after submission. I tried something with JavaScript, but I keep getting a message from the form that no file was chosen. ``` $('input[type="submit"]').click(function () { $(this).parents('#files').remove(); }); {% csrf\_token %} {{ form.as\_p }} Su...
2018/03/02
396
1,430
<issue_start>username_0: I have downloaded the [Honeybadger webpack example](https://github.com/honeybadger-io/honeybadger-rails-webpacker-example) and run `bundle install`. I don't have any errors in terminal, yet get the following when I start my server: ``` Webpacker can't find application.js in /Users/admin/Docum...
2018/03/02
245
905
<issue_start>username_0: I have a button on click of which i go to the next page , i.e ``` Calculate ``` But i want to go the next page , only if few validations or a flag showResults is true . And, i dont want to hide the button also . Button should be there , but it should go to the next page only if the validati...
2018/03/02
299
1,038
<issue_start>username_0: I am trying to revert a file from a previous version of the same file, using diff and patch ``` diff_out=$(diff -u $name $chVer/$name.latest) patch -u $name $diff_out ``` Where $name is the file name i want to revert, $chVer is the folder of all the older versions of the file Unfortunately ...
2018/03/02
273
831
<issue_start>username_0: Can anyone tell my how this guy, who gives the code example, is able to use `byte`? [Example of AES using Crypto++](https://stackoverflow.com/questions/12306956/example-of-aes-using-crypto) Like this line: ``` byte key[ CryptoPP::AES::DEFAULT_KEYLENGTH ], iv[ CryptoPP::AES::BLOCKSIZE ]; ```...
2018/03/02
890
3,476
<issue_start>username_0: I am trying to create a stateless component in React with the sole purpose of acting as a reusable wrapper. I am also using CSS Modules because I want to have fully modular CSS. The thing is I don't want to add unnecessary elements (and even more so s), but instead I want to use React's Fragme...
2018/03/02
970
2,977
<issue_start>username_0: I wrote a function: ``` inita xs = reverse . (drop 1) (reverse xs) ``` I thought it equals: ``` inita xs = reverse ( (drop 1) (reverse xs) ) ``` But I had errors: ``` Couldn't match expected type ‘a -> [a1]’ with actual type ‘[a2]’ Relevant bindings include xs :: [a2] (bound...
2018/03/02
504
1,935
<issue_start>username_0: This is what i have tried ``` #standardSQL CREATE TABLE dataSet.myTableName (userName string, DateCreated DATE, email string) PARTITION BY DateCreated OPTIONS( description="a table partitioned by DateCreated" ) ``` but in this case the DateCreated field is of Date type, I wanted to m...
2018/03/02
697
2,623
<issue_start>username_0: Is there any event to know when a specific element "starts to exist" in raw javascript? For example I have ``` ``` And I want to do something when .parent and only the .parent (not the .child) "starts to exist" using an event instead of putting js code inside of it. I tried to setInterval an...
2018/03/02
811
3,010
<issue_start>username_0: How can I send a file to an ftp with C# ? The only informations I have are : * FTP IP address * FTP port * FTP user I've try this : ``` public void SendFile(string filePath) { String user = "UserID"; String IPAddr = "XXX.XXX.XXX.XXX"; int port = 9999; using (WebClient clien...
2018/03/02
377
1,432
<issue_start>username_0: I am new to Google Cloud. So far I have just got some experience in using WHM/Cpanel. Is there a similar app that I can install on App Engine to fully control it without using any commands?<issue_comment>username_1: Depending on what you're trying to do, most of the common App Engine operations...