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

Start IPython remotely using SSH+screen, then detach and log out
It appears as though these kernel restarts only occur when I import traitsui modules in a notebook. Specially, the following imports cause the error. from traitsui.api import * from traitsui.menu import * The solution is to change the backend for traitsui, before importing any traitsui modules, from traits.etsconfig.api import ETSConfig ETSConfig.toolkit = 'null' EDIT: the traitsui functionality was not being used across ssh, it was just part of a larger module.

Categories : Python

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

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

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

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

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 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

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

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

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

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

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

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

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

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

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

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#

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#

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

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

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

Run command if screen exists
To get rid of the "No screen sessions found" message, redirect the stderr of screen: screen -list 2>/dev/null Next, keep in mind that -X doesn't work if the session is password protected. Then, use -r to let screen know you only want to kill detached sessions, and there's no more need for grep and if. Putting it all together: screen -r -S "ScreenName" -X quit 2>/dev/null

Categories : Bash

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

asp.net mvc sitemap that adjusts for screen size so menus are not off the screen
The menu template can be edited to get whatever HTML output you want, and then you can use CSS to control the visual aspect. It's no different than modifying any other MVC view. You can edit the template by modifying the /Views/Shared/DisplayTemplates/MenuHelperModel.cshtml file (or MenuHelperModel.aspx if you are not using razor). If you don't have the file in your project, you can get the contents of the Razor and ASPX files and add them to your project manually. Also, it looks like you have a very old version - here is the upgrade documentation to version 4.0.

Categories : Asp Net Mvc

Libgdx : setting another screen, but still buttons from old screen active
I changed this : I moved the input processor to the show() method of that screen using stage variable of that screen public void show() { ... Gdx.input.setInputProcessor(stage); } before I was setting this only in the constructor of the screen, so even If I was changing the screen, the input processor was still attached to the last created screen's stage

Categories : Java

C# Transform a point from one screen coordinate to another screen coordinates
If the origin in both systems of reference is identical, what is the case (0, 0); the only thing you can do is scaling the values from one to the other system by relying on a simple rule of three: curX -> in 340 newX -> in newWidth(1024) newX = newWidth(1024) * curX/340 OR newX = curX * ratio_newWidthToOldWidth Same for height (newY = curY * ratio_newHeightToOldHeight). This is already a pretty simple way so why looking for simpler alternatives? In any case, you should bear in mind that the width/height ratio change from one resolution to the other (i.e., 1.33 and 1.2 in the examples you provide) and thus if you apply this conversion blindly the appearance of the objects might change (would be adapted to the given screen but perhaps would look worse than what you want). T

Categories : C#

What is the Intent to call "Choose screen lock" screen?
There is none. You can view all possible Intents in android's source code: https://github.com/android/platform_packages_apps_settings/blob/master/AndroidManifest.xml

Categories : Android

screen shot of a specific screen area in android
is there any way to capture a specific area of a screen or view Capture something larger, then cut out the "specific area" into a separate Bitmap, probably using one of the createBitmap() methods.

Categories : Android

"spwd: command not found" when using screen on OS X
Since Lion, Command Line Tool isn't in a fresh install. You have two options: Download Xcode from the Mac App Store. Start Xcode, go to Preferences. In the General panel, you have Downloads and another one named Components. Finally click on Download button next to Command Line Tool You can download the command line tools for Lion and Mountain Lion and other tools here: Command Line Tool (Developer account is needed)

Categories : Osx

Installed test APK does not appear on device's main screen
What you are trying to install doesn't have an activity defined in the manifest. As per the docs An activity is that implements part of the application's visual user interface. All activities must be represented by <activity> elements in the manifest file. Any that are not declared there will not be seen by the system and will never be run. You can refer the document so as to have an idea how activity works

Categories : Android

Run "screen -S name ./script" command on @reboot using crontab
You want to add the following options to the 'screen' commands (e.g. before -S): -d -m From the manpage: -d -m Start screen in "detached" mode. This creates a new session but doesn't attach to it. This is useful for system startup scripts.

Categories : Linux

How to test Android lock-screen widgets in an emulator?
Yes it does not seem to work with my AVD. But it works with genymotion. Maybe you can try it. Download it from http://www.genymotion.com/.

Categories : Android

How to print out to screen in rspec integration test in rails 3.2?
Just use puts. Make sure your rspec output format is documentation. Command like rspec --format documentation Or set that in .rspec

Categories : Ruby On Rails

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

the difference between screen and no screen in twitter bootstrap
http://www.w3.org/TR/CSS21/media.html#at-media-rule @media screen is computer screen, so The first rule is for computer screens only with resolution width at least 768px. The second rule is just for devices with width >=768px including tablets, phones, printers etc., that have high enough resolution.

Categories : CSS

How to know if a JFrame is on screen in a multi screen environment
This is a little redumentry, but, if all you want to know is if the frame would be visible on the screen, you could calculate the "virtual" bounds of desktop and test to see if the frame is contained within in. public class ScreenCheck { public static void main(String[] args) { JFrame frame = new JFrame(); frame.setBounds(-200, -200, 200, 200); Rectangle virtualBounds = getVirtualBounds(); System.out.println(virtualBounds.contains(frame.getBounds())); } public static Rectangle getVirtualBounds() { Rectangle bounds = new Rectangle(0, 0, 0, 0); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice lstGDs[] = ge.getScreenDevices(); for (GraphicsDevice gd : lstGDs) {

Categories : Java

App shows main screen after screen rotation
You should use onSaveInstanceState to save your state, and then recreate it in onCreate. Read following answer Restore values on screen rotation

Categories : Android

What's the android ADB command to click the title of the Settings screen
Open settings window adb shell am start -n com.android.settings/.Settings You can use keycodes for DPAD 19 --> "KEYCODE_DPAD_UP" 20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER" to move down: adb shell input keyevent 20 and up: adb shell input keyevent 19 to select row: adb shell input keyevent 23 It works fine for me (no rooted Samsung Galaxy S3)

Categories : Android



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