Can I use GameKit to send data from an iPhone to an accessory, and if not is there some other way to connect without joining the Made for iPhone program
I just built an application using ASP.NET MVC. The programmers at my company want to build all future modules using n-Tiered (Presentation Layer, Business Logic Layer, Data Access Layer) architecture.
I am not the programmer and need to know why this makes sense? Do I have to completely rewrite the entire code or can it be converted?
We are building an HRIS system with Business Intelligence.
Somebody please explain why or why not this approach does or does not make sense.
I have a two way foreign relation similar to the following
class Parent(models.Model):
name = models.CharField(max_length=255)
favoritechild = models.ForeignKey("Child", blank=True, null=True)
class Child(models.Model):
name = models.CharField(max_length=255)
myparent = models.ForeignKey(Parent)
How do I restrict the choices for Parent.favoritechild to only children whose parent is itself? I tried
class Parent(models.Model):
name = models.CharField(max_length=255)
favoritechild = models.ForeignKey("Child", blank=True, null=True, limit_choices_to = {"myparent": "self"})
but that causes the admin interface to not list any children.
Guerre des brevets : et maintenant les émoticônes
Varia porte plainte contre Samsung qui porte plainte contre Apple
En décembre dernier, Samsung avaient attaqué Apple en vertu de leur brevet US n° 7,835,729, qui décrit la méthode de saisie des émoticônes dans les smartphones.
Dans le dernier rebondissement en date, Varia ? une société d'accumulation de brevets, ou en langage familier, un patent troll à temps plein?vient de porter plainte contre Samsung devant une cour de New York.
En effet, Varia détient le brevet US n° 7,167,731, intitulé « Méthode et appareil de saisie des émoticônes », qui serait antérieur à celui de Samsung.
Ce brevet décrit l'utilisation ...
Here's my stack trace. Where do I start to figure this out? I've tried a ton of NSLog()s and I can't track it down.
#0 0x94e9ced7 in objc_msgSend ()
#1 0x04936318 in ?? ()
#2 0x0259b252 in __CFRunLoopDoObservers ()
#3 0x0259a65f in CFRunLoopRunSpecific ()
#4 0x02599c48 in CFRunLoopRunInMode ()
#5 0x02ae7615 in GSEventRunModal ()
#6 0x02ae76da in GSEventRun ()
#7 0x0061dfaf in UIApplicationMain ()
#8 0x000051cc in main
Hi,
I have a DHTML layer that floats across a webpage. Everything is working with the DHTML layer, except when it goes pass the Windows Media Player toolbar. It goes behind the toolbar. Any idea how to fix this?
Thanks in advance for your help.
Is it possible to launch any arbitrary iPhone application from within another app? For example in my application if I want the user to push a button and launch right into the Phone app (close the current app, open the Phone app), would this be possible? I know this can be done for making phone calls with the tel URL link, but I want to instead just have the Phone app launch without dialing any specific number.
Does anyone know if there is a library that exists to help test if an object graph is fully serializable? It would probably be as simple as writing it out and reading it back in, but I figured someone must have abstracted this already - I just can't find it.
Our system complexity has risen to the point that we need to make permission names tied to the client from the database more specific. In the client, permissions are referenced from a static class since a lot of client functionality is dependent on the permissions each user has and the roles have a ton of variety. I've referenced this post as an example, but I'm looking for a more specific use case. Take for instance this reference, where PermissionAlpha would be a const string:
return HasPermission(PermissionNames.PermissionAlpha);
Which is great, except now that things are growing more complex the classes are being structured like this:
public static class PermissionNames
{
public static class PermissionAlpha
{
public const string SubPermission;
}
}
I'm trying to find an easy way to reference PermissionAlpha in this new setup that will act similar to the first declaration above. Would the only way to do this be to resort to pulling the value of the class name like in the example below? I'm trying to keep all the names in one place that can be reference anywhere in the application.
public static class PermissionAlpha
{
public static string Name { get { return typeof(PermissionAlpha).Name; } }
}
I'm using Netbeans to build a Grails app, while I have used this fine before on this new computer I can not get even the basic project to compile and run. I am getting errors around compiling the Tomcat plugin. If I uninstall the plugin it and use Jetty instead it will compile but the project isn't set up for Jetty and is missing files.
Below is the error I'm getting I'm thinking it is some issue with my classpath but I just don't know where to start any help would be much appreciated.
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Tomcat$ExistingStandardWrapper
Trying to use regex refind tag to find the content within the brackets in this example using coldfusion
joe smith <[email protected]>
The resulting text should be
[email protected]
Not having any luck. Any suggestions?
Today I implemented the horizontal jScrollPane script and the element I intended to scrolls like a charm. Via CSS I'm using an image for the jspDrag element.
Now for my question; I see that there are a few css classes added to the jspDrag like jspHover and jspActive. Is it also possible to add css classes when I scroll to the left or right?
I would like to do this, so I can change the image according to the scroll.
(Hoping my question is clear, a reaction would be highly appreciated. Kind regards)
I have a problem parsing a stored procedure parameter in the form:
declare @S varchar(100)
set @S = '4=2,24=1534'
Here's the query:
select
cast(idx as varchar(100)) 'idx'
, value
, SUBSTRING(value, 1, charindex(value, '=')+1) 'first'
, SUBSTRING(value, charindex(value, '=')+1, LEN(value)-charindex(value, '=')-1) 'second'
from Common.SplitToTable(@S, ',') -- returns (idx int, value varchar(max))
where len(value) > 0
But here is the result I get:
idx value first second
0 4=2 4 4=
1 24=1534 2 24=153
Here's what I expected:
idx value first second
0 4=2 4 2
1 24=1534 2 1534
Help?
How do I return the everything in a string from a sql query before a certain character?
My data looks like this:
HD TV HM45VM - HDTV widescreen television set with 45" lcd
I want to limit or truncate the string to include everything before the dash.
So the final result would be "HD TV HM45VM"
I have a simple array with x number of items. I am displaying them individually via a link click... I want to update a number that say 1 of 10. when the next one is displayed i want it to display 2 of 10 etc...
I have looked all around and my brain is fried right now... I know its simple I just cant get it out.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Page Title</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8"/>
<script type="text/javascript">
var quotations = new Array()
quotations[0]= "1"
quotations[1]= "2"
quotations[2]= "3"
quotations[3]= "4"
quotations[4]= "5"
quotations[5]= "6"
quotations[6]= "7"
numQuotes = quotations.length;
curQuote = 1;
function move( xflip ) {
curQuote = curQuote + xflip;
if (curQuote > numQuotes)
{ curQuote = 1 ; }
if (curQuote == 0)
{ curQuote = numQuotes ; }
document.getElementById('quotation').innerHTML=quotations[curQuote - 1];
}
var curPage = //this is where the current index should go
</script>
</head>
<body>
<div id="quotation">
<script type="text/javascript">document.write(quotations[0]);</script>
</div>
<div>
<p><a href="javascript();" onclick="move(-1)">GO back</a>
<script type="text/javascript">document.write(curPage + " of " + numQuotes)</script>
<a href="javascript();" onclick="move(1)">GO FORTH</a></p>
</div>
</body>
</html>
How do I return the everything in a string from a sql query before a certain character?
My data looks like this:
HD TV HM45VM - HDTV widescreen television set with 45" lcd
I want to limit or truncate the string to include everything before the dash.
So the final result would be "HD TV HM45VM"
I understand there are multiple questions about this on SO, but I have yet to find a definitive answer of "yes, here's how..."
So here it is again: What are the possible ways to store an unsigned integer value (32-bit value or 32-bit bitmap) into a 4-byte field in SQL Server?
Here are ideas I have seen:
1) Use a -1*2^31 offset for all values
Disadvantages: need to perform math on the values before reading/writing/aggregating.
2) Use 4 tinyint fields
Disadvantages: need to concatenate values to perform any operations
3) Use binary(4)
Disadvantages: actually uses 4 + 2 bytes of space
Those of you in Winnipeg that aren’t already registered please sign up, those who are registered, don’t forget the Winnipeg Visual Studio 2010 Launch Event next Tuesday May 11th. Imaginet are one of the companies sponsoring this event hosted by the Winnipeg .Net User Group at the IMAX Theatre. I’ll be doing a session on the VS.Net 2010 Testing Tools and my Imaginet co-worker Steve Porter will be doing a session on what’s new for Teams in Visual Studio 2010. I have it on good authority that there will also be some great Prizes given away. Technorati Tags: Visual Studio 2010,Presentation
[Updated a bit] I have a Task model that has a :completed boolean attribute. If I click on it I want it to execute the 'finish' method. The main problem is that I am displays a series of checkboxes in a list and subsequent checkboxes after the first one are ignored. The method is never called for the given task/checkbox combo.
I have this chunk of code in my view:
<% current_user.tasks.each do |t|%>
<% if t.completed == false %>
<%= check_box_tag :completed, true, checked = false %>
<%= observe_field :completed, :url => { :controller => 'tasks', :action => :finish , :id => t.id },
:frequency => 0.25,
:update => :completed,
:with => true
%>
and my finish method looks like this:
def finish
@task = Task.find(params[:id])
new = {:completed => true}
@task.update_attributes(new)
render :update do |page|
page.replace_html "taskListing", :partial => 'home/task_listing'
end
I have a legacy C++ app, that in its most incarnation we've been building with makefiles and VS2003's command-line tool. I'm trying to get it to build using VS2008 and MsBuild. The build is working OK, but I'm getting errors where I'd never seen errors, before, and stepping through in VS2008's debugger only confuses me.
The app links a number of static libraries, which fall into two categories: those that are part of the same application suite, and those that are shared between a number of application suites.
Originally, I had a .csproj file for each static library, and two .sln files, one for the application suite (including the suite-specific libraries) and one for the non-suite-specific shared libraries. The shared libraries were included in the link, their projects were not included in the application suite .sln.
The application instantiates an object from a class that is defined in one of the shared libraries. The class has a member object of a class that wraps a linked list. The constructor of the linked list class sets its "head" pointer to null.
When I run the app, and try to add an element to the linked list, I get an error - the head pointer contains the value 0xCCCCCCCC. So I step through with the debugger. And see weirdness.
When the current line in the debugger is in a source file belonging to the static library, the head pointer contains 0x00000000. When I step into the constructor, I can see the pointer being set to that value, and when I'm stepped into any other method of the class, I can see that the head pointer still contains 0x00000000. But when I step out into methods that are defined in the application suite .sln, it contains 0xCCCCCCCC. It's not like it's being overwritten. It changes back and forth depending upon which source file I am currently debugging.
So I included the shared library's project in the application suite .sln, and now I see the head pointer containing 0xCCCCCCCC all the time. It looks like the constructor of the linked list class is not being called.
So now, I'm entirely confused. Anyone have any ideas?
Ok, so I'm pretty new to Cocoa, especially Bindings, but here's what I'm trying to do. I've got a Core Data model consisting of two entities: Category and Item. Category has a to-many relationship to Item called children, and Item has a relationship to Category called parent. Item has two attributes that Category does not have: quantity and desiredQuantity. What I'd like to do is display the tree in an NSOutlineView with two columns. One column is bound to the name of either the Category or the Item. I want to the second column to display something along the lines of
2 of 5
for the Item rows and nothing at all for the Category rows. When I use a display pattern, the Category rows end up showing
of
I noticed that if I don't use a display pattern for the second column, and instead just bind its Value to either the quantity or the desiredQuantity, the Category rows show nothing; its only if I try to use the display pattern.
How can I make it display nothing for the Category rows and still use the display pattern? Or can I?
Edit:
I guess I didn't explain what the NotApplicable marker has to do with anything - Category does have properties for quantity and desiredQuantity, but they just return NSNotApplicableMarker.
Hello I have the following code:
if(_deviceSegmentCntrl.selectedSegmentIndex == 0)
{
deviceOne = [[NSString alloc] initWithFormat:@"string01"];
}
if(_deviceSegmentCntrl.selectedSegmentIndex == 1)
{
deviceOne = [[NSString alloc] initWithFormat:@"string02"];
}
if(_deviceSegmentCntrl.selectedSegmentIndex == 2)
{
deviceOne = [[NSString alloc] initWithFormat:@"string03"];
}
NSString *deviceType = [[NSString alloc] initWithFormat:_deviceSegmentCntrl];
I am wanting to have the NSString output the string the user selects in the segmented control.
How do I append the initWithFormat: so that it reflects the chosen index?
Cheers
Let's say we have a text field named TXTBLAH and a setting named SETTINGBLAH
Is there anyway to write in XAML markup that whenever the text field BLAH gets updated to write that to the registry, and also when the form loads is there a XAML binding to restore it?