How can I clear the SQL Server query cache?

Here is some good explaination. check out it. http://www.mssqltips.com/tip.asp?tip=1360 CHECKPOINT; GO DBCC DROPCLEANBUFFERS; GO From the linked article: If all of the performance testing is conducted in SQL Server the best approach may be to issue a CHECKPOINT and then issue the DBCC DROPCLEANBUFFERS command. Although the CHECKPOINT process is an automatic internal system process … Read more

Can I compile all .cpp files in src/ to .o’s in obj/, then link to binary in ./?

Makefile part of the question This is pretty easy, unless you don’t need to generalize try something like the code below (but replace space indentation with tabs near g++) SRC_DIR := …/src OBJ_DIR := …/obj SRC_FILES := $(wildcard $(SRC_DIR)/*.cpp) OBJ_FILES := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRC_FILES)) LDFLAGS := … CPPFLAGS := … CXXFLAGS := … main.exe: $(OBJ_FILES) g++ … Read more

How to set DialogFragment’s width and height?

If you convert directly from resources values: int width = getResources().getDimensionPixelSize(R.dimen.popup_width); int height = getResources().getDimensionPixelSize(R.dimen.popup_height); getDialog().getWindow().setLayout(width, height); Then specify match_parent in your layout for the dialog: android:layout_width=”match_parent” android:layout_height=”match_parent” You only have to worry about one place (place it in your DialogFragment#onResume). Its not perfect, but at least it works for having a RelativeLayout as the … Read more