Hi, i'have two Listbox. the think is i do the transfert like : click on field in the left listbox, hit "move right" button and it wll display in the right list box.'
The other think it's the first Listbox is bind on Dataset and the second on Entity (Linq-to sql).
So when i click on the move next i do that :
Dim newSite As New List(Of vw_SiteList)
For Each row As SitesDataset.FDDSTRow In SiteAdsListBox.SelectedItems
newSite.Add(New vw_SiteList With { _
.SITECODE = row.DEST_COD, _
.SiteDisplay = row.SiteDisplay, _
.CREATEDBY = Environment.GetEnvironmentVariable("USERNAM"), _
.DATECREATED = Now _
})
Next
JCDataContext.vw_SiteLists.InsertAllOnSubmit(NewSite)
I would like to see now the new field in the right listbox but it isn't there because the field itr's not yet added in the database.
How can i do that?
Thanks
Ju
`public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
if (sc.next().equals("exit")){
System.out.println("EXITING");
System.exit(0);
} else {
System.out.println("IM STILL WORKING ok?");
}
}
}
}`
So here is a piece of code i was writing the other day to try and figure sth out (doesn't really matter what). The result of executing this code is :
eIM STILL WORKING ok?
eIM STILL WORKING ok?
exit
IM STILL WORKING ok?
exit
EXITING
Can somebody kindly explain why this has happened?
I still feel a bit unsafe about the topic and hope you folks can help me -
For passing data (configuration or results) between a worker thread polling something and a controlling thread interested in the most recent data, I've ended up using more or less the following pattern repeatedly:
Mutex m;
tData * stage; // temporary, accessed concurrently
// send data, gives up ownership, receives old stage if any
tData * Send(tData * newData)
{
ScopedLock lock(m);
swap(newData, stage);
return newData;
}
// receiving thread fetches latest data here
tData * Fetch(tData * prev)
{
ScopedLock lock(m);
if (stage != 0)
{
// ... release prev
prev = stage;
stage = 0;
}
return prev; // now current
}
Note: This is not supposed to be a full producer-consumer queue, only the msot recent data is relevant. Also, I've skimmed ressource management somewhat here.
When necessary I'm using two such stages: one to send config changes to the worker, and for sending back results.
Now, my questions
assuming that ScopedLock implements a full memory barrier:
do stage and/or workerData need to be volatile?
is volatile necessary for tData members?
can I use smart pointers instead of the raw pointers - say boost::shared_ptr?
Anything else that can go wrong?
I am basically trying to avoid "volatile infection" spreading into tData, and minimize lock contention (a lock free implementation seems possible, too). However, I'm not sure if this is the easiest solution.
ScopedLock acts as a full memory barrier. Since all this is more or less platform dependent, let's say Visual C++ x86 or x64, though differences/notes for other platforms are welcome, too.
(a prelimenary "thanks but" for recommending libraries such as Intel TBB - I am trying to understand the platform issues here)
I have several SSRS reports which have a textbox at the bottom with a link to a privacy notice page. Some of my users will export these reports to an Excel workbook or a Word document. When the users export the reports, the reporting engine does not include the link in the office documents. When exported as as PDF or HTML, the link to the notice is also exported as expected. Is there a way for me to configure or force the office documents to include the link to the notice and ensure that it is also exported?
I have a very little idea about what database file system is.
Can somebody out here explain to me what actually a database file system is, and what its applications are?
How is it different from a conventional file system?
How I can build it?
I am trying out the .net Code Contracts fro .net 3.5
I have some unit test that I am running PartCover over to calculate the code coverage.
PartCover keeps including the System.Diagnostics.Contracts in my report.
Here are the rules I am using to include MyProject and exclude everything else.
<Rule>+[MyProject.DomainModel]*</Rule>
<Rule>-[System]*</Rule>
<Rule>-[System.Diagnostics]*</Rule>
<Rule>-[System.Diagnostics.Contracts]*</Rule>
Any suggestions?
Hi there,
I need to build a online project monitoring system for my project. Can anyone help me to identify the tools which I can use to build a simple online project monitoring system.
My system requires the following:
1. It should be user driven(multiuser logins)
2. Able to handle document uploads and downloads
3. If it can support spread sheet like document editing it will be good
Thanks,
Need your help.
This is a general question. What are some techniques you employ to prevent the links in your PHP code from breaking every time you move a file or switch a directory?
If I recall correctly, there where at least to desktop programas from sun which were very useful for handling mysql databases...
Now, all I can find is some mysql workbench which is only useful for designing data...
Both programs I'm talking about allowed you to manage servers, create database, create tables, index, perform querys, edit data, etc...
unfortunately I don't even recall there names...
Any idea where I can find them?
thanks a lot
The cluster managing software for managing clusters on a windows server 2005 cluster had a checkbox for "allow application to interact with desktop" when creating a generic application resource. This appears to be gone in the management software for server 2008 clusters. Does anyone know where this option, if it still exists, is?
The following is my code. I want an interface where I have a single line textbox, a multiline textbox with 2 buttons below. I want the multiline textbox to occupy all the space available after rendering the buttons and textbox. For this I created two LinearLayouts inside the main layout. The first one has vertical orientation with layout_width set to fill_parent. The second one is horizontal with fill_parent again.
The first one has a textbox for which I have set the layout_height to fill parent. The second one has two textboxes OK and Cancel.
When I run this application I get the UI, but the Buttons are very small. I have to set the button height manually. What am I doing wrong here. I don't want to hard code the button height.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1">
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Name"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content"></EditText>
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Contents"></TextView>
<EditText android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="top" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1">
<Button android:id="@+id/okbutt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="OK" android:layout_weight="1" />
<Button android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Cancel" android:layout_weight="1" />
</LinearLayout>
Thanks,
Arun
Yesterday s**ked, and today ain't (sic) looking better.
I have an application I have been working on and it can be slow to start when my ISP is down because of DNS. My ISP was down for 3 hours yesterday, so I didn't think much about this piece of code I had added, until I found that it is always slow to start. This code is supposed to return your IP address and my reading of the link suggests that should be immediate, but it isn't, at least on my machine.
Oh, and yesterday before the internet went down, I upgraded (oymoron) to XP SP3, and have had other problems.
So my questions / request:
1. Am I doing this right?
2. If you run this on your machine does it take 39 seconds to return your IP address? It does on mine.
One other note, I did a packet capture and the first request did NOT go on the wire, but the second did, and was answered quickly. So the question is what happened in XP SP3 that I am missing, besides a brain.
One last note. If I resolve a FQDN all is well.
Public Class Form1
'http://msdn.microsoft.com/en-us/library/system.net.dns.gethostaddresses.aspx
'
'excerpt
'The GetHostAddresses method queries a DNS server
'for the IP addresses associated with a host name.
'
'If hostNameOrAddress is an IP address, this address
'is returned without querying the DNS server.
'
'When an empty string is passed as the host name,
'this method returns the IPv4 addresses of the local host
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim stpw As New Stopwatch
stpw.Reset()
stpw.Start()
'originally Dns.GetHostEntry, but slow also
Dim myIPs() As System.Net.IPAddress = System.Net.Dns.GetHostAddresses("")
stpw.Stop()
Debug.WriteLine("'" & stpw.Elapsed.TotalSeconds)
If myIPs.Length > 0 Then Debug.WriteLine("'" & myIPs(0).ToString)
'debug
'39.8990525
'192.168.1.2
stpw.Reset()
stpw.Start()
'originally Dns.GetHostEntry, but slow also
myIPs = System.Net.Dns.GetHostAddresses("www.vbforums.com")
stpw.Stop()
Debug.WriteLine("'" & stpw.Elapsed.TotalSeconds)
If myIPs.Length > 0 Then Debug.WriteLine("'" & myIPs(0).ToString)
'debug
'0.042212
'63.236.73.220
End Sub
End Class
Hi,
I am able to list Documents from "Public Folders"
Using this sample code :
session.LogonExchangeMailbox("[email protected]", "server");
RDOFolder folder = session.GetFolderFromPath(@"\Public Folders\All Public Folders");
Now i want to Extract this documents to another location.
I am working on x86_64 machine. My linux kernel is also 64 bit kernel. As there are different ways to implement a system call (int 80, syscall, sysenter), i wanted to know what type of system call my machine is using. I am newbie to linux. I have written a demo program.
include
int main()
{
getpid();
return 0;
}
getpid() does one system call. Can anybody give me a method to find which type of system call will be used by my machine for this program.. Thank you....
Are there any best-practices that state custom code shouldn't be placed in a System namespace? Should System and its children be reserved for Microsoft code?
I ask because I'm writing a class library that will be used across many projects and I'd like to keep things consistent by placing it in System.InteropServices (since it deals with P/Invoke).
Hi,
i'm developing an application for blackberry, where i need to render html page and page content should be configured according to VerticalFieldManager, means whole content should be displayed without scrolling either Horizontal or Vertical, font size, image size, all should be displayed.
Please help me in this issue.
I'm building a spring application for the first time. I'm running into lots of problems with concurrency, and I suspect that there is something wrong with the way I'm managing the backend. The only difference I can see between my backend code and examples I've seen are manager classes.
In my code, I have my model (managed by hibernate) and my DAOs on top of that to do CRUD/searching/etc on the models. In example code I have looked at, they never use the DAO directly. Instead, they use manager classes that call the DAOs indirectly. To me, this just seems like pointless code duplication.
What are these manager classes for? I've read that they wrap my code in "transactions," but why would I want that?
Hello all
I am using google maps in my application.
I have to show 100 markers on map.
First I prepared a markers array from these markers.
When markers are added using addOverlay from markers array, it takes some time and they are being added in some animated way (in sequence).
I want all of them to get added to map in a single shot, so no flickering effect.
I tried MarkerClusterer but it shows a cluster of markers where the need be. Instead I want all the markers to appear, not a cluster. Only they should be added faster.
var point = new GLatLng(latArr[i],lonArr[i]);
var marker = new GMarker(point,markerOptions);
markers[i] = marker;
var markerCluster = new MarkerClusterer(map, markers);
Any suggestions please? Thank you.
The default Cassandra systems keyspace system is present in all Cassandra installations.
Judging from the output of the describe keyspace command the keyspace it is used partly for "persistent metadata for the local node" (LocationInfo) and partly for "hinted handoff data".
What persistent metadata for the local node is stored in system/LocationInfo?
What is the definition of hinted handoff in Cassandra terminology?
What hinted handoff data is stored in the system keyspace?
This is the flow that I have in my program
277: try:
278: with open(r"c:\afile.txt", "w") as aFile:
...: pass # write data
329: except IOError as ex:
...: print ex
332: finally:
333: if os.path.exists(r"c:\afile.txt"):
334: shutil.copy(r"c:\afile.txt", r"c:\dest.txt")
I've got all paths covered except for from line 278 to line 333
I got a normal happy-flow.
I stubbed __builtin__.open to raise IOError when the open is called with said file name
But how do I go from 278 to 333. Is this even possible?
Additional information:
- using coverage.py 3.4 (only listing 3.5, we can't currently upgrade to 3.5)
I'm looking for a free, open-sourced web application written in C#/VB.Net on top of ASP.Net, which functions like Plesk or cPanel when it comes to (remote) file management. Something that simulates a regular FTP client, but actually displays web pages over HTTP, with the following functions:
Create Folder
Rename File/Folder
Delete File/Folder
Change Timestamp ("Touch")
Move
Archive
etc.
I saw a few commercial tools, but nothing when it comes to OSS.
Any ideas? links?