w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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#

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 start Marquee text start from bottom of the screen?
<!DOCTYPE html> <html> <body bgcolor="#2E9AFE"> <marquee style="background-color: #2E9AFE; bottom: 0; color: #ffffff; height: 100%; position: absolute; text-align: center;" scrollamount="2" direction="up" loop="true"> <strong>I AM HERE<br/>Vx.0<br/><br/>DEVELOPER<br/>xxxxxx<br/><br/><br/>CONTACT US<br/>xxxxxx</strong> </marquee> </body> </html> Please note, to my knowledge this is not valid HTML. To validate, check out http://validator.w3.org. Also, there were two body tags (instead of one) and some other HTML that wasn't properly formatted, most of which I tried to address. If you're not yet familiar with CSS, just know that it's your friend. (In other words, you'd probably be

Categories : HTML

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

screen capture program in C or C++ and Linux
How to capture screen with ffmpeg: Use the x11grab device: ffmpeg -f x11grab -r 25 -s 1024x768 -i :0.0+100,200 output.flv This will grab the image from desktop, starting with the upper-left corner at (x=100, y=200) with the width and height of 1024x768. If you need audio too, you can use alsa like this: ffmpeg -f x11grab -r 25 -s 1024x768 -i :0.0+100,200 -f alsa -ac 2 -i pulse output.flv So you can simply place this in capture.sh and run it from your code: #include <cstdlib> int main(){ std::system("./capture.sh"); } If you have to do it without calling external utilities, you can use libffmpeg directly.

Categories : C++

