date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/15
338
1,207
<issue_start>username_0: Lets say this is the result of first select statement ``` topic a b c ``` and this is the result of second select statement ``` user d e ``` How to combine this two colums into ONE column with a new column name? I am trying to use `UNION` however its not working ``` SELECT topic FR...
2018/03/15
337
1,249
<issue_start>username_0: I've started using Java, and this has made my Git usage a bit more of a pain. In many Java setups the files are nested very deep, for example: ``` src/main/java/com/example/Main.java ``` So I can't use tab-complete when Git adding something, and I have to type all these directories. Is there...
2018/03/15
1,043
4,152
<issue_start>username_0: I have a page where I update two fields and successfully get the state variables updated, to a point. The last update reflects in the render part, but can not pass beyond that. What am I doing wrong? Am I missing something? Suggestions? When typing to the **height** field the corresponding sta...
2018/03/15
975
2,788
<issue_start>username_0: I have an array with the following format ``` let array = [{id: 1, desc: 'd1', children:[{id:1.1, desc:'d1.1', children:[]}]}, {id:2, desc:'d2', children:[] }, {id:3, desc:'d3', children:[] }]; ``` Where each child is of the same time as the parent elemen...
2018/03/15
793
2,421
<issue_start>username_0: I have an ImageView: ``` ``` And in Activity I do the following: ``` ImageView ivBgHand = (ImageView) findViewById(R.id.ivHand); Bitmap bitmap = BitmapFactory.decodeFile(photoPath); // Path from storage ivBgHand.setImageBitmap(bitmap); ``` I want to make zoom in and out using ...
2018/03/15
450
1,982
<issue_start>username_0: is it currently possible to set up a whole cloudwatch stack including the cloudwatch agent via cloudformation ? I cant find a proper documentation and asking myself if its even possible.<issue_comment>username_1: Yes these types are available in CloudFormation * AWS::CloudWatch::Alarm * AWS::C...
2018/03/15
928
3,028
<issue_start>username_0: We started getting the LPX-00209 problem when we recently upgraded our database system from Oracle llg to 12c. I'm trying to find the solution to why I'm now getting the error. I have found what maybe the problem below. We moved to Oracle 12c and found that `l_xml.transform(XMLTYPE (l_xslt))` ...
2018/03/15
983
4,085
<issue_start>username_0: I am right now trying to send data from one activity to another and I now wonder why the int requestCode, int resultCode, gives me that the variables are never used plus why do they go red for that? it also gives me a reuired ; ? I am taking help of this tutorial <https://codelabs.developers.go...
2018/03/15
303
1,258
<issue_start>username_0: I have an array which contains the FileNames as New1, New2.... etc I'm trying to code a function which returns me the new file name which is not present in the array and is the next consecutive number. Let's say I have array as `Let array = [{"Name" : "New"},{"Name" : "New1"},{"Name" : "New...
2018/03/15
901
2,952
<issue_start>username_0: I want to define a class like this: ``` class MyClass[C,X]( val states: C, val transform: C => X ) ``` But `X` can only be equals to `C` or a container for `C`, like `List[C]` or `Set[C]` -- it does not make sense for the problem at hand if `X` is defines as anything else. Is there a wa...
2018/03/15
283
1,008
<issue_start>username_0: My Android project in Xamarin keeps failing to build due to below error invalid symbol :"default" default.png res/drawable/default.png not sure what is causing this to happen. Any help will be greatly appreciated. Thanks Ravi<issue_comment>username_1: [default](https://learn.microsoft.com/...
2018/03/15
355
1,120
<issue_start>username_0: I wrote a program with c++ and OpenCV 3.4.0 for connected components labeling. I used `ConnectedComponentsWithStats` function for it. Now I can write same program with OpenCV + cuda. But OpenCV does not have `ConnectedComponentsWithStats` function for cuda. Somebody said to me that I must u...
2018/03/15
700
2,799
<issue_start>username_0: I am applying toasterjs in my angular component. Here is my code. i have imported the `ToastrService` using the code: ```js import { ToastrService } from 'ngx-toastr'; ``` and inject that service in the constructor ```js constructor(private toastrService: ToastrService) { } this.toastr...
2018/03/15
983
3,652
<issue_start>username_0: I am trying to solve this problem for hours now and can't find a proper solution: I am trying to Play a media File (Mp3/Ogg) but always get the FileNotFoundException (and I'm sure it's there ;) ) This is what I try: Check if SD Card is available. Check if reading/writing permissions are gran...
2018/03/15
324
1,069
<issue_start>username_0: I'm looking to retrieve all but one value from a list: ``` ll = ['a','b','c'] nob = [x for x in ll if x !='b'] ``` Is there any simpler, more pythonic way to do this, with sets perhaps?<issue_comment>username_1: given that the element is unique in the list, you can use `list.index` ``` i ...
2018/03/15
481
1,867
<issue_start>username_0: While the Microsoft Graph API seems to be very complete feature wise, it seems like I am stuck at a fairly easy request. For a small web application I want to list apps that are registered in Azure. What a want to do with them is a little bit out of scope, but in the end I want to show the user...
2018/03/15
371
1,284
<issue_start>username_0: I would like to automatically adjust the width of a bokeh DataTable to the size of a screen. But I do not find the right way to do it. This line of code is supposed to work : `data_table = DataTable(source=source, columns=columns, height = 300, sizing_mode = 'scale_width', fit_columns=True)` ...
2018/03/15
444
1,546
<issue_start>username_0: I am currently working with a MS SQL database on Windows 2012 Server I need to query only 1 column from a table that I only have access to read, not make any kind of changes. Problem is that the name of the column is "Value" My code is this: ``` SELECT 'Value' FROM table ``` If I add ```...
2018/03/15
1,152
3,579
<issue_start>username_0: Use win\_update module of ansible Playbook: ``` - name: Update tasks: - name: Check updates register: result win_updates: state: searched - debug: var=result hosts: windows ``` Hosts: ``` all: children: windows: hosts: somehost: ``` Group\_vars: ...
2018/03/15
380
1,385
<issue_start>username_0: Again I am here with an error, i have connected my PHP with SQL server from an IP Address and it works properly in my local PC. but when i transfer my source codes to my client PC it gives below error: **A Database Error Occurred** Unable to connect to your database server using the provided ...
2018/03/15
355
1,312
<issue_start>username_0: ``` @RequestMapping("/api/") public String h(String title){ System.out.println(title); return "view"; } ``` . ``` @RequestMapping("/api/") public String h(@RequestParam String title){ System.out.println(title); return "view"; } ``` When accessing /api?title=something, both ...
2018/03/15
290
987
<issue_start>username_0: I'm trying to use dynamic font size on a `UIButton`. But if I increase the font size, the text on the button gets truncated to "...". Any idea on how to fix this? Thanks<issue_comment>username_1: Use a constraint with height greater than or equal Upvotes: 0 <issue_comment>username_2: You can g...
2018/03/15
676
2,489
<issue_start>username_0: I have created a K-means training job with a csv file that I have stored in S3. After a while I receive the following error: ``` Training failed with the following error: ClientError: Rows 1-5000 in file /opt/ml/input/data/train/features have more fields than than expected size 3. ``` What c...
2018/03/15
340
1,227
<issue_start>username_0: I use this text `text\r2`. And I want to print this in debug and get result: ``` text\r2 ``` but I get this: ``` text 2 ```<issue_comment>username_1: Try to escape the backslash with another backslash: `text\\r2`. The `\r` will otherwise be interpreted as a line break. Upvotes: 2 <issue_...
2018/03/15
666
2,083
<issue_start>username_0: I am playing around with binance API, im very new to javascript, the first section in my code ``` binance.prices((error, ticker) => { console.log("prices()", ticker); console.log("Price of BTC: ", ticker.BTCUSDT); }); ``` above code outputs: ``` ETHBTC: '0.07421500', LTCBTC: '0.01994000'...
2018/03/15
4,682
11,524
<issue_start>username_0: i am stuck at a problem. I have two 2-D numpy arrays, filled with x and y coordinates. Those arrays might look like: ``` array1([[(1.22, 5.64)], [(2.31, 7.63)], [(4.94, 4.15)]], array2([[(1.23, 5.63)], [(6.31, 10.63)], [(2.32, 7.65)]], ``` Now I have to find "duplicate nodes". H...
2018/03/15
564
2,082
<issue_start>username_0: I made a header view file and in that header I'm trying to echo a picture from the folder images. This images folder is outside the application folder. Also the name of the picture is logo.jpg This is the code to echo the picture in the header.php file: ``` ![Jongeren kansrijker logo](../.....
2018/03/15
482
1,520
<issue_start>username_0: Windows 10, Apache httpd 2.4, PHP 7.1.4, Laravel 5.5 Gmail's less secure is Allowed. --- My .env file: ``` MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=465 MAIL_USERNAME=<EMAIL> MAIL_PASSWORD=<PASSWORD> MAIL_ENCRYPTION=ssl ``` Error Message: > > Connection could not be establis...
2018/03/15
602
2,048
<issue_start>username_0: When trying to get a popover displayed in one line using this template: ``` Here we go: Show me popover with html ``` And by adding a *CSS class* like: ``` myClass { white space: nowrap; } ``` Then the text goes beyond the popup itself. I've tried to add **container="body"** or **...
2018/03/15
613
2,309
<issue_start>username_0: **The environment** I have a big component tree on my angular application with multiples routes outlet to display specific component on each level. the deepest level is a modal that manages certain info. **The Problem** I can block the interaction through the mouse from my child component t...
2018/03/15
245
770
<issue_start>username_0: I am trying to get hostname from UDP endpoint. However I do not know whether boost.asio supports IP->hostname conversion. Anyone can answer my question?<issue_comment>username_1: [getnameinfo](https://linux.die.net/man/3/getnameinfo) is what you want. ``` getnameinfo((sockaddr*)&addr, sizeof(a...
2018/03/15
639
1,812
<issue_start>username_0: With An example, I'm basically trying to go from : ``` [ { 'a':a1, 'b':b2 }, { 'a':a1, 'b':b5 }, { 'a':a3, 'b':b4 } ] ``` To : ``` [ { 'group':'a1', 'content':[ { 'a':a1, ...
2018/03/15
387
1,305
<issue_start>username_0: If I wish to run my function app at 11.15 PM to next day 1.15 AM(That mean MONDAY 11.15 PM start and TUESDAY 1.15 AM will end) and it will trigger every minute during this time. Can anyone help me to write this CRON expression?<issue_comment>username_1: You'll have to do this in three lines I ...
2018/03/15
2,771
8,123
<issue_start>username_0: I am currently learning python. I do not want to use Biopython, or really any imported modules, other than maybe regex so I can understand what the code is doing. From a genetic sequence alignment, I would like to find the location of the start and end positions of gaps/indels "-" that are nex...
2018/03/15
2,798
8,232
<issue_start>username_0: Could you please help produce the output table from the below input table(screenshots are provided.Basically I would need to get the pcn from the cn based on the pid in each row.I used a case when statement but the data is huge and it's not a sustainable way,hence the self join would be fine.Bu...
2018/03/15
2,827
8,436
<issue_start>username_0: I'm using **PHP 7.2.2** I'm not able to understand following paragraph taken from the [PHP Manual](https://secure.php.net/manual/en/language.types.string.php#language.types.string.substr) > > **Warning** Writing to an out of range offset pads the string with spaces. > Non-integer types are ...
2018/03/15
673
2,689
<issue_start>username_0: Here, by validating, I mean: - valid: return records - not valid: no records returned by the query Is there a built-in function inside neo4j so that I can quickly valid the query without running it. for example, something like schema checking. **What I want to do** quickly valid lots o...
2018/03/15
532
1,781
<issue_start>username_0: I am using PDO in PHP. whenever I pass $id = "2abcd" (number with string suffixed) the query returns Successfully. (with data of $id=2) in Database :id INT(11), img VARCHAR(100), uname VARCHAR(100) ``` public static function getImagePath($id) { $sql_fetch_opp = "select img from my_user ...
2018/03/15
428
1,599
<issue_start>username_0: I have a table with multiple columns. I need to the get min and max value from the entire table, but also display what category that min and max value are in. The column names I need are Asset\_Type and Asset\_Value. There are multiple (5+) asset types but I only need to show the asset type of ...
2018/03/15
755
3,195
<issue_start>username_0: I'm writing some code that uses reflection. So I'm trying to cache the expensive processing of the reflection into a `ConcurrentDictionary`. However, I want to apply a restriction limit on the concurrent dictionary to prevent storing old and unused cached values. I did some research on my end ...
2018/03/15
1,375
5,066
<issue_start>username_0: If the user clicks **X** on my main form, i want the form to hide, rather than close. This sounds like a job for the [**OnClose** form event](http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/Forms_TForm_OnClose.html): > > Use OnClose to perfo...
2018/03/15
682
1,868
<issue_start>username_0: I have a data frame with strings under a variable with the `|` character. What I want is to remove anything downstream of the `|` character. For example, considering the string ``` heat-shock protein hsp70, putative | location=Ld28_v01s1:1091329-1093293(-) | length=654 | sequence_SO=chromosom...
2018/03/15
466
1,331
<issue_start>username_0: Here is my test set: ``` master_ref ref value 56279276 56279325 FRAME ASSEMBLY1 56279276 384062724 FRAME ASSEMBLY2 56279276 443450775 FRAME ASSEMBLY3 ``` I want to retrieve the value field based on the highest ref given a master\_ref. Here is what I tried that just...
2018/03/15
495
1,630
<issue_start>username_0: Here i am trying to take top 2 highest salary in my table. i am trying mysql but it is throwing error. My Table ``` CREATE TABLE `employees` ( `empId` int(11) NOT NULL AUTO_INCREMENT, `firstName` varchar(100) COLLATE utf16_bin NOT NULL, `lastName` varchar(100) COLLATE utf16_bin NOT NULL, ...
2018/03/15
534
1,647
<issue_start>username_0: I want to perform a column summation and once a certain threshold is met, I want to erase the summed so far value and not allow it to add any new values for the next 3 steps, but I am not sure how to do this. Can someone help me. Here is what I have so far. ``` for (i = 0; i < col; i++){ s...
2018/03/15
1,179
4,039
<issue_start>username_0: Am still new to Reactjs, thought have tried all I can, but still can't get through this error **"`TypeError: Cannot read property 'id' of undefined`"** please someone help below is my code. ``` if(this.props.controller === 'location'){ eventData = Object.keys(this.props.heda).map( evKey ...
2018/03/15
928
3,146
<issue_start>username_0: I'm trying to create a new branch which contains a different version of my project. Unfortunately the newer version's files, while they have different contents, don't get noticed by git as changed and can't be committed. The folder\files are nearly identical and were placed into the directory...
2018/03/15
726
2,654
<issue_start>username_0: I am trying out python, basically newbie. What I wanted to do is to save or store all generated list into one list and access that list later. The list is generated from a loop. Basically my code is: ``` def doSomething(): list = [] ....some parsing procedures.... ...... ...h...
2018/03/15
1,065
3,941
<issue_start>username_0: like title says, I can not install font awesome 5 with npm for scss purposes. Trying to install version 5 --------------------------- Accoring to <https://fontawesome.com/how-to-use/use-with-node-js> `npm i --save @fortawesome/fontawesome` Looking through the installation in node\_modules ...
2018/03/15
915
3,484
<issue_start>username_0: All, I have an Excel Spreadsheet that has a row of Images that were add to the sheet by Insert\Picture From File popup window. Instead of imbedding the image I choose the option to link to File. I’m now moving the sheet to an Access DB but I can’t figure out how to extract the path information ...
2018/03/15
794
2,833
<issue_start>username_0: I have a very simple mongo scheme I'm accessing with mongoose I can map the username and firstname to each notification's from field by using populate, the issue is I can't seem to get any sorting to work on the date field With this code I get an error of > > MongooseError: Cannot populate...
2018/03/15
748
2,347
<issue_start>username_0: I have a function that generates a random 3-character alpha-numeric string. I need to modify it in such a way that the new string consisted of 2 alpha and 2 numeric characters. The combination of numbers and letters can be random. ``` function generate_random($length = 3) { $characters = ...
2018/03/15
589
2,187
<issue_start>username_0: I have a primeng table (the new module) with editable cells displaying simple data. Outside the table I have a button to add new empty objects/rows to the table and I would like to jump to edit mode in the new cell programmatically when the button is clicked. I am able to add the empty row to ...
2018/03/15
1,411
4,786
<issue_start>username_0: When a Sqlite column is declared as a `timestamp`, I understand that this works: ``` import sqlite3, datetime dbconn = sqlite3.connect(':memory:', detect_types=sqlite3.PARSE_DECLTYPES) c = dbconn.cursor() c.execute('create table mytable(title text, t timestamp)') c.execute('insert into mytabl...
2018/03/15
2,198
7,803
<issue_start>username_0: I am using Hacker Rank challenges to teach myself BASH, and I'm in need of some advice. I'm specifically trying to solve this challenge: [Apple and Oranges by nabila\_ahmed](https://www.hackerrank.com/challenges/apple-and-orange/problem) I need to read in multiple lines of `ints` separated by...
2018/03/15
872
3,422
<issue_start>username_0: I'm new to this site (and new to R) so I hope this is the right way to approach my problem. I searched at this site but couldn't find the answer I'm looking for. My problem is the following: I have imported a table from a database into R (it says it's a data frame) and I want to substract the...
2018/03/15
319
1,118
<issue_start>username_0: The question seems easy, but according to my research, the maven repository <http://repo.maven.apache.org/maven2/org/primefaces/primefaces/> has only major releases 5.2,5.3,...,6,2 what I want exactly is to use the version **5.2.9** in order to correct the problem of the reCAPTCHA by implement...
2018/03/15
1,488
3,683
<issue_start>username_0: I have an sql query that counts consecutive days but i need it to count weekends to. For example, if someone has a friday and a monday off i need this to count as 2 consecutive days if that makes sense. tables: ``` CREATE TABLE Absence( Date Date, Code varchar(10), Name varchar(10), Type varc...
2018/03/15
5,404
10,044
<issue_start>username_0: I am trying to order a variable in R which is a list of file names that contains three substrings that I want to order on. The files names are formatted as such: ``` MAF001.incMHC.zPGS.S1 MAF002.incMHC.zPGS.S1 MAF003.incMHC.zPGS.S1 MAF001.incMHC.zPGS.S2 MAF002.incMHC.zPGS.S2 MAF003.incMHC.zPGS...
2018/03/15
553
2,145
<issue_start>username_0: I want to select a window from the list of returned windows title in robotFramework, the code is the below: ``` Partager sur Facebook ${Window1Title}= Get Window Titles Run Keyword If '${Window1Title}[]' == 'Facebook' ConnexionAndPartageFacebook Run Keyword If '${Window1Title}' == '...
2018/03/15
209
864
<issue_start>username_0: Cannot build android project from Github the error is " Gradle sync failed: Cause: error=0, spawn failed Consult IDE log for more details (Help | Show Log) (434ms) any ideas ?<issue_comment>username_1: try to restart android studio, it worked for me. Gradle back to normal. Upvotes: 3 <issue_...
2018/03/15
650
2,291
<issue_start>username_0: I am trying to use cache in cakePHP3 to store query results. I declared a cache adapter named "bl" config/app.php : ``` /** * Configure the cache adapters. */ 'Cache' => [ 'default' => [ 'className' => 'File', 'path' => CACHE, 'url' => env('CACHE_DEFAULT_URL', ...
2018/03/15
1,647
6,027
<issue_start>username_0: I have a multi-step form that has a "next" and "back" button on each step of the form. I'm using jQuery to enable the "next" button once the criteria for each section is met. For example: at least one checkbox is checked or a radio button is selected. I'm having an issue where after completing...
2018/03/15
518
2,000
<issue_start>username_0: I have a menu button with a click event in Vue. When the button is clicked, it's supposed to activate the menu itself. This is the parent element which when clicked activates the menu (the toggleMenu function makes `menuIsActive` true). This part works fine: ``` ``` And this is the `app-navm...
2018/03/15
155
533
<issue_start>username_0: My code not working. I want use `getElementById` with focus, next input. ``` * t1 * t2 function nextinput1(){ document.getElementById("kkInput").focus(); } ```<issue_comment>username_1: You forgot to close the function, here is the correct code: ``` * t1 * t2 function nextinput1(){ do...
2018/03/15
868
3,236
<issue_start>username_0: I noticed that if you allocate a `char` `array` inside of a function like this ``` void example() { char dataBuffer[100] = { 0 }; } ``` then examine the disassembly of the function with IDA that this actually inserts a call to `memset()` in order to initialize the `char` `array`. Looks s...
2018/03/15
710
2,693
<issue_start>username_0: I have a method that checks the `Type` of an object to determine if it is complex: ``` private static bool IsComplexObject(Type type) { if (IsNullable(type)) { // nullable type, check if the nested type is simple return IsComplexObject(type.GetGenericArguments()[0]); ...
2018/03/15
409
1,554
<issue_start>username_0: I'm very new to programming and I had a question about compiling of assembly language on Mac OS. I know that to convert my `.c` to an `.s` I should use `gcc -m32 -S`. However, I already wrote my own `.s` file. I was wondering if it was possible to convert the `.s` I've made so that my Mac can c...
2018/03/15
2,090
6,922
<issue_start>username_0: I have the following code, I know it's super inefficient, though I don't know how to make it simpler. Is there a way that button1 could just be changed to buttonX and everything could just be written once? Apologies if this has been asked before. I have tried searching but it is quite a compli...
2018/03/15
757
2,487
<issue_start>username_0: I have an ABAP internal table. Structured, with several columns (e.g. 25). Names and types are irrelevant. The table can get pretty large (e.g. 5,000 records). ``` | A | B | ... | | --- | --- | --- | | 7 | X | ... | | 2 | CCC | ... | | 42 | DD | ... | ``` Now I'd like to set one ...
2018/03/15
393
1,334
<issue_start>username_0: How can I achieve this? I am getting an error `incorrect syntax near between` ``` @STARTDATE, @ENDDATE, @CREATEDDATE -- INPUT PARAMETERS SELECT * FROM [DBO].[xxx] x INNER JOIN [DBO].[yyy] y ON x.ID = y.ID AND CASE WHEN @CREATEDDATE = 1 THEN x.CreatedDate BETWEEN @STARTD...
2018/03/15
2,734
4,137
<issue_start>username_0: When I have many elements in an array, Julia REPL only shows some part of it. For example: ``` julia> x = rand(100,2); julia> x 100×2 Array{Float64,2}: 0.277023 0.0826133 0.186201 0.76946 0.534247 0.777725 0.942698 0.0239694 0.498693 0.0285596 ⋮ 0.383858...
2018/03/15
929
2,827
<issue_start>username_0: I am very new to 2D Arrays in python. I am trying to create a 2D array that asks the user to input a name and then finds the name in the array and prints out what position that name is. My code so far is: ``` pupil_name = [['Jess', 0], ['Tom', 1], ['Erik', 2]] enter_pupil = input('Enter nam...
2018/03/15
823
2,943
<issue_start>username_0: I have the following code to listen to click events on div elements. HTML: ``` ``` JavaScript: ``` document.getElementById("container").addEventListener("click",function(e) { if (e.target && e.target.matches("div")) { console.log("Square element clicked!"); SquareBackground=th...
2018/03/15
576
2,062
<issue_start>username_0: I've got this somewhat ugly code writing to a bunch of properties. It seems I should be able to loop through a list to do this. How would I loop through `['command','options','library']` and set the associated property? ``` try: self.command = data\_dict['command'] except KeyError: pass ...
2018/03/15
1,223
4,953
<issue_start>username_0: I have the following layout in eclipse SWT: A GridLayout with one column and two children, one at the top, one at the bottom. The bottom one is the Expandpar. When the ExpandBar is expanded or collapsed, the size of the two children should be updated. Here is the Code: ``` package tests.julia....
2018/03/15
595
2,332
<issue_start>username_0: I am getting a warning about the usage of deprecated features in my build. Is there a way to list all the deprecated features so that I may go through and update my code? \***clarification** I know I can go to the Gradle documentation and see what is now deprecated, what I would specifical...
2018/03/15
527
2,079
<issue_start>username_0: I'm trying to create a method that checks a date to see if it already exists within my database. However I'm getting an exception that the program is having trouble converting from varchar. Anyone able to tell me why it's doing so? ``` public static int CheckDate(DateTime date) { u...
2018/03/15
792
2,586
<issue_start>username_0: I'm trying to build a system where, if user lands on a page for the first time nothing should happen, but if same user visit again then that page should not load and instead he should go to a different URL. ``` function session() { if (document.cookie.indexOf("visited") > 0) { win...
2018/03/15
445
1,312
<issue_start>username_0: I have created a list containing 10 arrays that consist of 20 random numbers between 0 and 1 each. Now, I wish to multiply each array in the list with the numbers `0.05`, `0.1`, ..., to `1.0` so that none of the elements in each array is larger than the number it is multiplied with. For exa...
2018/03/15
3,231
11,418
<issue_start>username_0: Flow duration curves are a common way in hydrology (and other fields) to visualize timeseries. They allow an easy assessment of the high and low values in a timeseries and how often certain values are reached. Is there an easy way in Python to plot it? I could not find any matplotlib tools, whi...
2018/03/15
1,078
3,648
<issue_start>username_0: In my case it is permissions and roles so i combined result with union all I just want check condition if user permission value = 0 then pick this else other one i am trying like this ``` SELECT username, orgId, uid, pid, perm FROM ( SELECT users.username, users.orgId, user_roles.uid, rol...
2018/03/15
888
3,413
<issue_start>username_0: I have a mongoose model in which some fields are like : ``` var AssociateSchema = new Schema({ personalInformation: { familyName: { type: String }, givenName: { type: String } } }) ``` I want to perform a '$regex' on the concatenation of familyName and givenName (somet...
2018/03/15
959
3,385
<issue_start>username_0: I am trying to assign default value inside a sql statement like. ``` SELECT (CASE WHEN sd.IID IS NULL THEN 0 ELSE sd.IID END) AS IID, pd.IID AS PurchaseOrerDetailsId, i.[Description] AS Item, sd.BatchNo, s.[Description] AS Unit, CONVERT(varchar, sd.MfgDt, 103) AS Mfg...
2018/03/15
450
1,577
<issue_start>username_0: How do I Deserialize the following. The problem is that the variable name is a number. So how should MyClass be defined? ``` json_str: {"23521952": {"b": [], "o": []}, "23521953": {"b": [], "o": []}} class MyClass { //? }; var var = JsonConvert.DeserializeObject(json\_str); ```<issue_co...
2018/03/15
840
2,459
<issue_start>username_0: In [this tutorial](http://thegrantlab.org/bio3d/tutorials/trajectory-analysis), there is a command `pymol.dccm(cij, pdb, type="launch")`. But I was told ``` > pymol.dccm(cij, pdb, type="launch") Error in pymol.dccm(cij, pdb, type = "launch") : Launching external program failed make sure ...
2018/03/15
425
1,690
<issue_start>username_0: How much time does a `Thread` need to stop/disappear after its `interrupt()` method has been called? Consider the following code: ``` public class MyThread { public boolean flag = true; public void run() { while(flag) { doSomething(); Thread.sleep(20); ...
2018/03/15
568
1,995
<issue_start>username_0: I am having some problems with my program. I am creating a script which displays all the properties in the properties table in our database and one row in the table should show available or sold. it should check if the `puserId` is null or 1 or more ``` //Execute the Query $records = mysqli_q...
2018/03/15
832
2,049
<issue_start>username_0: I have this problem. My dataset *a* contains one column badly formatted containing characters, letters and punctuation. I would like to separate column *Unit\_Wrong* in two columns *num* and *text*. Here is dataset a: ``` a <- data.frame(Measure = c(10000, 2000, 10000, 15000, 40000, 0), ...
2018/03/15
692
2,165
<issue_start>username_0: I've just opened my project and I couldn't build it. Here is my Gradle console output: ``` 18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 18:12...
2018/03/15
524
2,070
<issue_start>username_0: I was successfully able to integrate Dialogflow chatbot as an APP in Slack and it is accessible to chat using the APP tab. However, for it to respond to messages in channels by mentioning like `@bot hello` I realized that I have to add the **app\_mention** event into **Subscribe to Bot Events*...
2018/03/15
1,597
6,164
<issue_start>username_0: I have a c# application that works locally but it wont work if I publish my program on another machine. I get an error saying the server name cannot be found. > > An unhandled exception of type 'System.Data.SqlClient.SqlException' > occurred in ProductionOrderQuery.exe > > > Additional in...
2018/03/15
670
1,945
<issue_start>username_0: To give an example, let's assume I have a type `foo` of the following shape, ``` type foo = shape( ?'bar' => float, ... ); ``` Now if I try to access value of field `bar` in the following way, ``` do_something_with($rcvd['bar']); ``` where `$rcvd` is of `foo` type, it doesn't work as ...
2018/03/15
2,191
7,534
<issue_start>username_0: I've read through different resources but feel like I'm missing something. I'm explicitly calling the destructor when a variable (numItems) reaches zero. I have a loop that prints all the class objects (students), but while any object that had the destructor called on it has a blank first and l...
2018/03/15
1,689
5,079
<issue_start>username_0: I wrote this program: ``` // splits a sentence into words #include #include #include #include "spacefunc.h" using std::string; using std::cout; using std::endl; using std::find\_if; int main() { typedef string::const\_iterator iter; string input = "This is me"; iter i = input.begin();...
2018/03/15
760
2,216
<issue_start>username_0: I am building a file uploader, using [Vue Dropzone](https://rowanwins.github.io/vue-dropzone/) on the frontend, and custom PHP on the backend. My frontend script is sending a request with following headers: > > **Request headers** > > POST /jobimport HTTP/1.1 > > Host: myurl > > ...
2018/03/15
233
977
<issue_start>username_0: I want to attach click event handlers to all the elements in a page that I don't control (e.g.- stackoverflow homepage). Capturing clicks by assigning click handlers to every element is a tedious task. So I decided to do this instead: ``` window.addEventListener("click", function (e) { /...
2018/03/15
601
2,375
<issue_start>username_0: I am using [MS Graph example](https://github.com/microsoftgraph/aspnet-connect-rest-sample) to deal with groups. I have modified my code from the mentioned link. I am able to all my operations with admin account but not with normal user. I am using permission scopes as `User.Read Mail.Send File...
2018/03/15
728
2,714
<issue_start>username_0: I have a python script that I use to load multiple excel workbooks (1 sheet in each workbook) into a list and then perform a sort on the data. I would like to import the same workbooks but before loading into the list i would like to select certain rows based on content of a column. e.g. [![...
2018/03/15
779
2,578
<issue_start>username_0: I have an array of objects ``` [ {"first_name" :"John", "last_name": "Smith", "course": "course 1"}, {"first_name" :"Joe", "last_name": "Doe", "course": "course 2"}, {"first_name" :"John", "last_name": "Smith", "course": "course 3"} ] ``` How can I grab together unique `first_na...