id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23507000 | $(function() {
var requestUri = "SPO_SITE/_api/web/lists/GetByTitle('LIST_NAME')/items?$select=Title,Order0,Designation,Name,Landline,Mobile,email,Remarks,Department/ID,Department/Title&$expand=AttachmentFiles,Department&$filter=Department/Title%20eq%20%27"+filterTitle+"%27";
$.ajax({
url: requestUri,
... | |
doc_23507001 | It's value does not appear to change - if I use android:text="2", and pull the value, it comes up as 2. But if I leave it blank, type in it, and try to pull the value, it comes up blank or null.
The Problem: (since I suppose it hasn't been clear enough) when I launch my app, type "3" into the EditText, and press my but... | |
doc_23507002 | There has to be a better and much faster way of doing it (performance-wise). This is what I'm trying to do:
For example: (1st SELECT statement)
$db = $stmt->("SELECT * FROM users WHERE id = :id AND activated = 1");
$db->bindParam(':id', $id);
$db->execute();
If that above SELECT statement is true, then do this: (2nd S... | |
doc_23507003 |
A: But... Javadoc states the difference quite specifically?
Sample time: samples the time for each operation.
Runs by continuously calling {@link Benchmark} methods, and randomly samples the time needed for the call. This mode automatically adjusts the sampling frequency, but may omit some pauses which missed the sam... | |
doc_23507004 | GET {{url}}/inventory/managedObjects?query=creationTime+gt+'2018-12-01T09:00:53.351Z'
gives me
{
"managedObjects": [],
"next": "{{url}}/inventory/managedObjects?query=creationTime+gt+'2018-12-01T09:00:53.351Z'&pageSize=5¤tPage=2",
"statistics": {
"currentPage": 1,
"pageSize": 5
},
"self": "{{url}}/invent... | |
doc_23507005 | rspec -e"test"
variant, but the console says all examples were filtered out. Please help.
A: Before I proceed, please note that all specs filename should end with _spec.rb. In your case it should be: test1_spec.rb, test2_spec.rb, and so on. I'd encourage you to checkout RSpec documentation on command line usage. To... | |
doc_23507006 | One of the things I do is that I want 0 values in some columns when one Item does not match between tables.
case when e.Item=p.Item then p.ColumnA else 0 end as NewColumnA
ColumnA has data type FLOAT and it seems like NewColumA is FLOAT as well. But when I run a query on the View and specify that I do not want recor... | |
doc_23507007 | For example, I'd like 'Star Wars: Episode 5', 'Star Wars: Episode five' and 'Star Wars: Episode V' all to be searchable and result in the database entry for 'Star Wars: Episode 5' being returned. I don't want the search to simply swap out the word/numeral/number and only conduct a single search as this would mean that ... | |
doc_23507008 | m_temppkt = new pktstruct();
and the struct is:
struct pktstruct {
void *address;
int length;
struct pktstruct *next;
};
A: It is fine to do that, but the memory in m_temmkt->address will not be allocated (i.e. you allocate space for the pointer, not for the memory the pointer will point to).
The best sol... | |
doc_23507009 | However, I am not sure of any of this and I wanted to see if there were better options out there that I wasn't aware of, so if anyone has a better idea, I'd be thankful if you could share it.
A: Have you looked into using profiling? It should give a detailed breakdown of the function execution times, the number of cal... | |
doc_23507010 | {
"result": true,
"scale": 2048,
"lang": "en",
"gameVersion": "14.00",
"list": [
{
"id": "Athena.Location.POI.CattyCorner",
"name": "CATTY CORNER",
"x": 1611,
"y": 1568,
"images": [
{
"type": "ove... | |
doc_23507011 | The object is a boolean. First I'm trying to check if the object exists and, if exists, use it.
I'm trying to use it in a ?: operator but it behaves strange. Here is my Watch window:
Premise
*
*The "ExistingKey" key exists and has a value of false (if key
doesn't exists returns false).
Results
*
*When checking... | |
doc_23507012 | I tried to apply inline style on my body element and set margin-bottom to 0, but it doesn't work.
A: Just use this to set all margin to 0
*{margin: 0;}
| |
doc_23507013 |
A: Check the official facebook developers guide: http://developers.facebook.com/docs/reference/javascript/
You can embed that javascript into your page.
| |
doc_23507014 | @Html.TextBoxFor(m => m.Student, new Dictionary<string, object> { { "data-val", false } })
I tried to do something like
@Html.TextBoxFor(m => m.Student, new Dictionary<string, object> { { "data-val", false }, new {style="font-size:30px", class="form-control" })`
But apparently its not the correct format
Thanks
A: *
... | |
doc_23507015 | This is my code:
import cv, cv2
import numpy as np
foreground1 = cv2.imread("foreground1.jpg")
vid = cv2.VideoCapture("NB14.avi")
cv2.namedWindow("video")
cv2.namedWindow("canny")
cv2.namedWindow("blur")
while True:
ret, frame = vid.read()
subtract1 = cv2.subtract( foreground1, frame)
framegrey1 = cv2.cv... | |
doc_23507016 |
A: No, the graph doesn't support it as far as the documentation shows. But you might be able to scrape the information from a url. Hint, the recommendations plugin (https://developers.facebook.com/docs/reference/plugins/recommendations/) has an iframe option ;)
| |
doc_23507017 | I would like to have an Rcpp function that would have an argument being a list with some specified default values of its entries. I would like this function to work similarly to the following R function:
> nicetry_R = function(sv = list( a = rep(0, 2)) ) { sv$a }
> nicetry_R()
[1] 0 0
> nicetry_R(list(a=rep(1,2)))
[1... | |
doc_23507018 | "AAA BBB CCC 1X2L BOT BR, DDD EEE FFF 3X4L BOT BR, GGG 5X6L BOT BR"
And I just want to take out the characters before the last last spaces, i.e., I want
"1X2L, 3X4L, 5X6L"
only.
How can I reach this in R?
A: You can try using sub after splitting the string on comma (,).
x <- "AAA BBB CCC 1X2L BOT BR, DDD EEE FFF 3X4L ... | |
doc_23507019 | The problem is I cannot get my data model to conform to the correct Codable standard for use. The reason is because of my lastFetchedMediaSnapshot of type Doc snapshot. When I change it to of type doc ref it conforms properly. How can I get my data model to conform to codable while having a var of type doc snapshot?
He... | |
doc_23507020 | In order to do so I build a request for a rectangle that contains my location, then parse the response XML and run a ray-casting algorithm to filter the ways that enclose the given lat-long position. This is too slow for the purpose of my application because sometimes the response has tens or hundreds of MB.
Is there a... | |
doc_23507021 | I'm having an issue using getValues() where it returns an undefined. I'll post my exact code.
Any help is appreciated.
<script>
webix.ready(function(){
webix.ui({
view:"form",
id:'log_form',
width:300,
elements:... | |
doc_23507022 | #ifndef LOCKS_H
#define LOCKS_H
void f(void);
#endif
and "locks.c" containing
#include <stdio.h>
void f(void) {
#pragma omp parallel
{
fprintf(stderr, "Hello World!\n");
}
return;
}
with swig, using the swig input file "locks.i" containing
%module locks
%{
#define SWIG_FILE_WITH_INIT
#include "locks.h"
%... | |
doc_23507023 | {
"data": {
"allFile": {
"edges": [
{
"node": {
"childImageSharp": {
"fluid": {
"aspectRatio": 0.7518796992481203,
"originalName": "music_01.jpg"
}
}
}
},
{
"node": {
... | |
doc_23507024 | select (
select COLUMN_NAME from ALL_TAB_COLUMNS
WHERE COLUMN_NAME LIKE '%_<SOME_SUFFIX>'
AND OWNER = '<SCHEMA>' AND TABLE_NAME = '<TABLE_NAME>'
)
FROM <SCHEMA>.<TABLE_NAME>
A: In this example, I'm composing a select statement based on list of columns from a table (passed to function as a parameter) who... | |
doc_23507025 | "C:\Program Files\Dart\dart-sdk\bin\pub.bat" get
) was unexpected at this time.
Process finished with exit code 255][1]
[1]: https://i.stack.imgur.com/dv09t.jpg even if i try opening another project the error persists. The actual code is showing errors such as the ones below: [error: Target of URI doesn't exist: 'packa... | |
doc_23507026 | 1 - Take the Bitmap soure and paint then
2 - put a second ImageView on my layout and use shape+corners as its source
It's not possible take the image view and put a corner around then?
In my app i have a List with a lot of ImageView (the Bitmap used in this ImageView's is programmatically) and I want to put corners in ... | |
doc_23507027 | public static MvcHtmlString TimePickerFor<TModel>
(this HtmlHelper<TModel> helper,
Expression<Func<TModel, TimeSpan?>> expression)
I need to implement an overload of the above to call method 1 from
method 2
method 2 declaration:
public static MvcHtmlString TimePickerFor<TModel>
(this HtmlHelper<TModel> helpe... | |
doc_23507028 | from statsmodels.tsa.stattools import adfuller
import pandas as pd
def stationarity(x):
return adfuller(x)[1]
x is any pandas timeseries
x.rolling(21).apply(lambda x: adfuller(x)[1]).plot()
| |
doc_23507029 | response = httpClient.Put(uriTemplate, contentType, CreateContentFromObject(obj));
Then I debug into the service which ends up showing the following:
Here is my object
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.Xml.Seri... | |
doc_23507030 | Elasticsearch: 7.4.2, FluentD: 1.7.1, Kibana: 7.4.2
We are able to see logs in Kibana Dashboard when we are using below configuration (json) in FluentD -
<source>
@type tail
@id in_tail_container_logs
path /var/log/containers/*namespace*.log,
pos_file /var/log/fluentd-containers.log.pos
enable_stat_watcher fa... | |
doc_23507031 | In one of the sections there's an image that appears in the right side of the layout, and it spans the section vertically (takes up about 50% horizontally).
When the window is reduced in size, at some intermediary positions, the image no longer spans the section vertically, making it float above what looks like a margi... | |
doc_23507032 | HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\xx.0\Outlook\Security
I have outlook 2013 (so xx.0 should be 15.0). However, I am unable to find this key. There is no 15.0 under the Office key.
Is there somewhere else I should look? Or do you know another method by which I can access outlook message body via pyth... | |
doc_23507033 | The first part is easy: (map . fmap) p list is of type [Maybe Bool].
One important info is that I know that length list >= 1 and all isNothing list == False both hold, so there must be at least a Just True in (map . fmap) p list.
But how do I pull out one single Bool out of that list?
I thought that I could take advant... | |
doc_23507034 | What is the best way to go about this?
EDIT: I got exceptions such as incorrect parameter and GDI exception. I don't have the code as this is on my machine at work.
Thanks
A: Have you tried:
MemoryStream ms = new MemoryStream(byteArray);
Image image = Image.FromStream(ms);
image.Save("myfile.jpg", ImageFormat.Jpg);
I... | |
doc_23507035 | below two query both not delete all hierarchy data, only delete self and one child row ...
is there anything wrong when select recursive in with closure?
comment
id | parent_comment_id
1 |
2 | 1
3 | 2
4 |
query 1
WITH RECURSIVE coH AS (
SELECT co.id,
co.id AS rootId
FROM comment co
UNION ALL
S... | |
doc_23507036 | char device catch multiple (int) ioctl-arguments
However I am invoking the c code through java JNI. It was said C struct mapping is to Java object. so am passing an object to the C native function.
Here is my JNI c function
JNIEXPORT jint JNICALL Java_com_context_test_ModCallLib_reNice
(JNIEnv *env, jclass clazz, ... | |
doc_23507037 | the problem is that everytime i execute it it always do both on create and update
i would just like it to do on create when im saving a data and on update when im update a data on the same field on password
'password' => array(
'notEmpty' => array(
'on' => 'update',
'rule' => array(... | |
doc_23507038 | When I use cv::Mat and allocate in a method on the memory as:
cv::Mat coords(100, 5, CV_32FC1);
Do I need to do coords.release() to clear from the memory at the end of the method if I don't need anymore?
Is that have to do?
Thanks
A: You don't need to explicitly release the cv::Mat object. cv::Mat object will automat... | |
doc_23507039 |
yyyy-MM-dd 00:00:00 +0000
currently i am getting
2018-04-16 11:27:06 +Greenwich Mean Time
by below code -
let nowDate = Date()
let dateFormatter = DateFormatter()
dateFormatter.timeZone = TimeZone(abbreviation: "GMT")
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss +zzzz"
print(dateFormatter.string(from: nowDate)... | |
doc_23507040 | The shift + Enter shortcut allows me to do if I am typing the string but it doesn't split a string that is already on the screen.
A: Delphi XE2 has the ability to record Macros and play them back in your source editor. The controls are in the bottom-left, play, record, and stop.
*
*If not already, move your strin... | |
doc_23507041 | Do threads have to wait for others to finish reading the memory? Or is the data implicitly copied (the reason of existence of volatile)? But what would that do for the memory usage of the entire JVM? And how does it all differ when the object being read is older than the threads that read it, instead of created in thei... | |
doc_23507042 | particle_boxes = []
init = 0
final = 50
number_box = 5
for i in range(number_box):
for j in range(number_box):
for k in range(number_box):
index_particle = df_particles['X'].between(init+i*final, final+final*i)&df_particles['Y'].between(init+j*final, final+final*j)&df_particles... | |
doc_23507043 | But didn't mention in which file and what constant, we need to change this limit.
I found few checks in test code but not in source code
ep-engine/ep_testsuite.cc:
rv = h1->allocate(h, NULL, &it, "key", 3, 20 * 1024 * 1024, 0, 0);
memcachetest/main.c: if (size > 1024 * 1024 *20) {
Can you please help me here.
A:... | |
doc_23507044 | Student A (AA.1)
Student(1) B (AA.2)
Student B
Would like to get value from backet:
AA.1, AA.2
Thanks. I have used split, however will encounter error because of Student B does not have any bracket and Student(1) B (AA.2) have 2 brackets.
Current Code
char[] targetExpression = new char[] { '(', ')' };
string title = ... | |
doc_23507045 | Here is my code:
rot13.h
#import <Foundation/NSString.h>
@interface NSString (rot13)
+ (NSString *)rot13:(NSString *)theText;
@end
rot13.m
#import "rot13.h"
@implementation NSString (rot13)
+ (NSString *)rot13:(NSString *)theText {
NSMutableString *holder = [[NSMutableString alloc] init];
unichar theChar;
... | |
doc_23507046 | // Personal API Key for OpenWeatherMap API
const COUNTRY = 'us';
const API_KEY = 'some key';
const BASE_URL = 'http://api.openweathermap.org/data/2.5/weather';
const MY_SERVER_URL = 'http://localhost:3000';
// Event listener to add function to existing HTML DOM element
document.getElementById('generate').addEventListe... | |
doc_23507047 | @BeforeTest(alwaysRun = true)
@Parameters({ "selenium.OS", "selenium.browser","selenium.testClassNameHere" })
public void beforeTest(String OS, String browser, String testClassNameHere) {
Out.trace("Starting beforeTest for "+testClassNameHere+" on thread: " + Thread.currentThread().hashCode());
//create driver... | |
doc_23507048 |
*
*Current is defined as a non null start date that is in the past and either a null end date (open ended) or and end date in the future.
*The most recently expired could be defined as having no current time period with a maximum end date. In theory, the time spans denoted by each object should never overlap so I'... | |
doc_23507049 | namespace MyNamespace{
int a
}
MyNamespace.cpp: some function that uses a
main.cpp
#include "MyNamespace.h"
main.obj : error LNK2005: "class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >
FileNamespace::m_rootDirectoryPath"
(?m_rootDirectoryPath@FileNamespace@@3V?$bas... | |
doc_23507050 | This part of my software is for sorting items running down a conveyor belt.
I am using Modbus for the conveyor belt. Modbus will open gates at a specific time to let an item go through the gate. Items will go through certain gates based on weight.
I am monitoring a sensor to determine when an item is on a scale. When ... | |
doc_23507051 | When I complied this message came out.
BlackDlg.obj : error LNK2001: unresolved external symbol __imp__PathStripPathA@4
BlackDlg.obj : error LNK2001: unresolved external symbol __imp__PathRemoveFileSpecA@4
And I remove usage in my code and this message doesn't come. Thank for you quick advance.
A: The MSDN Library ha... | |
doc_23507052 | I want to create a Annotation for my little little database framework but how can i create this with a annotation?
@Columns({name="id", type="long"},{name="username",type="string"})
Simple annotation ca have a String[] butt i want a key/value in this array.
Thanks for you help.
A: more annotations of same type aren't... | |
doc_23507053 | SELECT ISNULL(SUM(VUItems.Quantity), 0) AS OrderQty
FROM VUItems
This returns as 0.00 but the same query when using group by not displaying 0.00 what might be the problem
SELECT ISNULL(SUM(VUItems.Quantity), 0) AS OrderQty
FROM VUItems
GROUP BY SKU,
SalesOrderNo
Why I need is that I will have a table... | |
doc_23507054 |
A: Axios has a lot of devDependencies. Those do not get installed when you just copy it. I'd suggest duplicating your existing project (assuming it works there).
"devDependencies": {
"bundlesize": "^0.17.0",
"coveralls": "^3.0.0",
"es6-promise": "^4.2.4",
"grunt": "^1.0.2",
"grunt-banner": "^0.6.0... | |
doc_23507055 | I don't know how to write the if to make sure that if the author of the command is of that role he can read it (I'm doing this because I would like to impose different limits on certain roles).
At the same time I would like the user who executes the command to be given a user permission where he can write (this command... | |
doc_23507056 | Example of what I mean:
analyze <- function() {
lapply(1:5, function(x) { cat(x); Sys.sleep(1) })
}
runApp(shinyApp(
ui = fluidPage(
actionButton("analyze", "Analyze", class = "btn-primary"),
actionButton("stop", "Stop")
),
server = function(input, output, session) {
observeEvent(input$analyze, {
... | |
doc_23507057 | I have a project structure:
Module A (source + include)
Module B (source + include)
Module A creates library (add_library),
Module B uses library from A (add_executable),
The Module A uses a one file from the Module B.
How should I solve it? The Module B should create library with one file to compile the library A and ... | |
doc_23507058 | So this is the album class
const int Empty=-1
class Album
{
Song* songs;
char* name;
int top=Empty;
public:
Album ();
Album (const char*);
~Album();
friend std::ostream& operator<<(std::ostream&,Album&);
void addSong(Song&);
};
I'm worried that there might be a mistake with my functions so far but I c... | |
doc_23507059 | form.SetListOption("fieldname",String[]{"one","two","three"});
form.SetListSelection("fieldname",String[]{"","",""});
The listbox alignment is set to "right". If I use a PDF editor and change the values myself, it displays correctly.
If I run it through iTextSharp, the listbox is left aligned.
Is this a bug, or do I ... | |
doc_23507060 | Previous similiar question has now an outdated answer - Returning Raw Json in ElasticSearch NEST query
Thanks
A: This is for the benefit of readers who want to achieve the same thing in newer versions of NEST, v2.3 as of this writing. If you just want the response, all you need to do is this using the ElasticLowLeve... | |
doc_23507061 | When adding a new record to this table I'd like to prevent adding several records with the same gate_id for one person_id. Gate_id must be unique for particular person_id.
I'd like to have table like this:
id, person_id, gate_id, time_id
1, 2, 1, 1
2, 2, 2, 2
but not the one:
id, person_id, gate_id, time_id
1, 2, 1, 1... | |
doc_23507062 | I've found this project on github which provided a basic exmaple of combining these two.
But this is just a basic start, I've had difficulty with declaring new components and adding more of angular2 features into my app.
Are there any tutorials on this issue? Have you tried working with both clojurescipt and angular2?... | |
doc_23507063 | public partial class TalentVendorShots
{
public int Id { get; set; }
public string Email { get; set; }
public string One { get; set; }
public string Two { get; set; }
public string Three { get; set; }
public string Four { get; set; }
public string Five { g... | |
doc_23507064 | [Vue warn]: Failed to resolve component: alert-popup
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
PopupPlugin.client.ts
import AlertPopup from './AlertPopup.vue'
export default defineNuxtPlugin(({ vueApp }) => {
...
vueApp.config.global... | |
doc_23507065 |
The server throws error 500 . This does not happen with smaller post data size
Any idea ? I already tried post_max_size and seems to be not related with that.
The code is:
var mainarray = jQuery('.master-settings').serialize();
var data = {
action: 'sliders_ajax',
postdata: mainarray
};
jQuery.post(ajaxu... | |
doc_23507066 |
*
*App is opened
*User clicks on a button that starts a service.
*User presses home key and then long presses home key and clears application from task list.
*Service continues to run, although app has closed.
How from the runnning service can I determine whether that app has been killed or not? Is this possibl... | |
doc_23507067 | http://jsfiddle.net/meisam/vq9dD/
Here is the javascript I'm using:
$('ol.sortable').nestedSortable({
disableNesting: 'no-nest',
forcePlaceholderSize: true,
handle: 'div',
helper: 'clone',
items: 'li',
opacity: .6,
placeholder: 'placeholder',
revert: 250,
tabSize: 25,
tolerance: ... | |
doc_23507068 | and I got "error LNK2001: unresolved external symbol _Main"
Error lines
: MSIL module encountered; incremental linking is disabled for MSIL; performing full link
1>LINK : error LNK2001: unresolved external symbol _Main
| |
doc_23507069 | var folder = DriveApp.getFolderById('0AIigAJ4047IdUk9PVA');
var f_name = ref.rlink;
var files = folder.getFiles();
I tried using while loop but did not succeeded here is my loop:-
while (files.hasNext()){
if (files.getName === f_name)
{
var file = files.getId();
break;
}
}
Logger.log(fil... | |
doc_23507070 | I've tried everything listed in this answer: https://stackoverflow.com/a/25199391/261217, nothing helped. smartgit.exe consumes only around 300Mb of RAM.
I did the following actions:
*
*Open SmartGit (repo is selected by default)
*Open Log window
*Close Log window
*Close SmartGit
System info:
SmartGit v6... | |
doc_23507071 | C:\Users\Admin>python -m pip install cx_Oracle
C:\Program Files\python-3.6.4-embed-win32\python.exe: No module named pip
Below are the version's setup in my PC.
C:\Users\Admin>python --version
Python 3.6.4
C:\Users\Admin>pip --version
pip 9.0.1 from c:\users\admin\appdata\local\programs\python\python36\l... | |
doc_23507072 | So, the basic HTML/CSS for the page is:
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<style>
/* Basic layout */
body {background-color: grey;}
nav {background: green; color: white;}
... | |
doc_23507073 | The script kind of work but it only create the first .txt file. I know that the first ping has to be done to go the the next one becaucause when i "ping -n 1" (only one ping), it create the 3 txt files as expected.
How can i "ping -t" the 3 IPs simultaneously and export the result in 3 different files?
my script:
$endd... | |
doc_23507074 | So the status table information that I need to use is:
*
*ID
*content
*userID
and the user information I need to use is:
*
*ID
*locationID
So the end result of what I want to achieve is having is the latest status of each user grouped by user.
I was using:
SELECT ID, content
FROM status
WHERE cont... | |
doc_23507075 | Example
And this is my code
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_search"
android:icon="?searchAppBarButton"
android:title="@string/buscar"
app:actionViewClass="android.support.v7.widget.SearchV... | |
doc_23507076 | I am struggling to find the length of that array:
typedef struct _stringArray
{
int (*Length)(char**);
char** (*Push)(char**, char*);
char** (*Pop)(char**, char*);
}StringArray;
StringArray* StringArray_Constructor(void)
{
StringArray* stringArray = (StringArray *)malloc(sizeof(StringArray));
strin... | |
doc_23507077 | The error:
GET https://worldclockapi.com/api/json/pst/now
net::ERR_CERT_COMMON_NAME_INVALID
Seems like it may be due to webpage on https and fetching data from API using http.
Example here as a live Stack Snippet:
function App() {
const [data, setData] = React.useState({});
React.useEffect(() => {
fetch("... | |
doc_23507078 | template<typename MapT>
std::vector<int> mapToVec(const MapT &_map) {
std::vector<int> values;
for(const auto &entry : _map)
{
values.push_back(entry.second);
}
return values;
}
Obviously this only works if the value type of the map is an int. How do I template this further to convert a map to a v... | |
doc_23507079 | .export async to sql ['test-continuous-export.database.windows.net.myFirstTable']
h@"Server=myConnectionstring" with (createifnotexists="true", primarykey="Id")
<| print Message = "Hello World!", Timestamp = now(), Id=12345678
I expect the simple printed message to be logged into the database, but it throws a... | |
doc_23507080 | private async Task getResult(IDialogContext context, IAwaitable<XYZ> result){}
The above method is executed fromcontext.Wait<XYZ>(getResult);
But when I click on a button, an error occurs (InvalidTypeException: invalid type: expected Microsoft.MscaBot.Data.XYZ, have Activity).
How can I avoid this error and receive the... | |
doc_23507081 | If I create a Firebase dynamic link without custom domain then the analytics is tracking properly.
It seems this issue is specific for dynamic links created with a custom domain.
Could anyone help me with tracking analytics for Firebase dynamic links with custom domain?
| |
doc_23507082 | Intent i = new Intent(Main.this, screen1.class);
i.putExtra("uid", username);
i.putExtra("pwd", password);
startActivity(i);
/** Fading Transition Effect */
overridePendingTransition(R.anim.fadein, R.anim.fadeout);
I want to start another activity while passing some strings over with intent. My pr... | |
doc_23507083 | I guess my usecase is pretty common but I can't seem to find any relevant information:
*
*user clicks an ad on google
*they are redirected to my website
*they signup for a free trial
*I report the "sign up" event back to google analytics (GA4) using gtag
*the sign up event is linked to google ads as an "offline" ... | |
doc_23507084 | First of all, sorry about my English.
If you add the use of a custom module in the code
PowerShell VSCode
using module. \ modules \ lineNumber.psm1
it is loaded at the first start of the script and judging by what I see, the subsequent call of the script with "using module. \ modules \ lineNumber.psm1" does not load i... | |
doc_23507085 | SELECT
COUNT(CASE WHEN `urgency`='1' THEN 1 END) AS verylow,
COUNT(CASE WHEN `urgency`='2' THEN 1 END) AS low,
COUNT(CASE WHEN `urgency`='3' THEN 1 END) AS standard,
COUNT(CASE WHEN `urgency`='4' THEN 1 END) AS high,
COUNT(CASE WHEN `urgency`='5' THEN 1 END) AS critical,
tbl_users.userName... | |
doc_23507086 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle ...>
<BootstrapperApplicationRef ... />
<Chain>
<MsiPackage ... />
<ExePackage ... />
<MsiPackage ... />
</Chain>
</Bundle>
I need to create a few directories for one of the applications (these directories won't be use... | |
doc_23507087 | throw the axe at the troll
where "troll" is in the vocabulary but "trawl" is not. The application should be able to learn, so:
throw the axe at the arggly
should allow "arggly" to be spelt out and recognised and added to the dictionary.
A: This depends on how you're implementing the speech recognition. If you're us... | |
doc_23507088 | i created new field for usertype and i add the value in database which is "admin"
$table->string('usertype')->nullable();
then i created this Midlleware (AdminMiddleware):
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class AdminMiddleware
{... | |
doc_23507089 | However I am running into an issue where I am getting the error in the question title which is coming up in my console web browser when trying to submit the form. I realize the issue might have something to do with one of the routes somewhere but I just cant figure it out (unless it's something completely different).
s... | |
doc_23507090 | In the examples https://github.com/ariya/phantomjs/wiki/Examples, it always (in the ones I have looked at) says something like:
console.log('some stuff I wrote');
This is not so useful.
A: The following can write contents to the file directly by phantomjs:
var fs = require('fs');
try {
fs.write("/home/username... | |
doc_23507091 | I have tried using preprocessor directives to compile the OS compatible classes at run time, but I haven't succeeded in it yet. I doubt the way I'm using preprocessors. so I'm putting up an example here:
//#ifdef JDE_4_6_0_AND_ABOVE
/*
//#endif
//some code
//#ifdef JDE_4_6_0_AND_ABOVE
*/
//#endif
//#ifndef JDE_4_6_... | |
doc_23507092 | here is the array looks like
[
{
id: "sdfgh47ddtrgy_8dfstdf"
name: "Orange"
},
{
id: "qwert47ddtrgy_8dfstdf"
name: "Apple"
},
{
id: "ufnhur18fgve_8dfstdf"
name: "Banana"
},
]
I have assigned to the state variable: fruits: []
In dropdown i've maped in this way:
{this.state.fruits.map((fruit) =>
<MenuItem value={fruit... | |
doc_23507093 |
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWi... | |
doc_23507094 | var list = new List<SomeType> { usefulProp1, usefulProp2, ... };
var usefulObject = new NewItem(notUsefulObject, list);
where SomeType is not string (list doesn't contain property names).
A: var list = new List<Expression<Func<object>>> { () => notUsefulObject.usefulProp1, () => notUsefulObject.usefulProp2... };
var ... | |
doc_23507095 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CastTest {
class Foo {}
// I want to use this kind of like a typedef, to avoid writing List<Foo> everywhere.
class FooList : List<Foo> {}
class Program {
static void Main(string[] args) {
... | |
doc_23507096 |
The column header must be 1,2,3,4,5 etc. etc. and here is my code so far..
<table class="table table-bordered table-condensed" align="center" bordercolor="#CCCCCC">
<tr bgcolor="#009933">
<td align="center" style="color:#FFF;">Name</td>
... | |
doc_23507097 | <v-dialog max-width="400" v-model="loginDialog" @login-success="loginDialog = false"><login-component></login-component></v-dialog>
And my child component has this one:
methods: {
async handleLoginForm() {
try {
const response = await this.$http.post('/api/users/login', { user: this.user })
t... | |
doc_23507098 |
A: Use services like Google Similar Images Search.
https://support.google.com/websearch/answer/1325808?hl=en
| |
doc_23507099 | I inherited a complex SSIS package where I had to make minor changes (package loads data from 18 files to a SQL database).
The package works well with 10.1. But gives an error with Unicode to non-Unicode conversion with 11.1. I didn't want to change the mappings in the whole SSIS package for my change. So I'm planning... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.