_id
stringlengths
2
6
partition
stringclasses
3 values
text
stringlengths
4
46k
language
stringclasses
1 value
title
stringclasses
1 value
d3401
train
Sorry what do you mean by the scheduled "build"? * *Do you want the Multi-Branch to check for more branches on your given interval? If so you can only do it by "Scan Multibranch Pipeline with defaults Triggers" *Do you want to issue a build on the branch when there is change on it? Noted that the option in t...
unknown
d3402
train
connection.setDoInput(true); forces POST request. Make it connection.setDoInput(false); A: The issue that I ran into with the OP's code is that opening the output stream...: OutputStream os = connection.getOutputStream(); ...implicitly changes the connection from a "GET" (which I initially set on the connection via se...
unknown
d3403
train
I wouldn't use for-each at all. The following stylesheet solves your problem in a more idiomatic way: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- the number of items to include in each group --> <xsl:variable name="group" select="3" /> <xsl:template match="/"> ...
unknown
d3404
train
The following will extract alt_tbl.sql from the file abc.txt: with open('abc.txt') as f_input: text = f_input.read() file_name = text.split(' ', 2)[1] print file_name A: With a csv reader will be more apt with a check for quotes using csv sniffer to check for multiple delimiters import csv scndval=None li...
unknown
d3405
train
Like this: SELECT col, rn, (rn - 1) / 10 AS trunc FROM (SELECT col, row_number() over (order by col) as rn FROM data ) t WHERE mod(rn,10)=0 or mod(rn,10)=1 ORDER BY (rn - 1) / 10 DESC ; Result: +------+----+-------+ | col | rn | trunc | +------+----+-------+ | 11 | 11 | 1 | | 20 | 20 | ...
unknown
d3406
train
When using "attr" just pass the variable as a plain string instead of wrapping it with template literals. Using children is not possible there i guess.
unknown
d3407
train
You can, of course, create a project on mounted network drive via File/Open, but note that this is not officially supported. All IDE functionality is based on the index of the project files which PHPStorm builds when the project is loaded and updates on the fly as you edit your code. To provide efficient coding assista...
unknown
d3408
train
Try this below xpath. Explanation: User value attribute of input tag. driver.findElement(By.xpath("//input[@value='Log In']")).click(); For click on Lock and Edit button use this code. driver.findElement(By.xpath("//input[@value='Lock & Edit']")).click();
unknown
d3409
train
First, incredibly slow is of course dependant on the compute power you are throwing at your problem, the exact models you tried, and of course the type of data the models are processing. So, as a small disclaimer, if the compute and the data are causing a bottleneck now, smaller and simpler models may still perform slo...
unknown
d3410
train
I was facing the same problem when I was trying to use the MailGun to send e-mails using REST API. The solution is to use HTTP instead of http. ionic 2 provides the class [HTTP]: http://ionicframework.com/docs/v2/native/http/ . In your projects root folder, run this command from the terminal: ionic plugin add cordova-p...
unknown
d3411
train
The steps to enable WNS for your UWP app have changed, but the documentation has not yet been updated. To enable WNS: * *Register for a developer account at developer.microsoft.com *Create a new app - you can do this through Visual Studio by right clicking your UWP app > Store > Associate app with store *In Micro...
unknown
d3412
train
This is C code : #include <stdio.h> int main() { FILE *fp; int i = 0; fp = fopen("configFile.conf", "r"); if(fp == NULL) // To check for errors { printf("Error \n"); } char a[20][20]; // Declared a 2D array char b[20][20]; char c[20][20]; while (fscanf(fp, "%s\t%s\t%s", a[i], b[...
unknown
d3413
train
I'm guessing that your customers and suppliers have some things in common (username and password, logging in to your site, etc), but they are just able to access different controllers/views/features etc. If you were to create two Devise models, it seems like you'd be creating a bunch of repetition. This seems like a gr...
unknown
d3414
train
The problem is this line of the stack trace: Caused by: java.lang.ClassNotFoundException: sample.view.Dashboard This means that the FXML loader could not find a class named Dashboard in package sample.view. The FXML loader looked for this class because that is what was written in file Dashboard.fxml, namely: <AnchorPa...
unknown
d3415
train
import pandas as pd def calculate_break_level(row): if row.Qty >= row.BuyQty3: return row.BuyQty3Cost elif row.Qty >= row.BuyQty2: return row.BuyQty2Cost else: return row.BuyQty1Cost # apply the function row-by-row by specifying axis=1 # the newly produced Line_Cost is in the last ...
unknown
d3416
train
I would think that you could get an answer by reading the solution to this question: internal string encoding . By utilizing Reponse.Codepage you can affect how posted variables are interpreted. And as I understand you can then switch back to wichever encoding you like. [Update] Because you are using an iframe it is t...
unknown
d3417
train
I'd get the unique values in id1 and id2 and do a join using data.table's cross join function CJ as follows: # if you've already set the key: ans <- f[CJ(id1, id2, unique=TRUE)][is.na(v), v := 0L][] # or, if f is not keyed: ans <- f[CJ(id1 = id1, id2 = id2, unique=TRUE), on=.(id1, id2)][is.na(v), v := 0L][] ans A: ...
unknown
d3418
train
The problem is that you are querying whether or not an object matches a subdocument, and this can be tricky. What you want to do use a combination of $elemMatch and $ne in your query. var query = { _id: 'pickable_qty', 'locks': { $elemMatch: { merchant_warehouse_id: { $ne: 1...
unknown
d3419
train
Figured out a solution... Environment: Ubuntu Server 14.04 Build and install OpenFST: mkdir openfst cd openfst wget http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.5.0.tar.gz tar zxf openfst-1.5.0.tar.gz cd openfst-1.5.0 ./configure make sudo make install The Magic: sudo CFLAGS="-std=c++0x" pip install pyfs...
unknown
d3420
train
maybe you can try browserify which allow you to use some npm modules in browser. A: Converting my comment into an answer... The natural module says it's for running in the node.js environment. Unless it has a specific version that runs in a browser, you won't be able to run this in the browser. A: have you install t...
unknown
d3421
train
If I'm not mistaken about your question, you basically ask the following: You have an XML file, which is updated, on some event from user. The page, which is displayed to the user is based on this XML file. What info will users see, when multiple users are working with the application? This greatly depends on how you...
unknown
d3422
train
@Tsyvarev this. I needed to change the COMPONENTS as "python27". This behavior definitely changed over the time. I don't remember having to do this at boost release >= 1.65 <= 1.67. Thanks.
unknown
d3423
train
Maybe like this? It's a lot of style inline, but seem to get the job done... https://codesandbox.io/s/bosky-active-forked-bcbd35?file=/src/Components/Footer.js
unknown
d3424
train
Copy your google-service.json file to root folder (that contains www, config.xml etc). Step 1: Login to your firebase console. Step 2: On Project Overview Settings, Copy the Cloud Messaging ServerKey My key ex: `AAAAjXzVMKY:APA91bED4d53RX.....bla bla Step 3: Replace the key define( "API_ACCESS_KEY", "My key"); Fin...
unknown
d3425
train
You need to use HomeAddress = new Person.Address{ City = "SoKa" , Country = "Look" } instead of HomeAddress = { City = "SoKa" , Country = "Look" }
unknown
d3426
train
I think GridBagLayout is the best to achieve this design. Here is a full working example for you that will look like this: JFrame frame = new JFrame(); JPanel panel = new JPanel(); panel.setLayout(new GridBagLayout()); GridBagConstraints gc = new GridBagConstraints(); gc.gridx=0; gc.gridy=0; gc.fill = GridBagConstrai...
unknown
d3427
train
The problem here is that the "gotElement" message is emitted before the listener is attached. You can fix it with: setTimeout(_ => self.port.emit("gotElement", document.location.href)); Afaict you don't need the contentScript, just do what you wanted to do in the onAttach handler.
unknown
d3428
train
Just remove the .dat prefix in filter: {dat.product_name : textname}. <div ng-repeat="dat in details | filter: {product_name : textname}"> <hr/> <p style="color:#4C97C8;" class="lead"><strong>{{dat.product_name}}</strong></p> <ul> <li><b>Product:</b><span> {{dat.product_name}}</span></li> <...
unknown
d3429
train
try this: rvm get head rvm pkg remove rvm reinstall 1.9.2-p320 --with-opt-dir=$(brew --prefix imagemagick)
unknown
d3430
train
This is theoretical and I don't have code to add, but you could create an identical button and add it for UIControlStateTouched so there's no change when the button/image is touched.
unknown
d3431
train
To get the desired output, your regex should be: ((.*?)\.(.*)) DEMO See the captured groups at right bottom of the DEMO site. Explanation: ( group and capture to \1: ( group and capture to \2: .*? any character except \n (0 or more times) ? after * makes the regex engine to d...
unknown
d3432
train
First, you did seem to leave out the web method directive on your general function. And your ajax call should thus include the web method. eg: [WebMethod] Public static function toggleSetting(setting, ctrl) { But a ajax call means your code behind will run just fine, but you can't update any control attributes becau...
unknown
d3433
train
The react router structure usually follows 1 Switch 1 Router and multiple Routes <Router> <Switch> <Route exact path="/"> <HomePage /> </Route> <Route path="/YOUR_PATH"> <BlogPost /> </Route> </Switch> </Router>, You are returning multiple Router in RouteWithSubRoutes...
unknown
d3434
train
You can get a list of all running or active apps and then check if the App you want to start is in it. ActivityManager activityManager = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); List<RunningAppProcessInfo> runningProcInfo = activityManager.getRunningAppProcesses(); for(int i = 0; i < runningProcInfo...
unknown
d3435
train
I have tried cleaning your data manipulation process by preparing the data before plotting. library(dplyr) library(plotly) library(ggplot2) p1 <- data_a %>% filter(grepl('\\d+', datainput)) %>% mutate(datainput = as.numeric(datainput), row = as.numeric(`...1`), verification = ifelse(verificatio...
unknown
d3436
train
I think I found something really close to what I wanted with this library: SRML: "String Resource Markup Language"
unknown
d3437
train
Try to set one more cURL option. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); Also try to use curl_multi_exec. A: Use file_get_contents($url) example with User Agent <?php // Create a stream $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"Accept-language: en\r\n" . "Cookie: foo=bar\r...
unknown
d3438
train
You cannot use .find() with multiple tag names in it stacked like this. You need to repeatedly call .find() to get desired result. Check out docs for more information. Below code will give you desired output: soup.find('div').find('span').get_text() A: r = requests.get(url) soup = bs(r.content, 'html.parser') desc = ...
unknown
d3439
train
You need to put the \ at the end of each line, not before the &&. Make sure there is no whitespace after the \. A: As long as the && is the last non-whitespace token on the line, the command will automatically continue onto the next line. if [ "$PASSWDCHECK" = "<title>401 Authorization Required</title>" ] then echo "T...
unknown
d3440
train
Dont mix onclick attributes with event handlers, its messy and can cause errors (such as mistaking the scope of this, which i believe is you main issue here). If you are using jquery make use of it: First add a class to the links you want to attach the event to, here i use the class showme: <a href="#;" data-id="1" cla...
unknown
d3441
train
Linuxrc (/linuxrc, also common name /init) on desktop OSes is on initramfs(ramdisk). Usualy this in script that probed modules, creates temporary device nodes in /dev, waits and mount rootfs, switches to real root. If initramfs is not used it may by symlinked to init. Systemd uses udev to create /dev/ tree so it non ne...
unknown
d3442
train
your missing the the units of the value try: .langs { background-color: #90A090; position:absolute; right:4px; /* right:0; is ok but right:4; will fail */ top:4px; } But you are expected to set position relative to the parent, for better results xD form#form2 { position: relative; }
unknown
d3443
train
The manual of rename does not match your expectations. I see no regex capability. SYNOPSIS rename [options] expression replacement file... DESCRIPTION rename will rename the specified files by replacing the first occur‐ rence of expression in their name by replacement. OPTIONS -v, --ver...
unknown
d3444
train
try { stuff() } catch( NullPointerException e ) { // Do nothing... go on } catch( FileNotFoundException e ) { // Do nothing... go on } catch( Exception e ) { // Now.. handle it! } A: You can do this as @daniel suggested, but I have some additional thoughts. * *You never want to 'do nothing'. At least...
unknown
d3445
train
In the unwarn command db.delete(`warn.${Wuser.id}`) Instead of this add to the db db.add(`warn.${Wuser.id}`, -1); or subtract from the value db.subtract(`warn.${Wuser.id}`, 1);
unknown
d3446
train
If you're using jQuery to intercept the click event like so... $(this).click(callback) you need to get creative because .hasClass('active') doesn't report the correct value. In the callback function put the following: $(this).toggleClass('checked') $(this).hasClass('checked') A: you can see what classes the button h...
unknown
d3447
train
For sum += n-- the following operations are performed * *add n to sum *decrement n With sum += --n * *n is decremented *the new value of n is added to sum n-- is called postdecrement, and --n is called predecrement A: That has to do with post- and predecrement operations. Predecrement operations first decrease...
unknown
d3448
train
Sometimes this kind of issues are caused by another credential configuration. Environment variables credential configuration takes prority over credentials config file. So in case there are present the environment variables "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY" or "AWS_SESSION_TOKEN" these could generate issues ...
unknown
d3449
train
You can pass the number (bill/transaction) this.router.navigate(['/edit-transaction-portal'], { queryParams: { bill: 'U001' } }); this.router.navigate(['/edit-transaction-portal'], { queryParams: { transaction: 'U001' } }); then in your component(edit-transaction-portal) hit the api to get the data. In component you s...
unknown
d3450
train
Swap the colors and the order of the panel.histograms calls. That is, plot the gray histogram first.
unknown
d3451
train
So in JSON format, a key has to be a string. Just that ruby allows you to have pretty much anything as a key of the hash, doesn't mean it will be compatible with the JSON standard. I will suggest you to change the format of your data so you can produce something like this: # It is JSON, not ruby { "ops_headers": [ #...
unknown
d3452
train
There a at least two separate problems here. The first is the inclusion of the automatically generated <sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core"> <section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAu...
unknown
d3453
train
I found a solution. Call element.select(); before changing the value.
unknown
d3454
train
I found an answer here and modified it a bit to make it more usable. Here is my code that works on gnome. You might have to adjust the escaped windows names for other gdms. import Xlib.display #Find out if fullscreen app is running screen = Xlib.display.Display().screen() root_win = screen.root def is_fullscreen(): ...
unknown
d3455
train
Just apply that isnan on a row by row basis In [135]: [row[~np.isnan(row)] for row in arr] Out[135]: [array([1., 2., 3.]), array([4., 5.]), array([6.])] Boolean masking as in x[~numpy.isnan(x)] produces a flattened result because, in general, the result will be ragged like this, and can't be formed into a 2d array. T...
unknown
d3456
train
I think that you are missing things. One thing is to call CRIS (and watch out I think that you are using an outdated SDK, take a look at the new one and also to the docs), and another thing is to call LUIS, which is another SDK (this one). Once you get the output of CRIS, you can just call the LUIS SDK to send the que...
unknown
d3457
train
The 46 in this line: nColors = (int)getImageInfo(bmpInput, 46, 4); ...refers to the bit offset into the header of the BMP. Unless you are creating BMPs that do not use this file structure it should theoretically work. He is referring to 8-bit images on that page. Perhaps, 16 or 32-bit images use a different file st...
unknown
d3458
train
You can access it with grid.store._dirtyObjects
unknown
d3459
train
http://php.net/manual/en/function.html-entity-decode.php $str = "this 'quote' is &lt;b&gt;bold&lt;/b&gt;" html_entity_decode($output) // output This 'quote' is <b>bold</b> http://php.net/manual/en/function.htmlentities.php $str = "This 'quote' is <b>bold</b>"; htmlentities($output); // output this 'quote' is &lt;b&gt;...
unknown
d3460
train
The name of your variables requires good descriptive skills and a shared cultural background. In this case you should use row and col but don't forget the scope of your variables. I would like recommend you read the Book: Clean Code. Especially you can review some of the proposed rules on this post (http://www.itise...
unknown
d3461
train
SELECT a[2] AS FirstName, a[1] AS LastName, a[3] AS ID FROM ( SELECT regexp_matches(column_name, '(.+), (.+) \((.+)\)') FROM table_name ) t(a)
unknown
d3462
train
The trick with using AudioRecord is that each device may have different initialization settings, so you will have to create a method that loops over all possible combinations of bit rates, encoding, etc. private static int[] mSampleRates = new int[] { 8000, 11025, 22050, 44100 }; public AudioRecord findAudioRecord() { ...
unknown
d3463
train
You are looking for #region #region foo public static foo() { } #endregion foo However, using regions is frowned upon. A: the name comes after the # #region MyClass definition public class MyClass { .... } #endregion Reference: https://msdn.microsoft.com/en-us/library/9a1ybwek.aspx
unknown
d3464
train
I got a solution, effectively the problem is much more simple that the 'SkyScrape & Fences' puzzle I solved previously. I'm afraid I previously misunderstood the problem and placed a wrong comment, suggesting you to abandon the (right) path you already took. /* File: second_end_view_puzzle.pl Author: Carlo,,, ...
unknown
d3465
train
You can use .stack() as follows. Using .stack() is preferred as it naturally resulted in rows already sorted in the order of RecordID so that you don't need to waste processing time sorting on it again, especially important when you have a large number of columns. df = df.set_index('RecordID').stack().reset_index().re...
unknown
d3466
train
There are a couple ways to solve it. The easy/hack way to do it is to employ the re.escape() function. That function can be thought of as an equivalent to PHP's addslashes() function, though it pains me to make that comparison. Having said that, my reading indicates psycopg2 takes advantage of PEP 249. If that's true, ...
unknown
d3467
train
Seems the problem was in the environment variables. I checked them and there was DOCKER_HOST pointing to 192.168.99.100, after deleting it everything's working fine. Where it comes from is still a mystery. A: I got the same problem. The problems was: I used to have Docker Toolbox on my PC before. So, I had Environment...
unknown
d3468
train
I believe that Constant Throughput Timer is what you're looking for. In regards to "separate groups" - you can set thread number as a property for, the same for all groups, and set this property during JMeter execution via jmeter.properties file or -J command line argument like: Set "Number of Threads" in Thread Group...
unknown
d3469
train
I don't know about an API that you can use. However I found a research paper on ML model that predicts travel mode on the basis of GPS information. If you have sufficient time to develop your own AI model you may try this: AI model Predicting travel mode
unknown
d3470
train
select ( select count(*) from Tasks where IsDone = 1 for xml path('CompletedCount'), type ), ( select TaskName, case IsDone when 1 then 'True' else 'False' end as IsDone f...
unknown
d3471
train
Did you reference WindowsAzure.Storage yourself in project.json? You shouldn't, because that one is already referenced for you by the environment. You should use #r to reference this one: #r "Microsoft.WindowsAzure.Storage" using Microsoft.WindowsAzure.Storage.Blob; This is simply set in your function itself. learn.mi...
unknown
d3472
train
As the $scope attributre should be dynamic and saved in variable bind use: listenToUrl: function (scope, moduleName, stateName, bind) { scope.$on('$locationChangeSuccess', function (event) { // use scope like an associative array scope[bind] = urlFactory.parseState(moduleName, stateName); }); } In the con...
unknown
d3473
train
Try this for your ImageView: <ImageView android:id="@+id/mudImg" android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" android:src="@drawable/icon_m0_r" android:visibility="visible" /> adjustViewBounds="true" tells the ImageView to set the heig...
unknown
d3474
train
I changed my application.js to //= require selectize/standalone/selectize I figured it out by looking at the load paths ~/.rvm/gems/ruby-2.3.1/gems/rails-assets-selectize-0.12.3/app/assets/javascripts and found standalone was in /selectize/standalone/selectize.js I knew to look there by looking at their examples.
unknown
d3475
train
The "403 Token invalid" error usually occurs if you missed giving permissions to particular scope (Azure Service Management). By giving this scope it enables you to access https://management.azure.com To resolve this error, please follow below steps: Go to Azure Ad ->your application -> API permissions -> Add permissio...
unknown
d3476
train
This works for the first article in the list - the dialog opens, but the orther articles open in a separate page. I am assuming this is because the ids are not unique. You're right, having 2 or more elements with the same ID is invalid HTML and will cause you all sorts of problems. Remove the id attribute and use ...
unknown
d3477
train
Looks like you can work around this by supplying a dict to Series.fillna. >>> df FocusColumn 0 NaN 1 1.0 2 NaN >>> df['FocusColumn'].fillna({i: [] for i in df.index}) 0 [] 1 1 2 [] Name: FocusColumn, dtype: object Notes: * *Surprisingly, this only works for Series.fillna. *Fo...
unknown
d3478
train
As per the open graph documentation you should use 1:1 i.e square images, apart from that remove the yoast seo plugin and add the meta tags manually (i used a plugin called scripts and styles). This helped me solve the problem for the thumbnail in WhatsApp for ios. You might also want to add another meta tag with a rec...
unknown
d3479
train
try this add z-index: 100; so its work .sub-menu { z-index: 100; } { margin: 0; padding: 0; } #menu { text-align: center; padding: 10px; } #menu ul { list-style-type: none; text-align: center; } #menu li { display: inline-block; padding: 10px; position: relative; } #menu ...
unknown
d3480
train
I ended up using Karma with jasmine. Setting it to browser mode means no modules and no strict mode, yay.
unknown
d3481
train
Instead of using render @trading_cards to loop through your TradingCards for you. You could do that yourself in slices of 3 (as @alfie suggested). <% @trading_cards.each_slice(3) do |cards| %> <div class="row"> <% cards.each do |card| %> <%= render card %> <!-- This will render your `_trading_card` partia...
unknown
d3482
train
There's an extra </li> <li><a>Edit Sale</a> <?php if(is_array($sales_pages)): ?> <ul> <?php foreach($sales_pages as $sale): ?> <li> <a href="<?=base_url();?>admin/editsale/index/<?= $sale->id ?>/<?php echo url_title($sale->name,'dash', TRUE); ?>"><?=$sale->name?></a> </li...
unknown
d3483
train
Assuming you're referring to the scaffolded list view, the scaffolding only renders six fields. The basic logic (from src/templates/scaffolding/list.gsp) is: props.eachWithIndex { p, i -> if(i == 0 { // render the field as a link to the show view } else if(i < 6) { // render the field value ...
unknown
d3484
train
You have a problem with compiling, start using ide eclipse or intelij Idea. The PageRank class is not compilable Another problem is in your package name, try like that: java pagerank.PageRank So if you would create a folder structure like that: src/ pagerank/ PageRank.java PageRankTester.java PageRank.java...
unknown
d3485
train
I assume you mean this SmoothCheckBox on github. Looking at the source code, one finds no setText(String)-method. If I understand the readme correctly, those check boxes are designed to have a selected and unselected color, but no text.
unknown
d3486
train
Well you are trying to create an instance of a COM object with the name 'ProjName.ClassName' - which is unlikely to be a real COM object. Either your COM class needs to be one that has been registered in Windows, or it needs to be a class defined within your VB project. The example in MSDN is: Sub CreateADODB() ...
unknown
d3487
train
You can run a mysqldump command using PHP exec function to only export data. Ex: exec('mysqldump -u [user] -p[pass] --no-create-info mydb > mydb.sql'); More info: * *mysqldump data only *Using a .php file to generate a MySQL dump
unknown
d3488
train
If you don't know sorting refer this link https://www.geeksforgeeks.org/sorting-algorithms/ to better understand the concept and types of sorting algorithms. In this example we have used bubble sort algorithm to sort elements in descending order //sort your linked list this way as you said you have 5 element in your li...
unknown
d3489
train
You don't need to change any settings in Source Tree. Instead, to open it in other editors like VS Code, Visual Studio 2015, Visual Studio 2017/2019/2022, you need to change the default filetype opening setting you wish to open in your operating system. Perform the following steps:
unknown
d3490
train
No, it's not an issue. It's just interpreted as a comment starting with "Define name=...". It also doesn't matter if you put it on the same line or on separate lines. You could as well write: <!--<Define name="default election policy"> <Policy name="DefaultToWaive"/> </Define>-->
unknown
d3491
train
Try this piece of code... simplest and shortest :) $i=array('One','Two','Two','Three','Four','Five','Five','Six'); $arrayValueCounts = array_count_values($i); foreach($i as $value){ if($arrayValueCounts[$value]>1){ echo '<span style="color:red">'.$value.'</span>'; } else{ echo '<span...
unknown
d3492
train
It seems that you essentially try to use discriminated union. But it seems that it is not working with ...rest. So to make it work * *Add additional property to both interfaces, say type which will be used as discriminant interface IAnchor extends React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>...
unknown
d3493
train
Xamarin application: As you already mentioned, you can debug your Xamarin app in Visual Studio just like you would any other .Net projects. Web API: Similarly, you can also debug your Web API project in Visual Studio. * *Run the Web API project locally. *Note the address from the address bar and use that in Postma...
unknown
d3494
train
You will have to reset the basics margin and padding if applied from html and other top level tags. body, html {margin: 0;padding: 0;} Or just use something like reset.css http://meyerweb.com/eric/tools/css/reset/
unknown
d3495
train
in the definition of json, one of the posible values its a string. which can contain <, > among other things you can use a base64 enconding to avoid this. A: JSON can contain nearly any character in its strings. As you are using it in an attribute, escape_quotesaddslashes should be enough, that depends on your (X)HTML...
unknown
d3496
train
This can be done both iteratively and recursively. Here is a decent permutation generator. That can be adapted to your needs and made generic (to take a List<T> of elements) so it can take a list of numbers, a string (list of characters) and so on. A: Try thinking about the characters as elements in a bag of character...
unknown
d3497
train
If you have a non-generic enumerator, the cheapest way to check for any elements is to check if there's a first element. In this case, hasAny is false: var collection= new List<string>( ) as IEnumerable; bool hasAny = collection.GetEnumerator().MoveNext(); while in this case, it's true: var collection= new List<string...
unknown
d3498
train
Build a dictionary from data with the key x0: dataDictionary = {} for datum in data: x0, t, r = datum.split() dataDictionary[x0] = t, r This allows you to look up values from data based on x0. Now, when you loop through x, you can get those values and do your calculations: for item in x: x1, x2 = item.spli...
unknown
d3499
train
You can implement PostProcessingMapStore interface on your MapStore which enables the ability to update the stored entry inside the store() method. You can obtain the auto-generated fields from the database then you can reflect those changes to your entry. See Post Processing documentation : http://docs.hazelcast.org/d...
unknown
d3500
train
use: =ARRAYFORMULA({"", TRANSPOSE(UNIQUE(FILTER(B2:B, B2:B<>""))); FLATTEN({SORT(UNIQUE(C2:C)), IFERROR(TEXT(UNIQUE(C2:C), {"@", "@"})/0)}), IFNA(VLOOKUP(TRANSPOSE(UNIQUE(FILTER(B2:B, B2:B<>"")))&FLATTEN({TEXT(SORT(UNIQUE(C2:C)), "hh:mm"), TEXT(SORT(Unique(C2:C)), "hh:mm")&{".1", ".2"}}), {FLATTEN({B2:B&TEXT(C2:C...
unknown