This file contains 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
#include <Gl/glut.h> | |
void display(void) | |
{ | |
glClear(GL_COLOR_BUFFER_BIT); | |
glRotatef(50,1,0,1); | |
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); | |
glBegin(GL_QUADS); | |
glVertex3f(0.0, 0.0, 0.0); | |
glVertex3f(0.5, 0.0, 0.0); | |
glVertex3f(0.5, 0.5, 0.0); |
This file contains 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
#include<GL/glut.h> | |
GLfloat xRotated,yRotated,zRotated; | |
GLfloat l,r,b,t; | |
void idle(){ | |
glutPostRedisplay(); | |
} | |
void display(){ | |
glMatrixMode(GL_MODELVIEW); |
This file contains 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
/* | |
* Copyright (C) 2014 darnmason | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
public void addFragmentMenu(Bundle savedInstanceState){ | |
if(savedInstanceState == null) { | |
Fragment mMenu = new MenuFragment(); | |
FragmentManager mFragmentManager = getSupportFragmentManager(); | |
FragmentTransaction mFragmentTransaction = mFragmentManager.beginTransaction(); | |
// R.id.container is a layout that contain fragment | |
mFragmentTransaction.add(R.id.frgcnt, mMenu); | |
mFragmentTransaction.commit(); | |
} | |
} |
This file contains 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
view.post(new Runnable() { | |
@Override | |
public void run() { | |
int width = view.getWidth(); | |
int height = view.getHeight(); | |
//do something cool with width and height | |
} | |
}); |
This file contains 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
/** | |
* | |
* @param MAIN CLASS | |
*/ | |
public class CrunchifyObjectTest { | |
static Singleton instance = Singleton.getCrunchifySingletonInstance(); | |
public static void main(String[] args) { |
This file contains 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
/* | |
* Copyright (C) 2015 Square, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
package com.cy.retrofithttpstest; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import com.cy.retrofithttpstest.retrofit.ToStringConverterFactory; | |
import com.zhy.http.okhttp.OkHttpClientManager; |