The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if I change foo in one module, it is updated in others. I'd be fine if I could set foo before…
Hi there!
Is there a way to get the aspnet_compiler to go through all views and return all errors, rather than just the errors in the current view directory?
For example, lets say I have a project that has a bunch of folders...
Views
Folder1
Folder2
Folder3
Folder4
Two of them (Folder2 and Folder3) have errors. aspnet_compiler will run, and…
SharePoint workflows are document centric in that the base thing the workflow runs on has to be a thing; be it a document or just a list item. The workflow itself is task based, so stuff a user has to do. Now I can put any sort of code in these tasks that I want to and even put complex InfoPath forms in for the user to perform the task. This has…
I have a problem using Linq to order a structure like this :
public class Person
{
public int ID { get; set; }
public List<PersonAttribute> Attributes { get; set; }
}
public class PersonAttribute
{
public int ID { get; set; }
public string Name { get; set; }
public string Value { get; set; }
}
A person might go like…
I want to use a table-valued database function in the where clause of a query I am building using LLBLGen Pro 2.6 (self-servicing).
SELECT * FROM [dbo].[Users]
WHERE [dbo].[Users].[UserID] IN (
SELECT UserID FROM [dbo].[GetScopedUsers] (@ScopedUserID)
)
I am looking into the FieldCompareSetPredicate class, but can't for the life of me figure…
Hey DBAs and overall smart dudes. I have a question for you.
We use MySQL VIEWs to format our data as JSON when it's returned (as a BLOB), which is convenient (though not particularly nice on performance, but we already know this).
But, I can't seem to get a particular query working right now (each row contains NULL when it should contain a…
I just completed a complex piece of code. It works to spec, it meets performance requirements etc etc but I feel a bit anxious about it and am considering rewriting and/or refactoring it. Should I do this (spending time that could otherwise be spent on features that users will actually notice)?
The reasons I feel anxious about the code are:
…
I am new to Silverlight. How would I go about creating a control for users to tag content.
I would like it to work like it does it StackOverflow i.e. Autocomplete and when you press space it inserts the tag in a box with a remove button. I want the control to be bindable to a collection of strings.
If someone can just point me in the…
Ok right , i asked how to create a random number from 1-100 for android and i came to this
TextView tv = new TextView(this);
int random = (int)Math.ceil(Math.random()*101);
tv.setText("Your Number Is..."+ random );
What this does is create the default kinda "hello world" style text view and says "Your Number Is.... [Then…
I have string as:
FOO /some/%string-in.here BAR
I would like to get everything between FOO and BAR but NOT including FOO[:space:] and NOT including [:space:]BAR
Any ideas it will be appreciate it.
And that's saying something. This is based on the Google Maps sample for Directions in the Maps API v3.
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Directions</title> …
Assume I have a model that is simply a cube. (It is more complicated than a cube, but for the purposes of this discussion, we will simplify.)
So when I am in Sketchup, the cube is Xmm by Xmm by Xmm, where X is an integer. I then export the a Collada file and subsequently load that into threejs.
Now if I look at the geometry…
Is there any equivalent to an aliasing statement such as:
// C#:
using C = System.Console;
or:
' VB.NET '
Imports C = System.Console
...but within method scope -- rather than applying to an entire file?
I have a data struct being stored in JSON format, converted using the serializeJSON function. The problem I am running into is that strings that can be boolean in CF such as Yes,No,True,and False are converted into JSON as boolean values. Below is example code. Any ideas on how to prevent this?
Code:
<cfset test =…
I have a problem using a table with an instead of insert trigger.
The table I created contains an identity column. I need to use an instead of insert trigger on this table. I also need to see the value of the newly inserted identity from within my trigger which requires the use of OUTPUT/INTO within the trigger. …
Hi all,
We have a java server that keeps a socket channel open with an Android client in order to provide push capabilities to our client application.
However, after putting the Android in airplane mode, which I expected would sever the connection, the server can still write to the SocketChannel object associated…
Hi, I have a ListView in a custom ArrayAdapter that displays an icon ImageView and a TextView in each row. When I make the list long enough to let you scroll through it, the order starts out right, but when I start to scroll down, some of the earlier entries start re-appearing. If I scroll back up, the old order…
Imagine I have a class that represents a simple washing machine. It can perform following operations in the following order: turn on - wash - centrifuge - turn off. I see two basic alternatives:
A)
I can have a class WashingMachine with methods turnOn(), wash(int minutes), centrifuge(int revs), turnOff(). The…
without trying to cause a mass discussion I would like some advice from the fellow users of stack overflow.
I am about to start building a mobile website that gets it data from JSON that comes from a PHP rest api.
I have looked into different mobile frameworks and feel that JQM will work best for us as we…
Hi guys. Trying to fiddle around with regex here, my first attempt.
Im trying to extract some figures out of content from an XML tag. The content looks like this:
www.blahblah.se/maps.aspx?isAlert=true&lat=51.958855252721&lon=-0.517657021473527
I need to extract the lat and long numerical vales…
I'm having difficulty using reinterpret_cast. Before I show you my code I'll let you know what I'm trying to do.
I'm trying to get a filename from a vector full of data being used by a MIPS I processor I designed. Basically what I do is compile a binary from a test program for my processor, dump all the…
A glance at the source code for string.GetHashCode using Reflector reveals the following (for mscorlib.dll version 4.0):
public override unsafe int GetHashCode()
{
fixed (char* str = ((char*) this))
{
char* chPtr = str;
int num = 0x15051505;
int num2 = num;
int*…