date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/07
826
2,342
<issue_start>username_0: I am trying to draw a spherical harmonics for my college project. The following formula I want to depict, ``` Y = cos(theta) ``` for that, I wrote this code ``` import numpy as np from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt def sph2cart(r, phi, tta): ''' r is...
2018/03/07
930
3,290
<issue_start>username_0: I am trying to create a version of the game I created where the program(computer) always wins. Game is Rock Paper Scissors. I am a beginner in Ruby, I have successfully created the "normal" version of the game where the coputer chooses its results at random. I have been searching for awhile a...
2018/03/07
821
2,774
<issue_start>username_0: impossible to find an answer to that: i would like to create a log history of my command line **automatically** without having to do anything. For that i found some clues, i modified my .bash\_profile but i need to exclude some command that i don't want in my log like "ls, cd, etc." this does...
2018/03/07
738
2,652
<issue_start>username_0: I am doing a project in Angular 4, I installed the ngx bootstrap and the date picker is in English. I inserted the following lines in app.module.ts: ``` import { defineLocale } from 'ngx-bootstrap/chronos'; import { ptBrLocale } from 'ngx-bootstrap/locale'; defineLocale('pt-br', ptBrLocale); ...
2018/03/07
1,395
5,022
<issue_start>username_0: I'm working with *Pupil Labs*, a huge open source for eye/pupil tracking. The entire code is written in Python. The so-called [Pupil Remote](https://github.com/pupil-labs/pupil/blob/master/pupil_src/shared_modules/pupil_remote.py) is based on ZeroMQ. If I start running the [Filter Messages](ht...
2018/03/07
1,155
4,242
<issue_start>username_0: I am trying to detect if a database connection succeeded, and if so, do work, otherwise,report the connection error and obviously bypass the DB tasks. I'm embarrassed that I seem to be failing Syntax 101. I've tried two different approaches, neither which works. **Approach 1** In this code,...
2018/03/07
595
2,222
<issue_start>username_0: I need to implement AutoCompleteTextView in react native. The problem is that there is no such built-in component. All the modules and libraries available to mimic this feature is not completely similar. The main issue is the suggestions are not appearing over the view(like that of select box/p...
2018/03/07
1,499
4,007
<issue_start>username_0: I need a way to make a 2D array of tuples where each tuple is a pair of the indices at that position. I need this without for loops since i'm working with big matrices. For example, the 3x3 case would be: ``` array([[(0, 0), (0, 1), (0, 2)], [(1, 0), (1, 1), (1, 2)], [(2, 0), (2...
2018/03/07
924
3,121
<issue_start>username_0: During my stack building I encountered a problem with free an element inside an array in my Pop function. This is the code: ``` Element Pop(Stack *stackPtr) { Element temp = stackPtr->content[stackPtr->size-1]; Element* newE = (Element*)realloc(stackPtr->content,(stackPtr->size-1)*size...
2018/03/07
505
1,884
<issue_start>username_0: I was having array as example :- for an example ``` var a =[{name :"Adi", age:23},{name:"aman" ,age : 23},{name : rob,age:52}]; ``` should i delete the keys name or should i assign it as undefined ,which approach is good ? I means delete operator takes much time or setting undefined shoul...
2018/03/07
1,328
4,602
<issue_start>username_0: It looks like I am again stuck on the running a packaged spark app jar using spark submit. Following is my pom file: ``` oneview-forecaster com.dataxu.oneview.forecast 1.0.0-SNAPSHOT 4.0.0 forecaster com.fasterxml.jackson.core jackson-databind com.fasterxml.jackson.module jackson-...
2018/03/07
720
2,651
<issue_start>username_0: 1. file2.py is just variables 2. I want file1.py to import those variables (import file2) increment them, truncate file2.py and rewrite it with the newly incremented variables I know how to increment them I'm just not sure how I would rewrite a python file with another python file while that f...
2018/03/07
1,183
4,436
<issue_start>username_0: Hello everyone I have this query I am performing in multiple places. Instead of retyping the query over and over, I would like to be able to call a method that returns the query. I am not sure what to put as the return type for the method or if this is even possible to do. I use the query to wr...
2018/03/07
911
3,261
<issue_start>username_0: I want to read in words from a word list, but only words that contain characters of the alphabet, so no special characters like é, ï, -, etc this is what I've got so far: ``` ArrayList list = new ArrayList<>(); ClassLoader classLoader = ClassLoader.getSystemClassLoader(); File file = new File...
2018/03/07
847
3,110
<issue_start>username_0: I have a working file [below], but I would like to know if there is a better solution to the first three lines. I have several files in a folder, and a script that processes them based on a particular and conserved in each file's name. However, I was told I should not use `__contains__` (I am...
2018/03/07
1,006
3,456
<issue_start>username_0: Sorry for the terrible title, wanted to include as much information as possible. Currently we are having a bit of trouble moving from Windows 7 to Windows 10. Right now we are not using any roaming profiles in Windows 10 but after each logoff, it saves a mapped\_drives.txt file to a network dr...
2018/03/07
1,556
5,372
<issue_start>username_0: I've just tried to rebase some changes I'm submitting to a remote repository, and can't get it to complete after I resolve conflicts. I tried to rebase as follows: ``` $ git rebase upstream/master First, rewinding head to replay your work on top of it... Applying: My Commit Message Using index...
2018/03/07
661
2,263
<issue_start>username_0: I'm just trying to run a for loop that identifies which row numbers register as TRUE and prints it in the console. ``` Holidays <- c("TRUE", "TRUE", "FALSE", "TRUE") newvector <- for (i in 1:length(Holidays)) { if (i == TRUE) print(i) } ```<issue_...
2018/03/07
189
795
<issue_start>username_0: I has two UIViewControllers. SecondViewController is a ContainerView in FirstViewController. I know how get access from First to Second, but have no idea how to do this opposite(Second to First). Maybe anyone knows how I can try to do this. Thanks for all answers and ideas!<issue_comment>user...
2018/03/07
362
1,375
<issue_start>username_0: I am new to AngularJS and started working on web unit testing using test cafe. My problem is in inspect element I have set of JSON data, which is generated when I pass few text in text field and click on search. I need to get this JSON data to a variable or constants for string comparison. JSON...
2018/03/07
446
1,542
<issue_start>username_0: I need to encode categorial features in my dataset. I want them to be ordered, so that 'low' comes to 0 and 'vhigh' comes to 3. I tried using label encoder from preprocessing: ``` from sklearn import preprocessing le = preprocessing.LabelEncoder() le.fit(['low', 'med', 'high', 'vhigh']) ar = l...
2018/03/07
482
1,659
<issue_start>username_0: I'm trying to insert records but I'm getting an error in my bind\_param? Am I missing something? ``` for($i = 0; $i < count($getbookauthorfname); $i++){ if($getbookauthorfname[$i] != "" && $getbookauthormname[$i] != "" && $getbookauthorlname[$i] != "" ){ $query = "INSERT INTO tbl_...
2018/03/07
594
1,737
<issue_start>username_0: I am new at C and trying to make a little program. Basically it's a program that takes elements name, group, period (Not scientifically correct) number from a text file. Then insert elements names to 2d string array (elmName in code), element numbers to 2d int array (elmNumber) and then print...
2018/03/07
800
2,316
<issue_start>username_0: I am finding a difficult time finding a solution for multiple levels of push / merging with Lodash and Underscore. Trying to avoid some messy nested loops with JS. Here's an example of how I need to merge. ``` const arr = [ { level : 'test', items : [1, 2, 3] }, { level : 't...
2018/03/07
1,621
4,476
<issue_start>username_0: I want to be able to close a popup menu when the user clicks outside. How can I accomplish this in pure JS? Here is the code I'm currently working with: ```js function list(){ var r= document.getElementById('l2'); if (r.style.height==="0px"){ r.style.height="500px" ...
2018/03/07
1,291
3,567
<issue_start>username_0: The following pom.xml execution fails only when adding "-p" to the org.codehaus.mojo:exec-maven-plugin:1.6.0:exec plugin, when this argument is removed it runs fine but I need the argument, any suggestions? This is pom.xml: ``` exec-maven-plugin 1.6.0 org.codehaus.mojo creating-war gen...
2018/03/07
1,007
3,611
<issue_start>username_0: First up all I am new to Java and I am still learning it. I have created a subClass that overrides the methods from parentClass. In the code below, I have to use the value of the variable C that is being assigned through scanner object. After debugging, I found that the value of the variable C ...
2018/03/07
1,013
3,782
<issue_start>username_0: I've been playing around with redis to keep track of the ratelimit of an external api in a distributed system. I've decided to create a key for each route where a limit is present. The value of the key is how many request I can still make until the limit resets. And the reset is made by setting...
2018/03/07
1,055
4,003
<issue_start>username_0: How can one avoid explicitly throwing an `Exception` while trying to get the value from an `Optional` or while making use of **[`Optional.get`](https://docs.oracle.com/javase/9/docs/api/java/util/Optional.html#get--)**? Currently, this is possibly safeguarded with the API `orElseThrow` as : `...
2018/03/07
1,165
3,658
<issue_start>username_0: I need to change my app's font to a custom font. I'm using Android Native Fonts for this. I have added my\_font.ttf and my\_font\_italic.ttf on the font folder. Also, I created this font family resource ``` xml version="1.0" encoding="utf-8"? ``` On my layout, I have a LinearLayout with a c...
2018/03/07
777
2,935
<issue_start>username_0: As it says in the title, I'm trying to create a button element in JavaScript, but when I try to set its `onclick` attribute, it just ignores it. I've looked at other questions with this topic on this site (such as [this one](https://stackoverflow.com/questions/4849683/define-function-in-javascr...
2018/03/07
2,394
7,491
<issue_start>username_0: [![new update](https://i.stack.imgur.com/XZRx9.png)](https://i.stack.imgur.com/XZRx9.png)I wan the arrows on my navbar to produce the animation I've created when I hover the options on top of them, [![See this](https://i.stack.imgur.com/2D4Ka.png)](https://i.stack.imgur.com/2D4Ka.png) When my ...
2018/03/07
824
2,978
<issue_start>username_0: I have a class as below: ``` public class UnitofWork : IDisposable where T : DbContext, new(){ private readonly T context = new T(); private DbRepository \_typeA; private DbRepository \_typeB; public DbRepository TypeAProp { get { return \_typeA ?? (\_typeA= new DbRepository(context a...
2018/03/07
389
1,367
<issue_start>username_0: On page have many images with random `alt=""` How to get current image alt on hover and add this alt here: ``` var img = jQuery('.bbc_img[alt="NEED_ADD_HERE"]').attr('src'); ``` Sorry for my bad English language.<issue_comment>username_1: What you might be looking for is the title attribu...
2018/03/07
368
1,268
<issue_start>username_0: this is the code that i use to get the image: ``` $img = \Image::make($ad['image_url']); return $img->response(); ``` it works, the only thing is that the image returned is static. *When opening the real image url in a tab, it's animated* is there a way to get the animated result?<issue_co...
2018/03/07
464
1,597
<issue_start>username_0: I'm trying to update file string on remote computer. In my script i'm using following code. ``` Get-Content Clients.txt | ForEach-Object \\{ Get-Item "\\$_\D$\Runtime\run.properties" \\} | Replace-FileString.ps1 -Pattern '$PropName=.*' -Replacement '$PropName=$PropValue' -Overwrite ``` But I...
2018/03/07
478
1,716
<issue_start>username_0: I have a config file as below: ``` var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter'); exports.config = { directConnect: true, onPrepare: function() { jasmine.getEnv().addReporter( new Jasmine2HtmlReporter({ savePath: './test/reports/', screenshotsFol...
2018/03/07
828
2,874
<issue_start>username_0: I am trying to review some basic Javascript using an online environment where print() is allowed. However, when I try to call say() on an instance of the person, it is saying that "say" is not a function. I have tried this in several different environments with their version of print (be it wri...
2018/03/07
578
2,086
<issue_start>username_0: i have created an aws account, launched ec2 instance and created buckets in s3. Also i have installed python, boto3 and aws cli. But i'm stuck on connecting python with aws step.<issue_comment>username_1: Solution : ---------- Using `new person(...)` instead of `person(...)` will create the ob...
2018/03/07
994
3,870
<issue_start>username_0: I have a class `Response` that has a public member which is of another class type `ResponseData`. `ResponseData` has a `string` member. What I've notice is that upon inspecting `Response->responseData` and `Response->responseData->data`, the value of `ResponseData*` and the address of `Respons...
2018/03/07
642
1,673
<issue_start>username_0: I have a 2 x 4 `tensorA = [[0,1,0,1],[1,0,1,0]]`. I want to extract index i from dimension d. In Torch I can do: `tensorA:select(d,i)`. For example, `tensorA:select(0,0)` would return `[0,1,0,1]` and `tensorA:select(1,1)` would return `[1,0]`. How can I do this in TensorFlow? Easiest way I...
2018/03/07
1,423
4,830
<issue_start>username_0: I'm starting to learn develop android apps. I'm following a firebase tutorial, and I'm getting some errors on my `build.gradle` file. Can someone please help me? My `build.gradle` file: ``` apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { ...
2018/03/07
1,201
4,152
<issue_start>username_0: I want to reallocate an array of structs in C (add one struct at the end) but it doesn't change its size: ``` typedef struct stone { int height; int width; int length; int color; } STONE; int main() { STONE *stone; stone = (STONE *)calloc(1, sizeof(STONE)); int len...
2018/03/07
3,135
12,787
<issue_start>username_0: according to [How to inject a repository into a service in Symfony2?](https://stackoverflow.com/questions/12223176/how-to-inject-a-repository-into-a-service-in-symfony2) it's like ``` acme.custom_repository: class: Doctrine\ORM\EntityRepository factory: ['@doctrine.orm.entity_manager',...
2018/03/07
904
3,158
<issue_start>username_0: I made some changes and then requested Code Review in TFS, then realized I had made the changes to the wrong branch. So I tried to delete the work item to show that I no longer needed code review (at least in this branch). However, when I tried to do that, I got the beautiful red error: > > F...
2018/03/07
949
3,392
<issue_start>username_0: I've been struggling with getting RenderScript to work on my app with a TargetSDKVersion 26 and a minSDKVersion 21 getting an error at Gradle Sync: > > Error:Execution failed for task ':app:compileDebugRenderscript'. > com.android.ide.common.process.ProcessException: Error while executing pro...
2018/03/07
2,126
6,530
<issue_start>username_0: How do you convert the code below to recursive ? ``` def fibonacci(n): a, b = 0, 1 fibonacci = [0] while a < n: fibonacci.append(b) a, b = b, a+b print ('The fibonacci sequence is : '+" ".join(map(str,fibonacci))) ``` so basically I'm trying write a function f...
2018/03/07
2,109
6,462
<issue_start>username_0: I am trying to replace the nth occurrence of a character with the following function It works for strings of letters but I want to replace the 2nd `[` in `[WORLD!] HELLO, [WORLD!]` I am trying the pattern `/.\\[/` which works in RerEx tester but not in my function. I get no error just no repl...
2018/03/07
589
2,614
<issue_start>username_0: I have a CollectionView that displays cells populated from an online web application that, when clicked on, give the option of deleting from that web application. I use a completion handler to only reload the data if the api call was successful and the web application no longer has that cell s...
2018/03/07
1,299
4,294
<issue_start>username_0: I have a PHP daemon script downloading remote images and storing them local temporary before uploading to object storage. PHP internal memory usage remains stable but the memory usage reported by Docker/Kubernetes keeps increasing. I'm not sure if this is related to PHP, Docker or expected Li...
2018/03/07
1,126
3,608
<issue_start>username_0: Just migrated a website from a linux server without a cpanel to a server with a cpanel. My problem is when I hit start to start a process which executes a php file. It will not run the file. If I run the file from terminal everything works. The code that calls the file. ``` if ($do === "start...
2018/03/07
982
2,860
<issue_start>username_0: I have problem with recursive functions. I have to build a recursive function which creates an array of integer values corresponding to the digits of a given number. For example, if I input a number like 3562, it should look like : ``` myArray[0] = 3 myArray[1] = 5 myArray[2] = 6 myArray[3]...
2018/03/07
650
2,096
<issue_start>username_0: If I want to add a loop to constrain days as well, what is the easiest way to do it, considering different length of month, leap years etc. This is the script with years and months: ``` yearStart = 2010 yearEnd = 2017 monthStart = 1 monthEnd = 12 for year in list(range(yearStart, yearEnd + 1))...
2018/03/07
461
1,903
<issue_start>username_0: I read a guide on compilers. They have many optimization techniques like removing redundant code or removing unused variables and none used methods. But script languages like javascript don't have compiler, so take it will not have optimizations. I read a article about js optimizer like: ...
2018/03/07
1,411
4,861
<issue_start>username_0: I am trying to **insert** my **Javascript variable** "**score**" into a **Mysql** **database**, but it doesn't seem to work. Down below is the **Index.php** code ``` var score = 0; function post() { $.post('scoreadder.php',{uscore:score}, function(data){ console.log(score +"hello"); }); } ...
2018/03/07
928
3,659
<issue_start>username_0: Oracle released a beta version [driver ODP for dotnet core 2](http://www.oracle.com/technetwork/topics/dotnet/downloads/odpnetcorebeta-4077982.html)(Finally!). But I can't make it work. Does anybody did it? If yes, please send me the code or help me fixing this one \o **Useful**: I am using Vi...
2018/03/07
696
2,268
<issue_start>username_0: I have in my store the following: ``` import Vuex from 'vuex' import Vue from 'vue' Vue.use(Vuex); export const store = new Vuex.Store({ state: { campaigns: '', currentCampaign: null }, mutations: { GET_CAMPAIGNS(state, campaigns) { state.campaigns = campaigns } }, a...
2018/03/07
1,854
4,775
<issue_start>username_0: I am trying to find max of below colm in csv list['1154293', '885773', '-448704', '563679', '555394', '631974', '957395', '1104047', '693464', '454932', '727272', '125016', '339251', '78523', '977084', '1158718', '332681', '-341227', '173826', '742611', '1189806', '607363', '-1172384', '587993...
2018/03/07
1,240
3,695
<issue_start>username_0: I am trying to arrange content in a tuple to fit a specific column layout. Example layout: ``` <NAME> MALE 100000 MARGARET FEMALE 1000 <NAME> MALE 1 AGNES FEMALE 200 ``` But when I iterate over the tuple ...
2018/03/07
1,063
3,146
<issue_start>username_0: I've been using the Watir webdriver for a while now and out of the blue I'm getting the following error: Selenium::WebDriver::Error::UnknownError unknown error: call function result missing 'value' when trying to set text and other functions. The script worked fine yesterday... so something...
2018/03/07
628
2,486
<issue_start>username_0: I am running an ASP.NET webform which is trying to get the contents of a shared folder using `new DirectoryInfo(path).GetFiles(pattern)`. The application pool is set to run with a domain username, but at the point of execution it is impersonating my username. I am in a group which has *Full Con...
2018/03/07
468
1,116
<issue_start>username_0: I have a dataframe like this: ``` lis = [['a','b','c'], ['17','10','6'], ['5','30','x'], ['78','50','2'], ['4','58','x']] df = pd.DataFrame(lis[1:],columns=lis[0]) ``` How can I write a function that says, if 'x' is in column [c], then overwrite that value with th...
2018/03/07
291
1,178
<issue_start>username_0: I have accessed my sqlite file under data/data//databases/. Then I tried to open it in Android Studio. I selected SQL File as the file type, but Android Studio showed me a sequence of characters. Not a browser of sqlite file. Is there any way to fix this? Can I open that sqlite database file ...
2018/03/07
1,572
5,542
<issue_start>username_0: According to [PEP 468](https://www.python.org/dev/peps/pep-0468/): > > Starting in version 3.6 Python will preserve the order of keyword arguments as passed to a function. To accomplish this the collected **kwargs will now be an ordered mapping**. Note that this does not necessarily mean `Ord...
2018/03/07
702
2,211
<issue_start>username_0: This is my code so far: ``` import os import openpyxl os.chdir('C:\\Python34\\MyPy') wb=openpyxl.load_workbook('example.xlsx') wb.get_sheet_names() ``` But I get these errors: > > Warning (from warnings module): > > /File "**main**", line 1 > > DeprecationWarning: Call to deprecate...
2018/03/07
914
3,082
<issue_start>username_0: ``` for (var j = 0; j < u1.similar_users.length; j++) { var pp = u1.similar_users[j]; console.log(pp); db.collection('userdata').find({ user: pp }, { restaurants: true, _id: false }), (function(err, res) { console.log(res); for (var tt = 0; tt < res.length; tt++) { ...
2018/03/07
1,262
3,797
<issue_start>username_0: I was wondering if there is an easy way to make a dark mode using JavaFx and CSS. I have a MenuBar with a CheckMenuItem called 'Dark mode' and when I click it I want the scene to become dark and the text to become white.<issue_comment>username_1: It's been a while since I played with "theming" ...
2018/03/07
528
1,962
<issue_start>username_0: I have a controller class in my SpringBoot app. ``` @RestController @RequestMapping("/{database}/alerts") public class ControllerB { @Autowired private ServiceB serviceB; @Autowired private B b; @Autowired ControllerB(B b,ServiceB serviceB){ this.b = b; this.serviceB =...
2018/03/07
1,063
3,338
<issue_start>username_0: I'm having issues with calculating the max and min of an array. I'm looking for the max and min indices not the values they contain. My print out gives me 7 for max and 1 for min but that is not correct. The max should be 1 and the min should be 6. I tried making the if statements in their own ...
2018/03/07
1,003
3,089
<issue_start>username_0: I have a certain `flatMap` that I use at about 20 places. And I am sure it will be 20 more in the future. It is to throw an exception when a `Option` is empty. Example: ``` def get(serverId: UUID, sessionId: UUID) = authAction.async { implicit request => val user = request.user.get server...
2018/03/07
2,161
7,427
<issue_start>username_0: Is it possible to parse JSON lines with Alamofire and codable? Here is my code right now. ``` Alamofire.request(url, method: .get, parameters: parameters, encoding: URLEncoding.default, headers: headers).responseString {(response) in switch response.result { c...
2018/03/07
996
4,403
<issue_start>username_0: can anyone help to concatenate three strings in java? For example, if there are three strings a=this b=is c=march then the result has to be concatenated as "this is march"<issue_comment>username_1: Alamofire is extensible, so I'd suggest writing your own response `ResponseSerializer` that can p...
2018/03/07
862
2,502
<issue_start>username_0: I have an array like this: ``` array = [1,2,3,4,5,6,7,8] ``` and i want to remove for example the 4 last values so as my array becomes this: array = [1,2,3,4] I used array.splice(array.length - 4, 1) but it didn't work. Any ideas?<issue_comment>username_1: You can use the function `slice` as...
2018/03/07
1,032
3,126
<issue_start>username_0: Consider the code: ``` // @flow type Params = { value: ?number, } function acceptsMaybeNumber({ // Error:(6, 3) null or undefined [1] is incompatible with number [2]. // value = 4 // <--- DOESN'T WORK // Error:(7, 3) null or undefined [1] is incompatible with number [2]. // Error:...
2018/03/07
263
1,080
<issue_start>username_0: is there any significant difference between this 2 statement in the context of angular 4.3.4 classes or these are just 2 pattern of the same thing? ``` constructor(@Inject(Injector) private injector: Injector) {} ``` and ``` constructor(private injector: Injector) ```<issue_comment>usernam...
2018/03/07
1,269
4,974
<issue_start>username_0: I'm trying to parse a string I have that follows the format below ``` Key: Object\n Key: Object\n Key: Object\n ``` Into an NSDictionary so that it is more easily accessible to me. My question is: Is there a better way to do this that is already incorporated into obj-c? My first thought woul...
2018/03/07
1,010
4,342
<issue_start>username_0: So my Angular app has a search bar, and if you enter something in this search bar, it does its search and comes to a results page. All good there. Now if your search doesn't return any results, the results page loads and tells you "searchterm" has returned no results. At this point, the URL is...
2018/03/07
2,415
9,389
<issue_start>username_0: Is it possible to get the permissions of a folder and its sub-folders then display the path, group, and users associated to that group? So, to look something like this. Or will it have to be one folder at a time. **`-Folder1`** ``` -Line separator -Group -Line separator -List of users ``` *...
2018/03/07
836
1,887
<issue_start>username_0: I want to combine two dataframes, `df1` and `df2`, by different groups of a key variable in `x1`. It is basically some join operation, however, I do not want the rows to duplicate and do not care about the relationship among the added columns. Assume: `df1`: ``` x1 x2 A 1 A 2 A 3 B 4...
2018/03/07
392
1,391
<issue_start>username_0: Access 2010 - OpenReport in vba is only printing. I have a simple modal form where the user selects a date range and the report opens. If the query results are 0, a message pops up saying there are no values, else the report opens and modal form closes. However, every time I run this it will n...
2018/03/07
1,091
3,805
<issue_start>username_0: I was trying to compile a react-native app for android in Linux platform. But when I run the command "react-native run-android", I got the following error ``` Scanning folders for symlinks in /opt/react/App5/node_modules (8ms) JS server already running. Building and installing the app on the...
2018/03/07
1,279
5,483
<issue_start>username_0: I have build a list of data with a recyclerview. Everything works as expected. But I want to acces some data in my adapter when I click on a cell. The click works. But I don't know how to acces my events list. ``` public class ExampleAdapter extends RecyclerView.Adapter { private final Layou...
2018/03/07
1,218
4,240
<issue_start>username_0: I've been writing and maintaining a personal use utility that pings `8.8.8.8` every 1s and displays a pip indicating the network's condition for a while now, and due to the fact that my network appears to have inherent ~1.7% packet drop, I made it run two PING.EXE processes in parallel, with a ...
2018/03/07
911
3,088
<issue_start>username_0: ``` public static void checkMultiple(int a[]){ //will use this count variable later //int[] count = new int[10]; //first scan over the array for (int i = 0; i < a.length; i++) { //seeded loop to check against 1st loop for (int j = 0; j < i; j++) { ...
2018/03/07
1,135
4,389
<issue_start>username_0: As a hypothetical question, I would like to use lambdas as class methods. I understand this is bad in a professional context, but I'm curious anyway. An example would probably be best for showing what I want to do. Here is a basic class for complex numbers: ``` class Complex { private: ...
2018/03/07
631
2,081
<issue_start>username_0: Looking for help, I am trying to get this list to populate the current time when running this PS script. ``` $serverlist = Get-Content E:\Scripts\3PL-pkgs\Tools\ServiceChecker\machines_List.txt $servicecheck = ForEach ($server in $serverlist) { $serverlist = Get-Content E:\Scripts\3PL-pkgs\T...
2018/03/07
453
1,654
<issue_start>username_0: I'm using the *requests* module. I have a number of programs that would like to make a complex check on the results of a *requests.get(url)* call. I thought perhaps I could add this new function in a class that inherited from some part of *requests*. But the *get* call is in an *api.py* file th...
2018/03/07
502
2,168
<issue_start>username_0: It seems like [someXml.CreateElement("abc");](https://learn.microsoft.com/en-us/uwp/api/windows.data.xml.dom.xmldocument#Windows_Data_Xml_Dom_XmlDocument_CreateElement_) does only one thing: create the element. It does not add it as a child as I expected, nor does it seem to do anything else. ...
2018/03/07
482
1,613
<issue_start>username_0: I need to create a script that goes through the results from MySQL and automatically returns the column names selected on the query using mysqli. **NOTE: I'll be using some pseudo code to explain my point easier. It is obviously wrong** For example a `CLIENTS` table with columns: ``` ID, NAME...
2018/03/07
203
826
<issue_start>username_0: Is there a way to prevent the chrome dev tools from stealing the focus if you stop the debugger / reach a breakpoint? I'm debugging with intellij js debug and chrome is stealing its focus on every step.<issue_comment>username_1: In the Chrome DevTools Settings under Preferences -> Sources, the...
2018/03/07
671
2,452
<issue_start>username_0: I'm trying to set a global variable within a webpage loaded by a react-native WebView. I'm trying to set the global variable using the injectJavascript prop, but I'm getting an error telling me that injectJavascript is expected to be a function. How do I format the injectJavaScript function t...
2018/03/07
364
1,336
<issue_start>username_0: I have been trying but I cannot edit rows. When I click the pencil icon near any row in the interactive report, I want it to take me to a separate page where I can edit the rows and update the table.<issue_comment>username_1: Try this. ``` 1 - click on "Create Page" 2 - select "Form" 3 - selec...
2018/03/07
835
2,596
<issue_start>username_0: I have a javascript file that I run with `node` command in the terminal **jstest.js** ``` var args = process.argv.slice(2); console.log(args[0]); var jsonata = require("jsonata"); var data = JSON.parse(args[0]); var expression = jsonata(args[1]); var result = expression.evaluate(data); cons...
2018/03/07
415
1,339
<issue_start>username_0: I have a question about Highcharts. This is my chart: [![enter image description here](https://i.stack.imgur.com/OAjJJ.png)](https://i.stack.imgur.com/OAjJJ.png) I want to decrease label of x-axis density, like y-axis. Thanks so much for your helps. Edit: for example: http:// jsfiddle.net ...
2018/03/07
824
2,895
<issue_start>username_0: In js using Cheerio, for this block, where "\*" is dynamic text (such as an ID #): How do I extract the URL? Is it possible to use a wildcard to get information after part of an element's name? I tried: ``` $("[class = 'article-link']*") //fails probably because the string is terminated pre...
2018/03/07
748
2,391
<issue_start>username_0: I'm trying to load data into datasets in Python. My data is arranged by years. I want to assign variable names in a loop. Here's what it should look like in pseudocode: ``` import pandas as pd for i in range(2010,2017): Data+i = pd.read_csv("Data_from_" +str(i) + ".csv") # Stores data ...
2018/03/07
1,998
7,252
<issue_start>username_0: ``` class Test { @override public String a(){ b(); d(); } private String b() { c(); } private String c(){ d(); } private String d(){} } ``` I want to intercept each methods of class Test that is been called from overridden method A() and want to know how much time each method like b(), c...
2018/03/07
992
3,293
<issue_start>username_0: ANSI terminal color escapes can be done with `\033[...m` in most programming languages. (You may need to do `\e` or `\x1b` in some languages) What has always seemed odd to me is how they start with `\033[`, but they end in `m` Is there some historical reason for this (perhaps `]` was mapped to...
2018/03/07
305
1,085
<issue_start>username_0: I have a table which, after joins, gives the following values: ``` ID Color 1 BLACK 1 BROWN 1 BLUE 2 BLUE 2 BLACK ``` I need to write a query that sets a priority (BROWN>BLACK>BLUE) on Color so that I can return a single value by ID based on the priority. Result ...
2018/03/07
545
1,910
<issue_start>username_0: How can I get a list from an iterator ? ``` std::list list; auto it1 = list.insert(list.end(), 1); auto it2 = list.insert(list.end(), 2); auto it3 = list.insert(list.end(), 3); auto it4 = list.insert(list.end(), 4); auto it5 = list.insert(list.end(), 5); list.erase(it3); ``` In included cod...