|
thx, but i've read that. actually what i need is more like a graphology application instead of only recognize the pattern.
|
|
|
|
|
Hi all,
I try to send data to my workflow machine state asynchronously.
I have +- 15 states, and I want a listener who catch data at any time.
I try with this : Asynchronous and Event-Based Activities
But it doesn't work (I can catch data, but just one time )
Do you have any ideas to do that?
Thank you for your help!
|
|
|
|
|
Hello, I have a dude: How could I make a game similar to Solitaire?. I program in Visual C# 2010 but I'm limited to work with formularies ( for my knowledges ) . How I can make moving effects? for example, the drag effect when you catch a poker card?.Or for example, How could I make a MS Word ? only the appearance? Do you know some tutorial? Thanks Family ! I just hope that you understean my dude.
|
|
|
|
|
|
|
tsw1985 wrote: Are you crazy men ?
Yes, we are Legion
I fail to see how that's relevant to your question though. You requested an example on solitaire, and there's an article on site that shows how to create one. It was either that, or a link to MSDN on drag & drop. Seemed that the article was more appropriate.
Did I misunderstand your query?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Ok tanks, plasta mierda. 
|
|
|
|
|
tsw1985 wrote: Ok tanks, plasta mierda. Most of the other readers do not speak Spanish, and this will cause them to think that I solved your problem. All that they read is "Ok, thanks".
You can vote on any post; if mine was not good, then downvote it - you wouldn't be the first to do so. My answer will show up in a grey color, giving the other readers a hint that your question was not answered as should have been. Alternatively, you can try a repost within a few days, preferably with a backlink to this thread, explaining why it isn't satisfactory.
I honestly did not want to offend you, and others here will reply in a different tone and manner.
If I may be so bold, I would like to hear what I said/did wrong. Might prevent me from being a PITA again.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
Eau de Merlot, 2011
|
|
|
|
|
Eddy, you have "angelic patience" in responding so frequently to non-native English speakers' questions: I greatly respect that !
But, do you realize that this obnoxious OP, is saying (literally) "sh*t cake" when he uses the words "plasta meirda" ?
best, Bill
"Takuan Sōhō died in Edo (present-day Tokyo) in December of 1645. At the moment before his death, Takuan painted the Chinese character 'meng' ("dream"), laid down his brush and died."
|
|
|
|
|
Thanks
The word "plasta" was new for me.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Could you please point out what you thought was wrong with the answer you were given? It answered your question. Heck, it even linked to code. And yet your post translates to "boring sh!t" That's not very respectfful of you; extremely childish, and with anyone less tolerant than Eddy would have ended up with you getting kicked off this site faster than you can say "Hasta la Vista".
In future, try to show more respect.
|
|
|
|
|
Hello,
I wrote this a while ago and I need some help converting it to C#.
"( _value = Asc(Mid(LStr, IValue, 1)))"
|
|
|
|
|
Mid is the equivalent of Substring . Rather than passing in LStr, you use Substring on that, so you'd have LStr.Substring . LValue is the start position and 1 is the length that you pass in to the Substring method.
Asc just returns the ASCII code, so all you need to do is convert the single character from your Substring to an int .
|
|
|
|
|
Thanks I did the following.
I added the VisualBasic Reference and used Strings.Asc.
Then for the Mid I use:
public static string Mid(string param, int startIndex, int length)
{
string result = param.Substring(startIndex, length);
return result;
}
|
|
|
|
|
blackchaosv2 wrote: I added the VisualBasic Reference and used Strings.Asc
There was no reason to do this. It is easily accomplished without adding a heavy DLL reference. There are many, many ways to get the char out - one way is to use char.Parse(Mid(LStr, startIndex, 1)) and then cast this to an int .
|
|
|
|
|
Is this not just
char _value = LStr[IValue];
... or possibly
int _value = (int)LStr[IValue];
... ?
|
|
|
|
|
Remember, legacy VB string functions are 1-based, not 0-based, so the equivalent is:
_value = Convert.ToInt32(LStr[IValue - 1]));
David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
Instant C# - VB to C# Converter
Instant VB - C# to VB Converter
|
|
|
|
|
Unless he's got the position using one of the inbuilt .NET routines.
|
|
|
|
|
How to Read data from the mobilephone through usb port,and get contact list
|
|
|
|
|
Different phones will have different operating-systems, and there's not a uniform way of getting the contact-list out.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I have a method that creates this value:
0x0001000000FFFFFFFF01000000000000000601000000036162630B
It is stored in the DB as <Binary Data>.
I use Select value from table where id = 1234.
This is the code that writes creates the value:
public void SetSessionData(string token, object data)
{
DataService ds = null;
try
{
ds = new DataService();
using (MemoryStream stream = new MemoryStream())
{
DALArgs args = new DALArgs();
ds.SetRealmConnection(_realm);
Args.Add("sessionkey", _sessionkey);
args.Add("sessiontoken", token);
BinaryFormatter b = new BinaryFormatter();
b.Serialize(stream, data);
stream.Position = 0;
byte[] buffer = new byte[stream.Length];
stream.Read(buffer, 0, buffer.Length);
args.Add("sessionvalue", buffer);
ds.Execute("olb_SetSessionData", args);</pre>
I'm trying to figure out how I can assign the results of the select statement to a variable and create this response:
0
1
0
0
0
255
255
255
255
1
0
0
0
0
0
0
0
6
1
0
0
0
3
97
98
99
That array comes from this:
if (reader.Read())
{
byte[] data = (byte[])reader["SessionValue"];
I hope that is enough information, and that it can be done.
Any help is appreciated.
|
|
|
|
|
In a C# 2008 application, the code listed below ends up in the catch exception block. The error message says the file can not be
located in the specified location: "C://temp//09-24-2012//companyname_company.xlsx".
The value for the String fileName in the createCust is obtained from the value passed
to this method. The file does exist on the specified location.
The code I am referring to is listed below:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common.Logging;
using System.IO;
namespace sample1
{
public class Helper1
{
private static ILog log = LogManager.GetCurrentClassLogger();
public Customer createCust(String CustId, String fileName)
{
Customer cst = new Customer();
byte[] buffer = null;
try
{
System.IO.FileStream fileStream = new System.IO.FileStream(fileName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
System.IO.BinaryReader binaryReader = new System.IO.BinaryReader(fileStream);
long totalBytes = new System.IO.FileInfo(fileName).Length;
buffer = binaryReader.ReadBytes((Int32)totalBytes);
DateTime attachmentId = DateTime.Now;
cst.Id = attachmentId.ToString();
cst.MimeType = getMimeType(fileName);
cst.Value = buffer;
fileStream.Close();
binaryReader.Close();
}
catch (Exception e)
{
throw new Exception(e.Message);
}
return cust;
}
}}
I do not have any idea of why the file can not be located. The file exists in the path
that is passed to the createCust method. The location of the file path is specified as,
"C://temp//09-24-2012//companyname_company.xlsx".
Thus can you tell me what could be causing the file not to be located and how to fix the problem?
|
|
|
|
|
Maybe a permissions or a UAC issue - can you access this file directly?
|
|
|
|
|
You are using double forward slashes in C://temp//09-24-2012//companyname_company.xlsx , which is not a valid path in Windows. It should be C:\\temp\\09-24-2012\\companyname_company.xlsx .
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
True for the Windows API but not for the .NET System.IO classes which will accept either flavour of path separator. The redundant 'escaping' in the forward slashed path string is also gracefully ignored.
Alan.
|
|
|
|