w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
CakePHP 2.x custom "Authentication adapter "LdapAuthorize" was not found
I think your App::uses() is wrong so it can't find the class. Your current code: App::uses('LdapAuthroize', 'Controller/Component/Auth/LdapAuthorize'); Is trying to find Controller/Component/Auth/LdapAuthorize/LdapAuthroize.php The first parameter is the class name (you have a typo with that), the second is just the path to the directory containing the class, you don't need to add the class name again. Try this: App::uses('LdapAuthorize', 'Controller/Component/Auth');

Categories : Cakephp

Jsoup emits " entity in text nodes
public boolean prettyPrint() Get if pretty printing is enabled. Default is true. If disabled, the HTML output methods will not re-format the output, and the output will generally look like the input. To tell JSoup not to re-format your document, you'd simply include doc.outputSettings().prettyPrint(false); JSoup API - Class Document.OutputSettings

Categories : Java

Sending JSON data as context quotes becoming "?
I think you can use autoescape tag in your template to not escape the quotes # sessionscheduler.html {% autoescape off %} {{ your_string }} {% endautoescape %}

Categories : Javascript

How to get rid off indentation and how can i tell Simple xml framework, not to convert " to " while serializing object
Isn't xml meant to do so? I don't know any option to disable this. But as a workaround you may implement a Transform, which (un-)escapes your quoutes. Edit: Possible the org.simpleframework.xml.stream.Formatter class can help you. This will escape those sequences. But not sure if you can customize it per code or you have to work on source-level. Disable indention: Serializer ser = new Persister(new Format(0)); Will set indention count to 0. Please see Format.

Categories : Java

Maximize window in XNA 4.0
You can put this code in the constructor to do what you want: Form form = (Form)Control.FromHandle(Window.Handle); form.WindowState = FormWindowState.Maximized; This requires that you add a reference to System.Windows.Forms to your project. This does have the downside that it actually sets up the graphics device twice on startup. Once in the normal way, and then once again because the window was resized. (Although this all happens before the form is first displayed.) It has the advantage of being extremely simple to implement. I'm going to poke around for awhile and see if the initialisation order can be changed... There really is no simple way to get around this problem, it would seem.

Categories : C#

Programmatically Maximize Window On Half Of Screen
This can be done without p/invoke. Try this: Rectangle rect = Screen.PrimaryScreen.WorkingArea; rect.Width = rect.Width / 2; Bounds = rect; This will put the current window on the left of the primary screen. Then just add this to put it on the right of the screen. Location = new Point(rect.Width, 0);

Categories : C#

how to disable the window maximize icon using PyQt4?
Haven't worked with it but research seems to point to messing with the window flags. QWidget has a method called setWindowFlags. Here is the doc for the Qt.WindowFlags class. Here is a reference for all of the flags. Look for Qt.WindowMaximizeButtonHint In general it seems like you need to find a way to enable the Qt.CustomizeWindowHint flag and disable the Qt.WindowMaximizeButtonHint flag. Either way, you probably want this in addition to setFixedSize so that's a good start. Edit: Something like win.setWindowFlags(win.windowFlags() | QtCore.Qt.CustomizeWindowHint) win.setWindowFlags(win.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint) Assuming your import is something like this from PyQt4 import QtCore This would turn on the CustomizeWindowHint flag and turn off the Wi

Categories : Python

AS3 / AIR: Maximize desktop application window on start up (?)
Yes, use NativeWindow.maximize when you initialize the program.

Categories : Windows

WPF window maximize with fixed/limited width
Unfortunately, your three requirements does not seem to be achievable using just MinWidth, MaxWidth and WindowState. But regardless, it's still possible to achieve something similar. What you need to do is to emulate the maximized state of the window. You need to move the window to the correct position, get the right height, and make it unmovable. The first two parts are easy, the last one requires some more advanced stuff. Start out with the window you have, with Width, MaxWidth and MinWidth set to 300, and add an event handler to StateChanged. Width="300" MinWidth="300" MaxWidth="300" StateChanged="MainWindow_OnStateChanged" And the event handler, and helper methods: private bool isMaximized; private Rect normalBounds; private void MainWindow_OnStateChanged(object sender, EventArgs

Categories : Wpf

