date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/02/26
357
1,163
<issue_start>username_0: I am looking for some help on the following reformatting problem. I have 3 random characters that appear joined in my data set. I need to separate the first character with a space from the other two, then insert a '/' between remaining two. i.e. random\_char = '713' expected\_result = '7 1/3...
2018/02/26
1,130
3,481
<issue_start>username_0: I am trying to **create circular-shaped buttons** for my first android app. For that, I added the library as `compile 'com.cuboid:cuboidcirclebutton:1.0.5'` in circlebutton/app/build.gradle As I sync, I get errors. below is the log ``` Information:Gradle tasks [clean, :app:assembleDebug] C:\...
2018/02/26
603
1,972
<issue_start>username_0: I wish to show modal box when mouse clicked to "Andre..." at the list select box in the Laravel code as below. but this is not working. Could you tell me where is incorrect to work? **Select Box** [![enter image description here](https://i.stack.imgur.com/JUzWt.png)](https://i.stack.imgur.com...
2018/02/26
1,326
3,986
<issue_start>username_0: I have a dataset consisting of two columns `player1` and `player2` for a group of n players. each 2 players play with each other twice (once i as `player1` and j as `player2` and once i as `player2` and j as `player1`) I want to separate my data so that I have a `games1` dataframe which includ...
2018/02/26
469
1,692
<issue_start>username_0: I have injected class as dependency injection in component class and get an error > > NullInjectorError: No provider for class > > > Here is my code: ``` // Component import { Formation } from './Models/Formation'; export class FormationComponent { constructor(private formation: Forma...
2018/02/26
385
1,291
<issue_start>username_0: I've created a button in this context: [![enter image description here](https://i.stack.imgur.com/F04Id.png)](https://i.stack.imgur.com/F04Id.png) And I have a javascript function expecting the click to make a request to the server: [![enter image description here](https://i.stack.imgur.com/tn...
2018/02/26
3,008
6,142
<issue_start>username_0: I am trying to create unique step id for each step name group and if the step name group repeats, it gets a new number. ``` Step Name Process Time Step ID Step Name Process Time ---------- ----------------------- ---------- ---------- -...
2018/02/26
1,702
6,000
<issue_start>username_0: I am trying to build a simple web application, which capture users photo and sent it my custom server there by connected to some other business use-case. My web page uses HTML's file input control to launch native camera or gallery pick up option. ``` var input = document.createElement('input'...
2018/02/26
325
1,109
<issue_start>username_0: I've create an array `X` as `X = [1 2 3 4 5]` and I want to insert `0` at the end of it. Is there any difference in using `X = [X, 0]` and `X = append(X, 0)`? I didn't find anything about and I'm not sure if I can notice the difference. Thanks in advance!<issue_comment>username_1: `append` ...
2018/02/26
389
1,349
<issue_start>username_0: Can someone explain to me why I can access "m" in global scope in the following scenario: ``` const a = {m: 'beeb'}; const magic = function topLevel () { function lowerLevel() { if ({m} = a ) { console.log('in lowerLevel-func: ', m); } } lowerLevel(); } magic(); cons...
2018/02/26
1,460
5,374
<issue_start>username_0: ``` public static int[] sortByScores(double[] scores){ double temp; int i,j; int[] scoreIndex = new int[3]; for (i = 0; i <= scores.length; i++) for (j = i+1; j < scores.length; j++) { if (scores[i] < scores[j]) { ...
2018/02/26
698
2,344
<issue_start>username_0: I want to show/hide content inside `li` by clicking on a link, just like the 'more information' button. The code I have hides the content of every `li`, not just the clicked one. Please take a look: ```js $(document).ready(function() { $('ul li').on('click', '.abrir', function(e) { e....
2018/02/26
1,020
4,359
<issue_start>username_0: I have received the attached Excel file from my friend who wishes to convert into English(US). While there is no Arabic text but only numerals, I am not able to work. If I copy and paste the cells into a new workbook, even the formats are saved. The numbers have spaces in between and I tried ...
2018/02/26
903
1,814
<issue_start>username_0: I'm new to matlab and i need helping converting the columns of a matrix into a cell. Shortly, I would like to convert an m x n matrix into a 1 x n cell. Thanks.<issue_comment>username_1: You can use [`mat2cell`](https://www.mathworks.com/help/matlab/ref/mat2cell.html) that converts array to cel...
2018/02/26
843
2,089
<issue_start>username_0: Let's suppose that I have 3 python two-dimensional lists (`data_1`, `data_2`, `data_3`) of 10x5 dimensions. I want to make one list (`all_data`) from them with 30x5 dimensions. For now, I am doing this by applying the following: ``` data_1 = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], ..., [46, 47, 48...
2018/02/26
532
1,518
<issue_start>username_0: So I'm trying to figure out why my code doesn't seem to be displaying the properly uniformed quantized image into 4 levels. ``` Q1 =uint8(zeros(ROWS, COLS, CHANNELS)); for band = 1 : CHANNELS, for x = 1 : ROWS, for y = 1 : COLS, Q1(ROWS,COLS,CHANNELS) = uint8(double(I1(ROWS,COLS,...
2018/02/26
965
3,362
<issue_start>username_0: I'm new to python programming. I have performed an HTTP get request and stored the result in a dictionary (called `updates`) with the following structure: ``` updates = {u'ok': True, u'result': [{u'message': {u'date': 151957, u'text': u'light',...
2018/02/26
634
1,923
<issue_start>username_0: I have an `ArrayList` full of specific keys. How would I go about making a new node with just the keys in the Arraylist? [![enter image description here](https://i.stack.imgur.com/BQqS9.png)](https://i.stack.imgur.com/BQqS9.png)<issue_comment>username_1: `updates["result"]` is a list of dictio...
2018/02/26
738
2,419
<issue_start>username_0: If caret placed on word **gallery** ( or on other word between those two span tags ) how can I get data-id from span element with jQuery? ``` Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...
2018/02/26
1,088
4,014
<issue_start>username_0: I'm using a grid layout for one of my programs and when i try to add JTextFields to the grid It doesn't show at all. If i try adding JButtons instead of JTextFields in the same method it works perfectly. ``` package suDUKO; import java.awt.Dimension; import java.awt.GridLayout; import jav...
2018/02/26
902
3,693
<issue_start>username_0: I have receive three different screens in my app: * Reading, * Walking, and * Sleeping How do I identify the specific notification to redirect to in each screen?<issue_comment>username_1: To do so, you must specify a content intent defined with a PendingIntent object and pass it to setContent...
2018/02/26
1,334
4,298
<issue_start>username_0: I am trying to output PDF on Django using the Weasyprint library, but the images don't appear on the generated PDF. I have tried both relative and static URLs for the images, but even the static URL doesn't show the image. When opening the HTML itself on chrome, the images do show. Here is my...
2018/02/26
1,075
3,508
<issue_start>username_0: How can I have 2 or more tables on 1 page with only viewing 1 table at the time with dropdown menu you choose which table to show without a button or refreshing the page? Does anyone have an idea? Atleast we need to use ajax/js. I use datatables plugin for my tables. Here is a [Fiddle](https://...
2018/02/26
491
1,754
<issue_start>username_0: At first, I have created DocumentDB Collection with 2000 as Throughput. after I have realized that it is too high, I tried to reduce by clicking (-) button. It got reduce till 1000 after that it doesn't work. I want to set as 400. [![enter image description here](https://i.stack.imgur.com/TgWO...
2018/02/26
262
818
<issue_start>username_0: Working with huge CSV files for data analytics, we commonly need to know the row count of all csv files located in a particular folder. But how to do it with just only one command in Linux?<issue_comment>username_1: If you want to check the total line of all the .csv files in a directory, you ...
2018/02/26
564
2,155
<issue_start>username_0: I'm currently running some containers on production using `AWS Fargate`. I'm running an application that from time to time populates some files to `/tmp` folder. That said, I want to know what happens to this `/tmp` folder. Is this something managed by `Fargate` (by [ECS Container Agent](https...
2018/02/26
591
2,419
<issue_start>username_0: I am implementing filters in my ecommerce iOS app. I want my filter functionality similar to **ebay** filter functionality. Like in the gif attached when user taps on sort filter, the next view (maybe a view controller) opens and shows possible sort options. I am trying to replicate this func...
2018/02/26
571
2,270
<issue_start>username_0: I have a simple discrete `SeekBar` indicating a progression from 0 to 10. The progression of the `SeekBar` is defined programmatically, so I disabled touch events in order to prevent the user from changing its current position: ``` mSeekBar.setOnTouchListener(new View.OnTouchListener() { ...
2018/02/26
1,894
5,493
<issue_start>username_0: I have `dplyr::recode` some factors and I am looking for a clean way to make LaTeX table where new and old categories, i.e. levels, are compared. Here's an illustration of the issues using `cyl` from `mtcars. First some packages, ``` # install.packages("tidyverse", "stargazer","reporttools") ...
2018/02/26
772
2,233
<issue_start>username_0: I'm creating a frequency plot using ggplot and the stat\_ecdf function. I would like to add the Y-value to the graph for specific X-values, but just can't figure out how. geom\_point or geom\_text seems likely options, but as stat\_ecdf automatically calculates Y, I don't know how to call that ...
2018/02/26
1,075
3,399
<issue_start>username_0: Python `itemgetter` doesn't return tuples of length 0 or 1. For example: ``` from operator import itemgetter def get_something(keys): d = { "a": 1, "b": 2, "c": 3 } return itemgetter(*keys)(d) print(type(get_something(["a", "b"]))) # print(type(get\_some...
2018/02/26
4,093
14,759
<issue_start>username_0: When trying to run the Example CorDapp ([GitHub CorDapp](https://github.com/corda/cordapp-example)) via IntelliJ, I receive the following error: > > Cannot inline bytecode built with JVM target 1.8 into bytecode that is > being built with JVM target 1.6 > > > How can I modify the IntelliJ...
2018/02/26
4,238
15,207
<issue_start>username_0: My question is - is it possible to force a diagonal between two nodes in a diagram? Assume there is only one link between two nodes. ``` digraph G { rankdir=TB a -> b; } ``` This is what is rendered : [![enter image description here](https://i.stack.imgur.com/OhQpZ.png)](https://i....
2018/02/26
956
3,383
<issue_start>username_0: I've been working this evening with lists in f# (creating, adding, searching etc) and have recently gotten stuck on a list item delete. The code is pretty straight forward. ``` let menu = [("pizza",17);("hotdog",5);("burger", 12);("drink",3); ("milkshake",4)] //If key is in dictionary , retur...
2018/02/26
2,083
6,623
<issue_start>username_0: jquery ```js $('.extra').on('change', function(){ $(this).closest('label').find('.icon').toggle($(this).prop('checked')); }); var check = []; var extra1=0, extra2=0, extra3=0; $('input[type=checkbox]').on('change', function () { var checked = 0; if ($(this).prop('checked'...
2018/02/26
1,606
4,878
<issue_start>username_0: I just want to replace an exact string in shell. ``` str="My name is Sourav. My user name is Souravc. Sourav and Souravc is great person" to_be_rplace="Sourav" rplace_with=67776 ``` ouput have to be: ``` new_str="My name is 67776. My user name is Souravc. 67776 and Souravc is great perso...
2018/02/26
853
3,557
<issue_start>username_0: I am using the [C# management API of Azure](https://azure.microsoft.com/en-us/blog/azure-management-libraries-for-net-generally-available-now/) to create my resources in the cloud. I am stuck creating a container in the blob storage. I did create a storage account following [these instructions]...
2018/02/26
682
1,994
<issue_start>username_0: I have a set of string like this: ``` $string1 = 'man_city/man_united'; //it will be replaced $string2 = 'liverpool///arsenal'; //it will not be replaced $string3 = 'chelsea//spurs'; //it will not be replaced $string4 = 'leicester/sunderland'; //it will be replaced ``` i want to replace th...
2018/02/26
610
2,321
<issue_start>username_0: I want to parse a JSON file to a `map[string]interface{}`: ``` var migrations map[string]interface{} json.Unmarshal(raw, &migrations) fmt.Println(migrations["create_user"]) ``` But I modified my code to point data to `interface{}`: ``` var migrations interface{} json.Unmarshal(raw, &migrat...
2018/02/26
816
3,383
<issue_start>username_0: I am trying to avoid **overwriting** specific folder in my git repo when executing `git pull` command. In my .gitignore file I have already specified the name of the folder which I wish to ignore. However, when I execute **git pull** the content of the folder gets overwritten. **Is there any...
2018/02/26
892
3,568
<issue_start>username_0: I have a password column for users: ``` user_name password first_name last_name uses_name vance.jennings vance vance jennings true bino.lapsi dflkjdk bino lapsi false ``` I have filled the uses\_name manually here but generally I need to check i...
2018/02/26
594
2,101
<issue_start>username_0: I am trying to get my webhooks header (Woocommerce webhook), I am retrieving the body with file\_get\_contents('php://input'), although this only gives the body according to <http://php.net/manual/en/wrappers.php.php> I also found this thread: [link](https://stackoverflow.com/questions/321750...
2018/02/26
739
1,937
<issue_start>username_0: Having this input: ``` myArray = [[32.4, "bla", 1.44, 0.5, 65.8, "abc"], [654, "ert"] [9.4, "a", 1.44, "abc"]]; ``` An array of arrays, I want to compute the sum of each sub-array and also ignoring the string values. I know that for a single array of this type the sum ...
2018/02/26
841
2,381
<issue_start>username_0: I am parsing a message for URL's, but these URL's come in 2 different formats. Either: `[http://www.google.co.uk Google]` or just the plain `http://www.google.co.uk`. I am initially matching on URL, then trying to see if the the link is contained in the square brackets, then outputting dependi...
2018/02/26
255
1,026
<issue_start>username_0: I deployed my sails app in ec2 and I have mysql database in rds. when I use mysql in rds from my local, it worked absolutely fine. But when I connect myswl in rds from the ec2 it is giving me this error: ``` error: A hook (`orm`) failed to load! error: Error (E_UNKNOWN) :: Encountered an unex...
2018/02/26
1,773
6,581
<issue_start>username_0: I have a String Array that contains some names in it. I want to show the names in my console with string column alignment. For example this is my array: `{"First","Second","Third","Forth","Fifth","Sixth","Seventh","Eighth","Ninth"};` And then display them in this format: ``` First Seco...
2018/02/26
138
378
<issue_start>username_0: How I can get always round number from Ruby rand method between the interval `rand(1..99999999)`. For Example I want to get as a result for example 1000 or 100000<issue_comment>username_1: Randomize the power of `10`: ``` 10 ** rand(1..9) ``` Upvotes: 3 <issue_comment>username_2: Why not thi...
2018/02/26
237
832
<issue_start>username_0: `Text` That's an example of some code I have in my website. The colour is a dark green and it displays normally on my PC as well as on my Android phone. But, when viewed on an iPhone or an iMac the text is within the tag appears white. I don't have any CSS in the stylesheet targeting just a ...
2018/02/26
868
2,665
<issue_start>username_0: I am currently working on a Webproject for my school which is build with HTML, PHP and SQL Databases for dynamic content. Until now everything works out pretty good but I have reached a point where I have to echo something out which contains many Characters like '' and "" which pretty much make...
2018/02/26
484
1,640
<issue_start>username_0: I got an error (**There is no directive with "exportAs" set to "NgbTimepicker"**) when trying to use **NgbTimepicker** in a reactive form in a modal. In **app.module.ts**, I import **ngbModule**: ``` import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; @NgModule({ declarations: [ ... ],...
2018/02/26
345
1,253
<issue_start>username_0: `var promise = http.get().toPromise();` gives a promise which executes once. So no matter how much times `promise.then()` is called the http request is done only once. How can I achieve the same with an observable?: `var observable = http.get().???` so that `obversable.subscribe()` only perfo...
2018/02/26
800
2,417
<issue_start>username_0: I am trying to implement local modules in my application 1.Project root folder i have created folder named `test` with a file named `index.js` ``` module.exports = { myFunction:function(){ console.log('ok'); } } ``` 2.Added the following in `package.json` in the roo...
2018/02/26
556
2,060
<issue_start>username_0: Is it possible to disable the dock that pops up in iOS? This is my View Controller. Notice that it has a draggable view controller in the footer. [![screenshot of the view controller](https://i.stack.imgur.com/THa0Y.png)](https://i.stack.imgur.com/THa0Y.png) But when I try to pull it up qui...
2018/02/26
1,210
2,936
<issue_start>username_0: I have one string like below ``` A:82% X 18% Y B:100% X C:82% X 18% Y AB:82% X 18% Y ``` Want to convert above string into below format (Required Format) ``` #A:82% X,18% Y #B:100% X #C:82% X,18% Y #AB:82% X,18% Y ``` I'm able to achieve this ``` #A:82% X 18% Y #B:100% X #C:82% X 18% Y...
2018/02/26
904
2,934
<issue_start>username_0: I found the same question for PHP and I tried to do the same in C++. I tried following: ``` // returns new array with numbers lower then "number", len is set to // new length. int * filter(int array[], int &len, int number) { int cnt = 0; for (int i = 0; i < len; i++) { if (ar...
2018/02/26
483
1,654
<issue_start>username_0: I created a table with an enum column as follow ``` create table test_1( id BIGINT NOT NULL AUTO_INCREMENT, order_billing_status ENUM ("BILLING_IN_PROGRESS") DEFAULT NULL ); ``` I insert two values as follow ``` +-----+----------------------+ | id | order_billing_status | +-----+--...
2018/02/26
482
1,764
<issue_start>username_0: I'm new to AngularJs/Web stuff, seems it should be basic stuff but I struggle to find solution to this problem... I have a ModalWindow in which user can enter a comment. In case if this comments exceeds X number of characters Saving should be prevented (+some error message). So I thought `ng-m...
2018/02/26
620
1,892
<issue_start>username_0: I have a very small code: ```css .parent{ box-sizing: border-box; } .child{ height: 100px; margin: 20px; background: red; } .a1{ background: green; } ``` ```html ``` the height of .parent is showing only 220px, but if we calculate as per child's height+margin it should b...
2018/02/26
1,301
4,852
<issue_start>username_0: On mongoose find query execution, response data as multiple objects, the real data is in \_doc property or field, its only occurs in some scenario. I can handle the data by getting Obj.\_doc.something, but i cant edit the data and save(mongoose model function). please help me to resolve this pr...
2018/02/26
959
3,432
<issue_start>username_0: it might have duplicate but i didn't find right solution, My web api, ``` public class SampleController : ApiController { public string Get(int id) { return "value"; } public string hello(int id) { return "value"; } } ``` my webapiconfig, ``` confi...
2018/02/26
1,185
4,038
<issue_start>username_0: I have a problem where the **appropriate routes are not being used** in my React front end / express server API app. Fetch requests from react work as they should, as do requests from Postman. **My problem is**: when *accessing the api routes from the browser, the react app is always sent*. ...
2018/02/26
898
2,909
<issue_start>username_0: I am preparing myself for Java certification test and I have found an interesting question related to the execution of Java static blocks. I have spent a lot of time reading about this topic, but I didn't find the answer I was looking for. I know that static blocks are executed when the class ...
2018/02/26
459
1,595
<issue_start>username_0: Is drag and drop support available *only* to `UITableViewController`? Updating the sample app provided by Apple to `UIViewController` containing a `UITableView`, drops stop working. [Here is what it looks like.](https://youtu.be/7sY3KWog9D4) Am I missing something here? Has anyone got this wo...
2018/02/26
210
786
<issue_start>username_0: Right now Splinter will load for 20 seconds on pages with lots of ads and tracking built in ``` browser.visit("https://www.website.com") ``` I know that selenium allows for ``` caps = DesiredCapabilities().FIREFOX caps["pageLoadStrategy"] = "eager" ``` But Splinter doesn't accept thes...
2018/02/26
1,299
5,247
<issue_start>username_0: I'm creating tests to check that a custom calibration model save function updates an asset record (foreign key) if it is the latest calibration record for the asset. The save function performs exactly as expected in live dev & production server and even in the django shell, but appears to fail ...
2018/02/26
707
2,622
<issue_start>username_0: I haven't been able to find a way to read from a .txt file when a certain sequence occurs. This is how an entry from my file looks like: ``` &1551:John:Packard:83:Heavy:Blonde& ``` I want my file to be read from &1551 (1551 is the unique ID number of the user) until the next "&". Do you gu...
2018/02/26
739
2,775
<issue_start>username_0: I am having sticky nav bar which has few list elements where each contains href element. When I tried to locate element I am getting the error. Following is my HTML code : ```html * [Dashboard](Dashboard.aspx) * [Academic](../MEFAcademicDash/StudentUI/StudentHome.aspx "Academic Dashboard") *...
2018/02/26
873
3,601
<issue_start>username_0: I have some code that sets a boolean if the search view is open or not. ``` MenuItemCompat.setOnActionExpandListener(action_search, new MenuItemCompat.OnActionExpandListener() { @Override public boolean onMenuItemActionExpand(MenuItem item){ isSearch = ...
2018/02/26
493
1,905
<issue_start>username_0: What is the syntax of 'post' in scripted pipeline comparing to declarative pipeline? <https://jenkins.io/doc/book/pipeline/syntax/#post><issue_comment>username_1: For scripted pipeline, everything must be written programmatically and most of the work is done in the `finally` block: `Jenkinsfil...
2018/02/26
720
2,700
<issue_start>username_0: I am able to read files in bucket in COS using IAM token but unable to do the same using API key. I have set the following key in my request header: Authorization: {api key} Should I set anything else? Note I am not using HMAC credentials. below code has two options one with bearer token and ...
2018/02/26
596
2,267
<issue_start>username_0: Is there any way to change styling(i.e Color) of input type date of HTML 5 in html 5 we can show calendar via now lets say 23rd of march is holiday and I want to show this specific date in red color, how can i do that ? I want to change color of specific date while opening calendar ,so that i...
2018/02/26
1,403
4,969
<issue_start>username_0: I don't know what I am doing wrong in this. If anyone could help! cause i have tried all solutions... also undefined variable `$data error` ``` /************************/ public function edit_stud($student_id) { $this-...
2018/02/26
1,566
5,830
<issue_start>username_0: Today I came across routing problem where I need help from you guys, Actually, I am having a sidebar in which I have dynamic tree view navigations like below & right side I have 4 tabs default tab1 will be selected in which I am showing the data of active link ``` Link1 --sublink1 --sublink2...
2018/02/26
1,853
7,091
<issue_start>username_0: I have created a filter api with more than one arguements to pass in url to filter product in my iOS application. The api is written in Python in Django rest framework. The api is working fine in postman, but when I check the code for Swift in postman is shows some complex url structure and I a...
2018/02/26
1,569
5,847
<issue_start>username_0: Am new to Elasticsearch `6.2.1` and Kibana `6.2.1`. Now am working on scripted Field in kibana. I have two different date fields in indices like (resolved\_on and resolve\_due\_by) i want check the condition if resolved\_on is lessThan or equalTo resolve\_due\_bye. I tried some scripted query t...
2018/02/26
1,868
7,451
<issue_start>username_0: I'm working on a C++ hierarchical tree-based class design, with two object types, A and B. Type A objects can have any number of children, of type either A or B, but they must be stored in a single sequential order. Type B objects may not have any children. My question is regarding the best ...
2018/02/26
772
2,580
<issue_start>username_0: I am trying to do a reduction based on eigen matrix. ``` #include #include #include template auto reduction(Eigen::Matrix &a1, Eigen::Matrix &a2) -> decltype(T1{}\*T2{}) { using BaseT3 = typename std::remove\_cv::type>::type; BaseT3 res = a1(0, 0)\*a2(0, 0); for (int i=0; i m; Ei...
2018/02/26
529
1,694
<issue_start>username_0: I want to scrap data from top gainers(%) from the link but it return `UnicodeDecodeError: 'utf8' codec can't decode byte 0x93 in position 211: invalid start byte` ``` import requests from lxml import html page_indo = requests.get('http://www.sinarmassekuritas.co.id/id/index.asp') indo = html.f...
2018/02/26
1,406
4,244
<issue_start>username_0: Was trying to implement an excel export feature on an app using apache POI 3.17. All was working fine on my local tomcat server and on a windows dev environment. However, the SXSSFWorkbook workbook.createSheet() method fails on a linux tomcat server without throwing any kind of meaningful erro...
2018/02/26
3,954
10,282
<issue_start>username_0: I trying to find out the latest task and image used for ECS container service. I tried using AWS ECS cli, able to list services/tasks running but not able to find out running latest task ID and image used for that task. Can someone help with AWS CLI or Boto script to find out latest task and im...
2018/02/26
272
1,197
<issue_start>username_0: I have created a model and migrated in Django, with a unique key constraint for one of the field. Now am trying to remove the unique constraint and generate another migration file with the new change, but it says "Nothing seems to have changed". I tried with the command **python manage.py sch...
2018/02/26
492
1,834
<issue_start>username_0: I have this db called Enrolment where all the students will be added with batch and course. `stud_id`, `course_id`, and `batch_id` are referring to the other table with the fk. ``` enrolment +----------+---------+-----------+----------+ | enrol_id | stud_id | course_id | batch_id | +---------...
2018/02/26
629
2,727
<issue_start>username_0: I have a collection of classes which I want to be injected into the Spring application context. However, these classes can only be guaranteed to be annotated with one of a group of annotations I have written - i.e. I can assume it will be annotated with @MyAnnotation, but not @Component. Howev...
2018/02/26
659
2,345
<issue_start>username_0: I'm trying to translate a Java 'calculator' I wrote to PHP/HMTL. To get this to function the initial selection has to be remebered. I know I need to use $\_POST['subject'] to get $cc this however causes a problem for me. I tried several versions but I fear I lack some basics. Is anyone able to...
2018/02/26
909
2,578
<issue_start>username_0: I am trying to store the sum 1/k^2 in an array using this code: ``` int main() { int i,n, e; double terms[n]; double x, y; printf(" Introduce n\n"); scanf("%d", &n); y=1; i=0; while(e ``` And I get the "segmentation fault" error. Why is this happening? How can I avoid it? I am programmin...
2018/02/26
902
4,025
<issue_start>username_0: I have a bottom navigation which runs on my Main Activity ``` private void BottomNavigation_NavigationItemSelected(object sender, BottomNavigationView.NavigationItemSelectedEventArgs e) { LoadFragment(e.Item.ItemId); } void LoadFragment(int id) { Android.Support.V4.App.Fragment fragment = n...
2018/02/26
677
3,202
<issue_start>username_0: Is there a way to retrieve the oms workspace ID and Key in Azure via the az cli or azure powershell? I am deploying k8s clusters (in Azure) and automatically want to deploy the oms container agent via helm. I need a workspace ID and key for that and I don't want to create the workspace by hand ...
2018/02/26
1,601
6,155
<issue_start>username_0: I'm trying to **scrape** several pages from a website. For this, I've got different start URLs and a method to crawl the next pages. The issue is that the spider doesn't **scrape** the items and doesn't seem to crawl indicated pages. I've got no outcome. Do you have any idea to solve this ? **...
2018/02/26
312
937
<issue_start>username_0: How we can perform mathematical operation on string in python. Consider below example ``` with open('/home/akashk/projects/math.txt') as f: content = f.readlines() content = [x.strip() for x in content] for x in content: print(x) print(type(x)) ``` output is like ``` 1abc0+5...
2018/02/26
535
1,479
<issue_start>username_0: I've been trying to come up with a regular expression that can capture overlapping patterns in python, but with no success. I need to be able to detect the following information from a string: ``` 'OC on pin 32 or 31' 'OC on pin 32 or pin 31' 'OC on pin 32 31' 'OC on pin 32' ``` On a...
2018/02/26
562
2,408
<issue_start>username_0: We are developing a test simulator (in windows environment, using C language) for a software component that will be running on an automotive HW. Actually the test simulator is a windows application that include, as core sources, the sw componentm and allow to test the I/O interfaces of the core...
2018/02/26
672
2,497
<issue_start>username_0: So I am clearing up the structure from a project and I have the layouts, navigation and footer in a separate folder. I am now trying to render the layouts file in my files, but I can't seem to get the path right. Here is the structure ![image #1](https://i.gyazo.com/3a9ee6e31a359fd86152d4af0...
2018/02/26
4,091
14,885
<issue_start>username_0: I have a SP like this ``` create or replace PROCEDURE myproc myvar in out mytable.mycol%TYPE ``` where mycol is char(1 byte) From java code,I try to bind a String/Character to this variable and I get > > ORA-01461 - can bind a LONG value only for insert into a LONG column > > > if ...
2018/02/26
1,933
7,378
<issue_start>username_0: Situation --------- I am developing a client for a contest in Java, and whenever I receive a request, I have two seconds to respond. The time after the response until the next request is unknown. Sometimes, finding the right response takes nearly 2 seconds, and sometimes it's only a matter of...
2018/02/26
740
1,972
<issue_start>username_0: I have a table looking like this: ``` A B aa bb aa aa bb ``` And I want to Check if a data frame cell is blank and if yes find a result table like this: ``` A B S aa bb bb aa aa aa bb bb ``` I'm using this code but it doesn't work ``` for(k in dim(df)) if (df...
2018/02/26
760
2,258
<issue_start>username_0: I have a really simple question. There are examples of adapter pattern on internet and in every one of them adapter class get object of class that needs to be adapted as parameter. Something like this: ``` class Adapter { private SomeClass someClass; public Adapter(SomeCLass someClass...
2018/02/26
720
1,994
<issue_start>username_0: I have adventure works on local docker container and also on a sql-server. When i try to access adventure works i have only 3 tables. On windows it works. I used DBeaver and DBvisualizer for connection. [Screen-shot](https://i.stack.imgur.com/PPnfH.png) SOLVED: in new version of DBeaver it's ...
2018/02/26
843
2,404
<issue_start>username_0: So I have a table like this: ``` ________________________________________ phone_number | phone_vendor | status 67834 | A | OPEN 23836 | B | OPEN 87483 | C | CLOSED 72377 | A | OPEN 63637 | B ...
2018/02/26
707
2,240
<issue_start>username_0: I want to show data that a user can modify. If the user do changes, i like keeping the original data in my database. When a user get data, he should view the data modified. (Much users can modiffied data). For example: **Products** (non editable for users) ``` ID | Name | Color --------...
2018/02/26
524
1,718
<issue_start>username_0: Im very new to kentico development wise and I'm trying to work to a design given to me. I'm currently trying to tie up the smart search web part to show as a text input with a font awesome search icon as the button (with no button text). Is there any easy way to do this? Or should I resort to ...