id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_43000 | I have tried changing the php.ini sendmail_from and it does nothing. SMTP port is open on the firewall... im freakin lost..
A: Please install sendmail extension, I solved this issue just by installing sendmail in my instance.
Just type: sudo apt-get install sendmail
in your terminal.
That worked for me
A: This won... | |
doc_43001 | [airflow@airflowetl root]$ hadoop version
Hadoop 3.1.1.3.1.0.0-78
Source code repository git@github.com:hortonworks/hadoop.git -r e4f82af51faec922b4804d0232a637422ec29e64
Compiled by jenkins on 2018-12-06T12:26Z
Compiled with protoc 2.5.0
From source with checksum eab9fa2a6aa38c6362c66d8df75774
This command was run usi... | |
doc_43002 | template</* args */>
typename std::enable_if< /*conditional*/ , /*type*/ >::type
static auto hope( /*args*/) -> decltype( /*return expr*/ )
{
}
Is it possible to combine conditional inclusion/overloading (std::enable_if) with trailing-return-type (auto ... -> decltype())?
I would not be interesting in solutions using ... | |
doc_43003 | resource "aws_rds_cluster" "tf-aws-rds-1" {
cluster_identifier = "aurora-cluster-1"
engine = "aurora-mysql"
engine_version = "5.7.mysql_aurora.2.03.2"
availability_zones = ["us-east-1a","us-east-1b","us-east-1c"]
database_name = "cupday"
master_username ... | |
doc_43004 | The number plate I got:
However, the detected plate number I got after using pytesseract OCR library is :
Detected Text : HHOHVBBGE
This is the original Number plate:
how can i get better accuracy output?
A: Tesseract is good at detecting text when the letters are quiet distinct from one another, so you wou... | |
doc_43005 | a_struc create_struct(void);
and then methods that take in a pointer to struct, such as:
const char *
get_info(const a_struc * s);
I have created the dart binding using ffigen and I have
class a_struct extends ffi.Struct {
}
a_struct create_struct() {
return create_struct();
}
late final create_structPtr =
... | |
doc_43006 | <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!--<script src="js/lib/jquery/jquery-1.10.2.min.js"></script>-->
When I run my page on chrome, opera, safari and IE, everything works perfect, but when I try to run it on Firefox console throws me this error:
[1... | |
doc_43007 | For example: User edits the name of a customer with id 2 and wishes after saving the name to change adress. The application should be able to recognize the input from before and then just give the options of which the user can change the values again.
I tried calling the method inside the method but my application just... | |
doc_43008 | router.get('/users/:username/suspend', function(req, res){
var username = req.params.username;
User.findByUsername(username, function(err, user){
console.log(user);
user.suspended = true;
user.save(function(err, u){
res.redirect('ok');
});... | |
doc_43009 | models.py
class MyModel(...):
name = models.CharField(max_length=32, ...)
key = models.CharField(max_length=32, ...)
class Meta:
constraints = [
UniqueConstraint(
fields = ['name', 'key'],
...
),
]
If I send a POST request where name ... | |
doc_43010 | list_a = ['USD', 'Notional Amount:', 'USD', '50,000,000.00', 'KRW', 'Notional Amount:', 'KRW', '53,585,000,000']
list_a include Currency code like 'usd' and amount like 50,000,000.00
By using python, I want to classify following:
am_list = [50000000,53585000000]
cu_list = ['USD','USD','KRW' 'KRW']
Anyone who will sol... | |
doc_43011 | I changed the codes and my hosting email settings with alternatives but no success in the last 2 days.
in LoginActivity on success:
GMailSender sender = new GMailSender("noreply@mydomain.com","thepassword");
sender.sendMail(
name + ", Login into theappname",
"Hi, "+name+". You've just signed in to the app.",
"noreply@m... | |
doc_43012 | <script>
$(document).ready(function () {
var map;
var elevator;
var myOptions = {
zoom: 4,
center: new google.maps.LatLng(39.639537564366684, -97.03125),
mapTypeId: 'terrain'
};
map = new google.maps.Map($('#map')[0], myOptions);
//info window
var infowindow = new google.maps.InfoWindow({});
var addresses... | |
doc_43013 |
A: You don't need jsoup for this. Just navigate to the host's robots.txt
https://stackoverflow.com/robots.txt
And find the sitemap.xml.
Sitemap: /sitemap.xml
In the case of SO, theirs is cached on Google:
cache:https://stackoverflow.com/sitemap.xml
This will have all of the links the website wants to be publicly ... | |
doc_43014 | private void button1_Click(object sender, EventArgs e)
{
//First Trial, didn't works
Label lbl = new Label();
Controls.Add(lbl);
lbl.Location = new Point(locationX, locationY);
lbl.Text = strSuccess;
lbl.BringToFront();
//Second Trial
//I tried using but still didnt works
Label lbl;... | |
doc_43015 | $(selector).on('click.custom-namespace', function () {...});
into vanilla JavaScript solution?
addEventListener don't get events with custom namespace.
Thanks
| |
doc_43016 | On IOS,Android,.. basically everything runs fine, except one device:
The computation for one frame in a specific scene take about 8ms on an HTC Desire.
Another device, a Samsung Galaxy Nexus, which is much newer takes 18-20ms.
I digged into the problem and found out that it is related to enable/disable of GL_DEPTH_TEST... | |
doc_43017 | Below is the def of class I used:
public class result{
public ArrayList<Table> expected;
public ArrayList<Table> actual;
public ArrayList<Table> result;
public ArrayList<Stat> stat_list;
public result(){
expected=new ArrayList<Table>();
actual=new ArrayList<Table>();
result=... | |
doc_43018 | com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (ravermeister.artist_recordlabel, CONSTRAINT FK_9dgdyft45droyopxsqijwb1dx FOREIGN KEY (artist_id) REFERENCES artist (id))
Artist class
@Entity
@Repository
@Data
@NoArgsConstructo... | |
doc_43019 | The structure of the project
It has index.js and App on the same level
Then it has components on the next level
In components it has databases and Main.js
In databases it has database.json
I want to use information held in database.json inside Main.js, I can also change the file structure not sure what is the best way ... | |
doc_43020 |
A: you could try with:
names = pathname.split('.')
filename = names[0]
extensions = names[1:]
if you want to use splitext, you can use something like:
import os
path = 'filename.es.txt'
while True:
path, ext = os.path.splitext(path)
if not ext:
print path
break
else:
print ext
p... | |
doc_43021 | - in 99.9% of documents it's an array
- in 00.01% is a subdocument
Can I
- LIST documents this field and a column that reports this field's type?
- and/or
- FILTER documents by the type of this field?
A: Yes you can, with the $type operator:
To filter:
db.someCollection.find({ "fieldThatMightBeAnArray": {$type: 4} })... | |
doc_43022 | But now we need to load very big images inside one SVG. Each images in the SVG is going to be high resolution as this is used for print industry. Here we are not able to load that SVGs as the embedded images are very bigger.
We thought of a solution of re-sizing those images before loading to editor and after editing b... | |
doc_43023 | I can imagine how to start doing with with Rails and Javascript (my areas of "expertise" as a relatively amateur coder), except for the part where I have absolutely no idea where I would get this stream of posts.
The site (and thus the blog) is on Drupal. I know so zero about Drupal that I'm not 100% sure what "on Dru... | |
doc_43024 | Here is my code snippet
fun punctuationCount(stringValue: Editable): Int {
val trimmedStr = stringValue.trim()
return if (trimmedStr.isEmpty()) {
0
} else {
return trimmedStr.split("[a-zA-Z&&[ \t]]".toRegex()).size
}
}
A: Here's a version of your function tha... | |
doc_43025 | I have everything working, yet there is an odd 1px space between the 2nd and 3rd column and I have no idea why!? I have verified the 1px gap shows up both in iOS simulator and on a real device. Has anybody experienced this?
My UIViewController is a delegate/datasource of the following:
class MyViewController: UIViewCo... | |
doc_43026 | I'm not sure if it matters, but there was another pop up sometime last week that asked if I wanted to attach with another debugger, and I am thinking that may have thrown it off, I'm just not sure how to get back to IIS attaching to the process.
EDIT: w3wp.exe is grayed out when I attempt to go to Debug > Attach to Pro... | |
doc_43027 | how to reset the form with default values remaining?
here is my form :
this.createForm = this.formBuilder.group({
'Id': new FormControl({ value: 0, disabled: true }, [Validators.required])
});
I tried like this:
dismissEditPop() {
this.createForm.reset();
this.createForm.setValue({ //setting back not working!!... | |
doc_43028 | Thank you.
A: When an application is deployed using gcloud preview app deploy the default is that the App Engine application will be served on both HTTP and HTTPS. If you have an application on
http://project.appspot.com
you can access it using HTTPS on
https://project.appspot.com
If not accessing the default vers... | |
doc_43029 | Just wondering to know how H2O calculate the prediction value. I need a formula to derive this prediction! I know that random forest goes over the average of the trees' prediction. But how is this prediction calculated at each node of each tree?
Any help would be appreciated.
A: See algorithm 15.1 from the Elements of... | |
doc_43030 | I know that Rider supports Xamarin iOS and Android applications, but I want to know if I can use code sharing here the same as what Visual Studio can do. I searched JetBrains website and couldn't find anything.
A: Yes, Rider should work fine with any type of shared projects. If you know any issue regarding xamarin sha... | |
doc_43031 | I'm working on a program that is capable of controlling a lot of office-application behaviour by using the COM/Interop-Interface Microsoft provided for Word/Access/Excel. Still some functions differ from each other in the way that they are kept specific for the program that gets addressed.
My ambition is to Insert Macr... | |
doc_43032 | [table image]
and my desired output is this:
[my desired output image]
A: seems like a simple group by and count:
select cust_id , count(*) ordrnumber , concat('ordered ' , count(*),' time(s)') as group
from table
group by cust_id
| |
doc_43033 | The problem is that the text takes extra space when a line break occur because of a long word.
.container {
background: grey;
display: flex;
justify-content: center;
align-items: center;
width: 200px;
}
.image {
color: white;
width: 50px;
height: 50px;
background: red;
margin-right: ... | |
doc_43034 | $message = $mailHelper->createMessage(); // This is an instance of Swift_Message
$message->setTo($addresses)
->setFrom([$template->getEmail() => $template->getName()])
->setSubject($template->getSubject())
->setBody($template->getTextContent($twig, $replacements), 'text/plain');
$message->addPar... | |
doc_43035 | Broker 17.2.0.175 started successfully
Successfully connected to Local Broker
Starting IDB Local Agent...
Checking IDB.Local 17.2.0.175 installation...
Starting IDB.Local 17.2.0.175 in port 51028...
IDB.Local 17.2.0.175 started successfully
Successfully started IDB Local Agent
iTunes has not been found. Please ensure t... | |
doc_43036 | I see AWS announcement where said that they are going to support cross cluster search (don't sure that is tis related to my query though).
Could you please advice if it is supported or are there any news pointing that it might be supported in the nearest future?
Highly appreciate any help.
A: AWS Elasticsearch doesn't... | |
doc_43037 | I would like to find an easy way to group my Dataframe using block of minimum 7 days, for example:
date groc day dif
2 2020-09-18 7.94 Friday 1.0
3 2020-09-19 13.43 Saturday 1.0
4 2020-09-22 14.14 Tuesday 3.0
5 2020-09-23 3.07 Wednesday 1.0
6 2020-09-24 7.79 ... | |
doc_43038 | from flask_bootstrap import Bootstrap
# ...
bootstrap = Bootstrap(app)
Weirdly enough to me, the variable bootstrap is not used in the rest of my module. However, if I comment out this line, a jinja2.exceptions.TemplateNotFound exception will be raised. Also, the templates used start with this line:
{% extends "bootst... | |
doc_43039 | My problem is that it doesn't seem as if the function is waiting for the "child function" to finish before returning my value.
Is there a better way of doing this? I know there are callbacks but I'm unsure how I would implement it here
Example XML
<?xml version="1.0" standalone="yes"?>
<pages>
<page>
<title... | |
doc_43040 | def show
respond_to do |format|
format.html { render :show }
format.json { @my_item.to_json }
end
end
private
def set_trip
@my_item = MyModel.find(params[:id])
end
When I'm requesting "/my_models/1.json", it throws an exception:
Showing app/views/my_models/show.json.jbuilder where line #1 raised:
Mis... | |
doc_43041 | In my local machine: (MacOS)
I am generating the keys using a command like this: ssh-keygen -t ecdsa -b 521 -f $PATH_TO_SSH_KEY -q -N ""
I am saving $PATH_TO_SSH_KEY contents in AWS SSM Parameter Store as a SecureString.
I am loading this parameter in my CodeBuild environment from the parameter store and not in my buil... | |
doc_43042 | First off,
I have something like this:
import librtmp
conn = librtmp.RTMP(...)
conn.connect()
while True:
packet = conn.read_packet().body
print packet
This will print the packets like shown below:
To me this looks like hex, and i get 4 char strings when writing to a file, like this:
0200 086f 6e42 5744 6f6e 65... | |
doc_43043 | Here is the HTML I am using:
<article>
<h1>Sign In</h1>
<div class="display-new">
<form action="" method="post">
<div class="label-field">
<label for="email">Email: </label>
<input type="text" name="email" />
</div>
<div class="label-f... | |
doc_43044 | extra-socket $HOME/.gnupg/S.gpg-agent.extra
and run gpgconf --kill gpg-agent; and gpg-connect-agent reloadagent /bye, the agent fails to start.
gpg-connect-agent: no running gpg-agent - starting '/opt/homebrew/Cellar/gnupg/2.3.4/bin/gpg-agent'
gpg-connect-agent: error running '/opt/homebrew/Cellar/gnupg/2.3.4/bin/gpg-... | |
doc_43045 |
CREATE/ALTER PROCEDURE must be the first statement in a query batch.
That's because of T-SQL scripts containing "GO" statement....
Using the Server Management Objects (SMO), the problem still exists for me. How can I create a stored procedure in my database without using Go statement and without using SMO?
This is my... | |
doc_43046 | Is it possible to do this using only a SELECT clause or I should create a stored procedure?
If so, how can I do this properly using a SELECT clause like the following?
select A - B from foo;
A: Approach 1:
You can use ABS() function
SELECT ABS(2-5);
Approach 2:
You can use CASE clause:
SELECT CASE WHEN 5>2 THEN 5-2 ... | |
doc_43047 |
ORP
Produkce_obyv._kg
a
289,77
a
333,31
...
...
b
198,69
b
214,71
...
...
Im using this code:
group1 = data[data['ORP']=='A']
group2 = data[data['ORP']=='B']
graf = group1.groupby('ORP')['Produkce_obyv._kg'].mean().to_frame(name='A')
graf['B'] = group2.groupby('ORP')['Produkce_obyv._kg'].mean()... | |
doc_43048 | here is code-
<?php
$gridColumns = [
[
'class' => 'yii\grid\SerialColumn',
],
'name',
'company_mail',
'created',
'modified',
'modified_by_id',
['class' => 'yii\grid\ActionColumn', 'urlCreator'=>function(){return '#';}],
]; ?>
<?... | |
doc_43049 | push %eax
movl %ebx, %eax
and $0FFFFFFFFh, %eax
pop %eax
I get a few different errors regarding the expression 0FFFFFFFFh in that it is unable to interpret it as a memory address
Error: junk `FFFFFFFh' after expression
Error: missing or invalid immediate expression `0FFFFFFFFh'
I don't know what I could do to fix thi... | |
doc_43050 | When you try using the plus operator directly on a DATE
DECLARE @tomorrow DATE = CONVERT(DATE, GETDATE()) + 1
you get this error message:
Msg 206, Level 16, State 2, Line 1
Operand type clash: date is incompatible with int
However you can add an integer to a DATETIME, and you can implicitly convert that DATETIME t... | |
doc_43051 | <Row>
<Column1>1381.00000</Column1>
<Column2>9851.00000</Column2>
<Column3>10.00000</Column3>
<Column4>130253.00000</Column4>
<Column5>8065.88235</Column5>
</Row> </rowset>
Some other xml have different number of columns like this,
<?xml version="1.0" encoding="UTF-8"?><rowset>
<Ro... | |
doc_43052 | There is no message 'Loaded' in the console after this code has been executed... Seems like 'onload' has interaction problems with 'about:blank' window. Maybe 'about:blank' has permanent 'readyState' property which always describes 'complete'?
P.S. Tested it only in Google Chrome.
<!DOCTYPE html>
<head></head>
<body>
... | |
doc_43053 | Float or Decimal?
// this does not work, the data is not saved:
create table bms."t1"(
"name" decimal(2,2)
);
insert into bms."t1"
values(10.05);
A: decimal(2, 2) means that you have two digits, with two digits to the right of the decimal point. So, it would contain values from 0.00 to 0.99.
You would appe... | |
doc_43054 | Here is a working demo of it so far.
HTML
<!doctype html>
<html>
<head>
<link rel="shortcut icon" type="image/x-icon" href="SiteIcon.ico">
<title>Canvas</title>
<link rel="stylesheet" href="style.css">
<span style="cursor:crosshair">
</head>
<body>
<div id="toolbar">
<div id="rad">
Radius <span id="radval... | |
doc_43055 | ||
doc_43056 | Only one of the following can be installed at once:
Expression Language 3.4.300.v20110228 (org.eclipse.core.expressions
3.4.300.v20110228)
Expression Language 3.4.401.v20120912-155018
(org.eclipse.core.expressions 3.4.401.v20120912-155018)
Expression Language 3.4.401.v20120627-124442
(org.eclipse.core.expressions... | |
doc_43057 | $page-header-height: 3rem;
$content-header-height: 6rem;
$content-menu-width: 10rem;
// if i try to use these, the layout breaks
$content-foot-height: 4rem;
$page-sidebar-width: 4rem;
body {
height: 100vh;
display: grid;
grid-template:
'sidebar header header' $page-header-height
'sidebar menu mainHead'... | |
doc_43058 | I put a listener on each button that takes me to different activities.
The login button works perfectly, but the register button stops the app when I click on it.
I've tried to put a Toast message in the _btnreg listener, and it worked...
I got this error:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ex... | |
doc_43059 | SELECT [Product].[ID],
,[Thumbnail]
,[ProductName]
,[Model]
,[SKU]
,[Price]
,[IsExclusive]
,[DiscountPercentage]
,[DiscountFixed]
,[NetPrice]
,[Url]
FROM [dbo].[Product]
INNER JOIN [ProductPhotos] ON [ProductPhotos].[ProductID]=[Product].[ID]
INNER JOIN [ProductCategories] ON [ProductCategori... | |
doc_43060 | something like this:
minNeighborsDistance [2,3,6,2,0,1,9,8] => 1
My code looks like this:
minNeighborsDistance [] = []
minNeighborsDistance (x:xs) = minimum[minNeighborsDistance xs ++ [subtract x (head xs)]]
Although this seems to run, once I enter a list I receive an Exception error.
I'm new to Haskell I would appre... | |
doc_43061 | I tried extending JWTTokenAuthenticator but it seems none of its methods are called during the login.
I thought of using a custom "AuthenticationSuccessHandler" but I'm not sure if this is the place I should do this and how could I report from there that the "login" is actually invalid.
Where should I put this logic?
... | |
doc_43062 | tuple = ('Art School', 'Berlin', 'John Morgan(School1-Ge/Berlin);Andrew Martin (School1-IT/Roma); Tom Jones(School1-USA/Chicago)')
Each person structure it's like this :
John,Morgan(School name-Country-GE/City-Berlin)
I need to get every person email address and for this i'm using a function where i sent the name o... | |
doc_43063 |
I'm running npm run watch. My console doesn't display any errors / warnings when I compile.
I already checked the webpack.mix.js for mix.disableSuccessNotifications();
and I don't have that on my file, my notifications are working on my OS. I'm using Linux Mint.
I have this on package.json:
"watch": "node_modules/.b... | |
doc_43064 | MySolution:
I used the follwoing approach to solve this issue.
ArrayList a1=new ArrayList();
ArrayList a2=new ArrayList();
for(int i=0;i<5;i++)
{
for(int j=0;j<10;j++)
{
a1.add(0);
}
a2.add(a1);
}
But, this approach created only 1 list:
having the following elements when the user e... | |
doc_43065 | I made a simple service with folloiwng :-
NorthwindModel [A data model having Product, Order and Order_Detail tables]
ProductService exposed as REST with specific config (not using WebServiceHostFactory)
Service Contract :-
[ServiceContract]
public interface IProductService
{
[OperationContract]
[WebGet(
... | |
doc_43066 |
print(type(now))
But the output says that the type of the now variable is: class 'datetime.datetime'
Guys i dont know how to covnert it i propriet fromat, can anyone help?
A: Datetime objects have a default format when they are printed. The format section of strptime defineds the string format that the datetime STAR... | |
doc_43067 | i have a table pages with links and page name and i have table access to store page ids with user id who has the access to which page
here is the structure of pages
`page_id | code | page | href
1 | ld | New | sl/lead.php
2 | ld | View | sl/lead_view.php
3 | ld | Edit | sl/lead_... | |
doc_43068 |
Checking the x array, it appears to be monotonic, so that is fine:
looking directly at the probability values (produced by the code below), I see
array([6.49723890e-05, 8.34261989e-05, 8.34261989e-05, 8.34261989e-05,
1.07121360e-04, 1.07121360e-04, 1.37546549e-04, 1.37546549e-04,
1.37546549e-04, 1.76613... | |
doc_43069 | A network-related or instance specific error occurred while establishing a connection to SQL server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL server is configured to allow remote connections.(provider: SQL Network Interfaces, error: 26 - Error locating serve... | |
doc_43070 | Sub hello()
Dim obj As Object
Dim Workbook As Object
Set obj = CreateObject("Excel.Application")
Set Workbook = obj.Workbooks.Open("C:\Users\gbuday\Desktop\Oktatás\Excel\start.xlsx")
Workbook.Worksheets("Munka1").Range("B3") = "Hello World!"
Workbook.Close
Set Workbook = Nothing
Set ... | |
doc_43071 | class TreeCutter {
public static void main ( String [] args ){
for( int i = 0 ; i < testCaseNum ; i ++ ){
TreeCutter TC = new TreeCutter( commandPrompt );
}
}
but when I remove brace and compiled my code
class TreeCutter {
public static void main ( String [] args ){
... | |
doc_43072 |
*
*The image and text are not aligning right, the desired result should look like the following:
*More specifically, I cannot make the area and perimeter underneath each other. I even added the \n but it is not working.
*Within the PHP formulas one of them is not working, I localized it to one formula in parti... | |
doc_43073 | From what it seems from Apple docs, you can only add those flags 'after the fact'.
A: You could try the approach recommended here:
http://ioscodesnippet.com/post/43288248813/method-swizzling-in-objective-c
Basically, you can add a trace onto a particular method that you know you want to trace in advance by swizzling o... | |
doc_43074 | dictionary = {'103': ['26', '69', '91', '47', '19', '53'], '022': ['19', '92', '57', '48', '36', '46'], '507': ['47', '13', '91', '24', '74', '27'], '061': ['06', '27', '26', '71', '86', '46'], '875': ['25', '16', '28', '62', '80', '21']}
[value for key, value in dictionary.items() if value in key.lower()]
However, I ... | |
doc_43075 | Thanks!
A: User flows cannot be cloned as user flows, but you can download their source code and clone them as custom policies. User flows are custom policies anyways. You can download their source code from the Azure Portal as shown in the following picture.
You can opt to append the base policies code to the user f... | |
doc_43076 | <target name="test" depends="tomcatDeploy" description="Build and run tests">
<ant dir="${aDir}" target="test"/>
<ant dir="${bDir}" target="test"/>
<ant dir="${cDir}" target="test"/>
<ant dir="${dDir}/ExtFramework" target="test"/>
</target>
and I want to run them all on the same VM - otherwise I get a... | |
doc_43077 | I'm worried that the chat will slow down once many users come on it.
How would you simulate this type of simultaneous condition at a super-early stage? I want to measure the delay time and see at what point things would slow down?
My backend is PHP/LampStack on a Linux RedHat server in the US. Many of my users will be ... | |
doc_43078 | Inside an activity, lets call it "Activity2.cs", dynamically add a variable number of buttons to "MyView.axml".
I'm looking for code like below (except code that actually works):
string[] textArray = new string[] { "button1", "button2", "button3", "button4" };
int counter= 3;
for (int i = 0; i ... | |
doc_43079 | @property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSMutableArray *array;
@property (nonatomic, retain) SomeSubclassOfNSObject *object;
@interface SomeSubclassofNSObject
@property (nonatomic, retain) NSString *category;
How do I write my init method?
do you do:
initWithName:(NSString *)aNam... | |
doc_43080 | My command is
aws s3api create-bucket --bucket my-bucket --region eu-west-2 --create-bucket-configuration LocationConstraint=eu-west-2 --acl private
But on bucket creation, there's public read enabled.
What I expect to see under Access is
Bucket and objects not public
not Objects can be public
A: You can block public... | |
doc_43081 | I start it from implementing an early paper: Breaking and fixing the Needham-Schroeder Public-Key Protocol using FDR, Gavin Lowe, TACAS 1996
This is my code snippet:
-- NSPK Protocol:
-- Msg1 A→B: {Na,A}Pkb
-- Msg2 B→A: {Na,Nb}Pka
-- Msg3 A→B: {Nb}Pkb
-- declare variables:
Initiator = {1..2}
Responder = {1..2} ... | |
doc_43082 | private void setMobileDataEnabled(Context context, boolean enabled) {
final ConnectivityManager conman = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
final Class conmanClass = Class.forName(conman.getClass().getName());
final Field iConnectivityManagerField = conmanClass.getDeclaredFiel... | |
doc_43083 | Resources = ActiveWorkbook.Sheets("Sheet1").Range("A1,A4,A6,A8,A10")
MsgBox Application.WorksheetFunction.CountIf(Range(Resources, 0), ">0")
I seem to get various errors depending on what Dim I set for the Resources variable and I'm not exactly sure what the , 0 is for?
Any help would be much appreciated.
A: Is this ... | |
doc_43084 | import tqdm
for i in tqdm.tqdm_notebook(range(2, int(total_number)//20):i
ERROR:
IntProgress not found. Please update jupyter and ipywidgets.
ImportError: IntProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
I am using Python 3.7.1 and tqdm ve... | |
doc_43085 | Here is a minimal working example:
test = 1e6*array([.99999, .9999984, 1.000000013])
plot(test)
generates the following plot:
Is there a way to automatically prevent this behavior without directly inspecting the data? Thank you.
| |
doc_43086 | [tableview reloadData];
A: It's almost certainly a discrepancy between the value returned from the UITableViewDataSource method:
tableView:numberOfRowsInSection:
and the call to:
tableView:cellForRowAtIndexPath:
Where tableView:numberOfRowsInSection: is returning more rows than tableView:cellForRowAtIndexPath: ca... | |
doc_43087 | - (UIImage*)captureView
{
CGRect rect = [self bounds];
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
[self.layer renderInContext:context];
CGContextSaveGState(context);
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
image = [... | |
doc_43088 |
A: There's a small explination of different data persistence that is available to you here:
Data persistence choices for ASP.NET MVC web apps
When a browser user/client accesses a resource in your web app for the first time, the ASP.NET runtime creates a “session”, which is simply a logical grouping of requests from ... | |
doc_43089 | So essentially what I'm trying to build is a "breadcrumbish" categoricalization type system (like a file directory) where each node has a parent (except for root) and each node can contain either data or another node. This will be used for organizing email addresses in a database. I have a system right now where you ... | |
doc_43090 | graph = {'A': ['B', 'C'],
'B': ['A', 'C', 'D'],
'C': ['A', 'B', 'D', 'F'],
'D': ['B', 'C'],
'E': ['F'],
'F': ['C', 'E']}
I want to get all the paths from 'A' to 'E'. For Python it works perfectly:
def find_all_paths(graph, start, end, path=[]):
path = path + [start]
if start == end:
retur... | |
doc_43091 | file1 = File.open("spam1.txt","rb")
file1_contents = file1.read
file1 = file1_contents.split(' ')
I can count the frequency of words, using a hash, and sort them according to the frequency of the word:
freqs1 = Hash.new(0)
file1.each { |word| freqs1[word] +=1}
freqs1 = freqs1.sort_by {|x,y| y}
freqs1.reverse!
Can als... | |
doc_43092 | settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'tectcom',
'USER': 'test',
'PASSWORD': '***146***',
'HOST': '',
'PORT': '',
}... | |
doc_43093 | Step 1: Click on printModal after popup is loaded. (works fine).
Step 2: Close the browser print dialog (works fine, the print dialog closes and bootstrap modal is still visible).
Step 3: Click on closeModal (FAILs, modal doesn't close).
If I click on closeModal before I click on printModal, it works fine. It only does... | |
doc_43094 | Here are the directions that were given:
Create a Coin class that includes a variable faceUp that stores either a 0 for heads up or 1 for tails up, an accessor method named showFace() that returns a 0 if the coin is heads up or a 1 if the coin is tails up, and a
modifier method named flipCoin() that assigns a random... | |
doc_43095 | i want to position each component in specific place tried setBounds() but it didn't work..
also im trying to change background color of the frame using getContentPane().setBackground(Color.white) and setBackground(Color.white) but didnt work too.
how to do it ?
this is my code :
import javax.swing.*;
import java.awt.*... | |
doc_43096 |
A: No, you can't. The only possible is you can get the id of only one video URL at a time. So I think google doesn't offer any API to do so. As far my knowledge there is no possible way to do like what you asked.
| |
doc_43097 | As soon as I get the width, .width() returns a px value instead of auto.
This is an example of what I need:
I've an img with this inline style setted:
<img id='image' style='position: absolute; height: 200px; width: auto; top: 25px; left: 50px;' src='http://tinyurl.com/k8ef66b'/>
I need to wrap that image in an a, to ... | |
doc_43098 | The project in which is defined the class, I added the jar file bcprov-jdk15on-151.jar (I am using the library BouncyCastle).
In Eclipse, there is no problem and my program runs normally. But when I try to do it in a terminal, I get an exception.
After checking SO I found a similar post: NoClassDefFoundError while runn... | |
doc_43099 | As I understand the problem is because all of the variables (in this case specifically variable "locations") is in another scope which I cannot access. Can anybody help me with the shortest way possible to go around this problem?
I have managed so far to almost finish my website with only angular html tags (meaning I ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.