I have an xml field (Answers) in Sql Server, but when changing the content via Linq-to-Sql, the record is not flagged for updating. e.g. in Linqpad...
var profile = Profiles.FirstOrDefault(p => p.Answers != null);
profile.Answers.SetAttributeValue("date", DateTime.Now.ToString());
GetChangeSet().Dump(); // nothing flagged
profile.Answers = new XElement(profile.Answers); // ends up with correct xml
GetChangeSet().Dump(); // record is flagged as changed
Any suggestions apart from assigning a clone of itself to the field or storing the xml as a string to force the update?
Hi all ,
I'm using Motorola device and developed it with J2ME . I'm searching for a functionality to detect incomming or outcomming calls when dropped .
I mean , when the call is dropped I need to recognize this event.
Thanks
Say that there are no WIFI networks currently available and my network-enabled app is connected over 3G. How can I detect if a user has roamed into a WIFI network? I would also like to detect the case when the user is connected over WIFI and suddenly received 3G signal.
In other words, I would like to be asynchronously notified of network adapter changes. I tried using the SCNetworkReachability framework asynchronously but found that for some reason, I am not receiving Wifi-related events (i.e. adapter on/off) when connected over 3G.
How to detect a column included in WHERE clause but used in indexed?
Little Background:
Until the time the table has few number of records things will be okay, once it started having millions of records then index should be created for a column which is used in WHERE clauses in stored procs, inline queries etc.,
Since we have hundreds of stored procs and queries that often gets changed by the devs I wanted to have a automated way of identifying those columns that are used in WHERE clauses but not an index is created. How to do that in SQL SERVER 2008?
Hi,
Is there any way to detect the type of a webservice inside a httpmodule?
The reason for this is that I want to do some property injection to the webservice before
it's processed.
I found this:
http://social.msdn.microsoft.com/Forums/en/asmxandxml/thread/0e848eee-d353-4e67-b47f-89fddb600009
but that is one h..l of an ugly solution.
Anyone have a nice solution?
I'm porting a game for Symbian which supports both a touch & non-touch UI.
I need to be able to tell if the device has a touch screen on start-up so I can enable the appropriate mode.
After googling for hours and going though the Qt Docs I found QSysInfo but this merely provides the version of the Symbian device.
Is there a way to get the actual capabilities of the device?
There must be a way to tell if the device has a touch screen...!
I'm using the latest QtCreator with the NokiaSDK.
Thank you in advance,
Nikos.
I am unable to figure out why this code is returning false. I had the first version of partial specialization. It did not work, I tried with the second version. It did not work either.
UPDATE: I wanted to check if "Derived" is publicly derived from "Base".
template<class TBase, class TDerived>
struct IsDerived
{
public:
enum { isDerived = false };
};
template<class TBase>
struct IsDerived<TBase, TBase>
{
public:
enum { isDerived = true };
};
template<class TBase>
struct IsDerived<TBase&, TBase&>
{
public:
enum { isDerived = true };
};
int main()
{
cout << ((IsDerived<Base&, Derived&>::isDerived) ? "true" : "false")
<< endl;
cout << ((IsDerived<const Derived*, const Base*>::isDerived) ?
"true" : "false") << endl;
}
Hi all,
On my iphone app, I have a UITableView in edit mode, containing custom UITableViewCell.
I would like to detect when user has clicked on the left button of each cell (minus circular red button, the one that is animated with a rotation), just before the "Delete" button appears.
I would like to be able to change my cell content in that case...
Is that possible ?
Thanks !
I am writing a client - server system in which I used NON-BLOCKING sockets. My problem is to detect error { while performing send() or write() } that may occur while data transfer. Example lets say, while the data is being transferred the peer crashes. Another case there is some network problem, something like wire unplugged etc.
As of now, I am using a high level ACK, that peer sends after receiving the complete data.
Ripunjay Tripathi
How i can check if user has input null/empty string in classic-asp? Right now i am doing this.
If Request.Form("productId") == "" Then
'my code here
End If
But its not working.
I have a table containing some names and their associated ID, along with a snapshot:
snapshot, id, name
I need to identify when a name has changed for an id between snapshots. For example, in the following data:
1, 0, 'MOUSE_SPEED'
1, 1, 'MOUSE_POS'
1, 2, 'KEYBOARD_STATE'
2, 0, 'MOUSE_BUTTONS'
2, 1, 'MOUSE_POS'
2, 2, 'KEYBOARD_STATE'
...the meaning of id 0 changed with snapshot 2, but the others remained the same. I'd like to construct a query that (ideally) returns:
1, 0, 'MOUSE_SPEED'
2, 0, 'MOUSE_BUTTONS'
I am using PostgreSQL v8.4.2.
It recently emerged on a large poker site that some players were possibly able to see all opponents cards as they played through exploiting a security vulnerability that was discovered.
A naïve cheater would win at an incredibly fast rate, and these cheats are caught very quickly usually, and if not caught quickly they are easy to detect through a quick scan through their hand histories.
The more difficult problem occurs when the cheater exhibits intelligence, bluffing in spots they are bound to be called in, calling river bets with the worst hands, the basic premise is that they lose pots on purpose to disguise their ability to see other players cards, and they win at a reasonably realistic rate.
Given:
A data set of millions of verified and complete information hand histories
Theoretical unlimited computer power
Assume the game No Limit Hold'em, although suggestions on Omaha or limit poker may be beneficial
How could we reasonably accurately classify these cheaters? The original 2+2 thread appeals for ideas, and I thought that the SO community might have some useful suggestions.
It's an interesting problem also because it is current, and has real application in bettering the world if someone finds a creative solution, as there is a good chance genuine players will have funds refunded to them when identified cheaters are discovered.
Is it possible to detect which proxy is active which is dead?
using c# and a combo box containing list of proxies with port number is there any way we take every proxy one by one and determine as if it was dead or active?
Microsoft.Win32.RegistryKey registry = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true);
registry.SetValue("ProxyEnable", 1);
registry.SetValue("ProxyServer", comboBox1.Text)
;
I am using Folder Browser Dialog in my application to select a folder. Now I want such a thing that in the folder there should be only html files nothing else to be selected. Like if we have open file dialog and only we want to display html file then we use filter property of openfiledialog.So how can I do that in folder browser dialog to remain or select only html files in the folder ?
That is how can I filter files in the folder browser dialog ?
I'm wondering whether it's possible to use JavaScript to intercept or prevent the user from using the browser's "Find" feature to find text on the page. (Trust me, I have a good reason!) I'm guessing the answer is "no," beyond the obvious intercepting Cmd/Ctrl+F.
A second-best solution would be to intercept the text highlighting that the browser performs during a Find. Is there any way to do this, in any browser?
I want to create a Chrome extension that will automatically like every post I make on Facebook. My question is, how can I detect when I post something, and if that post if mine? Is there an event that occurs or something?
(And just for the record, I know that these sorts of things are impossible when other apps post on my behalf, at least from an extension perspective. So I'm only concentrating on posts that I actually click the "post" button, or enter for, myself.)
The new version of the ar-extensions gem requires that you load the appropriate adapter yourself. On my development side I use mysql, however Heroku uses PostgreSQL.
For example, on my development side I need to do this:
require 'ar-extensions/adapters/mysql'
require 'ar-extensions/import/mysql'
How can I audo-detect which adapter to use?
Is there any technique or tool available to detect this kind of a deadlock during runtime?
picture this in a worker thread (one of several, normally 4-6)
try
WaitForSingleObject(myMutex);
DoSTuffThatMightCauseAnException;
Except
ReleaseMutex(myMutex);
end;
or more generally is there a design-pattern to avoid these kind of bugs?
I coded the above code in the little hous after a longer hacking run
Hi,
Is there any way to detect the type of a webservice inside a httpmodule?
The reason for this is that I want to do some property injection to the webservice before
it's processed.
I found this:
http://social.msdn.microsoft.com/Forums/en/asmxandxml/thread/0e848eee-d353-4e67-b47f-89fddb600009
but that is one h..l of an ugly solution.
Anyone have a nice solution?
I have a web app that is using the 3.5 framework. I wanted to know how can I detect what webhost is rendering the page.
If the server is localhost, then send email notification to [email protected]
If the server is QA, then send email to [email protected]
Thanks
If I want to know if an object has a particular property I can code this:
if (SomeObject.hasOwnProperty('xyz')) {
// some code
}
But some styles masquerade as properties at design time such as Button.color... How can I know what style properties are valid at runtime? ie: What is the equivalent of hasOwnProperty for getStyle/setStyle?
In other words how can I know if an object HAS A particular style variable... When I write:
MyButton.setStyle('qsfgaeWT','-33');
It won't accomplish anything, but it also doesn't error. How can I know programmatically that 'qsfgaeWT' is NOT a valid style of 'Button'??
I need to use a TCP socket connecting to a port outside of 4502-4532 while running in browser. I know it is possible to do out of browser with allowing full access, but how can I do it inside the browser? I am connecting to an old Unix system so I would prefer not to host a web site hosting a clientaccesspolicy.xml file. Thanks in advance!