id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23508800 | float X = ImageView.getX(); X++; How could I improve this?
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (v.getId()) {
case R.id.circle1:
if (event.getAction() == MotionEvent.ACTION_DOWN) {
//WHAT CODE SHOULD I PUT INSTEAD OF THE FLOAT X AND X++
... | |
doc_23508801 | create view dbo.vTable1
select
...
from dbo.Table1
cross apply openjson(...) with (...)
cross apply openjson(...) with (...)
Otherwise :
create view dbo.vTable2
select
...
from dbo.Table1
(I don't want to use stored procedure)
A: Here is a solution compiled from the comments.
Sample data
create table data
(
id i... | |
doc_23508802 |
Class A ()
Class B ()
Class C ()
Main()
Main it showing window which have 3 pushing buttons : each button is calling one of three classes , and each one open another window responsible on its own function ; however, class C is responsible on getting files from directory .
What I want to do is that make getOpe... | |
doc_23508803 | $faker->randomElements($array = array('long','short','shoulder length')),
Output from php artisan db:seed
[Illuminate\Database\QueryException]
Array to string conversion (SQL: insert into `profiles` (`agency_id`, `name`, `bio`, `age`, `hair_ty
... | |
doc_23508804 | trait GenericBuilder[T <: Any, B <: Builder[T], R <: Result[T]]
To simplify the declaration, I wonder if there is a way to eliminate T in this case while maintaining the type strictness.
EDIT: I don't have control of the Builder or Result code - they are pulled in from some java artifacts outside.
A: If you just want ... | |
doc_23508805 | I want to open each PDF at 100% zoom when I double-click it from nautilus. Currently it opens at 59%. I have to resize the window every time.
The application seems to call itself "Document Viewer". As far as I can tell, this is an unhelpful indirect name for evince. But I am not sure, because GNOME as a whole is tr... | |
doc_23508806 | i tried
string[] values = strCurLine.Split(',');
and i am getting output as
array[0]="180"
array[1]="LMN"
array[2]="8"
array[3]="5/17/2012 15:00"
array[4]=""
array[5]="name"
array[6]="2nd row"
array[7]="step 2 from 4 to 2"
array[8]="7/9/2012 8:47:00 AM"
But when i am trying to read a content wh... | |
doc_23508807 | spring-servlet.xml
<bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPath" value="/WEB-INF/pages/"/>
</bean>
template.html
<#macro page>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml... | |
doc_23508808 | <xs:simpleType name="valuelist">
<xs:list itemType="xs:double"/>
</xs:simpleType>
A sample XML fragment would be:
<values>1 2 3.2 5.6</values>
In an XSLT transform, how do I get the number of elements in the list?
How do I iterate over the elements?
A: If list is strictly spaced, you can count spaces based on stri... | |
doc_23508809 | I have this:
0 1
0 (a, b) 345
1 (a, c) 345
2 (a, d) 345
3 (a, e) 345
4 (a, f) 345
5 (b, c) 345
6 (b, d) 345
7 (b, e) 345
8 (b, f) 345
9 (c, d) 345
10 (c, e) 345
11 (c, f) 345
12 (d, e) 345
13 (d, f) 345
14 (e, f) 345
I would like to get this:
0 a b c d e f
a 1 345 345 345 345 345
b 345 1 345 345 34... | |
doc_23508810 | Why could that be?
So, this works:
$email = "mymail@gmail.com";
$to = $email;
$subject = "Mypage - Password recovery";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html' . "\r\n";
$headers .= 'From: mypage <mypage@mypage.com>' . "\r\n";
$message = "
<html>
<head>
<style>
body{
... | |
doc_23508811 | mysqli_query($database,"INSERT INTO userdetails (username,email_id)VALUES ($_POST['username'],$_POST['email_id'])";
Error:
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in E:\Xampp\htdocs\newsreg.php on line 19
... | |
doc_23508812 |
A: Bootstrap and Polymer are two very different libraries that fulfill different purposes and have very different use cases.
Before you choose one over the other you need to first understand what they both really are.
Bootstrap:
*
*CSS library to makes styling website much easier
*Built using CSS and some JS
*Used... | |
doc_23508813 | Create a new directory, ~/UnixCourse/editingAsst.
Copy into that directory the file ~cs252/Assignments/editingAsst/mtswe10.txt
Use one of the three editors discussed in this language to edit the file ~/UnixCourse/editingAsst/mtswe10.txt
In line 597, change the semicolon (;) to a period, and capitalize ... | |
doc_23508814 | String command[] = new String[]{
"-y",
"-i", firstPath,
"-i", secondPath,
"-strict",
"experimental",
"-filter_complex",
"[0:v]scale=iw*min(1920/iw\\,10... | |
doc_23508815 | I am using two loops and it gives TLE can anyone help me in this?
code:-
int main() {
int arr=[1, 2, 3, 3, 4, 5, 6, 5, 6]
int max=0;
int k;
int c=0;
for (int i=0;i<n;i++) {
for (int j= i+1;j<n;j++) {
if (a[i]==a[j]) {
c++;
if (k>max) {
... | |
doc_23508816 | My requirement is to run a PHP script on my server. This PHP script will create a JSON file.
This JSON file will be downloaded by my iOS app. (Some kind of authentication is an added bonus)
How would I go about doing this? Should I create a "Mobile Service" or should I create a "Website" or something else like "Cloud S... | |
doc_23508817 | /usr/local/bin/node: Undefined symbol "nghttp2_option_set_max_settings"
i tried to open this file but the file is encrypted :'(.
A: This is a known bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241643
Try running pkg update -f and then pkg install -f node libnghttp2.
| |
doc_23508818 | I am trying to enter to verify some files of the docker installation, where it is located image, containers, etc.
When I try to enter it happens to me that I must use sudo to be able to visualize the folders when being inside the docker folder:
But when I try to enter any of this folder, even with the sudo command, th... | |
doc_23508819 | import Foundation
import ObjectiveC
class TestClass {}
var obj = TestClass()
let stringValue = "xyz"
let key = "def"
objc_setAssociatedObject(obj, key, stringValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
//let f = "f"
let returnedString = objc_getAssociatedObject(obj, key)
This works and returns... | |
doc_23508820 | Note: I can not combine branch. Also I do not want to use branch. I probably opened the branch by mistake, and suddenly I am loading the codes in there. When I click on the "Branch" tab and want to delete it, I get the warning "You can not delete the master branch". Do you have any suggestion?
edit: I added screenshot... | |
doc_23508821 | struct A {
void *stuff;
int x;
int foo() const;
}
And I have some functions which take parameters of this type, e.g.
int bar(A a1, A2 a2);
int baz(A2 a2);
The thing is, not all of these functions actually change any memory in a2.stuff; yet - I can't take a const void* and an int, construct an A and pass it to ... | |
doc_23508822 | class AccessControlCoprocessor extends BaseRegionObserver {
@Override
public void postPut(ObserverContext<RegionCoprocessorEnvironment> e,
Put put,
WALEdit edit,
Durability durability)
throws IOException
{
/*
the original put was added in this way
... | |
doc_23508823 | when someone defines .code16 in their assembly code and does the following :
$ gcc -c -m32 -o main.o main.s
It ignores the .code16 and the output assembly would be meant to run on 32-bit platform. If someone does not specify -m flag, it seems to take the one configured for gcc as default depending on the host. Hence, ... | |
doc_23508824 | For example, I have the following module, AbcModule:
public class AbcModule : NancyModule
{
public AbcModule() : base("/api/systems/abc")
{
Get["/"] = _ => "ABC API Host";
Get["/domains/"] = _ => Response.AsJson(Domains.All);
Get["/domains/{name}"] = x => Response.AsJson(Domains.All.Sin... | |
doc_23508825 | VALUES ('$clientName','$salesPer','$prospectVal')");
while ($row = mysql_fetch_assoc($result)) {
$projectID = $row['projectid'];
return $projectID;
}
I am not getting the projectID from the database. The field name is a dynamic one which incre... | |
doc_23508826 | So is there any way that i can obtain a API key for Google maps for android v1,
or
Can i use Google maps for android v2 key with out changing my code (Like ItemizedOverlays, Overlays, and Drawings on map)
Please Help !!!
Thanks in advance.
A: This the time you can migrate from current Version V1 to V2. Detailed... | |
doc_23508827 | import java.util.Scanner;
public class MethodVariables
{
public int num1;
public int num2;
public int add = (num1 + num2);
public int sub = (num1 - num2);
public static void main(String[] args)
{
Scanner input = new Scanner (System.in);
System.out.println("Please enter the f... | |
doc_23508828 | import Crypto.Cipher.Types
main::IO()
main = do
let iv0 = nullIV
print ""
it throws an error
• No instance for (BlockCipher c0) arising from a use of ‘nullIV’
• In the expression: nullIV
In an equation for ‘iv0’: iv0 = nullIV
In the expression:
do let iv0 = nullIV
print ""
|
14 | let ... | |
doc_23508829 | > x <- seq(0,1,length=11)
> x[8]
[1] 0.7
> x[8]==0.7
[1] FALSE
>
> x <- round(seq(1,0,length=21),2)
> x[3]==0.9
[1] TRUE
> x[5]==0.8
[1] TRUE
> (x[3]+x[5])/2
[1] 0.85
> (x[3]+x[5])/2==0.85
[1] FALSE
| |
doc_23508830 | I've been trying to figure it out using a Position2D. I have the Position2D at the end of the gun, where I want the bullet to load in. I've tried researching through google and Youtube as well. Right now I have a sprite (an arm) that rotates depending on the mouse position, and a sprite (the gun) attached to the arm. ... | |
doc_23508831 | {% assign current_month = {{ site.time | date: '%m' }} %}
A: Remove extra brackets :
{% assign current_month = site.time | date: '%m' %}
A: How did you use the variable?
{% assign current_month = {{ site.time | date: '%m' }} %}
{{ current_month }}
Will out put the current month.
| |
doc_23508832 | {
"code": "rest_invalid_param",
"message": "Invalid parameter(s): orderby",
"data": {
"status": 400,
"params": {
"orderby": "orderby is not one of id, include, name, slug, term_group, description, count."
}
}
}
So far I have tried:
add_filter( 'rest_product_collectio... | |
doc_23508833 | The details:
VS 2008 app with a 9.1 Crystal Report created in the application and exported to a pdf file on local server. I get no errors, but no pdf file ever gets exported or saved. I have confirmed that the user id running the application pool has access to the folder where it should be saved. I have confirmed that ... | |
doc_23508834 | At the same time trying to setup and initialize a Serilog logger in the consumer assembly of that diagnostics library.
[AspectTypeDependency(AspectDependencyAction.Order, AspectDependencyPosition.After,
typeof(AddContextOnExceptionAttribute))]
[PSerializable]
public sealed class ReportAndSwallowExceptionAttribute : O... | |
doc_23508835 | PHP version: 7.0.27
PHP modules: click here
php_error.log: too long (I can send the pastebin link)
Please tell me if you need more info. I would really appreciate any help.
A: You might have set the wrong file permission on your Nextcloud installation.
If you created the Nextcloud directory with root permission, you n... | |
doc_23508836 | Two related questions on the subject:
*
*How complete does Breeze cover the OData/CSDL metadata capabilities? I assume relationships entities and datatypes are all supported, but are there notable gaps to be aware of?
*Can I export a Breeze MetadataStore (back) to CSDL? If not, is this on the roadmap of being suppo... | |
doc_23508837 | when my 2 .py files are in the same directory /home/pi they work fine.
main.py
#!/usr/bin/python
import buttonlog
buttonlog.py
import datetime
i = datetime.datetime.now()
#OPEN FILE & APPEND
f=open('buttonlog.txt','a')
#WRITE DATE THEN NEW LINE WITH THE '\N'
f.write(i.isoformat() + '\n')
When I run python main.py i... | |
doc_23508838 |
*
*wn_synset(synset_id decimal, w_num decimal, word varchar(255), ss_type char)
This table contains word List in word column.
*
*wn_gloss(synset_id decimal, gloss varchar(255)
This table contains meaning(wn_gloss.gloss) of word List of wn_synset table, related with its synset_id column.
*
*wn_antony (synse... | |
doc_23508839 | 5698771509078629376 1133254688
5698771509371165696 1150031904
5698771510035551232 1150031904
5698771510036082688 4170258464
5698771510036715520 2895583264
5698771510037202176 1620908064
5698771510037665280 346232864
5698771510038193664 3366459424
5698771510332259072 2091784224
569877... | |
doc_23508840 | <ArrayOfMyClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MyClass>
<Number>1</Number>
</MyClass>
<MyClass>
<Number>2</Number>
</MyClass>
</ArrayOfMyClass>
I want to be able to change this to something else (and for that ... | |
doc_23508841 | def GetDepth():
return float(a * 2.7 - (z - mu)**2 / (2 * sig**2))
for z in range(-1,200):
k =[]
z=z+1;
for i in range(1):
k.append(z);
Gauss_list.append([z]);
Gauss_list.append([GetDepth()]);
print(Gauss_list)
It returns something like:
[[0], [-1.0535849715692442], [1], [-0.... | |
doc_23508842 | This is the site:
http://www.noticiasnaturais.com/
This is the image I want to center (without overlapping the logo at left, the leaves with site name):
http://www.noticiasnaturais.com/wp-includes/images/descricao_site.png
This is the original theme html:
<div id="headerwrap">
<div class="clear"></div>
<a href=... | |
doc_23508843 | #include < QArray >
and IDE send me response: file or catalog couldn't be found (I translate it for myself - because I have other language compiler - so in english compiler resulting info might be slightly different).
I know that this might be connected with not adding proper value to .pro file, but I cannot find ... | |
doc_23508844 | I created a text file (I'm trying to make it as xml soon) and I can write to the text file.
Some sample scripts:
<html file>
<form method="post" action="chat.php">
<input type="text" name="message" 'some styling done'>
</form>
<php file>
<?php
$mesage = $_POST['message']
create file for first time then append th... | |
doc_23508845 | Dez 12, 2011 7:26:51 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
Information: Creating Service {http://interfaces.loginserver.mmo.com/}ILoginService from WSDL: http://localhost:8080/loginService?wsdl
Dez 12, 2011 7:26:53 PM org.apache.cxf.service.factory.ReflectionServiceFactor... | |
doc_23508846 | var workers = context.users.Where(w => context.memberships.Any(m => m.company_id == companyID));
As you can see, I'm using db context in the predicate, so I'm worried that it might cause unnecessary db calls. Does EF optimize it somehow?
Of course, I could do it like that:
var memberships = context.memberships.Where(m... | |
doc_23508847 | But when i try to use REST api from other machine (testing using POSTMAN), i am not getting any results, its throwing some error. I have tried to debug without much success.
let me know, if anyone have tried the same and able to get it working properly. Need some help in setting it up in our local environment for Java ... | |
doc_23508848 | I have this:
<header class="main__header">
<div class="container">
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<a href="javascript:void()" class="submenu">Menus</a> </div>
<div class="menuBar">
<jdoc:include type="modules" name="navigation"/>
... | |
doc_23508849 | class SomeTest extends TestCase
{
}
I'd like to create a new base test class named AnotherTestCase, so I can create test cases that share setup/teardown/helper methods/etc...
class SomeTest extends AnotherTestCase
{
}
However, when I run
phpunit app/tests/SomeTest.php
I get the following error
PHP Fatal error: Cla... | |
doc_23508850 | For example, I want to define a h1 tag on a certain page, so I write:
body.certain_page h1 {
font-size: 12px;
}
So far so good. If I want this style to apply to more than one page, I would write:
body.certain_page h1, body.other_page h1 {
font-size: 12px;
}
Now when you define a lot of rules this way, it gets ver... | |
doc_23508851 |
A: The point to know is that all callbacks in an Activity run on the UI thread, and you should not do any lengthy work on the UI thread. Otherwise, you will compromise the responsiveness of the UI and possibly cause an ANR.
If you need to do any kind of lengthy operation, like some serious number crunching, download... | |
doc_23508852 | fs = new FileStream(OutputFilePath, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.Read);
StringBuilder sb = new StringBuilder();
using (StreamWriter writer = new StreamWriter(fs, Encoding.UTF8, 512))
{
//add some text to sb
writer.Write(sb.ToString());
writer.Close();
}
finally
{
if (fs != null)
{
... | |
doc_23508853 | Here are the using statements at the top of the project file:
using NAudio;
using NAudio.Wave;
using NAudio.FileFormats.Wav;
using NAudio.FileFormats.Mp3;
using NAudio.WindowsMediaFormat;
using NAudio.MediaFoundation;
And here's the code for playback:
private void PlayIntroScreenAudio()
{
Player.Stop()... | |
doc_23508854 | Is there a way to test/validate environment files like uat.rb or production.rb to catch errors before deploying?
Loading the files with require in rspec might be a problem because it might affect other tests, not sure about this.
Thanks,
A: Before deploying on production, I always run my code in production mode on my ... | |
doc_23508855 | I am learning ruby from doing some exercise in Google Code Jam.
in this question. It will give me some input as follow.
3
hello
hello world
hello
and convert these string in to T9 input format.
so firstly, I read the files to an array line by line as follow:
IO.foreach(fileName) do |line|
inputs << line.strip
en... | |
doc_23508856 | Since I'm so new to GWT, it has me a little concerned/confused: why can't a GWT app just use the regular Bootstrap framework? Why does it even need gwt-bootstrap?
A: It looks like a large part of gwt-bootstrap is wrapping the javascript pieces of Bootstrap, which would mean you could keep using Java. There are other ... | |
doc_23508857 | public class T012_Pedido
{
private string _t012NumeroPedido;
private ObservableCollection<T012_Pedido_Item> _t012PedidoItem = new();
[Required]
[Column(TypeName = "varchar")]
[MaxLength(16)]
public string T012_NumeroPedido
{
get => this._t012NumeroPedido;
set
{
... | |
doc_23508858 |
*
*The first one (MainActivity) contains a ListView of songs, and I set an OnItemClickListener (inside its onCreate() method) which opens a new activity called PlayerActivity passing the position of the item that has been tapped:
public class MainActivity extends AppCompatActivity {
Intent intent;
ArrayList<... | |
doc_23508859 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSDictionary *dict;
if (indexPath.row > 0) {
dict = [self.fieldsArray objectAtIndex:indexPath.row-1];
int nr = [[dict objectForKey:@"typeid"] intValue];
if (nr == 1) {
... | |
doc_23508860 | Default authorization mode = AWS Identity and Access Management (IAM)
Also, there is no function to make a query and send it
AWSAppSync awsAppSync = AWSAppSyncClient.builder().build();
| |
doc_23508861 | To improve development time I have decided to bring the pages local to my Windows environment but cannot get the api to work with the Rest functionality in IIS using Restler.php.
I have searched for documentation to assist with the configuration of IIS or even statements that would tell me I need URL Rewriting tools in... | |
doc_23508862 |
A: Yahoo weather API doesn't support third parameter it only will response for WOEID and U. ,But yahoo provide this option only for U.S . , if you want to get 5 days forecast means, better you can try other 3rd party API's like Accuweather , Sky etc..
| |
doc_23508863 | Table "public.cards"
Column | Type | Modifiers
---------------+-----------------------------+----------------------------------------------------
id | integer | not null default nextval('cards_id_se... | |
doc_23508864 | Here I am picking the file from my desired Location Using FilePicker,
I Know the path of file which I picked from Local drive.
I want to use the File as a Storage file.
StorageFile Newfile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(Path); // Path is file path
StorageFile file =... | |
doc_23508865 | some: true
vs
:some => true
I have problem with compatibility my Rails version and Ruby version and I have to know in which version appeared only : instead =>.
I don't know how to find this kind of info by Google.
A: This is a feature introduced into Ruby 1.9:
{ example: 'key' }
# => { :example => 'key' }
This is s... | |
doc_23508866 | Pandas Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pandas/init.py", line 30, in
from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib
File "/usr/lib/python3/dist-packages/pandas/_libs/init.py", line 3, in
from .tslibs import (
File "/usr/lib/python3/dist-pac... | |
doc_23508867 | JSON data sent by POST
{
"data":
{
"subsidiarySid":"0",
"storesid":"0",
"date":"2018-06-15",
"counters":
[
{
"nation":"France",
"count":"5"
},
{
"nation":"France",
"count":... | |
doc_23508868 | public ActionResult GetData(int id)
{
return Json(CreateCompaniesList(), JsonRequestBehavior.AllowGet);
}
and want to access it with the jQuery get method.
If it is just :
public ActionResult GetData()
{
return Json(CreateCompaniesList(), JsonRequestBehavior.AllowGet);
}
I can access it like :
function drawCh... | |
doc_23508869 | For each worksheet in x workbook
Table.Combine(prior sheet, next sheet)
return all sheets stacked.
Would someone please help?
A: *
*Load each table into Power Query as a separate query
*fix up the column names as needed for each individual query
*save each query as a connection
*in one of the queries (or in a sepa... | |
doc_23508870 | I follow this tuto to create a template database: http://linfiniti.com/2012/05/installing-postgis-2-0-on-ubuntu/ and I'm stuck and don't know what to do now...
When I try to execute the following command:
psql -d template_postgis2 -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql
I have the following error... | |
doc_23508871 |
*
*The virtual machine is NOT created by "vagrant up"
*OS on my local machine is Windows 10 Home.
So I cannot use Windows default NFS feature which is only packaged in Ultimate edition. I could not find other FREE reliable mounting tool working well from Windows. There are some SSH Fuse and NFS clones for Window... | |
doc_23508872 |
array=[];
what i did was
for(var i=0;i<5;i++)
{
array.push(console.log({'events['+i+']':'<span id="events['+i+']"></span>}))
}
i want result like this
array=[{events[0]:'<span id="events[0]"></span>'},{events[1]:'<span id="events[1]">/span>'},...];
i know it's very silly question to ask but i can't ... | |
doc_23508873 | My react native app is running on ios 14.4 and running "@react-native-firebase/storage": "^11.0.0",.
import React from 'react';
import {View} from 'react-native';
import {Button} from 'material-bread';
import firestore from '@react-native-firebase/firestore';
import {uuidv4} from '../../utils/uuid';
const TestPage = ... | |
doc_23508874 | I have a Word Document which references jpeg pictures stored at a different path.
I always instruct word to Link in the file and modify the field code as:
{INCLUDEPICTURE \d"..\\Relative Path\\To\\MyPicture.jpg" }
For some inexplicable reason, if either the picture content changes or if the document is closed and open... | |
doc_23508875 | I want to use tensorflow within keras, so the tutorial I found so far is describing the opposite to what I want: https://blog.keras.io/keras-as-a-simplified-interface-to-tensorflow-tutorial.html.
I also read about Lambda layers that can wrap arbitrary custom function, yet I did not see an example for tf.ops.
If you cou... | |
doc_23508876 | Through learning, I've got some basic understanding of the framework like how ActionInvocation handlers interceptors etc.
But when I was trying to figure out the mysterious (to me at least) Dependency Injection part, I got completely lost.
The inject mechanism specified in package com.opensymphony.xwork2.inject is ha... | |
doc_23508877 | let group = DispatchGroup()
for ref in self.notifsRefList {
group.enter()
self.db.fetch(withRecordID: ref.recordID) { notifRecord, notifErr in
print("async call")
if notifErr == nil {
// do stuff
if let ref = notifRecord?.object(forKey: POST) as! CKReference? {
... | |
doc_23508878 | From the book "data structures and algorithms with python" by Michael T. Goodrich:
consider a dynamic array that doubles it size when the element reaches its capacity.
this is from the book:
"we fully explored the append method. In the worst case, it requires
Ω(n) time because the underlying array is resized, but it u... | |
doc_23508879 | Thanks.
A: You can't send requests across domains without controlling both sides, that is why ajax wont work. You could send it from your server, but they will likely catch on after every customer who gets added comes from the same IP address. You can however automatically submit the form with javascript as if they ... | |
doc_23508880 | I am using springboot with jpa to connect to a PostGreSQL db. From this i am retrieving a table e.g exportconfig containing a list of tables that need to be exported to CSV, and it also specifies which columns to export. I decided to use OpenCSV-BeanToCSV For this.
As I am using the spring boot jpa, i am not sure how t... | |
doc_23508881 | This is what I have done so far:
AddHero.kt
class AddHero : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_add_hero)
addHero.setOnClickListener {
if(hero.text.toString().equals("")){
Toast... | |
doc_23508882 | When I run the app out of the VS2005 IDE it doesn't throw an exception, which is the behaviour I would prefer.
Why is this function operating differently across the two environments?
| |
doc_23508883 | I mean if there is a function like php's addslashes or something similar?
A: No. There are a few ways you could do this, though. The most flexible would probably be to use the Perl Regular Expression functionality built into SAS such as CALL PRXCHANGE. Documentation is here.
| |
doc_23508884 | class MyData(models.Model):
someData = models.CharField()
data = models.BinaryField()
In my app I need to iterate over the big set of rows. Of course I mark binary field as deferred:
myDataList = MyData.objects().filter(...).defer('data')
for myData in myDataList:
doSmthWithData(myData.data)
...
The r... | |
doc_23508885 | For example
query = """SELECT DATE_FORMAT(date_time,'%Y-%m') AS dd
FROM some_table
WHERE some_col = %s
AND other_col = %s;"""
cur.execute(query, (pram1, pram2))
gives me a "ValueError: unsupported format character 'Y'" exception.
How do I get mysqldb to ignore the %? Can't see this in any of the docs.
A: Literal esc... | |
doc_23508886 | the insert function work well but it inset the last edittext value 3 time.
I insert (john, smith, anna) and sqlite insert (anna, anna, anna)
this is my code
LinearLayout ll;
EditText editText;
TextView textView;
String room;
Button save;
private DBHelper dbHelper;
@Override
protected void onCreate(Bundle savedInstanc... | |
doc_23508887 | <tr>
<td width="10"><img></td>
<td width="80">Copy</td>
<td width="10"><img></td>
</tr>
What happens is that Outlook ignores the width of the middle column's cell. It also doesn't matter if I use CSS for the widths.
<tr>
<td style="width:10px;"><img></td>
<td style="width:80px;">Copy</td>
<td s... | |
doc_23508888 | According to the documentation, the ratio = 1 parameter with method = "nearest" should match on a 1:1 ratios cases and controls.
In this case, however, it seems to just mirror the distribution from the original variable:
library(MatchIt)
data("lalonde")
attach(lalonde)
table(treat) # ... | |
doc_23508889 | I wrote it and for the most part it seems to be working, however, it's only downloading the first image. It downloads it equal to the number of images on the site.
Here is my code.
const http = require('http'),
cheerio = require('cheerio'),
fs = require('fs');
var document = '';
var imageData = '';
http.get('http://www... | |
doc_23508890 | else
message(FATAL_ERROR "Could not locate Lua 5.1.\n"
"Please download from Lua website.")
endif
When I run cmake, I get the following error...
Parse error. Expected "(", got newline with text "
".
Okay, I figure. That isn't valid syntax, so I'll just edit the cmake file to put it all on a l... | |
doc_23508891 | ArrayList[] tempArray = new ArrayList[count];
A: You can initiate and reserve capacity of an array in swift as follows.
var tempArray: [Span] = []
tempArray.reserveCapacity(count)
A: The Java code is creating an array of length count, of ArrayList<Span> - it is an array of ArrayList<Span>s.
Since there are no separa... | |
doc_23508892 | library(ncdf4)
#Open the original file with my variables in it
ncid_old <- nc_open("original.nc"), write=TRUE )
#Create the 'RH' variable and put it in the file
var <- ncvar_def( 'RH', '%', list(xdim2,ydim2,tdim2), mv2 )
ncid_old <- ncvar_add( ncid_old, var)
If the variable already exists (as is does in some cases) I ... | |
doc_23508893 | I have prepared dataset according to the skip-gramm model and I have got approx. 18 million observations(target and context words).
I have used the followng dataset for my goal:
https://www.kaggle.com/c/quora-question-pairs/notebooks
I have created a new dataset for n-gramm model. I have used windows_size 2 and number ... | |
doc_23508894 | When the audio format in the camera is configured as MPEG-2 ADTS i receive rtp packets with a payload size of 144 bytes, but these are made of two audio frames 72 bytes each.
However, when i configure the format as MPEG-1 the payload is made of only one audio frame.
What is the reason for this difference? I could get t... | |
doc_23508895 |
Saving of the entire form data to the databased only when user clicks on the final Submit.
Above is the Contacts tab.
Now user can click on the Add Contact button which opens a popup to enter the contact details and that reflects in the grid below. However, it is not saved to the db yet.
So, contacts is for building a... | |
doc_23508896 | I'm using the following js sources:
<script src="external/jquery/jquery.js"></script> //Version 1.10.2
<script src="jquery-ui.js"></script> //Version 1.11.2
<script src="jquery.dataTables.js"></script> // Version 1.10.4
<script src="dataTables.tableTools.js"></script> //Version 2.2.3
Thats the js for the datatable and... | |
doc_23508897 | Knuth has a useful method for comparing the complexity of various algorithm implementations by abstracting it from particular processors and only distinguishing between ordinary operations (oops) and memory operations (mems).
In compiled programs, one typically lets the compiler organise the low level operations, and h... | |
doc_23508898 | The team is still actively using Repos, Pipelines, and Test Plans in the "old" project. Team members must retain full read-write access to Repos, Pipelines, and Test Plans.
How do I configure these permissions?
A: As Leo Liu-MSFT stated "I am afraid there is no such way to configure read-only access to Boards, but kee... | |
doc_23508899 | And I need use Finding and Trading services in one file.
How can i declare different namespaces
use \DTS\eBaySDK\Constants;
use \DTS\eBaySDK\Finding\Services;
use \DTS\eBaySDK\Finding\Types;
use \DTS\eBaySDK\Finding\Enums;
use \DTS\eBaySDK\Trading\Services;
use \DTS\eBaySDK\Trading\Types;
use \DTS\eBaySDK\Trading\E... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.