start Splash screen activity
try this instead : public class splashscreen extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_splash); Thread t = new Thread(Splash_Runnable); t.start(); } Runnable Splash_Runnable = new Runnable() { @Override public void run() { try { Thread.sleep(3000); startActivity(new Intent(splashscreen.this, MainActivity.class)); splashscreen.this.finish(); } catch (InterruptedException e) {

Categories : Android

Get Window 8 Start Screen tiles
The Windows Store Apps (aka Metro apps) are installed in "C:Program FilesWindowsApps" Your app idea is impossible as WinRT app because WinRT app has sandbox nature, so you can't access that path. If you want to develop desktop app then it's possible. In that folder, you will find separate folder for each app. Look for "Assets" or "images" folder. It contains all the logo (Wide, Store, Small, SplashScreen, etc) of particular app. The folder name may differ for any app, "Assets" & "images" is default folders. You also may need to visit this

Categories : C#

Does linux support multi-touch screen
Linux started supporting Microsoft's Multi-touch protocol from kernel 3.8 onwards. The reference is here: https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt Addendum http://www.ptrackapp.com/apclassys-notes/embedded-linux-multitouch/ has arm multi-touch tutorial for iPhones but it applies equally to Android. The hid-multitouch in linux supports a whole bunch of panels: See http://lxr.free-electrons.com/source/drivers/hid/hid-multitouch.c for details Addendum 2 Multi touch support has been somewhat there since 2.6 Ubuntu had multi touch support in its distribution in 2010. Microsoft Multi-touch protocol support started in 3.8. Chrome OS support started in kernel v3.9. X.org server had multi touch support built into it in 2011.

Categories : Linux

How to use xlib to listen for screen resolution changes on Linux
The solution was to map to the default root window. display = XOpenDisplay (NULL); if (!display) { syslog(LOG_INFO, "Could not open display. "); } screen = DefaultScreen (display); root = RootWindow (display, screen); window = DefaultRootWindow( display ); if ( 0 > window ) { syslog(LOG_INFO, "Failed to obtain the root windows Id of the default screen of given display. "); } Status ret = XGetWindowAttributes( display, window, &xwAttr ); width = xwAttr.width; height = xwAttr.height; XSelectInput (display, window, ExposureMask | /* Add StructureNotifyMask to send us events involving resizing of the window, etc. */ StructureNotifyMask);

Categories : Linux

How to create a Java game start screen?
I see... A JPanel acting as the primary container for the splash screen A JLabel to hold the background image A JButton for the user to click. I also see a CardLayout to help make it easier to switch between your SplashScreen and your Game screen. Check out How to use CardLayout for more details. From your description, it sounds like you've started by overriding paint of the JApplet class. Welcome to the wonderful world of "Why you shouldn't override paint of a top level container" You need to move all you custom painting and control logic to a different component (something like a JPanel would do) and use it's paintComponent method instead. This way, you can control where the panel goes (could be made into a stand alone application) and provide support for swappable screens/panes

Categories : Java

Creating a touch screen driver for OS X: where to start?
You're going to want to start with Apple's I/O Kit documentation. You can hope that the touchscreen isn't completely custom, though there must be some part that's not standard USB HID, or it would work already. If there are any linux (or other open source) drivers available, you'll have the advantage that somebody already did some of the reverse engineering for you. As an alternative to the I/O Kit, you might also want to look into libusb, which might make your brain hurt less when getting started. If you end up needing to write a kext, that might not help you anymore, though. As to some of your specific questions: would this be a kernel extension? Maybe, maybe not. I'm not really up on the Mac OS X driver situation, but I did write some totally user-space USB code for OS X many

Categories : C

How to navigate to Windows Phone 8 start screen using C#
To programmatically exit an application, you can call: Application.Current.Terminate(); Unfortunately, it will work only on Windows Phone 8, this method isn't available on Windows Phone 7.

Categories : C#

Start an animation automatically without the need of click on screen
you can put your code in onResume, or onCreate depends of your needs, also you can set a timer to active this code, there are many ways... How to start Animation immediately after onCreate? http://damianflannery.wordpress.com/2011/06/08/start-animation-in-oncreate-or-onresume-on-android/

Categories : Android

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 do I get FlowPlayer 5.4.3 to start in full screen mode
It sounds like you are getting these errors because the browser does not support it. If you look in flowplayer docs under Methods There is a fullscreen() method. This states Note: Many browsers allow this method to work only from events which are triggered by user interaction, like "click", and not for example from player events like "ready" which happen at moments undetermined by the user.

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

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

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

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

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

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

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

Linux draw on screen independent of windows manager
Create a regular window. Tell the WM to skip decorations ant to keep the window always on top. Use XFixesSetWindowShapeRegion() to separately set a circular output region and an empty input region. You need a compositing window manager XFixes extensions for this to work. You can also make your window semi-transparent (this needs a compositing window manager). A modern toolkit such as gtk should have easy to use APIs to do all of the above. No OpenGL is needed at any stage.

Categories : C++

Can a Windows Time Limit App, bump a game out of Full Screen (DirectX?) mode when time is up?
Sure, this isn't exceptionally hard. The most obvious thing to do would be to send the game a few messages. There are quite a few games which will respond to WM_QUIT. A bit more drastic is LockWorkStation(). If that fails, TerminateProcess works at the core OS level and ignores details like DirectX.

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

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

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#

How to create a tile on start screen in Win8 automatically?
In Windows 8, all apps will automatically have a tile created for them in the Start Menu during installation; you don't need to take any extra action for this to happen. In Windows 8.1, this behavior changes and new apps that are installed are NOT automatically added to the user's Start Menu (they will be added to the Apps list). In Windows 8.1, the user has to explicitly go to the Apps list and add apps to their Start Menu. I found a quick video of this here.

Categories : Windows

notification manager to start last open screen of the application
I got solution. Add Flag in pending intent to clear top /recent activities from Stack,. notificationIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);

Categories : Android

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

Black screen when attempting to start iCloud app on phone
Your code doesn't indicate this, but you can't call -URLForUbiquityContainerIdentifier on the main thread. Note from the Apple documentation: Important: Do not call this method from your app’s main thread. Because this method might take a nontrivial amount of time to set up iCloud and return the requested URL, you should always call it from a secondary thread. To determine if iCloud is available, especially at launch time, call the ubiquityIdentityToken method instead. It could very well be that it takes a long time and that it appears as if your app isn't loading, while in reality it is just waiting for that method to return.

Categories : IOS

Responsive CSS design - large or small screen to start
I usually start with a 1000px width and complete the design first. Then I use media queries for 800px,600px and <400px. While designing the page decide which elements are to be shrink and which elements to be float-removed. Then apply the appropriate changes in media queries. Instead of using two css, use one (This saves your number of requests). Make small tweaks to fit your small screen devices. http://css-tricks.com/ have an excellent responsive design. Just note how they are changing the elements. Or a simple answer, start from bigger width to a lower one !

Categories : Performance

how to make the screen dark and start a progressBar in android?
If your HTTPClient is in an Asynctask, put your progress bar visibility GONE in the 'onPostExecute' to dim the screen, you need to show an alert dialog/ dialog fragment and set your custom layout with the progress bar, then dismiss it when the loading as finished. that will automatically dim the screen.

Categories : Java

WPF Window Cold Start - showing black screen
You should perform any long running process in a background Thread... this will free up your UI. If you are not familiar with multi-threaded applications, take a look at the BackgroundWorker Class page at MSDN, as it features code examples. Another thing to note it that you should add IsAsync="True" property to your Binding declaration on the DataGrid.ItemsSource to let it know that it must wait for data. In this way, your DataGrid will be displayed empty and then when the data is ready, it will populate.

Categories : C#

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



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