widget

Can you implement a widget that uses a <script> tag in Angular2?

我是研究僧i 提交于 2020-01-06 19:55:16
问题 We have an existing widget using <script> tags that we wrote, for third party customers to add to their site. When added, it generates all the HTML, forms, etc for the widget. We did this to avoid all the hassles of iframes. From my understanding, Angular2 does not allow <script> tags in a template? I assume their are many widgets that work the way ours do? Is there some way to do this in Angular2? Or did we miss the mark and there is a better way entirely (iframe?) to do a similar function?

matplotlib widgets slider on object (Ellipse)

我是研究僧i 提交于 2020-01-06 05:35:06
问题 I want that the x-position (=d_in) of my object (the Ellipse) is changed by changing the slider d_in. This is what I got: from numpy import pi, sin import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons from matplotlib.patches import Ellipse from scipy.optimize import fsolve import pylab axis_color = 'lightgoldenrodyellow' #variable d_in=80 fig = plt.figure(figsize=(12,6)) ax = fig.add_subplot(111) fig.subplots_adjust(left=0.25, bottom=0

launching android widget

戏子无情 提交于 2020-01-06 04:56:08
问题 I am following http://www.helloandroid.com/files/xmaswidget/android_howto-hellowidget.pdf for developing a widget. I am unable to launch a widget on to the home screen. When running the application I am getting the errors like No Launcher activity found and The launch will only sync the application package on the device! Looking for an answer. 回答1: It could be that you don't have the right setup in your AndroidManifest.xml Have you seen this post? Android sample app not showing up 来源: https:/

Yii-User and Yii-eauth integration

一笑奈何 提交于 2020-01-05 14:57:21
问题 I am trying to put together an application using yii-user and yii-eauth extensions but I am coming up short. When I create a new webapp and install eauth I can get it to work fine so I know that I am not doing anything wrong on that end. I think the problem lies with my urls. This is a demo of what it is supposed to be like: http://nodge.ru/yii-eauth/demo/login. When someone clicks on say google it should bring you to the google sign in page but on my application I am getting a 404 error that

How do I access a ViewFlipper in a Widget to populate its content dynamically?

余生长醉 提交于 2020-01-05 12:09:09
问题 I have a Widget that needs to be populated with dynamic content. Specifically I'd like it to contain a ViewFlipper whose Views are updated at runtime. I'm not clear on how to access the ViewFlipper from the onUpdate method of my AppWidgetProvider (assuming this is the correct place to affect change on the Widget and all the examples I'm finding on-line deal with static layouts that have all their elements defined in the xml). So... @Override public void onUpdate(Context context,

Android Widget with ImageView is Invisible Until I Start Moving It

六眼飞鱼酱① 提交于 2020-01-05 10:27:18
问题 I've got a widget with an ImageView , whose source I'm setting with a URI to an image on the user's device. I set it with RemoteViews.setImageViewUri() in the onUpdate of the widget's provider. The strangest thing is happening: I can't see the widget or the image while the widget is stationary on my home screen, but when I pick it up and start moving it, the image appears! Here are some screen shots illustrating this: Here's the layout for the widget: <?xml version="1.0" encoding="utf-8"?>

wordpress get post id from side widget

社会主义新天地 提交于 2020-01-05 08:54:08
问题 I am trying to get the post id from a widget I am putting into the sidebar, but what ever I try I seem to get random post id's from other posts. I have tried: $id = get_the_id(); $post_id = $GLOBALS['post']->ID; global $wp_query; $thePostID = $wp_query->post->ID; The template I am using is classipress and I am putting my widget into the sidebar they provide. They already have a form at the top of the sidebar which uses the post id. They use global $post; I have tried this also and it too

Python Tkinter Text widget extremely slow when adding multiple tags by tag_add()

纵饮孤独 提交于 2020-01-05 08:48:23
问题 I have a sizeable piece of text contained in a Python Tkinter Text widget. I need to colour the background of each letter in the text, individually, depending on another variable. I do this by adding tags with tag_add. The problem is that the widget responsiveness slows down significantly when all the tags are added. Without the tags everything runs fluently. What can I do? This is a minimal example of the code: from Tkinter import * import tkMessageBox import Tkinter as ttk import

Symfony2, how create a widget like a standalone class

主宰稳场 提交于 2020-01-05 08:29:41
问题 Let's start with basic thing, simple example is Yii. It has such thing as widgets. Standalone, configurable and callable from any place we want classes. And I'm wondering can symfony2 has the same? What it will be? Controller in bundle? Action simple (method)? Widget (twig) with parameters? In Yii we create class (of widget), standalone, describe it and use (by calling in template). How will it look like in symfony2? Simple example 'i want create menu navigation using widget, where it will

QT - Adding widgets to horizontal layout step by step

夙愿已清 提交于 2020-01-05 07:57:10
问题 I have a horizontal layout and when user enters a number, I am adding that number of widgets (which contain picture) to that layout. void MainWindow::on_pushButton_2_clicked() { for(int i=0; i<count; i++) { ui->horizontalLayout_4->addWidget(label); } } For example, if user enters 100, this function loop 100 times and after the function finishes its execution, it adds 100 widgets at the same time. But I want function to add widgets step bu step. For example, when i=0, it adds, when i=1 it adds