Testing a Gist
I think it could be cool. For a number of reasons:
- Like one
- and 2
function setCaratTo(contentEditableElement, position) | |
{ | |
var range,selection; | |
if(document.createRange)//Firefox, Chrome, Opera, Safari, IE 9+ | |
{ | |
range = document.createRange(); | |
range.selectNodeContents(contentEditableElement); | |
//range.collapse(true); | |
package com.arpit.animatortest; | |
import android.animation.AnimatorSet; | |
import android.animation.LayoutTransition; | |
import android.animation.ObjectAnimator; | |
import android.app.Activity; | |
import android.graphics.Color; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.View; |
Testing a Gist
I think it could be cool. For a number of reasons:
Mar 13 15:20:29 ip-10-212-127-222 kernel: [1388067.480652] [ 3971] 106 3971 221943 14598 0 0 0 mysqld | |
Mar 13 15:20:29 ip-10-212-127-222 kernel: [1388067.480742] Out of memory: Kill process 3971 (mysqld) score 97 or sacrifice child | |
Mar 13 15:20:29 ip-10-212-127-222 kernel: [1388067.480973] Killed process 3971 (mysqld) total-vm:887772kB, anon-rss:58392kB, file-rss:0kB | |
Mar 13 15:20:29 ip-10-212-127-222 kernel: [1388067.620972] init: mysql main process (3971) killed by KILL signal | |
Mar 13 15:20:29 ip-10-212-127-222 kernel: [1388067.621019] init: mysql main process ended, respawning | |
Mar 13 15:20:29 ip-10-212-127-222 kernel: [1388068.095579] type=1400 audit(1363188029.689:15): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3728 comm="apparmor_parser" | |
Mar 13 15:20:30 ip-10-212-127-222 kernel: [1388068.658259] init: mysql main process (3732) terminated with status 1 | |
Mar 13 15:20:30 ip-10-212-127-222 kernel: [1388068.658325] init: mysql main process ended, respawni |
* Android added a method in the compatability lib called postOnAnimation that executes a Runnable in sync with display VSync. Does this help animation? | |
* You can add views during the layout pass by calling addViewInLayout | |
* Swapping a view's layer type (between hardware and software) may improve animation performance. |
//Find: | |
var\s([A-Za-z_]+):\s?[A-Za-z!_\\?]+ | |
//Replace: | |
if(g[i]["$1"] != nil && g[i]["$1"] as? NSNull == nil){ | |
goal.$1 = g[i]["$1"] as AnyObject? as String! | |
} |
Figured out my layout issue: I had set the frame on a UIView and added it to a parent view. Under the hood, iOS translated the frame rectangle to constraints (cause I hadn't set "setTranslatesAutoresizingMaskToConstraints" to false). So when the parent view was resized later, the child view stretched along with it. Unlike the default behavior views with frames set that just stay that size regardless.
# arr.each_with_index do |value, index| | |
# arr[index] = value * 2 | |
# end | |
(0..arr.length - 1).each do |v| | |
arr[v] = arr[v] * 2 | |
end |
#create empty hash | |
myhash = {} | |
# or | |
myh = Hash.new | |
# keys no value | |
info = { :name => nil, :address => nil } | |
#set value of keu | |
info[:name] = "arpit" |
class User | |
attr_accessor :first_name, :last_name | |
def self.set_species (s) | |
@@species = s | |
end |