Excel Window & UserForm Minimize and Maximize Functions
When you display the form, you are likely doing something like: UserForm.Show The Show method takes an optional argument, whether to display the form Modal or Modeless. Modal display is default, and does not allow interaction with the worksheet/workbook objects. Instead, when you display the form, do: UserForm.Show vbModeless This will allow the user to interact with the worksheet/workbook, which alleviates the need for your custom button and you will not need to do Me.Hide. Minimizing the Application will minimize the UserForm. Maximizing the Application will re-display the workbook and the userform. If you must use the vbModal display of the UserForm (and in many applications this is a deliberate requirement to prevent user from interacting with the Workbook/Worksheets), let me

Categories : Windows

double scrollbars on resizing with maximize and restore browser-window
Try changing your overflow overflow: auto; to: overflow: hidden;

Categories : C#

how can i make resize to controls(Panel ,Grid) itself when window is maximize in .net
Why you can't wrap your controls inside Grid? When you set columns width and rows height using *, it will change columns and rows size whenever window be resized. Also controls should have HorizontalAlignment and VerticalAlignment set to Stretch.

Categories : C#

C++ Win32 (WinAPI) Custom Window Frame with maximize button
Well you can look at the MSDN for the steps and some examples on how to do it. Maybe that can point you in the right direction. http://msdn.microsoft.com/en-us/library/windows/desktop/bb688195%28v=vs.85%29.aspx

Categories : C++

Disable maximize button of WPF window, keeping resizing feature intact
WPF does not have the native capability to disable the Maximize button alone, as you can do with WinForms. You will need to resort to a WinAPI call. It's not scary: [DllImport("user32.dll")] private static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll")] private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); private const int GWL_STYLE = -16; private const int WS_MAXIMIZEBOX = 0x10000; private void Window_SourceInitialized(object sender, EventArgs e) { var hwnd = new WindowInteropHelper((Window)sender).Handle; var value = GetWindowLong(hwnd, GWL_STYLE); SetWindowLong(hwnd, GWL_STYLE, (int)(value & ~WS_MAXIMIZEBOX)); }

Categories : C#

How to assign proportional space for gridview columns on window maximize and restore down
Your code is explicitly setting one column to take all remaining space. Instead, you need to set them all to the same value, the ListView width divided by the number of columns: if (double.IsNaN(listView.ActualWidth)) listView.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity)); double colWidth = listView.ActualWidth / gridView.Columns.Count; for (int i = 0; i < gridView.Columns.Count; ++i) gridView.Columns[i].Width = colWidth;

Categories : Wpf

All subsets of size k, maximize difference between subsets
In your desired output the number of elements that differ from one subset to the next gives the sequence 2,1,2,1,2. I get the same sequence by selecting, from the lexicographically-ordered list of subsets, the first, then the last, then the second, then the second last, etc. At each step choose the subset which is furthest away in the order and which has not already been chosen. I don't get the same sequence of subsets, just the same sequence of numbers of differences. I've satisfied myself that this works for a couple of other small cases too and am now looking forward to the counter-examples and down votes. Ahh, so you don't want to rely on building the lexicographically-ordered set of subsets first. My initial thought is to have 2 subset generators running at the same time, one st

Categories : Algorithm

Locking the size of a resizable window to the original aspect ratio of the window in Pyglet
Although this looks a little hackish for me, but at the moment I don't think of any other possibilities to solve you problem. Anyway, this is working: import pyglet window = pyglet.window.Window( resizable=True ) @window.event def on_resize( width, height ): ratio = 9/16 window.set_size( width, width*ratio ) @window.event def on_draw(): window.clear() pyglet.app.run()

Categories : Python

How I can see the width & height of my window on the "body" when I am modifying the size of the window with jquery?
Like that? DEMO http://jsfiddle.net/yeyene/5ANZz/1/ $('#width').val($(window).width()); $('#height').val($(window).height()); $(window).resize(function(){ $('#width').val($(window).width()); $('#height').val($(window).height()); });

Categories : Jquery

How to change position of window controls relative to the window size
Not necessarily the best way, but what I'd probably do is handle WM_SIZE and/or WM_SIZING and then in there use : m_Button.SetWindowPos(x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER); where x and y are the new co-ordinates of the top-left of where you want your button.

