w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to execute a command inside a screen session
In the bash shell you can use ctrl-V to explicitly put non-printable characters into a string. So try ctrl-V ctrl-L ctrl-V ctrl-M at the end of your command just before the ".

Categories : Linux

Keep GNU self-defined screen window name from auto update
I was just about to ask the same question. Thank god for SO's similar questions that pop up while you're posting a question. I'm on Centos7 and a similar thing was happening to me. Though, my system was not setting the window name to the previously invoked application name -> it was setting it to user@hostname. I noticed that the offending variable was PROMPT_COMMAND which was set in /etc/bashrc. Thus, my solution was to unset that variable in /etc/bashrc (specifically inside an if statement that pertains to screen sessions).

Categories : Linux

Using Auto Layouts while 4 screen app running in 3.5 screen
You need to use a spacer view between each button. That way you can use a variable size of the space that depends on the height of the screen. Something like this... @"V:|[_spacer1][_button1][_spacer2(==_spacer1)][_button2][_spacer3(==spacer1)][_button3]...[_lastSpacer(==spacer1)]|" This will then layout all the buttons with equal spaces between them. But the space between will change depending on the height of the screen.

Categories : Iphone

print the data on window screen and then clear the window screen before printing other data.in python
In that case, all you have to do is remove the previous content of the widget just before printing the new one. If you have an Entry widget, use the delete method: entry.delete(0, 'end') # print new serial data Or if you have a Text widget: text.delete(1.0, 'end') # print new serial data

Categories : Python

Creating a Fake Computer Screen Within a Screen in Website
I'd just use an iFrame to show the actual content, and then take the illustration and put it around it on the parent page. You could build "navigation" (back button? and working Page Titles?) into the illustration too, that would be pretty simple and pretty cool. You'll probably want some JS involved to handle resizing of content (in the iframe) and the illustration will probably need to be split up a bit so parts can be resized properly?

Categories : Jquery

how to position Views on an Android screen relative to the screen edges using offsets in terms of pixel position on the screen coordinates?
You can put a margin to your element to move it away from the edge. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" <!-- move it to the top left corner --> android:layout_alignParentLeft="true" <!-- move it to the top left corner --> android:layout_marginTop="10dp" <!-- move it 10dp down --> android:layout_marginLeft="10dp" <!-- move it 10dp right --> android:text="@string/hello_world" /> </RelativeLayout>

Categories : Android

How to get Windowed Window's Screen coordinate of each Corner in X-window?
You're storing your window into GLWin.win, but are querying the root window for its size and location. The "root window" is the full screen background window (desktop), so it makes sense that it's returning your screen resolution. Just pass your actual window (GLWin.win) to XGetAttributes() if you want those dimensions.

Categories : C++

screen auto fit in android
AbsoluteLayout is deprecated and usage is highly discouraged. You should instead use a RelativeLayout or another valid layout. Absolute layout does not make provisions for difference screen sizes and densities, and therefor doesn't automatically adjust to different devices very well. You can also look at layout weights if you wish to have child views of a linear layout take up certain weights or proportions on all screen sizes: layout_weight and weightSum

Categories : Android

Screen resolution. Full screen - perfect. Normal screen - not perfect
Can't see the rest of the code but if you want the background to be centered don't you want it to set it up as: body{ background-position: center; } The way it is now, the background is properly centered for only one resolution, because it is aligned to the left.

Categories : CSS

Killing a screen without a specific session #
I also start screens with the -dmS option, and I send commands to the screen using the stuff command: $ screen -dmS screenname $ screen -ls There is a screen on: 22941.screenname (Detached) 1 Socket in /var/run/screen/S-user. $ screen -S screenname -p 0 -X stuff "exit$(printf \r)" $ screen -ls No Sockets found in /var/run/screen/S-user. $ more details on "stuff" are in the screen man page, search for 'stuff string'

Categories : Linux

