Search Results

Search found 532 results on 22 pages for 'anthony chivetta'.

Page 14/22 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • (N)Hibernate: deleting orphaned ternary association rows when either associated row is deleted.

    - by anthony
    I have a ternary association table created using the following mapping: <map name="Associations" table="FooToBar"> <key column="Foo_id"/> <index-many-to-many class="Bar" column="Bar_id"/> <element column="AssociationValue" /> </map> I have 3 tables, Foo, Bar, and FooToBar. When I delete a row from the Foo table, the associated row (or rows) in FooToBar is automatically deleted. This is good. When I delete a row from the Bar table, the associated row (or rows) in FooToBar remain, with a stale reference to a Bar id that no longer exists. This is bad. How can I modify my hbm.xml to remove stale FooToBar rows when deleting from the Bar table?

    Read the article

  • Variable declarations following if statements

    - by Anthony Pegram
    An issue came up on another forum and I knew how to fix it, but it revealed a feature of the compiler peculiar to me. The person was getting the error "Embedded statement cannot be a declaration or labeled statement" because they had a declaration of a variable following an if statement with no brackets. That was not their intent, but they had commented out the line of code immediately following the if statement, which made the variable declaration the de facto line of code to execute. Anyway, that's the background, which brings me to this. The following code is illegal if (true) int i = 7; However, if you wrap that in brackets, it's all legal. if (true) { int i - 7; } Neither piece of code is useful. Yet the second one is OK. What specifically is the explanation for this behavior? I have a hypothesis, but I'd rather ask the brilliant people on stackoverflow.

    Read the article

  • Privacy setting using Graph API

    - by Anthony
    Hello, I'm currently trying to se privacy setting on post I do through Graph API, code is: function graphStreamPublish(){ message1 = document.getElementById('message').value; FB.api('/me/feed', 'post', { message: message1 }, privacy: {value: "CUSTOM", friends: "SOME_FRIENDS", network: "1", allow: "204506204", deny: "515592311", function(response) { if (response && response.post_id) { alert('Post was not published.'); } else { alert('Post was published.'); } }); } Then I just call this function for the things I right on textarea: <center><textarea id="message" cols="50" rows="5">Test goes here!</textarea></center> <br /> <center><a href="" onclick="graphStreamPublish(); return false;">Post message now!</a></center> This does not work however woth the privacy part but works fine without. Am i doing something wrong? Thanks.

    Read the article

  • iPhone AVAudioPlayer failed to find codec

    - by Anthony
    Hello, I am writing an app that downloads a wav file from a server and needs to play that file. The files use the mulaw codec with 2:1 compression. These wav files are dynamically created by a seperate process so there is no way for me to preconvert the files to a different format or codec, I need to be able to play them as is. I am using an AVAudioPlayer instance initialized as follows: NSURL *audioURL = [[NSURL alloc] initWithString:@"http://xxx.../file.wav"]; NSData *audioData = [[NSData alloc] initWithContentsOfURL:audioURL]; AVAudioPlayer *audio = [[AVAudioPlayer alloc] initWithData:audioData error:nil]; [audio play]; However, when the play method executes, I get the following Console Output when executing on the Simulator: AudioQueue codec policy 1: failed to find a codec of the requested type I also tried saving the downloaded data to a local file and using a file URL, however that yeilds the same results. The downloaded file does play fine on both Mac and Windows based desktop media players. The SDK docs state that the mulaw codec is supported on the iPhone, so I am unsure why it is failing to find it. Any assistance would be greatly appreciated. Thanks.

    Read the article

  • Query to return internal details about stored function in SQL Server database

    - by Anthony
    I have been given access to a SQL Server database that is currently used by 3rd party app. As such, I don't have any documentation on how that application stores the data or how it retrieves it. I can figure a few things out based on the names of various tables and the parameters that the user-defined functions takes and returns, but I'm still getting errors at every other turn. I was thinking that it would be really helpful if I could see what the stored functions were doing with the parameters given to return the output. Right now all I've been able to figure out is how to query for the input parameters and the output columns. Is there any built-in information_schema table that will expose what the function is doing between input and output?

    Read the article

  • How do I wait until a console application is idle?

    - by Anthony Mastrean
    I have a console application that starts up, hosts a bunch of services (long-running startup), and then waits for clients to call into it. I have integration tests that start this console application and make "client" calls. How do I wait for the console application to complete its startup before making the client calls? I want to avoid doing Thread.Sleep(int) because that's dependent on the startup time (which may change) and I waste time if the startup is faster. Process.WaitForInputIdle works only on applications with a UI (and I confirmed that it does throw an exception in this case). I'm open to awkward solutions like, have the console application write a temp file when it's ready.

    Read the article

  • can bound negative space be used in SVG?

    - by Anthony
    If I have a map of three countries, and their borders form the outline of a sea, is their a way with SVG to give that bound area attributes and style? Another example might be three triangles which form a third triangle in the center (like the triforce). If someone wanted to make that middle empty area glow (or whatever)...

    Read the article

  • Is there anyway to turn off the url "cliking" sound in IE using html, javascript, or flash?

    - by Anthony
    I have a flash application written in action script 2, and at one point it makes multiple back-to-back JavaScript requests using getUrl(). They have to be done as separate requests because IE had a limit on the length of a single request, and fails silently if that limit is passed. When ever this happens, if the user has their sound turned on there is a barrage of "click click click".

    Read the article

  • SQL, MVC, Entity Framework

    - by Anthony
    Hi Im using the above technologies and have ran into what I presume is a design issue I have made. I have an Artwork table in my DB and have been able to add art (I now think of these as Digital Products) to a shopping cart + CartLine table fine. The system I have that adds art to galleries and user accounts etc works fine. Now the client wants to sell T-shirts, Mugs and Pens etc, 'HardwareProducts' so I have created a 'HardwareProducts' table. Now I have two different product types in two tables. I use GUID's as the PK's in both the HardwareProducts table and Artwork table. When a customer adds an item to their cart I store the GUID in the ProductID column in the CartItems table. The issue is the database will not know which table to reference when I bring the LineItem object up through my ORM to the front end. In OOP I can see how you would have a base class of Product, and then a DigitalProduct class and HardwareProduct class drived from it, but how do you model this in SQL Server and the Entity Framework please, or is there another way?

    Read the article

  • Binding to static property

    - by Anthony Brien
    I'm having a hard time binding a simple static string property to a text box. Here's the class with the static property: public class VersionManager { private static string filterString; public static string FilterString { get { return filterString; } set { filterString = value; } } } In my xaml, I just want to bind this static property to a text box: <TextBox> <TextBox.Text> <Binding Source="{x:Static local:VersionManager.FilterString}"/> </TextBox.Text> </TextBox> Everything compiles, but at run time, I get the following exception: Cannot convert the value in attribute 'Source' to object of type 'System.Windows.Markup.StaticExtension'. Error at object 'System.Windows.Data.Binding' in markup file 'BurnDisk;component/selectversionpagefunction.xaml' Line 57 Position 29. Any idea what I'm doing wrong?

    Read the article

  • Rewrite URL if file exists

    - by Anthony Faull
    I need to redirect web requests of the form /{language}-{country}/{file} to: /{language}-{country}/{file} if it exists, otherwise /{language}/{file} if it exists, otherwise /en-US/{file} The existing .htaccess fulfils requirements 1 and 3. What changes do I need to fulfil requirement 2? .htaccess: Options +FollowSymLinks RewriteEngine On RewriteCond $0 !i18n/en-US [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(i18n)/([^/]+)/(.*)$ $1/en-US/$3 [NC,L]

    Read the article

  • Query to return internal details about stored function in MS-SQL database

    - by Anthony
    I have been given access to a ms-sql database that is currently used by 3rd party app. As such, I don't have any documentation on how that application stores the data or how it retrieves it. I can figure a few things out based on the names of various tables and the parameters that the user-defined functions takes and returns, but I'm still getting errors at every other turn. I was thinking that it would be really helpful if I could see what the stored functions were doing with the parameters given to return the output. Right now all I've been able to figure out is how to query for the input parameters and the output columns. Is there any built-in information_schema table that will expose what the function is doing between input and output?

    Read the article

  • Android GPS cloud of confusion!

    - by Anthony Forloney
    I am trying to design my first Android application with the use of GPS. As of right now, I have a drawable button that when clicked, alerts a Toast message of the longitude and latitude. I have tried to use the telnet localhost 5554 and then geo fix #number #number to feed in values but no results display just 0 0. I have also tried DDMS way of sending GPS coordinates and I get the same thing. My question is what exactly is the code equivalent to the geo fix and the DDMS way of sending coordinates. I have used Location, LocationManger and LocationListener but I am not sure which is the right choice. Could anyone explain to me what the code-equivalent just so I can get a better understanding of how to fix my application not working. Code is given, just in case if the error exists with the code @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button) findViewById(R.id.track); button.setOnClickListener(this); LocationManager location =(LocationManager)getSystemService(Context.LOCATION_SERVICE); Location loc = location.getLastKnownLocation(location.GPS_PROVIDER); updateWithNewLocation(loc); } private final LocationListener locationListener = new LocationListener() { public void onLocationChanged(Location location) { updateWithNewLocation(location); } private void updateWithNewLocation(Location l) { longitude = l.getLongitude(); latitude = l.getLatitude(); provider = l.getProvider(); } public void onClick(View v) { Toast.makeText(this, "Your location is " + longitude + " and " + latitude + " provided by: " + provider, Toast.LENGTH_SHORT).show(); } }

    Read the article

  • How to use xml response as XMLObject outside of ajax callback function

    - by Anthony
    Hopefully I've just made a dumb oversight, but I can't figure out why the following doesn't work: $(function() { var xml; $.get( "somexml.xml", function(data){ xml = data; }, "xml"); alert(xml); }); If I put the alert inside of the callback function, I get back object XMLdocument but if I place it outside of the ajax call, I get undefined. Since my goal is to have a new DOM to parse, I don't want the entire handling of the XMLdocument to be within the callback function. I've tried defining the variable outside of the entire onready function, inside at the top (like above) and inside the callback function, all with no luck. According to Specifying the Data Type for Ajax Requests in the jquery documentation, this should be possible.

    Read the article

  • Python: avoiding fraction simplification

    - by Anthony Labarre
    Hi all, I'm working on a music app' in Python and would like to use the fractions module to handle time signatures amongst other things. My problem is that fractions get simplified, i.e.: >>> from fractions import Fraction >>> x = Fraction(4, 4) >>> x Fraction(1, 1) However, it is important from a musical point of view that 4/4 stays 4/4 even though it equals 1. Is there any built-in way to avoid that behaviour? Thanks!

    Read the article

  • Autmatically create table on MySQL server based on date?

    - by Anthony
    Is there an equivalent to cron for MySQL? I have a PHP script that queries a table based on the month and year, like: SELECT * FROM data_2010_1 What I have been doing until now is, every time the script executes it does a query for the table, and if it exists, does the work, if it doesn't it creates the table. I was wondering if I can just set something up on the MySQL server itself that will create the table (based on a default table) at the stroke of midnight on the first of the month. Update Based on the comments I've gotten, I'm thinking this isn't the best way to achieve my goal. So here's two more questions: If I have a table with thousands of rows added monthly, is this potentially a drag on resources? If so, what is the best way to partition this table, since the above is verboten? What are the potential problems with my home-grown method I originally thought up?

    Read the article

  • HttpUtility.HtmlEncode doesn't encode everything

    - by Anthony
    I am interacting with a web server using a desktop client program in C# and .Net 3.5. I am using Fiddler to see what traffic the web browser sends, and emulate that. Sadly this server is old, and is a bit confused about the notions of charsets and utf-8. Mostly it uses Latin-1. When I enter data into the Web browser containing "special" chars, like "O p ? 8 ? ? ? ? ? ? ? ? ? ? ? ? ? ?" fiddler show me that they are being transmitted as follows from browser to server: "&#9800; &#9801; &#9802; &#9803; &#9804; &#9805; &#9806; &#9807; &#9808; &#9809; &#9810; &#9811; " But for my client, HttpUtility.HtmlEncode does not convert these characters, it leaves them as is. What do I need to call to convert "?" to &#9800; and so on?

    Read the article

  • How do I start a XUL Runner application maximized?

    - by Anthony D
    I've started developing my first app with XUL and I've run into a problem that I can't seem to solve. All I want to do is have my app start maximized. I've set the sizemode attribute to maximized on my top level window element but that has no effect. My prefs.js file has the following line: pref("toolkit.defaultChromeFeatures", "chrome,centerscreen,menubar,resizable,status,toolbar,scrollbars"); This also does not work. My window appears and it only has a close button (X) and does not have a minimize or maximize button. Any ideas???

    Read the article

  • Combining Variable Numbers of Lists w/ LINQ

    - by Anthony Compton
    I have a list (List) of objects. Each of those objects contains a list (List) of strings describing them. I'm needing to create a dropdown containing all of the distinct strings used to describe the objects (Cards). To do this, I need a list of distinct strings used. Any idea how/if this can be done with LINQ?

    Read the article

  • Animation is slow on iPhone

    - by Anthony Chan
    I'm developing an app that would display images and change them according to the user's action. I've created a subclass of UIView to contain an image, an index number and an array of image names. The code is like this: @interface CustomPic : UIView { UIImageView *pic; NSInteger index; NSMutableArray *picNames; //<-- an array of NSString } And in the implementation part, it has a method to change the image using a dissolve effect. - (void)nextPic { index++; if (index >= [picNames count]) { index = 0; } UIImageView *temp = pic; pic.image = [UIImage imageNamed:[picNames objectAtIndex:index]]; temp.alpha = 0; [UIView beginAnimations:nil context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; [UIView setAnimationDuration:0.25]; pic.alpha = 0; temp.alpha = 1; [UIView commitAnimations]; } In the viewController, there are several CustomPic which would change the images depends on users' choice. The images would change as expected with the fade in/out effect, but the animation performance is really bad. I've tested it on an iPhone 3G, the Instruments shows that the animation is only 2-3FPS! I tried many methods to simplify and modify the codes but with no hope. Is there something wrong in my code or in my concept? Thanks for any help. P.S. all the images are 320*480 PNGs with a max size of 15KB.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >