id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_41600 | This more or less could be a general objective-c question though, I am performing this:
NSMutableArray *allShapes = [[NSMutableArray array] retain];
b2PolygonShape shape;
..
..
[allShapes addObject:shape];
and receiving this error on the addObject definition on build:
cannot convert 'b2PolygonShape' to 'objc_object*'... | |
doc_41601 | data2 <- apply(data1[,-c(1:(index-1))],2,log)
I understand that this creates a new data frame, from the data1, taking column-wise values log-transformed and some columns are eliminated, but I don't understand how the columns are removed. what does 1:(index-1) do exactly?
A: The ":" operator creates an integer sequenc... | |
doc_41602 |
*
*I start the timer with an button
*then i hand over the integer to the next ViewController
*I start the timer with the new integer
So my problem results in step three: I want to start the timer in the function viewDidLoad(). But the timer doesn't starts in the next ViewController.
i hope anybody can help me... | |
doc_41603 | I tried .includes in netsuite but its giving error.
Eg:
var str = "Hello world, welcome to the javascript.";
var n = str.includes("world"); // this will return true
var n = str.includes("Apple"); // this will return false
I want similar function in netsuite.
A: I usually go for the search method, its easy to ... | |
doc_41604 | Based on this link:
[WooCommerce 3.0+] Ajax add to cart on variable products archive page
Using this code:
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
if ( ! function_exists( 'woocommerce_template_loop_add_to_cart' ) ) {
function woo... | |
doc_41605 | The thing is, I have been reading different posts, I can't find an answer that fits my problem. The expression -= seems to work only if it is in the same scope as the expression +=. When I write them in different scopes, the frames are still arriving and I can't disable that event handler.
The NON WORKING code is this... | |
doc_41606 | def reverseGeocode(coordinates):
result = rg.search(coordinates)
print(result)
if __name__ == "__main__":
coord = (-33.936952777777776, 18.39005)
reverseGeocode(coord)
Result has following format:
[OrderedDict([('lat', '-33.92584'), ('lon', '18.42322'), ('name', 'Cape Town'), ('admin1', 'Western Cape'... | |
doc_41607 | Why am I getting this infinite loop and more importantly how do I impose these restrictions on the input?
#include <iostream>
using namespace std;
int main(){
long long int m, k;
cin >> m >> k;
while (cin.fail() || m < 0 || k < 0){
cin.clear();
cout << "please enter another input";
... | |
doc_41608 | Used swagger comments:
/**
* @OA\Post(
* path="api/auth/login",
* tags={"Login"},
* summary="Login",
* operationId="login",
*
* @OA\Parameter(
* name="email",
* in="query",
* required=true,
* @OA\Schema(
* ... | |
doc_41609 | For example if any user send by post method the command to use, my server would be capable to take that command and send to the gps connected by socket but here is my problem because any time a channel is open, the message to send convert in null from the POST method to the writeFlush().
Any one knows how to intercept ... | |
doc_41610 | ---
driver:
name: ec2
aws_ssh_key_id: chef
security_group_ids: ["sg-b57021c0", "sg-fga04293"]
subnet_id: subnet-58721c1d
region: us-east-2
require_chef_omnibus: true
instance_type: t2.micro
associate_public_ip: true
provisioner:
name: chef_zero
policyfile: Policyfile.rb
platforms:
- name: impor... | |
doc_41611 | ||
doc_41612 | Lately I'm coming across projects where the clients prefer the app on their desktop (offline) rather than on the web.
Is it going to be a long road ahead to learn this? I can't get my head wrapped around going from web to desktop. Could someone give me a 50,000 ft overview of what I need to research? No details ne... | |
doc_41613 | I already created POJO/Model classes for below JSON by using http://www.jsonschema2pojo.org/ , but i'm not able to parse it by using GSON.
My JSON :
{
"SKU": [
"Hydrangea White( F033 )",
"Pink Rose 50 cm( F075 )",
"Yellow Rose 50 cm( F074 )",
"White Rose 50 cm( F072 )",
],
"wherehouse3": {
"name":... | |
doc_41614 | export async function waitForCallStatus(
callService: CallService,
call: Call,
status: CallStatus,
delay = 300,
retries = 5,
currentTry = 0,
) :Promise<any> {
if (currentTry === retries) {
throw TfApiError.badRequest('Max retries reached');
}
await Bluebird.delay(delay);
const callId = get(call, '_id');
const p... | |
doc_41615 | I am trying to install Postgres support for Rails 3 on Ubuntu. If I run:
sudo gem install pg
everything works fine.
However, I am using GemFile and trying to deploy my application to Heroku, so doing:
bundle install
As part of the bundle install it fails when doing gem install pg with the following error:
Building na... | |
doc_41616 | And one way I know is using collect method get spark working , however when I read the article it says :
Usually, collect() is used to retrieve the action output when you have
very small result set and calling collect() on an RDD/DataFrame with a
bigger result set causes out of memory as it returns the entire
dataset ... | |
doc_41617 |
A: 22GB is a very large file so it would be risky for your server to open the whole file using any tools. I'd recommend to split the file into multiple parts and search in each part. For example, using this command to split your file into small chunks of 1GB.
split -b 1GB very_large_file small_file
Also, you should se... | |
doc_41618 | It is possible?
I attached picture what I want to read.
Thanks for your help.
A: Can you try the below code:
Dim fileProperty As Variant
For Each fileProperty In ActiveWorkbook.BuiltinDocumentProperties
Debug.Print fileProperty.Name
Next fileProperty
I know this is not the full code, but you can also use .Builtin... | |
doc_41619 | I am now happy that I understand how actions and effects relate to each other, but I am still unsure as to what functions they perform. The example app goes some way to helping me, but it seems that the effects are doing all the grunt work: the loadCollection$ effect, for example, appears to be loading all of the resou... | |
doc_41620 | I have converted the following:
loginemail.module.ts
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { LoginEmailPage } from './loginemail';
import { ControlMessages } from '../validation/controlMessages';
@NgModule({
declarations: [LoginEmailPage],
imports: [Ionic... | |
doc_41621 | does any one have any idea regarding this??
A: Yes I had used the same idea for another plot
offset=(delta_rear_front_1 + 0.5*10^4);
y=delta_rear_front_1+offset;
a=plot(datastructs.SpringWayOut.mConfCircle_time,y,'red')
Thank anyway, actually I was complicating things and I got that and I had done it
| |
doc_41622 |
A: You keep editing those files. I do not think those files are the files you think they are.
You question is pretty short on details, but my first guess if your system is running with the compiler enabled, which means it's loading its class files from
includes/src
Googling around to learn about the compiler would b... | |
doc_41623 | one.jsp
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:myDSN");
st= con.createStatement();
rs= st.executeQuery("select id,dr_name,categoryname,cityname,availability from doc_registration");
while(rs.next())
{
doc_id = rs.getInt("id");
doc_name=rs.ge... | |
doc_41624 | My code in CrudController
yield AssociationField::new('category')
->setColumns(4);
yield AssociationField::new('subcategory')
->autocomplete()
| |
doc_41625 |
*
*i did manage to customize the rendering of the login form by creating my custom app/Ressources/FOSUserBundle/views/Security/login.html and copying this :
{% extends '::base.html.twig' %}
{% block title %}Site title{% endblock %}
{% extends "::base.html.twig" %}
{% block title %}Site title{% endblock %}
{% block... | |
doc_41626 | I have the latest firefox (v59.0.2), Selenium geckodriver v.0.24.0 and using python 3.6.5
This is the the code
from selenium import webdriver
driver = webdriver.Firefox('/root/Downloads/geckodriver')
Here is the error
Traceback (most recent call last):
File "<input>", line 3, in <module>
File "/root/PycharmProj... | |
doc_41627 | Fatal error: Call to a member function hooks_dp3rsSidebar() on a non-object in
on line 63
and this is what on line 63:
return $this->registry->output->getTemplate( 'referrals' )->hooks_dp3rsSidebar( $this->referralsSystemLibrary->getTopXReferrers() );
A: Usually this kind of error are the result of the use of -> o... | |
doc_41628 | Jul 30, 2014 12:50:47 PM org.apache.openejb.util.JarExtractor extract
INFO: Extracting jar: C:\Apache TomEE\apache-tomee-plus-1.6.0.2\webapps\MyWar.war
Jul 30, 2014 12:50:47 PM org.apache.openejb.util.JarExtractor extract
INFO: Extracted path: C:\Apache TomEE\apache-tomee-plus-1.6.0.2\webapps\MyWar
Jul 30, 2014 12:50:... | |
doc_41629 | This is base functionality I want to achieve:
a)
A->B->C C back to A
b)
A->C C back to A
A: The only way is replacing the back button by a custom button.
A: you can achieve this with presentview controller as modal view.first from a if first button is pressed present b view.if secnd button is pressed p... | |
doc_41630 | I don't need to create a map to fetch it, i have an url to call it and the json is composed of one single int value. How can i fetch it?
A: var client = http.Client();
String url = "url";
Response response = await client.get(url);
print('Response status: ${response.statusCode}');
print('Response body: ${json.decode((r... | |
doc_41631 | If this is not possible, Atleast I should be able to export LIST from variable explorer in spyder.
I tried
`
import xlsxwriter
workbook = xlsxwriter.Workbook('arrays.xlsx')
worksheet = workbook.add_worksheet()
array = [['a1', 'a2', 'a3'],
['a4', 'a5', 'a6'],
['a7', 'a8', 'a9'],
['a10', 'a11... | |
doc_41632 |
id
str_data
1
{{{1111, 2023-02-07}, null, 88.92.1, text, 2023},[{{'1111', date='2023-02-07'}, null, 41.5, text_1, 2023}, {{'1111', date='2023-02-08'}, null, 15.59, text_2, 2023}]}
2
{{{2222, 2023-02-07}, null, 25.87, text_3, 2023},[{{'2222, date='2023-02-07'}, null, 33.5.1, text_4, 2023}, {{'2222', date='2023... | |
doc_41633 | list1.txt
list2.txt
list3.txt
etc
This lists all look like so: (all columns are made of numerical values)
value1 value2 value3
value4 value5 value6
etc
For each of those lists, I want to cut a certain column of interest, sort it so that number are in increasing order and check whether my original file and ... | |
doc_41634 | BROKEN_THINGS = \
thing1 \ # thing1 is completely broken
thing2 \ # thing2 is broken too, see BUG-123
Look like this is not possible with [g]make.
I ended up using warning function (this works because $(warning X) always returns empty string):
BROKEN_THINGS = \
thing1 $(warning "thing1 is completely broken") \
... | |
doc_41635 | case "StartsWith":
return Expression.AndAlso(
Expression.Not(Expression.Call(typeof(string), (typeof(string).GetMethod("IsNullOrEmpty")).Name, null, member)),
Expression.Call(Expression.Call(member, "ToLower", Type.EmptyTypes), startsWithMethod, co... | |
doc_41636 |
A: Learn about Broadcast and BroadcastReceiver (Abstract Class) to get broadcasts about incoming calls, sms, mms, wifi etc.
http://developer.android.com/reference/android/content/BroadcastReceiver.html
| |
doc_41637 | data_files = [
"ap_2010.csv",
"class_size.csv",
"demographics.csv",
"graduation.csv",
"hs_directory.csv",
"sat_results.csv"
]
data_names = [name.rstrip('.csv') for name in data_files]
I get this results:
["ap_2010", "class_size", "demographic","graduation","hs_directory", "sat_result"]
The en... | |
doc_41638 | I make new branches when a manual needs a major update. But, when the manual is approved, it needs to get merged back into the master. When merging from branch into master, I would like to pass some command to Git to say, "forget the merging, just use the the file from branch to overwrite the file in master." Is there ... | |
doc_41639 | grammar Tokens;
TOKEN : 'token';
grammar Parser;
import Tokens;//gives undefined import error
rule : TOKEN+;
I'm referencing the documentation from
http://www.antlr.org/wiki/display/ANTLR3/Composite+Grammars
Thanks
A: When separating lexer- and parser grammars, you need to explicitly define what type of... | |
doc_41640 | I have a WSDL from which I have generated classes for my input and output messages. The input consists of a header and a body while the output only consists of a body.
WSDL
<wsdl:types>
<xs:schema targetNamespace="http://cxftestserver.blueprint.me.com">
<xs:element name="input">
<xs:complexType>... | |
doc_41641 |
Is a MODULE better than a COMMON block?
Almost always yes. The only reasons to use COMMON blocks are if you
expect to use your program on a computer with only a FORTRAN 77
compiler (they still exist), or if it is very important that you
control the order in which your data is stored in memory.
Well, using modul... | |
doc_41642 | In his Windows Imaging Component article - http://msdn.microsoft.com/en-gb/magazine/cc500647.aspx
he writes -
Finally, the WIC API makes use of HRESULTs to describe errors. The samples in this article use the HR macro to clearly identify where methods return an HRESULT that needs to be checked. You can replace this wi... | |
doc_41643 | Thanks in Advance.
A: I have the same question, but I am not sure what the perfect answer is. I feel like having the DAL return the IQueryable<> is actually the most flexible, because you could easily perform another LINQ query on top of that at another layer in the code (if necessary).
Another thing to consider is t... | |
doc_41644 |
A: It has both static and dynamic localisation.
A: Yes, internationalization is supported with Ext JS:
https://www.sencha.com/blog/internationalization-localization-with-sencha-ext-js/
A: ExtJS only helps localize the string resources it uses. Although with a bug currently.
It doesn't provide any utility to localize... | |
doc_41645 | const htmlString = `<p>hello world</p>
<ul>
<li>hello</li>
<li>world</li>
<ul>
<p>this is my string</p>`
I have used draft-js method convertFromHtml which results in this:
{
"contentBlocks": [
{
"key": "f9aci",
"type": "unstyled",
"text": "hello world ... | |
doc_41646 | ./appdata:/appdata
I'd like to have this as a volume and then reference that volume from multiple containers. The volume configuration reference only shows data-volume: as a named volume, with no value, so it doesn't look like the above.
services:
nginx:
build: ./nginx/
ports:
- 80:80
... | |
doc_41647 | First View Controller:
class FirstViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
let tableView = UITableView()
var data = ["mars", "earth", "jupiter", "venus", "saturn"]
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
view... | |
doc_41648 | ALTER PROCEDURE [dbo].[ExportToExcel]
@Year int,
@ExcelFileSaveRoutePath VARCHAR(MAX)
AS
BEGIN
SET NOCOUNT ON
SET ANSI_WARNINGS OFF
IF 1 = 0
BEGIN
SET FMTONLY OFF
END
-- Here I tried many things but cant resolve...
SELECT * FROM [dbo].[LOAN] l
WHERE l.... | |
doc_41649 |
*
*The JWT token should include a refresh token.
*The JWT access time should be set to two minutes, the refresh token expiry set to one hour.
A: *
*Go to Keycloak Administrative Console.
*Select your Realm.
*Go to "Tokens" tab.
*Set desired timeout in "SSO Session Idle" param
Refresh token timeout is contro... | |
doc_41650 | My question is how can I store these values in such a manor that would allow the users to change it.
Example; I as the user, decide i want google to be my first website, and youtube to be my second.
I have considered making a "settings" file however is it practical to put 20+ websites into a settings file and then loa... | |
doc_41651 | ||
doc_41652 | thanks in advance.
A: Create a workflow to send email, and then use javascript to trigger that workflow when you click the custom button.
| |
doc_41653 | I set up a new WP site locally using the 5 minutes WP installation. That works fine and I can login/logout. However, the wp-config that is created still has the username and passwords as 'root' and 'root'. I tried to change these manually using my WP username/password (those introduced during the 5 minute installation)... | |
doc_41654 | While they play perfectly on Chrome, they don't seem to play on Safari. Example of a link provided directly from Vimeo (video file link).
Things to note:
*
*The files are in mp4 and compressed through Media Encoder before uploaded to Vimeo.
*A few times it randomly started playing on Safari but stop working again af... | |
doc_41655 | I am getting error in console but in network its showing successful response.enter image description here
| |
doc_41656 | Firebug does not show that any errors were thrown either. All I can see from it was that the request was made, the right params and associated values were passed and that the html is completely blank.
EDIT : This is not browser specific. Tested in Firefox, IE, and Chrome.
Code:
var userData = {
firstname: $('#fi... | |
doc_41657 | See more here: https://codepen.io/lmsutter/pen/eYrLWpp
function App() {
return (
<div className="App">
<div className="scrollWrapper">
<div className="overlay">
<div className="opacity"></div>
<div className="opacity"></div>
<div className="border"></div>
<div... | |
doc_41658 | Shouldn't it be prevented by Visual Studio to add such Windows specific dependencies to an ASP.NET Core project?
A: If you have only the intentions to release on Windows, why should it be limited?
Of course cross platform is nice, but it isn't mandatory
| |
doc_41659 | I am reviewing the concepts of SOA and I have this question.
SOA-> COVERS in 2 technologies, SOAP(xml) AND REST(xml,json,txt,etc)
Microservices that is based on SOA, uses SOAP or is only based on REST?
obs: if it is clear that the microservice goes by the level of decoupling, independence and only specific tasks, but m... | |
doc_41660 | I tested this Screencastify app and I think it does a pretty decent job, it records even in fullHd fast and also can record the system sound. But how does this work? AFAIK Chrome doesn't have an API for recording the system sound and encode video that quickly.
A: Screencastify uses Native Client.
| |
doc_41661 |
A: Add a general Exception block to your JSON parsing try/catch and post the error that is caught:
//parse json data
try{
JSONArray jarray = new JSONArray(result);
for(int i=0 ; i<jarray.length() ; i++) {
JSONObject ob = jarray.getJSONObject(i);
String titulo = ob.getString("title");
... | |
doc_41662 | <script asp-src-include="~/app/**/*.js" asp-append-version="true"></script>
Now when I change a file, then it works properly and the hash string is changed and it gets updated, but when I add a file to the folder nothing really happens, I have to kill IIS Express and run again. Is there a way to fix it or it's the way... | |
doc_41663 | How do I do this?
EDIT:
Code Sample:
`require 'rubygems'
require 'rest_client'
require 'base64'
require 'rubygems'
require 'rest_client'
require 'base64'
require 'net/http'
require 'net/https'
require 'logger'
url ="https://redcap.org/redcap/api/"
my_token= 'token value'
RestClient.post url, :token=>my_token`
... | |
doc_41664 | <div class="h-screen flex flex-col">
<!-- Navbar -->
<nav
class="flex justify-between items-center shadow-sm z-10 px-4 col-span-5"
>
<div>
<img class="h-16" src="~/assets/imgs/logo-01.png" alt="optado logo" />
</div>
<div>
Icons
</div>
<div>
Avatar... | |
doc_41665 | java.lang.reflect.UndeclaredThrowableException
com.sun.proxy.$Proxy980.initPayment2(Unknown Source)
com.mobimoney.emulator.rostelecom.utils.LogicImpl.executeInitPayment2(LogicImpl.java:76)
com.mobimoney.emulator.rostelecom.servlets.InitPaymentPageServlet.execInitPayment(InitPaymentPageServlet.java:56)
c... | |
doc_41666 | date attendance
"2018-01-01" 111
"2018-01-02" 113
"2018-01-03" 100
"2018-01-04" 95
"2018-01-05" 105
"2018-01-08" 114
"2018-01-09" 114
"2018-01-10" 104
"2018-01-11" 95
"2018-01-12" 103
"2018-01-15" 93
"2018-01-16" 110
"2018-01-17" 99
"2018-01-18" 98
"2018-01-19" 1... | |
doc_41667 |
A: Add this code to functions.php in your theme. Keep in mind that if you update your theme, this edit might be lost. So either save it somewhere to add it again or create a child theme and add it there.
add_filter("woocommerce_quantity_input_args", function($args, $product){
if(!is_cart() && has_term("wine-bottle... | |
doc_41668 | class Main
{
public string Name()
{
string employee = "";
while (employee == "")
{
try
{
Console.Write("Please enter employee name: ");
employee = Console.ReadLine();
}
catch (Exception e)
... | |
doc_41669 | TMPFILE="$(mktemp)" || exit 1
< package.json jq '. + {"foo":'"${BOO}"'}' > "$TMPFILE"
but I get the following error:
jq: error: syntax error, unexpected '}' (Unix shell quoting issues?) at <top-level>, line 1:
. + {"foo":}
jq: 1 compile error
any idea how to escape properly that part by having the double quote there... | |
doc_41670 | To be safe, it has to accept only a valid token.
The software that connect to my API send a Auth header with "Basic 134asSdsw324bvv3w4tvc45==" content.
My problem is to have my PHP script to process that token... In apache_request_headers() there is no Authentication header, neither on my $_SERVER variable...
Any su... | |
doc_41671 | (?<FUNCTION> (?!CUP\(\d+\)|CDN\(\d+\))[A-Z]+\(\d*\)|[A-Z]+\(\d+,\d+\))
| (?<NUMBER>\d+|\d*\.\d+)
| (?<RELATION>==|<=|>=|!=|<|>|CUP\(\d+\)|CDN\(\d+\))
| (?<EOL>;)
| (?<OPENPAR>\()
| (?<CLOSEPAR>\))
| (?<OPERATION>\*|\+|-|\/])
| (?<SPACE>\s+)
| (?<ERROR>.)
With the above, using regex engine properties together with decr... | |
doc_41672 | If this IS possible, can you offer me some guidance on how to configure the client settings in the config file?
The main issue I'm having is that I'm sending large messages to my main REST service. When that message is relayed to the secondary service it seems that the response triggers a "MaxReceivedMessage" too larg... | |
doc_41673 | class ABC():
def __init__(self):
self.HOST = 'hostserver.com'
self.TCP_PORT = 0123
self.BUFFER_SIZE = 1024
self.SERVER_INFO = ""
self.SOCK = None
def connect_socket(self):
self.SOCK = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.SOCK.settimeout(... | |
doc_41674 |
function doWork() {
var index = 0;
var boxes = $('.box1, .box2, .box3, .box4, .box5, .box6');
function start() {
boxes.eq(index).addClass('animated');
++index;
setTimeout(start, 80);
};
start();
}
when i click a link, this animation star... | |
doc_41675 | I have a sql query:
select name, age, lastname
from table1
and i want the ssis to pass it to an excel file(xls).
How can I do this?
Thanks.
A: You will need to create a template sheet to put the data into. Once you have the template worksheet you will need to define an 'excel connection' inside your job.
once you hav... | |
doc_41676 |
shows results like "cabcd a", "xyabcd xyz", " xyz abc", "x abc","abc y". But i only want the output to be like "xyz abc", "x abc", "abc y". And abc is stored in var1
A: I would suggest:
where concat(' ', column, ' ') like "% abc %"
This will find the word anywhere in the column, assuming the only valid separator ... | |
doc_41677 | class A
{
public:
A(int Val)
{
_val = Val;
}
virtual ~A() = default;
private:
int _val = 0;
};
class B
{
public:
B() = default;
virtual ~B() = default;
private:
A _a(3); // Error: expected identifier before numeric constant
}... | |
doc_41678 | <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
The placeholder i am trying to get is the Environment variable which will help me pick up the files from config server. E.g config-client-{ENVIRONMENT}.properties
Excepti... | |
doc_41679 | It might be, that the curve fit method has problems with the size of the parameters. But neither with boundaries nor with initial values did curve_fit get a reasonable result.
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
# --- Ramberg-Osgood-Function
def RamOsg(sigm, E, sigm... | |
doc_41680 | My input
<div class="customizationUploadBrowseImg">
<input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}"
class="file_upload form-control customization_block_input {if isset($pictures.$key)}filled{/if}"/>
</div>
The id or message must appear
<li>
<strong>- Couverture ... | |
doc_41681 | I added this script to the pipeline but looks like is not working.
script:
- VERSION=$(python setup.py --version)
- if [ $CI_COMMIT_TAG != $VERSION ]; then
- echo "Tag does not match the correct version"
- exit 1; fi
A: You can't split bash if/then statements across multiple script array items in GitLab CI. You must ... | |
doc_41682 | This is my code.
import UIKit
import MapKit
class ViewController: UIViewController, MKMapViewDelegate {
@IBOutlet weak var mapView: MKMapView!
override func viewDidLoad() {
super.viewDidLoad()
let latArray = [-23.528657, -23.518514, -23.533796, -23.533796]
let longArray = [-46.48400... | |
doc_41683 | But since they're already in an array variable, I can't pass it to array_merge() like this:
array_merge( $AoA );
What I'd like to do is this, but I can't because I don't know how many items are in the array:
array_merge(
$AoA[0],
$AoA[1],
$AoA[2],
// etc ...
);
Is there a short hand I can use to accomplish th... | |
doc_41684 | NavigationPage.SetTitleIcon(this, "LogoLocales.png");
Looks like it should work fine, but only works on iOS not Android.
Any ideas?
enter image description here
A: Add
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/LogoLocales"
android:lay... | |
doc_41685 | .resizable()
.frame(width: 300, height: 300)
Crash error
Implicity unwrapped nil value
How can I unwrap this?
A:
How can I unwrap this?
According to the error message, you've got an implicitly unwrapped nil value. That is, you have some variable declared like:
var image: UIImage! = ...
You should only e... | |
doc_41686 | XEP-0086 gives me all I need but the XEP is marked as deprecated. Is there a XEP that supersedes it, are there guidelines on how to respond with errors or one builds custom errors?
A: Stanza errors are described in XMPP: Core section 8.3, and section 8.3.2 talks about how and where you should place custom error info.
| |
doc_41687 | Date ConfigID ItemID ClientName Metric1 Metric2
==== ======== ====== ========== ======= =======
2017-01-01 1 1 A 2.0 2.0
2017-01-01 3 1 A 2.0 2.0
2017-01-01 4 2 B 5.0 5... | |
doc_41688 | Is there a way to do this using resque-retry
A: You could use custom retry criteria to check how many times resque-retry has retried for you and do something different if the number is too large. Something like this:
class APIWorker
extend Resque::Plugins::Retry
@queue = :api_worker_queue
retry_criteria_check ... | |
doc_41689 | The idea is that we want to have higher parallelism with Flink when we are performing the aggregations but eventually coalesce the data and have lesser number of processes writing to the DB so that the target DB can handle it (for example say I want to have a parallelism of 40 for aggregations but only 10 when writing ... | |
doc_41690 | Fatal Exception: java.lang.IllegalArgumentException: Service not registered: com.android.systemui.qs.external.TileLifecycleManager@775810d
at android.os.Parcel.readException(Parcel.java:1947)
at android.os.Parcel.readException(Parcel.java:1889)
at android.service.quicksettings.IQSService$Stub$Proxy.updateQs... | |
doc_41691 | So is it just to have a cleaner way of achieving this because this could be a common use-case or this is more efficient than current alternatives?
Edit: It would help to know why a question is down voted - was the question too opinionated/broad to ask?
A: It's just for convenience. There are a huge amount of functions... | |
doc_41692 | angular.module('myApp.services').factory('MyService', [ '$resource', function ($resource) {
return {
getModuleId: function() {
return $resource('/api/module_id', {}, {
query: {
method: 'GET'
}});
}
}
}]);
Then in an html file, i... | |
doc_41693 | CLS
REM Start Backup
TITLE Backup
SETlocal EnableDelayedExpansion
REM Capture the date/time(right down to the second) and then assign it to a variable
SET yy=%date:~-4%
SET dd=%date:~-7,2%
SET mm=%date:~-10,2%
SET newdate=%dd%%mm%%yy%_%Time:~0,8%
SET newdate=%newdate::=%
SET foldername=svetlana_backup_%newdate%
REM... | |
doc_41694 | I want the common text of both like ['is','Physics'].
This has to be done for all the rows of data. How can I achieve that using R ?
Regards,
A: I think you want something like the following:
df <- data.frame(col1=c('what is physics?', 'set cover is NP hard', 'abstract algebra'),
col2=c('Physics is ... | |
doc_41695 | In my investigation I noticed I had a warning:
warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "p4api.net, Version=2014.3.100.9144, Culture=neutral, PublicKeyToken=f6b9b9d036c873e1, processorArchitecture=AMD64", "... | |
doc_41696 | // Get a reference to the current diagram
var currentDiagram as EA.Diagram;
currentDiagram = Repository.GetCurrentDiagram();
if (currentDiagram != null)
{
for (var i = 0; i < currentDiagram.DiagramLinks.Count; i++)
{
var currentDiagramLink as EA.DiagramLink;
currentDiagramLink = currentDiagram.... | |
doc_41697 |
A: One of them is certainly srcset on the picture element, well its contains a URL but is maybe one.
Not sure how to properly search for one, maybe browsers have implemented some logic like that?
Mh, at least servo has implemented a generic get_url_attribute function which tries to converts any attribute to a URL http... | |
doc_41698 | I know I'm supposed to use signals and message IDs, but I'm not clear on how to tackle the communication between processes.
#include <signal.h>
#include <stdio.h>
void m.signal(int x)
{
printf("A signal has arrived.");
}
int main()
{
signal(100, m.signal);
while(1)
{
pause()
}
}
A: Inte... | |
doc_41699 | gem install mysql -v '2.9.1'
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.4.0/gems/mysql-2.9.1/ext/mysql_api
/usr/local/rvm/rubies/ruby-2.4.0/bin/ruby -r ./siteconf20170107-4120... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.