|
I think the problem is here:
if (searchResult.Properties.Contains("thumbnailPhoto"))
{
dr["thumbnailPhoto"] = byteArrayToImage((byte[])searchResult.Properties["thumbnailPhoto"][0]);
}
Or maybe in the asp code.
At the moment I get a table with every field populated how it is intended to be however the thumbnailPhoto field display a image of an X as though it isn't being pulled through.
If I run the command Response.BinaryWrite(staffPic); it displays the image on a complete blank screen.
What I'm trying to do is pull through the thumbnailPhoto pic into the datatable and then onto the gridview
|
|
|
|
|
Hi everybody,
On my Windows Mobile 6.5 application (developped in C# and DOTNET 3.5), I want use a VPN connection. My goals is the following: I connect my PDA on my PC via USB. Then, by clicking on a button of my WinCE application, I would send http request (with the object "HttpWebRequest" of C#) directly on PC (because VPN would be intalled on the PC).
I have already searched a solution of my problem but I have not found a solution.
Have you got an idea to do this?
Best regards
|
|
|
|
|
Wakonda wrote: Have you got an idea to do this? Google for instructions on how to set up VPN.
Wakonda wrote: directly on PC (because VPN would be intalled on the PC). ..if you're trying to talk to the server-VPN using TCP/IP from the mobile device, then that's not going to work. Try talking to a webserver on the PC.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i think you should write another application for your PC also which will receive requests from your windows phone and talk with VPN connection in pc and again send results to your phone but talking directly with windows phone is not a good and practical approach!
|
|
|
|
|
That could also be considered as opening a security hole in the VPN!
|
|
|
|
|
I am trying to move items up and down in generic list but not getting desired results If I have 5 items and and one their be 6 with order id's of 1 to 6 then when i move an item up one position via button click say item 6 it would become 5 and what was at 5 would become 6.
Can Someone help me out here please on the logic below?
ObservableCollection<CustomColumnsModel> columnsList = this.WizardData.ConcreteCustomColumnsProxy;
Extensions.MoveItemUp(columnsList, this.listView1.SelectedIndex);
List<CustomColumnsModel> forUpdate = new List<CustomColumnsModel>();
int offset = 0;
foreach (CustomColumnsModel item in this.listView1.Items)
{
if (this.listView1.SelectedItems.Contains(item))
{
offset++;
item.CustomColumnsOrder--;
}else
item.CustomColumnsOrder += offset;
}
|
|
|
|
|
Message Closed
modified 9-Sep-14 4:52am.
|
|
|
|
|
Not true, this is a perfectly valid question for this forum.
|
|
|
|
|
My point is that in order to get more answers it might be better to post it in the quick answers section.
Just look at the number of responses during almost 24 hours.
|
|
|
|
|
That's hardly a reason to repost it.
|
|
|
|
|
|
Given a List of Integers:
List<int> positions = new List<int>{1,2,3,4,5};
How would I code a loop to get the following results for a given number of iterations {n}:
n P1 P2
1 1 5
2 2 1
3 3 2
4 4 3
5 5 4
6 1 5
7 2 1
8 3 2
9 4 3
10 5 4
...
This should be simple but I have brain freeze.
I don't speak Idiot - please talk slowly and clearly
"I have sexdaily. I mean dyslexia. Fcuk!"
Driven to the arms of Heineken by the wife
|
|
|
|
|
p1 almost looks like n mod 5 + (5 iif prev result is 0)
p2 almost looks like p1 - 1 + (5 iif prev result is 0)
'g'
|
|
|
|
|
List<int> positions = new List<int> { 1, 2, 3, 4, 5 };
for (int n = 1, p1 = 0, p2 = 4; n <= 10; ++n, ++p1, ++p2)
{
p1 %= positions.Count;
p2 %= positions.Count;
Console.WriteLine("{0,2} {1} {2}", n, positions[p1], positions[p2]);
}
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
That works well and creates the list for n iterations.
How about finding the value of p1 and p2 when n is a defined number?
int n = 23;
p1 = ?
p2 = ?
...
I don't speak Idiot - please talk slowly and clearly
"I have sexdaily. I mean dyslexia. Fcuk!"
Driven to the arms of Heineken by the wife
|
|
|
|
|
If n starts with 1, then
p1 = (n-1) % positions.Count;
p2 = (positions.Count + n - 2) % positions.Count;
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
Here what I ended up using:
public List<int> GetPositions(int n, int posCount)
{
int pos1 = n % posCount;
int pos2 = pos1 == 0 ? posCount - 1 : pos1 - 1;
return new List<int>{pos1, pos2};
}
...
int n = 0;
List<int> positions = new List<int>{0,1,2,3,4};
while( n < 10)
{
List<int> res = GetPositions(n, positions.Count)
Console.WriteLine("Count{0}: Pos1 {1} - Pos2 {2}", n, res[0], res[1]);
n++;
}
Thanks to you and G for your help clearing the fog!
I don't speak Idiot - please talk slowly and clearly
"I have sexdaily. I mean dyslexia. Fcuk!"
Driven to the arms of Heineken by the wife
|
|
|
|
|
You are welcome.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
+5 for this wonderful code "haiku"
“I have diligently numbered the days of pure and genuine happiness which have fallen to my lot: They amount to 14.” Abd-Ar Rahman III, Caliph of Cordoba, circa 950CE.
|
|
|
|
|
Thank you.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
I hope this doesn't sound picky-picky, but I kept studying the line of code that writes to the Console:
Console.WriteLine("{0,2} {1} {2}", n, positions[p1], positions[p2]);
Thinking that {0,2} did some exotic thing I had never seen before, but it appears it actually does nothing, and changing it to {0} produces no change in the output. Or, am I missing something ?
Once again, thanks for the great code example: you've expanded my understanding of what a C# 'for loop can do !
thanks, Bill
“I have diligently numbered the days of pure and genuine happiness which have fallen to my lot: They amount to 14.” Abd-Ar Rahman III, Caliph of Cordoba, circa 950CE.
|
|
|
|
|
It's putting the space before the single digit numbers. Try changing it {0,4} to see the effect in greater detail.
|
|
|
|
|
Exactly.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
Thanks Pete !
“I have diligently numbered the days of pure and genuine happiness which have fallen to my lot: They amount to 14.” Abd-Ar Rahman III, Caliph of Cordoba, circa 950CE.
|
|
|
|
|
The MSDN documentation is reasonably clear (for once!):
A format item has this syntax:
{index[,alignment][:formatString]}
...
alignment
Optional. A signed integer that indicates the total length of the field into which the argument is inserted and whether it is right-aligned (a positive integer) or left-aligned (a negative integer). If you omit alignment, the string representation of the corresponding argument is inserted in a field with no leading or trailing spaces.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|