date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/03
475
1,666
<issue_start>username_0: prints a list of files in a given directory, filtered by the extension of the files. The first argument will be the path to the directory we want to filter on, and the second argument, the type of the file that we need to print, we must use readdir function . like running this: ``` node file...
2018/03/03
556
1,740
<issue_start>username_0: Could use some help here. I have dug around and having trouble locating a string due to the special characters I have to pass through. Trying to capture any number that would be where the "258" is the following string: "**.value), 258, '0')**" The below is what I am looking for as the string ...
2018/03/03
774
2,532
<issue_start>username_0: I have an array of objects to loop through, and one public property keeps causing a notice error for CodeIgniter. From what I read, 'state' is not a reserved word in PHP. Part of the object dump ``` array (size=1) 0 => object(stdClass)[15] public 'ID' => int 107292435 (length=9) ...
2018/03/03
750
3,083
<issue_start>username_0: I want to know how erlang's VM preempts the running code and contexts the stack. How it can be done in a language such as c?<issue_comment>username_1: All code of Erlang will compile to operation code of Erlang's VM. Erlang's VM execute Erlang's operation code by OS's threads which are created ...
2018/03/03
1,817
6,925
<issue_start>username_0: What's the main point of Normalization? I mean if a normal form is not in 2NF, it is because of partial dependency i.e. a non key attribute is dependent on a part of a candidate key. So, let's say, for a relation R(A,B,C) with FDs: ``` AB->C, B->C ``` Clearly, AB is the candidate key and `...
2018/03/03
1,549
5,901
<issue_start>username_0: I am learning C, and I came across this problem I can't figure it out. Write a function that computes the element of an integer array `a` plus 6 modulus 10 and store the result in array `b`. For example, if 5 is the second element of array `a`, then the second element of array `b` should be `(5...
2018/03/03
562
2,096
<issue_start>username_0: Trying to enable letsencrypt with web2py. As part of that I may need to create a route for a url like `www.example.com/.well-known/acme-challenge/` As I test this I notice that the following route works: ``` ('/\.well-known/acme-challenge/test.html', '/some_app/static/well-known/acme-challen...
2018/03/03
674
2,488
<issue_start>username_0: I have a load-balanced service running in a Kubernetes cluster on the Google Cloud Platform. The individual servers expose some debugging information via a particular URL path. I would like to be able to access those individual server URLs, otherwise I just get whichever server the load balance...
2018/03/03
377
1,326
<issue_start>username_0: I want to populate a table using jQuery. I have an array of strings and when I click a button to run a function, I'd like to use that array to populate the table. The first time I click the button, it works perfectly, but when I call the function a second time, the rows are duplicated :/ (The t...
2018/03/03
1,046
3,285
<issue_start>username_0: So, let's say I have an HTML form like this: ``` ``` And I want to get a JavaScript array that matches the values of `real`. For example: ``` // If there was a sweet function for this... var people = getFormDataByInputName( 'people' ); // Value of `people` is... // [ // { // 'fir...
2018/03/03
598
1,999
<issue_start>username_0: I seem to be having an issue with an error catch that I'm trying to implement in my code. Basically, if somebody writes something out of the scope from the range, I want my error message to show up. Otherwise, it'll just continue on with the program. Here's the code. ``` n = 10 while True: ...
2018/03/03
1,151
3,224
<issue_start>username_0: Essentially, I need to create a new list of lists from a value list that maps to another interval list. Some of these values actually fall in the range of two sublists in the intervals. For instance, 25 falls between [0,30] and between [20,55]. However an integer value such as 91 only falls in ...
2018/03/03
1,103
4,255
<issue_start>username_0: I may be doing something really stupid, but I've been using plotly offline in my jupyter notebook using ``` import plotly.offline as py py.init_notebook_mode(connected=True) from plotly.graph_objs import * ``` I'm trying to display a sequence of images that can be navigated with a slider. T...
2018/03/03
786
2,545
<issue_start>username_0: I have two datasets with a common key column and I want to perform left join operation. Is there any corresponding function in apache beam that performs the left join operation in apache beam ?<issue_comment>username_1: There is a small library of joins available in Beam Java SDK, see if the im...
2018/03/03
1,642
4,440
<issue_start>username_0: How can I calculate salary base on total Hours? I have two tables and a query that will compute the total hours per day. Table `officer_timelogs` ``` employee_id record_time Day type -------------------------------------------------------- 125 2018-02-27 18:03:31...
2018/03/03
1,823
5,624
<issue_start>username_0: I'm trying to query my post table to display in the front-end via ajax. This is my query: ``` [HttpGet] public JsonResult GetGalleryLocations() { var data = _context.Posts .Include(c => c.Category) .ToList(); return Json(data); } ``` Then in my front-end, I get it lik...
2018/03/03
615
2,553
<issue_start>username_0: Previously i was using Microsoft state service to maintain user state in my bot. Now that Microsoft has stopped supporting state service, i have written a static object to store user data as shown below. Just wanted to know is this a right approach to maintain user state because at once around ...
2018/03/03
2,084
7,922
<issue_start>username_0: I was wondering if someone can help me with a normalisation issue I am facing, when trying to create a seperate communication table, for a personal project I am working on. Lets say I have the following tables and table columns: --- **Table A:** Table\_A\_Id, Date, Name, Agent\_Id (FK), Note...
2018/03/03
796
2,116
<issue_start>username_0: I am quite new to Python. I have a data frame like the following ``` book 1 book 2 book 3 user 1 0.05 0.47 0.09 user 2 0.3 0.01 0.35 ``` I want it to be ranked based on the values(descending order) and the output to be the following: ``` ...
2018/03/03
1,090
4,379
<issue_start>username_0: My question may be simple, but I've poured through a considerable amount of sources and still stuck. In my ER model (order, ship, callcenter processes), I have several entities that contain various date fields, such as: call date, order date, payment date, shipping date. So as I do my dimensio...
2018/03/03
1,535
5,428
<issue_start>username_0: I'm trying to write a function that takes an input. If that input can be directly piped to a stream (such as with `std::cout <<`), it returns the input unchanged. Otherwise, it attempts to convert the input into a string, and returns the string. I have the following code: ``` //Uses SFINAE t...
2018/03/03
2,066
7,678
<issue_start>username_0: For a university research project I am retrieving data from WRDS via SAS and am relatively new to SAS. I am trying to retrieve data in a specific interval provided by WRDS which actually works very for me; the structure is as follows ``` [1]Define some macro variable [2]Use data step view [3]M...
2018/03/03
563
1,887
<issue_start>username_0: I know my site sucks, but that's not my issue right now. This is just a school assignment page. My problem is that when actually viewing my site in mobile view, the styling isn't responding correctly. There's suppose to be a hamburger menu in place of the nav bar when in mobile view. Can anyone...
2018/03/03
362
930
<issue_start>username_0: Is there a function for rollmin in the same way rollmean and rollmax work from the zoo package? I've looked into the zoo help document but can't find anything.<issue_comment>username_1: We can use `roll_min` from `library(RcppRoll)` the usage is > > roll\_min(x, n = 1L, weights = NULL, by = 1...
2018/03/03
319
1,029
<issue_start>username_0: I'm trying to put a Ionic icon right to text and keep them centered vertically but I'm not able to do that. I'm trying to align the content inside `avg-rating` using flex layout like this: ``` ![](assets/imgs/restaurant.jpeg) Title 4,5/10 ------ ``` And this is my SASS: ``` .avg-ratin...
2018/03/03
250
755
<issue_start>username_0: If I have 2 sentences: ``` String code1 = "XXXji X9 XX22 Xs dXXXd i l9XX bXX45."; String code2 = "hello my name is david i like bread."; ``` Basically, one scrambled and one not (each word has the same number of characters) How would I conclude this: ``` String answer = "XXXlo Xy XXme Xs ...
2018/03/03
650
2,126
<issue_start>username_0: I'm writing a Python exercise that calculates an average from 3 of your school subjects. After the average is calculated I want the program to find subjects that have less than 70 and print "You could improve in 'x' subject". I know I could do it this way and write it out with specific `if sta...
2018/03/03
453
1,811
<issue_start>username_0: I am trying to do an ajax call using fetch. The database is ran through mongo and when using dummy data from a .json file, the map works correctly when decks: [], it gives the error. ``` class Home extends Component { constructor(props) { super(props); this.state = { ...
2018/03/03
737
2,602
<issue_start>username_0: ``` var roles = { Guest: ["CAN_REGISTER"], Player: ["CAN_LOGIN", "CAN_CHAT"], Admin: ["CAN_KICK", "CAN_LOGIN", "CAN_CHAT"] }; ``` that is my object and I am trying to check if the user has specific perms ``` get_perms: function(player, perm) { let arrayLength = accounts.lengt...
2018/03/03
799
2,243
<issue_start>username_0: So I am trying to assign a string from an array to a variable and use it in a function. The string should be `"n02504458"`. Let me explain. Here is the original array: ``` ('Predicted:', [ (u'n02504458', u'African_elephant', 0.99588591), (u'n01871265', u'tusker', 0.004068926), (u'...
2018/03/03
1,233
4,870
<issue_start>username_0: I have a `UITableView` with varying labels length in each row, so in my `viewDidLoad` I include this code to resize the table view row automatically according to its content: ``` tableView.rowHeight = UITableViewAutomaticDimension tableView.estimatedRowHeight = 100 ``` With a fixed number of...
2018/03/03
275
1,232
<issue_start>username_0: Suppose `ComponentA` is displayed in the and the user navigates such that `ComponentB` is displayed in the same `>. Is the `ComponentA` instance then destroyed such that a new instance of `ComponentA` is created if the user navigates back to `ComponentA` again?` If `ComponentA` implements `O...
2018/03/03
696
3,106
<issue_start>username_0: I tried this(<https://stackoverflow.com/a/14172067/7482204>) method but I can't seem to figure out how I will call the method with the class name as a return type. Item.cs: ``` class Item { public Item GetItem(string parameter) { Item itemObj = new Item(); string que...
2018/03/03
839
2,294
<issue_start>username_0: Assuming I have an array ``` let arr = [ [0,1,0,4], [1,0,1,2], [0,0,1,1], [0,1,0,1] ]; ``` I want to loop through the array with a higher order array function, and return an array where all values that are not equal to `n` (in my case let's say `n=0`) will be stacked against ...
2018/03/03
444
1,558
<issue_start>username_0: I am trying to create the docker image of an app that was developed in Go. I have the binary called myapp, and if I execute it then it work correctly, I execute it with: ``` ./myapp ``` Then, take that bin and put it alone in a directory called `mydirectory` and inside I put this dockerfile:...
2018/03/03
3,289
7,728
<issue_start>username_0: Is it possible to create a RSA-SHA1 signature with a X509-certificate stored in Azure Key Vault? [non-repudiation certificate] Unfortunately, I can't change the hash-algorithm to SHA256 or something safer, and I really need to store the certficate in Azure Key Vault as Key. So far I've tried...
2018/03/03
1,087
3,921
<issue_start>username_0: How can I add component dynamically? **toolbar.component.ts:** ``` @Component({ selector: 'app-toolbar', template: 'Add Text component' }) export class ToolbarComponent { constructor() { } } ``` **section.component.ts:** ``` @Component({ selector: 'div[app-type=section]', te...
2018/03/03
382
1,551
<issue_start>username_0: I installed tensorflow following the instructions on their site, but when I try to run `import tensorflow as tf` I get the following error: `Illegal instruction (core dumped)`. I tried this with the CPU and GPU versions, using Virtualenv and "native" pip, but the same error occurs in every case...
2018/03/03
986
2,989
<issue_start>username_0: I've been using css for a little bit now. I tried this code, but the div with the id "backInvis" is a image. ```css #PageOne { background-color: #230f2e; } #PageTwo { background-color: #2e0f29; } #PageThree { background-color: #140f2e; } #backInvis { z-index: -5; opa...
2018/03/03
441
1,543
<issue_start>username_0: I couldn't figure out how the program works so I ran it on the computer and got the output: ``` the sum of 5 to 4 is 10 ``` I do not understand how `nMax` is passed into the `sumInts` function (empty parameters) during function call however the value of `n` is taken from the global variable...
2018/03/03
546
1,893
<issue_start>username_0: I'm trying to figure out the difference between url-loader vs file-loader. What does `DataURl` mean? > > The url-loader works like the file-loader, but can return a DataURL if > the file is smaller than a byte limit. > > ><issue_comment>username_1: `url-loader` will encode files to base64 ...
2018/03/03
332
1,073
<issue_start>username_0: let's say we have a function like this. ``` def do_smth(): x = get_x() if x is None: return False y = get_y(x) if y is None: return False do_smth_else(x,y) def do_smth_else(x,y) .... ``` This works just fine, but I'm not big fan of this ...
2018/03/03
1,335
5,198
<issue_start>username_0: I call this my "**Battle of the Nulls**", for I have struggled with this issue for years now. I have a large table (250,000+ rows, 100+ columns) named `People`, and another called `Stuff`, which may or may not contain a corresponding record. There are three columns which I can use to find poss...
2018/03/03
1,364
4,196
<issue_start>username_0: I have the credentials of a **TARGET** website database and SQLMap Claims that you can connect to the database directly Here are my Commands on SQLMap in Kali Linux ``` sudo sqlmap -d mysql://USER:PASSWORD@TARGET_IP:MySQL_Port/DATABASE ``` example ``` sudo sqlmap -d mysql://admin:12345@172....
2018/03/03
1,834
5,624
<issue_start>username_0: I'm attempting to print a string from a linked list..for some reason it is outputting random symbols and characters. Here is my code: ``` int main(){ char c; int titleCount; int authorCount; char bookTitle[35]; char author[35]; /* Create Struct */ typedef struct bookData{ char bookTitle[35]...
2018/03/03
1,679
5,198
<issue_start>username_0: I'm learning named pipes in Linux and write the following program to try it out. The following program creates a FIFO special file named "test.fifo", then it creates two child processes to read and write from that named pipe. ``` #include #include #include #include #include int main() {...
2018/03/03
1,224
3,784
<issue_start>username_0: The swap function in my sortArray function doesn't seem to work properly. Error is: `No viable overloaded operator[] for type 'string *' (aka 'basic_string, allocator > \*')`. I managed to find the item that goes first in the output, but now I just need a bit of help getting the rest of the u...
2018/03/03
897
2,881
<issue_start>username_0: I designed a template-based web page: [Website](http://www.citricosamatlan.com.mx) Whenever a page is loading there's a horrible brown circle (with transparency) that appears in the front and it shouldn't. The only thing my template service provider allows me in the code is to include CSS. So...
2018/03/03
468
1,579
<issue_start>username_0: As gradle 4.6 supports JUnit 5 with following configuration. ``` test { useJUnitPlatform() } ``` It seems like the old way to change testinstance lifecycle doesn't work. ``` junitPlatform { // ... configurationParameter 'junit.jupiter.conditions.deactivate', '*' configuratio...
2018/03/03
243
900
<issue_start>username_0: I am trying to fit the `fullcalendar` to the size of screen. I tried using `css` styling but it is making it is not dynamic. Any other way where the size of `fullcalendar` will `resize` itself when user zooms in/out or the zoom % has no effect on `fullcalendar` size.<issue_comment>username_1: `...
2018/03/03
739
2,277
<issue_start>username_0: this code outputs: ``` i is 1 j is 1 i is 2 j is 1 i is 2 j is 2 ``` among other things but the question I have pertains to the beginning of it. My question is as you can see in the second output line, `i` is 2, but `j`is still 1. Why are they both not 2? The bodies of the outer and i...
2018/03/03
812
3,001
<issue_start>username_0: I have a terrible misunderstanding with promises in nodejs. I have a function in a module to convert CSV to JSON: ``` const URL_01 = `${__dirname}/URL/some_CSV.csv`; const fs = require('fs'), Converter = require('csvtojson').Converter, converter = new Converter({}), convertToJson = fun...
2018/03/03
808
3,144
<issue_start>username_0: I tried to pass the results of an ajax .done() query to an object or variable outside of the .done function. Unfortunately, it seems impossible to read the variable outside of the function because every time I try to pass it to a global variable it get's the value "undefined". When I alert the ...
2018/03/03
781
2,848
<issue_start>username_0: I would like if the data is different from USA, `d.pais`! = "USA" the data is omitted. I would like if the data is different from USA, d.pais! = "USA" the data is omitted. and that the circle is not created. How can I do it? ``` d3.selectAll("circle").remove(); g.selectAll("circle") ...
2018/03/03
1,318
4,744
<issue_start>username_0: I am creating my first project using asp.net MVC - I have successfully connected to the database and displayed the information on the index page. My question is how do I get more than one query result on the one index page for e.g ``` SELECT student ID,first name,surname FROM STUDENT Notes ...
2018/03/03
345
1,419
<issue_start>username_0: I'm new in networking and passionate in learning more about SDN and OpenFlow Network. After some searching on the internet, I've found that there's an emulator software called "Mininet". I hear that this software supports simulation of switch better than GNS3. Now, my problem is where can I use...
2018/03/03
409
1,470
<issue_start>username_0: ``` List rateList = guestList.stream() .map(guest -> buildRate(ageRate, guestRate, guest)) .collect(Collectors.toList()); class Rate { protected int index; protected AgeRate ageRate; protected GuestRate guestRate; protected int age; } ``` In the above code, is it possible to pass in...
2018/03/03
336
1,222
<issue_start>username_0: I have a ragged list of place names e.g. ``` place District1 / Commune2 / Village3 Region1 / District2 District3 / Commune1 / Village1 / Farm1 ``` So we have place names at different levels of resolution. I want to extract the las...
2018/03/03
296
1,055
<issue_start>username_0: Is it possible to perform a for loop in a template in bazel using the actions.expand\_template() call? I'd like to be able to pass in a list of strings and iterate over them to generate code. From all I can tell in the examples, you can only provide a flat dict object and perform single substi...
2018/03/03
786
2,774
<issue_start>username_0: I'm trying to collect serial data from multiple devices, timestamp and export it to a .csv file. I want to write separate modules for each device such that they return the data to the main module and all the writing to csv is done in that. The following program writes date and time to csv but...
2018/03/03
504
2,286
<issue_start>username_0: My Java has this ``` @Value("#{${validators}}") private Map validators; ``` property file has this ``` validators={AlphabetValidator:'AlphabetValidator',NumberValidator:'NumberValidator'AlphaNumericValidator:'AlphaNumericValidator',DateValidator:'DateValidator', FixedLengthValidator:'Fixe...
2018/03/03
1,180
3,783
<issue_start>username_0: Why do I get an error in this program? If I change the middle operator to minus like this `(a++-++b)`, it is executing without any error: ``` class Demo { public static void main(String []args){ int a=10; int b=20; System.out.println (a+++++b); } } ```<...
2018/03/03
547
2,076
<issue_start>username_0: The question might sound confusing but basically I want to make a function that takes in a list and another function. Now going through that list I want to get the count of elements that return true when inputted into this parameter function. Im new to sml so my mistake was that I intended to ...
2018/03/03
443
1,458
<issue_start>username_0: I'm trying to find a way to render texts that come from the database with their breaklines "\n". [![app](https://i.stack.imgur.com/fcD5m.png)](https://i.stack.imgur.com/fcD5m.png) How can a change the "\n" to the actual breaklines?<issue_comment>username_1: You could use this approach. ``` i...
2018/03/03
771
2,619
<issue_start>username_0: The code checks for a User ID `(id_usager)`. If it doesn't check out, it performs the else as an error catch. If it does check out, it calls in the other functions and prints `("Pour la personne"etc)`. That being said, I want my program to continue onto `autreRecommandation` afterwards, however...
2018/03/03
790
2,271
<issue_start>username_0: I want to create an object from a nested array only 2 levels deep. The function I came up with returns `[{ key1: 'value1', key2: 'value2' }]` rather than `[{ key1: 'value1' }, {key2: 'value2' }]` I've also tried replacing the if statement with `obj[elem[0]] = elem[1];` but get the same res...
2018/03/03
453
1,711
<issue_start>username_0: I just converted a large legacy site to Net Core. Because of some old code, I have to target net47 instead of netcoreapp2.0 / netstandard2.0. Problem is that when I run the site in IIS, it starts up correctly, but then I cannot attach the debugger. The process list (Debug | Attach to process) ...
2018/03/03
2,180
8,445
<issue_start>username_0: I'm currently developing a small helper application for something, and was wondering if there were a better way to accomplish this one thing - I have a CSV file that I am reading into my program, and I am parsing one of the values in each row from a numerical value (always an integer, between ...
2018/03/03
2,085
7,760
<issue_start>username_0: Ive created a simple asp.net core 2.0 web api, and used the following line of code in my program.cs file ``` public static void Main(string[] args) { BuildWebHost(args).Run(); } public static IWebHost BuildWebHost(string[] args) { var webHost = new WebHostBuilder() .UseKestre...
2018/03/03
746
2,837
<issue_start>username_0: I'm creating a function that takes two inputs: delta, and length. The function modifies an existing vector - let's call this vector base - by delta for 'length' specified elements. I need to create a new vector, let's call it 'adjusted'. This vector, adjusted, needs to populate based on one c...
2018/03/03
463
1,540
<issue_start>username_0: ``` import pygame, sys pygame.init def create_window(): global window, window_height, window_width, window_title window_width, window_height = 800, 600 window_title = "Imortal Dragon" pygame.display.set_caption(window_title) pygame.display.set_mode((window_width, window_hei...
2018/03/03
943
3,608
<issue_start>username_0: I am having some difficulty getting my input form to reset on submit. I would like for the input field to reset to a blank value when the form is submitted successfully, but for the time being I am also fine with it just resetting *onSubmit* in general, neither of which I have been able to figu...
2018/03/03
506
1,583
<issue_start>username_0: I am using InceptionV3 Model from Keras for extracting feature. Lets say I have 1000 images and I got the last layer with shape `(1000, 8, 8, 2048)`. Which `1000` from data size and `(8, 8, 2048)` from last convolutional layer. How can I implement Global Average Pooling? I am expecting the shap...
2018/03/03
915
3,509
<issue_start>username_0: I'm writing a code for a small game so naturally, I have a lot of variables that all do different things whenever they change. My question is, is it possible to tell my code to run certain lines of code each time the variables change, so as to avoid repeatedly typing in the same lines, over and...
2018/03/03
1,193
3,926
<issue_start>username_0: For soon reason i can't seem to do this simple thing. Which is take the Array or Strings and put it into firebase. (with out a for loop). How do I do this? Code (Error): ``` // Cannot convert value of type '[String]' to expected argument type '[AnyHashable : Any] var list = [String]() li...
2018/03/03
644
2,340
<issue_start>username_0: I am creating a web page with a list of items (populated with JSON API <http://vcld.fsdcmel.librarysolutions.com.au/VCLD_FS_TEST/SmartLibrary/Services/Search/SMLIB_SERVICE_SEARCH.asmx/GetRecommendList>) in a table in the main page. When the user clicks on the item on the list, I want them to se...
2018/03/03
1,119
3,888
<issue_start>username_0: I have a text file in this format: ``` Petroleum Engineering 94600 175500 Marine Engineering 73900 123200 Economics and Mathematics 60000 122900 Geophysics 54100 122200 Cognitive Science 54000 121900 ``` What I have is course name, average early career pay, an...
2018/03/03
916
3,198
<issue_start>username_0: I have a background image and I give the fixed scroll, I mean I create stick bar in the bottom, like in the picture below: ![sticky bar](https://i.stack.imgur.com/Zydjc.png) In this picture, the sticky bar in the bottom, not responsive. this my code css: ``` .affix { bottom:-1px; width:...
2018/03/03
419
1,638
<issue_start>username_0: I am exporting table from Teradata to Hive.. The table in the teradata Has a address field which has New line characters(\n).. initially I am exporting the table to mount filesystem path from Teradata and then I am loading the table into hive... Record counts are mismatching between teradata ta...
2018/03/03
610
2,321
<issue_start>username_0: There are a bunch of people on this site have had a similar questions to mine, but I can't seem to find one that has solved it the way I want it to. I'm trying to get a password out of a database so that I can send an email automatically. To do this, I am calling `Credential.objects.get(userna...
2018/03/03
462
1,771
<issue_start>username_0: I am newbie with android and I want to perform task only on some conditions. I have read about `Job Scheduler` and see the tutorial by the [Vogella](http://www.vogella.com/tutorials/AndroidTaskScheduling/article.html).In that the mention Job Scheduler introduced in API 21. I have searched for w...
2018/03/03
1,173
4,084
<issue_start>username_0: I added following libraries in my Android After that I'm getting error. * <https://github.com/bumptech/glide/releases/download/v4.6.1/compiler-4.6.1.jar> * <https://github.com/bumptech/glide/releases/download/v4.6.1/glide-full-4.6.1.jar> **Error:** ``` Error:Execution failed for task ':app:j...
2018/03/03
1,061
3,736
<issue_start>username_0: I've been trying to get the Spotify access control allow to work but, every time I try to get onto authorization page, it gives me the: ``` No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5000' is therefore not allowed access. If an opaque...
2018/03/03
1,125
4,189
<issue_start>username_0: Java resolving default method conflicts: why using super keyword? I'm reading the book "Core Java SE 9 for the impatient". In section "Resolving Default Method Conflicts", I found that when resolving default method conflicts, the super keyword is used. But I don't understand why use the `super...
2018/03/03
572
2,206
<issue_start>username_0: Trying to rewrite a python script into a C# console program for finding percentages out of raw numbers. Every time I run this, even if I replace high/low\_water with hardcoded numbers, percent always comes out 0, not sure what I'm missing. ``` static void Main(string[] args) { Cons...
2018/03/03
871
2,220
<issue_start>username_0: When I follow the [`iview` document](https://www.iviewui.com/docs/guide/start#%E5%BC%95%E5%85%A5_iView): ``` import 'iview/dist/styles/iview.css' ``` in my `main.js`. There I get the bellow output error: ``` client?7705:167 ./node_modules/iview/dist/styles/fonts/ionicons.eot?v=2.0.0 Module...
2018/03/03
592
2,205
<issue_start>username_0: I have a new instance of Sitecore 9. I'm trying to create my first component, an ascx file with a codebehind file, and I have this line: ``` var item = Sitecore.Context.Item; ``` The build is failing with the error "The name 'Sitecore' does not exist in the current context"<issue_comment>use...
2018/03/03
3,215
11,000
<issue_start>username_0: I keep getting an segmentation error(core dumped) when i run this program str.cpp + str.h + main.cpp and I can't for the life of me find out what's causing it. I've tried going through each line of code and replacing variables but still get that error. Here is my code that I was to add to the f...
2018/03/03
517
1,519
<issue_start>username_0: ```css .home { background: transparent; border: 1px solid #fff; border-color: #fff; border-radius: 10px; font-weight: 700; padding: 14px 36px; margin-top: 200px; margin-right: 5px; } ``` - ``` * [Home](#) * [About](#) * [Projects](#) ``` --- I provided my **HTML** and **...
2018/03/03
1,978
8,119
<issue_start>username_0: I am trying to rename a column via a migration in my MySql database. This is my migration: ``` public override void Up() { //RenameColumn("Docks", "ProfileId", "SecondId"); <!-- doesn't work either RenameColumn("Docks", "ProfileId", "SecondId", anonymousArguments: new { ColumnType = "in...
2018/03/03
637
2,482
<issue_start>username_0: I want to schedule SMS using Twilio in Python. After reading some articles I came to know about Celery. But I opted not to use celery and go with Python Threading module. Threading module works perfectly when using some dummy function, but when calling ``` client.api.account.messages....
2018/03/03
2,654
5,146
<issue_start>username_0: I am trying to use numpy optimized in-built functions to generate thermometer encoding. Thermometer encoding is basically generating *n* amount if 1's in a given length. For example in 8-length, 3 will be encoded as: ``` 1 1 1 0 0 0 0 0 ``` Using numpy to generate that vector based on a inte...
2018/03/03
841
2,939
<issue_start>username_0: I cannot figure out why I am getting the following error: > > E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution > of: > Lcom/somecompany/someapp/common/glide/GlideWrapper$loadCircularProfileImg$1$1; > at > com.somecompany.someapp.common.glide.GlideWrapper.loadCircular...
2018/03/03
372
1,311
<issue_start>username_0: I have the following in an excel spreadsheet: ``` A B C 1 ID Label Text 2 123 R Some text 3 4 456 S Some more text 5 6 789 R Even more text ``` But I want to close the row gaps so my excel spreadsheet can look like th...
2018/03/03
695
2,067
<issue_start>username_0: Input two table, `TABLE A` and `TABLE B` ``` TABLE A TABLE B A_ID | A A_ID | B 1 | a 1 | b 2 | a1 1 | b1 3 | a2 2 | b2 ``` Expecting Output `TABLE C` ``` TABLE C A_ID | A | C 1 | a | b,b1 <--- Concat all rows in TABLE B with ...
2018/03/03
2,175
8,705
<issue_start>username_0: I want to Import text file to Datagrid and when I click Save, it'll save the table to database. [![enter image description here](https://i.stack.imgur.com/mOt1E.png)](https://i.stack.imgur.com/mOt1E.png) I have tried this code. But it says **"Cannot find Column 3"**. ``` private void btnImpor...
2018/03/03
1,985
7,688
<issue_start>username_0: i have 2 ajax requests in 1 page. i want to run that 2 ajax requests together at same time. **First AJAX** ``` $.ajax({ url: "load1.php", type: 'POST', success: function (output) { console.log(output); } }); ``` **Second AJAX** ``` $.ajax({ url: "load2.php", ...
2018/03/03
2,076
7,338
<issue_start>username_0: I finally made it working with AJAX but the problem is, it's not real-time whenever I change some data in phpMyAdmin, I need to refresh it on the website. Here's my code: **ajax.js** ``` $(document).ready(function() { $.ajax({ url: "http://localhost/projectZeus/private/data.php", ...
2018/03/03
634
1,771
<issue_start>username_0: My problem was that I needed to deliver batches from an `itertools.cycle` generator in list form. A [`cycle`](https://docs.python.org/3/library/itertools.html#itertools.cycle) takes an iterable and loops it around itself indefinitely. For example: ``` >>> my_cycle = itertools.cycle('abc') >>>...
2018/03/03
1,170
3,276
<issue_start>username_0: My goal is to display if a number is prime, and if it is not, list all of its factors. If I input 6, the program should return: ``` 6 is not a prime number => 2, 3 ``` Here is what I have so far: ``` puts "Enter a number: " num = gets num = num.to_i def prime(num) is_prime = true f...