Categories : Visual Studio 2010

change picturebox size , spacing between buttons when user changes window size
You can use Anchor of your controls.Using anchor you can anchor it top ,bottom left right take a look at this Or you can also use Table Layout Panel

Categories : C#

How does Mailchimp manages to move box below antoher one when window size changes size (css3/media queries)
Its using media queries Check the following links to get more information and get started about it http://mediaqueri.es/ http://css-tricks.com/css-media-queries/

Categories : CSS

Changing website layout based on screen size and browser window size in Rails
You need to use CSS to do this, it has nothing to do with Rails. See http://www.1stwebdesigner.com/css/responsive-website-tutorial/

Categories : CSS

Xlib: How to ask window manager for maximized window size?
_NET_WORKAREA property of the root window is probably closest match. However on a multi-headed system it will give you the combined work area on all monitors. If that's what you want, fine (but see here on making a window span multiple monitors). If you want to maximize over a single monitor, then there's a problem as there's no per-monitor API like _NET_WORKAREA. Your best bet is creating a window in a maximized state and then querying its size. If that's not an option, I'm afraid you will have to query the number and sizes of available monitors, and then go and calculate the work area of each monitor by subtracting "struts" from the full area (see here about _NET_WM_STRUT and _NET_WM_STRUT_PARTIAL).

Categories : Misc

