date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/14
444
1,770
<issue_start>username_0: I followed this tutorial to enable gitlab as a repository of docker images, then I executed docker push of the image and it is loaded in gitlab correctly. <http://clusterfrak.com/sysops/app_installs/gitlab_container_registry/> If I go to the Project registry option in Gitlab, the image appear...
2018/03/14
1,475
5,743
<issue_start>username_0: When I run `php artisan migrate`, I am getting an error like this: ``` In 2017_12_26_045926_create_table_articles.php line 41: Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting ',' or ')' ``` This is my **articles tables**: ``` public function up...
2018/03/14
4,472
17,572
<issue_start>username_0: **UPDATE**: The latest version of Intellij IDEA [implements](https://www.jetbrains.com/help/idea/tutorial-java-debugging-deep-dive.html#async_stacktraces) exactly what I'm looking for. The question is how to implement this outside of the IDE (so I can to dump async stack traces to log files), i...
2018/03/14
3,894
16,402
<issue_start>username_0: I am using Eclipse for RCP and RAP Developers (Oxygen). Upon opening palette it is empty. Even though I have my code in edit mode in the source tab. In the below image palette is empty As Suggested added the code below. On opening the Design tab, the palette is empty. ``` package com.jcg.rca...
2018/03/14
3,018
12,309
<issue_start>username_0: I'm having many buttons with the same id but different name.But I'm unable to get the name attribute value in `jquery` for a clicked button.I searched in StackOverflow and got many suggestions about my issue.But still, I'm unable to fix my problem. Anyone, please help. I'm giving only my `jque...
2018/03/14
1,051
5,392
<issue_start>username_0: I need to add a **Custom Header** in all my RestTemplate Client requests. So I implemented `ClientHttpRequestInterceptor`. And I add the interceptor in my `RestTemplateBuilder` config like shown below. The problem is that when the RestTemplate makes the HTTP call it throws following exception: ...
2018/03/14
551
2,205
<issue_start>username_0: I thought up an idea for a website that would involve some video editing happening on the web server. Microsoft UWP [has a library](https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/media-compositions-and-editing) that does the video editing functions I'm looking to perform... Am...
2018/03/14
735
2,667
<issue_start>username_0: I've been tasked with reading a text file and counting the wins of superbowl teams from 1967 to 1977. So far my program only prints the occurrences of each line and counts it as 1 because they all have different years attached to the team names. I don't know how to remove the years from the tea...
2018/03/14
389
1,515
<issue_start>username_0: I have a Drawer layout. I have placed a ViewPager for sliding Image and Tab Layout for dots, after I want a TextView and a ListView Again a TextView and again ListView, it goes for 4 times. So, I want my whole screen to be scroll-able. Here is the issue, if I am fixing the height of ListView ap...
2018/03/14
922
3,029
<issue_start>username_0: This is my dockerfile : ``` FROM node:6-onbuild RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app/ RUN npm install COPY . /usr/src/app ENV PORT 80 EXPOSE ${PORT} CMD [ "npm","run", "start" ] ``` and in package.json I do have this : ``` "scripts": { "start...
2018/03/14
487
1,552
<issue_start>username_0: How can I display 2 decimal places (padding) on a float even if the trailing number is a 0. So, if I sum only the :cost values in the example below I would like it to return 23.00 ```ruby items = [ {customer: "John", item: "Soup", cost:("%.2f"% 8.50)}, {customer: "Sarah", item: "Pasta...
2018/03/14
835
2,953
<issue_start>username_0: I am writing a simple Python program to store user inputted lap times in a list and then have a few functions performed on that list. My problem is, despite explicitly declaring the lap times as 'float' before appending them into the list, they are still getting stored as strings. This means ...
2018/03/14
323
1,039
<issue_start>username_0: My android studio project wasn't able to sync with the gradle, I got the following error: > > Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.0-beta1) from [com.android.support:design:26.0....
2018/03/14
1,900
7,028
<issue_start>username_0: I need to upload a large generated pdf file to the server and show uploading progress to the user. But the problem is the percentage I got from OutputStream is not the real progress because after 100% progress of OutputStream, still cannot get response code from the server (need to wait for mor...
2018/03/14
905
3,070
<issue_start>username_0: I am currently self-teaching myself C++ using Bjarne Stroustrup's book (2nd ed). In one of the examples, he uses a range-for-loop to read the elements in a vector. When I wrote and compiled the code for myself I get this warning. When I run the code, it seems to be working and calculates the me...
2018/03/14
3,611
10,643
<issue_start>username_0: Anyone that could help me out, much appreciated! ------------------------------------------------ I'd like this code to be as minimized as possible - however, I'd like it to display the exact same stuff. Specifically, on how to remove some of the repetitions made within the code (such as "if...
2018/03/14
1,132
3,385
<issue_start>username_0: Below is the response from my `API` ``` "attributes": { "original-data": "{\"name\":\"Foobarz\",\"updated_at\":\"2018-02-27 08:06:14 UTC\"}", "new-data": "{\"name\":\"Foobar\",\"updated_at\":\"2018-02-27 10:55:17 UTC\"}", "event-name": "update", "ip-address": "172.16.58.3", "user-agent": "Mo...
2018/03/14
989
3,083
<issue_start>username_0: I have a simple ellipse (red) and I want to rotate the ellipse. The following code only return flatten ellipse (blue) but it does not rotate: import tkinter as tk import numpy as np import math ``` def rotate(points, angle): new_points = list(points) rad = angle * (math.pi/180) ...
2018/03/14
508
1,962
<issue_start>username_0: ``` import java.util.Scanner; public class Box { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); int length; int width; int rectangle; // input and output here System.out.print("Input the width of the ...
2018/03/14
593
2,955
<issue_start>username_0: Is it wrong to use `notifyAll()` inside the loop in a multiple producer-consumer problem in Java? Here is the code snippet which I am talking about. ``` public void run() { while(producer_counter <= 64) { synchronized(list) { threadId1 = "Producer " + Th...
2018/03/14
566
1,848
<issue_start>username_0: I came across this piece of code in Underscore.js, I want to convert this to vanilla javascript. Any idea on how to do that ? ```js var makeLetters = function(word) { return _.map(word.split(''), function(character) { return { name: character, chosen: false }; }); } ``` This...
2018/03/14
690
2,801
<issue_start>username_0: I am having issues with Android Emulator since 7-8 days. At first it was not runing at all now reinstalling the emulator solved that issue but giving birth to new one. Whenever I run the emulator it takes alot of time, almost 5-6 minutes and then shows an error: `Cold Boot: Snapshot doesn't ex...
2018/03/14
1,541
4,495
<issue_start>username_0: I've been searching for a simpler way to do this, but i'm not sure what search parameters to use. I have a floating point number, that i would like to round, convert to a string, then specify a custom format on the string. I've read through the .format docs, but can't see if it's possible to do...
2018/03/14
907
3,286
<issue_start>username_0: Initially my table has no data and I get "No data available in table" which is the expected functionality. I'd like to have no text or row created as I will be populating the table via Ajax depending on user action. Is there a setting to stop the display of this row in the table? I can't seem...
2018/03/14
507
1,796
<issue_start>username_0: Code is working for first 3 but not for last 3. What can be possible reasons? ```js $(document).ready(function(){ $("section[class^='steps-']").hide(); }); ``` ```html Hidden ====== hidden ====== not hiding ========== not hiding ========== ```<issue_comment>username_1: The reas...
2018/03/14
638
1,947
<issue_start>username_0: In pd.Grouper we can group by time, for example using 10s ``` Time Count 10:05:03 2 10:05:04 3 10:05:05 4 10:05:11 3 10:05:12 4 ``` Will provide the result of: ``` Time Count 10:05:10 9 10:05:20 7 ``` --- I'm looking for the other way around. Can I group the time by cou...
2018/03/14
983
2,911
<issue_start>username_0: I have data below : ``` Array( [A] => Array ( [AA] => 10 ) [B] => Array ( [BA] => 5 [BB] => 1 [BC] => -2 ) [C] => Array ( [CA] =...
2018/03/14
1,413
5,937
<issue_start>username_0: I have the following class method for creating a Twig environment object. ``` public function getView($filename, array $customFunctions = null, array $customFunctionArgs = null, $debug = false) { $loader = new \Twig_...
2018/03/14
645
1,519
<issue_start>username_0: I have a dictionary that looks like: ``` the 117 to 77 . 77 , 56 a 47 is 46 and 41 that 39 ... ``` I wanted to divide each number in the dictionary by the max value.. so I did this: ``` count_values = (count.values()) newValues = [x / max(count_values) for x in count_values] ``` I want to...
2018/03/14
2,030
6,985
<issue_start>username_0: Why is this program not working? ``` available_toppings = ["mushrooms", "olives", "green peppers", "pepperoni", "pineapple", "extra cheese"] requested_toppings = ['mushrooms', 'olives', 'extra cheese'] if requested_toppings in available_toppings: for requested_topping in requested_toppin...
2018/03/14
217
727
<issue_start>username_0: For example we have: ``` name fruit ------------- bill apple bill orange lily apple emma orange ``` I only want to output a list of people who have apple as their ONLY attribute. so the list would only include Lily. How would I do that? Thanks guys!<issue_comment>username_1: You just need...
2018/03/14
819
3,223
<issue_start>username_0: I have next code. I am doing count to perform persist operation and fix transformations above. But I noticed that DAG and stages for 2 different count Jobs calls first persist twice (when I expect second persist method to be called in second count call) ``` val df = sparkSession.read .pa...
2018/03/14
310
1,245
<issue_start>username_0: In my work I have been told that need to use Fedora, I use vs code and when I want to update I got redirected to download a `.tar.gz` file. What is the right way to install the newer version?<issue_comment>username_1: I'm having the same issue on OpenSuse 42.3. I did locate an RPM which updated...
2018/03/14
1,291
4,669
<issue_start>username_0: I am trying to retrieve a single document from a firestore sub collection: database/users/uid/animal/docID I am able to get the docID parsed from another component successfully but I am struggling with retrieving the information to display in html: ``` import { Component, OnInit } from '@angu...
2018/03/14
448
1,528
<issue_start>username_0: I need to get **x, y values** of the each "**.spot**" element and **store into array or object**. This is what I have done so far. ``` function getPosition() { let loc = document.getElementsByClassName("spot"); for (let i = 0; i < loc.length; i++) { let offsets = loc[i].getBou...
2018/03/14
497
1,535
<issue_start>username_0: I'm working on core php,i need how to convert PHP array to Javascript array please help me,below the my example code this there please check it. I tried from long time to debug but not getting any leads. please help me in resolving this issue Here my php array data: ``` Array ( [0] => 00...
2018/03/14
686
2,457
<issue_start>username_0: I am trying to do a "Try-it yourself" editor but without using frames. So I added 2 textareas, one for code and one to show the result. I also added a "Run" button. I wrote the following function to execute the code in the first text area and show the result in the second text area: ``` funct...
2018/03/14
1,107
3,779
<issue_start>username_0: Is there a way to run a list of functions in a method from another method while skipping over 1 specified function in the list? For example, I have the contentList method: ``` def contentList(self): methods = [self.title, self.containerDIV, self.heading, self.stopSection, self.offlineSe...
2018/03/14
1,695
6,091
<issue_start>username_0: I am unable to stop a python script from running using `os.system()` but I am able to make it run with `os.system()`. When I run the same command on the terminal to kill the process, it works. I have this code snippet from my `web_plants.py` script to deploy it in html using Flask: ``` @app.r...
2018/03/14
1,093
3,629
<issue_start>username_0: I have using `jQuery` validation plug in for one of my forms. The validation rules are working fine. But my question is if validation success, after click submit button show gif loader. Can someone please point me in the right direction of how to get this to work? ```js $( "#myform" ).valida...
2018/03/14
642
2,602
<issue_start>username_0: if I call monthEndUpdate(); in my BankAccount class, in the setBalance line after it getBalance() gets the balance it adds getMonthlyFeesAndInterest() but in the BankAccount class getMonthlyFeesAndInterest is abstract. So would it do anything? Or would it go to the ChequingAccount class that ex...
2018/03/14
421
1,530
<issue_start>username_0: I set constraints for tabar but its image and title is showing like this only on iPhone X. Also, it is working properly on other devices like the 8, 6, and 5 series. It is not in proper format, Please suggest what I can do for it. ![image](https://i.stack.imgur.com/knn0V.jpg)<issue_comment>use...
2018/03/14
638
2,390
<issue_start>username_0: So I am a beginner to Java and while reading a book, and I had a question about polymorphism. It seems that there are two distinct meanings of polymorphism: one being the polymorphic nature of inheritance hierarchies (like type compatibility), and the other being choosing the right method to ca...
2018/03/14
610
2,434
<issue_start>username_0: While searching for something else, I found this code ``` $x = "foo"; function foo(){ echo "wtf"; } $x(); # "wtf" ``` and when I searched google for this, I got only C results not PHP, while I know that under the PHP hood is C, I would really like some explanation about that. What is...
2018/03/14
1,040
3,665
<issue_start>username_0: I have written code for multi window form but there is an error shown in image [![enter image description here](https://i.stack.imgur.com/U4UnY.png)](https://i.stack.imgur.com/U4UnY.png) i am new to JavaScript can you please help me, ask me anything you need besides from this ``` function fix...
2018/03/14
936
3,152
<issue_start>username_0: My script I have been writing has been working great. I just added the option so it would open a profile on chrome using this code. ``` options = webdriver.ChromeOptions browser = webdriver.Chrome(executable_path=r"C:\Users\princess\AppData\Local\Programs\Python\Python36-32\chromedriver.exe", ...
2018/03/14
5,289
26,755
<issue_start>username_0: I'm working with a webRCT project. I'm Using Janus webRtc gateway video room function and a RestAPI + Mysql database to handle camera details and AngularJs to stream video and and a client application to capture videos. I've created a HomeController.js to handle camera details. and a janusCont...
2018/03/14
220
961
<issue_start>username_0: I have released my app on Google play store open beta testing channel 2 days before.It is visible to users,but some devices shows purchase options dialog even it is free app.Uninstall old app cache also not works.<issue_comment>username_1: This sounds like a bug. If you can reproduce it on a de...
2018/03/14
1,052
2,554
<issue_start>username_0: I wrote this code but only works at first operation for example 1 2 + and it prints 3 as result but I need to give it an expression like this: 1 2 + 3 4 - \* and it must have to return the value 3. Instead of that, my code prints 2115. ``` #include #include #include using namespace std; int...
2018/03/14
1,090
2,684
<issue_start>username_0: I have to create a regular expression which, for a given string s, captures the trimmed version of s into group 1. That is, for any string s, calling str\_replace(s, re1, "\1") should produce the same output as str\_trim(s). This is what I have to pass as the test case. I'm not sure where to be...
2018/03/14
533
1,422
<issue_start>username_0: On my return response i am getting `start_time` like `10:00:00` in 24 hours format.I want to convert it in to two variables on `var a ="10:00"` and on `var b = "PM"` i tried it several times but not succeed. How can i do this. Code on my php function : ``` $time = $actData->start_time; // 14:...
2018/03/14
642
2,550
<issue_start>username_0: I have a Multi branch pipeline project in Jenkins. I want to disable a branch while it is listed in pipeline project. I can add an exception to surpass scm triggering. But I want to disable all the triggering including manual triggering. If I used "Disable this project" under "Build triggers" i...
2018/03/14
1,084
3,193
<issue_start>username_0: I am new to gstreamer, I want to record both audio and video save it into .mp4 format, Recording video using webcam and audio using MIC Here this is my pipeline > > gst-launch-1.0 -e v4l2src ! queue ! x264enc ! h264parse ! queue ! qtmux0. alsasrc ! 'audio/x-raw,rate=44100,depth=24' ! audiocon...
2018/03/14
1,222
3,246
<issue_start>username_0: I have a file like this ``` name AD01392 AV93289 AG98023 A723928 xyb323 232 3232 8992 3278 xyb897 343 434 344 3434 xyvg87 439 3434 2434 43434 ``` I need to extract the information in this file to 4 separate files that extract column 1 and iterate over columns ...
2018/03/14
923
3,132
<issue_start>username_0: I have read <https://developers.google.com/admob/android/quick-start?hl=en-US#import_the_mobile_ads_sdk> I need to initialize MobileAds using Code A in order to display AdMob AD. I have some activities which need to display ADs, do I need to add code A in my all activities? And more, why can...
2018/03/14
810
2,811
<issue_start>username_0: I have a table called total\_table in which the sum of the amount which has spent by a user will be stored, but every time when a new data enters it will create duplicate values to total table. [![Here is my total table](https://i.stack.imgur.com/7OsSy.png)](https://i.stack.imgur.com/7OsSy.png...
2018/03/14
988
3,339
<issue_start>username_0: I am using `fromHtml` to display formatted text (bold italic etc) in `TextView`. However, I found it's behaviour is different on JellyBean (4.1.2) and KitKat(4.4.2) Here is code: ``` String myHtml = "**hello**😄"; Spanned spanned = Html.fromHtml(myHtml, null, null); ``` Here html st...
2018/03/14
3,982
11,513
<issue_start>username_0: Consider: [![Enter image description here](https://i.stack.imgur.com/s00Uy.png)](https://i.stack.imgur.com/s00Uy.png) I am trying to find the area of an n-interesting polygon, where (n=1, A=1, n=2, A=5, n=3, A=13, n=4, A=25, and so on). So the formula for an n-interesting polygon is the area ...
2018/03/14
3,988
11,746
<issue_start>username_0: This code working fine. It throws errors and displayed to the webpage. But now i want to pick individual errors and display to the webpage. ``` // request.body validation req.checkBody('email', 'Email is required.').notEmpty(); req.checkBody('name', 'Name is required.').notEmpty(); r...
2018/03/14
3,784
11,006
<issue_start>username_0: Unable to show hint in edit text view when using `inputtype = textWebPassword` in layout.<issue_comment>username_1: I found the formula without the recursion. The test went through fine. ``` def shapeArea(n): if n>=10**4 or n<1: return False return (n**2+(n-1)**2) ``` Upvotes...
2018/03/14
458
1,544
<issue_start>username_0: I'm trying to pass arguments into a mongo query - if I type the literal, it works fine, however, when I try to replace the literal with the variable (argument), it fails imagine a data set with "things" ``` {"thing": {"name":"book","label":"Bobs"}} {"thing": {"name":"blanket","label":"Bobs"},...
2018/03/14
601
2,272
<issue_start>username_0: I'm trying to make a game with react native and I want to show a different options when i change the picker value. basically when I select the first option on the picker a component has to appear and when I select the second one another component. I tried this function but not working ``` pi...
2018/03/14
1,240
4,742
<issue_start>username_0: I encountered the Unsupported Image Type error due to an incompatible colour profile using `com.sun.imageio.plugins.jpeg.JPEGImageReader`. I later found the TwelveMonkeys plugins that are proven to fix this issue and have referenced the dependent .jars in my project classpath. I downloaded them...
2018/03/14
657
2,586
<issue_start>username_0: I'm trying to code a function that will enable me to change the console color quicker. It would be something like: ``` public static void setColor(string color) { Console.ForegroundColor = ConsoleColor.color; } ``` and then instead of typing out the middle part I would be abl...
2018/03/14
1,097
4,946
<issue_start>username_0: Imagine a situation when the application layer opens a new transaction and you want to perform 2 repository operations under this transaction. Let's say I want to add a new User with IUserRepository and afterwards save all events that were generated during User domain model state change. I open...
2018/03/14
975
4,174
<issue_start>username_0: I'm trying to find the correct regex to search a file for **double quoted numbers separated by a comma**. For example I'm trying to find `"27,422,734"` and then replace it in a text editor to correct the comma to be every 4 numbers so the end result would be `"2742,2734"` I've tried a few exam...
2018/03/14
437
1,590
<issue_start>username_0: I am trying to fetch equal number of records from 4 different clients from the same table in db2 database. I need to ensure that each sql fetches distinct set of rows with equal volume. the table has a 18 digit number as a primary key generated randomly. how do I ensure that the record getting ...
2018/03/14
413
1,300
<issue_start>username_0: Using jquery can click based on class and id attributes but can click be invoked based on ref attribute ? I've based below code on `ref="btFirst"`, but unsure how to access `ref`. [JSFiddle](http://jsfiddle.net/5DfUy/297/) src: ``` First $( ".btFirst" ).click(function() { alert( "Handler...
2018/03/14
625
2,226
<issue_start>username_0: I'm writing a Software that has the following flow: ``` Promise.resolve(updateMongoStatus) .then(unzipFilesFromS3) .then(phase4) //example .then(phase5) //example .then(processSomething) .catch(saveErrorToMongo) ``` And I would like to know if it's ok to pass data around from the f...
2018/03/14
656
1,803
<issue_start>username_0: i made a program to calculate multiples of 5 between two numbers, when ask for de second numbers the program didn't work normally. ``` #include int main() { int A, B, cont; printf("\n"); printf("Indique el dominio de los numeros en los que desa saber cuales son multiplos de 5\n"); pr...
2018/03/14
1,304
3,784
<issue_start>username_0: I have a *Objects of an array of objects* as given below. I am trying to filter out each object within the array where is **quantity is greater than 0** and drop it in a new variable. So via `lodash` I tried to use `_.filter` within `_.(myArr).forEach`. But this always returns an empty array. T...
2018/03/14
183
522
<issue_start>username_0: How to reverse an `integer array` in swift eg: `var ab = [1,2,3,4]` I want to store the array in reverse format. The result should be ``` ab = [4,3,2,1] ```<issue_comment>username_1: use ab.reversed() function which returns a reversed array. Upvotes: 4 [selected_answer]<issue_comment>usern...
2018/03/14
498
1,453
<issue_start>username_0: I wnat to test a field with multiple values against single value, my SQL is like . ```html WHERE id (1); ``` Database values are like ```html id --- 1,2 2,3 1,3,4 ``` codeigniter ```html $this->db->select('*'); $this->db->from('content'); $this->db->where('name', $name); $this->d...
2018/03/14
686
2,097
<issue_start>username_0: I was just testing my code in play ground(xcode-8.2), using swift tutorial. I came across following sample code: [One-Sided Ranges](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/BasicOperators.html#//apple_ref/doc/uid/TP40014097-CH6-ID60)...
2018/03/14
702
2,016
<issue_start>username_0: My code is as shown below: xyz.html ``` ``` xyz.css ``` .home-container { width: 100vw; height: 100vh; overflow-y: scroll; background: #fcfcfc; } .home-container .menu-main { width: 43%; height:3000px; position: absolute; background-color: red; left: 30...
2018/03/14
949
3,293
<issue_start>username_0: I want to send following data to server. It contains JsonArray of JsonObjects as shown below. ``` { "users":[ {"user-1":{ "Name":"Amit", "Age":"32", "Gender":"male", "Hobby":"Cricket" } "user-2":{ "Name":"S...
2018/03/14
649
2,262
<issue_start>username_0: I'm trying to use getters and setters to adjust data initially set with a class constructor. The getter seems to work: ``` class myClass { constructor(sth) { this.data = { sth, timestamp: new Date() } } create(createData) { const newData = Object.assign({}, this....
2018/03/14
755
3,017
<issue_start>username_0: I have a C++ project in which comments of source code are in Chinese language, now I want to convert them into English. I tried to solve using google translator but got an Issue: Whole CPP files or header didn't get converted, also I have found the name of the struct, class etc gets changed. So...
2018/03/14
906
3,233
<issue_start>username_0: I am not able to use localhost with xamarin.android application. I have executed Web project & Service project(not mobile app) on Chrome Browser. [![This is emulators executed project](https://i.stack.imgur.com/6CLaz.png)](https://i.stack.imgur.com/6CLaz.png) The displayed port number I tried...
2018/03/14
777
2,822
<issue_start>username_0: there are different conditions for same design file. i can't use if-else in same class file to differentiate them. because manage all conditions are difficult. is there any way to change class at dynamic time.<issue_comment>username_1: Open your solution folder. You might have several projects ...
2018/03/14
208
891
<issue_start>username_0: I have a network application which uses Vxworks TCP stack. Here if we have network loop in network. I am aware of network loop causes broad cast storm. How do I detect this programmatically? Thanks for the help<issue_comment>username_1: You can't (really). Your application using TCP is above l...
2018/03/14
461
1,471
<issue_start>username_0: I have this code but it displays first 3 letters of month in english. How can I change it to spanish? ``` if (secondsPast > 86400) { var date = new Date(timestamp); var currentDate = new Date(now); var day = date.getDate(); var month = date.toDateString().match(/ [a-zA-Z]*/)[0]...
2018/03/14
346
1,137
<issue_start>username_0: [![The text Kasparov and 1 written somewhat above to it](https://i.stack.imgur.com/Fl9fF.png)](https://i.stack.imgur.com/Fl9fF.png) How do I format this in a HTML page? What is the tag for it? I don’t know how to get this 1 written above the text.<issue_comment>username_1: Probably the elemen...
2018/03/14
571
1,797
<issue_start>username_0: I want to understand how arithmetic operation happen on different data type, ``` #include #include #include using namespace std; void newprintf(int, int, long, char \*); int main() { int i = 22; newprintf(14, 30, (long) i, "9,999"); getch(); return 0; } void newprintf(int r, int c, lo...
2018/03/14
448
1,464
<issue_start>username_0: I am familiar with the usual mod result but not for negative numbers. What is the logic?<issue_comment>username_1: Taken from <https://docs.python.org/3/reference/expressions.html> > > The % (modulo) operator yields the remainder from the division of the first argument by the second. The nume...
2018/03/14
792
2,818
<issue_start>username_0: In .Net Core, you can PInvoke with [DllImport], But if you want to dynamically load and map native api calls, DllImport doesn't solve the problem. On windows we handled this with a DllImport to LoadModule. Then you could use GetProcAddress to map an address to a delegate which you could then...
2018/03/14
549
1,725
<issue_start>username_0: I have an Object containing multiple arrays like this ``` someObj = { array1:['a', 'b'], array2:['a', 'b', 'c'], array3:['a', 'b', 'c', 'd'] } ``` Is there any built-in method or property in JS/ES6 which returns the largest array or length of the largest array? Please suggest<iss...
2018/03/14
1,879
4,612
<issue_start>username_0: The data I want to insert into the database likes this: ``` datalist =[['2012', '1', '3', '1', '832.0', '261.0', '100.00'], ['2012', '1', '5', '1', '507.0', '193.0', '92.50'], ['2012', '2', '3', '1', '412.0', '200.0', '95.00'], ['2012', '2', '5', '1', '560.0...
2018/03/14
1,064
2,981
<issue_start>username_0: ``` execute 'install_insatller' do cwd "abc" command reg_cmd ignore_failure true log 'STDERROR' only_if { ::File.exist?('abc') } end ``` this is just an expample code I want to print the log message only if the failure occurs else continue the installation.<issue_comment>username_1...
2018/03/14
256
995
<issue_start>username_0: For some reason, the following form will not make a post request when it gets submitted: ``` Hospital Patient Scenario ``` This form; however, is in the same project, and it works: ``` Username: Password: ``` Why is the first form not making a post request on submit? To provide m...
2018/03/14
1,293
2,227
<issue_start>username_0: I have written a for loop to display names in python idle as shown below. ``` 1.SRA-D12-TY2-2017WW22.4.129 2.SRA-D12-TY2-2017WW27.5.168 3.SRA-D12-TY2-2017WW16.5.92 4.SRA-D12-TY2-2017WW20.2.115 5.SRA-D12-TY2-2017WW25.2.149 6.SRA-D12-TY2-2017WW29.5.188 7.SRA-D12-TY2-2017WW36.1.234 8.SRA-D12-TY2-...
2018/03/14
1,048
3,756
<issue_start>username_0: Consider a scenario, I have a function "REFRESH TOKEN", this function is called by different methods simultaneously, let's say the methods are "A", "B", "C". If method "A" calls "REFRESH TOKEN" firstly then methods "B" and "C" should wait until it finishes. Does anybody have a sample swift c...
2018/03/14
2,727
10,214
<issue_start>username_0: I'm learning web.api from asp.net. The problem is, my delete and put method not working right now. I think there's something wrong with my code :\* **Here's my controller for delete:** ``` [ResponseType(typeof(Location))] public IHttpActionResult DeleteLocation(Guid id) { ...
2018/03/14
1,014
3,408
<issue_start>username_0: We have the following code: ``` public class A { protected virtual void Method() { Console.Write("A"); } } public class B : A { protected override void Method() { Console.Write("B"); } } public class C : B { public void Some() { ...
2018/03/14
765
2,170
<issue_start>username_0: I am wondering what should I use in SQL Server 2016 or 2017 (CTE, LOOP, JOINS, CURSOR, REPLACE, etc) to match (replace) **every value** in **every row** in temp table? What is the best solution from **performance perspective**? Source Table ------------ ``` |id |id2| | 1 | 2 | | 2 | 1 | ...
2018/03/14
405
1,459
<issue_start>username_0: It seems there is no difference between intializing a char with 0 and '\0' in generated binary code in C. If so, why do we have '\0' in C and not just 0 for ending string?<issue_comment>username_1: The only thing I can think of is readability, as `'\0'` is a better indication to people who read...
2018/03/14
426
1,431
<issue_start>username_0: I am using PrimeNG Quill `p-editor` in angular. By default, quill trimmed extra space. How can I preserve the extra space in editor in quill? E.g. - model binding property - text = " Hi I am Angular" Output in editor - "Hi I am Angular" expected in editor - " Hi I am Angular" --- Example o...
2018/03/14
745
2,074
<issue_start>username_0: I am using this syntax for date format in codeigniter model ``` $this->db->where(DATE_FORMAT(`RD`.`CREATED_TS =`,'%Y-%m-%d'), $from); $this->db->where(DATE_FORMAT(`RD`.`CREATED_TS =`,'%Y-%m-%d'), $to); ``` but it returns this error ``` Message: date_format() expects parameter 1 to be Da...
2018/03/14
895
2,721
<issue_start>username_0: Below is my JSON array and I want to find if `contact` array has specific value or not. ``` data = [ { _id: 5a67294923aba20014e2fe5a, customerLocation: '473 Victoria St, Singapore 198371', customerName: 'UNIVERSAL', id: 'UNI3L2', customerType:...
2018/03/14
2,394
8,435
<issue_start>username_0: I have an Object ArrayList and I need to use the **toString()** method of the *Motor* object, which is a parameter of the *Vehicle* object. My vehicle objects are in an ArrayList which is iterated through with a for-loop (I know a foreach loop would be easier, but this is part of the assignment...