window

How to get child window url from parent window using javascript

天涯浪子 提交于 2020-01-02 07:13:21
问题 I'm launching a child window with a window reference name. I want to capture the URL of the child window when it changes each time. var winRef; var url='http://www.google.com'; if(winRef == null || winRef.closed) { winRef = window.open(url, "mywindow"); winRef.focus(); alert(winRef.location.href); } winRef.captureEvents(Event.CHANGE); winRef.onchange=function(){ alert('change event triggered'); console.log(winRef.location.href); } I have tried with events LOAD, CHANGE to capture the location

remove subview of uiwindow?

人盡茶涼 提交于 2020-01-02 05:18:11
问题 i want to remove a view from uiwindow,so i nslog in appdelegate method,it says window's subviews count as two NSLog(@" %d",[[self.window subviews] count]); so how can i remove that subviews from window,if i remove that subviews i have tab bar controller to be continued... - (void) GetUserCompleted { NSLog(@" %@",[[self.window subviews] objectAtIndex:0]); NSLog(@" %@",[[self.window subviews] objectAtIndex:1]); } 回答1: You can remove the a single subview using the following code. [subview_Name

Wpf window title from static resource

僤鯓⒐⒋嵵緔 提交于 2020-01-02 04:33:25
问题 I am using resource dictionarys for localizations, I have this code in wpf: <Window x:Class="RWIS_WPF.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="RWIS" Height="500" Width="800" MinHeight="500" MinWidth="800"> <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Localizations/Dictionary.EN.xaml" /> </ResourceDictionary.MergedDictionaries> <

What does the pyspark.sql.functions.window function's 'startTime' argument do and window.start?

倖福魔咒の 提交于 2020-01-01 19:11:16
问题 The example is as follows: df=spark.createDataFrame([ (1,"2017-05-15 23:12:26",2.5), (1,"2017-05-09 15:26:58",3.5), (1,"2017-05-18 15:26:58",3.6), (2,"2017-05-15 15:24:25",4.8), (3,"2017-05-25 15:14:12",4.6)],["index","time","val"]).orderBy("index","time") df.collect() +-----+-------------------+---+ |index| time|val| +-----+-------------------+---+ | 1|2017-05-09 15:26:58|3.5| | 1|2017-05-15 23:12:26|2.5| | 1|2017-05-18 15:26:58|3.6| | 2|2017-05-15 15:24:25|4.8| | 3|2017-05-25 15:14:12|4.6|

Add a UserControl in/over titlebar in Window

十年热恋 提交于 2020-01-01 16:46:11
问题 In WPF, I want to add a userControl in/over titlebar in Window, like this: The Red part is that UserControl, and the Green part is titlebar. Now I hope to get some suggestions from you. Need to extend the Window class or just customize the style of the Window? It's better to provide source code. 回答1: You can do this by implementing your own title bar. In order to do so set your window style to none: WindowStyle="None" This will mean that the window will have no control box (minimize, maximize

Show loading window

余生长醉 提交于 2020-01-01 12:27:12
问题 My application in WPF loads external resources, so I want to show a loading form while the program is loading. I tried to create the form, and show before the loading code, and close when loading ended. private void Window_Loaded(object sender, RoutedEventArgs e) { LoadForm lf = new LoadForm(); lf.Visibility = Visibility.Visible; // Al code that delays application loading lf.Close(); } But the only thing I get is that the form is showed when loading progress is complete and immediately closes

How to close a Vaadin subwindow on mouseclick outside of the window?

安稳与你 提交于 2020-01-01 10:56:39
问题 I'm using vaadin 7 and in my application I use subwindows sometimes. In one case I have a modal window with several components in it. It opens another window when clicked on some of the components inside the modal window. I'd like this window to close automatically when the user clicks outside of it (e.g. on the modal window again). In the Vaadin Sampler this behaviour seems implemented when showing the source (click on the source button in the right upper corner). Also the behaviour should

C# WPF Move the window

与世无争的帅哥 提交于 2020-01-01 10:46:05
问题 I have added the following parameters to my Window : WindowStyle="None" WindowStartupLocation="CenterScreen" AllowsTransparency="True" ResizeMode="NoResize" Background="Transparent" And now I can't move the Window , so I have added the following part of code to my Window : #region Window: Moving private void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { DragMove(); } #endregion Also I must specify that my XAML code in my Window is the following (the Window look like the

WPF Window Background ImageBrush not tiling

末鹿安然 提交于 2020-01-01 07:38:11
问题 I have a window with a background image. The image may change at runtime which really should not matter for this. I want the image to be fixed to the top left (which it is) and not scale (which is also correct. But I need the image to repeat (tile) when the window is made larger than the image. I am doing ... What am i missing? TIA 回答1: You need to set the TileMode property as well as the Viewport and ViewportUnits : For example: <Window.Background> <ImageBrush ImageSource="myImage.png"

Window size vs data length for FFT

∥☆過路亽.° 提交于 2020-01-01 06:37:53
问题 I am trying to do a quick spectral analysis on the streaming audio data to capture vowels (something like JLip-sync). Using PyAudio to capture the voice data in small chunks (1024) for short durations (0.0625 sec.). Using numpy.fft for the analysis, and to get rid of leakage using numpy.hanning window. I am using 4096*4 as the sampling rate (not 44100 or 22050, and open to discussion as well; 4096*4 being nearest to 22050). Considering the frequencies I am interested in (ranging from 300 Hz