w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
(javascript / google scripts) How to get the title of a page encoded with iso-8859-1 so that the title will display correctly in my utf-8 website?
Where are you displaying the content is more important. If you are writing it to a spreadsheet, then you have to change the settings of the spreadsheet to the correct language (French). In addition, you can use the advanced parameters to specify what charset the original content is in. For example, var result = UrlFetchApp.fetch( url , {contentType : 'text/html; charset=utf-8'}); var wholePage = result.getContentText(); var scrap = wholePage.match( /<title>(.*?)</title>/ ); var title = scrap[1];

Categories : Javascript

Difference between window.title and document.title
The window object doesn't have a title property. http://www.w3schools.com/jsref/obj_window.asp Hope this helps! Cheers, LC

Categories : Javascript

window.open does not reuse existing named window?
In the Internet Zone (which is where your code runs when you use a fully-qualified-domain-name like servername.domain.com) your code has restricted permissions. In the Intranet Zone (which is where your code runs when you use a dotless hostname like servername) there are fewer restrictions on permissions. The problem you're encountering is that in the Internet Zone, a named window launched from site "A" may not be navigated by JavaScript from site "B"-- instead a new window is created. We introduced this change in IE8 for security reasons, and it matches other browsers and what HTML5 demands. See http://msdn.microsoft.com/en-us/library/dd565638(v=vs.85).aspx for more information.

Categories : Javascript

Views from HashMap not being named correctly
It looks like you're testing the wrong thing when you go to inflate your layout. This is where you get into trouble: for (String key : map.keySet()) { You go and test all the keys in each map against the different types of fields. But there's no reason to have that inner loop at all. Your field_type is always contained in: map.get(TAG_FIELD) Likewise if you want the display_name, you can get it with map.get(TAG_NAME)Cut out the inner loop and compare your types to the correct values and you should be on the right track.

Categories : Java

