w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
rotate 3d pictures using javascript
http://www.uize.com/examples/3d-rotation-viewer.html Googled rotate 3d image javascript. View Source and copy Uize.js

Categories : Javascript

How to rotate pictures of a background of layout in android through java in a timer?
Watching the logCat I would say that the problem here is that you are creating the views in one thread an modifying them in another. Try to use runOnUiThread Found a similar problem here Edit: I'd try this way super.onCreate(savedInstanceState); setContentView(starting.rt.R.layout.relationship); layout = (RelativeLayout) findViewById(starting.rt.R.id.relativelayout1); setred = false; timer = new Thread() { public void run() { try { sleep(7000); } catch (InterruptedException e) { e.printStackTrace(); } finally { MyActivity.this.runOnUiThread(new Runnable() { public void run() { if (setred) { setred = false; layout.setBackgroundResource(starting.rt.R.drawable.cosmos); } else { setred =

Categories : Java

KinectJS: Rotate an image about an absolute rotate point per drag and drop
You can move an image around a fixed rotation point using some trigonometry Calculate the angle of the mouse position relative to the rotation point using Math.atan2: var dx=mouseX-rotationPointX; var dy=mouseY-rotationPointY; var radianAngle=Math.atan2(dy,dx); Move the image around the rotationPoint using Math.cos and Math.sin: var x=rotationPointX+radius*Math.cos(radianAngle)-imgWidth/2; var y=rotationPointY+radius*Math.sin(radianAngle)-imgHeight/2; image.setPosition(x,y); Here's working example code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Prototype</title> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script src="http://d3lp1msu

Categories : Javascript

Chrome cannot apply filter:hue-rotate() and transform:rotate() at the same time in an animation
I took a stab in the dark and created two key-frame animations and then declared both for the element, which is working in Chrome 28: http://jsfiddle.net/3QGWY/1/ #subject { ... -webkit-animation:5s multi_rotate1 linear infinite,5s multi_rotate2 linear infinite; } @-webkit-keyframes multi_rotate1 { 0% { -webkit-filter:hue-rotate(0deg); } 100% { -webkit-filter:hue-rotate(360deg); } } @-webkit-keyframes multi_rotate2 { 0% { -webkit-transform:rotate(0deg); } 100% { -webkit-transform:rotate(360deg); } }

Categories : CSS

css transform:rotate, rotate forwards not backwards
I have choose to do that using a class for the rotation and another for the transition. And to make it easier in the script, using 2 divs nested so that you have only one class in each. The HTMl <div id="pie" class="rotate"> <div id="pos" class="rot0"> <div class="rot0" onclick="myFunction(0)">1</div> <div class="rot6" onclick="myFunction(1)">2</div> <div class="rot5" onclick="myFunction(2)">3</div> <div class="rot4" onclick="myFunction(3)">4</div> <div class="rot3" onclick="myFunction(4)">5</div> <div class="rot2" onclick="myFunction(5)">6</div> <div class="rot1" onclick="myFunction(6)">7</div> The CSS #pie { width: 200px; height: 200px; left: 35px; top: 35px; position: absolute; backgrou

Categories : CSS

android animated-rotate won't rotate ccw
I think the point is if you use <animated-rotate> it is a non public API. I can't find any official documentation about it. and it is actually ignoring whatever values you put in fromDegrees and toDegrees. You can remove both attributes and it will still spin. You said you don't want to use rotate, but that is the only other simple XML answer I can find: <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:drawable="@android:drawable/ic_lock_power_off" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0" android:toDegrees="-360" /> What is the reason for wanting <animated-rotate> and not <rotate> ? If you want to set a slower or faster frame count, you should check this answer here: http://stackoverflow.com/a/1499

Categories : Android

Sum of even-numbered items in Seq
val ls = List(1,2,3,4,5) ls.foldLeft(0)((sum,elem) => if(elem%2==0) sum+elem else sum) There are multiple ways of doing it say by using collect or map, but they all will construct an internal list. For ex: ls.collect{ case n:Int if(n%2==0) => n case n:Int => 0 }.sum foldLeft should be the fastest.

Categories : Scala

Looping through numbered html tag id's
Try this. You also weren't calling the function (which is bad to create inside a loop anyhow). var useGetImageData = function(i){ var canvas=document.getElementById(i); var context=canvas.getContext("2d"); var imageData = context.getImageData(0,0,canvas.width,canvas.height); var data = imageData.data; } for (var i = 0; i < 3; i++) { // useGetImageData(''+i); // As @Andrew points out, it gets interpreted as a string. userGetImageData(i); }

Categories : Javascript

Odd Numbered Cell Not Added To Pdf
On your PdfPTable you can call the CompleteRow() method when you're done and missing cells will be filled in.

