Search This Blog

Sunday, November 29, 2015

Symas Lightning MDB (LMDB) -

this cache very useful for multi process and multi thread environment.

Symas Lightning MDB (aka Lightning Database, LMDB):



worth to try in case you need key-value cached



yaniv tzanany

Thursday, November 19, 2015

VC++ and the Web Technology

so you want to send an email from MFC ?? parse JSON ??

Json - JsonCpp compile and work under VC++ 12.
SendEmail - CSMTPConnection  Old MFC class newer version could be find here , you can send email with libcurl as well .
WebAccess - post/get ftp - the libcurl  also compiled on VC++ 12.

MD5 - Example C Program: Creating an MD5 Hash from File Content
on don't forget the regular web classes in MFC   - via CInternetSession and CHttpConnection

enjoy
Yaniv Tzanany


notes about jsoncpp
parsing-quoted-strings-in json

Sunday, September 27, 2015

Saturday, September 19, 2015

Saturday, September 12, 2015

Eclipse content loader on zero - hung

i tried them all solution exist in the web.
finally - combine them all :


  1. i delete the folder \.metadata\.plugins\org.eclipse.core.resources\.projects
  2. i delete the file ddms.cfg from %USERPROFILE%/.android
  3. start eclipse with -clean -refresh parameter 
  4. make sure no adb.exe is running
  5. open eclipse
somehow its worked 

Yaniv

Wednesday, September 9, 2015

adb command to know


list command
awesome-adb

dial a number
adb shell service call phone 2 s16 "+999996719"
adb shell am start -a android.intent.action.CALL -d tel:999999


answer call
adb shell input keyevent 5


uninstall app  (-k to keep preferences)
adb shell pm uninstall -k yaniv.mypack.com

list of running activities
adb shell dumpsys activity activities

top activity name
adb shell "dumpsys activity | grep top-activity"

site with commands AndroidShell

show process running
adb shell ps

install/uninstall package
adb install  xxxx.apk
adb uninstall xxxx.apk

show app permission and info
adb shell dumpsys package [package name]

how to root android

http://www.addictivetips.com/mobile/how-to-root-your-android-phone-device/

How can incoming calls be answered programmatically in Android 5.0 (Lollipop)? - Stack Overflow

How can incoming calls be answered programmatically in Android 5.0 (Lollipop)? - Stack Overflow:




Sunday, August 30, 2015

Saturday, February 14, 2015

MonekyRunner

great tool to run stress test on your app.

i use to get the x,y location via monkey_recorder (you can read it here test automation)

monkeyrunner.bat -v ALL  D:\MyStuff\Android\monkey_runner\monkey_recorder.py

this open UI , and the log on the x,y.
you can run the export log via
monkeyrunner.bat -v ALL  monkey_playback.py  savedLog.mr

i like to use the python script.
in my script i get memory status via

procInfo= str(device.shell('dumpsys meminfo yaniv.ezphone.com'))
print procInfo

to use long click i used this pattern (down,sleep,up)

device.touch(270, 188, MonkeyDevice.DOWN)
MonkeyRunner.sleep(1)
device.touch(270, 188, MonkeyDevice.UP)


Dalvik Heap Profiling

have a look at this post
http://stackoverflow.com/questions/25795458/is-it-possible-to-trigger-an-android-heap-dump-from-the-command-line
watch this video from 35 minutes Android Development Tools 

from code you can use Debug.dumpHprofData()
from adb you can use kill -10   explain well here -> Dalvik Heap Profiling


adb am dumpheap


use this link to get more info heap-profiling

From a shell you can do the following to get a heap dump for the application using adb.
Note: Replace 19000 with the process ID of your running application. The filepath must be a filepath which your application has write access to on the Android device.
Create a heap dump:
adb shell am dumpheap 19000 /sdcard/Documents/android.hprof
Pull the file to your machine:
adb pull /sdcard/Documents/android.hprof
Convert to a hprof file readable by an analyzer:
hprof-conv android.hprof mat.hprof
Tips: Get process ID of your application:
adb shell ps | grep com.sample.application | cut -c10-15
Get process ID and dump heap:
adb shell am dumpheap `adb shell ps | grep com.sample.application | cut -c10-15` /sdcard/Documents/android.hprof

Saturday, January 24, 2015

Windows Azure - Seminar notes

Azure training-kit  - The Azure Training Kit includes a comprehensive set of technical content designed to help you learn how to use Azure.
https://github.com/Azure-Readiness - good place for starting labs

Azure Services:

  • Web Sites - your own web site on Azure could be on IIS,Tomcat,Jetty
  • Virtual machine -  there are predefind VM you can use such as  linux , windows server , web logic, windows with VisualStudio , Oracle DB  
  • Mobile services - for mobile developers 
  • SQL databases
  • Cloud services  
  • Media services 
  • Storage 
  • Visual studio Online 
  • Traffic Manager - like load balancer 
  • Network  - managed private network  (VPN)
  • Adding Add On - such as mongodb , MS translator .. and many others add on.

  • On Azure the data replicate(saved the image) into 3 "section" , one of them into different data center - you can control this.

  • On Azure you can use any language (java, ruby ..) to develop , you can use open source .
  • In Azure - you can access to your private network - e.g. access your db in your domain.
  • Azure Web sites - are powerful feature in azure , very easy and smart  and strong.
  • you can set your datacenter - e.g for Israel user - its better to choose North Europe Data Center.
Azure Web Site
  • if your web site need to host images and video its better to use Azure storage , for storage you can have direct access to resource, you can put CDN on top storage resource.
  • in the application configuration you can configure it to support websockets , application logging (system.diagnostics.trace) , and many diagnostic feature even debug remotely.
  • there are free , shared , and dedicated server (basic / standard).
  •  there are power shell command to connect to azure from command line - its a multi platform env , you can run commands from MAC for example.
  • for each web site you can access via ftp via user/password.
  • you can deploy your site via ftp, you can deploy from source control -  (continues integration), even directly from VisualStudio.
  • you can edit your web site files via VS online.
Azure Cloud Service 
  • its a container of related Web role and Worker role
C++ on the cloud - The C++ REST SDK (codename "Casablanca") is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. 


check responsive web site

http://responsivetest.net/