date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/16
216
761
<issue_start>username_0: ``` Map> aMap = new HashMap<>(); ``` This map has some keys and optional values. ``` Optional> valuesList = input.aMap().values().stream() .collect(Collectors.toList()); ``` The above way has compilation error. How do i get the optional list correctly?<issue_comment>username_1: you missun...
2018/03/16
522
1,852
<issue_start>username_0: I'm new to asp.net Here is my code: ``` public static string pathGetFile = WebConfigurationManager.AppSettings["pathGetFile"].ToString(); public bool TransferFile(string idcard) { //string file = ""; try { Sftp sftp = new Sftp(url, user); ...
2018/03/16
1,064
3,530
<issue_start>username_0: I have written 2 functions to encrypt and decrypt data with openssl I get the same return value for my teststring if I use openssl\_encrypt directly or if I use my function. The problem is the decryption. The decryption only works if I use openssl\_encrypt directly without the function. If i ...
2018/03/16
724
2,368
<issue_start>username_0: I can't get TabNavigator to work on iOS, although it works perfectly in Android. Here are my steps to reproduce the problem Open terminal window. `react-native init tabnav` `cd tabnav` `rm -rf node_modules` `rm -rf package.json` `rm -rf package-lock.json` Then I opened up `package.json` ...
2018/03/16
285
1,050
<issue_start>username_0: I am really new to Google API key. When am I testing my code on the local system, it is working fine but on an actual server it giving me `SSLHandshakeError`. **Server configuration**: `nginx + unicorn + ubuntu + django + Python 2.7` `SSLHandshakeError at 'url' [Errno 1] _ssl.c:510: error:140...
2018/03/16
1,322
4,242
<issue_start>username_0: I am given a raw string which is a path or "direction" to a string in JSON. I need the following string converted to a list containing dictionaries.. ``` st = """data/policy/line[Type="BusinessOwners"]/risk/coverage[Type="FuelHeldForSale"]/id""" ``` The list should look like this ``` pat...
2018/03/16
4,305
21,400
<issue_start>username_0: Im using update after a mutation to update the store when a new comment is created. I also have a subscription for comments on this page. Either one of these methods works as expected by itself. However when I have both, then the user who created the comment will see the comment on the page tw...
2018/03/16
910
3,140
<issue_start>username_0: I have a case where i got a results file with the following pattern: ``` path:pattern found ``` for example ``` ./user/home/file1:this is a game ``` in other words when i searched for some string i got the file and the line it found it. Problem is sometimes i have multiple cases in the s...
2018/03/16
726
2,512
<issue_start>username_0: In Vue.js project, how can I get the `csrftoken`? I tried use `js-cookie`, but can not get it: ``` import Cookies from 'js-cookie'; if (Cookies.get('csrftoken')!==undefined) { // there will skip, because the Cookies.get('csrftoken') is undefined. config.headers['x-csrftoken']= Cookies....
2018/03/16
759
2,836
<issue_start>username_0: I am running it with Rails-React to return the data from database (mongoDB). Had successfully connect with the DB. However, it returns error "TypeError: home\_fires is undefined", please help... ``` constructor(props) { super(props); let home_fires = type.string; this.state = { ...
2018/03/16
854
2,115
<issue_start>username_0: I have two different type of image with various sizes inside the two div tags. I need to resize the 2nd div image size by half of first div image. ```css .first-div img { width:500px; //this img size may be random } .second-div img { width:250px;//need to resize the img half of first-...
2018/03/16
924
3,030
<issue_start>username_0: I am trying to understand PCF concepts and thinking that once i am done with creating mysql services in PCF, how i can manage that database like creating tables and maintaining that table just like we do in pur traditional environment using mySqldeveoper. I came across one service like PivotalM...
2018/03/16
1,209
4,374
<issue_start>username_0: I have a Db table listing media files which have been archived to LTO (4.3 million of them). The ongoing archiving process is manual, carried out by different people as and when downtime arises. We need an efficient way of determining which files in a folder are **not** archived so we can compl...
2018/03/16
897
2,981
<issue_start>username_0: I am trying to sort an array of integers so that the evens print out in descending order FIRST and then the odd numbers in the array print out in ascending order. ``` So the output would look like: 8 6 4 2 1 3 5 7 9 ``` How would I go about doing this? ``` #include #include int compare...
2018/03/16
412
1,393
<issue_start>username_0: I have never used patches with Git before and I need some help. I am trying to apply a patch to a Git repo to test a Wine patch, specifically [this patch here](https://bugs.winehq.org/attachment.cgi?id=60752). So I did the following: ``` $ git clone git://source.winehq.org/git/wine.git $ cd wi...
2018/03/16
1,061
3,482
<issue_start>username_0: For making a circular `UIView` I am using the `cornerRadius` property. I have a UIView with dimension 79\*158. ``` redView.layer.cornerRadius = redView.frame.size.height/2 redView.layer.masksToBounds = true ``` It shows elipse instead of circle: ![It shows elipse instead of circle](https:/...
2018/03/16
2,061
6,226
<issue_start>username_0: I am creating code to operate a robot. It is supposed to tell the robot when to turn depending of the reading it gets from its sensors. I tried an if statement for the turning it, and was not happy with how the robot turned. I felt a while loop was better as it would not have to go through the ...
2018/03/16
797
2,770
<issue_start>username_0: I have the below code in HTML5 for validating some names ``` ``` It works, but I want to add to it an extra checking feature using regex, as follow: 1. the name is not allowed to start with sign period . or sign minus - 2.the name is not allowed to end with sign period . or sign minus - I ...
2018/03/16
689
2,837
<issue_start>username_0: I have started to building PWA without understanding the internal meaning of it. When I searched, PWA gives a native app like look and feel to web apps progressively using the following technology 1. Manifest 2. Service workers 3. Designing App shell 4. Push notification support for web apps ...
2018/03/16
321
1,245
<issue_start>username_0: showing this error: **XHR failed to load: AJAX** This is ajax code: ``` $.ajax({ url:"php echo base_url();?food/register_user/", type:"ajax", traditional:true, data:{data}, dataType:"json", success:function(data){ ...
2018/03/16
483
1,745
<issue_start>username_0: I want to run a laravel cron job in order to run a command on windows 10 using task scheduler, I tried to create a basic task in scheduler but it shows running but data doesnt add in db. When I run "php artisan schedule:run" it works perfectly. I am using Laravel and Homestead. [![It shows thi...
2018/03/16
265
901
<issue_start>username_0: I'm trying to surround a link with quotes when using Asciidoctor and I can't get it to work. It either includes the quotes in the link: ``` http://link.to.something["Title"] ``` Or it renders the raw text: ``` "http://link.to.something[Title]" ``` Does anyone know the syntax so it can ren...
2018/03/16
408
1,426
<issue_start>username_0: I have a button link that looks like this in the HTML source: ``` Cert ``` On the same page I have the following script defined. I want to redirect if the user click OK in the confirm popup. But nothing pops up when I click on the button. Any idea why? (I tried to format the script nicer, b...
2018/03/16
1,092
4,108
<issue_start>username_0: The description of the `Task.WhenAny` method says, that it will return the first task finished, even if it's faulted. Is there a way to change this behavior, so it would return first successful task?<issue_comment>username_1: Something like this should do it (may need some tweaks - haven't test...
2018/03/16
868
3,418
<issue_start>username_0: I'm trying to implement Codable for a class which contains a NSAttributedString, but I get errors at compile time: ``` try container.encode(str, forKey: .str) ``` > > error ambiguous reference to member 'encode(\_:forKey:)' > > > and ``` str = try container.decode(NSMutableAttributedS...
2018/03/16
400
1,521
<issue_start>username_0: Trying to create SSO for AWS keeping Azure users as source of Truth. Followed below Tut's. 1. <https://learn.microsoft.com/en-us/azure/active-directory/active-directory-saas-amazon-web-service-tutorial> 2. <http://blog.flux7.com/aws-best-practice-azure-ad-saml-authentication-configuration-for...
2018/03/16
1,607
4,331
<issue_start>username_0: Can someone have a look at my code and tell me what the problem is? I am trying to build a jquery function that counts all list item elements that contains a specific text. The bit where it should count all "li"s works: $(allLip).text(allLi.length); but the function where is is supposed to c...
2018/03/16
1,052
3,767
<issue_start>username_0: I have a problem with retrieve data from Ajax. I want to add button "X" to close popup after show data. I tried to add a button like: ``` jQuery(".popup").append('x'); ``` in to popup to the user can close my popup. My code like: ``` function getData(domain){ var dataString = "domain=...
2018/03/16
1,197
5,073
<issue_start>username_0: I'm just starting out in React and am building an app that incorporates a video search through Youtube's API. I am trying to dynamically render video data in my "search-results" div after querying the API for videos. This "search-results" div is supposed to render an array of JSX, titled searc...
2018/03/16
390
1,402
<issue_start>username_0: I need to write a code to jump to a particular given line number in gVim. But I need to do this using a C++. Is there any way to do it? There are ways to open the gvim by executing the Linux commands using C++ code. But is there a way to execute the gVim command using the same C++ code?<issue_...
2018/03/16
2,069
5,798
<issue_start>username_0: I receive data in Excel rows like so: ``` INVOICE NO. 1000001 Plan AAAAA 17371 22.00 Plan BBBBB 31782 0.00 Plan CCCCC 13918 44.00 Total for 1000001 66.00 INVOICE NO. 1000002 Plan AAAAA 31385 0.00 Plan CCCCC 15981 44.00 Total for 1000002 44.00 INVOICE NO. 1000003 Plan BBBBB 13181 0.00 Plan CCCC...
2018/03/16
2,387
6,886
<issue_start>username_0: In folder `test`, I create `hello.h`,`hello.c`,`main.c`. My goal is to create a static lib from `hello.h`, `hello.c` and an executable file from the library and `main.c`. The following is what I have done. hello.h: ``` #ifndef HELLO_H #define HELLO_H void hello(const char* name); #endif...
2018/03/16
703
2,563
<issue_start>username_0: I am using spring boot to sent an email. Code snippet from my email service ``` private @Autowired JavaMailSender mailSender; ``` AND ``` MimeMessage message = mailSender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(message, MimeMessageHelper.MULTIPART_MODE_M...
2018/03/16
237
774
<issue_start>username_0: I have a string of sequence say "aby,abraham,issac,rebecca,job,david,daniel" now I need to add space after the comma. I bind the value using `ng-bind` and display the result using `ng-show`. I'm unable to use join as it is received as array from the database.<issue_comment>username_1: You can ...
2018/03/16
346
1,234
<issue_start>username_0: In my Jhipster Application when I create new user it sends email for reset password, users getting email but I want to display one image in that email so it looks good I have written fillowing line in ActivationEmail.html to add image but When user didn't get image in email. ``` ![Mountain V...
2018/03/16
264
939
<issue_start>username_0: I have a table as activities with column id,title,content,posted\_date and I want to fetch record like the row would be displayed at the top of which I have specified the id and there after all the rows should be displayed. I have written the following query but It's throwing an error. ``` SEL...
2018/03/16
3,710
14,199
<issue_start>username_0: This problem has been successfully resolved. I am editing my post to document my experience for posterity and future reference. The Task -------- I have 117 PDF files (average size ~238 KB) uploaded to Google Drive. I want to convert them all to Google Docs and keep them in a different Drive ...
2018/03/16
2,512
9,417
<issue_start>username_0: After experimenting with my VSCode key bindings, I would like to reset them to the original settings. How do I do that? I am on Linux Mint 18. I tried removing all the records from the keybindings.json<issue_comment>username_1: Try this documentation page about key binding in VSCode: <https:/...
2018/03/16
1,870
6,256
<issue_start>username_0: I am creating a flashcard game for my kid. Its about Dinos. I am having trouble making "Congrats, You got it right" appear on the screen. I have moved my code all over the place but no luck. Can someone please help me out. To be clear, What I want to happen is when the user presses the number...
2018/03/16
1,876
6,459
<issue_start>username_0: I am currently working on a personal project using the Ruby language in Cloud9 IDE. Recently, I came across an environment/programming language called Processing. My goals is to make Processing available for my use in Cloud9 IDE. I am a complete novice and have no clue what I am doing. I follo...
2018/03/16
2,197
7,786
<issue_start>username_0: I have tried to access the keycloak API from the postman. but it is showing 400 bad request. I was calling api in the below format. ``` http://{hostname}:8080/auth/realms/master/protocol/openid-connect/token?username=admin&password=<PASSWORD>&client_id=admin-cli&grant_type=password ``` In ...
2018/03/16
569
1,747
<issue_start>username_0: JDK is already installed there.I have downloaded the apache-tomcat-8.5.29.tar.gz in /opt/tomcat. I want their folder structure webapps and all. Executed the command `/path/tar xzvf apache-tomcat-8.5.29.tar.gz`, but now also there is tar file present. How do I get folders inside tomcat?<issue_c...
2018/03/16
747
2,219
<issue_start>username_0: I have a dataset like so: ``` df<-data.frame(x=c("A","A","A","A", "B","B","B","B","B", "C","C","C","C","C","D","D","D","D","D"), y= as.factor(c(rep("Eoissp2",4),rep("Eoissp1",5),"Eoissp1","Eoisp4","Automerissp1","Automerissp2","Acharias",rep("Eoissp2",3)...
2018/03/16
544
1,675
<issue_start>username_0: How can we check by code in Opencart 2.0.3 that Cart contains Gift Certificate? I want to disable cash on delivery (cod) payment mode if cart has Gift Certificate (opencart 2.0.3). Any code or idea to achieve this?<issue_comment>username_1: The error says: tar (child): **apache-tomcat-8.5.29....
2018/03/16
541
1,968
<issue_start>username_0: I'm trying to learn Postgres and Ive made two basic tables and I can't join them together. here is my list Of relations: ``` Schema | Name | Type | Owner --------+--------------+----------+---------- public | login | table | postgres public | login_id_seq | sequence ...
2018/03/16
791
2,504
<issue_start>username_0: I am reading a file with about 13,000 names on it into a list. Then, I look at each character of each item on that list and if there is a match I remove that line from the list of 13,000. If I run it once, it removes about half of the list. On the 11th run it seems to cut it down to 9%. Why i...
2018/03/16
2,485
9,798
<issue_start>username_0: I was researching on hosting a static website on Amazon S3, but needs to make it accessible only for certain group of people who knows credentials. Couldn't find any option other than IP restrcition below. I can't do this as I don't know IP for every person who would access this. ``` { "Ve...
2018/03/16
1,509
5,173
<issue_start>username_0: I am applying filters to objects (following [image filters demo](http://fabricjs.com/image-filters)) and everything is ok but after I save and load the canvas, the image filters change index. At the moment I have four filters and they are applied by index (as shown in the demo). > > 0 : Gra...
2018/03/16
551
1,857
<issue_start>username_0: On the time of page loaded get\_switch() function which globally created on app.js page will be call then return a method. i want to execute these return methods. demo.js ``` const return_functions = get_switch('BTC'); function get_btc() { console.log('btc'); } function get_bc...
2018/03/16
1,573
4,602
<issue_start>username_0: Heroku is suddenly rejecting deployments of my Python app with the error: ``` remote: ImportError: cannot import name 'InsecureRequestWarning' remote: ! Push rejected, failed to compile Python app. ``` This is occurring when deploying completely non-functional changes to what's a...
2018/03/16
406
1,197
<issue_start>username_0: So many threads already talk about returning the longest list in a list of lists by ``` max(sorted(lst_of_lsts, key = len)) ``` But this spews if lst\_of\_lsts is an empty list. > > > ``` > max(sorted(lst_of_lsts, key = len)) ValueError: max() arg is an empty sequence > > ``` > > Is t...
2018/03/16
682
2,705
<issue_start>username_0: I'm using Application insights with API-Management to monitor my API's. Application Insights is great tool but I'm not able to see body. I want to see Post request body parameter. Is there any way to add body data on application insights??<issue_comment>username_1: > > I can't do code changes...
2018/03/16
3,509
11,185
<issue_start>username_0: I have 2 servers, one which has magento 2 installed (ip - 172.16.31.10 port 80) and Varnish on another (ip - 192.168.127.12 port 80) My Varnish Configuration: File /etc/default/varnish:- ``` DAEMON_OPTS="-a :80 \ -T 127.0.0.1:6082 \ -b 172.16.31.10:80 \ ...
2018/03/16
377
1,306
<issue_start>username_0: I am doing a course on data structure and algorithm. There is this code written here where there is a function `mf()`. It returns `int old`.My question is that how can it return `old` since `int old` is a local variable which will be destroyed at the time of return. ``` class x{ public; int m;...
2018/03/16
737
2,388
<issue_start>username_0: When convert the properties to JSON it added extra backslash in ASCII character, How to avoid this, see the code below Input File (sample.properties) ``` property.key.CHOOSE=\<KEY> ``` Code ``` import json def convertPropertiesToJson(fileName, outputFileName, sep='=', comment_char='#'): ...
2018/03/16
680
2,130
<issue_start>username_0: [![Display object angular5](https://i.stack.imgur.com/XXm3W.png)](https://i.stack.imgur.com/XXm3W.png) In the above screenshot console I have an object with 2 values **users** and **tickers**. Again each one is array of values. Now how to display these values in angular5 html template as spec...
2018/03/16
873
2,838
<issue_start>username_0: I`m looking for a way to sort of zoom in/zoom out on my Phaser app depending on the screen size while keeping the ratio (and not altering the canvas size pixelwise as shown on the sketch), I tried so many snippets but everybody is sort of looking for something else, this is what I'm looking for...
2018/03/16
654
2,225
<issue_start>username_0: Consider I'm a hotel owner, and I have to know the bookings related to my hotel. I need all bookings that which associated with my hotel. Is there any eloquent functions to join? How? How to get bookings of a hotel with owner(userid) with using eloquent relationship functions? ![enter image d...
2018/03/16
472
1,517
<issue_start>username_0: I have problem when I click on button the table row is not deleted **tr id** and **button id** are both same value. please tell where I am doing wrong ``` | | X | ``` *Jquery code* ``` $(document).ready(function() { $('.button_remove').click(function() { var btn_id = $(this).attr("...
2018/03/16
515
1,891
<issue_start>username_0: OK So for sake of simplicity lets say I have 3 components: a parent component and two other components (child A and child B). I want parent component to **have an url prefix of '/parent' and contain one of the two other components**, component A by default, else B, who have their own url pref...
2018/03/16
303
1,123
<issue_start>username_0: i dont know about Xcode 8,9 can it support objective c old functions and project? my project is almost complete but some kind of function not supporting like `UIDocumentBrowserViewController`and etc in iOS 9.0 should i upgrade only iOS version or Xcode also Please anyone help me understand that...
2018/03/16
456
1,699
<issue_start>username_0: RPA-Blueprism - Global Send Keys - Input text which has '(' is not working. Only the text gets entered without brackets, please assist. Ex: 'Paste (Text)' is the text I want to send, however the text is sent to the field as 'Paste Text'<issue_comment>username_1: You can use "Paste {(}Text{)}"....
2018/03/16
464
1,685
<issue_start>username_0: We have a git history that looks like this. This is already pushed to remote but can I possibly merge the branches at certain commits? Or am I limited to only merging the commit at the very top? [![Ruined git history](https://i.stack.imgur.com/i8pTR.png)](https://i.stack.imgur.com/i8pTR.png) w...
2018/03/16
700
2,512
<issue_start>username_0: > > Exception 'yii\base\InvalidArgumentException' with message 'Response content must not be an array.' > in C:\xampp1\htdocs\advanced\vendor\yiisoft\yii2\web\Response.php:1054 > > > Stack trace: > > 0 C:\xampp1\htdocs\advanced\vendor\yiisoft\yii2\web\Response.php(337): yii\web\Response-...
2018/03/16
569
2,204
<issue_start>username_0: I am getting the following error while using the following command ``` mvn clean install package ``` Error ``` No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? ``` I have tried the solutions already present online but none of them worked, I...
2018/03/16
426
1,863
<issue_start>username_0: In Dart, you can tell the VM to wait for a `Future` by calling `await`. The thing is that you can only call `await` in an async function, which returns a ... `Future`. So if I have a function which doesn't take a long time to run, and has to be run in a function who's type is *not* async, how...
2018/03/16
1,440
5,518
<issue_start>username_0: my code opens 2 child windows. Once I perform my operations on each I need to close the windows and switch back to the Parent window. There is no option as driver.switchToParentWindow. There is only driver.switchToPreviousWindow. Eg: I close the 2nd child window --> then driver.switchToPrevio...
2018/03/16
539
2,063
<issue_start>username_0: I'm a bit new to the JavaScript side of things. I am trying to include a conditional statement in my code so that it only works on screen sizes above 768px ``` $(window).on('scroll', function () { if ($(window).scrollTop() > 75) { $('#anim-nav').addClass('bg-fill').removeCla...
2018/03/16
551
1,707
<issue_start>username_0: I have used like this, ``` DateTime dueDate; DateTime.TryParse(dataRead["Date required"].ToString(), out dueDate); list.add(new list { DueDate = dueDate.ToShortDateString() }); ``` I have also tried like this, ``` DateTime dueDate; DateTime.TryParse(dataRead["Date required"].ToString("dd...
2018/03/16
1,590
5,721
<issue_start>username_0: Here is my code. ``` import UIKit var str = "Hello, playground" //There are two sorted arrays nums1 and nums2 of size m and n respectively. //Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). //Example 1: //nums1 = [1, 3] //nums2 = [2] // //T...
2018/03/16
842
2,873
<issue_start>username_0: I'm new to angular. I couldn't figure how to access a variable inside a function(). this is my code ``` mergeImages() { var imgurl; var canvas: HTMLCanvasElement = this.canvas.nativeElement; var context = canvas.getContext('2d'); let img1 = new Image(); let img2 = new Im...
2018/03/16
1,595
5,006
<issue_start>username_0: Q :Why is not this code working properly? I have implemented file handling in C++ language. I have created a complete file of the car. Through this code, we can store new data, delete old one, search a particular data about the car.The problem is that this code compiles successfully but durin...
2018/03/16
637
2,821
<issue_start>username_0: I was trying to check the file first before I upload it using 'fileuploader', now on my beforeSend function: ``` beforeSend: function(item, listEl, parentEl, newInputEl, inputEl) { var file = item.file; let readfile = function(file){ return new Promise(...
2018/03/16
507
2,021
<issue_start>username_0: I am working taking help from the following project: <https://github.com/spring-cloud/spring-cloud-stream-samples/tree/master/kinesis-samples/kinesis-produce-consume> The following is the application.yml code snippet : ``` spring: cloud: stream: bindings: ordersOut: ...
2018/03/16
514
2,025
<issue_start>username_0: I have a canvas containing art on a transparent background. I desaturate it like this: ``` boardCtx.fillStyle = "rgba(0, 0, 0, 1.0)"; boardCtx.globalCompositeOperation = 'saturation'; boardCtx.fillRect(0, 0, boardCanvas.width, boardCanvas.height); ``` and find that the transparent background...
2018/03/16
687
2,477
<issue_start>username_0: In the given Images, There are two tables. In the table STUD\_MEMBER, Dept\_ID is a foreign key which is referring to Dept\_ID in table DEPARTMENT.: [![Image of Tables](https://i.stack.imgur.com/xcs2A.png)](https://i.stack.imgur.com/xcs2A.png) So when I add foreign key constraints in mysql a...
2018/03/16
1,384
4,545
<issue_start>username_0: ``` select table_name, to_number(extractvalue(xmltype(dbms_xmlgen.getxml('select count(*) c from '||owner||'.'||table_name)),'/ROWSET/ROW/C')) as count from all_tables ``` I would like to get those with one record in the table.<issue_comment>username_1: If your query is giving the data you...
2018/03/16
846
2,139
<issue_start>username_0: I can sum the first 310 rows in a 5 column pandas dataframe and get a tidy summary by using: ``` df.[0:310].sum ``` Is there an easy way whereby I can sum the first 310 rows in a *certain column* of my choosing? I just can't figure out how to combine a column selection and row slice selecti...
2018/03/16
724
1,812
<issue_start>username_0: I'm working on a Monte-Carlo simulation type problem and need to generate a vector of repeated random numbers, with the matching numbers grouped together, but in random order. It's easier to explain with an example. If I had: 1, 3, 7, 12, 1, 3, 7, 12, 1, 3, 7, 12 I would like it sorted as: 7,...
2018/03/16
760
2,357
<issue_start>username_0: I am writing a socket server using java.nio. As I need my server to use 0 threads I am using `java.nio.channels.Selector`. My code look as follows. ``` while (iterator.hasNext()) { SelectionKey key = (SelectionKey) iterator.next(); iterator.remove(); if (!key.isValid()) { con...
2018/03/16
508
1,678
<issue_start>username_0: Unable to parse date 02-Mar-00. Format is -> dd-MMM-yyyy ``` DateFormat df = new SimpleDateFormat(dateFormat); df.setLenient(false); date = df.parse(dateString); ``` The error message - ``` Unparseable date: "02-Mar-00" java.text.ParseException: Unparseable date: "02-Mar-...
2018/03/16
708
2,132
<issue_start>username_0: I have implemented the following code to copy a specific file from zip to a certain target directory. But this copies entire structure into the target directory. The code is: ``` import os import zipfile zip_filepath='/home/sundeep/Desktop/SCHEMA AUTOMATION/SOURCE/DSP8010_2017.1.zip' targe...
2018/03/16
811
2,827
<issue_start>username_0: I want to set height and width for framelayout , if give values in java code using setlayoutparams its showing very small box, but in XML its showing properly. This is my java code ``` FrameLayout frameLayout2= (FrameLayout) light.findViewById(R.id.frameLayout2); ConstraintLayout.LayoutPara...
2018/03/16
594
2,073
<issue_start>username_0: In order not to violate policy of Google AdMob AD, I add my physics phone to test device using Code A. I get the device string "Samsung SM-J5008" of the physics phone using the following UI when I select a device to run the App. I don't know whether the string "Samsung SM-J5008" is correct, a...
2018/03/16
526
1,557
<issue_start>username_0: This is my function i want to change my date format like this **m/d/y** ``` foreach ($totals as $item => $val) { $result['totals_labels'][] = $item; $result['totals_values'][] = $val; $result['details_labels'][] = $item; $totals['date'] = date(...
2018/03/16
217
709
<issue_start>username_0: I'm using AudioUnit to Play and Record,when i set `kAudioUnitSubType_VoiceProcessingIO`, the sound is lower than RemoteIO, Why? Who can tell me how to change this issue?<issue_comment>username_1: Use [**Strtotime**](http://php.net/manual/en/function.strtotime.php). it Parse about any English te...
2018/03/16
625
1,750
<issue_start>username_0: i am new in c,so i want to input string at 2-d array,but don't print string.what's wrong in this code and how can i fixed this problem.thanks in advanced ``` #include #include int main() { char col[100][100]; int i,j; for(i=0; i<2; i++) { for(j=0; j<2; j++) { scanf("%s", &col[i][j]); ...
2018/03/16
662
2,095
<issue_start>username_0: I am trying to pull over end-of-day share prices going back in time. The code below provides exactly what I need but it appears that that the year/month/day parameters do not work. ``` import requests params={'q': 'NASDAQ:AAPL', 'expd': 10, 'expm': 3, 'expy': 2018, 'output': 'json'} response ...
2018/03/16
373
1,387
<issue_start>username_0: Anyone knows how to create a code to delete duplicate product data in Hybris? either using an impex script or modifying the code?<issue_comment>username_1: > > Question: **How to delete Hybris Products having a duplicate name?** > > > You can run **SQL / flexible query** to find duplicate ...
2018/03/16
1,075
4,377
<issue_start>username_0: I am trying to read values from BLE device. Steps I followed: 1. I am able to discover the BLE device and connect to it. 2. I am able to find the required characteristic by parsing through the services and get the GattCharacteristic. 3. I am able to write a value to the BLE device characterist...
2018/03/16
519
1,612
<issue_start>username_0: ``` bool isAnagram(string s1, string s2){ if(s1.length() != s2.length()) return false; for(int i =0; i ``` I write the code about checking Anagram but ignore the requirement of ignoring difference between upper and lower. I have no idea about that. Can you help me? Thanks!<issue_c...
2018/03/16
882
2,812
<issue_start>username_0: I made a little program that finds all prime numbers from 0 - 5000, but the program crashes after about a number of recursions which gives me this error: at main.LargePrimeNumber.recursion(LargePrimeNumber.java:37) What is causing this? My first guess is that my RAM fills up and crashes, but ...
2018/03/16
622
1,987
<issue_start>username_0: I want to set image and title both on rightBarButton. Title will come first. I searched a lot but all the articles are related to leftBarButton. So can anyone please tell me, how to set both of them? ``` func methodForSettingButtonClicked() { let buttonSetting = UIButton(type: .custom) ...
2018/03/16
186
603
<issue_start>username_0: ``` import random import timeit data = [random.randint(-10,10) for i in range(10)] timeit.timeit('filter(lambda x : x>=0 ,"data")') ``` As shown in the code. if I try to remove the "" from "data", it would throw an error. Why? There is still a single quote containing the whole filter line. T...
2018/03/16
778
2,745
<issue_start>username_0: I have 3 tables: * **Emp** (Id(PK), Name) * **Address** (AddressId(PK), AddressType) * **EmpAddress** (EmpId(FK), AddresId(FK)) One employee may have multiple address. Sample data: **Emp** ``` 1 abc 2 pqr ``` **Address** ``` 1 a 2 b 3 c ``` **EmpAddress** ``` 1 1 1 2 1 3 ``` Here ...
2018/03/16
650
2,409
<issue_start>username_0: I use AutoCompleteTextView for suggesting data based on what I entered. I want to change the character color of text entered and show suggestions in a drop-down list. [![reference image](https://i.stack.imgur.com/YE6ip.png)](https://i.stack.imgur.com/YE6ip.png) How can I change the suggested...
2018/03/16
2,520
8,473
<issue_start>username_0: I have a hash which has many hash inside and the value may be an array and this array consist of many hashes, I wanted to print all key value pair, If values is array, then it has to print ``` "pageOfResults": "Array" # I don't want actual array here, I want the string "Array" to be printed. ...
2018/03/16
382
1,537
<issue_start>username_0: We are considering to use Yocto Build system for creating our own distro for our new project. We have one query: How does OS Update works in Yocto Build System. Suppose if I want to upgrade the following: 1. Bootloader ( u-boot ) 2. Kernel Image ( zImage/bzImage ) 3. Adding files in the roo...
2018/03/16
358
1,532
<issue_start>username_0: Suppose you are creating a service with the often-used example of `department` and `employee` resources. The endpoints for retrieving these might look like ``` /api/departments /api/employees?department=21 ``` Now suppose an iPhone client app wanted to use this service to show a big table of...
2018/03/16
262
1,099
<issue_start>username_0: I Have created a stored procedure to import a text file in sql database with a specific path, But my problem is the file that I am going to import in keep changing regularly, So I have to change the file name in procedure to import newly added file. I want a procedure to import new file without...