Categories : Asp Net

Can't create a numbered list with jquery using OL
Your ol reference is wrong, you are adding the lis to div#preview instead of the ol element var list = $('#testy'); Demo: Fiddle

Categories : Jquery

Referencing Numbered Variables and Arrays
Here is an example class A { private var playDict:Dictionary = new Dictionary(); public function addPlayer(playerId:int, player:PlayStats):void { playDict[playerId] = player; } public function getInventory(playerId:int, invertoryIndex:int):Object { var player:PlayStats = playDict[playerId] as PlayStats; if (player) { if (player.inventory) { return player.inventory[invertoryIndex]; } else { return null; } } else { return null; } } } PlayStats is base class of PlayStats1, PlayStats2, PlayStats3. PlayStats1, PlayStats2, PlayStats3 could add target objects to its own invertory public class PlayStats { public var inventory:Array = []; }

Categories : Arrays

open another div when click on one incremental numbered div
There is a siblings method in jquery and I believe it works great, so the javascript should be <script> $(".Denumire").click(function(){ $(this).siblings(".Informatie").toggle(); }) </script> and the display part <div class='Denumire".$a++."'> should be <div class='Denumire'> hope this work :D [edit] To close the others: <script> $(".Denumire").click(function(){ $(".Informatie").hide(); $(this).siblings(".Informatie").show(); }) </script>

Categories : PHP

How do I select the first odd/even numbered primary key in a SQL database
select id from table where MOD(id, 2) = 1 order by id limit 0, 1 Use mathematical function 13 % 2 = 1 (sorry, i don't know how is it in english, devide by modulo). MySQL function is MOD

Categories : SQL

How to extract only numbered rows from a column
Oracle 10+ has a regular expression system that you could use. Just so you know, no indexes can or will be used for this type of comparison. Oracle will need to look at every single row. Take a look at http://docs.oracle.com/cd/B12037_01/server.101/b10759/functions114.htm#SQLRF06300 Something like: WHERE REGEXP_INSTR('CardNo', '[^0-9]+') > 0

Categories : SQL

Foreach results in numbered format
You forgot the <li> tags inside the <ol> tag <?php if(isset($foo)){ echo '<ol>'; foreach($foo as $bar){ ?> <li> <div class="results"> <p class="name"><?php echo $bar['name']; ?></p> <p class="address"><?php echo $bar['address']; ?></p> <p class="address"><?php echo $bar['postcode']; ?></p> <span><?php number_format($bar['miles'],3) ?></span> miles </div> </li> <?php } echo '</ol>'; } ?>

Categories : PHP

Numbered /Individual Markers in google maps
You can specify the image for a marker when you create it by specifying the icon property of the marker options as a path to the image you want like so: marker = new google.maps.Marker({ icon: "/images/icon.png" }) See https://developers.google.com/maps/documentation/javascript/reference#MarkerOptions In your case you should be able to add the image you want to use into your array of markers, something like: markers = initMarkers(map, [ { icon:"/images/icon.png", latLng: new google.maps.LatLng(53.3525572, -6.2500383), ... Then when you create your marker, simply read off its icon property like so: marker = new google.maps.Marker({ icon: markerData[i].icon, ...

Categories : Javascript

Python. Even-numbered lines in text file
Use itertools.islice: import itertools import sys with open('input.txt') as f: sys.stdout.writelines(itertools.islice(f, 1, None, 2))

Categories : Python

extjs 4.1 How to show numbered and bullet in xtemplate
First you need to wrap your markup in a custom CSS class. You can do that directly in your XTemplate's markup: Ext.create('Ext.XTemplate', '<div cls="my-ct-class">', // ... rest of your template '</div>', ); Or you can use the cls option of the component using the template. For example, if it is a panel: Ext.widget('panel', { cls: 'my-ct-class', tpl: // ... }); Then you must restyle everything that Ext has "reseted" and that you need... Here is the minimal CSS rule set needed to fix ordered and unordered lists, to put in a CSS file of your own (clean method) or in a <style> tag in your index.html (OK for testing): .my-ct-class ol li { list-style:decimal;} .my-ct-class ul li { list-style:disc;} .my-ct-class ul ul li { list-styl

Categories : Extjs

Assigning numbered variable names automatically
You can use a collection Read this Collections tutorial For example a List Example: int n= someInteger; List<Node> nodeList = new ArrayList<>(n); nodeList.add(new Node(0)); nodeList.add(new Node(1)); . . . nodeList.add(new Node(n)); Or using a loop if you set things secuentially for(int i=0;i<n;i++){ nodeList.add(new Node()); }

Categories : Java

MATLAB - Counting the # of rows that are only numbered with multiples of 5
you can convert day-hour-min into minutes. Suppose your data is stored in an n-by-3 matrix called data (how original). Then >> minutes = data * [24*60; 60; 1]; % counting minutes from the begining Now you have to define the bins' edges (the intervals for summation): >> edges = min(minutes) : 5 : max(minutes); % you might want to round the lower and upper limits to align with a 5 minute interval. Use histc to count how many drops in each bin >> drops = histc(minutes, edges);

Categories : Matlab

What regex would detect if a string is part of a numbered list?
It is a pretty simple regex. The following will find the start of the string, then a digit character repeated one or more time, then a period character, then the space character. ^d+. REY In JavaScript you can do the following to test the string: var startsWithNumber = /^d+. /m.test('34. this should return true.'); jsFiddle

Categories : Javascript

Left align bulleted lists and numbered list
Add this inline css to your <ul> or <ol> <ol style="list-style-type: none;"> Update: To keep the line numbers remove the above code and replace it with <ol style="list-style: decimal outside;"> Another Update :) For <ul>: <ul style="list-style: circle outside;">

