Posts by Reiksiel • 1,471 points
23 posts
-
0
votes1
answer141
viewsA: Regex to extract HTML information
Although it is not recommended to use Regex for very large text (usually html is mt large), it is possible to use yes since you do not create very complex expressions (always use fixed text in regex…
-
0
votes1
answer88
viewsA: REGEX - How do I search for expressions that DO NOT contain a specific part?
It is possible thanks to Negative Lookahead (n know how to translate this) "(?! abc)"! You can get that by using that expression: ^((?!<cod_orgao_destino>9577<\/cod_orgao_destino>).)*$ I…
-
1
votes1
answer320
viewsA: Post by Postman is giving error of Object Reference not set to an instance of an Object
Remove the "Jsonproperty" annotations looks like Webapi uses Newtonsoft as the default to deserialize the class and this is causing it to get lost. Another solution is to use xml this way: {…
-
0
votes1
answer145
viewsA: Convert.Changetype converts data incorrectly
I found!!! Next date comes with that part: -01:00 which means Timezone. When we convert a date it adapts to the PC Timezone. The program converted to the value: 24/02/2015 01:00:01 in Timezone -1,…
-
3
votes1
answer145
viewsQ: Convert.Changetype converts data incorrectly
The method Convert.ChangeType is converting the date the wrong way I hope 24/02/2015 and comes 23/02/2015. Does anyone know why? Code example: using System; using System.Globalization; namespace…
-
0
votes2
answers664
viewsA: How to better define the minimum API for a project?
Only one complement... Google provides a graphic of the android devices, this is very interesting because the data help as argument to convince the customer or yourself. As you can see,…
-
-2
votes1
answer258
viewsQ: Good practices to keep code clean
I develop on Android a few months and one thing I noticed is that the more features a screen has, the more messy the code gets! How so? Imagine an Activity that has Loading bar, various actions that…
-
1
votes1
answer219
viewsA: Error Compile 'com.android.support:support-v7:19.+ '
Solution found: Go to where the SDK (which the android studio/eclipse is using) is located. If it’s Android studio, go to extras\android\m2repository\com\android\support\. If it’s the eclipse, go to…
-
1
votes1
answer1347
viewsA: "Invalid Data" error when trying to decrypt a file using Tripledes
Error occurred on this line: linhaBytes[i] = Convert.ToByte(item); Proof: According to the documentation the string must contain apenas números. How do you feel about converting your string to one…
-
1
votes1
answer919
viewsA: How I develop a method of a binary tree class of search
Filing cabinet Binarysearchtree.h struct tree_node { tree_node *left; tree_node *right; int data; }; class Binarysearchtree { private: tree_node *root; public: Binarysearchtree(); bool isempty()…
-
9
votes4
answers2855
viewsA: How to merge multiple text files into one?
Here’s a simple example: static void Main(string[] args) { string diretorio = @"C:\teste"; String[] listaDeArquivos = Directory.GetFiles(diretorio); if (listaDeArquivos.Length > 0) { string…
-
0
votes2
answers1994
viewsA: How to decode a JSON array [{},{}] on my android
I recommend using the Gson, here’s an example: 1.- Install an object Gson: Gson gson = new Gson(); 2.- Take the Tipo corresponding is for you, for example List<String[]> (Note that you can’t…
-
10
votes3
answers17303
viewsA: What is the best way to read an XLS file?
There is the option to use Oledb and read the Excel file as a table in a database... An example..... string con = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\temp\test.xls;Extended…
-
22
votes7
answers30495
viewsQ: How to differentiate phone types
I have the following problem: the customer will send me a phone number and I need to differentiate whether it is fixed or mobile, someone knows some rules that distinguish well the two groups?…
-
3
votes1
answer174
viewsA: Development with Codename One
08/01/2014 - At the Moment we only support TCP sockets, we support server socket (Listen/Accept) on Android but not on iOS. You can check if Sockets are supported using the Socket.isSupported() and…
-
1
votes1
answer1909
viewsA: Why is the eclipse autocomplete function not working within the Onclicklistener?
Try restore the default options in 'Windows > Preferences > Java > Editor > Content Assist > Advanced' An example of the type of data you will see on this screen may differ from what…
-
1
votes2
answers3071
viewsA: Pass information from a selected item in the list to Edittext
Good morning, Good let’s see if I understand you are wanting to get the value of an Edittext within a certain item of a ListView right? Well if that is quite mistaken, the ideal would be to work…
-
2
votes1
answer69
viewsA: Download content from Session in a class
Now, how do I download each Sesssions item into the Cart class property? What would be the best way? Supposing you serialized the entire class in Sesssion that way: Session["IdCarrinho"] = carro;…
asp.net-mvc-5answered Reiksiel 1,471 -
55
votes4
answers9003
viewsQ: Best way to deal with Exceptions
During my work I learned a way to deal with Exceptions, but I don’t know if it’s very good. Here’s an example of the code: class Program { private static void Main(string[] args) { try { Foo(); }…
-
6
votes1
answer3888
viewsA: How to get latitude and longitude without internet on Android?
Look at this: public class GPSTracker extends Service implements LocationListener { private final Context mContext; // flag para o status do GPS boolean isGPSEnabled = false; // flag para o status…
-
2
votes4
answers4168
viewsA: Convert string to Time
Problems converting string to Datetime First, you need to keep in mind that there are several ways a Datetime/Timespan presents itself, you can check this out here. So it is not very safe for you to…
-
6
votes2
answers330
viewsA: Implement composite key C#
Why not use it that way? Using a concatenation to simulate a single key is never a good idea, as it can cause ambiguity, for example: Object 1 = Id1: "11", Id2: "1" => Id: "111"; Object2 = Id1:…
-
1
votes2
answers410
viewsA: Unknown Error: "null" when running an Httppost with Parameters
Is the url accessible in the device browser? I believe this is not the case, because this is more common when using localhost that is not recognized by the device, even AVD. Are you using a single…