date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/03
1,022
3,416
<issue_start>username_0: i am trying to create a stored procedure but i dont know what the issue,SQLyog is continuously giving me errors ``` DELIMITER // CREATE PROCEDURE sim_management_update() BEGIN UPDATE bf_sim_management,test_sims SET bf_sim_management.`sim_company_id`=test_sims.`id` WHERE bf_sim_management.`s...
2018/03/03
1,240
5,299
<issue_start>username_0: Java 9 provides as a way to create Empty immutable List, set and Map. ``` List list = List.of(); Set set = Set.of(); Map map = Map.of(); ``` But I am not able understand what is the actual use case of creating an empty immutable list / set / map. Please help me to understand the actual us...
2018/03/03
1,363
5,804
<issue_start>username_0: [![week data](https://i.stack.imgur.com/oiZQz.png)](https://i.stack.imgur.com/oiZQz.png) I am able to update data like address and description by doing the following: ``` FirebaseUser current_user = FirebaseAuth.getInstance().getCurrentUser(); String uid = current_user.getUid(); ...
2018/03/03
1,250
5,296
<issue_start>username_0: I want build a script that i give one input like a list (eg:`[["Name1",point,size],["Name2",point,size],etc]` and it create x labels with different names like label1,label2, etc My problem is how Can i make the script build different labels? Eg: ``` label1 = Text(center, "name1") label2 = Te...
2018/03/03
468
2,001
<issue_start>username_0: Using eslint with React configurations I get an **error** when using `Object.defineProperty`. The error says: > > Avoid using `Object.defineProperty`, instead use `Reflect.defineProperty`. (prefer-reflect) > > > On the eslint [documentation of prefer-reflect](https://eslint.org/docs/rules...
2018/03/03
593
1,699
<issue_start>username_0: **Can anybody explain which one of them has highest asymptotic complexity and why,** ``` 10000000n vs 1.000001^n vs n^2 ```<issue_comment>username_1: When calculating asymptotic time complexity, you need to ignore all coefficients of `n` and just focus on its exponent. The higher the exponen...
2018/03/03
594
1,766
<issue_start>username_0: While Calculating the Loss Function. Can i manually Calculate Loss like Loss = tf.reduce\_mean(tf.square(np.array(Prediction) - np.array(Y))) and then Optimize this Loss using Adam Optimizer<issue_comment>username_1: When calculating asymptotic time complexity, you need to ignore all coeffici...
2018/03/03
680
2,119
<issue_start>username_0: I’m building a site as part of my research using Word Press. I’m trying to display samples on the homepage in a neat way, something similar to this one <http://www.maitrechoux.com/menu/index.html?categ_id=all> . I have removed all of the home function using remove\_action. How can I add the t...
2018/03/03
715
2,822
<issue_start>username_0: I had **python2** installed on my macOS and I **parallel installed python3** (*without homebrew*). It worked perfect and I could use `python3` and `pip3` from every directory without problems parallel to `python` and `pip` for version 2. Some days ago I did not find `pip3` and I had to set an ...
2018/03/03
322
1,194
<issue_start>username_0: In Haskell, a `Maybe` type can be either a `Nothing` or a `Just a` ``` data Maybe = Nothing | Just a ``` If we call `Maybe` Union Type, what is `Nothing` then? a `Type`? No, it's not a type, you can't declare a variable to be `Nothing` type. Maybe you would say type constructor, true, but ...
2018/03/03
575
2,333
<issue_start>username_0: I have some data {iddepart, idarrivee} to use in serializer. This data is not present in data model but used internally to compute some fields: Here is my code and I get error : The field 'iddepart' was declared on serializer ReservationSerializer, but has not been included in the 'fields' opt...
2018/03/03
813
3,156
<issue_start>username_0: I'm trying to port the following vanilla JS code to TypeScript to better define return types for all functions. This code exports a single function, `resource`. When called, `resource` returns an object containing other functions. The type signature seems to disappear when using the resource i...
2018/03/03
499
1,868
<issue_start>username_0: I want to use stopwords in my code on google colab, there are no errors when I import stuff regarding nltk but when I use stopwords in my code google colab gives this error:- ``` Resource 'corpora/stopwords.zip/stopwords/' not found. Please use the NLTK Downloader to obtain the resource: >>>...
2018/03/03
733
2,037
<issue_start>username_0: Is it possible to use a timestamp field in the `pyarrow` table to partition the `s3fs` file system by "`YYYY/MM/DD/HH`" while writing parquet file to `s3`?<issue_comment>username_1: As far as I can tell: No. It can READ partitioned data but nothing related to writing. There are several place...
2018/03/03
1,206
4,849
<issue_start>username_0: We need to export production data from a Kafka topic to use it for testing purposes: the data is written in Avro and the schema is placed on the Schema registry. We tried the following strategies: * Using `kafka-console-consumer` with `StringDeserializer` or `BinaryDeserializer`. We were unab...
2018/03/03
385
1,323
<issue_start>username_0: I have used a bit of jQuery to fire an if function. When I try to simplify the equation using vanilla javascript's ternary operands it doesn't seem to work. What am I doing wrong? ``` if(windowBottom > objectBottom) { $(this).animate({opacity: '1'}, 1500); $(this).addClass('item-play...
2018/03/03
527
1,736
<issue_start>username_0: I am a beginner in python. I am using BeautifulSoup to extract data from websites. But whenever the source code of a page contains emoticons, my program stops there. What should I exactly do while/before parsing so that , emoticons/non BMP characters are removed and the page is scraped. ``` im...
2018/03/03
618
2,138
<issue_start>username_0: I've found this code for drawing the line for MacOS app. ``` class Drawing: NSView { override func draw(_ dirtyRect: NSRect) { super.draw(dirtyRect) let context = NSGraphicsContext.current?.cgContext; context!.beginPath() context!.mov...
2018/03/03
818
3,670
<issue_start>username_0: I want to display a list of all running application names. Issue: It doesn't add an app that is running after the function is called. Therefore, it doesn't add the app name to the list simultaneously. Goal: I want to add a listener, so if a new app is running it will add it to the array simu...
2018/03/03
1,028
4,233
<issue_start>username_0: Can someone help? I am trying to do a bulk insert (400 rows), everytime it shows an error message after inserted 58 rows in the database, I tried different dataset, it behave the same way. Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables do...
2018/03/03
759
2,111
<issue_start>username_0: I have a list like, ``` mylist=["'one'","{two}","'three'","four","{{{five}}}","s*ix"] ``` For each element, I want to remove the first and last character if it is a special character (other than a-z). My desired output is, ``` out_list=["one","two","three","four","{{five}}","s*ix"] ```<i...
2018/03/03
800
2,400
<issue_start>username_0: Hy, To automate access to certain sites I need to know the content of the pages displayed. For that I use this code (extract of the complete script): ``` tell application "Safari" activate set res to text of the first tab of the first window end tell ``` My problem: if this program ...
2018/03/03
369
955
<issue_start>username_0: I have a string "000-2.50" or "00-12.50" or "0-120.50" and I want to replace the zeros up to the minus sign "-" with an @ char. I want to end up with "@@@-2.50" or "@@-12.50" or "@-120.50". How do I achieve that using Regex?<issue_comment>username_1: Look for all zeros that are followed by a d...
2018/03/03
809
3,553
<issue_start>username_0: I'm new to ReactJS and although I followed a couple of very good tutorials and I read the Getting Started part of the docs, I'm failing to understand a basic principle on how ReactJS actually works. When serving a page, what really happens behind? Is the code in the `render` section called on ...
2018/03/03
832
3,434
<issue_start>username_0: I have a data frame with a column `message`, and I want to create a column `media` such that if for index x, `df.ix[x][message]==""` ,then I want `df.ix[x][media] = 1` for example for the dataframe: ``` index message 1 hello 2 3 hello 4 ``` I would get: ``` index mess...
2018/03/03
617
2,213
<issue_start>username_0: Calling a function before declaration works with the standard function declaration ``` //calling the method prior to declaration... greeter(); function greeter() { console.log("Hi there!!!"); } ``` but it does not work for arrow function or function binding way. Why?? ``` //calling th...
2018/03/03
194
656
<issue_start>username_0: Say I have a list of callable objects: ``` [, ] ``` How would I loop through the list executing every callable, leaving the result in a list?<issue_comment>username_1: That is fairly straight forward with a [list comprehension](https://docs.python.org/3/tutorial/datastructures.html#list-comp...
2018/03/03
631
1,935
<issue_start>username_0: I am trying as an exercise since I'm still fairly new to python and programming to make a script that takes a one sample pool of numbers and just use the t value from a table to make a more accurate deviation than a stdev. **example:** *10 samples and I want the t table value from the column f...
2018/03/03
1,121
3,954
<issue_start>username_0: I'm trying to execute a query that is stored in a module, but the query has some variables that are read from the main file and is not working. The variable from the main file is not accessible (its blank) inside the module. Here is the code: **sql.pm** ``` package sql; use parent 'Export...
2018/03/03
514
1,429
<issue_start>username_0: I'm trying to get the input to take all available space inside this flexbox but not extend beyond the width of the flexbox. ``` OK div { display:flex; width:100px; position:relative; border:solid 1px #000; } input { flex:1; display:block; border:none; } ``` The problem is t...
2018/03/03
149
540
<issue_start>username_0: I don't know how to compile a C program in Ubuntu if the .c file is in a folder. When the file is on the desktop I open the terminal, I write `dir`, then `cd Desktop` and then `gcc hello.c -o hello` for example and then `./hello`. How can I do if the program is inside a folder on the desktop?...
2018/03/03
641
2,401
<issue_start>username_0: I have a REST API that I am using in a mobile application to register/store data into a Mongo database. I would now like to view the data stored in the DB on a webpage. I know that I basically have all of the functionality already (the login request used in my mobile application) but I am so c...
2018/03/03
921
2,714
<issue_start>username_0: I am trying to use api for bitfinex website. for prices of bitcoin. with this code. `https://api.bitfinex.com/v2/tickers?symbols=tBTCUSD` I receive this `[["tBTCUSD",11437,106.37262285,11438,63.64002459,595,0.0549,11437,28751.21271922,11487,10771]]` I used this code to get it out of the lin...
2018/03/03
2,052
7,633
<issue_start>username_0: I have a python script that uses scrapy and I want to make it into an exe file using pyinstaller. The exe file is generated without any error but when I open it an error occurs. ``` FileNotFoundError: [Errno 2] No such file or directory: '...\\scrapy\\VERSION' ``` I have tried reinstalling s...
2018/03/03
1,755
6,582
<issue_start>username_0: I see demos where a folder with an angular app is opened in visual studio code using ``` code . ``` from the terminal. Could I do the same with Visual Studio. Perhaps I should write Powershell Scripts to accomplish the same?<issue_comment>username_1: I think this is currently not possible. ...
2018/03/03
2,064
6,952
<issue_start>username_0: Hint: Formating as raw won't fix my problem - See attachement respectively picture: [![enter image description here](https://i.stack.imgur.com/7qfnb.png)](https://i.stack.imgur.com/7qfnb.png) The following code will implement tooltip using attribute `title` of method `tag()`. Unfortunately, ...
2018/03/03
1,884
6,311
<issue_start>username_0: I'd like to generate an input field that is **able to "copy" it's value** **into another element** (in my case paragraph). All is working so far but I got massive problems when I try to input some text strings like ... ``` < b> text < /b> // without the space columns ``` --- ``` multiple b...
2018/03/03
1,591
5,887
<issue_start>username_0: I find something interesting when i tried to check the different between two variables (you can see in the code below) ``` #include #include int main() { int a, b; printf("%d", (int)&a - (int)&b); getch(); return 0; } ``` And for each time, result is 12 . I do not know why the result ...
2018/03/03
512
1,842
<issue_start>username_0: How to use [sass-resources-loader](https://github.com/shakacode/sass-resources-loader) with vue-cli@3.x to add global scss variables and mixins.<issue_comment>username_1: vue-cli@3.x uses [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain) to manage its webpack config. To add sas...
2018/03/03
373
1,230
<issue_start>username_0: Is there a way to make Cursor Position as **PointF** like this ``` Cursor.Position=new PointF(457.630,480.9155); ```<issue_comment>username_1: No, not directly but you can convert a `PointF` to a `Point`. `Point` already has two static methods that can help you with this: `Cursor.Positi...
2018/03/03
1,683
5,637
<issue_start>username_0: I am a newbie to programming. I am building a rails app and now want to push it to Heroku. I followed [Heroku's guidelines](http://devcenter.heroku.com/articles/sqlite3) for converting my database from sqlite 3 to postresql. After doing that I get this error when I try to migrate or even check ...
2018/03/03
1,430
4,418
<issue_start>username_0: I have a table that is something like this: `ID Date Name Age 1 10/04/2015 Theja 24 1 28/04/2015 Theja1 26 1 14/07/2015 Theja2 45 1 30/07/2015 Theja2 45 1 30/08/2015 Theja3 54 2 10/04/2016 Jaya 23 2 28/04/2016 Jaya 23 2 14/05/2016 Jaya1 65 2 30/05/2016 Jaya1 65` But i want output like: `ID D...
2018/03/03
406
1,519
<issue_start>username_0: In native iOS code, I could use the `NSUserDefaults` to store and fetch data, which are sync operations. In react-native the offer is to use `AsyncStorage`, but I need a solution for sync storing, like `NSUserDefaults`. I'm gonna use the result of data fetching to determine which screen to show...
2018/03/03
1,155
2,189
<issue_start>username_0: I have an array I want to sort from low to high, but I want it to return the array names (G, F, H...) instead of just the numbers. How do I do this? ``` A=12.74087388 B=12.48817861 C=12.31249807 D=12.95688859 E=12.49693343 F=11.51090636 G=10.16505019 H=11.99872655 Array=np.array([A,B,C...
2018/03/03
1,003
3,838
<issue_start>username_0: I have trouble with the following data (df) ``` 1 TeamA 1 2 TeamB 2 3 TeamC 3 4 TeamA ...
2018/03/03
644
1,873
<issue_start>username_0: How do I get Bootstrap 4 to load on my web app? My Gemfile: ``` gem 'rails', '~> 5.1.5' gem 'devise' gem 'bootstrap-sass', '~> 3.3.7' gem 'sass-rails', '>= 3.2' gem 'coffee-script', '~> 2.4', '>= 2.4.1' gem 'sqlite3' gem 'puma', '~> 3.7' gem 'autoprefixer-rails', '~> 8.1' gem 'uglifier', '>= ...
2018/03/03
626
2,130
<issue_start>username_0: So as u can see i am trying to remove the element if it is repeated more than n times. for example: {1,2,4,5,6,5} and every element can be repeated once then i should return {1,2,4,5,6} here is what i came up with up till now : ``` public static int[] deleteNth(int[] elements, int maxOcurre...
2018/03/03
665
2,534
<issue_start>username_0: I am attempting to get a google maps view inside of a popup box. I have created the popup boxes and they are working as intended. I have searched all over to find a solution for this problem but I can't find anything. Any advice would be greatly appreciated **Popup box** class pop2 extends...
2018/03/03
445
1,264
<issue_start>username_0: I'm studying the CSS units and box model. I'm looking for the simplest way to let a `div` fill the viewport (with some margins) using only plain CSS properties (no flexbox, grid) and without letting the `div` get larger than the viewport (no scrollbars). ```css div { width: 95%; height: ...
2018/03/03
3,759
10,244
<issue_start>username_0: I am fairly new on my adventure to web development. I am having issues with a site I am working on. I have had no issue with my responsive design untill I get to about 640px. Once I get to 640px or blow my html all squishes to the left except my home hero and navigation bar. If I set my headers...
2018/03/03
656
1,998
<issue_start>username_0: How to dim the backlight on an 20x4 LCD Display with the i2c connected to an Arduino uno? I use the `LiquidCrystal_I2C.h` library and I can turn on and of the light with `lcd.backlight();` and `lcd.noBacklight();` But I don't want to turn off completely the backlight: I want to dim it.<issue_...
2018/03/03
961
3,632
<issue_start>username_0: I'm trying to write my first Java program named `HelloWorld` but I got stuck with the error below: > > javac: file not found: HelloWorld.java > > > Usage: javac > > > My system: `Windows 10, 64bit` path to file: `C:\ProgramFiles\Java\jdk9.0.4\bin;%SYSTEMROOT%\System32\WindowsPowerShel...
2018/03/03
401
1,544
<issue_start>username_0: I have 2 variables arrays, one to show me the topics and the other to display the last post of each topic. A post is repeated each time a topic is displayed. How to manage these 2 loops in the same element li ``` {% for lasttopic in lasttopics %} - [{{ lasttopic.title }}]({{ path('showtopic...
2018/03/03
3,276
10,885
<issue_start>username_0: I am trying to add attention mechanism to stacked LSTMs implementation <https://github.com/salesforce/awd-lstm-lm> All examples online use encoder-decoder architecture, which I do not want to use (do I have to for the attention mechanism?). Basically, I have used [https://webcache.googleuserc...
2018/03/03
2,500
8,670
<issue_start>username_0: I have been trying to solve this for a while now but have not yet gotten anywhere. My goal is to search a string in a column called 'WORDS' and return the 'INDEXED\_NUMBER'. For example, if I searched 'aaa', it should return me 0 as shown in the table below. [![Sample table](https://i.stack.i...
2018/03/03
767
2,476
<issue_start>username_0: I am trying to make a simple JavaScript game. In the game, all game objects should be able to be dragged and dropped. For now, this code does the trick: ``` function create() { game.stage.backgroundColor = 'rgba(255, 255, 255, 0.5)' combinator = game.add.sprite(10, 15, 'Combinator') comp...
2018/03/03
359
1,317
<issue_start>username_0: I'm a bit confused about the lexicographical order of strings. So if my `s = "zzz"`, what is the next, i.e. "zzz"+1, if I can say so? Is it `"zzza"` or `"azzz"`? Add: my alphabet for this question is [a..z].<issue_comment>username_1: It will depend on your character set to know which is the n...
2018/03/03
1,244
4,299
<issue_start>username_0: I have a function within a file that takes in a pointer to an array represented by a double pointer. I want to copy the contents of a global array within the file to it. But when I dump the array, the data is not correct. What am I doing wrong? Note: I have malloc'd enough memory for the doubl...
2018/03/03
1,351
4,573
<issue_start>username_0: So I'm working on this c library thing called cROS however I want to retrieve a byte[] from C# so that I can share it using the library and I'm have trouble passing a byte[] to a char\*. C# code ``` [DllImport("aavatar")] private static extern void unity_reg_get_camera_screenshot_callback(uni...
2018/03/03
774
3,104
<issue_start>username_0: I have implemented 'BottomSheet' in my application. Calling its behaviour methods in my custom adapter. Now i want to collapsed or hide 'BottomSheet' when back button is pressed. For this how do i override 'onbackpressed' method in adapter to implement this. Here is my Adapter. ``` public cla...
2018/03/03
416
1,542
<issue_start>username_0: I have tried to tell iPhoneX from otheres. I use `Ti.Platform.displayCaps`, but it shows the same values as iPhone X /6/7/8. Even these two are supposed to have defferent screen size. How can I check the screen size of iPhone X ?? ``` [INFO] Ti.Platform.displayCaps.density: xhigh [INFO] ...
2018/03/03
1,322
5,208
<issue_start>username_0: I have some `RadioButton` and an `EditText` in my layout. When EditText get focus will show soft keyboard and lose focus hide it. But now I can't hide soft keyboard when `EditText` lose focus. Here is layout code: ``` ``` And this is code for activity: ``` @Override protected void on...
2018/03/03
1,286
5,067
<issue_start>username_0: `Inkscape` is a really good tool for importing `PDF` or `EPS` scientific plots into a blank page, and then place arrows on top of the graphs, text, make scientific drawings assemble them in the desired location and then save as a unique PDF page that can then be included as a `figure` in a `lat...
2018/03/03
833
3,188
<issue_start>username_0: While learning about Generics I came to knew about *Constraints on Type Parameters*. One of these constraints is **new()** constraint. According to Microsoft: > > The type argument must have a public parameterless constructor. When > used together with other constraints, the new() constraint...
2018/03/03
435
1,528
<issue_start>username_0: I am trying to send the value P (ive assigned points to radio button selections and P is the total of those selections) to a php file and then to a MySQL database but i'm having trouble with doing it. I know that it cant be done directly. How can I do this? Any help would be appreciated. ```js...
2018/03/03
445
1,979
<issue_start>username_0: I am in a situation where my project is one step away from finish line and I had to add an unexpected certain element to my site just as i was doing finishing touches. The element in question will be in various child and parent components all over the website... The problem I am facing is a n...
2018/03/03
630
2,478
<issue_start>username_0: I understand there is a lot of documentation and courses on callbacks. I have read a number of those resources, but for this particular problem I don't understand what is going on. And, I think help with this particular problem will help me understand callbacks better. In short I do not under...
2018/03/03
1,088
4,718
<issue_start>username_0: I'm using BSImagePicker lib for choosing multiple images in my App, when user select Images stored on ICloud **only** the UI will freeze up on the images picker controller until the images are downloaded I tried to fix it but with no results Here is my code : **Choosing the images and show t...
2018/03/03
249
886
<issue_start>username_0: I have installed MiKTeX 2.9 and Python 3.6.4 on Windows 10. The directory `..\Python36` and `..\Python36\Scripts` are added to the Path Variable. I have also installed pygments via `pip install pygments` and I have also added `-shell-escape` to the TexStudio. When I compile the .tex file I ge...
2018/03/03
934
2,202
<issue_start>username_0: I have a column with dates with this format: ``` 2013-05-25 14:10:00.00 ``` ...but I want to put it in this format ``` 25/05/2013 14:10 ``` ...so [r](/questions/tagged/r "show questions tagged 'r'") can read it. In addition, I want to be able to calculate the time between two columns. ...
2018/03/03
1,047
2,731
<issue_start>username_0: I have been working with on project. It was working at first but now I get a error when I moved it to a server that we have. I have been working with html and php. Here is the error "(index):26 Uncaught TypeError: Cannot read property 'innerText' of null at saveTable ((index):26) at HTMLButtonE...
2018/03/03
610
2,306
<issue_start>username_0: In my app users can create events that are categorised by a related organiser id. I want to check if the user submitting a request to create a new event has access to the organiser they are creating the event for. For example: ``` $organiser_id = $request->input('organiser_id'); if($user->ha...
2018/03/03
555
2,032
<issue_start>username_0: I don't seem to be able to assign a string that begins with "-e" or "-E" to a bash shell variable: ``` $ options="-e stuff" $ echo $options stuff ``` Other letters work fine: ``` $ options="-g stuff" $ echo $options -g stuff ``` What is the reason for this?<issue_comment>username_1: I am ...
2018/03/03
1,111
3,494
<issue_start>username_0: In my Go application I use a Web API, which accepts a POST request and returns a token if it is successful. The URL is the following: "<https://accounts.zoho.com/apiauthtoken/nb/create?SCOPE=xxxx&EMAIL_ID=xxxx&PASSWORD=<PASSWORD>>" If I send this in Postman or any other tool, I get the status...
2018/03/03
585
1,766
<issue_start>username_0: Well, I am not sure if some of you has encountered the same issue. I need to convert a matlab program into julia where 'cell2mat' was extensively used. For example a big matrix A is composed of 3\*2 small matrix, see a11, a12, a21, a22, a31, a32, whose dimensions are all 4\*2. Or `A = [a11 a12;...
2018/03/03
569
1,700
<issue_start>username_0: I was trying a file handling exercise which converts temperature and writes it to a file. The function part of my program is: ``` def c_to_f(c): if c< -273.15: pass #"That temperature doesn't make sense!" else: f=c*9/5+32 return f ``` In the exercise instructions, is asked me to ...
2018/03/03
696
2,491
<issue_start>username_0: I am trying to create a stored procedure that does manipulation of parameter passed in before inserting it into my table. One of the columns in my table is called `DATE_CHANGED` and basically what I gg to do here is to change a passed date parameter like December 1st 2017 to 20171201. This is a...
2018/03/03
479
1,852
<issue_start>username_0: A column in a SQLite db must be COLLATE NOCASE. I assume there is no way to add that capability to an existing table, so I'm prepare to recreate the table with it. How can I determine if the existing column is COLLATE NOCASE in order to avoid recreating the table every time it is opened?<issue_...
2018/03/03
717
2,665
<issue_start>username_0: Im trying to get this Listbox in tkinter to update from a sqlite3 database when a button is clicked. I actually had it working using root.after(1000, function) method but the cursor kept resetting every time it was updated. At the moment I can't get the listbox to populate at the button click...
2018/03/03
1,778
5,273
<issue_start>username_0: I am doing the following coding challenge in java: ``` /** * 4. Given a word, compute the scrabble score for that word. * * --Letter Values-- Letter Value A, E, I, O, U, L, N, R, S, T = 1; D, G = 2; B, * C, M, P = 3; F, H, V, W, Y = 4; K = 5; J, X = 8; Q, Z = 10; Examples ...
2018/03/03
1,610
4,906
<issue_start>username_0: Question: if this is my data: ``` col1,col2,col3,col4 =================== www.com,0,dangerous,reason A www.com,1,dangerous 2,reason B ``` I want the a single result where column 2 value is max, so I will use in my select the Max(col2) function - but how can I get those corresponding col3 and...
2018/03/03
1,706
5,528
<issue_start>username_0: Could you give an example of how to copy the last N second from an audio file to another file. I write a speech from the microphone using the code below, but I have a length limit for this record, but I need the last part of the file because it contains important information at the time when th...
2018/03/03
709
2,784
<issue_start>username_0: I have implemented a change password feature and now I would like to test it. But I’m facing the limit of attempts. What should I do to prevent this error? > > Attempt limit exceeded, please try after some time > > ><issue_comment>username_1: I am on the Cognito team. This is not configurab...
2018/03/03
598
2,533
<issue_start>username_0: I used Realm in conjunction with RxJava it this way: ``` public Flowable> getAll() { try (final Realm realm = Realm.getInstance(mRealmConfiguration)) { RealmQuery query = realm.where(RealmEvent.class); Flowable> result; if (realm.isAutoRefresh()) { result = query .findAllAsync() .asFlow...
2018/03/03
487
1,676
<issue_start>username_0: I have the following Python code which is just reading from an Arduino, and writing to a file: ``` import serial from datetime import datetime import time ser = serial.Serial('COM3', 9600, timeout=0) text_file = open("voltages.txt", 'w') while 1: x=ser.readline() print(str(datetime...
2018/03/03
2,156
7,279
<issue_start>username_0: I have a model in R that includes a significant three-way interaction between two continuous independent variables IVContinuousA, IVContinuousB, IVCategorical and one categorical variable (with two levels: Control and Treatment). The dependent variable is continuous (DV). ``` model <- lm(DV ~ ...
2018/03/03
1,477
5,238
<issue_start>username_0: I am trying to encode my Realm database to JSON. Everything is working except the `List<>` encoding. So my question is, how would you encode `List<>`? Because the `List` doesn't conform to **Encodable** neighter **Decodable** protocol. Right now I am doing this: ``` @objcMembers class User: O...
2018/03/03
587
1,949
<issue_start>username_0: All my `kubectl get` commands are failing with the following error `The connection to the server localhost:8080 was refused - did you specify the right host or port?` I checked the ip of my `/etc/kubernetes/admin.conf` and it has the following apart from other stuff: `server: https://10.23.23....
2018/03/03
572
1,724
<issue_start>username_0: ``` def f1(t): if t < 0: return 0 result = 0 result = 1.5 * f2(t-1) + 3.5 * f1(t-1) return result def f2(t): if t < 0: return 1 result = 0 result = 1.5 * f1(t-1) + 3.5 * f2(t-1) return result for i in range(10): result = 0 result = f1(i)...
2018/03/03
1,072
3,483
<issue_start>username_0: I am new in this world, so any help is grateful for me. I want to get only ONE value of my database and see it in my website. By phpmyadmin I create a db and then a table. This is my table: [![enter image description here](https://i.stack.imgur.com/fwAbA.png)](https://i.stack.imgur.com/fwAb...
2018/03/03
214
850
<issue_start>username_0: After an email has been delivered, the entire content of the email is visible in the logs in production, which is really messy. Can I remove the email content from the logs just in production?<issue_comment>username_1: ``` ActionMailer::Base.logger = nil ``` or in your config/environments/{de...
2018/03/03
441
1,941
<issue_start>username_0: I have a simple question. As far as I know, if the variable scope ends, the variable is destroyed. But in the below situation, even if Derived is destroyed, the base pointer still calls the virtual function of the derived. Is it plain luck, or the Derived object will actually not be destroyed u...
2018/03/03
752
2,791
<issue_start>username_0: in this code i first ask the user for the trigonometric function and then ask for the angle in radians or degrees. according to the code, the console should print error, but on running the code, the first if statements accept any input as true.the final coputed value is also worng. please sugge...
2018/03/03
633
2,162
<issue_start>username_0: I am building a simple Rails app that has Users, Blogs, and Comments. The last thing I have to do is make a link on the blogs show page where comments show and have those links send the user to the `comment/:id/edit` page where they can edit their comment. However, I'm not able to grab the com...
2018/03/03
481
1,357
<issue_start>username_0: I want to display and compare he occurrence of all words after the word 'The' in Bash. Example: ``` The next generation will be ruled by the smartphones. The next thing is interesting to watch.The question is how do we solve this problem ``` So the output expected is: ``` next ...
2018/03/03
846
2,604
<issue_start>username_0: I'm trying to make a simple GUI with tkinter in Python 2.7. Yesterday it was working perfectly, but today it crashes for a very odd error: ``` sbar.pack(side=RIGHT, fill=Y) NameError: name 'RIGHT' is not defined ``` When I remove the arguments, there still is another error quite similar: ``...
2018/03/03
1,448
5,517
<issue_start>username_0: Problem ------- Let's say we have three documents: ``` [ { row: [ {identifier: 'a', value: 10}, {identifier: 'b', value: 24}, {identifier: 'c', value: 3}, ] }, { row: [ {identifier: 'a', value: 11}, {identifier: 'b', value: 75}, {identifie...
2018/03/03
646
2,293
<issue_start>username_0: Hi I'm trying to code basic console Pexeso game in C#. And I'm wondering how to generate one and only one pair of capital letters. So far my code can genereate string with random capital letters but I don't know how to control it to generate only two and only two from each one. ``` st...
2018/03/03
621
1,960
<issue_start>username_0: I am attempting to bubble sort the values in the array "A" using c++, but get error saying stack around variable A is corrupted? ``` #include #include using namespace std; int main() { int A[] = {5,7,8,2,4,3}; for (int i = 1; i <= 7 - 1; i++) { for (int j = 7; j >= i + 1; j--) { if ...
2018/03/03
2,364
6,913
<issue_start>username_0: I need to print a stored date (documentDate) in a specific locales format (localeIreland), so far I can only get it to print today's date with cal.getDate() is it possible to get Calendar to print using a stored date value? ``` String documentDate = "03/03/2018"; String pattern = "EEEEE MMMMM ...