Categories : CSS

Matching numbers inside nested numbered groups
You can combine a positive lookahead with a negative lookahead to get your desired results. (d+)(?=(?:.(?!())*)) Regular expression: ( group and capture to 1: d+ digits (0-9) (1 or more times) ) end of 1 (?= look ahead to see if there is: (?: group, but do not capture (0 or more times) . any character except (?! look ahead to see if there is not: ( '(' ) end of look-ahead )* end of grouping ) ')' ) end of look-ahead See a demo

Categories : Regex

How to call a numbered sequence of covariates with paste in a for loop
If you are trying to manipulate variables as character strings, that is a sure sign that you are barking up the wrong tree. Anytime you are tempted to use get or assign, think again, you're probably doing it wrong. library(plyr) library(reshape2_ data_m <- melt(data,id.var = "ind") ddply(data_m,.(variable), function(x) t.test(x$value[x$ind == 1],x$value[x$ind == 0])[[3]]) Or just: lapply(data[,1:7],function(x) t.test(x[data$ind == 1],x[data$ind == 0])[[3]])

Categories : R

HTML nested numbered list with starting index
From http://www.w3.org/TR/css3-lists/#html4: /* The start attribute on ol elements */ ol[start] { counter-reset: list-item attr(start, integer, 1); counter-increment: list-item -1; } Adding this to the CSS allowed the start attribute to be recognized in my tests. EDIT: Instead of using the start attribute, you can use CSS classes for each new starting point. The downside is that this will require more maintenance should you need to change anything. CSS: ol.start4 { counter-reset: item 4; counter-increment: item -1; } ol.start6 { counter-reset: item 6; counter-increment: item -1; } HTML: <div> <ol> <li>Item 1</li> <li>Item 2 <ol> <li>Item 1</li> <li>Item 2</li> </ol></l

Categories : HTML

when apply "chattr +a" on a folder, vim automatically generate numbered file
By default Vim makes a backup before overwriting a file, which is deleted after the file is successfully written. As you mentioned on the comments, chattr +a prevents the removal of those bakcup files. The generation of backup files can be disabled with :set nowritebackup for all files; backupskip option can be used to disable the backup only for folders with restrict attributes. Additional information on :h backup-table.

Categories : Vim

Numbered results list and maintain position number if times are equal
Its because you have it only decrementing by 1. $c - 1 You would want a counter like you have, but a current row. Something like $c = 1; $curr = $c; foreach( $results as $result){ if($time === $result['time']){ use $curr; }else{ use $c; $curr = $c + 1; } $c++; } but if you move the $c++, you can tie it in with with $curr, like $c++; $curr = $c;

Categories : PHP

Create numbered list in KnockoutJS using each item's position in an observable array for the numbers
See the documentation: http://knockoutjs.com/documentation/foreach-binding.html Use $index: <ul class="nav nav-list" data-bind="foreach: sidebarItems"> <li class="" data-bind="css: isActive"> <a href="#dropdowns" data-bind="text: $index() + text()"></a> </li> </ul>

Categories : Javascript

How many pictures can i put in my app?
There is no strict limit on the number of pictures you can include in your app. See the stock Gallery app as an example, I consider myself a relatively light picture taker, but I still have hundreds of images in my Gallery. If you follow the Bitmap best practices you shouldn't run into any memory issues, and you should be able to include as many images as you want.

Categories : Android

Can't post more than 8 pictures in a row
Check also max_file_uploads setting in your php.ini file. Also notise, that you can't change this setting during runtime, as explained here. Try next values: post_max_size = 100M upload_max_filesize = 10M max_file_uploads = 10 And there is no shorthandbytes like "MB". You should use "K", "M", "G" for that. Check this FAQ.

Categories : PHP

