w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
capture picture from linux command line (uvccapture captures black picture)
a bit of an odd suggestion, but have you tried using sudo uvccapture -S40 -C30 -G80 -B20 -x1280 -y720 -v -t0 That should just take a single shot. Try this and see what it comes back with. I find that sometimes uvccapture wants that extra parameter. Not always though. Cheers. ARc

Categories : Linux

AngularJS - What's the best way to implement a "picture-in-picture" view within my stated app?
Define abstract ListIndex state with ui-view directive to hold child states. Define ListCategory state that is child of ListIndex with resolve object to access category info in your controller List and Item controllers. Define ListCategoryItem state that is child of ListCategory. Some quick sample code: states.ListIndex = { url: '/list', abstract: true, template: '<div ui-view/>' }; states.ListCategory = { url: '/list/:categoryId', controller: ['$scope', 'category', function($scope, category) { $scope.category = category; }], templateUrl: 'category.html', resolve: { category: ['CategoryService', '$stateParams', function(CategoryService, $stateParams) { return CategoryService.get($stateParams.categoryId); }] }; states.ListCategoryItem = { url

Categories : Javascript

Taking a picture doesn't save the picture in the gallery
You are getting External storage. Instead save your image with this: MediaStore.Images.Media.insertImage(getContentResolver(), Bitmap, Title, Description); This will save the image in gallery. See insertImage(). Parameters cr The content resolver to use image Path The path to the image to insert name The name of the image description The description of the image Returns The URL to the newly created image

Categories : Android

Changing the name of a picture makes the picture looks small
May be there are two images like one Publictransportation.png present in resources and another one will be just reference of Publictransportation.png, which might me there on your machine. Search Publictransportation.png in your project and check for duplication.

Categories : Image

Put a lot of pictures together to make one picture, how to use the picture which you want
check this out it will help you alot... http://spritegen.website-performance.org/ also this for techniques... http://coding.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/

Categories : CSS

how to have a picture in a picture-box change every 10 seconds
A couple of things: If these images aren't too big and plentiful you should consider preloading them all before hand: Dim images As New List(Of Image)() images.add(Image.FromFile(Somefilepath)) Now create a Timer that will tick every 10 seconds: Dim pictureChangeTimer As New Timer() 'Creates a timer AddHandler pictureChangeTimer.Tick, AddressOf pictureChangeTimer_tick 'creates an event handler, simply type in pictureChangeTimer.Tick += and hit tab twice. this will automatically create the method for you ' Sets the timer interval to 10 seconds. myTimer.Interval = 10000 myTimer.Start() Now in a separate function you can change your pictures every time the event lauches Private Sub pictureChangeTimer_tick(sender As Object, e As EventArgs) 'if using a lis

Categories : Vb.Net

Replace a button with a picture when clicked and then create a new button on top of picture in WPF
Here's a quick, rather crude example, but it shows some basics of adding and positioning controls at runtime. Things to note: Add controls to a Canvas if you want to be able to position x,y explicitly. I used UserControls for location items, and just added instances If you're building a game, and if it's any significant size and complexity, don't use WPF. I've been there, done that, built a full multiplayer space arcade/action game on it. It's too slow for games. Here's the code dump below. //PathBuilding.xaml <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:TravianResourceProd" x:Class="TravianResourceProd.PathBuilding" Title="PathBuildin

Categories : C#

unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) Windows 7 / Firefox 22
Can you update your 'watir-webdriver' gem to 0.6.4 and check it once. My PC configuration is Windows 7 Professional 64-bit Firefox 22.0 Ruby 1.9.3p392 Ruby 1.9.2p290 (2011-07-09) [i386-mingw32] selenium-webdriver (2.33.0, 2.32.1, 2.32.0) watir-webdriver (0.6.4, 0.6.3)

Categories : Selenium

Checkbox in Jquery UI Dialog doesn't appear in Firefox 22.0 and Opera, but it does in Firefox 20.0
there is problem with position i check in fiddle jquery var popUpConf = $('#addFormular').dialog({ resizable: false, draggable: false, dialogClass: 'no-close', modal: true, position: { my: "left top", at: "right bottom", of: window }, width: 'auto', closeOnEscape: false, open: function(event, ui) { $(".ui-dialog-titlebar-close", ui.dialog || ui).hide(); }, buttons: [ { text: "Annuler", click: function() { $(this).dialog("close"); } }, { text: "Valider", click: function() { $(this).dialog("close"); } }] }); add jquery ui and jquery library.

Categories : Javascript

Why is JavaScript slower in a FireFox add-on than in a webpage loaded in FireFox?
There are two preferences (accessible from the about:config page) that control the javascript optimizations: javascript.options.methodjit.chrome for privileged code (extensions) and javascript.options.methodjit.content for untrusted code (web pages). Some versions of Firefox ship with the former disabled by default. Check javascript.options.methodjit.chrome to see if it's set to true.

Categories : Javascript

Code works on Firefox Desktop v 22 but not on Firefox Android v 22
Ok. After regression testing, it boils down to the nicescroll plugin - areaaperta.com/nicescroll removed the init code for this plugin and things have started working.

Categories : Android

Font looks really worse in Firefox: why and how I can write a hack for Firefox?
When I test 13px Arial, it looks slighty lighter in Chrome than in Firefox, rather than the other way around as in your case. Stay tuned to variation across browser versions, platforms, and settings, as regards to font rendering. Usual browser detection techniques could be used in JavaScript to check whether the browser claims to be Firefox and modify CSS code accordingly. But this would be a shot in the dark, partly due to the variation mentioned, partly because there is really nothing you can do to fix the assumed problem. Bolding tends to change the overall appearance of text, not just slighly thicken strokes, and bolding often reduces readability. Ways to avoid creating problems like this: Do not set font size to something as small as 13px. Especially for small font sizes, use black

Categories : CSS

Import shared code between Firefox addon and Chrome addon into Firefox
If you are building a xul based addon and you have a library that you want to use in it, you just have to put it on your content directory and link to the library files in the xul files. - content - yourAddon.xul - yourAddon.js - yourLibDirectory - libfile1.js Then, on yourAddon.xul you include it in the header: <script type="application/x-javascript" src="chrome://yourExtension/content/yourAddon.js"/> <script type="application/x-javascript" src="chrome://yourExtension/content/yourLibDirectory/libfile1.js"/> If you do it with the addon-sdk, i'm not of much help. :)

Categories : Javascript

How do I put picture in behind another picture?
Here you go. WORKING DEMO The Code: #bg img{ z-index: 100 !important; position:relative; }

Categories : CSS

Upload Picture in Php
When a user logs in, store his user id in a session. Foresee a foreign key 'user_id' in the images table and insert the user id of the logged in user in this table along with the link to the image when he uploads the image. When displaying the images, you can query the uploaders name of each image.

Categories : PHP

I can't show the picture
In the echo statement, using . for concatenation when you're not concatenating means the . will appear in the echoed output echo "<img src='".$rec->nama_file."' alt='".$rec->judul_gambar."' title='".$rec->judul_gambar."' width='100'>";

Categories : PHP

img src=blob: how to get the picture?
Try this var blobURL = "blob:http%3A//www.mysite.com/ab750f54-ecb4-4dc9-8d9d-4e28c4a41262"; var image = new Image(); image.onload = function() { var canvas = document.createElement('canvas'); var ctx = canvas.getContext("2d"); ctx.drawImage(img, 0, 0, image.width, image.height); var picture = canvas.toDataURL("image/jpeg", 1.0); var data = new FormData(); data.append("picture", picture); $.ajax({ "url": "The Upload URL", contentType: false, processData: false, type: 'POST', "data": data, success: function(response) { //handle the response } }); } image.src = blobURL; <img src='blob:http%3A//www.mysite.com/ab750f54-ecb4-4dc9-8d9d-4e28c4a41262' /> and don't forget to decode the data from the server si

Categories : Misc

wp8: gif picture is not animating in the app?
install the imagetools from nuget package manager .. and add this namespace to your xaml.. xmlns:imagetools="clr-namespace:ImageTools.Controls;assembly=ImageTools.Controls" then add this to your page resources.. <phone:PhoneApplicationPage.Resources> <imagetools:ImageConverter x:Key="ImageConverter" /> </phone:PhoneApplicationPage.Resources> then define image in xaml like this.. <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <imagetools:AnimatedImage x:Name="CoverImage" HorizontalAlignment="Center" Source="{Binding ImageSource, Converter={StaticResource ImageConverter}}" VerticalAlignment="Center"/> </Grid> now do this in your code behind.. private Uri _ImageSource; public Uri ImageSource { get

Categories : C#

Zoom a picture?
I guess what you want is: //Get current dimensions $width = imagesx($myimage); $height = imagesy($myimage); $new_width = $width * $zoom / 100; //120 zoom will increase the image by 20% $new_height = $height * $zoom / 100; imagecopyresampled($image_p, $myimage, 0, 0, 0, 0, $new_width, $new_height, $width, $height); actually the first example on php.net is a zoom example: http://php.net/manual/en/function.imagecopyresampled.php

Categories : PHP

Take a picture from camera
Maybe you didn't added the necessary permissions in the manifest file: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus" /> Also I would suggest you to go over this blog post I wrote on this topic of taking a picture using the build-in Camera Activity: Take Picture with build in Camera Activity

Categories : Android

CSS Text Over Picture
FIDDLE Below is an unordered-list of blog posts with the date on top. They are links since you call them "thumbnails" --- the css uses @media rules as breakpoints for your image gride. The .block class on the links define the width of each image because images are set to 100% width and confined only by the .block. The height of the .block is defined by the proportions of the image, so if you put in different size images, you will break the grid. HTML <ul class="time-line"> <li><a class="block"> <img alt="timeline image" src="http://placehold.it/400x400" /> <h2>42/15/2013</h2> </a></li> <!-- repeat the list items as needed or insert a loop if you are using php or WP or something --> </ul>

Categories : CSS

Scale a picture in VBA
In the ShapeRange.ScaleWidth and ScaleHeight methods, the RelativeToOriginalSize argument should be msoFalse if you want to scale it relatively (as in maintain aspect ratio, it will adjust width and height while scaling). So if you don't want it to scale relatively, just set that argument to msoTrue for both: ActiveSheet.Pictures.Insert("C:\Logo.bmp").Select With Selection .ShapeRange.ScaleWidth 1.4, msoTrue .ShapeRange.ScaleHeight 0.5, msoTrue End With

Categories : Vba

How to dynmically draw picture in php gd
The filename argument to imagepng is optional. From the manual: filename The path to save the file to. If not set or NULL, the raw image stream will be outputted directly. You would just need to send a png header at the top of the script and you would get the image as output for that script.

Categories : PHP

Uploading a picture taken from a webcam
Build the SetInterval with snapshot() runing in 300ms. The button only stop the interval, ;) <button onclick="clearInterval(ivl)">Take Picture</button> var ivl = setInterval(function(){ snapshot(); },300);

Categories : Javascript

Echo does not show up a picture
i think the problem is that you cant use variable names in string like this : THIS WONT WORK echo 'Hi $userName'; THIS WILL WORK echo "Hi $userName"; so your line : echo '<img src="SigGen.php?player=$Playername&score=$Score&money=$Money" />'; needs to be changed to : echo "<img src='SigGen.php?player=$Playername&score=$Score&money=$Money' />";

Categories : PHP

Responsive Picture Gallery
You just need to make the bottom padding on .box-container 30px: .box_container { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 10px 30px 10px; margin-bottom: -35px; margin-left: 5px; margin-right: 5px; }

Categories : CSS

Adding button on top of a picture
In storyboard, you can select the thing you want to move (the button of the imageview), then editor > arrange > [direction you want]. The different directions are: Send to front Send to back Send forward Send backward A combination of these should allow you to achieve the order you want.

Categories : IOS

How to get facebook profile picture
You can raise the response using raise request.env["omniauth.auth"].to_yaml to see the information provided by facebook in your omniauth_callbacks_controller. You have to do save this in your db to save user facebook picture : auth.info.image

Categories : Ruby On Rails

Get picture from square AVCaptureVideoPreviewLayer
Have you tried to transform the image? try using CGAffineTransformMakeScale(<#sx: CGFloat#>, <#sy: CGFloat#>) to scale the image down. Transforms can do magic! If you have ever taken linear algebra, you should recall your standard transformation matrices. I have not used this for images, so I am not sure if this would work well with the pixels. you could also try // grab the original image UIImage *originalImage = [UIImage imageNamed:@"myImage.png"]; // scaling set to 2.0 makes the image 1/2 the size. UIImage *scaledImage = [UIImage imageWithCGImage:[originalImage CGImage] scale:(originalImage.scale * 2.0) orientation:(originalImage.imageOrientation)]; where you can change the sca

Categories : IOS

How do I get a timer to change a picture?
I can't comment so I will just say it here and edit when you answer, What is your code like so far? what have you tried ? there are quite a few ways to achieve what you want, but your question is sort of lacking detail. edit: You arn't showing a field named grow, and it isn't a good idea to have a field/variable by the name of grow and have a method named grow. One thing you can do according to yours would be something like. public class Sprite extends JFrame implements ActionListener { public boolean Grown; public Board board; // never set in your example, // nor do i have any idea what it is for public Timer timer; public BufferedImage UngrownImage; // Initialize these images yourself public BufferedImage GrownImage; public sprite

Categories : Java

Take new picture action on Android
You should listen to the action public static final String ACTION_NEW_PICTURE This is a Broadcast Action which is fired when a new picture is taken by the camera, and the entry of the picture has been added to the media store. getData() is URI of the picture. Constant Value: "android.hardware.action.NEW_PICTURE" Also check this link of the same question. Hope this helps

Categories : Android

Printing Picture and Text
Use DrawImage method: e.Graphics.DrawImage(pictureBox.Image, new Point(10, 10));

Categories : C#

Convert taken picture to bitmap
Set Android:LargeHeap="true" option in the Manifest file. And allow image loading action only when you have enough available memory. (this param is available I think only since Android 3.0) There is no magic. If image exceeds available memory, then you could read and edit parts of image. But it's not the most convenient way to process images.

Categories : Java

How to reduce picture size?
Why you are writing the image two times just do it in all one time What i do BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 4; Bitmap myBitmap = BitmapFactory.decodeFile({ImagePath}, options); FileOutputStream fileOutputStream = new FileOutputStream({ImagePath}); BufferedOutputStream bos = new BufferedOutputStream(fileOutputStream); myBitmapClose.compress(CompressFormat.JPEG, imageQuality, bos); if (bos != null) { bos.flush(); bos.close(); } if (fileOutputStream != null) { fileOutputStream.flush(); fileOutputStream.close(); } It will definitely compress Mind the line myBitmapClose.compress(CompressFormat.JPEG, imageQuality, bos); where set imageCompression type CompressFormat.JPEG

Categories : Android

Is there any good example for IOS to get a picture without clip?
Maybe something like that... -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage*temp =[info objectForKey: UIImagePickerControllerOriginalImage]; CGSize newSize = CGSizeMake("WIDTH", "HEIGHT"); <---- SET YOUR VALUES UIGraphicsBeginImageContext(newSize); [temp drawInRect:CGRectMake(0,0,newSize.width,newSize.height)]; UIImage* smaller = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); }

Categories : IOS

How to remove a picture from library
You can't. Please see: Delete image from MediaLibrary.SavePictures There is no way to delete any content from the user's library. Once you've saved a picture, the user will always have that picture unless they personally go delete it.

Categories : C#

Kivy how to rotate a picture
I think they are two ways of doing this. I'll post two answers and let others decide what is the right approach. I personally prefer this method because I think it's computational lighter. However, it is not that intuitive This method uses a RelativeLayout and two context instructions (Rotate and Translate). 1 - You need to embed the Image inside the RelativeLayout. Why? Because the way Rotate works is similar to putting a nail in the (0,0) coordinate, i.e. bottom-left corner. The RelativeLayout sets the 0,0 to the position of the Widget. 2- You will need to use the canvas 3- As I said before, the Rotate instruction is equivalent to put a nail in the (0,0) coordinate. Think about a piece of paper. If you put a nail in the corner the rotation is going to end on the left. So, before the

Categories : Python

How to align picture perfectly?
Try this: Get rid of float:left from #newRelises and #newRelises img change display:inline to display:inline-block If you want your images centered, add text-align:center to #newRelises

Categories : HTML

How to fake a loading gif for a picture
doing it with javascript will be the easiest way. just search for loading spinner or loading images. there are several examples on the www. e.g. http://fgnass.github.io/spin.js/ http://www.jquery4u.com/jquery-functions/settimeout-example/

Categories : Javascript

Picture when clicked has background I don't want
You have padding added to all table cells in this part of your styles.css file: table th, table td { text-align: left; vertical-align: top; padding: 4px 7px !important; padding: 6px 10px; } This affects the table around the Highslide image. You can fix it by adding this to your highslide.css file: .highslide-container table td { padding: 0 !important; }

Categories : Misc



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