id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_32600 | I was working on this simple struct here:
template<typename T, size_t n> // templated but not variadic
struct myArray {
static const size_t SIZE = n;
T arr_[SIZE];
myArray() {} // Default Constructor
template<class... U> // Initialization Constructor
myArray( U pack... ) { // Templated ... | |
doc_32601 | <ToolbarTray Visibility="{Binding SomeProperty}">
<Toolbar>
<Checkbox IsEnabled="{Binding IsEnabled}/"
<... other items />
</Toolbar>
</Toolbar>
and two classes as possible data context - for two different windows.
class ToolbarContextOne
{
public Visibility SomeProperty {get;set;}
}
c... | |
doc_32602 | Unable to locate element. Search failed!
how can make it identifiable.
A: I get this error. Usually it's because the item you are selecting in the drop down is not visible, because the drop down list is long such that it has scrollbar. I have many issues with the drop down selection, however I'm recording Silverlight ... | |
doc_32603 | If I uncomment the console.log() lines in if statement I can easily see the filtered data with using it in useEffect instead of return. But if I add the return statement and try to display my components it gives me infinite or too long ( I coulndn't see the end this is the reason of not assigning it as infinite or too ... | |
doc_32604 | $t=TicketType::Select('id')->where('title', $request->get('type'))->first();
dd($t);
this one
TicketType {#452 ▼
+timestamps: false
#casts: array:1 [▶]
#fillable: array:3 [▶]
#connection: "mysql"
#table: null
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
#perPage... | |
doc_32605 |
*
*I have an existing git repository
*I have code on an active staging server that has been manually kept in sync with what's in the repository, but is not currently under version control.
*I want to put that code under version control, WITHOUT blowing it away and doing a git clone, as there would be significant r... | |
doc_32606 | Google failed to give me sufficient (almost no results).So can anyone please share some tutorials on Ruboto.
A: Ruboto now supports a lot of ruby's functionality and also there are some examples included on how to do "more fancy stuff". Still so far all the programs I have written in ruby work on ruboto too. So my sug... | |
doc_32607 | /home/a & /home/b
I would like to sync between folder a & b. Assume when I create directory or file in /home/a of cource in /home/b will be created automatically, and also when I delete /home/b/* in /home/a/* will be deleted.
I did this:
# cd /home
# mkdir a && mkdir b
# rsync -r a b && rsync -r b a
but not working... | |
doc_32608 | I tried using the IN operator but it shows any instance of column c where column h is equal 'h1' or 'h2'
This is what I have so far:
select a, b, c, d, e, f, g, h, i
from table t
inner join table2 t2 on t.c = t2.c
inner join table3 t3 on t3.f = t2.f
inner join table4 t4 on t4.b = t.b
-- note: a,c,h are the columns in q... | |
doc_32609 | try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(requestUrl);
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
StreamReader reader = new StreamReader(response.GetResponseStream());
}
}
catch (WebException e)
{
//e.Response is always null!
}
Is there any way I... | |
doc_32610 | The issue is, when a first put or putAll happens PDXType for this class type has been registered with the fields inserted. From there onwards every cache it's using the same PDXType because of same class type.
Let's say I inserted below record
Region1 - foo.GenericClass
*
*name=FirstName, value=Abc
*name=LastName... | |
doc_32611 | Is this possible? If yes, how?
A: Off the top of my head, something like this should work:
function beforeFilter() {
// be sure to do this before any Auth or security checks
if ($this->RequestHandler->isPost() && $this->data) {
$this->Session->write('last_post_data', $this->data);
}
}
function add... | |
doc_32612 | In this list was included, for example, name="city" for user's city, name="surname", etc.
Sadly though I forgot to bookmark that article.
Now I'm updating my forms and I want to improve user's experience, if possible.
Are there (other) standards for Forms' name values? If yes, which should I follow?
What about ARIA?
I'... | |
doc_32613 | domain.com?region=STATE
if (empty($_GET)) {
echo 'American';
}
else {
$t = $_GET["region"];
if ($t == "Texas") {
echo "Texan";
} elseif ($t == "California") {
echo "Californian";
} else {
echo "American";
}
}
This does work. However in case there's wrong parameter inpu... | |
doc_32614 | The code works until I try to copy files to a folder that already exists then I get a Run-time error 70: Permission Denied. Any help would be greatly appreciated.
Public Sub CopyFiles()
Dim FSO As Object
Dim FromPath As String
Dim ToPath As String
Dim FileExt As String
Dim FNames As String
Dim FolderName As String... | |
doc_32615 | I need to iterate over the data in the file to create records in my database, but am running to an error loading the file so I can do so.
The stack trace isn't telling me much about what's wrong; any help would be greatly appreciated!
code:
require 'net/http'
require 'uri'
require 'json'
require 'faker'
#imports APR ... | |
doc_32616 |
*
*Where do I create the PHP function? I have used the functions.php file to add the custom js file to start with, but I don't want this new function to run every page load, just when requested.
*Once I've created the PHP function wherever, how do I access it through the JQuery post request? I'm used to using local... | |
doc_32617 | I searched google all last night and couldn't find anyone who was having this problem. And after reading the license page I don't think fancybox 2 supports the onClose or onStart attributes.
Here's my div
<div class='photo'><img class='fancybox' src='images/jpge1.jpg></div>
$(document).ready(function() {
$('.fanc... | |
doc_32618 | is it possible? if yes then how to do it?
Suppose that I need to return 'element_2' variable from test case file.
If possible, please help.
This is my conftest file..
import pytest
import time
from selenium import webdriver
@pytest.yield_fixture(scope="function")
def oneTimeSetUp(request):
print "__CONFTEST ONE ... | |
doc_32619 | 1) git status
2) git add .
3) git commit -m "Some Message"
4) git push heroku master
Heroku logs
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.... | |
doc_32620 | I have tried adding this to the URL
&scope=space_3293195:read
&scope=3293195:read
&scope=thename:read
but it's not working. Any suggestions?
A: Sorry, but scope's feature is currently in Beta only and therefore not available for all Podio users.
We still have some work to do on the granular authentication project
... | |
doc_32621 | if (false)
int i = 9;
...
I realize it's useless, cause the scope of the if statement would comprise only the declaration and I wouldn't be reachable after its declaration cause it would be out of scope, and perhaps the compiler is smart enough to avoid this situation. If I include the curly braces, everything works... | |
doc_32622 | The webpage is the following.
https://24h.pchome.com.tw/
There is an iframe tag in the html source document whose element can be accessed with the following two xpaths.
"//iframe[@src='https://www.googletagmanager.com/ns.html?id=GTM-TKSM5PF']"
'//html/body/noscript[1]/iframe[1]'
Then I used the following the pyth... | |
doc_32623 | $args = array
(
'posts_per_page' => -1,
'post_type' => 'movies',
'meta_key' => 'event_release',
'orderby' => 'meta_value',
'order' => 'ASC'
);
A: Try specifying the meta type:
$args = array
(
'posts_per_page' => -1,
'post_type' => 'movies',
'meta_key' => 'event_release',
'meta_type' => 'DATE',
... | |
doc_32624 | packagename
|
|--- setup.py
|--- module_name
|
|--- library.c
The library.c file has been successfully installed outside of this package using:
gcc library.c -Wall -pedantic -o spec_conv -lm -O2
My setup.py file looks like:
from setuptools import setup, Extension
with open("READM... | |
doc_32625 | Possible Duplicate:
naked asterisk as parameter in method definition: def f(*)
Accessing a value in a method using *
The save(*) method in Rails takes just a single asterisk as an argument.
I know that * can be used for variable length arguments as in *args, but what does the * mean in this context? How does one acce... | |
doc_32626 | My JS:
$('#DTable').DataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": "data.php",
"type": "POST",
"dataType": "json",
"dataSrc": "data"
}
});
My JSON:
{
"col": [
"A",
"B",
"C",
"D",
"E"
],
"data": [
[
"Umn(i4(5P~",
... | |
doc_32627 | This also happens on the main Twitter Bootstrap site for version 2.3.2, at first I thought it was an issue with either my markup or css. But it seems to be a bug with the actual framework. Has when you go to the bootstrap 3 site this is fixed.
I've done a bit a google but can not find any information regarding this bug... | |
doc_32628 | Or any possibility to localise the complete Info.plist would be a solution as well.
I tried the following steps as it looks analogue to the
How to localise a string inside the iOS info.plist file? but it does not work for me.
So these are the steps:
In both en.proj and de.proj:
I added an empty file InfoPlist.strings
... | |
doc_32629 | The problem we are facing is that the AI is build on MTD algorithm and code is perfectly tested. Its just sometimes machine gives, Execution timeout (runtime error &h23) while calculating best move.
Is there any way we can increase this time by some code?
I am writing my application in BrightScript. I am developing a S... | |
doc_32630 | function newMessage() {
var directive = $compile("<div select-contacts message=\"newShare\"></div>");
// Compile directive
directive($scope).then(function(compiled) {
// After compiling, append it somewhere in the DOM
angular.element('#new_message').html(compiled);
});
}
I've searched ... | |
doc_32631 | It works for False palindrome; however, for anything True it never returns True..
I don't understand why this function does not return True?
And how I should improve this same answer so that it returns True.
My logic was that after the function completes iterating through the entire string, it will return True.
def isP... | |
doc_32632 | For example, if I see
gem list minitar
*** LOCAL GEMS ***
minitar (0.5.4)
I want to know which gem packages in local are using it. thanks. Is there any tool can do this?
A: i"ve found
"gem dependency -R minitar"
can solve my question
| |
doc_32633 | Now, the logical way to do this is using function pointers. It would be easily possible to pass the pointer to the desired callback function to the events manager, for registering. An event callback function would always return an int and take a void* as argument.
However I don't want to register static global function... | |
doc_32634 | disks
['5000cca025884d5\n', '5000cca025a1ee6\n']
The file name is p and its below:
*
*c0t5000CCA025884D5Cd0 solaris
/scsi_vhci/disk@g5000cca025884d5c
*
*c0t5000CCA025A1EE6Cd0
/scsi_vhci/disk@g5000cca025a1ee6c
*c3t50060E8007DB981Ad1
/pci@400/pci@1/pci@0/pci@8/SUNW,emlxs@0/fp@0,0/ssd@w50060e8007db98... | |
doc_32635 | There may be multiple section in collection view.
A: Did you try this method?
-(void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UICollectionViewScrollPosition)scrollPosition animated:(BOOL)animated
Or, besides scrolling to item, you can scrollRectToVisible:sectionRect. This example scrolls to ... | |
doc_32636 | This is my code:
const mongo = require('mongodb').MongoClient;
mongo.connect('', function (err,db) {
if (err) {
throw err;
}
console.log("Mongodb Connected...");
io.on('connection', (socket) => {
console.log("Someone connected.");
Post.find().sort({_id:-1}).limit(1).lean().t... | |
doc_32637 | Is there a way to export a python plot to MS Powerpoint, so all embedded text is automatically recognized as textboxes in MS Powerpoint (so it is easy to change the text and alter the text size)?
| |
doc_32638 | The program only goes through it once as I understand it opens the file ones, iterates through it and does only the bottom word. But I tried to loop it with while loop, if statement, etc. so it opens the file each time but it fails to do so and says some error with path of the file and that it can't find it.
Here is th... | |
doc_32639 | let result = service.getResults();
result.data.forEach((row:any) => {
this.myService
.getObject(row.id)
.subscribe((object:any) => {
//...
})
);
}
I want do do something, after all the subscriptions of getObject(row.id) have finished. I... | |
doc_32640 | http://docs.ggplot2.org/current/geom_segment.html
Haven't been able to find a workaround. Any suggestions?
A: Maybe you think that grid is no more supported because of the message displayed on its CRAN page ? But if it is written that Package ‘grid’ was removed from the CRAN repository, it is because it is now part o... | |
doc_32641 | I need to find the xpath or some other locator for Users(80). 80 is count of users which chnages according to users count. From IDE, i got link=Users80, but as 80 changes, i think it's not a good idea to use it as locator in my code because next time if I execute program, the count may be 30 or 90, so the locator would... | |
doc_32642 | At the moment I think that the design should be three classes: Master, Question, Summary.
Master calls Question with an intent that includes the question text of question 1.
After Alice inputs her answer the Question returns the answer to master via an intent.
Repeat two times.
Then Master does processing of the questi... | |
doc_32643 | I have a class in python that has a constructor. I would like to create some attributes within the constructor itself.
I tried all the obvious ways but no use, please help:
class X:
def __init__ (self, A):
self.A = A
my_dict = {}
my_dict[A] = 1
object_X.my_dict ##Need a way to ac... | |
doc_32644 | For example, I have these two operations:
$this->foo->value();
$this->bar->value();
and I would like to call it somewhat like this:
$this->($var)->value();
right now I'm doing it this way (but would love the above methode)
if($var == 'foo')
$this->foo->value();
else
$this->bar->value();
A: You almost ha... | |
doc_32645 | When I click in a button it should call another activity, and it does this, but it's not the activity that I wanted
My code:
This is the click action of a button, after do startActivity, it opens a white screen.
public void initiateRoute(View view) {
// I have a breakpoint on the line below and it comes here
In... | |
doc_32646 | public class TagTest {
public static FakeApplication app;
...
// BeforeClass only runs once before any tests are run
@BeforeClass
public static void setUpBeforeClass() {
// Set up new FakeApplication before running any tests
app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
... | |
doc_32647 |
.wrapper {
height: 90%;
overflow: hidden;
display: flex;
flex-direction: column;
}
.non-scrollable-container {
flex-shrink: 0;
flex-grow: 0;
max-width: 100%;
width: 100%;
}
.scrollable-container {
overflow-y: auto;
overflow-x: hidden;
width: 33.33%;
display: inline-block;
... | |
doc_32648 | $("input#crea").is(':checked') == false;
I'm using ICheck plugin, what I'm trying to do is to: User should select only one checkbox and user can not check both....
$('input').on('ifChecked', function (event) {
if ($("input#rec").is(':checked')) {
$("input#crea").is(':checked') == false;
}
else if ... | |
doc_32649 | -1 2 -1 -1 6 -1 -1.
I am doing this to test my code against a brute force approach.
A: This should do. If you generate a random number between 0 and 100 and it's less than the probability (in this case n), then getProb returns true and you have your -1.
Otherwise, just generate another random number modulo k
#include... | |
doc_32650 | matrix(1,7,5)*(1:7)
1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
4 4 4 4 4
5 5 5 5 5
6 6 6 6 6
7 7 7 7 7
What if your intention is to multiply the vector to the right instead of downwards? Is there a better way to write the command below? Is there a ... | |
doc_32651 | For example, if there is a list like this [1,2,['randompie'],3,[],4,5], how can I make it like this [1,2,3,4,5]
Here is what I've tried:
[elem for elem in [1,2,['randompie'],3,[],4,5] if type(elem)!='list']
A: I would use list comprehension:
your_list = [1,2,['randompie'],3,[],4,5]
your_list = [thing for thing in you... | |
doc_32652 | $client = new Google_Client();
$client->setClientId(YOUTUBE_CLIENT_ID);
$client->setClientSecret(YOUTUBE_CLIENT_SECRET);
$client->setAccessToken(???);
A: So finally got a hint from ChatGPT :)
I had to add these two lines. Didn't know the "setPromt" function existed!
$client->setPrompt('consent');
$client->setAccessTy... | |
doc_32653 | Here's an example I use as a file::find preprocessor stage and, being new to Perl, I wonder what tests are slowests / redundant / inefficiently ordered?
sub filter {
my $nicename = substr( $File::Find::dir, $_pathLength );
my @clean;
my $filecount = my $dircount = 0;
foreach (@_) {
next unless -... | |
doc_32654 | Thanks!
A: in build/core/main.mk find block:
ifneq (,$(user_variant))
# Target is secure in user builds.
ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1
change ro.secure=0
| |
doc_32655 |
invalid type argument of -> (have int)
My code is as follows:
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
typedef struct bundles
{
char str[12];
struct bundles *right;
}bundle;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */ ... | |
doc_32656 | loading each time by replacing it with a "clickable" image, so that the
map would only load "on demand" when clicked; I thought that was smart,
but it doesn't work :-( Would anybody see what's wrong and help me out?
https://maps.google.com/maps?ll=-1.501633,29.631358&z=12&t=m&hl=en-US&gl=RW&mapclient=embed&cid=175508... | |
doc_32657 | Month String_of_Nums Converted
May 3,3,2 2,3
June 3,3,3,1 1,3
Sept 3,3,3, 3 3
Oct 3,3,3, 4 3,4
Jan 3,3,4 3,4
Nov 3,3,5,5 3,5
I tried splitting up the string of numbers to get unique to work
strsplit(df$String_of_Nums,",")
but I end up with spaces in... | |
doc_32658 |
"description": "Test Description",
"icons":{
"16": "images/ticket_16.png",
"128": "images/ticket_128.png"
},
"manifest_version": 2,
"name": "Test App",
"version": "1.0",
"app":{
"background":{
"scripts": ["background.js"]
}
},
"permissions": ["fileSystem",{"fil... | |
doc_32659 | Inbox:
Project 01:
- Task 01
- Task 02
- Task 03
Project 02:
- Task 01
- Task 02
- Task 03
- Task 04
I managed to make a list out of every project within a main list I can loop into. This is the actual state of my script. Please consider arg[1] as the aforementioned string:
allTasks = arg... | |
doc_32660 | <?
error_reporting(E_ALL);
ini_set('display_errors', 1);
$json_url = "$SiteHost/inc/json.php?action=get_counters";
#$json_url = "http://google.com";
$json = file_get_contents($json_url);
/*
$ch = curl_init($json_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$json = curl_exec($ch);
curl_close($ch);
*/
var_dump(... | |
doc_32661 |
A: Seems this is happening due to the inner scroll-listener strategy, there is no option to modify it, best you can do is to unsubscribe, so the close event won't activate on scroll.
<p-multiSelect #multiSelector> </p-multiSelect>
You can get the reference of your multi-select instance using ViewChild
import { MultiS... | |
doc_32662 | When I remove the display:none it shows the carat and when I click the button it hides it. I want it to have the reverse effect. I want the caret to be hidden and when I click the button I want it to appear.
$(".button").click(function() {
$("span").toggle();
});
.caret {
display: none;
}
.caret:before {
... | |
doc_32663 |
I think I did everything I need to fix the blank page on my app, but I dont know why the page is not updating on Heroku
My Procfile:
web: node app.js
I appreciate if anyone can help.
Thanks!
A: I don't think that you need to fix anything. If you try to call the same url using POSTMAN or different browser you shou... | |
doc_32664 |
What I've got so far:
public IList<OxyPlot.DataPoint> Points { get; private set; }
public MainViewModel()
{
Points = new List<DataPoint>
{
new DataPoint(38 , 6.5 ),
new DataPoint(59 , 7 ),
new DataPoint(81 , 8 ),
new DataPoint(103 , 12 ),
new Da... | |
doc_32665 | When clicking, I changed the filter value by specifying the sigmaX, Y values of the background filter as variables.
However, this uses the stack to place the backgrounddropfilter in front of the entire screen scaffold widget.When this happens, the button cannot be clicked because it goes behind the background filter.
h... | |
doc_32666 | I'm Having the following error :
Expected to find class "AppBundle\Admin\CategoryAdmin" in file
"[...]/src/AppBundle/Admin/CategoryAdmin.php"
while importing services from resource "../../src/AppBundle/*", but it
was not found! Check the namespace prefix used with the resource in
[...]/app/config/services.yml
... | |
doc_32667 | E.g they enter the letter "?" I want the console to now say " ? is not a letter or number" please see my below code to see what I currently have.
let upperLower = prompt("please enter either a uppercase letter, lowercase letter or a number");
if (!isNaN(parseInt(upperLower))){
console.log(upperLower + " is a n... | |
doc_32668 | boost::asio::io_service::id service::id;
Got it from: MaidSafe-CRUX at GitHub
A: :: is the scope resolution operator. The name on the left-hand side denotes a scope; it can be either a namespace name or a class name. The name on the right-hand side denotes a member of that scope.
In your case, there seems to be a cla... | |
doc_32669 | I have a cell from a listView(I prefer recyclerView but the project has years) and in the corner of the cell i have a button to show more options. Programatically it just make an element View.GONE and another element View.VISIBLE.
I will attach code in a moment
To this button i setted too a listener that when i tap on ... | |
doc_32670 | At my class, I set a member var:
NSString *m_movieName;
...
@property(nonatomic, retain) NSString *m_movieName;
At viewDidLoad method, I assign a default name to this var:
-(void)viewDidLoad{
NSString *s1 = [[NSString alloc] initWithFormat:@"Forrest Gump"];
self.m_movieName = s1;
...
[s1 release];
[super viewDidLoad]
... | |
doc_32671 | When i am using the cmd $Logs | Select-string -notmatch "Connected"
It is filtering disconnected also.
Logs has following string
Connected
Disconnected
Hangup
calling
I want all the lines that not contain Connected.
When I use $logs | where-object {$_ -notcontains 'Connected'}
Its having Connected logs also.
Please sug... | |
doc_32672 | config.assets.excluded_paths
You can however exempt directories that have been added through the config.assets.excluded_paths. This is useful if you're for example using app/assets/stylesheets exclusively as a set of inputs to a compiler like Dart Sass for Rails, and you don't want these input files to be part of the l... | |
doc_32673 | The name of my web page is CreatePost.js
import React, { useState } from 'react';
const createPost = () => {
/* We will use the 'useState' hooks to get the value from the text fields. */
const [title, setTitle] = useState("");
const [body, setBody] = useState("");
const [image, setImage] = useState(""... | |
doc_32674 |
A: Swift 4
The answers above work well, but use some deprecated values/functions. Here's a fixed version that works in 2018.
func approximateAdjustedFontSizeWithLabel(_ label: UILabel) -> CGFloat {
var currentFont: UIFont = label.font
let originalFontSize = currentFont.pointSize
var currentSize: CGSize = (... | |
doc_32675 | I have 2 views on separate files in my app and these 2 views have textInput's. I set the KeyboardAvoidingView component to encapsulate these 2 views and it works perfectly, however, when I close this app and reopen, I'm going back to the top of the view. Has anyone ever seen this error?
My enviroment:
Environment:
OS: ... | |
doc_32676 | My Ubuntu host is running within a virtualbox VM, hope this is not causing the issue.
A: First create a bridge as per instructions here https://wiki.debian.org/LXC/SimpleBridge
My interface was showing em1 instead of eth0 so be sure to replace eth0 with whatever you got.
# Comment out the following:
# The primary netw... | |
doc_32677 | <form action="${uploadUrl}" method="post" enctype="multipart/form-data">
<input type="file" name="myFile" multiple>
<input type="submit" value="Submit">
</form>
However, I want to add a condition on the size of the uploaded file. If the file is smaller than for example 1MB, I want to upload it to a different upl... | |
doc_32678 | Suppose Sample is a dataframe as shown below:
Sample <- data.frame(ID = c('1', '2', '3', '4', '5', '6'),
Var = c('How are you',
'Do not go',
'How are you',
'Please go',
... | |
doc_32679 | Does anybody already had that problem?
Fun fact, when I only put the CSS, it's correctly loaded everywhere and it's not my JS who's buggy, because my script.js file is empty right now.
A: I have no idea why is this so, but the solution has been to directly write the JS in tags and to keep the CSS with an external ... | |
doc_32680 | This is one example:
<Code Language="XML">
<![CDATA[ <loop id="$Id$" repeat="$Repeat$" ordinal="$Ordinal$">
//intentional empty line left here
</loop>]]>
</Code>
I have left out the declarations for brevity.
This snippet generates (with params filled in):
<loop id="1" repeat="10" ordinal="1">
| <-- ... | |
doc_32681 | y=center_1080[4,:]
x=np.arange(0,10)
popt, _ = curve_fit(objective, x, y)
# summarize the parameter values
a, b, c = popt
print('y = %.5f * x + %.5f * x^2 + %.5f' % (a, b, c))
# plot input vs output
pyplot.scatter(x, y)
# define a sequence of inputs between the smallest and largest known inputs
x_line = arange(min(x), ... | |
doc_32682 |
The .proto file starts with a package declaration, which helps to prevent naming conflicts between different projects. In Python, packages are normally determined by directory structure, so the package you define in your .proto file will have no effect on the generated code. However, you should still declare one to av... | |
doc_32683 | Any idea ?
A: Hi!here is my suggestion.
You can enter the management in the lower left corner, select settings, and then search for "snippets" to see if the relevant options are turned off.
If those are opened normally, it may be that the relevant extension is missing, then you can click the extension on the left, and... | |
doc_32684 | $limit = (Get-Date).AddDays(-15)
$path = "xxxx\path"
# Delete files older than the $limit.
Get-ChildItem -Path $path -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt $limit } | Remove-Item -Force
# Delete any empty directories left behind after deleting the old files.
Get-ChildItem -Path $p... | |
doc_32685 |
<Border x:Name="box"
BorderThickness="0"
BorderBrush="Black"
Background="Black"
Width="200" Height="200">
<Label Content="Hello World"
Height="65" Width="400"
Foreground="White" FontSize="32"
HorizontalAlignment="Cent... | |
doc_32686 |
A: That's a method cancelLocalNotification: not cancelAllLocalNotifications
Try this
[[UIApplication sharedApplication] cancelLocalNotification:<#(UILocalNotification *)#>];
| |
doc_32687 | I am using Refit to do Api Rest calls to my firestore database.
Problem is I have setup rules and it looks like the 'request.resource.data' dictionary of my request is not defined.
My condition in the firestore rule tab is:
see UPDATE part below*
(I've also tried request.resource.data......)
What I know:
When I only c... | |
doc_32688 | Could adding the controls dynamically be adding to the bottleneck? Would it help if we add the control in the .NET cache object and not use LoadControl if it already exists in the cache?
Any other tips/strategies on making the page faster?
A: Add Trace="true" to your @Page directive and you will be able to see which m... | |
doc_32689 | For example: size([[[14],[23,[14]]]])= 8 (5 pair brackets, 3 ints)
I wrote a code but I cant find a way that cnt won't assign to zero each time I call the recursion.
This is my code:
def flatten(lst):
if type(lst)==int:
return [lst]
elif lst==[]:
return []
else:
return sum(([x] if ... | |
doc_32690 | this is my , class which is accessing the array_adapter class . for resources ....
class FunnyLookingAdapter extends ArrayAdapter
{
Context ctxt;
FunnyLookingAdapter(Context ctxt, int resource,String[] items)
{
super(ctxt, resource, items);
this.ctxt=ctxt;
}
public View getView(... | |
doc_32691 | hello-world.xhtml
<!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:a="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
<title>Hello World - Input Form</title>
</h:head>
<h:body>
<h:form>
<h:inputText i... | |
doc_32692 | For example
if user is desktop browser or mobile browser: content will be visible
if user comes from my mobile application's webview: content will not be visible
(I change my Application WebView's user agent to my specified string)
As far as I know there exists other media query options like this. But media queries doe... | |
doc_32693 | After saving the file eclipse auto removes these imports.
Quick googling showed me results about organizing imports. But these are disabled in eclipse work-space.
How should I prevent this behavior?
A: It was in fact inside Save Actions.
Although the Perform the selected actions on save was unchecked, these settings w... | |
doc_32694 | Everything I've read on binding is based on collections and lists -can't I set it simply (and literally) based on the value of a string variable? string color = "red" color = "#FF0000"
A: what you will need to do is implement a custom converter to convert the colour to the brush object. Something like this...
pu... | |
doc_32695 | An example of the input I need to convert is:
<h1>Hello<h1></br>
<h3>This is a test to demonstrate a simple html code I just need to convert</h3>
A: You can parse your HTML string to elements and add these elements to a paragraph (by the way, I repaired your html string for the tests):
String html = "<h1>Hello</h1><b... | |
doc_32696 | Does anyone have a script to do this?
I tried the following code, where %ApplicationDeploymentFolderPath% = \\servername\foldername
IF EXIST %ApplicationDeploymentFolderPath%\Release (
REM Get current date time
@echo off
For /f "tokens=1-3 delims=/ " %%a in ('date /t') do (set mydate=%%c_%%b_%%a)
For /f "tokens=1-2 d... | |
doc_32697 |
*
*com.android.exchange (Exchange)
*com.facebook.auth.login (Facebook)
*com.twitter.android.auth.login (Twitter)
*com.google (Google)
But when I try to read contacts, all I get is contacts from "Google" account.
Cursor cursor = getContentResolver().query(ContactsContract.RawContacts.CONTENT_URI, null, null, nul... | |
doc_32698 | if(index==list.index(total_Rsq)and total_Rsq>MinList) :
s1=list.index(total_Rsq)
with open("D:/Krutsi_RandD/Python/NNFiles/summary1.csv", 'w+') as csvfile:
rows = [[ s1,NN.inputLayerSize,'-',NN.hiddenLayerSize,'-',NN.outputLayerSize , Rsquare , Rsquare1 , argument1 , argument2,list[index]]]
... | |
doc_32699 | a = [[6, 8, 12, 15], [2, 5, 13], [1], [5], [6, 15]]
And I want to replace all of the value in the inner lists to their ordinal values like:
b = [[0, 0, 0, 0], [1, 1, 1], [2], [3], [4, 4]]
I tried this:
for jj in a:
for uu in range(0, len(jj)):
for k,q in enumerate(a):
jj[uu] == k
It didn't ou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.