CSS popup layer size relative to window size
if you need that your modal (pop-up) have width and height in % this is the simple way. [http://jsfiddle.net/achr3f/98MBD/][1] of course with JS you can make the height (or width) depend of the window resolution, by changing Css attributes after page load or after resize

Categories : HTML

Different ways to show an image according to its size and window size
One way to do this is with simple CSS. Check this out: http://jsfiddle.net/panchroma/XBuGc/ I removed all your javascript and added some CSS .img-header{ width:100%; height:auto; min-width:450px; /* adjust as necessary */ } Hope this helps!

Categories : Jquery

How to re-size canvas and draw image on canvas as perspective window size
@Ken - AbdiasSoftware : On canvas if i draw one image. Like var c = $('#respondCanvas'); var ct = c.get(0).getContext('2d'); var imageObj = new Image(); imageObj.onload = function() { ct.drawImage(imageObj, 0, 0); }; imageObj.src = 'img/ballon.jpg'; Now re-size the canvas as per window resize, that time image is not re-sized and also removed from canvas. Please tell me, why image is not resized and why it is removed from canvas ?? If I refresh browser than image is visible on canvas but image scale is still same.

Categories : HTML

Equalize height on two floating divs when window size is greater than specified width, then return to original height when window width is below
Working jsFiddle Demo Just remove height from elements: function originalHeight(group) { group.css('height', ''); }

Categories : Jquery

Get window hwnd if owner hwnd, class name and size of the window are known
You can try using this code. It will give you an IntPtr (the window handle) of each top-level window with a particular class name: /// <summary> /// Returns a sequence of window handles (IntPtrs) for all top-level windows /// matching the specfied window class name. /// </summary> /// <param name="className">The windows class name to match (not to be confused with a C# class name!)</param> /// <returns>A non-null sequence of window handles. This will be an empty sequence if no windows match the class name.</returns> public static IEnumerable<IntPtr> WindowsMatchingClassName(string className) { if (string.IsNullOrWhiteSpace(className)) { throw new ArgumentOutOfRangeException("className", className, "className can't be null or blank

Categories : C#

How to set a Window size to 0?
Since you have no borders, just Hide and Show the window instead of setting it's Height to zero or a positive value.

Categories : C#

Re-size div according to window size
try with media query of css3 #grid1 { height: 300px; width: 930px; } @media all and (max-width: 699px) and (min-width: 520px) { #grid1 { height: 150px; width: 465px; } } set height & width values as your requirement.

Categories : Jquery

window size jquery bug
Basically you don't want to manually add a height component to the div if the content is going to be too large for the container. Here's what I think would work: $(window).bind("load", function() { var windowHeight = $(window).height();

Categories : Javascript

Div to fit browser window size
You can do it simply by setting height: 100% But remember also about setting html, body to 100% and all parents of your div. For example if you have: <body> <div id="wrapper"> <div id="height100"></div> </div> <div id="content"></div> Your css should look like this: html, body, #wrapper, #height100 { height: 100%; }

Categories : Jquery

how to center align a box to the window size?
As this needs to be responsive, It can be only achieved using Javascript. var cen = document.getElementsByClassName('cen')[0]; var imp = document.getElementsByClassName('imp')[0]; cen.style.marginTop = ((imp.offsetHeight / 2) - (cen.offsetHeight / 2)) + "px"; Call the above function in both resize and load events. Working Fiddle Also, check Calc CSS3 property. will be helpful if you are aware of the height of the child element.

Categories : HTML

Resizing Headings when Window Size Changes
You can do it with css @media operator: h1 { font-size: 30px; } @media screen and (max-device-width : 400px) { h1 { font-size:20px; } } @media screen and (min-device-width : 600px) { h1, div, etc { /* any css rules */ } } Also check useful resources: auto resize text (font size) when resizing window? http://alistapart.com/article/responsive-web-design http://www.w3.org/TR/css3-mediaqueries/

Categories : HTML

Background image and window size
The background image is set up correctly. The problem is that when you down size the width of the page below the width of your content, some weird behavior occur. Add min-width: 960px; style to your .page element to prevent this problem.

Categories : CSS

DIV enlarge to window size on click
If I understand correctly, you already have the means to enlarge the DIV so it covers your document, and now you want it to go fullscreen. If that is the case check the html5 full screen API. Please note this is currently a working draft so you need to check compatibility of the browser and use the prefixes accordingly. As long as we are talking about fullscreen, then you are in good luck, because there is already a JQuery plugin for that: http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugin/ [Demo] Using the plugin this is the relevant code: window.fullScreenApi.requestFullScreen(fsElement);

Categories : Jquery

tkinter root window isn't quite the right size
When you instantiate a root widget with Tk(), Tkinter starts a process in a separate thread to actually create the window - it doesn't happen in the main loop. The reason you get a 1 for the size initially is that the root window doesn't exist yet when you call self.print_size the first time, so it gives you a default value of 1. The next time you call it a second later, the window has finished spawning, so it gives the the actual size. It's essentially a race condition - the main event loop gets to the print self.root.winfo_width() before self.root is done being created. If you'd like to change this behavior, add this line right after self.root = Tk(): self.root.wait_visibility(self.root) That command forces the main event loop to pause until the given widget (in this case the root

Categories : Python

How to have window size itself to longest string
To get the Button controls to be the same length, you could add a Grid with the Grid.IsSharedSizeScope property set to true into your DataTemplate. Define one column with the SharedSizeGroup property set: <DataTemplate x:Key="DomainTemplate" DataType="DomainViewModel"> <Grid Grid.IsSharedSizeScope="True"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" SharedSizeGroup="Button" /> </Grid.ColumnDefinitions> <Border BorderBrush="{Binding Converter={StaticResource BrushConverter}, Path=IsSelected}" BorderThickness="2" Margin="5" Name="SelectedBorder"> <Button Click="SelectDomain_Click" Content="{Binding Path=Name}" FontSize="16" FontWeight="Bold" Height="60" IsEnabled="{Binding CurrentSiteIsVa

Categories : Wpf

Python: Easygui Window Size
Before install open easygui.py and edit element you want to have another size. (You can also reinstall and override it) This will be line like boxRoot.minsize(root_width, root_height) in the corresponfing function. To be more flexible add width and height as parameters to the function. def __choicebox(msg , title , choices , width_ = 480 , height_ = 320 ): .... root_width = width_ root_height = height_ root_xpos = int((screen_width * 0.1)) root_ypos = int((screen_height * 0.05)) boxRoot.title(title) boxRoot.iconname('Dialog') rootWindowPosition = "+0+0" boxRoot.geometry(rootWindowPosition) boxRoot.expand=NO boxRoot.minsize(root_width, root_height)

Categories : Python

Vim, split window have only 1-line-size
jump into the window you want to resize (ctrl-w ctrl-w OR ctrl-w direction-arrow), then hit ctrl-w followed by [number followed by] + (or - if you want to decrease the size) the number is optional and indicates how many "units" you want to enlarge the window by, defaults to 1 if not specified

Categories : Vim



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.