Margin: auto still collapses on right when screen size shrinks
I think this will do based on the code you have right now: .am-body { background: url("../img/body-bg.png") repeat-x left top #ededed;/*is being overwritten*/ text-align: center; position: relative; margin: 0 auto; }

Categories : CSS

Set auto height and width in CSS/HTML for different screen sizes
///UPDATED DEMO 2 WATCH SOLUTION//// I hope that is the solution you're looking for! DEMO1 DEMO2 With that solution the only scrollbar in the page is on your contents section in the middle! In that section build your structure with a sidebar or whatever you want! You can do that with that code here: <div class="navTop"> <h1>Title</h1> <nav>Dynamic menu</nav> </div> <div class="container"> <section>THE CONTENTS GOES HERE</section> </div> <footer class="bottomFooter"> Footer </footer> With that css: .navTop{ width:100%; border:1px solid black; float:left; } .container{ width:100%; float:left; overflow:scroll; } .bottomFooter{ float:left; border:1px solid black; width:100%; } And a bit of jquery: $

Categories : HTML

Div Fade-In when on screen (currently auto fading!?) - parallax site
To check the bottom of the window, instead of using .scrollTop, try window.pageYOffset. Plus I think you're making the JS work too hard - I would try to calculate the bottom_of_object outside the .scroll() function so that it's not calculating the position every time the user is scrolling. And for simple fade in/out, I would just do a display:none, .fadeIn().

Categories : CSS

jQuery - Execute scripts based on screen size
You can use $(window).width() if($(window).width() >= 1024){ // do your stuff } Demo ---> http://jsfiddle.net/fh2eC/1/

Categories : Jquery

Execute code if not a touch screen and also width is 960px or over
You're missing a closing parenthesis here: // here------↓ if( (!Modernizr.touch) && (jQuery(window).width() > 959) ) { }

Categories : Jquery

Controlling someone else's window screen
Ok, this is possible... sort of, with a little creativity. In example, if the client side is using websockets or polling, it can constantly be checking for it's state. When you as the admin want the client pushed somewhere else, you push that information to the client (through websockets or polling) and then javascript will fire based on that action. In example you can send the browser to a different URL based on the result of the poll. The following code checks for a location URL every 200ms from the server $(function() { var timer = setTimeout(function() { $.get("/poll.php", function(data) { if (data.url !== "") { window.location.href = data.url; } }, "json"); }, 200); }); If you are willing to leave behind some older

Categories : PHP

How to set the gtk+ window to the center of screen?
To tell your application to position in the center, the following should work. I am however not familiar with the function you mention, and perhaps it is as good as this way of doing it. You can use the gtk_window_move() to move your window, the coordinates is by default calculated by default from the upper left corner, it is however possible to change this with: void gtk_window_set_gravity (GtkWindow *window, GdkGravity gravity); The available enums is as follows: GDK_GRAVITY_NORTH_WEST, GDK_GRAVITY_NORTH, GDK_GRAVITY_NORTH_EAST, GDK_GRAVITY_WEST,GDK_GRAVITY_CENTER, GDK_GRAVITY_EAST, GDK_GRAVITY_SOUTH_WEST, GDK_GRAVITY_SOUTH, GDK_GRAVITY_SOUTH_EAST, and GDK_GRAVITY_STATIC. And then use void gtk_window_move (GtkWindow *window, gin

Categories : C

how to make popup in center of screen and overlay/background to full screen high
Place the Popup Window inside the overlay-div! <body id="page1" style="height: 100%;"> <form id="form2" runat="server" style="min-height: 100%;"> <div id="content"> .. content ... </div> </div> <div class="darkenBg" id="popupBackground" style="display:none;"> <div class="greenBox2 popUpWin" id="companySigninPopup" style="display:none;"> <div class="topWrap"> popup window </div> <div class="botWrap"> <div class="corner-bottom-left">&nbsp;</div> <div class="border-bottom">&nbsp;</div> <div class="corner-bottom-right">&nbsp;</div> </div> </div> </div> </fo

Categories : Javascript

How to create videoview like youtube "small screen and full screen play in android "
You have to override setAnchorView in your new java class which extend the Android's MediaController (android.widget.MediaController) and add an extra view/button to the controller. And do something like this @Override public void setAnchorView(View view) { super.setAnchorView(view); Button fullScreen = new Button(context); fullScreen.setText("FullScreen"); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); params.gravity = Gravity.RIGHT|Gravity.TOP; addView(fullScreen, params); } now add clicklister to view

Categories : Android

native calling screen animation stops when dialog activity display on screen
I implemented a solution that works well for me (and does not stop animation), here it is: https://github.com/inez/CustomIncomingCallScreen

Categories : Android

Is there a way to build a web page that uses different fonts on a phone screen and a desktop screen without writing any JavaScript?
Sure, you can do it in CSS, using @media rules to set different fonts based on the screen size. Here's a good source of information: http://css-tricks.com/snippets/css/media-queries-for-standard-devices. I'd set the desktop font first, then override it with @media queries with your phone font.

Categories : Javascript

Splash screen displays white screen and then black before it sets the menu page
Is your Code for doing background things running in another thread or is it part of the UI Thread? Because your animation wont be shown until your onCreate method finishes, so that could be. Also you could use startAnimation(animation) on the imageviews so they start in that moment.

Categories : Android

How to open another screen insted of Main Screen when push notification received
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if (launchOptions != nil) { // Launched from push notification NSDictionary *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; //Redirect it to your page here } } - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { if ( application.applicationState == UIApplicationStateInactive || application.applicationState == UIApplicationStateBackground ) { //opened from a push notification when the app was on background //Redirect it to your page here } }

Categories : Iphone

Everything moves in website when changed from full screen mode on desktop screen
Something to this effect? The biggest issue was that you didn't have a minimum width for your menu, so it would keep shrinking until it stacked on itself. #navigation { float:left; width:60%; height:24px; min-width:1000px; text-align:center; padding:10px 20px; }

Categories : HTML

Jquery .animate, make a div enter from off screen, float accross, exit off the screen, & repeat
By adding a function to the animate parameters, that function will be called once the animation is completed. Inside that function, you can reset the position of the cloud. After you reset the position, you can use a timeout to restart the animation like you've already done. $("#cloudone").animate({left:"600px"},5000,function(){$("#cloudone").css({"left":"0px"});});

Categories : Jquery

How to stop Ipad screen orientation while loading splash screen?- In Flex Mobile Application
This might be possible, when you remove splashScreenImage attribute and Provide Launch Images for Different Orientations, like: Default-Landscape.png Default-Portrait.png Default-Landscape@2x.png Default-Portrait@2x.png

Categories : Actionscript

I have a background set to the bottom of the screen, but when I go to full screen there is an empty white space beneath. Why is this happening?
First, fix the errors in your HTML. They look terrible. Then, you calculate the height as screen.availHeight. That's a mistake, availHeight is the height of the desktop. Excluding things like taskbars and whatever you may have on your computer. What you need is screen.height.

Categories : HTML

aligning linear layout half the size of screen in exact center of screen horizontally
Your OuterlinLayout LinearLayout should have android:orientation="horizontal" instead of vertical and all its children should have android:layout_width="0dp"

Categories : Android

Check if a screen session is running and automating via cron
With if screen -list | grep -q "minecraft"; you're only checking if the screen is running, not the server. Instead you can use something like ps -ef | grep -i bukkit | grep -v grep; echo $? If return is 0 the (bukkit) server is running if return is 1 the server is not running. To remove the after $NOW use echo -ne ''$NOW' Server was down.... Started ! ' >> /home/minecraft/servercheck.txt;

Categories : Linux

Called bashscript doesn't start up GNU screen session
I'm sure by now you've solved this problem, but looking through your question I'd bet the answer is remarkably simple -- mcpc-plus-legacy-1.4.7-R1.1.jar isn't found by java, which fails, and subsequently screen terminates. In launch.sh, screen will execute in the same directory as the calling script. In this case, your python script, when run by cron, will have an active directory of the running user's home directory (so root crontabs will run in /root/, for instance, and a user crontab in /home/username/). Simple solution is just to the following: cd /home/minecraft/bspack2 as the second line in your launch.sh script, just after #!/bash/sh. In the future, I'd recommend when interacting with screen to leverage the -L parameter. This turns on autologging. By default, in the current di

Categories : Python

Is there a way for Vim to use words in all open files in a Screen session for autocompletion?
There's no built-in way to achieve this (how could it? Vim doesn't know anything about where its been launched from.) But you could (with quite some effort) implement something like this. Here's just an outline; I hope that's enough to discourage you from it: Vim allows to implement custom insert-mode completion via 'completefunc', cp. :help complete-functions. To get the sources from the other Vim(s) running in the other screen session(s), you could use the Vim client-server communication :help remote.txt to ask them for their open buffers. Then it's "just" a matter of opening those and parsing them for completion matches (either in your Vim or the remote one). But why go all the way? I'd rather open those related files in a single Vim instance; after all, Vim allows very flexible layou

Categories : Vim

How to get a div to auto resize properly horizontally for every screen size/resolution?
You need to make the following changes to the #loginText CSS: Remove padding-right: 80px; Remove padding-left: 80px; Change margin-right: auto; Change margin-left: auto; Add width: 1072px; Your issue is that your margins were percentage based, which scales on all resolutions. Your box above is an absolute size (1072px); this should make it match and center it as well.

Categories : CSS

Auto-resize UIView to fit iPhone 5 screen while maintaining proportion
You will probably need to use a subclass of UIView with the setFrame: method overridden to catch frame changes. - (void)setFrame:(CGRect)frame { frame.size.width = frame.size.height; // Make the *width* always equal to the *height*. Logic could go here, etc. [super setFrame:frame] }

Categories : IOS

How to execute javascript / jquery on a newly opened popup screen
Not sure it will be cross-browser, but you may try something like : var popup = window.open("/fault_books/" + <%= @fault_book.id %> , "popup"); $(popup.document).ready(function(){ var module = $(".module-logo", $(popup.document)) // manipulating the element $(module).hide(); });

Categories : Javascript

Showing Dialog when Home Screen Causing Gray Screen
Ok. (As from your comments). You can not have your dialog automatically appear while your app is in the background. The dialog is displayed within the context of your Activity(along with its window manager), if the activity is not displayed, nor is your dialog. To display content while your activity is in the background you have a few options, non of which will be straight forward though. Attach views directly to Android's WindowManager. This will not work with a dialog, you would have to construct a dialog layout and manually attach it, it would remain foreground above everything else. Launch your dialog from a transparent activity. Problem here is if you are say on your homescreen then the transparent activity/dialog launches and you then call you application the transparent activit

Categories : Android

Phonegap (Android Build) - Intermediate Screen before Splash Screen
Does your app eventually show or does it just stay blank? Cant really tell what is going on but a quick something came to mind. Are you using a splash screen? Take a look at the config.xml docs at the section about splash screen duration (Android only). The docs can be found here. Splash Screen Duration splash-screen-duration with a value in milliseconds defaults to 5000 (5 seconds) example: <preference name="splash-screen-duration" value="10000" /> for auto-hide behaviour call navigator.splashscreen.hide(); in the device-ready method supported on PhoneGap 2.1.0 and above Try setting the duration to 0 (<preference name="splash-screen-duration" value="0" />) and see what happens. *On second thought, it probably isn't a splash screen issue but worth a shot. Post some code

Categories : Android

Im using this screen capture code to take a screenshot of the screen but sometimes it's returning null why?
If you want to know WHY an exception occurred, I suggest you handle whatever exception you find in your catch. so instead of catch { result = null; } try catch (Exception ex) { // log the value of ex.ToString() to a file, the screen, something. System.IO.File.AppendAllText("debug.log",ex.ToString()); result = null; }

Categories : C#

Phonegap get screen height of working area (screen less the status bar)
I'm use $(window).height() which is ~ equal window.innerHeight but it's work for me when page fully loaded on Android and iOS. Sample here

Categories : Android

Trying to animate lines of a grid onto the screen in a WPF app and detect how many can fit on the screen at a time
You can probably get away with using a Grid or StackPanel and animate the margin value of your elements (use negative margins to slide items in). You need to ensure that the parent element has ClipToBounds set to false so that items can be drawn outside of its bounds. To measure an element's height, just use the Measure method on the row element to figure out how much space it needs vertically. Based on that, you can determine how many elements you can fit in one page.

Categories : C#

WPF Metro Window full screen
I can reproduce your issue. You should report it as a bug Here Simple workaround for now could be: Keep your xaml the same as you got to: <Controls:MetroWindow x:Class="MyProject.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" xmlns:Views="clr-namespace:MyProject.Views" WindowStyle="None" IgnoreTaskbarOnMaximize="True" Title="MyProject"> and in the Window's code-behind: public MainWindow() { InitializeComponent(); Loaded += OnLoaded; } private void OnLoaded(objec

Categories : C#



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