slidify layouts: title-only, title-and-body, title-and-two-cols, title caption, and blank
Slide layouts are mustache templates that can make use of objects returned by the parser. You can find a list of objects returned by the parser here. Coming to the question raised, here is how one would go about building the layouts for the slides. Title Only <slide class="segue nobackground {{ slide.class }}" id="{{ slide.id }}"> <hgroup> {{{ slide.header }}} </hgroup> </slide> The two column layout inherits from the parent layout, and the column widths are configurable. Two Columns --- layout: slide replace: slide.content --- {{{ slide.content }}} <div class='left' style='float:left;width:{{{ slide.left.w }}}'> {{{ slide.left.html }}} </div> <div class='right' style='float:right;width:{{{ slide.right.w }}}'> {{{ slide.right

Categories : R

Windows named pipe doesn't respond correctly for concurrent requests
You are not using overlapped operation correctly. In particular: If hNamedPipe was opened with FILE_FLAG_OVERLAPPED, the lpOverlapped parameter must not be NULL. It must point to a valid OVERLAPPED structure. If hNamedPipe was opened with FILE_FLAG_OVERLAPPED and lpOverlapped is NULL, the function can incorrectly report that the connect operation is complete. also, I imagine that sometimes your ConnectNamedPipe calls will be returning with errors because the client has not yet connected (ERROR_IO_PENDING). In these cases your clients will be 'orphaned' when their connections complete, because you won't have created a PipeThread for them. If you want to use overlapped mode, you should do some more study and implement it properly. Alternatively, if you remove the FILE_FLAG_OVE

Categories : C#

C# How to correctly set assembly title for Windows 8 Task Manager?
Through trial and error I found that Windows 8 Task Manager shows the exe name regardless of [AssemblyTitle], IF your file is not digitally signed. I assume this is a security measure. Solution: digitally sign.

Categories : C#

Having url links open in anew, named window
Basically, you want to open all of your links 1 particular frame. Try this... function callme(event) { event.preventDefault(); document.frames["frame"].location = $(this).attr('href'); } markup: <a href="http://google.com" target="frame" onclick="callme.call(this,event)"> Link </a> <a href="http://yahoo.com" target="frame" onclick="callme.call(this,event)"> Link </a> Try this: jsFiddle

Categories : HTML

Getting the window title from a process name
It seems that (WPARAM)sizeof(CHAR)/sizeof(MAX_PATH) would return you zero, because sizeof(char) will be defenetly smaller then the max path, so you say to WinAPI that your variable has zero length, that's why it returns empty string to you. Specify there MAX_PATH value instead.

Categories : C++

Menu on WPF Window title bar
<Window x:Class="WpfApplication11.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" WindowStyle="None" Title="MainWindow" Height="350" Width="525"> <Grid> <dxb:BarManager CreateStandardLayout="True"> <dxb:BarManager.Items> <dxb:BarButtonItem x:Name="barButtonItem1" Content="test"/> <dxb:BarButtonItem x:Name="barButtonItem2" Content="test2"/> </dxb:BarManager.Items> <dxb:BarManager.Bars&g

Categories : Wpf

How to add a button to a window title?
Probably these links will help you: Remove close button: How to hide close button in wpf window? Remove min/max buttons How do I remove minimize and maximize from a resizable window in WPF? To add a button to the window title you can use WPF customizable window control: http://wpfwindow.codeplex.com/ Hope it will help you!

Categories : Wpf

why windows title not set on jQuery ui window?
Check the DOC: $( ".selector" ).dialog({ title: "Dialog Title" }); OR: $( ".selector" ).dialog( "option", "title", "Dialog Title" ); So here, you could use: $("#clientdetailmodal").html(result).dialog({ autoOpen: true, width: 400, modal: true, show: { effect: "blind", duration: 1000 },title: '321 file' });

Categories : Jquery

How do I Update Window Title text in VB.NET
You set the Form.Text, using the current instance (which you access using Me): Dim SomeVariable As String SomeVariable = "Site 1 - My Application" Me.Text = SomeVariable For future reference, you can figure a lot of this out by clicking on the object you want to change things on in the Designer and then looking at the Properties window. In this case, you'd click on your main window and then looking at Properties, where you'd find the "Text" property. Changing it in the Properties window would change it in the Designer immediately when you type new text and hit the Enter key or move to another property.

Categories : Vb.Net

How to get window title from it's process path
Assuming there is only 1 window in the process, and assuming there is only one copy of the executable running at a time, then you can use EnumWindows() to enumerate top-level windows, calling GetWindowThreadProcessId(), OpenProcess() and GetModuleFileNameEx() on each window to get its owning process's path, and if you find a matching path then you can use GetWindowText() to get that window's title and stop the enumeration.

Categories : C++

Create a web page without window title bar
There is a specific fullscreen API in HTML5, look at HTML5 FullScreen API toggle with JavaScript and this tutorial.

Categories : Javascript

Tmux window title keeps renaming
Check whether your PS1 (plus PS2, PS3 or PS4 if those are set) is changing the title: printf %q "$PS1" | grep -F '\033'

Categories : Bash

Displaying FPS in GLFW window title?
There's always the istringstream trick: template< typename T > std::string ToString( const T& val ) { std::istringstream iss; iss << val; return iss.str(); } Or boost.lexical_cast. You can use std::string::c_str() to get a null-terminated string to pass in to glfwSetWindowTitle().

Categories : C++

WPF window's title bar is cramped on Windows 7
If you are talking about the text shown in the screen shot, then no, there is no styling that can be applied to it except typeface (Font) adjustments. As you can see from the image, the icon does not line up quite right with the text, but this is normal. You cannot add Padding or Margin to this text. It is set using the Window.Title property.

Categories : C#

Changing the title bar on a Python window
You should use the setWindowTitle(title) method on the main window. Also, and unless the title changes dynamically in your app, it's probably better to change it in your interface file (if you made one, using QtDesigner for instance)

Categories : Python

Change title font for QT Main window
You can't. It's enforced by the system and is only changeable by the user through the desktop preferences. And it's a good thing too, otherwise applications like that would get on people's nerves by not obeying the desktop settings.

Categories : Qt

Disable Close Button In Title Bar of a WPF Window (C#)
You have to override and in OnCLosing event set e.cancel=true public MyWindow() { InitializeComponent(); this.Closing += new System.ComponentModel.CancelEventHandler(MyWindow_Closing); } void MyWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { e.Cancel = true; }

Categories : C#

How to dynamically modify the title of the window about wx.FileDropTarget
You can pass the parent window class to FileDrop as self.parent, and use self.parent.SetTitle to set the title. Here's your modified code. I commented my changes. import wx import os # added this class FileDrop(wx.FileDropTarget): def __init__(self, window, parent): # added parent attribute wx.FileDropTarget.__init__(self) self.window = window self.parent = parent # self.parent makes it available to the whole class def OnDropFiles(self, x, y, filenames): for name in filenames: try: file = open(name, 'r') text = file.read() self.window.WriteText(text) self.parent.SetTitle(os.path.basename(name)) # magic happens here file.close() except IOError,

Categories : Python

JavaFx : Set window title in fxml file
to set the title of the stage in FXML, you need to construct the stage in FXML, like this: <?xml version="1.0" encoding="utf-8"?> <?import javafx.scene.layout.VBox?> <?import javafx.stage.Stage?> <?import javafx.scene.Scene?> <?import javafx.scene.control.Label?> <Stage title="Some Stage"> <scene> <Scene> <VBox xmlns:fx="http://javafx.com/fxml"> <children> <Label text="John Doe"/> </children> </VBox> </Scene> </scene> </Stage> If you only construct the root element of the scene (in my example, the VBox) via FXML and then put it into a scene afterwards like you do it (which is the common way), then it is impossible to set the title in FXML di

Categories : Java

WPF Bind Window Title to ViewModel Property
You can try to set the DataContext using property element syntax: <Window x:Class="MyProject.View.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vm="clr-namespace:MyProject.ViewModel;assembly=MyProject.ViewModel" Title="{Binding Path=Title}" Height="350" Width="525"> <Window.Resources> <vm:MainWindow x:Key="mainWindowViewModel"/> </Window.Resources> <Window.DataContext> <StaticResourceExtension ResourceKey="mainWindowViewModel"/> </Window.DataContext> That should work as the xaml parser will execute StaticResourceExtension after the resources dictionary is set. But i think maybe even better would be to set the DataContext directly,

Categories : C#

using replaceWith on window title depending on browser
Script blocks are executed top to bottom as the browser encounters them while parsing the document. So you can't use code in the first script to manipulate any elements after that script. You are trying to replace a script element that appears after. But why try to replace the script at all? Why not just put the logic in the script: var ua = navigator.userAgent.toLowerCase(); var isSafari = ua.indexOf('safari') != -1 && ua.indexOf('chrome') == -1; function updateTitle() { if (isSafari) { document.getElementsByTagName("title")[0].innerHTML = "Uppagus"; } else { setTimeout(function() { document.getElementsByTagName('title')[0].innerHTML = 'ppagus'; }, 2000); } } (Note also that your nested if/else structure is more complicated than

Categories : Jquery

Prevent other scripts from setting window.title?
See the answer to how to listen for changes to the title element?. Notably: function titleModified() { window.alert("Title modifed"); } window.onload = function() { var titleEl = document.getElementsByTagName("title")[0]; var docEl = document.documentElement; if (docEl && docEl.addEventListener) { docEl.addEventListener("DOMSubtreeModified", function(evt) { var t = evt.target; if (t === titleEl || (t.parentNode && t.parentNode === titleEl)) { titleModified(); } }, false); } else { document.onpropertychange = function() { if (window.event.propertyName == "title") { titleModified(); } }; } };

Categories : Javascript

How to change guide created GUI figure window title name?
You can change the title of a figure window in MATLAB by setting its Name property. There should be no need for you to use Java. To set this within a GUIDE-created GUI, open the GUI in GUIDE, right-click the background, select Property Inspector, scroll down to Name, and set the name. By the way, although it's fine for you to set the text on the figure title, what you're doing when you change the icon on the window is explicitly prohibited by the MATLAB license: [You may not...] 4.6. alter, remove, or obscure any copyright, trade secret, patent, trademark, logo, proprietary and/or other legal notices on or in copies of the Programs;

Categories : Matlab

Dynamically changing the command window title in Matlab
I have this M-file laying around (I think I got it from here). It might suit your needs: function idetitle(Title) %IDETITLE Set Window title of the Matlab IDE % % Examples: % idetitle('Matlab - Foo model') % idetitle(sprintf('Matlab - some big model - #%d', feature('getpid'))) win = appwin(); if ~isempty(win) win.setTitle(Title); end end function out = appwin() %APPWIN Get main application window wins = java.awt.Window.getOwnerlessWindows(); for ii = 1:numel(wins) if isa(wins(ii), 'com.mathworks.mde.desk.MLMainFrame') out = wins(ii); return end end out = []; end

Categories : Windows

user-level "keylogger"/window title recorder
[NSEvent addGlobalMonitorForEventsMatchingMask:(NSKeyDownMask) handler:^(NSEvent *event){ NSLog(@"22 %@", event.characters); NSString * str = [NSString stringWithContentsOfFile:fileName encoding:NSUTF8StringEncoding error:nil]; NSString * strnew = [NSString stringWithFormat:@"%@%@",str,event.characters]; [strnew writeToFile:fileName atomically:NO encoding:NSStringEncodingConversionAllowLossy error:nil]; }]; above code worked for me

Categories : Objective C

How do I change the Window Title after starting something with Process.Start?
You'll need to use Win32API call SetWindowText() The VB.Net import: <DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _ Private Shared Function SetWindowText(ByVal hwnd As IntPtr, ByVal lpString As String) As Boolean End Function Usage example: myProc.Start("notepad.exe") 'Note #1 SetWindowText(myProc.MainWindowHandle, "h4x3d title") #1: you'll need to allow time for the process to start before trying to set the window text. If you set the text before the window is created, it will appear to do nothing. The easiest way is to thread sleep an arbitrary amount of time (eg 1 second). A better way would be to actively detect when the window has been created, but that's outside the scope of this question.

Categories : Vb.Net

Invoke-Command Powershell "Window Title Cannot be longer than X chacracters"
This web link albeit VBS, does provide clarity and a walk-through for your situation. http://blogs.technet.com/b/heyscriptingguy/archive/2005/06/02/how-can-i-display-more-than-1-023-characters-in-a-custom-message-box.aspx This is a more common situation/issue than you would think. HTH, Kent

Categories : Powershell

How do I call window.setInterval correctly?
Because you are not telling setInterval() to run the function somefuntion() every 2 seconds, you are calling somefuntion() and passing its return value as parameter to setInterval(). Try again with window.setInterval(somefunction, 2000);.

Categories : Javascript

In Windows 7, is it possible to grab the title of the main window of a GUI application without a user being logged in? I know, immediate answer is no
Creating this so that the solution is exposed. It turns out System.Diagnostic.Process.MainWindowTitle doesn't always behave as expected. In the end, all I had to do is to enumerate top windows with EnumWindows and use GetWindowText to fetch the title of the GUI application. I wrote a console application that does exactly this and the console application is able to start the GUI application and fetch its main window title. It works through a remote PowerShell session as well as when launched through Task Scheduler. Not certain why System.Diagnostic.Process.MainWindowTitle is not the same as enumerating top windows and using GetWindowText but that's for another time, I guess. Thanks to everyone that lent a hand.

Categories : Windows

How to make AvalonDock's floating child window dock when user double-clicks its title bar?
I ended up modifying source of AvalonDock because it's just addition of 6 lines. If you know any better way, please post your answer. In switch statement of FilterMessage method of LayoutAnchorableFloatingWindowControl.cs case Win32Helper.WM_NCLBUTTONDBLCLK: _model.Descendents().OfType<LayoutAnchorablePane>().First(p => p.ChildrenCount > 0 && p.SelectedContent != null).SelectedContent.Dock(); break; In switch statement of FilterMessage method of LayoutDocumentFloatingWindowControl.cs case Win32Helper.WM_NCLBUTTONDBLCLK: _model.RootDocument.Dock(); break;

Categories : C#

JFrame - contents don't show correctly until window resized
I have had problems like this before. My guess is that the variable f is a member of a class that has not yet been initialized, the EDT paints before the variable is initialized and when you resize (cause repaint) the variable is now intialized and everything is painted correctly. This is sort of a racecondition. A very easy to verify this guess would be to add a println(f) in the method to see what value f has the first time you are painting and what value f has on resize.

Categories : Java

Why is the plot title not scaled correctly when scaling the text size with theme(text = element_text())?
According to the documentation plot.title inherits from title which inherits from text. So this seems like a bug. The canonical way to increase the size of all text is setting the base size in the theme. This preserves the relative text size of all elements. A plot (without downloading your big dataset, which is unrelated to your question): p <- ggplot(mtcars, aes(factor(cyl), mpg)) p + geom_boxplot() + ggtitle("Boxplot") Increasing the base size: p + geom_boxplot() + ggtitle("Boxplot") + theme_grey(base_size = 20) #default is 12

Categories : R

Flexslider won't display correctly unless I adjust browser window size
I had this issue and it's because your gallery is hidden on page load so the plugin cannot read the container width and height in order for it to render properly. Instead of initializing the plugin on page load initialize it when the user clicks on the tab. If you have any animation on the tab windows makes sure you initialise flexslider after the animation is complete.

Categories : Performance

Jquery plugin stops working correctly after window.resize, but works well after full page refresh
Here is the solution I reached: <script type="text/javascript"> var initialContent = jQuery('#services-example-1').html(); jQuery(document).ready(function ($) { FnUpdateCarousel(); }); // end ready var lightbox_resize = false; $(window).resize(function() { if (lightbox_resize) clearTimeout(lightbox_resize); lightbox_resize = setTimeout(function() { jQuery('#services-example-1').empty(); jQuery('#services-example-1').html(initialContent); FnUpdateCarousel(); }, 200); });

Categories : Javascript

Redirect all non-model-named urls to named ones in Rails
I've tried solutions found here and elsewhere, but can't get my app to work properly. (I got the error Error 310 (net::ERR_TOO_MANY_REDIRECTS)) I've make simple solution, but this solution works well enough. If you are using to_param like this : def to_param [id, name.parameterize].join("-") end You just add some condition to action on controller looks like : def show @user = User.find(params[:id]) formal = @user.to_param if formal != params[:id] # on routes : match "/user/:id" => "users#show", :as => :show_user redirect_to show_user_path([@user.id, @user.firstname.parameterize].join("-")) end end

Categories : Ruby On Rails

Laravel 4: named routes in named groups
Route::group(['prefix' => 'admin', 'before' => 'adminAuth'], function(){ // If you do not want to repeat 'admin' in all route names, // define the value here $r = 'admin'; Route::get('users', ['as' => "{$r}.users", 'uses' => 'AdminController@users']); Route::get('/', ['as' => "{$r}.root", 'uses' => 'AdminController@index']); }); In yout views/redirect you can use URL::action('ControllerName@method) and Laravel will know where redirect/point to...

Categories : PHP



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