Simulating TV noise

Create video and audio noise, artifacts, and errors with ffmpeg Noise Using filters The geq (video “generic equation”) filter (with nullsrc as its “blank canvas”) can create video noise, and the aevalsrc filter can create white noise audio: ffmpeg -f lavfi -i nullsrc=s=1280×720 -filter_complex \ “geq=random(1)*255:128:128;aevalsrc=-2+random(0)” \ -t 5 output.mkv Note that this will create … Read more

using jq to assign multiple output variables

You can use separate variables with read : read var1 var2 var3 < <(echo $(curl -s ‘https://api.github.com/repos/torvalds/linux’ | jq -r ‘.id, .name, .full_name’)) echo “id : $var1” echo “name : $var2” echo “full_name : $var3” Using array : read -a arr < <(echo $(curl -s ‘https://api.github.com/repos/torvalds/linux’ | jq -r ‘.id, .name, .full_name’)) echo “id : … Read more

Adding ripple effect for View in onClick

Clickable Views In general, ripple effect for regular buttons will work by default in API 21 and for other touchable views, it can be achieved by specifying android:background=”?android:attr/selectableItemBackground” In code: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.your_layout); View myView = findViewById(R.id.myView); int[] attrs = new int[]{R.attr.selectableItemBackground}; TypedArray typedArray = getActivity().obtainStyledAttributes(attrs); int backgroundResource = typedArray.getResourceId(0, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)