I'm connecting to my Ubuntu server (its actually a VirtualBox virtual machine on the same physical box) using putty and xming.
Is there a way to set my GTK+ appearance/theme so that my GTK+ apps don't look so bland?
When I'm logged into our Windows Server 2003 server, I don't see any ODBC Data Sources, but when a different user logs in (who doesn't have Administrative rights), they have a big list of ODBC Data Sources.
Are ODBC Data Sources set on a per-user basis? How come the Administrator can't see user's ODBC Data Sources?
I use Gmail with Thunderbird, which is working great, except for the part where I get a new email. It shows me the new email twice when notifying because it appears in both the inbox and All Mail folders. I know I can just unsubscribe to the All Mail folder, but then I can't back it up like many people do with Thunderbird. How do I set Thunderbird to notify me of new emails in only certain folders?
Right now I am using an absolute path to connect i.e.
server/var/svnroot/repositoryname
I would like to be able to do
/server/repoistoryname
Is there a way to set this up? I would like to avoid symmlinks since that adds overhead. I would rather just have SVN automatically goto the folder similar to how the DocumentRoot works with Apache.
I want to set the title of image files (view Properties - tab Details - Title textbox) to be their filenames by running a command from command line. How can I do this?
I've noticed in git and various scripts, there is a default user email address. This seems to default to user [email protected]. Is there a way for me to set this to my ral email address?
Back in the day when i was using windows(and a noob at everything IT) i liked batch scripting so much that i wrote a lot of them and one i am pretty proud of that is my backup.cmd(see below).
I am pretty basic with the linux bash sudo/apt-get/sl/ls/locate/updatedb/etc...
I don't really know the full power of the terminal. If you see the code below can i get it to work under (Ubuntu)linux :) by rewriting some of the windows code with the linux equivalent (btw:this works under xp/vista/7 | dutch/english)
@echo off
title back it up
:home
cls
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º º
echo º typ A/B for the options º
echo º º
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º º
echo º "A"=backup options º
echo º º
echo º "B"=HARDDISK Options º
echo º º
echo º º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
set /p selection=Choose:
Goto %selection%
:A
cls
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º º
echo º typ 1 to start that backup º
echo º º
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º º
echo º "A"=backup options º
echo º È1=Documents,Pictures,Music,Videos,Downloads º
echo º º
echo º "B"=HARDDISK Options º
echo º º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
set /p selection=Choose:
Goto %selection%
:B
cls
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º º
echo º typ HD to start the disk check º
echo º º
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º º
echo º "A"=backup options º
echo º º
echo º "B"=HARDDISK Options º
echo º ÈHD=find and repair bad sectors º
echo º º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
set /p selection=Choose:
Goto %selection%
:1
cls
if exist "%userprofile%\desktop" (set desk=desktop) else (set desk=Bureaublad)
if exist "%userprofile%\documents" (set docs=documents) else (set docs=mijn documenten)
if exist "%userprofile%\pictures" (set pics=pictures) else (echo cant find %userprofile%\pictures)
if exist "%userprofile%\music" (set mus=music) else (echo cant find %userprofile%\music)
if exist "%userprofile%\Videos" (set vids=videos) else (echo cant find %userprofile%\videos)
if exist "%userprofile%\Downloads" (set down=downloads) else (echo cant find %userprofile%\Downloads)
cls
echo. examples (D:\) (D:\Backup) (D:\Backup\18-4-2011)
echo.
echo. if there is no "D:\backup" folder then the folder will be created
echo.
set drive=
set /p drive=storage:
echo start>>backup.log
echo Name:%username%>>backup.log
echo Date:%date%>>backup.log
echo Time:%time%>>backup.log
echo ========================================%docs%===========================================>>backup.log
echo %docs%
echo Source:"%userprofile%\%docs%"
echo Destination:"%drive%\%username%\%docs%"
echo %time%>>backup.log
xcopy "%userprofile%\%docs%" "%drive%\%username%\%docs%" /E /I>>Backup.log
echo 20%%
cls
echo ========================================"%pics%"=========================================>>backup.log
echo "%pics%"
echo Source:"%userprofile%\%pics%"
echo Destination:"%drive%\%username%\%pics%"
echo %time%>>backup.log
xcopy "%userprofile%\%pics%" "%drive%\%username%\%pics%" /E /I>>Backup.log
echo 40%%
cls
echo ========================================"%mus%"=========================================>>backup.log
echo "%mus%"
echo Source:"%userprofile%\%mus%"
echo Destination:"%drive%\%username%\%mus%"
echo %time%>>backup.log
xcopy "%userprofile%\%mus%" "%drive%\%username%\%mus%" /E /I>>Backup.log
echo 60%%
cls
echo ========================================"%vids%"========================================>>backup.log
echo %vids%
echo Source:"%userprofile%\%vids%"
echo Destination:"%drive%\%username%\%vids%"
echo %time%>>backup.log
xcopy "%userprofile%\%vids%" "%drive%\%username%\%vids%" /E /I>>Backup.log
echo 80%%
cls
echo ========================================"%down%"========================================>>backup.log
echo "%down%"
echo Source:"%userprofile%\%down%"
echo Destination:"%drive%\%username%\%down%"
echo %time%>>backup.log
xcopy "%userprofile%\%down%" "%drive%\%username%\%down%" /E /I>>Backup.log
echo end>>backup.log
echo %username% %date% %time%>>backup.log
echo 100%%
cls
echo backup Compleet
copy "backup.log" "%drive%\%username%"
del "backup.log"
pushd "%drive%\%username%"
echo close backup.log to continue with backup script
"backup.log"
echo press any key to retun to the main menu
pause>nul
goto :home
:HD
echo finds and repairs bad sectors
echo typ in harddisk letter (C: D: E:)
set HD=
set /p HD=Hard Disk:
chkdsk %HD% /F /R /X
pause
goto :home
I have little Lotus Script or Notes/Domino knowledge but I have a procedure, copied from somewhere a long time ago, that allows me to email through Notes from VBA. I normally only use this for internal notifications where the formatting hasn't really mattered.
I now want to use this to send external emails to a client, and corporate types would rather the email complied with our style guide (a sans-serif typeface basically).
I was about to tell them that the code only works with plain text, but then I noticed that the routine does reference some sort of CREATERICHTEXTITEM object. Does this mean I could apply some sort of formatting to the body text string after it has been passed to the mail routine? As well as upholding our precious brand values, this would be quite handy to me for highlighting certain passages in the email.
I've had a dig about the 'net to see if this code could be adapted, but being unfamiliar with Notes' object model, and the fact that online Notes resources seem to mirror the application's own obtuseness, meant I didn't get very far.
The code:
Sub sendEmail(EmailSubject As String, EMailSendTo As String, EMailBody As String, MailServer as String)
Dim objNotesSession As Object
Dim objNotesMailFile As Object
Dim objNotesDocument As Object
Dim objNotesField As Object
Dim sendmail As Boolean
'added for integration into reporting tool
Dim dbString As String
dbString = "mail\" & Application.UserName & ".nsf"
On Error GoTo SendMailError
'Establish Connection to Notes
Set objNotesSession = CreateObject("Notes.NotesSession")
On Error Resume Next
'Establish Connection to Mail File
Set objNotesMailFile = objNotesSession.GETDATABASE(MailServer, dbString)
'Open Mail
objNotesMailFile.OPENMAIL
On Error GoTo 0
'Create New Memo
Set objNotesDocument = objNotesMailFile.createdocument
Dim oWorkSpace As Object, oUIdoc As Object
Set oWorkSpace = CreateObject("Notes.NotesUIWorkspace")
Set oUIdoc = oWorkSpace.CurrentDocument
'Create 'Subject Field'
Set objNotesField = objNotesDocument.APPENDITEMVALUE("Subject", EmailSubject)
'Create 'Send To' Field
Set objNotesField = objNotesDocument.APPENDITEMVALUE("SendTo", EMailSendTo)
'Create 'Copy To' Field
Set objNotesField = objNotesDocument.APPENDITEMVALUE("CopyTo", EMailCCTo)
'Create 'Blind Copy To' Field
Set objNotesField = objNotesDocument.APPENDITEMVALUE("BlindCopyTo", EMailBCCTo)
'Create 'Body' of memo
Set objNotesField = objNotesDocument.CREATERICHTEXTITEM("Body")
With objNotesField
.APPENDTEXT emailBody
.ADDNEWLINE 1
End With
'Send the e-mail
Call objNotesDocument.Save(True, False, False)
objNotesDocument.SaveMessageOnSend = True
'objNotesDocument.Save
objNotesDocument.Send (0)
'Release storage
Set objNotesSession = Nothing
Set objNotesMailFile = Nothing
Set objNotesDocument = Nothing
Set objNotesField = Nothing
'Set return code
sendmail = True
Exit Sub
SendMailError:
Dim Msg
Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
sendmail = False
End Sub
I am using iso-8859-15 encoding both in xml data and in the xslt style sheet. But when I try convert XML doc to FO document 'œ' does'nt show up it shows up as '?' Below is the example of the problem I am facing.
The xml data is as follows:
Nous sommes sous l'emprise du Divin cœur de Celui que mon fils vénère par-dessus
in the fo file the same line is generated as :
--------Nous sommes sous l'emprise du Divin c?ur de Celui que mon fils vénère par-dessus
As you see all the other accents are getting generated fine except for the 'œ'character.
Any help is greatly appreciated. This one issue is holding up a project.
I need to search for accounts in Microsoft CRM, using a wildcard search to get a "contains" search for the user's input. So if the user enters "ABC", I use ConditionOperator.Like and the value "%ABC%".
My question is, how would I search for a customer name that contains a percentage sign, such as "100% Great llc"? I can't find a way to escape the %.
My project was originally set to Binary Compatibility, but it was not building. So I first set it to No Compatibility, it built fine that way. Then I set it back to Binary Compatibility, and overwrote over the previously generated file, it worked fine.
Why does this have to happen?
I have a set of vertices(called A) and I want to find all the border vertices such that this border vertices set is an outline of the shape.
Many of the vertices in A are redundant because they are inside the shape, I want to get rid of these vertices.
My question is similar to http://stackoverflow.com/questions/477867/best-algorithm-to-find-the-edges-polygon-of-vertices but i need it to work for a non-convex polygon case.
I feel kind of dumb posting this when this seems kind of simple and there are tons of questions on strings/characters/regex, but I couldn't find quite what I needed (except in another language: http://stackoverflow.com/questions/2176544/remove-all-text-after-certain-point).
I've got the following code:
[Test]
public void stringManipulation()
{
String filename = "testpage.aspx";
String currentFullUrl = "http://localhost:2000/somefolder/myrep/test.aspx?q=qvalue";
String fullUrlWithoutQueryString = currentFullUrl.Replace("?.*", "");
String urlWithoutPageName = fullUrlWithoutQueryString.Remove(fullUrlWithoutQueryString.Length - filename.Length);
String expected = "http://localhost:2000/somefolder/myrep/";
String actual = urlWithoutPageName;
Assert.AreEqual(expected, actual);
}
I tried the solution in the question above (hoping the syntax would be the same!) but nope. I want to first remove the queryString which could be any variable length, then remove the page name, which again could be any length.
How can I get the remove the query string from the full URL such that this test passes?
Ok... I know about the difference between the base/active SDKs and the deployment target. I have my base SDK set at 4.0 and the deployment target set at 2.0. I am not using any APIs post 2.x, conditional or otherwise. Since I can't debug on a 2.x device, after building it, I use the iPhone Configuration Utility to install the app on the device, which it does just fine. Problem is, it doesn't run! I just get a blank screen. The main window never comes up!
Now before you ask...
I had this same problem with the iPhone SDK 3.x. I upgraded to the 4.x hoping it would be solved. It wasn't.
Yes the provisioning profile is installed. (Couldn't install the app if it wasn't.)
This same compiled app works fine on 3.x devices. Same with 4.x devices. Just not 2.x devices.
Again, no I am not using any post-2.x SDKs. To prove this I created a brand-new, window-based app from the 'New Project' dialog and the only changes I made was the background color of the window (to prove the XIB loaded) and I set the deployment target to 2.0 (It's still compiled against the 4.x SDK though.) Again, it runs fine on 3.x or 4.x devices, but just a black, blank screen on 2.x devices.
I've tried this on three separate 2.x devices included one freshly restored. I've used three separate dev machines (MacBook Pro with the 3.x SDK, MacBook Pro with the 4.x SDK and a Mac Pro with the 3.x SDK.) Same result every time.
I am stumped.
The fact that even an unmodified project doesn't run really has me confused. Could it be the XIB file? Did they change the format from 2.x to something newer in the 3.x SDK? If so, how do I set it back to 2.x. (Again, this is just a complete guess.) But I'm really stumped!
Mark
I'd like to set the title of a UIButton via code. I find myself having to call -[UIButton setTitle:forState:] for UIControlStateNormal, UIControlStateHighlighted, UIControlStateDisabled, UIControlStateSelected. And that doesn't even take into account all of the combinations of these states together.
Needless to say, this is tiresome. Is there a single call I can make that will set one string as the title for all of the states? (Since, I assume that in 95% of the cases, that's the desired behavior?)
Can a compound key be set as a primary key to another table?
For instance i have the tables:
Books -with Primary Key:Product_ID
Client -with Primary key: Client_ID
Clients_Books -with Compound Primary Key:Product_Id and Client_ID
I want to set this compound Primary key from Clients_Books as a Primary Key to another table named: Order_Details. But I don't want to use the Product_ID and the Client_ID from the Books, Clients tables.
Does this make sense? All opinions more than welcome.
e.g
string = "This is a re@lly long long,long! sentence";
becomes
string = "This is a long sentence";
Basically so all non-alphanumeric words or removed keeping spaces in tacked
Any ideas?
Hello,
I have Order,OrderDetails and OrderStatus objects as shown below:
public class Order
{
public override int OrderId { get; set; }
public string FName { get; set; }
public string MName { get; set; }
public string LName { get; set; }
public string Street { get; set; }
public string City { get; set; }
public List<OrderDetails> OrderDetails { get; set; };
}
public class OrderDetails
{
public override int OrderdetailsId { get; set; }
public int OrderId { get; set; }
public int ProductID { get; set; }
public int Qty { get; set; }
public List<OrderStatus> OrderStat { get; set; };
}
public class OrderStatus
{
public override int OrderdetailsStatusId { get; set; }
public int OrderdetailsId { get; set; }
public int StatusID { get; set; }
}
I cannot use LinQ. I want to populate the order object like we do in LinQ.
How do I populate all all the properties in Order object:
for eg.
Order o =new Order();
o.FName="John";
o.LName="abc";
o.Street="TStreet";
o.City="Atlanta";
then
o.Orderdetails.Add(orderdetails)
How do I do that here in C# when not using LinQ.
Hi all,
I am using Jetty 6 and was wondering when the QueuedThreadPool should be used over the ThreadPool? By default, Jetty 6 comes configured with the QueuedThreadPool.
My server has Java 6 installed so I was thinking that I should use the ThreadPool:
<New class="org.mortbay.thread.QueuedThreadPool">
<Set name="minThreads">10</Set>
<Set name="maxThreads">200</Set>
<Set name="lowThreads">20</Set>
<Set name="SpawnOrShrinkAt">2</Set>
</New>
<New class="org.mortbay.thread.concurrent.ThreadPool">
<Set name="corePoolSize">50</Set>
<Set name="maximumPoolSize">50</Set>
</New>
Thanks,
Walter
I am unsure where goes wrong.
Please kindly help and thanks.
Public Sub AddField()
Dim pApp As esriCatalogUI.IGxApplication
Set pApp = esriArcCatalog.Application
Dim pGxSelection As esriCatalog.IGxSelection
Set pGxSelection = pApp.Selection
Dim plist As esriCatalog.IEnumGxObject
Set plist = pGxSelection.SelectedObjects
Dim pGxObject As esriCatalog.IGxObject
Dim pName As esriSystem.IName
Dim pDS As esriGeoDatabase.IDataset
Dim pGDSE As esriGeoDatabase.IGeoDatasetSchemaEdit
Dim pStatusBar As esriSystem.IStatusBar
Set pStatusBar = esriArcCatalog.Application.StatusBar
Dim pFeatLyr As esriCarto.IFeatureLayer
Dim pFeatureClass As esriGeoDatabase.IFeatureClass
Dim pFeatureDataset As esriGeoDatabase.IFeatureDataset
Dim pFieldEdit As esriGeoDatabase.IFieldEdit
Set pGxObject = plist.Next
Set pFeatureClass = pGxObject
If pFeatureClass.Type = esriDTFeatureClass Then
Set pFeatLyr = New FeatureLayer
Set pFeatLyr.FeatureClass = pFeatureDataset.Dataset
pFeatLyr.name = pGXDataset.Dataset.name
End If
'Checks to make sure you have something selected
If pGxObject Is Nothing Then
MsgBox "You need to select the files", vbOKOnly, "Error"
Exit Sub
End If
'Runs a function to add field
Dim pField1 As esriGeoDatabase.IFieldEdit
' Define the first new field.
Set pField1 = New Field
pField1.Name = "GID1"
pField1.Type = esriFieldTypeInteger
pField1.Length = 10
pFeatureClass.AddField pField1
'Loops through all selected files and preforms
Do Until pGxObject Is Nothing
If TypeOf pGxObject Is esriCatalog.IGxDataset Then
Set pName = pGxObject.InternalObjectName
Set pDS = pName.Open
Set pGDSE = pDS
With pGDSE
If .CanAlterSpatialReference Then
.AlterSpatialReference pFieldEdit
End If
End With
End If
pStatusBar.Message(0) = "Done: " & pGxObject.Name
Set pGxObject = plist.Next
Loop
CleanUp:
Set pFieldEdit = Nothing
Set pGDSE = Nothing
pStatusBar.Message(0) = "Done"
End Sub
I was given the following forumulae for calculating this
sim=|QnD| / v|Q|v|D|
I went ahed and implemented a class to compare strings consisting of a series of words
#pragma once
#include <vector>
#include <string>
#include <iostream>
#include <vector>
using namespace std;
class StringSet
{
public:
StringSet(void);
StringSet( const string the_strings[], const int no_of_strings);
~StringSet(void);
StringSet( const vector<string> the_strings);
void add_string( const string the_string);
bool remove_string( const string the_string);
void clear_set(void);
int no_of_strings(void) const;
friend ostream& operator <<(ostream& outs, StringSet& the_strings);
friend StringSet operator *(const StringSet& first, const StringSet& second);
friend StringSet operator +(const StringSet& first, const StringSet& second);
double binary_coefficient( const StringSet& the_second_set);
private:
vector<string> set;
};
#include "StdAfx.h"
#include "StringSet.h"
#include <iterator>
#include <algorithm>
#include <stdexcept>
#include <iostream>
#include <cmath>
StringSet::StringSet(void)
{
}
StringSet::~StringSet(void)
{
}
StringSet::StringSet( const vector<string> the_strings)
{
set = the_strings;
}
StringSet::StringSet( const string the_strings[], const int no_of_strings)
{
copy( the_strings, &the_strings[no_of_strings], back_inserter(set));
}
void StringSet::add_string( const string the_string)
{
try
{
if( find( set.begin(), set.end(), the_string) == set.end())
{
set.push_back(the_string);
}
else
{
//String is already in the set.
throw domain_error("String is already in the set");
}
}
catch( domain_error e)
{
cout << e.what();
exit(1);
}
}
bool StringSet::remove_string( const string the_string)
{
//Found the occurrence of the string. return it an iterator pointing to it.
vector<string>::iterator iter;
if( ( iter = find( set.begin(), set.end(), the_string) ) != set.end())
{
set.erase(iter);
return true;
}
return false;
}
void StringSet::clear_set(void)
{
set.clear();
}
int StringSet::no_of_strings(void) const
{
return set.size();
}
ostream& operator <<(ostream& outs, StringSet& the_strings)
{
vector<string>::const_iterator const_iter = the_strings.set.begin();
for( ; const_iter != the_strings.set.end(); const_iter++)
{
cout << *const_iter << " ";
}
cout << endl;
return outs;
}
//This function returns the union of the two string sets.
StringSet operator *(const StringSet& first, const StringSet& second)
{
vector<string> new_string_set;
new_string_set = first.set;
for( unsigned int i = 0; i < second.set.size(); i++)
{
vector<string>::const_iterator const_iter = find(new_string_set.begin(), new_string_set.end(), second.set[i]);
//String is new - include it.
if( const_iter == new_string_set.end() )
{
new_string_set.push_back(second.set[i]);
}
}
StringSet the_set(new_string_set);
return the_set;
}
//This method returns the intersection of the two string sets.
StringSet operator +(const StringSet& first, const StringSet& second)
{
//For each string in the first string look though the second and see if
//there is a matching pair, in which case include the string in the set.
vector<string> new_string_set;
vector<string>::const_iterator const_iter = first.set.begin();
for ( ; const_iter != first.set.end(); ++const_iter)
{
//Then search through the entire second string to see if
//there is a duplicate.
vector<string>::const_iterator const_iter2 = second.set.begin();
for( ; const_iter2 != second.set.end(); const_iter2++)
{
if( *const_iter == *const_iter2 )
{
new_string_set.push_back(*const_iter);
}
}
}
StringSet new_set(new_string_set);
return new_set;
}
double StringSet::binary_coefficient( const StringSet& the_second_set)
{
double coefficient;
StringSet intersection = the_second_set + set;
coefficient = intersection.no_of_strings() / sqrt((double) no_of_strings()) * sqrt((double)the_second_set.no_of_strings());
return coefficient;
}
However when I try and calculate the coefficient using the following main function:
// Exercise13.cpp : main project file.
#include "stdafx.h"
#include <boost/regex.hpp>
#include "StringSet.h"
using namespace System;
using namespace System::Runtime::InteropServices;
using namespace boost;
//This function takes as input a string, which
//is then broken down into a series of words
//where the punctuaction is ignored.
StringSet break_string( const string the_string)
{
regex re;
cmatch matches;
StringSet words;
string search_pattern = "\\b(\\w)+\\b";
try
{
// Assign the regular expression for parsing.
re = search_pattern;
}
catch( regex_error& e)
{
cout << search_pattern << " is not a valid regular expression: \""
<< e.what() << "\"" << endl;
exit(1);
}
sregex_token_iterator p(the_string.begin(), the_string.end(), re, 0);
sregex_token_iterator end;
for( ; p != end; ++p)
{
string new_string(p->first, p->second);
String^ copy_han = gcnew String(new_string.c_str());
String^ copy_han2 = copy_han->ToLower();
char* str2 = (char*)(void*)Marshal::StringToHGlobalAnsi(copy_han2);
string new_string2(str2);
words.add_string(new_string2);
}
return words;
}
int main(array<System::String ^> ^args)
{
StringSet words = break_string("Here is a string, with some; words");
StringSet words2 = break_string("There is another string,");
cout << words.binary_coefficient(words2);
return 0;
}
I get an index which is 1.5116 rather than a value from 0 to 1.
Does anybody have a clue why this is the case?
Any help would be appreciated.
I would like to set the focus on the first row of a data grid.
This is what I have so far:
Keyboard.Focus(ResultsGrid)
If result.Count > 0 Then
ResultsGrid.SelectedIndex = 0
End If
This will set the focus to the datagrid, but not the row itself.