Home » Web Development » Page 13485
how to remove duplicate matches in MatchCollection
Web Development

I'm using C# .NET, WinForms 2.0

In my MatchCollection, I get matches of the same thing. Like this:

string text = @"match match match";
Regex R = new Regex("match");
MatchCollection M = R.Matches(text);

So my question is, how to remove duplicate matches in the fastest way possible? Assume duplicate here means that the match contains the exact same string

Upload to Artifactory using Java client
Web Development

I use Artifactory Java client, and cant upload file to Artifactory. My code is very simple, taken from Artifactory Java Client test folder:

artifactoryClient = ArtifactoryClient.create("localhost:8081",
"admin", "admin");
InputStream content = new ByteArrayInputStream("I want to test my
UploadableArtifact apAtrifact =  artifactoryClient.repository("ext-snap

Exact comparison between two numbers with ZEROFILL
Web Development

I have a PHP script where I want to compare two numbers.

$usernumber = $_POST['usernumber'];

$sql = "SELECT password, isadmin, disabled FROM user WHERE usernumber = " .
$usernumber .";";

Everything is working fine but there is one more or less cosmetic problem.

The usernumber is saved as a DECIMAL(5,0) with ZEROFILL. If I compare

Appcombat based ActionBar theme not working on newer devices
Web Development

I've created a ActionBar Style Using the tool ActionBar Style Generator ( http://jgilfelt.github.io/android-actionbarstylegenerator );I selected appcombat at the style compatibility selection list, because I need my app to be compatible with Android 2.3 devices; but when I downloaded and implemented the theme

How to test reports?
Web Development

We are developing a Rails app, that has quite a few pages with data reports. A typical reporting page is based on a relatively big SQL query, usually involving 5–8 table joins.

The cornerstone question we've stumbled upon is – writing integration tests reports pages. A common integration test of ours looks like this:

  1. creating a bunch of records in the DB via

SQLite Java Android no such table, program crashes
Web Development

I'm trying to make database for my program and I'm having a lot of dumb problems... It's fragment of main activity:

Database db = new Database(this,editText.getText().toString());
String text = db.printRow();

Now database class:

String nickname="EmptyNick";
public Database(Context context, String name) {

ORB/Bruteforce Hamming Good Matches Inaccurate
Web Development

I have this android program that would take a source images which will be matched with a template image. Using ORB, I was able to detect keypoints and extract descriptors as well. For matching, I used Brute-force hamming as suggested by some OpenCV tutorials that would fit for ORB descriptors. Based on the initial results, Brute-force hamming was able to match descriptors between a source image

Avoid multiple similar foreach - C#
Web Development

I apologize if I'm posting into the wrong community, I'm quite new here.

I have multiple methods using the same foreach loop, changing only the inner method I call:

    public void CalculationMethod1()
        foreach (Order order in ordersList)
            foreach (Detail obj_detail in order.Details)

fprintf and fwrite (written bytes to fp)
Web Development

I have question about fprintf and fwrite. How many bytes are written when this code runs (assuming fp has been correctly set up).

int i = 10000;



When I checked then 5 bytes and 9 bytes respectively. Maybe I am wrong. I thought it is 4 bytes since int. Can someone explain please??? Thanks.

Can't use DateTime in simple c# program
Web Development

I have this really simple code in Microsoft Visual Studio C# 2013:

//all stuff I include
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient; //sql DB
using System.Media; //media player

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .