2018-10-22         Joanne

isDisplayed returns false for a visible element in Protractor

EDIT #4: Breakthrough!!I started recursively going through the parent nodes and returning the same values as below. One of the parents--the inner mat-drawer-container--also returned false for isDisplayed (all the others returned true, which seems odd).Looking at that node, it turns out that it's the only tag on the site to have the CSS of display: contents. Removing that causes the button in question--and everything else below it--to return true for isDisplayed. Heck, Protractor can even click the button and I can see the expected result in the browser.Now I suppose the ...

 javascript                     1 answers                     63 view
 2018-10-22         Joanne

How to declare a Static Readonly List?

I have a structure and I want to have a static readonly list of this type.In the readonly, the structure properties (HexCode, Name) aren't found. Making them public doesn't change anything.Here is the structure declaration:public struct FixedDataStruct{ string HexCode; string Name;}And here is the List:private static readonly List<FixedDataStruct> myList= new List<FixedDataStruct>{ { HexCode = "12", Name = "Chenger" };}; How about?private static readonly List<FixedDataStruct> myList = new List<FixedDataStruct>{ new FixedDataStruct(...

 c#                     2 answers                     38 view
 2018-10-22         Joanne

google-cloud-vision how to read pdf file

I am using Google OCR API and I am reading both images and PDF files, I am able to read and process images file, however, for PDF files, as per Google OCR API documentation, they have mentioned that we need to store our document into Google Cloud service.Having said that, due to data confidentiality, I can't store my data into Google Cloud and want to upload my PDF from my local system in order to read text from PDF file. I need your input is it possible to upload PDF from local disk and then process instead of uploading file into Google Cloud? Your cooperation will be high...

 google-cloud-vision                     1 answers                     9 view
 2018-10-22         Joanne

Starting of with the URLs in django blog

http://code.google.com/p/django-threadedcomments/,I have integrated the the following Blog APP with my site.In the URLs.py i have the following below,My question is that what is the first link that i have to start of with.. from django.conf.urls.defaults import * from threadedcomments.models import FreeThreadedComment import views free = {'model' : FreeThreadedComment} urlpatterns = patterns('', ### Comments ### url(r'^comment/(?P<content_type>\d+)/(?P<object_id>\d+)/$', views.comment, name="tc_comment"), url(r'^comment/(?P<content_type>...

 django                     1 answers                     42 view
 2018-10-22         Joanne

How to get ids from ormlite SaveAll() call

I'm using ORMLite to save a number of objects, similar to:var graphs = Builder<UserGraph>.CreateListOfSize(10) .And(x => x.UserId = User.Id) .Build();Db.SaveAll(graphs);Is there a way to have the id property for each object get set automatically. If not, is there a way to get the ids for all of the inserted objects? You can add an AutoIncrement attribute to your Id property : [AutoIncrement]public int UserId{ get; set; } [XXX]

 c#                     1 answers                     81 view
 2018-10-22         Joanne

Disable Intellisense in XAML Editor in VS2008?

Is there a way to disable Intellisense in the XAML editor in Visual Studio 2008? It is often a big performance drain while typing, and sometimes I'll sit for ten or more seconds waiting while the list automatically popups up.It appears that in Options->Text Editors->XAML, the Intellisense section is section is unavailable (grayed out). We open documents in Full XAML View, and don't use any third party enhancements.It's so bad that sometimes I'll just open the file elsewhere and edit what I need, but I'd really like to get this solved so I don't have to use an external appli...

 visual-studio-2008                     1 answers                     103 view
 2018-10-22         Joanne

How do I implement a sprite-sheet in OpenGLES for iPhone?

I am working from the GLSprite sample code example. What I want to know is what do I need to do to the code to have it treat my texture as a sprite-sheet? The only modification I have done so far is to create a 256 x 256 png of 16 smaller images to be my frames. I have never worked with sprite-sheets before. Thanks for your help. You need to adjust the texture coordinates to map the required sprite. Texture coordinates are normally normalised (0 to 1). Assuming you have a 4x4 grid of sprites, the first sprite would have texture coords of...0, 00, 0.250.25, 0.250.25, 0 ...

 iphone                     1 answers                     47 view
 2018-10-22         Joanne

Get div html with select value of dynamically created select in jquery

I dynamically created a div with select options in jQuery. Here's a sample.<div id="myDiv"> <select id="mySelect"> <option selected value="0">A</option> <option value="1">B</option> <option value="2">C</option> <option value="3">D</option> </select></div>0 is the default selected value.When I get html of the div like this $("#myDiv").html(), it gets the below.<div id="myDiv"> <select id="mySelect"> <option selected value="0">A</option> ...

 javascript                     3 answers                     26 view
 2018-10-22         Joanne

Revert SQL Operation Over Multiple Stored Procedures

We are working on an application where, sometimes, we need to delete (some) entries from an SQL table and replace them with a new list of rows. In our app, the logic goes:Delete relevant_entries using delete_stored_procedureFor Each new_entry in new_entries Insert new_entry using insert_stored_procedureThis logic works, but there is a catch. What if the DELETE works, but one of the INSERTS fail? We need to be able to revert the database back to before the table rows were deleted and any previous entries were inserted. Is there a way to do this and ONLY revert these things,...

 sql                     1 answers                     70 view
 2018-10-22         Joanne

How to check existence of array of objects in ibm cloud object storage node js sdk and also copying multiple objects at a time to cos

How to check existence of array of objects in ibm cloud object storage and also copying multiple objects at a time to cos using node js sdk(ibm-cos-sdk) You can list objects with something like:function doListObjects() { console.log('Listing Objects'); return cos.listObjects({ Bucket: bucket }).promise();}doListObject().then(function(data) { console.log(data); console.log('Finished!', process.exit());}).catch(function(err) { console.error('An error occurred:'); console.error(util.inspect(err));}); [XXX]

 node.js                     1 answers                     87 view
 2018-10-22         Joanne

Microsoft account and IdentityServer4

I have setup an external auth with IdentityServer4 but I can't seem to figure out how to read Microsoft profile when user is authenticated.Can someone point me in the right direction? I am assuming you are using Azure AD? If so, and you are being correctly redirected to the Microsoft login page to enter your credentials, I would suggest looking here in the IdentityServer4 samples (specifically the ExternalLoginCallback function).That will call a couple other functions you can use to translate the information you received back from Microsoft into IdentityServer claims th...

 .net-core                     1 answers                     73 view
 2018-10-22         Joanne

Web Hosting URL Length Limit?

I am designing a web application which is a tie in to my iPhone application. It sends massively large URLs to the web server (15000 about.) I was using NearlyFreeSpeech.net, but they only support URLS up to 2000 characters. I was wondering if anybody knows of web hosting that will support really large URLs? Thanks, Isaac Edit: My program needs to open a picture in Safari. I could do this 2 ways:send it base64 encoded in the URL and just echo the query parameters.first POST it to the server in my application, then the server would send back a unique ID after storing the pho...

 url                     3 answers                     82 view
 2018-10-22         Joanne

How to i can integrate LUIS bot with multiple QnA maker

Can someone please provide the solution for integrate LUIS with multiple QnA KB. You would basically create a LUIS app, then for each intent have it call the appropriate QnA KB. Tutorial on how to do this is here, "Integrate QnA Maker and LUIS to distribute your knowledge base". [XXX]

 luis                     1 answers                     100 view
 2018-10-22         Joanne

Sequence contains no matching element at System.Linq.Enumerable.Last<Xamarin.Forms.Page>

I use Xamarin.Forms:protected override void OnCreate (Bundle bundle){ base.OnCreate (bundle); global::Xamarin.Forms.Forms.Init (this, bundle); LoadApplication (new App ()); SetContentView(Resource.Layout.Main); AndroidEnvironment.UnhandledExceptionRaiser += AndroidEnvironmentUnhandledExceptionRaiser;}private void AndroidEnvironmentUnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e){ string str = e.Exception.ToString();}I press 'Escape' ('Back') button and have this exception: e.Exception { System.InvalidOperationException: Sequence conta...

 c#                     1 answers                     95 view
 2018-10-22         Joanne

warning on 64bit string formatter in mingw environment

What is the correct way to avoid warnings on 64bit printf/scanf arguments on the most recent versions of mingw-w64?I know that mingw-w64 relies on microsoft runtime for many standard library functions, and that these functions are not compatible with C99 standard.Old answers say to use %I64d, but as the C99 standard is %lld, anyway if I compile with -Wall -pedantic I get warning for BOTH syntax, here is a small example:#include <stdio.h>int main(void){ long long test; scanf("%I64d", &test); scanf("%lld", &test);}Compile it with gcc (my version is ming...

 c                     1 answers                     79 view
 2018-10-22         Joanne

Python iterate through object to create tables with Flask-SQLAlchemy

EDITEDI've been trying to create an class that will allow me to iterate through a list, or dictionary, and generate tables and rows.The code starts as follows:from flask_sqlalchemy import SQLAlchemy as safrom flask import Flask as flimport pymysqlpymysql.install_as_MySQLdb()app = fl(__name__)app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:the_other_stuff'app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] =FalseDEBUG =Truedb = sa(app)a=['some_stuff','gaaahhhh','lalala','rawr','pizza']class test(db.Model): __tablename__ = 'stuff' id = db.Column('id', db.Integer, primary...

 python                     2 answers                     26 view

Page 1 of 145  |  Show More Pages:  Top Prev Next Last