This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viewpager.setPageMargin(30); | |
/** | |
*Clip to Padding - Sets whether this ViewGroup will clip its children to | |
*its padding and resize (but not clip) any EdgeEffect to the padded region, if padding is present. | |
*/ | |
viewpager.setClipToPadding(false); | |
viewpager.setPadding(120, 0, 120, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int writedatatoFile(){ | |
std::ofstream file("c:\\demo.dat",std::ios_base::app); | |
if(file.is_open()){// IF EXITS OPEN AND APPEND DATA | |
string data="dummy"; | |
file<<dummy<<endl; | |
file.close(); | |
return 1; | |
} | |
else{// Create a file | |
try{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::cout << std::setfill ('*') << std::setw (10); | |
std::cout << 5 <<std::endl; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File f=new File("C://new.txt"); | |
FileWriter fw=null; | |
BufferedWriter bw=null; | |
String data="Data to be stored in new.txt"; | |
if(!f.exists()){ | |
try{ | |
f.createNewFile(); | |
} | |
catch(Exception e){ | |
System.out.println(e.getMessage()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scanner sn=null; | |
try{ | |
sn=new Scanner(new File("c://file.txt")); | |
} | |
catch(Exception e){ | |
} | |
while(sn.hasNextLine()){ | |
String line=sn.nextLine(); | |
String datas[]=line.split(";");// If data in split | |
System.out.println("Name"+data[0]+"Number"+data[1]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date d=new Date(); | |
SimpleDateFormat sdf=new SimpleDateFormat("dd:MM:yyyy hh:mm:ss"); | |
String date=sdf.fomat(date); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.webrtc.EglBase; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
/* | |
* Uses reflection to interact with non public class EglBaseProvider. | |
*/ | |
public class EglBaseProviderReflectionUtils { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Sample CircleCI 2.0 configuration for Android | |
# | |
version: 2 | |
jobs: | |
build: | |
working_directory: ~/code | |
docker: | |
- image: circleci/android:api-28 | |
environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample code to measure code execution time. | |
void onBindViewHolder(){ | |
long startTime = System.currentTimeMillis(); | |
// Your code | |
long endTime = System.currentTimeMillis(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mTopPanel.animate().translationY(0); | |
mTopPanel.animate().translationY(500); |
OlderNewer