_id stringlengths 2 6 | text stringlengths 4 46k | title stringclasses 1
value |
|---|---|---|
d8401 | start with these tutorials
http://www.tutorialspoint.com/android/android_php_mysql.htm
http://www.tutorialspoint.com/android/android_php_mysql.htm
after that here is how to repeate every 60 seconds
boolean run=true;
Handler mHandler = new Handler();//sorry forgot to add this
...
...
public void timer() {... | |
d8402 | To install the SSH in the image, you need to more than you have done. Here is the example:
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:THEPASSWORDYOUCREATED' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/ss... | |
d8403 | This was fixed in https://github.com/encode/django-rest-framework/pull/6207 and released as part of DRF 3.9.2. More complete context can be read at https://github.com/encode/django-rest-framework/issues/6206. | |
d8404 | You could expose IsFirstInSelection property in your ViewData class (I suppose you have it).
Then you could place DataTrigger for monitoring changes like this:
<Style.Triggers>
<DataTrigger Binding="{Binding IsFirstInSelection}">
<Setter Property="Background"
... | |
d8405 | First: You should escape the fore slash by a backslash.
Second: You should put the semicolon at the end of code.
This will work:
<?php
$string = 'hello<span id="more-32"></span>world';
$pattern = '/<span id="more-\d+"><\/span>/';
$out = preg_split($pattern,$string);
?>
Print the splitted string:
... | |
d8406 | You need to pass trace_id as input argument
def root(trace_id):
return trace_id
And trace_id is part of the url, not the query part:
requests.get('http://my-service/' + trace_id)
A: We have to look closer at your code.
@app.route('/<trace_id>')
String argument inside brackets is a path part after 'http://my_ser... | |
d8407 | I implemented something very similar to this for another project. This form allows you to popup a modal dialog from within a worker thread:
public partial class NotificationForm : Form
{
public static SynchronizationContext SyncContext { get; set; }
public string Message
{
get { return lblNotifica... | |
d8408 | Well-formed.
The using-directive doesn't introduce the name i in the global namespace, but it is used during lookup. The using-declaration uses qualified lookup to find i; qualified lookup in the presence of using-directives is specified in [3.4.3.2 p1, p2] (quotes from N4527, the current working draft):
If the neste... | |
d8409 | static IEnumerable<DateTime> AllDatesBetween(DateTime start, DateTime end)
{
for(var day = start.Date; day <= end; day = day.AddDays(1))
yield return day;
}
Edit: Added code to solve your particular example and to demonstrate usage:
var calculatedDates =
new List<string>
(
AllDatesBetween
... | |
d8410 | Even though I frequently use regular expressions (RE), I would be reluctant to use one complex RE for this job. The chances that it misses some of the tags, or wrongly converts others, seem too high and too risky. I would approach this sort of task using a series of simple REs that jointly give me confidence that I hav... | |
d8411 | Every time you call WriteToFile.write, it reopens the file for writing, truncating the file's original contents. You should open the file once, in the constructor (and store the PrintWriter in a field), and add a close method that calls close for the PrintWriter.
On the calling side, do this:
WriteToFile writer = new W... | |
d8412 | You can do it like this:
library(dplyr)
library(zoo)
df %>% group_by(sp) %>%
mutate(SMA_wins=rollapplyr(wins, 3, mean, partial=TRUE))
It looks like your use of df and df_zoo in your mutate call was messing things up. | |
d8413 | It seems you are adding more than one relation of the same. Before adding software to a client, make sure a relation does not exist yet, then you can go ahead and add software to client.
Also, you can improve your entities. Use better naming for the primary keys and add [Key] attribute to Software class as well.
Client... | |
d8414 | Try
$(".login-btn").hover(
function() {
clearTimeout($(this).data('hoverTimeoutId'));
$(".login-content").show();
$(this).addClass('hovered');
},
function() {
clearTimeout($(this).data('hoverTimeoutId'));
$(this).data('hoverTimeoutId', setTimeout(function () {
... | |
d8415 | So you would have 2 different folders values and values-es. The best way for you is to create config.xml file in both folders with different url e.g.:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="endpoint">http://endpoint.com/en/index.html</string>
</resources>
To get the value for particular l... | |
d8416 | The issue might be caused by the relative path to the public directory because the path is relative to the directory from where you launch your app.
If this is the case, then providing the absolute path should fix it:
const path = require('path');
app.use('/', express.static(path.join(__dirname, '../public'))) | |
d8417 | it looks you are using the old way to translate PDF then load it to viewer. In the old way, the PDF is translated to tiled images. So snapping may not be working, and zoom has max limit due to the max resolution of tiled images.
Actually, Forge Viewer has supported to load native PDF directly, without translation. Sinc... | |
d8418 | Wrap your Comparators in Comparator.nullsFirst to avoid dealing with possibly nullable parameters.
You need two Comparators merged with Comparator#thenComparing:
*
*nullsFirst(naturalOrder()) to compare IProducts first;
*nullsFirst(comparing(p -> p...getVintage()) to compare their Vintages secondly.
Comparator<IPro... | |
d8419 | Here are some details about template relative paths in the documentation that may help:
https://angular.io/docs/ts/latest/cookbook/component-relative-paths.html
A: Try placing a "./" before your relative path like:
import { Component } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'my-app',
... | |
d8420 | SQLite will be the best storage option for large data sets on the device. Ensure that where possible you use the correct SQLite query to get the data you need rather then using a general query and doing processing in your own code.
A: This is a bit too much to add in the comments, so I'll add it here.
4,000,000 rows o... | |
d8421 | Your test case needs to specify a particular case; it's not intended to be done interactively as you are trying to do.
Something like this would do:
require 'test/unit'
class YearTest < Test::Unit::TestCase
def test_hours
y = Year.new
assert_equal 8760, y.hours(2001)
assert_equal 8784, y.hours(1996)
en... | |
d8422 | Question is uncler, but either way, either click the video button or Webbrowser.Navigate("webpage url") | |
d8423 | Coordinating multiple asynchronous operations is a job best solved with tools like promises. So, in the long run, I'd suggest you read up about promises and how to use them.
Without promises, here's a brute force way you can tell when all your handleFiles() operations are done by using a counter to know when the last ... | |
d8424 | You've given a model with a go predicate. The trick is that you get a loop by calling a predicate again recursively if R='y' doesn't fail.
again :-
write('Do you want to continue? (Y/ N)'),
res(R), R='y',
go,
again.
again :-
write('OK, bye'),nl. | |
d8425 | The two properties in the abstract class are private, which means they are NOT present and known in any class that extends this one.
So MyCalc does not write to these properties, and you cannot read them in the AddNumbers function. The MyCalc constructor actually creates new, public properties instead.
Make the propert... | |
d8426 | I suggest you use GSkinner's REGEX builder and experiment with a lot of the examples on the right hand side. There are are many variations to get this job done. If you want to be explicit you can use:
/[a-zA-Z!@#$%¨&*()-=+/*.{}]/
Tony's answer will also work, but includes more extra characters than the ones you've def... | |
d8427 | this appears to work:
function timeStampM() {
SpreadsheetApp.getActiveSheet()
.getActiveCell()
.setValue(new Date());
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getDataRange();
var actCell = sheet.getActiveCell();
var actData = actCell.getValue();
var actRow = actCell.getRow();
i... | |
d8428 | For more better way use with toggleClass() instead of color value matching with in dom
function changeBg(el) {
$(el).toggleClass('red')
}
.red {
background-color: red;
}
button{
background-color: yellow;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button o... | |
d8429 | "many books say that we should avoid using any raw pointer in modern C++"
It is only owning raw pointers that should be avoided. In your case you need to std::free() the pointer so you own it. Therefore you should definitely put it in a std::unique_ptr but with a custom deleter to call std::free().
// some type aliase... | |
d8430 | Here htmlString will is holding you html content.
TextView textView = (TextView)findViewById(R.id.tv_string);
textView.setText(Html.fromHtml(htmlString)); | |
d8431 | Your Collection is always valid, because it contains fields. You can't do this that way.
You should considering to add Validators to DocAand DocBfields instead. This will work as follow to set correct input filters :
$form->getInputFilter()->get('docs')->get('DocA')->getValidatoChain()->attachByName('YourValidatorName'... | |
d8432 | Go to https:///systemInfo >> javax.net.ssl.trustStore.
This is the truststore where the certificate should be added.
You can open the keystore with keytool or if you prefer a GUI take a look at Keystore Explorer
The default password of the truststore is changeit. | |
d8433 | Just add these 2 line.
import time
time.sleep(2)
Then It'll work properly generally it take only 0.65sec but it's better to give 2 sec. To make it better you can add some cool stuffs like some print statement in for loop and sleep inside it something like that.
A: The following worked for me. Check out the API docume... | |
d8434 | You've defined your user function like this:
def user(usr)
This says that it requires a single positional argument. You have two routes pointing at this function:
- @app.route('/home', methods=["GET","POST"])
- @app.route("/<usr>")
Only the second route provides the necessary usr variable. When you visit the route /h... | |
d8435 | With GNU sed for -z and using all 3 blocks of input you provided together in one file as input:
$ sed -z '
s:@:@A:g; s:}:@B:g; s:</a>:}:g;
s:<a[^<>]* href="legacy/[^}]*}:<!--&-->:g;
s:}:</a>:g; s:@B:}:g; s:@A:@:g
' file
<!--<a class="other-sim-page" href="legacy/wave-on-a-string.html" dir="ltr">
... | |
d8436 | What you need is token pasting. try the following:
#define W(x,ad,val) k_target_socket.write##x(ad,val)
The ## will paste the x with the function name.
More details here | |
d8437 | That's because your Tabs class is defined after your Tab class and classes in javascript aren't hoisted.
So you have to use forwardRef to reference a not yet defined class.
export class Tab {
@Input() tabTitle: string;
public active:boolean;
constructor(@Inject(forwardRef(() => Tabs)) tabs:Tabs) {
t... | |
d8438 | If you have a lot of data going into it you might want to use it in virtual mode, by setting the VirtualMode property of the ListView control to true. That means that the ListView will not be populated in the traditional sense, but you will hook up event handlers where you deliver the information to the list view in sm... | |
d8439 | Keep it simple from your local branch:
git fetch origin && git merge origin/master | |
d8440 | When creating a recycler view, you need to create a RecyclerView adapter which (among other things) implements methods for creating and binding a viewholder to the item in the recycler view. Somewhere in your code (oftentimes within this recycler view adapter class), you need to define the viewholder that you will use ... | |
d8441 | The problem you have here is that cpdf is not a string interpreter like echo or printf and so on. In your case cpdf doesn't know how to interpret your escaped string and when you pass this "so called" variable (cropstring) to cpdf binary you actually tell to bash like this: pass to cpdf script this argument in which yo... | |
d8442 | is there anyway to do it in linq or other .net way?
Sure:
List<User> list = ...; // Make your user list
List< UserProtectedDetails> = list
.Select(u => new UserProtectedDetails{name=u.name})
.ToList();
EDIT: (in response to a comment) If you would like to avoid the {name = u.name} part, you need either (1) a ... | |
d8443 | findParentNode(parentName, childObj) {
let tempNodeObj = childObj.parentNode;
while(tempNodeObj.tagName != parentName) {
tempNodeObj = tempNodeObj.parentNode;
}
return tempNodeObj;
}
this.findParentNode('DATATABLE-BODY-ROW',$event.target);
this will help to find you the data table row element
this.render.addClass(f... | |
d8444 | select [colour code], [size code],
row_number() over (partition by [colour code], [size code]
order by 1/0) [group id]
from tbl
order by [group id], [colour code], [size code]; | |
d8445 | The alternative for parallel execution is to allow the dependency injection system which specflow uses to provide you with the ScenarioContext instance. To do that have your steps class accept an instance of the ScenarioContext and store it in a field:
[Binding]
public class StepsWithScenarioContext
{
private reado... | |
d8446 | There is no way to do that with PostgreSQL alone - you'd have to write your own C function.
With the PostGIS extension, you can cast the path to geometry and perform the operation there:
SELECT array_agg(CAST(geom AS point))
FROM st_dumppoints(CAST(some_path AS geometry));
A: Try a variant of this..
CREATE OR REPLACE... | |
d8447 | After researching I found that I couldn't do that | |
d8448 | You can use
'[\x{0590}-\x{05FF}\/\w.-]*'
It matches zero or more chars defined inside [...], a character class:
*
*\x{0590}-\x{05FF} - a range of Unicode code points that constitute a Hebrew character range
*\/ - a literal forward slash
*\w- word chars, i.e. ASCII letters, digits and an underscore
*. - a dot
*... | |
d8449 | I know Grails very well (right now I'm working on a Grails project), but not JRuby, so take this as a probably biased opinion: looking at the JRuby documentation, it looks that JRubys integration with Java is a bit more cumbersome, since Java is more native in Groovy than it is in Ruby; therefore, in JRuby, you have a ... | |
d8450 | If you ant compare strings you have to use equals method:
if (str2.equals(str3))
A: == compares the Object Reference
String#equals compares the content
So replace str2==str3 with
String str2 = "abcdefg";
String str3 = str1 + "efg";
str2.equals(str2); // will return true
A: You know, you need to differentiat... | |
d8451 | That is because you are not calling right statement on 'onchange' event. You just call the getVAlue(n) function which does nothing except return a value that you also use for
var XBurgNum = getValue(BurgNum);
var XCocNum = getValue(CocNum);
var XSalNum = getValue(SalNum);
But you are not updating the output on cha... | |
d8452 | I wrote a library just for this kind of purpose (drawing colour gradients in Processing) called PeasyGradients — download the .jar from the Github releases and drag-and-drop it onto your sketch. It renders 1D gradients as 2D spectrums into your sketch or a given PGraphics object.
Here's an example of drawing linear and... | |
d8453 | Here is a non Controller version that you can use to get some ideas from. I suggest you use TimeLine instead of Timer. This is not a complete program!
import java.util.concurrent.atomic.AtomicInteger;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Application;
import javaf... | |
d8454 | Most of the jQuery methods (that don't return a value) are automatically applied to each element in the collection, so each() is not necessary.
Combining siblings() and andSelf(), the code can be simplified to:
$('.mySelector').siblings('img').andSelf().click(function (e) {
e.preventDefault();
doStuffTo($(this)... | |
d8455 | Since NuGet currently does not support this out of the box your options are either to use PowerShell or to use a custom MSBuild target.
PowerShell
*
*Leave your resources outside of the Content directory in your NuGet package (as you already suggested).
*Add the file link using PowerShell in the install.ps1.
You... | |
d8456 | ....
....
ddlCust.DataBind();
ddlCust.Items.Insert(0, new ListItem("Select Value:", "0")); | |
d8457 | Or is list comprehension with modelforms my best workaround?
Yes, or maps and filters:
valid_forms = filter(lambda fm: fm.is_val(),
map(ArticleForm, some_list_of_dictionaries))
If you're using Python3, this will return a generator object, which you can iterate over or you can immediately evalua... | |
d8458 | Issues in the asp.net button
<asp:Button ID="btnLogin" runat="server" Text="Login" CssClass="btn btn-block org"
Style="margin-top: 0px" OnClick="btnLogin_Click" ValidationGroup="Login" OnClientClick="showalertmsg(); return false;" />
A: you can't call javascript fuction like this
OnClick="btnLogin_Click show... | |
d8459 | Your error can be reproduced by doing the following:
$ cpan
...
cpan shell -- CPAN exploration and modules installation (v2.10)
Enter 'h' for help.
cpan[1]> "install PDF::Create"
Catching error: "Can't locate object method \"Create\" via package \"install PDF\" (perhaps you forgot to load \"install PDF\"?) ...
The ... | |
d8460 | Finally i got answer after 3 days of struggling
just send your array of dictionary into this
class func JSONStringify(value: AnyObject,prettyPrinted:Bool = false) -> String{
let options = prettyPrinted ? NSJSONWritingOptions.PrettyPrinted : NSJSONWritingOptions(rawValue: 0)
if NSJSONSerialization.isValid... | |
d8461 | It may be because when you create a windows form application, it is actually using managed c++ (uses .net), which I don't think lua is compatible with. Take a look at http://luaplus.org/ that might be what you're looking for. It seems like it's lua for ANY .net language (which managed c++ is) | |
d8462 | You can cause the box to appear on top of the graphed line by using Z-order. Artists with higher Z-order are plotted on top of artists with lower Z-order. The default for lines is 2, so add zorder = 3 to mark_inset.
Full code:
from matplotlib import pyplot as plt
import numpy as np
from mpl_toolkits.axes_grid1.inset... | |
d8463 | I think you can do this by modifying where your for loop is located. I'm not familiar with the libraries you're using so I've left a comment where you might need to modify the code further, but something along these lines should work:
names = json.loads(open(namelist + '.json').read())
for name in names:
req = gr... | |
d8464 | You have:
*
*An initial state
*A terminating state
*An iterative operation
So you have everything needed to use a for loop (albeit without a body):
for (int[] arr = {0}; arr.length < 9999; arr = evolve(arr));
Another solution, but nowhere near as neat, is to add this after the loop:
arr = null;
which still al... | |
d8465 | $stdin and $stdout can be interchangeably used as IO objects. You may pass them to the SSLSocket. Does that help? Otherwise I'd need more code to help you out. | |
d8466 | Extend DefaultTreeCellRenderer and invoke setToolTipText() as required. The tutorial project TreeIconDemo2, discussed in Customizing a Tree's Display, demonstrates the approach.
Addendum: You can supply the desired text for each node in a TreeCellRenderer, e.g. MyRenderer:
setToolTipText(value + " is in the Tutoria... | |
d8467 | http://agner.org/optimize/ for lots of details.
On x86, an array of 1-byte data should be good. It can be loaded with movzx (zero-extend) just as fast as with a plain mov.
x86 has bit ops to support atomic bitfields, if you want to pack your data by another factor of 8. I'm not sure how well compilers will do at maki... | |
d8468 | "apply" is available to Any object in kotlin. You don't need to import anything to use "apply"
Apply in Kotlin
But, if IDE is suggesting you to import anything for apply, that means kotlin library is not properly configured.
Check your app/build.gradle dependencies whether kotlin-stdlib exists or not.
implementation "o... | |
d8469 | I think there are three potential issues I think in porting your app to Table Storage.
*
*The lack of reporting - including aggregate functions - which you've already identified
*The limited availability of transaction support - with 100,000 orders per year I think you'll end up missing this support.
*Some problem... | |
d8470 | You can try as follows
import pandas as pd
df = pd.DataFrame({
"column1":["A", "A", "A", "A", "A", "A", "A"],
"column2":["B", "B", "B", "B", "B", "B", "B"],
"column3":[5, 2, 10, 1, 1, 1, 1],
"column4":[4234, 432, 123, 123, 124, 125, 126],
"column5":[123, 3243, 43, 45, 23243, 234, 23]
})
df
co... | |
d8471 | Oooold question, I know, but I did it with the following:
In a custom module, you can add it to _form_alter, i.e.
function mymodule_form_alter((&$form, $form_state, $form_id) {
$form['panes']['customer']['primary_email']['#description'] =
t('Your custom message goes here.');
} | |
d8472 | If I'm correct in thinking, you just want to check if the link is there, before outputting, otherwise, just show the image. Try the following:
<?php // START SLIDER ?>
<div class="slider">
<ul class="rslides">
<?php $args = array( 'posts_per_page' => 0, 'post_type' => 'slide'); $alert = new WP_Query( $args ... | |
d8473 | How do you get the predicted values in the first place? The model you use to get the predicted values is probably based on minimising some function of prediction errors (usually MSE). Therefore, if you calculate your predicted values, the residuals and some metrics on MSE and MAPE have been calculated somewhere along t... | |
d8474 | SQL_CALC_FOUND_ROWS .
This will allow you to use LIMIT and have the amount of rows as no limit was used. | |
d8475 | Answering my own question after more experimentation and sifting through the source.
The way SDL handles events is that when you call SDL_WaitEvent/SDL_PeekEvent/SDL_PeepEvents, it pumps win32 until there's no messages left. During that pump, it will process the win32 messages and turn them into SDL events, which it qu... | |
d8476 | This is the answer
To help for all
function get_Example( $content = false, $echo = false ){
if ( $content === false )
$content = get_the_content();
$regexp = '/href=\"https:\/\/example\.com\/([^\"]*)"/i';
if(preg_match_all($regexp, $content, $link)) {
$content = $link[1][0];
}
if ( empty($c... | |
d8477 | Mark all your editable input fields with the class "editable". (Change to suit.)
$('.editable').each(function() {
$(this).editable('mysaveurl.php');
});
That's all you need for the basic functionality. Obvious improvements can be made, depending on what else you need. For example, if you are using tooltips, stick th... | |
d8478 | Because Base and Pow aren't bound to anything yet (they are parts of the X that you pass), you can't compute NewX (and the betweens might not work, either).
A: When you enter factors(2,X), Factor1 is not bound and is_list(Factor1) fails.
I think your code
is_list(Factor1),
length(Factor1, 2),
Factor1 = [Base|A],
A = [... | |
d8479 | There is no iris package in the pypi. If you have iris correctly installed then it should find the plot module irrespective of whether your dependencies are correctly installed or not.
The following gives guidance on installing iris on the Mac OS:
https://github.com/SciTools/installation-recipes/tree/master/osx10.9
A... | |
d8480 | Cython code is (strategically) statically typed, but that doesn't mean that arrays must have a fixed size. In straight C passing a multidimensional array to a function can be a little awkward maybe, but in Cython you should be able to do something like the following:
Note I took the function and variable names from you... | |
d8481 | Composition! Establish an interface that you are okay with people extending.
This class would contain the logic for MethodD1 and D2, and for everything else just a simple call to the other methods in your currently existing class. People won't be able to modify the calls to change the underlying logic.
A: The static m... | |
d8482 | I have encountered the same problem. After googling I found out that this bug was fixed in Scilab 6.0.2.
You can download it here:
https://www.scilab.org/download/6.0.2
Current version of Scilab, that you can get from
sudo apt-get scilab
is 6.0.1 (for me scilab-cli was working, but GUI was not)
Currently Scilab 6.0.2... | |
d8483 | Many-to-many conditions should not be enforced using a trigger. Many-to-many conditions are enforced by creating a junction table containing the keys in question, which are then foreign-keyed back to the respective parent tables.
If your intention is to allow many employees to be in a department, and to allow an employ... | |
d8484 | use nestedScrollEnabled in inner Flatlist for enabling the scrolling activity
A: You can use the nestedScrollEnabled prop but I would recommend using a <SectionList> since this is somehow buggy! | |
d8485 | If I understand your question correctly this might help :
df.columns[df.columns.str.startswith('Fee_')]
it gives you the list of columns that start with Fee_, if you want the last one you can add
df.columns[df.columns.str.startswith('Fee_')][-1] | |
d8486 | My observations with Firebase realtime database.
It caches data on server side before adding to database (for a few milliseconds).
Result:
Read operations are few milliseconds faster than write operations.
*
*What's happening with your request:
*
*It reaches server and asks for data which is still not avai... | |
d8487 | There is no one answer to how to set up your repository. It depend on your specific needs.
Some questions you should ask yourself include:
*
*Are all projects going to be released and versioned separately?
*Are the projects really independent of each other?
*How is your development team structured? Do individual... | |
d8488 | You first need to split the filename from the extension.
import os
filename = path2 + f # Consider using os.path.join(path2, f) instead
root, ext = os.path.splitext(filename)
Then you can combine them correctly again doing:
filename = root + "r" + ext
Now filename would be imgr.png instead of img.pngr.
A: You could ... | |
d8489 | var rows = $('tr.classname:first', tbl);
or
var rows = $('tr.classname', tbl).first();
Docs here: http://api.jquery.com/category/selectors/
A: var firstRow = $('tr.classname:first', tbl)
A: You can use the :first selector along with the class selector,
Try this:
var rows = $('tr.someclass:first', tbl);
A: var ro... | |
d8490 | So the answer was to trim the result var result = $.trim(html); | |
d8491 | Spring can inject into abstract classes too. So you can move the injection of the SampleState to the abstract class, if each AbstractSingletonBean descendant needs just a SampleState (as in your example).
A: It doesn't look like this was available out of the box so I created an annotation I call @AnonymousRequest that... | |
d8492 | You have two problems. The first is in this line:
| otherwise = searchHelp xs n-1
The compiler interperets this as (searchHelp xs n) - 1, not searchHelp xs (n-1), as you intended. The second problem is in you use of guards:
| searchHelp xs 0 = -1 -- no pairs found
Since searchHelp xs 0 is... | |
d8493 | I have now figured out how to do what I want to do.
I know the columns I will need at design time, so in the IDE I add the columns to my datagridview and format them as desired. I then set the AutoGenerateColumns property of the grid view to false. For some unknown reason, that property is not available in the design... | |
d8494 | Try
<script type="text/javascript">
paypal.Buttons({
env: 'sandbox',
style: {
layout: 'vertical',
size: 'responsive',
shape: 'pill',
color: 'blue',
label: 'pay'
},
createOrder: function() {
return fetch('/check... | |
d8495 | You are not protecting your critical section from exceptions. When the client disconnects, an exception will be raised by either ReadLn() or WriteLn() (depending on timing) to terminate the thread for that client. The next time the OnExecute event is called for a different thread, the critical section will still be l... | |
d8496 | It's usually happend because SystemWeb package is not installed on your project.
Use this command at your Package Manager Console:
Install-Package Microsoft.Owin.Host.SystemWeb
In the other hand you may use this configuration on your app.config or web.config if the above solution is not work:
<appSettings>
<add k... | |
d8497 | The microphone won't show any activity until it is attached to a NetStream connection. You can use a MockNetStream to fake the connection using OSMF - see my answer here. | |
d8498 | you can read form array in way as below
frmRefer = document.getElementByTagName("form")[0];
for(i= 0 ; i<frmRefer.elements["ite[]"].length;i++){
alert(frmRefer.elements["ite[]"][i].value );
}
for(i= 0 ; i<frmRefer.elements["quant[]"].length;i++){
alert(frmRefer.elements["quant[]"][i].value );
}
for(i= 0 ; i<fr... | |
d8499 | I'm fairly certain this is not possible directly (because AKS can only stream to OMS), but this link outlines some principles. So you can create a function\logic app to do that for you. | |
d8500 | As Alex says, you'll just recreate the anonymous type. To geth a specific author to the top of the list, you can use orderby clause (or OrderBy extension method), which I think, is a bit easier then using Where and Union:
new {
...
Authors = from a in record.Authors
orderby a.AuthorID == 32 descending
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.