window

Window leak due to alert dialog

给你一囗甜甜゛ 提交于 2019-12-13 02:37:43
问题 Quite new in Android development, I keep getting a window leak exception, probably due to use of an alertbox I made. In searching for what I have to change, I tried a bunch of things and I can't find my error. Maybe someone can help me look through my code? public class LogInActivity extends Activity { EditText gebruikersnaamET, paswoordET; TextView titel; TextView gebruikersnaamTV; TextView paswoordTV; TextView geenAccount; Button ok; String url = ""; final Context context = this; String

javascript calling a function with params on window object

二次信任 提交于 2019-12-13 02:16:51
问题 So I'm trying to call this method: refreshMoradaLabel = function(idPlaceHolder) {...}; With the window object: window [ refreshMoradaLabel('id') ] (); But this doesn't seem to work. It's only when the method has no parameters. Is there a way to work using the window [ variable ] () syntax? Edit; ok here's the code: moarada.jsp has the code with these methods: <c:set var="methodOnClose" value="refreshDynamicValues" /> <c:if test="${empty fieldInstance || (not empty fieldInstance &&

Modal window javascript css overlay

懵懂的女人 提交于 2019-12-13 01:35:17
问题 Right now I have to click the link to open a modal window. I don't know how to make this thing to loading without having to click the link. Can anyone please show me how to do this? Thank you! <!DOCTYPE> <script type="text/javascript"> function overlay() { el = document.getElementById("overlay"); el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible"; } </script> <style type="text/css"> body { height:100%; margin:0; padding:0; } #overlay { visibility: hidden; position

CTRL+Z command in a batch file

霸气de小男生 提交于 2019-12-13 01:31:05
问题 I looked up for answer to my question on many different websites but nothing. I am creating a batch file which is as follow: @echo off md C:\Users\John\Desktop\languages cd C:\Users\John\Desktop\languages md italian md french md german md spanish cd C:\Users\John\Desktop\languages\tedesco copy con kartofeln.txt This is the message I want to add into my text file ***CTRL + Z*** how can I now write an executable command "CTRL + Z" in order to close this file and continue my coding?? I want to

How do I change the color of this bar when switching apps?

会有一股神秘感。 提交于 2019-12-13 01:28:14
问题 With the addition of Lollipop, it appears you can now change the color of this window when changing apps. I don't know what it is called and therefore can't find any info on it but if you look at the image you can see that the Keep app is now yellow. How do I go about changing this color? Here is a link to the image, it won't let me attach it since I'm new Thanks 回答1: You can use setTaskDescription() to achieve this: setTaskDescription(new ActivityManager.TaskDescription(label, icon, color));

jQuery - calculate element width through subtract pixel from window size

允我心安 提交于 2019-12-13 00:37:32
问题 My goal is to calculate the width of a fixed positioned element (top:0; left:200px;) through subtract 200px from the window size so that it fits the rest of the viewport. Therefore I used the following code but sadly it doesn't work. Hopefully someone of you guys can help me! $(function() { width = ($(window).width() - 100); $("div").css("width", width); })​; 回答1: You don't need to rely on jQuery, actually. There is a simply CSS trick to get this done, by declaring right: 0 on that element.

(C++/win32) Hide a window so that the user cannot alt-tab or switch to it

牧云@^-^@ 提交于 2019-12-12 21:18:52
问题 I'm currently using ShowWindow( hwnd, SW_HIDE ) , but Alt Tab still seems to be able to switch to it after it's hidden. Is there a way to completely hide a window without destroying it? EDIT: I should add that using the WS_EX_TOOLBOX style doesn't help. With enough Alt Tab and ShowWindow(SW_SHOW) , some strange things happen. 回答1: Try this code to hide window I have try this code and hidden window will be not appear while you pressing Alt + Tab [ I am using win-xp] To show window press Tab +

How to set window always on top of any other applications

﹥>﹥吖頭↗ 提交于 2019-12-12 18:35:50
问题 I have a JFrame which needs to be always on top of the other application. For this I am using setAlwaysOnTop() method of Window class. Here is my code : class Test1 extends JFrame { public Test1() { initComponents(); setTitle("Top Window"); setAlwaysOnTop(true); } private void initComponents() { jLabel1 = new JLabel(); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); jLabel1.setHorizontalAlignment(SwingConstants.CENTER); jLabel1.setText("I am a top most window"); getContentPane().add

How to enable chrome extension without user intervention (programmatically)

泪湿孤枕 提交于 2019-12-12 18:29:01
问题 I made a chrome extension and want its installation to be done as a part of software installation setup using windows registry. It installs the extension for chrome, but in disabled state. Extension is listed in the list of installed extension in chrome://extensions. How can I enable the extension using code(without end-user intervention). I don't want my user to enable it manually. 回答1: You can't directly enable chrome extension because of chrome security police(After Chrome 25). Extensions

WPF auto resize elements

故事扮演 提交于 2019-12-12 17:02:25
问题 When application window is resized I want that the elements in it would resize proportionally too. Is that possible? I tried googling but couldn't really find anyting related to this. My XAML code: <Window x:Class="app.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" KeyDown="Window_KeyDown"> <Grid> <TabControl Name="MyTabControl"> <TabItem Name="pradzia" Header=