Skip to content

Instantly share code, notes, and snippets.

Wesley Viana wviana

Block or report user

Report or block wviana

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wviana
wviana / r_python_community_info.txt
Created Aug 28, 2019
After some time trying to find the Community Info on Reddit online, found just this post with some other people that also wasn't able to find in the reddit web. I've found it on mobile version, but there it is not possible to copy and paste. So after some searching I've found that when you change to reddit old version you get the Community Infob…
View r_python_community_info.txt
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on FreeNode.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
@wviana
wviana / gist:42ab291f6dbd1baeb5282057b2a3b4de
Created Aug 25, 2017
This is how to configura react-navigator header title color.
View gist:42ab291f6dbd1baeb5282057b2a3b4de
const AppNavigator = StackNavigator({
initialRouteName: {
screen: Login
},
Dashboard: {
screen: Dashboard,
},
}, {
navigationOptions: {
headerTitleStyle: {
View REGEX.sql
'^(?:(?!.*(A ?4))).*[^T\d]((\d+) ?[xX] ?\d+[[:alpha:]]*\y).*$'::text AS nXm,
'^.*\y(CX[ c/]*(\d+)[^\d]*)\y.*$'::text AS CXn,
'^.*\y(CX(\d+)UN)\y.*$'::text AS CXnUN,
'^.*[^\d]((\d+) ?ROLOS).*$'::text AS nRolos,
'^.*(C/ ?(\d+) *UN).*$'::text AS CBarrAnUN,
'^.*[^\d]((\d+) ?UN).*$'::text AS nUN,
'^.*[^\d]((\d+)\/).*$'::text AS nBarra
View Paciente.java
package imc;
public class Paciente {
double peso; // atributos da classe paciente
double altura;
double metros;
public Paciente(double peso, double altura , double metros){// construtor da classe paciente
this.peso=peso;
View macro.vba
Option Explicit
'Referência: http://stackoverflow.com/a/26474331/1864883
Private Sub MergeFiles()
Dim directory As String, fileName As String, sheet As Worksheet, total As Integer
Dim WrdArray() As String, currentFile As Workbook, thisFile As Workbook, output As Workbook, outputName As String
Application.ScreenUpdating = False
Application.DisplayAlerts = False
View gist:446517346482eec92c0a79f9331c6813
java.lang.NoSuchMethodException: android.support.v4.widget.CircleImageView.<init>(android.content.Context, android.util.AttributeSet)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:396)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:172)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:176)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:247)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:171)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
View Clean.java
public void onBackPressed() {
if(detailsPanel.isHidden()) showFinishApplicationDialog();
else detailsPanel.stepBack();
}
View 123.java
Map<Integer, Integer> Result= new HashMap<>();
int condition = Math.max(sample.size(), fileTwo.size());
for(int counter=1; counter<=condition; counter++)
{
int match=0;
for(String fileTwoPostionValue : fileTwo.get(String.valueOf(counter)))
{
if(sample.get(String.valueOf(counter)).contains(fileTwoPostionValue))
{
View 123.java
private void updateSubtitle() {
StringBuilder resultText = new StringBuilder();
for(String key : subtitles.keySet()){
String keyText = subtitles.get(key) + "\n";
resultText.append(keyText);
}
mapSubtitle.setText(resultText.substring(0, resultText.length() -1));
}
View Error.log
java.lang.RuntimeException: Method from in android.view.LayoutInflater not mocked. See http://g.co/androidstudio/not-mocked for details.
at android.view.LayoutInflater.from(LayoutInflater.java)
at neocom.dealerbook.views.LayerView.<init>(LayerView.java:174)
at neocom.dealerbook.views.LayerView.<init>(LayerView.java:125)
at neocom.dealerbook.views.LayerView.<init>(LayerView.java:33)
at neocom.dealerbook.views.LayerView$Builder.build(LayerView.java:101)
at LayerViewBuilderTest.test_addSelector(LayerViewBuilderTest.java:24)
You can’t perform that action at this time.