date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/09
350
959
<issue_start>username_0: How to place the cursor in `EditText` box after the prefix when on focus in android? [![enter image description here](https://i.stack.imgur.com/osV9J.jpg)](https://i.stack.imgur.com/osV9J.jpg)<issue_comment>username_1: *Syntax* - ``` np.where(condition, value1, value2) ``` *Solution* - ``...
2018/03/09
876
2,685
<issue_start>username_0: I have the following constraint that is supposed to allow only digits from 0 to 9 insertion and not any special and alpha characters. But that is not the case, for example when using this update statement: ``` update MyDB.dbo.MyTable set MyTestPhoneExt = '23&' where ID = 1; ``` The...
2018/03/09
2,083
7,381
<issue_start>username_0: How to use click to write a command line prompt which looks like: ``` choose name: [1] Karen [2] Bob [3] Jo [4] Steve ``` And calls a function such as: ``` def print_function(name): if name == 'Karen': print('CEO') elif name == 'Bob': print('CFO') elif name == '...
2018/03/09
1,380
4,672
<issue_start>username_0: The query works as native query in PostgreSQL. But fails when passing it to be used in Spring Data JPA @Query, with Hibernate. Which would be the correct syntax to write the query? ``` @Repository public interface ProcessoJudicialRepository extends JpaRepository { @Query("select p from Proce...
2018/03/09
1,003
4,129
<issue_start>username_0: Need to instantiate multiple [PauseTransition](https://docs.oracle.com/javafx/2/api/javafx/animation/PauseTransition.html) instances for different machines like `resetCredentialsMachineOne`, `resetCredentialsMachineTwo` and so on. For each machine will have a `PauseTransition` instance creation...
2018/03/09
1,438
3,619
<issue_start>username_0: I've made a function that reads a file and separates the first line from the rest. The two files which I'm using for this are `aaa.txt` and `bbb.txt`. I try to manipulate the data. I tried squaring each element of each string but I realize that I need to float it but I'm not sure why it won't j...
2018/03/09
1,202
4,554
<issue_start>username_0: One article explains: > > One-to-Many > > > “One given order can possibly contain many items. One given item > belongs to one and only one order.” > > > Here, "given item" means one specific item ? Because we can have multiple quantity of that particular item in stock . But I am thinki...
2018/03/09
995
3,740
<issue_start>username_0: Each time I run a test from my IDE I get the error ``` java.lang.IllegalStateException: Missing the '-javaagent' JVM argument. ``` If I create a run config and add the jvm arg everything is fine. However, the next time I run a test on the fly that is not a pre-configured run config I get th...
2018/03/09
945
2,952
<issue_start>username_0: So I need to build an object that can map URL paths to target servers, like this: ``` /api : http://apiserver:8000 /api/v1 : http://apiv1server:8888 /api/v1/foo : http://foo:8080 /foo : http://foo:8080 ``` and ``` function addRoute(path, server) { setRoute(pa...
2018/03/09
786
2,514
<issue_start>username_0: Good Day Programmers, Greetings! To achieve if a is between 1-10 print good. if a is between 10-20 print bad. I tried ``` if($a >=10 || $a<=20) { "good" } else if{ #other code here for multiple conditions }else{ } ``` But that gives me an error ``` Symfony \ Component \ Debug \ Exceptio...
2018/03/09
641
2,154
<issue_start>username_0: I have a Kafka stream app that has an external dependency. In the case the dependency is not available, I want to reprocess the message(s) later. I can't control the offset since the streams are doing it internally. What is the best was to accomplish this?<issue_comment>username_1: ``` function...
2018/03/09
985
3,035
<issue_start>username_0: I am trying to write a code that moves and switches the first three elements of an array. The main function gets array length and elements and then displays results of function call. Function `roll` takes elements from array `a1`, moves the first three elements, and then stores them to array `a...
2018/03/09
528
1,933
<issue_start>username_0: I had to export a table(3.8GB) from BigQuery into GCP, which separated my table into 100 smaller json files, 100mb each. Now I want to be able to put them back into one json file. Is there any efficient way to do that? It could be in R, Python, Java. Or if anybody knows a better way to deal wit...
2018/03/09
845
3,014
<issue_start>username_0: I need to restore a massive amount of deleted files back into Sharepoint. Sharepoint is a disgusting beast that should be avoided at all costs, of course, but a client is running it and I need to find a resolution for them. ``` Connect-SPOService -Url https://clientdomain-admin.sharepoint.com ...
2018/03/09
1,047
4,480
<issue_start>username_0: I want to use optimistic UI updates after a mutation: <https://www.apollographql.com/docs/react/basics/mutations.html> Im confused about the relationship between 'optimisticResponse' and 'update'. Here optimisticResponse is used: ``` const CommentPageWithData = graphql(submitComment, { ...
2018/03/09
849
3,485
<issue_start>username_0: We can add a header using AppBar widget. ``` class HomePage extends StatelessWidget { @override Widget build(BuildContext context) { return new Scaffold( appBar: new AppBar( leading: new Icon(Icons.mail), title: new Text("Hello Flutter Header"), ), bod...
2018/03/09
846
3,273
<issue_start>username_0: I am getting started with programming and just started learning R. I am trying to print all numbers between 10-60 using a for loop in R. I wrote the following code. what is wrong with it? ``` Number <- function(x) { res <- 0 for(i in 10:60){ print("The number is" res) res <- res ...
2018/03/09
1,362
4,842
<issue_start>username_0: I have a delete operator code snippet which is as following: ```js (function() { var objA = Object.create({ foo: 'foo' }); var objB = objA; objB.foo = 'bar'; delete objA.foo; console.log(objA.foo); console.log(objB.foo); }()); ``` ``` //it logs-> foo ``` As the `...
2018/03/09
898
3,223
<issue_start>username_0: I got some problem when trying a google maps on android activity. When I run the project the activity doesn't show anything, only a blank activity. I try to search the solution, and try to fix it with adding a new permission like ``` ``` And try to change the API key with the new one. But al...
2018/03/09
1,206
3,969
<issue_start>username_0: I have a long chunk of string in a text file. E.g: ``` asdasdas**Start**sadasdsadasdasd**End**45646546466516asdsadasd**Start**asdsfsdfsdfdsfdsfds**End** ``` How can I insert nextline (`\n`) before every `Start`? ``` std::ifstream in("example.txt"); std::ofstream out("example2.txt"); ...
2018/03/09
2,003
5,303
<issue_start>username_0: I have a table that stores transactions similar to a bank statement. For example: ``` ID |Date |Amount |Balance | -------------------------------------- 1 |01/01/2018 | 100.00| 100.00| 2 |01/02/2018 | 50.00| 150.00| 3 |01/04/2018 | -5.00| 145.00| 4 |01/05/201...
2018/03/09
585
2,112
<issue_start>username_0: I wanted to use a function that used a arraylist for multiple types of arraylists, but I don't know how to do that. ``` ArrayList List2 = new ArrayList<>(); ArrayList List1 = new ArrayList<>(); ChangeTextSize(List1); ChangeTextSize(List2); public void ChangeTextSize(ArrayList List){ for (in...
2018/03/09
1,469
4,159
<issue_start>username_0: I had a work around for this, but I've created a minimalistic code that SHOULD work, but it isn't. I say "should" because when I used the portion of the code where I divided, multiplied by 100, and printed using the `"{0:.0f}%` with my old code, it worked. However, I think I've tried something ...
2018/03/09
594
1,946
<issue_start>username_0: The following code block runs the **animation for Firefox** ``` #rocket { position: relative; top: 10px; -webkit-animation-name: rocketLaunch; animation-name: rocket-launch; -webkit-animation-duration: 5s; animation-duration: 5s; -moz-animation-name: rocketLaunch; ...
2018/03/09
547
2,173
<issue_start>username_0: **UPDATE**: react-navigation web support is done. follow this: <https://reactnavigation.org/docs/en/web-support.html> **ORIGIN**: I try to share my code between react-native and web. when I try react-native-web, it works well. but there is only one question, how to access the specific screen...
2018/03/09
466
1,914
<issue_start>username_0: I had noticed that the default error page shown by tomcat has server information,which I want it to be suppressed, Hence I thought of checking out on that default file ,which I'm unable to get the location!!! Anyone knows about it!!!!<issue_comment>username_1: I don't think it's possible as Rea...
2018/03/09
1,310
4,530
<issue_start>username_0: I have a form that requires a user to upload 2 files, **file-upload** & **imgupload**. I am trying to save the entire form through ajax. Form and ajax code ``` ![](<?php echo base_url(); ?>assets/img/Save.png) $("#save").click(function() { var form_data = new FormData($('#data')[0])...
2018/03/09
195
737
<issue_start>username_0: I am trying to play a sound file when app is already in background AND stop current play music app if it is playing on iOS Could you please tell me how can i do that Many thanks, <NAME>.<issue_comment>username_1: iOS will automatically pause other audio instances if your app begins one. Chec...
2018/03/09
521
1,846
<issue_start>username_0: I have a problem. I dynamically created buttons using a class. Each button is stored in a list, so I can use them later by indexing them. I am having trouble placing/displaying the buttons, though. When I create one button, it shows up perfectly. When I create another one, for some reason it ap...
2018/03/09
1,778
4,950
<issue_start>username_0: Let's assume a very simple data structure. In the below example, IDs are unique. "date" and "id" are strings, and "amount" is an integer. ``` data = [[date1, id1, amount1], [date2, id2, amount2], etc.] ``` If `date1 == date2` and `id1 == id2`, I'd like to merge the two entries into one and b...
2018/03/09
977
2,780
<issue_start>username_0: I am trying to write a function that add all of the the inner key and value pairs of a nested dictionary. This is what I would pass in ``` Pets = {'family1':{'dogs':2,'cats':3,'fish':1}, 'family2':{'dogs':3,'cats':2}} ``` This is what I would expect as the result ``` {'dogs': 5, '...
2018/03/09
1,352
4,446
<issue_start>username_0: I want to assign 0-6 depend on the starting day. For example, if Wednesday is the starting day, I should set Wednesday to be 0 then Thursday to be 1, and Friday to be 2 etc... Here is what I have tried ``` def date_manipulate(startday): #df['Month']=df.index.strftime("%B") temp_week=[...
2018/03/09
1,194
3,630
<issue_start>username_0: The NVIDIA-SMI is throwing this error: > > NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA > driver. Make sure that the latest NVIDIA driver is installed and > running > > > I purged NVIDIA and installed it again following steps mentioned [here](https://askubuntu.c...
2018/03/09
1,109
3,312
<issue_start>username_0: I have an field `pattern` and value in that field is `INDI/17-18/6767/KER/787` .I want to get 6767 from this string I used the query ``` select substr(pattern,12,15) from pattern_table ``` But the output I got is `6767/KER/787` instead of `6767`.<issue_comment>username_1: Note: this answer...
2018/03/09
1,473
6,092
<issue_start>username_0: In the below given JSON, I want to replace all the key elements with @ by null string. ``` { "AssetParams": [ { "@DisplayName": "Device-ID", "@LiveUpdate": "false", "@MinLength": "1", "@Category": "IoT", "@Decoding": "none...
2018/03/09
612
2,101
<issue_start>username_0: I am working on a script that would Convert a PDF from the internet (without saving it to disk) to a series of jpegs, then save the JPGs to AWS s3. Unfortunately, the code below only saves the first page of the PDF as JPG to AWS. Any ideas on how I can modify it to save images to AWS with sequ...
2018/03/09
745
2,640
<issue_start>username_0: I have the following code where every variant of the enum `Message` has a `Term` value associated with it: ``` type Term = usize; pub enum Message { AppendRequest(Term), AppendResponse(Term), VoteRequest(Term), VoteResponse(Term), } impl Message { pub fn term(&self) -> Ter...
2018/03/09
550
2,118
<issue_start>username_0: I am trying to pass Azure Active Directory credentials from an Angular 2 app to an ASP.NET Core 2.0 Web API so that the Web API can react based on the user's properties and permissions. If I authenticate at the Angular app, how do I pass the credentials to the API to authenticate? If I am usi...
2018/03/09
313
1,158
<issue_start>username_0: I don't have the stupid Browse With, and every time i figure out where it's out it only gives me options for Internet Explorer... It doesn't give me an option to change the browser... Strange enough I've already removed Internet Explorer from my PC... How is it still using it...<issue_comment>u...
2018/03/09
425
1,628
<issue_start>username_0: I have to copy the shipping name and zip in the billing name and zip if the checkbox is checked and keep billing name and zip empty if checkbox is unchecked. Following is my JavaScript code: ``` function billingFunction(){ if(document.getElementById('same').checked==true){ document.getE...
2018/03/09
442
1,637
<issue_start>username_0: I want to show QT dialog as soon as show() is called; without waiting for the function to end. ``` void SomeFunction() { dialog_.reset(new MessageBoxProgression(this, SLOT(cancel())); dialog_->show();// not displayed waits for longOperation() to finish longOperation(); } ``` dialog\_ is havi...
2018/03/09
556
2,076
<issue_start>username_0: I want to do horizontal partitioning for the "users" table which is having a large number of rows. So I split the table and will have then users\_1, users\_2 etc. These tables are generated dynamically. My issue is how to set the table name dynamically in laravel models. I have tried below opt...
2018/03/09
701
2,406
<issue_start>username_0: I'm running such a simple SQL connection and select but I am getting very odd errors whilst running queries. > > Warning: mysqli\_fetch\_array() expects parameter 1 to be mysqli\_result, boolean given in C:\xampp\htdocs\Webmaster\run\forum\_mc.php on line 23 > > > Warning: mysqli\_query(): ...
2018/03/09
662
2,018
<issue_start>username_0: I have a function which looks like this: ``` function eco($a, $c, $d, $e, $g) { $f= (($a/$c)/ $d)*$e; $h=$f/$g; } ``` when I call this function and echo the results, nothing is displayed ``` $ok = eco(9,9,9,89,89); echo $ok; ``` Actually, I need the value of `$h` for further calcu...
2018/03/09
657
2,081
<issue_start>username_0: I am doing a query in firebase database with one call. If the record exists in firebase then do some code, but when the record doesn't exist error handling never gets called. What is wrong? ``` dbReference.child('432sfdgS24').once('value', function(snap) { console.log(snap.val()); // logg...
2018/03/09
2,131
6,583
<issue_start>username_0: I was working on a small application that I'm building a simple CLI for. I wanted my CLI to have some colors because who likes boring old white and black consoles?? (jk no offense if you do:)) Then as I was building onto it I seem to have run into a problem that I, unfortunately, don't unders...
2018/03/09
2,383
10,392
<issue_start>username_0: I am working on xamarin forms Cross platform. I have a function createform in which i am calling the buildform function.My build form function is used to generate the UI. I am callling my create form inside the constructor. ``` public FormsPage() { json = new JsonSerialize(); //Task....
2018/03/09
530
2,168
<issue_start>username_0: AWS recently introduced NLB (Network load balancer) where EIP (Elastic IP) can be linked to a AZ (availability zone). It is recommended to have NLB over multiple AZs hence have multiple EIP linked to each. But what happens when one of the AZ goes down, does the linked EIP gets linked to other ...
2018/03/09
530
2,045
<issue_start>username_0: I want to set UIScreen's bounds as a global `CGRect`. I set it as a `static const` but I get the error. I know the problem, screen's bounds isn't a compile-time constant. But I also want to set it as a global `CGRect`. What else can I do? Code below: ``` static const CGRect screenFrame = [[UI...
2018/03/09
1,073
3,648
<issue_start>username_0: I have the following code ``` private List list = new List(); //Displays toppings in receipt foreach (CheckBox cbToppings in gbToppings.Controls) { if (cbToppings.Checked == true) { list.Add(cbToppings); iToppings++; } } for (Int32 i = 0; i < list.Count; i++) { txtToppingsRecei...
2018/03/09
906
2,771
<issue_start>username_0: I am writing a simple checker where you can enter a URL that would check if the URL entered is using TLS 1.0, 1.1 or 1.2. Essentially I want to show a message saying "Yoursite.com is using TLS 1.0. It is recommended to disable this." The problem is, I am only able to figure it out if I am the ...
2018/03/09
1,002
3,447
<issue_start>username_0: I am trying to write a program which will outputs as shown below: ``` father is repeated 2 times where is repeated 1 time art is repeated 1 time are is repeated 1 time thou is repeated 1 time ``` This is what I have for now: ``` x = input('Please enter a string: ').lower() def counter(): ...
2018/03/09
351
835
<issue_start>username_0: I have the following data ``` id 00001 00010 00022 07432 ``` I would like to remove the leading `0`s so the data would like like the following ``` id 1 10 22 7432 ```<issue_comment>username_1: Here is a base R option using `sub`: ``` id <- sub("^0+", "", id) id [1] "1" "10" "22" "...
2018/03/09
2,695
9,087
<issue_start>username_0: My Jupyter Notebook has the following code to upload an image to Colab: ``` from google.colab import files uploaded = files.upload() ``` I get prompted for the file. Which gets uploaded. I verify that the file upload was successful using: ``` !ls ``` and I see that it's there. I check t...
2018/03/09
488
1,723
<issue_start>username_0: I want click button open new tab but it alway open new window: ``` window.open(my_id + '/edit/', '_blank', 'rel="noopener"') ``` Require using rel="noopener"<issue_comment>username_1: If you don't specify the third parameter, your URL is most likely to open in a new tab, instead of a new win...
2018/03/09
949
4,309
<issue_start>username_0: I have an npm imported component (CKEditor) that only cares about the state of its parent component at the time it mounts. I.e., no matter what changes occur in the state of the parent component, CKEditor won't reflect those changes if it has already mounted. This is an issue for me because I ...
2018/03/09
984
3,367
<issue_start>username_0: I have the table below, I want to display only the latest 3 dates in `ng-repeat`. I used `orderBy` with `-` and limited the results to 3. ``` ╔════╦═════════════════╦══════════╗ ║ id ║ name ║ date ║ ╠════╬═════════════════╬══════════╣ ║ 0 ║ Live Cooking ║ 08/10/17 ║ ║ 1 ║ R...
2018/03/09
884
3,132
<issue_start>username_0: Consider, my application uses a third party library. I want my application to accept only the flags defined in my application and not the flags defined in imported packages. ``` package main import ( "flag" "fmt" log "github.com/golang/glog" ) var myFlag int func init() { f...
2018/03/09
761
2,190
<issue_start>username_0: ``` [{'January': 'Sun'}, {'January': 'Sun'}, {'January': 'Sun'}, {'January': 'Sun'}] ``` Thats my dict. My code to make a list of values of dict\_month ``` dict_month = [] jan_month= [] for x in file_st: a=calendar.month_name[int(x['Start Time'][5:7])] #month name b=parser.pars...
2018/03/09
880
2,437
<issue_start>username_0: I have a paragraph text without line breaks. It is supposed to be wrapped to a new line if the width exceeds the width of the grid container. It works if the container is not a grid. I tried the solution from [Prevent content from expanding grid items](https://stackoverflow.com/questions/43311...
2018/03/09
1,071
3,017
<issue_start>username_0: For example... ``` this is a line 2345 this is a line 1234 ``` sed can reverse the lines (the numbers are the same length but the lines in the file are of different lengths): ``` 5432 enil a si siht 4321 enil a si siht ``` Now can sed reverse (not extract) only the number so the file can ...
2018/03/09
687
2,103
<issue_start>username_0: I have an image which has a button on top. Now I need the css to be handling an image opacity which to be applied when I just hover the button. This is my attempt. ```css .wwdimg:hover { opacity: 0.5; } ``` ```html ![](http://via.placeholder.com/350x150) clickme ``` What happens...
2018/03/09
1,250
2,453
<issue_start>username_0: I am new in python. I have a column of `datatime` data. Now I want to create a new column with only time part of `datetime` in seconds. my first row data is `2018-08-03 10:53:00` and I want to convert the `10:53:00` in seconds e.g 39180 want to store in new column. My functionality is get the...
2018/03/09
288
1,040
<issue_start>username_0: I am working on code for my class to recursively find the log of n with the base of b. I am also told to assume that n is exactly b to some integer power. So far I have the following code: ``` public int log(int b, int n ) { if (n / b == 1) { return 1; } else { return log(b, n / b)...
2018/03/09
588
1,567
<issue_start>username_0: I tried array slice but its not giving expected result if starting month is one of the last 3 months of the year. If current month is November then its should give November to February list<issue_comment>username_1: Simply double the array and then slice it ``` var newArr = [ ...arr, ...arr ]...
2018/03/09
828
2,459
<issue_start>username_0: i am having a table tb\_user in which the record are as like: ``` Name gender location grewup Arun male india britain sonia female USA dubai sheetal female india Russia ``` what i want to do is to fetch the record on the basis of location: ``` Loca...
2018/03/09
542
1,623
<issue_start>username_0: I recently started learning Kotlin and the one thing I noticed is the for-loop syntax of Kotlin is different from traditional for-loop syntax and for me it is a bit confusing...I tried to search it on google but didn't get my answer. **How would I duplicate the following Java for loop?** ``` ...
2018/03/09
1,419
4,949
<issue_start>username_0: ``` Table vehicle_master vehicle_id | vin 1 | 1234 2 | 5678 3 | 9123 Table vehicle_inventory vehicle_id | key | value -----------|-----------|------ 1 | Make | Honda 1 | Model | Civic 1 | Year | 2004 ...
2018/03/09
482
1,785
<issue_start>username_0: I am trying to understand the various phases which a MR Job goes through. I read online documentation for the same. Based on this, my understand on the sequence is as below: map() -> Partitioner -> Sorting (at mapper machine) -> Shuffle -> Sorting (at reducer machine) -> groupBy(Key) (at redu...
2018/03/09
485
1,854
<issue_start>username_0: I have million records in CSV file which has 3 columns id,firstName,lastName. I have to process this file in java and validate that id should be unique, firstName should not be null. If there are scenarios where id is not unique and/or firstName is null then I have to write these records in an ...
2018/03/09
350
773
<issue_start>username_0: I want to format the output from print function. ``` def main(): print('1 2 3 4 5'*7) # Write code here main() Required Output: 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 Obtained Output: 1 2 3 4 51 2 3 4 51 2 3 4 51 2 3 4 5...
2018/03/09
895
2,458
<issue_start>username_0: I need to parameter-ize a datetime value with an objective of passing to a constructed URI to make a Smartsheet API call to get data (i.e. sheets) changed in last 24 hours. I want to use Linux `date` command as I can do something like `date -d '1 day ago' %F` to get the output of a day before ...
2018/03/09
357
1,292
<issue_start>username_0: Could someone please help me with this? I am trying to get rid of the ATTRIBUTE "effective\_date" or set it to null date by using the below 2 queries and am getting different errors. ``` ===================================== UPDATE cd_quality (ALL) OBJECTS TRUNCATE effective_date WHER...
2018/03/09
1,047
3,076
<issue_start>username_0: TLDR: I want to print c at the bottom but to do that I have to make arrest and brest float. I cant do that I've made a function that reads a file and separates the first line from the rest I have two files I'm using for this aaa.txt and bbb.txt then i try to manipulate the data. I try squaring...
2018/03/09
671
2,548
<issue_start>username_0: When I return the geocode from googles API I'm trying to save it into my database. I've been trying to use the code below, to just insert a Test document with no luck. I think it has something to do with meteor being asynchronous. If I run the insert function before the `googleMapsClient.geocod...
2018/03/09
913
3,342
<issue_start>username_0: I am a new python user but an experienced Matlab user. I am recently debugging a python script, and when I manually re-run the script multiple times, I found a somewhat annoying issue of matplotlib: it always draws on existing figure window, overlapping on existing plot, if the figure title is ...
2018/03/09
934
3,029
<issue_start>username_0: ``` {u'IamInstanceProfileAssociations': [{u'InstanceId': 'i-xxxxxxx', u'State': 'associated', u'AssociationId': 'iip-assoc-0xxxx', u'IamInstanceProfile': {u'Id': 'AIPAJxxxxx', u'Arn': 'arn:aws:iam::xxxxxx:instance-profile/Role'}}], 'ResponseMetadata': {'RetryAttempts': 0, 'HTTPStatusCode': 200,...
2018/03/09
2,345
7,938
<issue_start>username_0: When I scan QR code it's getting a data on `result.getContents` but didn't pass the data on JSONObject `obj` just directing go on `Catch` block data get pass to this line `JSONObject obj = new JSONObject(result.getContents());` but when start to `Debug` then its not pass the data on 'obj' in ...
2018/03/09
1,288
4,235
<issue_start>username_0: below is my Apex Trigger. I am a beginner and trying to write its test class but continuously getting error "System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED\_FIELD\_MISSING, Error: You can't select products until you've chosen a price book for this opportunit...
2018/03/09
503
1,836
<issue_start>username_0: I want this data for creating offline bible app for my local language. Is there any other quicker way to do this? ``` String url ="https://raw.githubusercontent.com/godlytalias/Bible-Database/master/Tamil/bible.json"; RequestQueue queue = MySingleton.getInstance(this.getApplicationCo...
2018/03/09
1,102
3,859
<issue_start>username_0: I am working with `Yii2` basic templates and working on `auth_manager`. I have read about this at below link : [Yii2 Authorization](http://www.yiiframework.com/doc-2.0/guide-security-authorization.html) and i have check this also [How can we use the auth\_rule table in Yii2 RBAC?](https://...
2018/03/09
585
2,083
<issue_start>username_0: When I add a single onClick event to an element as well as an onDoubleClick event to the same element, the single click is triggered on the double click as well. I'd like to seperate it out so only one event is fired for single or double. I found some examples in Jquery, but I wanted a clean fu...
2018/03/09
759
2,436
<issue_start>username_0: I have a situation where I am showing the categories and along with it the number of products in those and all internal sub and subcategories (3 level only) Here is my SQL statement ``` SELECT COUNT(id) as count_brand_prod FROM `shop_products` WHERE (`shop_products`.`category_id` IN (28,59,2...
2018/03/09
575
1,712
<issue_start>username_0: So say we're given a `List[String]` and bunch of `Option[String]'s` call them `a, b, c`. Say I want to append the valid (Some's) `Options[String]'s` out of `a, b, c` to my existing`List[String].` What would be the best way to go about this using immutable structures? I.e. I know I could use a ...
2018/03/09
379
1,136
<issue_start>username_0: My Html input type number is not accepting 0 as a first input. It only accept 1 to 9 digit as a first input. Here is my code ``` ``` If i give input 120124214 it accept. But if I give 0124452 it is not taking my input.<issue_comment>username_1: What browser are you using? Works fine for me....
2018/03/09
1,193
3,878
<issue_start>username_0: For the source code containing: ``` const S3 = require('aws-sdk/s3/clients') const s3 = new S3() s3.putObject(params, callback) ``` I have added the following mock based on [this article](https://facebook.github.io/jest/docs/en/mock-functions.html#mocking-modules): ``` jest.mock('aws-sd...
2018/03/09
1,389
4,873
<issue_start>username_0: I am trying to parse a date into an appropriate format, but I keep getting the error > > `Unparseable date` > > > Can anyone tell me what the mistake is? ``` try { System.out.println(new SimpleDateFormat("d-MMM-Y").parse("05-03-2018").toString()); } catch (ParseException e) { e....
2018/03/09
364
1,153
<issue_start>username_0: I tried downloading v2.7.x but it wasn't available. Almost all sites have updated to v3.x. If possible, please share the download link too. * I am using the Pycharm IDE and current interpreter is v3.4. * I want to shift to 2.7.1 * How do I add the 2.7 interpreter.<issue_comment>username_1: You...
2018/03/09
541
1,571
<issue_start>username_0: Say I have a string of a html source, and I want to write a loop to find all the links with a specific class name, for example: I would like to store all the links found into a list.<issue_comment>username_1: 1.start a loop until EOF 2. Catch the needed char/word & collect where you want ( a s...
2018/03/09
1,603
5,423
<issue_start>username_0: I have to created multiple google marker based on lat and long from database,but i need how to make multiple google marker based on address in php or json, in below the i tried & completed loading XML file for getting (lat & long),i need based on address please help any one. This is based on lo...
2018/03/09
969
3,673
<issue_start>username_0: I am new to Angular and trying to make a small application. I referred ['object' does not contain such a member](https://stackoverflow.com/questions/46617738/identifier-n-not-defined-object-does-not-contain-such-a-member) answer but I am not getting my solution from there. **profile.component...
2018/03/09
976
3,670
<issue_start>username_0: I am reading K&R. In an example it defines an array of structures as: ``` struct key { char * word; int count; } keytab[] = { "auto", 0, "break", 0, /*more members*/ "while", 0 }; ``` Then to calculate the size of the array, it uses two approaches: ``` 1) #define NKEYS (sizeof k...
2018/03/09
501
1,869
<issue_start>username_0: I need to fetch the first inserted record in a collection in MongoDB for which I am currently using the below query: ``` db.users.find({}).sort({"created_at":1}).limit(1); ``` But, this takes up a lot of memory. The collection has about 100K records. What is the efficient way to do this?<is...
2018/03/09
681
2,326
<issue_start>username_0: I have a table where I need to get the last 12 records which is grouped by year() month() ASC. I try to use the query below but the result is not as expected. ``` SELECT * FROM ( SELECT id, tanggal, date_format(tanggal,'%b-%Y') as bulan, sum(sisa_pokok)...
2018/03/09
1,010
3,599
<issue_start>username_0: > > Write a program to simulate a coin toss. First, ask the user to "call" or predict the toss. Next, let the user know you are tossing the coin. Then report whether the user was correct. > > > Example: > > > > ``` > Please call the coin toss (h or t): h > > Tossing... > > The coin ...
2018/03/09
512
1,929
<issue_start>username_0: Is order of execution important when creating Primary/Foreign Key links in a MySQL statement? For example, the following code will produce the error: "Cannot add foreign key constraint" ``` CREATE TABLE IF NOT EXISTS Movies ( MovieID INT NOT NULL AUTO_INCREMENT, GenreID INT NOT NULL,...
2018/03/09
487
1,718
<issue_start>username_0: The microsoft docs demonstrate using an example like so: ``` var blogs = context.Blogs .Include(blog => blog.Posts) .ThenInclude(post => post.Author) .ThenInclude(author => author.Photo) .ToList(); ``` Is there a way to do this using the: `Abp.App...
2018/03/09
474
1,700
<issue_start>username_0: I have used iOS's segmented control in xamrin. I am trying to fire `TouchUp InSide` event but its not working. Actually I like to find the scenario when user touch the selected segment again. At the moment when user select the selected segment again I want to set the selected segment to unsel...
2018/03/09
756
3,260
<issue_start>username_0: In the docs for [C# Indexers](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/indexers/using-indexers), it states: > > Indexers are a syntactic convenience that enable you to create a class, struct, or interface that client applications can access just as an array. Indexers ...
2018/03/09
692
2,502
<issue_start>username_0: I am learning ionic and for that I was following [ionic framework document](https://ionicframework.com/docs/theming/css-utilities/). As mentioned in the link, to set attribute dynamically there is given example `I will be centered when isMD is true.`. But when I tried it to implement it didn...