Delete a row with pictures?
Here's something to get you started: Option Explicit Public Sub deletePics() Dim pic As Shape For Each pic In ActiveSheet.Shapes If (pic.Type = msoPicture) Then Debug.Print pic.TopLeftCell.Address End If Next pic End Sub You can loop through all the Pictures, and collect their addresses (or rows only) and store it in an array. When you loop through your delete code, you can pass the row and the array to a function that will check to see if there is a pic in that row, and if there is, delete it (using pic.Delete). EDIT: Since this is more complex than usual, and you're new to VBA, here's a more concrete sample: Option Explicit Public Function deleteCells() Dim lastRow As Long Dim ws As Worksheet Dim rowHasPic() As Shape Set ws

Categories : Excel

Interweaving two pictures
if (x>=0 and x<20) or (x>=40 and x<60)or (x>=80 and x<=100): color = getColor(p) else: color=getColor(p2) setColor(newPxl, color) If your indentatin is right, you only setColor in the else block. So the range from 0~20, 40~60, 80~100 will be blank.

Categories : Python

Put pictures in buttons
This is code which basically use image from resources of project and put it in button. <Button> <Button.Background> <ImageBrush ImageSource="/Application;component/Images/Image.png" /> </Button.Background> </Button>

Categories : C#

Get facebook pictures for later use
As you have correctly noticed, the array that you return is empty because your method returns before the response from the API has been received and parsed into taggedPictures inside the completionHandler block. You must save the array inside that block. I'd recommend changing your method as follows: -(NSArray *)getFacebookTaggedPicturesWithCompletion:(void (^)(NSArray* photos))completion; where the calling methods would pass the appropriate completion block to handle the obtained pictures. (i.e. save them to disk, display them, do some processing on them etc.): void (^loggerBlock)(NSArray* photos) = ^(NSArray *array) { NSLog(@"obtained photos: %@",[array description]); //save here instead of logging }; [self getFacebookTaggedPicturesWithCompletion:loggerBlock]; Hope this h

Categories : Objective C

Why can't I see my taken pictures in gallery?
Use MediaStore.Images.Media MediaStore.Images.Media.insertImage(getContentResolver(), imageBitmap, imageTitle, imageDescription); you can use the internal storage for saving.

Categories : Android

Extjs HtmlEditor - Numbered list and bullet list
It looks like there is a bug with htmleditor on 4.1.1. Also, you should NOT be using new to create the ExtJS objects. This will cause other ExtJS problems. Upgrading to 4.2.x will fix your problem with the htmleditor. Your code should be better formatted. You should also be using proper ExtJS methods to get items i.e. : Ext.create('Ext.form.Panel', { // should be using Ext.create(), not new title: 'HTML Editor', width: 500, bodyPadding: 10, renderTo: Ext.getBody(), items: [{ xtype: 'htmleditor', name: 'editor', enableColors: true, enableAlignments: false, enableLists: true, enableSourceEdit: false, anchor: '100%' }], dockedItems: [{ xtype: 'toolbar', items: [{ xtype: 'bu

Categories : Extjs

Slideshow pictures styling - css
You mean like this? #slideshow { text-align: center; } and change width to auto for #slideshow img #slideshow img { width: auto; height: 200px; max-width: 100%; max-height: 200px; }

Categories : CSS

UIScrollView With Pictures Generated
You need to manually set the contentSize of your ScrollView to the maximum rectangle which fits all the ImageViews you added. For example : Lets say you want to scroll right and left and you have 4 views with each view having width 100 and you have offset of 10 in x direction. Then after adding all the 4 views to your scrollView, you will have to make the contentSize as below : scrollView.contentSize = CGSizeMake( 10 + (100 + 10)*4 , scrollView.contentSize.y ); This will make the scrollView scrollable and you will see all the views.

Categories : IOS

How do profile pictures work?
You can put pictures in a database (using a BLOB field), but I wouldn't, due to the performance hit. Store the images on the filesystem with PHP, and just store the ID of the picture in the database.

Categories : PHP

How to change pictures using listview
You should set the ListViewItem.ImageIndex to the Index of the image in the ImageList, when adding a new ListViewItem it`s as simple as: ImageList1.Images.Add("Key", Image.FromFile("C:pic est.jpeg")) Dim newItem = New ListViewItem("Item Name", ImageList1.Images.IndexOfKey("Key")) ListView1.Items.Add(newItm) When dealing with already added items you can set it directly, by refrence, index or what have you: 'set ListViewItem.ImageIndex for ListViewItem at index 0 'using ListViewItem.Tag can be usefull for this ListView1.Items(0).Tag = New String("Key") ListView1.Items(0).ImageIndex = ImageList1.Images.IndexOfKey(ListView1.Items(0).Tag.ToString)

Categories : Vb.Net



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