date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/12
487
1,569
<issue_start>username_0: Is there an easy way to align multiple rows of text about a single character, similar to [this question](https://stackoverflow.com/questions/9891414/how-to-align-about-the-colon-in-each-line-of-text-like-movie-credits-often-do), but in bash. Also open to zsh solutions. What I have: ``` aaa:a...
2018/03/12
611
1,828
<issue_start>username_0: I need to increment a numeric value in a string: ``` my $str = "tool_v01.zip"; (my $newstr = $str) =~ s/\_v(\d+)\.zip$/ ($1++);/eri; #(my $newstr = $str) =~ s/\_v(\d+)\.zip$/ ($1+1);/eri; #(my $newstr = $str) =~ s/\_v(\d+)\.zip$/ $1=~s{(\d+)}{$1+1}/r; /eri; print $newstr; ``` Expected out...
2018/03/12
550
1,781
<issue_start>username_0: I'm cleaning up a program which should be able to replace all the **goto statements** with a more readable alternative. I encountered this kind of problem inside my loop. Here is the code. ``` for (int i = 0; i < 100; i++) { labelReturn: //Some Code for (int j = 0; j < 20; j++) { ...
2018/03/12
587
1,833
<issue_start>username_0: In PHP5 I used to bind Params like this: `mssql_bind($stmt,'@BIAC_MEMBER',$inMemberID,SQLVARCHAR); //Input` `mssql_bind($stmt,'@BIAC_RESULT',$outResult,SQLVARCHAR,true); //Output` Since `mssql_*` got removed in PHP7 and you need to work with PDO now I changed my connection to this: `$stmt =...
2018/03/12
556
1,856
<issue_start>username_0: I'm editing a Drupal that was created by a company who didn't follow Drupal best practices with the idea that only them can edit the theme. I'm having some problems with the footer and I would like to know where is the file that contains the footer html code, because in the theme I have donwloa...
2018/03/12
971
2,375
<issue_start>username_0: I have s script like below, which should use 'find' to copy all files end with extention (in the list I gave) to the destination directory. however, it's not working. I tried to change ' to '', ''', ","",""" in line start with 'find' but still no luck. could you please help to take a look, see ...
2018/03/12
455
1,218
<issue_start>username_0: I'm getting JSON values from the backend. I'm facing the problem in conversion of values. I'm getting the value as `greaterThan` and I should display it as `>` and I'm getting status as `1` and i need to display it as `on` in my frontend. How can I achieve that? Below are my JSON values ``` {f...
2018/03/12
6,096
14,514
<issue_start>username_0: I want to make a query against an entity , called Utilisateur : ``` @Override @Transactional public List list() { String hql = "from Utilisateur where deleted is null or deleted <> 1"; Query query = sessionFactory.getCurrentSession().createQuery(hql); @SuppressWarnings("unchecked") List...
2018/03/12
605
2,034
<issue_start>username_0: I've generated a project using `create-react-app`. index.js ``` import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import AuthProvider from './AuthProvider'; ReactDOM.render...
2018/03/12
734
2,154
<issue_start>username_0: I am basically trying to extract Section references from a long document. The following code does so quite well: ``` example1 = 'Sections 21(1), 54(2), 78(1) of Harry Potter' res = re.search(r'Sections?\W+(\w+)(\(\w+\))?(, (\w+)(\(\w+\))?)*', example1) res.group(0) ``` Output: 'Sections 21(...
2018/03/12
520
1,540
<issue_start>username_0: I have this PHP string : ``` $range = "['2018-03-17','2018-03-19','2018-03-18','2018-03-18']"; ``` I'm wanting to loop through the entire string, and do something like.. ``` if day == "Saturday" || day == "Sunday" and only one occurrence of this in string then { // Do something } else { // ...
2018/03/12
497
1,732
<issue_start>username_0: We are migrating old SharePoint 2010 On Premise code to SharePoint Online. Part of the SharePoint 2010 on premise code has **custom list forms** developed with visual Studio. Thought of using **JSLink** for custom forms while migrating the code to SharePoint Online but it seems that JSLink is ...
2018/03/12
370
956
<issue_start>username_0: i have dynamic string like following things: ``` ASD_3498dfknsdf 23423_askdjkl23493204 x_2394dslfk BBDF34_kasjdkasldj ``` in this situation, i need get this outputs: ``` ASD 23423 x BBDF34 ``` so, i have to get part of string before underscore. Thanks so much for your helps.<issue_commen...
2018/03/12
664
2,491
<issue_start>username_0: I am trying to find a clean and code efficient way to apply the transform method in guava optional to create an object, I am working with Java 8 with Guava. In one place of the code, I have an optional created . `Optional optional = Optional.of(objFromDatabase)` And in another area I am tryi...
2018/03/12
1,305
4,221
<issue_start>username_0: I have a csv file with column of company names and i need to find domain names of it and store it in the same csv file beside the company names **code i have used so far** ``` import pandas as pd import clearbit import json clearbit.key = 'your secret key' df = pd.read_csv("/home/vipul/Desk...
2018/03/12
1,029
3,661
<issue_start>username_0: I am very new to graphql... here is my server file... I not being able to establish the socket io connection ... when I do console inside socket io it does not go inside the function... I think I am doing something wrong here `const io = require('socket.io')(server)`... ``` var express = requ...
2018/03/12
2,639
9,792
<issue_start>username_0: I was creating a contact like app with TabLayout and RecyclerView, but am getting null object reference somewhere in my code, i just cant figure out where to patch things, Below is the file where am getting error: ``` import android.content.Context; import android.support.v7.widget.RecyclerVie...
2018/03/12
286
1,074
<issue_start>username_0: I have a `Dim` that retrieves the last write time of a folder ``` Dim lastWrite As DateTime = Directory.GetLastWriteTime("F:\data") ``` Which then updates to a label ``` Label1.Text = (lastWrite) ``` This works, however I am trying to call it again later on in my code by issuing the same ...
2018/03/12
568
1,830
<issue_start>username_0: i have written small ruby code to get publish stats, code is following ``` begin response = conn.get("api/queues") statistics = JSON.parse(response.body) statistics.each do |qDetails| payload = "#{qDetails["name"]}" if payload != "aliveness-test" puts "#{qDetails["message_...
2018/03/12
575
1,984
<issue_start>username_0: I have a task to implement expression 0..II to return [0, 1, 2] (same for all Roman numerals). I have looked up Proxy object concept and this works fine. ```js var handler = { get: function(obj, prop) { console.log(prop); x = parseRomanNumeral(prop); if (x) { return Array.from(...
2018/03/12
957
3,508
<issue_start>username_0: According to py3 [doc](https://docs.python.org/3/library/unicodedata.html#module-unicodedata): > > * **unicodedata.decomposition(*chr*)** > > > Returns the character decomposition mapping assigned to the character `chr` as string. An empty string is > returned in case no such mapping is def...
2018/03/12
429
1,381
<issue_start>username_0: I have an array of objects that looks similar to this one: ``` const myArray = [ { message: "foo", seen: false }, { message: "bar", seen: false }, { message: "foobar" seen: true } ]; ``` I would like to count the number ...
2018/03/12
279
845
<issue_start>username_0: My cell contains label and textview and i want to adjust the textview's height [![enter image description here](https://i.stack.imgur.com/7CQ8R.png)](https://i.stack.imgur.com/7CQ8R.png) the cell height should also be adjusted. please help Thanks<issue_comment>username_1: You could use `filt...
2018/03/12
334
977
<issue_start>username_0: I have one JSON object as below ``` JSON.stringify(obj) ``` Result: ``` { "e": { "name": "tushar", "id": "123", "tag": {} } } ``` Now I want name and id from above object. How to get array key value from JSON object? ``` dp.onEventClick = function(args) { ...
2018/03/12
543
2,108
<issue_start>username_0: I'm currently using EF6 and a service pattern for business rules. I have the need for transactions. Unfortunally, I'm don't have the deep knowledge about how EF manages transcations. Please look at the code below: ``` public class Service1 { private DbContext context; private string co...
2018/03/12
290
932
<issue_start>username_0: I use a server with WHM. I created monthly backup, it makes full server backup to /backup folder. I can create targz file with SSH, I know how to download gziped file with pscp, but I don't know how to download it from server with link in browser. I think it's possible, because sysadmin before ...
2018/03/12
734
2,432
<issue_start>username_0: In Django, I am generating tokens for account activation. Here is the actual code: ``` 'uid': urlsafe_base64_encode(force_bytes(user.pk)), 'token': default_token_generator.make_token(user), ``` For instance: `http://localhost:8000/reset/MjQ/4uf-785b6e83f11ac22b6943/` In the above url `MjQ`...
2018/03/12
673
2,356
<issue_start>username_0: I have simple app witch set of data about beers from api. I want to write way to set four parameters via alert dialog and it looks like my way is kind of primitive and complicated, it looks like: ``` private String createFilteredUrl() { String queryEndpoint = "?"; StringBuilder sb = ne...
2018/03/12
594
2,088
<issue_start>username_0: I use Atom on Ubuntu 17.10 with wayland window manager. I can create multiple cursors with `CTRL`+Mousclick or with `CTRL`+`d` to select the next same string. But how can I for example mark some lines and create a cursor at the start of each line? Also would be great to use search and find-a...
2018/03/12
561
1,800
<issue_start>username_0: This works fine but what I want to know is if there is a better way to do a search for tags in Laravel. Thanks. **Tag** model: ``` class Tag extends Model { public function noticias() { return $this->morphedByMany('App\Models\Noticia', 'taggable'); } // ... } ``` *...
2018/03/12
635
2,496
<issue_start>username_0: I've got a piece of code ``` list.add(new Person()) ``` Since the Person object is missing it's naming part ``` Person p = new Person() ``` What kind of name does this person object get assigned to? Is it important to know the name of the object? How would I go about accessing this obje...
2018/03/12
1,178
3,401
<issue_start>username_0: Suppose I want to compare the content of two dataframes, but not the column names (or index names). **Is it possible to achieve this without renaming the columns?** For example: ``` df = pd.DataFrame({'A': [1,2], 'B':[3,4]}) df_equal = pd.DataFrame({'a': [1,2], 'b':[3,4]}) df_diff = pd.DataFr...
2018/03/12
827
2,897
<issue_start>username_0: my program is supposed to go through all of the files in a given directory, and append a counter to the content of each file with the extension ".vm". however, it has an error "couldn't mach type [] with IO" in the append. if anyone can help i'll be geatfull my code: ``` import System.IO impo...
2018/03/12
1,083
4,051
<issue_start>username_0: I have a set of records (table [#tmp\_origin]) containing duplicate entries in a string field ([Names]). I would like to insert the whole content of [#tmp\_origin] into the destination table [#tmp\_destination], that does NOT allow duplicates and may already contain items. If the string in the...
2018/03/12
1,467
4,743
<issue_start>username_0: I have a long list of ints and I would like to calculate the percentage of numbers which are higher or above one tenth of the mean. That is, I want to calculate the percentile of the score `mean / 10`. Here is a naive approach (in Python, but that doesn't matter): ``` ls = [35,35,73,23,40,60,5...
2018/03/12
278
1,026
<issue_start>username_0: In our Ember app [v.2.14], we're using mirage to mock our APIs and have provided the direct response for our model 'car' mirage/config.js: ``` this.get('/cars', () => { return { "data": { "type": "car", "id": "1", "attributes": { "exists" : true } } } ``` In our...
2018/03/12
1,139
3,855
<issue_start>username_0: will appreciate any help! * I'm running on windows * I installed protractor Version 5.3.0 globally * Before updating webdriver I ran: `webdriver-manager clean` * And updated version as follows: > > webdriver-manager update --ie32 --proxy > <http://my-proxy:8080> --ignore\_ssl > > > * n...
2018/03/12
2,039
6,404
<issue_start>username_0: My configuration: ``` ubuntu 16.04 opencv 3.3.1 gcc version 5.4.0 20160609 ffmpeg version 3.4.2-1~16.04.york0 ``` and I built opencv with: ``` cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D PYTHON_EXECUTABLE=$(which python) -D OPENCV_EXTRA_MODULES_PATH=/home...
2018/03/12
3,496
11,621
<issue_start>username_0: I try to list all File-Records depending on the given categories. So I had problems to list all Files with the right categories and [asked about it here (solved)](https://stackoverflow.com/questions/49172750/typo3-typoscript-select-use-or-operator-in-where-condition/49175522). Now I got to the...
2018/03/12
666
2,379
<issue_start>username_0: We have a problem with Google Authenticator on iOS. We are using the below standard code snippet to generate a TOTP key ``` KeyGenerator keyGen = KeyGenerator.getInstance("AES"); keyGen.init(keySize); byte[] byteKey = keyGen.generateKey().getEncoded(); Base32 base32 = new Base32(); return base...
2018/03/12
504
1,929
<issue_start>username_0: I'm using Wordpress and the Woocommerce plugin. Further I have WPML Plugin installed for 4 languages. Additionally I'm using an Ionic 2 App, which is connected to the Shop with WP Rest API. I would like now to get the categories in the translated languages in the app. Following is the code to g...
2018/03/12
1,032
2,352
<issue_start>username_0: ``` df = spark.createDataFrame([ ("2017-Dec-08 00:00 - 2017-Dec-09 00:00", 80.65,"abc"), ("2017-Dec-09 00:00 - 2017-Dec-10 00:00", 100,"abc"), ("2017-Dec-08 00:00 - 2017-Dec-09 00:00", 65,"def"), ("2017-Dec-09 00:00 - 2017-Dec-10 00:00", 78.02,"def") ]).toDF("date", "percent",...
2018/03/12
2,335
9,444
<issue_start>username_0: i want to set icon and title in fragment but only able to display title not icon. Here is my code that i have done. ``` package com.amira.amira.amira.Board.Clothes; import android.content.Context; import android.graphics.drawable.Drawable; import android.support.v4.app.Fragment; import a...
2018/03/12
675
2,151
<issue_start>username_0: If I have an array: `["one", "two", "three", "thee", "four", "fowr"]` And a function that compares strings for likelihood of matching: `stringCompare('testing', 'testign')` outputs `0.7` What is the best way to filter the array based on the `stringCompare()` function's result - say remove ...
2018/03/12
745
2,899
<issue_start>username_0: I am trying to display a map using some link to call a mapquest map, like [this](https://developer.mapquest.com/documentation/static-map-api/v5/examples/basic/map-bounding-box/). This map is supposed to be displayed under a 3D model. This 3D model is displayed using Forge. Strange thing, I can...
2018/03/12
414
1,677
<issue_start>username_0: Hello I am kind of new to Javascript, I did write a function that adds a new input field to a webpage, but when the button is pressed the sites get new loaded and changes from before are gone. I want the new create fields to be with the new input and the old inputfields should be able also with...
2018/03/12
425
1,493
<issue_start>username_0: I try to have value of data-set with JQuery, but it returns undefined value and I don't know why: ``` " data-unite="php echo $art["unite\_lib"]; ?" data-qte="php echo $art["art\_solde"]; ?" data-perissables="php echo $art["perissable"]; ?"> php echo $art["lib\_art"]. " périssable : ".$art...
2018/03/12
325
1,307
<issue_start>username_0: I have updated all the plugins of Flatsome theme wordpress,and theme to latest version.After updation it ux builder shows loading. Front view for all user works properly ux builder not working i have increase memory limit also.[![enter image description here](https://i.stack.imgur.com/ZUIji.png...
2018/03/12
849
3,173
<issue_start>username_0: I am new on unity and I am dealing with a problem. Unity doesn't run my c# scripts in any component and in any project. Although unity reads all the values from the script, it won't execute the game as expected. On the script components it shows that the scripts are disabled, as you can see on ...
2018/03/12
2,207
7,383
<issue_start>username_0: I have a project having mercurial HG code source management,and try to migrate it on a VSTS/Git platform. I read that there is a tool for doing that, "[fast-export](https://github.com/frej/fast-export)"... So I tried but not did't achieve to do it working in Windows... Say I have `D:\MyProj...
2018/03/12
742
2,625
<issue_start>username_0: I have been using firebase cloud functions for some time now and did a minor bug fix today in my code and got the following error when tried to deploy. I undid that change and tried to deploy again with the last committed stable change, but still the same error. Any solutions? PS: This is a typ...
2018/03/12
379
814
<issue_start>username_0: I have a following dataframe: ``` id sum 123 12 234 12 345 50 124 23 111 20 116 20 ``` Now I want to subset dataframe where `sum` matches 100 or near to 100 desired dataframe would be ``` id sum 123 12 234 12 345 50 124 23 ```...
2018/03/12
887
2,959
<issue_start>username_0: I'm developping a plugin in frama-c and I want to get line number in source code. In this little script for example: ``` open Cil_types open Cil_types open Cil_datatype let print_loc kf = let locals = Kernel_function.get_locals kf in List.iter (fun vi -> let line = Cil...
2018/03/12
366
1,390
<issue_start>username_0: Recently I created a LUIS App for testing and see how it works. As you can see in the next image, the Intent "Actividades" (sorry about spanish words) has all that utterances. When I train LUIS and then test with words like "act" or "acti" it returns the Intent `Actividades`, which is fine. B...
2018/03/12
1,160
4,578
<issue_start>username_0: I'm trying to improve my code OOP wise. I have the tendancy to put some of my bussiness logic inside my Controller. Some people told me this is not desirable. I know that when you are working with Posts for example. You can simply put your bussiness logic in your `Post.php` Model. I now have...
2018/03/12
348
1,215
<issue_start>username_0: I am using below win API code to capture the active working window title in windows desktop. Is there any alternative in Qt for Ubuntu platform for this implementation ? ``` QString getActiveWndTitle() { char buff[256]; HWND hwnd = GetForegroundWindow(); GetWindowText(hwnd, (LPWSTR...
2018/03/12
1,258
3,996
<issue_start>username_0: in Laravel I want to change response if same user array have multiple response I get a response with this function **controller.php** ``` public function index(){ $reports = Report::all(); return $this->sendResponse($reports->toArray(), 'User Reports successfully.'); } ``` This is...
2018/03/12
380
1,498
<issue_start>username_0: `I am currently trying to extract from a database A (Oracle) different ID to db B (MySQL).` `I use Talend`. However the purpose is to automate this process so that newcomers to database `A can be added to db B automatically.` I would need to automate the job I have built. **I have no idea ho...
2018/03/12
566
1,790
<issue_start>username_0: As you can probably see, I'm new here. I've been searching for an answer to my question for an hour (yes, long time for this easy question) but I cannot find it. The example of what I have (these are text files with few lines of text, but I've got a bunch of files): ``` G:072 O:2 125/5 K:20...
2018/03/12
334
1,307
<issue_start>username_0: I have a database with the following structure and I am trying to get all rows from this table based on passing both the month and year using a where on the timestamp column (this will be a unix standard timestamp) ``` e.g month - 3, year - 2018 // get all rows for March 2018 only. // db stru...
2018/03/12
690
2,597
<issue_start>username_0: I want to create reminder app I have searched a lot of places but couldnt find a clean sequential explanation of how to start a service (or if thats not possible then an activity) at a specific time daily using the AlarmManager? i want start service at specific date and time and for example S...
2018/03/12
696
2,906
<issue_start>username_0: An executable script usually looks like this: ``` import modules define some CONSTANTS, Classes, functions if __name__ == "__main__": really_do_something() ``` Recently I saw a script using the negated form of the commonn idiom: ``` if __name__ != "__main__": print('The executable m...
2018/03/12
559
1,956
<issue_start>username_0: I am trying to implement a simple "hover on a comment to show a reply button" implementation in my angular application. Is there a way to achieve this effect by using template reference variables only? Something along the lines of... ``` #### {{comment.text}} 3 replies reply ``` Ob...
2018/03/12
624
2,191
<issue_start>username_0: I've never done anything like this before, but I have been asked to write a script to automatically map a network drive for new starters, and I'd like some help please! I believe I can do this using a .bat file. It is for an external customer, but I can VPN onto their server. The script will h...
2018/03/12
745
1,625
<issue_start>username_0: Can I refer to groups in a foreach loop? my code below works: ``` @SEP_line=grep(/,\s(SEP[A-F0-9]*),\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}),\s(\+\d+),\s.*,\s(\w+)\n$/, @lines); foreach (@SEP_line) { /,\s(SEP[A-F0-9]*),\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}),\s(\+\d+),\s.*,\s(\w+)\n$/; ...
2018/03/12
640
2,628
<issue_start>username_0: I am using angular 1.4.4 (module based architecture). Below is my file structure. I am trying to call rest API(written in spring-boot) from service class. However, I am getting the error in the TypeError: Cannot read property 'get' of undefined. [![enter image description here](https://i.stack....
2018/03/12
415
1,338
<issue_start>username_0: I have some codes that gets some input from url and I run my functions on this input, here is part of my code: ``` @app.route('/input', methods=['POST', 'GET']) def index(): if request.method == "GET": user_input = request.args.get('text') return myfunc(user_input) ``` wh...
2018/03/12
984
3,636
<issue_start>username_0: I need to display a spinner while sending a synchronous Ajax request to the server to retrieve data. I know it is better to do it in asynchronous mode but I'm not allow to do it. I also know sync ajax request blocks the browser. I already found a solution with a setTimeout to delay the call o...
2018/03/12
295
1,203
<issue_start>username_0: I have a list in activity with dynamic data.When i click on a button inside list item,I want to hide any text from list item.From adapter class it can be possible to get views from custom layout but from activity how to do this?<issue_comment>username_1: ``` First Create local Variable in adapt...
2018/03/12
818
3,126
<issue_start>username_0: I want to use native Material-ui component but have this error in browser : index.js:2178 Warning: Failed prop type: The prop `children` is marked as required in `AppBar`, but its value is `undefined`. My component is: ``` import React from 'react'; import AppBar from 'material-ui/AppBar'; ...
2018/03/12
816
3,148
<issue_start>username_0: I called one method from child. In child component: ``` @Output() parentEvent = new EventEmitter(); click1() { //calling the method from child this.parentEvent.emit(myObj1); } ``` In parent component: ``` postMethod1(event) { //calling one post method(observable) } ``` I need to ...
2018/03/12
910
3,073
<issue_start>username_0: In Django, I have programmed a form in which you can upload one image. After uploading the image, the image is passed to another method with the type TemporaryUploadedFile, after executing the method it is given to the HTML page. What I would like to do is display that TemporaryUploadedFile as...
2018/03/12
1,190
3,511
<issue_start>username_0: I am stuck in formatting my `String` value to be used as `JSONObject`. After consuming client side API I am getting below response: ``` { "apiKey": "537563615208489705083657373", "data": "{\"Apparent Power kVA\":14.4,\"Grid Duration\":7990260,\"Grid MD kW\":0.59,\"Grid MD kVA\":0.59,\"Voltag...
2018/03/12
973
3,924
<issue_start>username_0: I am trying to load some data into `UITableView` from a database but the delegate functions used to populate the `tableView` executes and returns an empty table before I have had a chance to retrieve the data to be displayed in `tableView`? Please can someone advise? Here is my code: ``` ...
2018/03/12
748
2,651
<issue_start>username_0: I need help with a query *that finds **all tables** containing **a set of columns*** (not one column). I'm thinking about building a stored procedure or something that can take a comma separated list of columns and then return the table names. Preferably it should also work with temporary tabl...
2018/03/12
589
1,995
<issue_start>username_0: ``` this.setState({text})} value={this.state.text} /> ``` The function onPress call is: ``` inputField() { console.log('Clicked') } ``` i can't find any solution y its not working i tried changing `onPress` to `onPress={() => { console.log('Clicked') }}` it still didn't work Can...
2018/03/12
313
1,177
<issue_start>username_0: I would like to use a prepared statement in a subquery. Simple example: ``` PREPARE get_series(int) AS SELECT * FROM generate_series(1,$1); SELECT * FROM EXECUTE get_series(13); ``` But I am getting a syntax error. As an alternative I could use a stored procedure, but the whole idea is to ...
2018/03/12
981
3,237
<issue_start>username_0: So I have a list of users in my Redux state that looks like this: ``` const users = { byId: { "1237": { id: "1237", name: "Fred", email: "<EMAIL>" }, "1235": { id: "1235", name: "James", email: "<EMAIL>" }, "1234": { id: "1234", name: "John", email: "<EMAIL>" }, }, al...
2018/03/12
552
1,934
<issue_start>username_0: I am using Grails 3.1.1 Last month, I had my project, but my hard-disk became corrupted because of a bad sector. I tried bringing my hard-disk to a "Recovery DATA"'s store. But that store cannot recover my data, so my project's data is gone now. But I still have the War file on my customer's...
2018/03/12
621
2,023
<issue_start>username_0: I've only just begun to learn Java and i'm trying to switch multiple booleans based on input. I want to do this in a method that is scaleable and a little more elegant than writing out an if statement for every possibillity. the idea is this: ``` int vikingcount = (input.nextInt()); while (vik...
2018/03/12
203
589
<issue_start>username_0: how can I get a list of all roles and all the privileges I assigned to them (select, insert, delete... etc) in IBM DB2<issue_comment>username_1: I had the same issue just 2 weeks ago... and in DB2. Simply run this query: ``` SELECT * FROM SYSIBMADM.PRIVILEGES ``` For more info go here: <htt...
2018/03/12
362
1,035
<issue_start>username_0: What may be the regex for allowing 17 digits with or without spaces in-between any number of the characters? I am using a OCR real-time capture SDK (ABBYY RTR SDK) on Android(, and I'm using a custom data capture (which has to capture 17 digits with or without spaces in-between anywhere) My re...
2018/03/12
2,859
11,034
<issue_start>username_0: i have the following action in my action file. ``` import axios from 'axios'; import $ from 'jquery'; var CancelToken = axios.CancelToken; var source = CancelToken.source(); export const FETCH_WORKERJOBS = 'fetch_workerjobs'; export function fetchWorkerJobs(page, size, where, sort) { con...
2018/03/12
623
1,690
<issue_start>username_0: I'm trying to convert the array to map, The array looks like : ``` var array = [{ "id" : 123 }, { "id" : 456 }, { "id" : 789 }]; ``` The final object I'm trying to build should look like : ``` var result = { "123": { id: 123 } , "456": { id: 456 } , "789": { id: 789 } }; ```...
2018/03/12
1,171
2,882
<issue_start>username_0: I want to fetch only a particular category that belongs to an email from Microsoft Graph / Outlook endpoint. But is gives me all the categories which are present in associated email. [<https://graph.microsoft.com/beta/me/outlook/masterCategories/>?$filter = displayName eq 'Red category'] Abov...
2018/03/12
454
1,782
<issue_start>username_0: App is installing while connecting via USB to mobile, but while sending .apk file to others it saying "App not Installed"(both debug and release).I have tried different solutions from stackoverflow but none worked for me. 1.How to overcome app not installed error when building from Android Stu...
2018/03/12
774
2,297
<issue_start>username_0: **Objective:** to find digits that start at the beginning of a sentence and change the number in place to equal the original number plus 10%. ``` msg_orginal = """Hello, I am new here. 2,431 other coders are new here too. Imagine if 2.5 were not new here? 2,428.5 would then be new.""" ``` ...
2018/03/12
1,201
2,428
<issue_start>username_0: Let's say we have a nested list with 3 levels (D1=2,D2=3,M=2), like: ``` l = [[[1,a],[2,b],[3,c]], [[4,d],[5,e],[6,f]]] ``` I'm trying to figure out if there is any pythonic way to build 2 new nested lists with 2 levels (D1=2,D2=3), like: ``` l1 = [[1,2,3], [4,5,6]] l2 = [[a,b,c], [d,e,f]] ...
2018/03/12
671
2,205
<issue_start>username_0: I am learning javascript and I got kind of stuck with ES6 syntax while trying to give a default value to a variable when destructuring. Basically, I am trying to assign a variable giving the value of an object's property to it and if the value is false/null/undefined, I want it to be an empty o...
2018/03/12
360
1,266
<issue_start>username_0: I am using collapsing toolbar with nested `ScrollView` in Registration fragment, But the register button at the bottom is not fully displaying for the first time when I click on some edit text and opens keyboard if I scroll to bottom then the button is fully visible. The image is attached belo...
2018/03/12
451
1,608
<issue_start>username_0: Guys I'm trying to get the result form my database by laravel 5.5. If I run this code: ``` DB::table('comments')->get() ``` It will return an array which contains stdClasses. Now I want the key(index) of each stdClass in the array be ID of the stdClass. I just want to know that laravel has ...
2018/03/12
2,001
7,999
<issue_start>username_0: Hello there I am learning pointers so I created a calculator. I managed to return the value and the pointers from a function but by declaring them globally. How can I declare them locally? ``` #include #include ``` Declaration of all functions ``` int Addition(); int Subtraction(); int De...
2018/03/12
1,191
4,609
<issue_start>username_0: Question is simple, I would like to open any pdf or doc file via default App with using Flutter. Think a Raised button that related my pdf asset, when user press it, pdf will be opened via Acrobat reader or etc. I don't want to use any web\_view for it. is it supported in Flutter?<issue_comm...
2018/03/12
816
2,511
<issue_start>username_0: I have a client who has an http SEO'ed wordpress site, with https AdWords static html landing pages (I know - don't ask). They want to 301 all non-www to www. I tried the following htaccess code: ``` RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) http://www.example.com...
2018/03/12
470
1,741
<issue_start>username_0: I am using this library: <https://github.com/andpor/react-native-sqlite-storage> for my react native project. I retrieve single row from database like this: ``` db.transaction((tx) => { tx.executeSql('SELECT * FROM user where id = 1', [], (tx, results) => { console.log("Q...
2018/03/12
477
1,325
<issue_start>username_0: how i can check time difference between two time fields,having 24 hours consider my table "tb1",that has following fields id,startTime,endTime we need find out sum of time difference between(startTime,endTime) has 24 hours with add number min as total records.that means if total difference 14...
2018/03/12
280
980
<issue_start>username_0: In a sharepoint site I have the following div that I need to call it. Problem is in SP sites the id is dynamic and it is bad idea to use, but I don't know any other way to call the div? Any suggestion? ``` Rich text editor no & (Title) no & (Title) field value. ```<issue_comment>usernam...
2018/03/12
1,033
2,832
<issue_start>username_0: I have a dataframe where each unique group has 4 rows. So I need to group by columns that makes them unique and does some aggregations such as max, min, sum and average. But the problem is that I have for some group all NaN values (in some column) and returns me a 0. Is it possible to return ...
2018/03/12
471
1,531
<issue_start>username_0: I am getting the following error while setting the `content-security-policy` using Angular4. **Error:** > > Refused to connect to > 'ws://localhost:4200/sockjs-node/812/lxo2oeas/websocket' because it > violates the following Content Security Policy directive: "default-src > 'self' 'unsaf...
2018/03/12
1,324
4,134
<issue_start>username_0: In C#, I can do this. ``` [Flags] enum BeerProperty { Bold = 1, Refreshing = 2 } static void Taste(BeerProperty beer) { if (beer == (BeerProperty.Bold | BeerProperty.Refreshing)) { Debug.WriteLine("I can't qutie put my finger on..."); } } static void Main(string[]...