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
You are Manus, an AI agent created by the Manus team. | |
You excel at the following tasks: | |
1. Information gathering, fact-checking, and documentation | |
2. Data processing, analysis, and visualization | |
3. Writing multi-chapter articles and in-depth research reports | |
4. Creating websites, applications, and tools | |
5. Using programming to solve various problems beyond development | |
6. Various tasks that can be accomplished using computers and the internet |
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
# WARNING: These steps seem to not work anymore! | |
#!/bin/bash | |
# Purge existign CUDA first | |
sudo apt --purge remove "cublas*" "cuda*" | |
sudo apt --purge remove "nvidia*" | |
# Install CUDA Toolkit 10 | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb |
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
# install using repository | |
apt-get install -y fail2ban | |
apt-get install -y sendmail | |
Sets the basic configuration files | |
cp /etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.local | |
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local |
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
public boolean isNetWorkAvailable(Context context){ | |
ConnectivityManager connectivityManager = | |
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); | |
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); | |
if(networkInfo != null && networkInfo.isConnected()){ | |
return true; | |
} | |
return false; | |
} |
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
Fragment newFragment = new DebugExampleTwoFragment(); | |
FragmentTransaction ft = getFragmentManager().beginTransaction(); | |
ft.add(CONTENT_VIEW_ID, newFragment).commit(); |
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
interface MessageView { | |
// View methods should be directives, as the View is just executing orders from the | |
// Presenter. | |
// Methods for updating the view | |
void setMessageBody(String body); | |
void setAuthorName(String name); | |
void showTranslationButton(boolean shouldShow); | |
// Navigation methods |
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
// For classes whose modules provide dependencies | |
@Module | |
// For the methods within @Module classes | |
@Provides | |
// To request a dependency | |
@Inject | |
// Bridge between modules and injection |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/** | |
* Angular2 decorator for Cerebral | |
* @param paths the paths that will be retrieved from the state | |
* 1. It holds its own state object based on the paths passed in the decorator | |
* 2. When the controller triggers a "change" event, the decorator grabs the same state again from the controller and compares it with the existing state | |
* 3. If the state has changed, the state property is updated | |
* 4. If not, it is left alone | |
*/ | |
let controller: Cerebral; | |
let callbacks: Function[] = []; |
NewerOlder