Search Results

Search found 673 results on 27 pages for 'justin baskaran'.

Page 20/27 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • MySQL Stored Procedures : Use a variable as the database name in a cursor declaration

    - by Justin
    I need to use a variable to indicate what database to query in the declaration of a cursor. Here is a short snippet of the code : CREATE PROCEDURE `update_cdrs_lnp_data`(IN dbName VARCHAR(25), OUT returnCode SMALLINT) cdr_records:BEGIN DECLARE cdr_record_cursor CURSOR FOR SELECT cdrs_id, called, calling FROM dbName.cdrs WHERE lrn_checked = 'N'; # Setup logging DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN #call log_debug('Got exception in update_cdrs_lnp_data'); SET returnCode = -1; END; As you can see, I'm TRYING to use the variable dbName to indicate in which database the query should occur within. However, MySQL will NOT allow that. I also tried things such as : CREATE PROCEDURE `update_cdrs_lnp_data`(IN dbName VARCHAR(25), OUT returnCode SMALLINT) cdr_records:BEGIN DECLARE cdr_record_cursor CURSOR FOR SET @query = CONCAT("SELECT cdrs_id, called, calling FROM " ,dbName, ".cdrs WHERE lrn_checked = 'N' "); PREPARE STMT FROM @query; EXECUTE STMT; # Setup logging DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN #call log_debug('Got exception in update_cdrs_lnp_data'); SET returnCode = -1; END; Of course this doesn't work either as MySQL only allows a standard SQL statement in the cursor declaration. Can anyone think of a way to use the same stored procedure in multiple databases by passing in the name of the db that should be affected?

    Read the article

  • Feature activate via UI but does not show in the Libraries and Lists

    - by Justin Cullen
    I am really hating SharePoint as there are hardly any good/concrete documentation. I developed custom List "MainCatalog" with few columns (not site columns). Create features and elements with MOSS feature builder at Site collection level so scope="site" installed via stsadm activated via UI "went to site collection website", Site Setting Site collection Feature (and saw my custom list "MainCatalog") and was able to activate. then went to "mySiteCollection Site Settings Site Libraries and Lists " My list is showing But it shows in the "mySiteCollection Create Custom Lists "MainCatalog" I guess it's showing there as a template... But my intention is to deploy this list from development to test environment. EXTREMELY STRESSED. I AM ON THIS FOR LAST 8 DAYS.....

    Read the article

  • RPC Fails but passing in SQL Man. Studios works

    - by Justin
    I am calling a stored procedure from a web service in an ASP.Net application. And until a few days ago, all was well. However now when i call it I get an error saying The timeout period elapsed prior to the completion of the operation or the server could not be reached. However when i would run SQL SERVER PROFILER, I could see that the call was getting to the database, but was timing out. I then copied the statement being executed found at the bottom of the Profiler and pasted it into Management Studio and executed it and it finishes in about 7 seconds.. This runs just fine on our production server. It seems to be similar to this question: SELECT DISTINCT not working in .NET application, but works in SQL Mgmt Studio but I see no answer.

    Read the article

  • In WPF using a ListView is there an elegant way to auto resize items?

    - by Justin
    I recently wrote, my first, WPF application that has a list of items that are polled from a web-serivce. The items are displayed/data-bound in a ListView via a GridView. A background thread periodically polls the web-serivce and updates the list. If, say, I had three items initially bound to the ListView that simply display a description and the three descriptions where something like: - ProjectA - ProjectB - ProjectC Later a new item is added with a description of 'AReallyReallyLongProjectName', I would end up with a list like: - ProjectA - ProjectB - ProjectC - AReallyR The GridViewColumn would not update it's width and would subsequently cut off any new items that extended the original width. I added this bit of code which forces the column to resize, but it just seems a little hacky. (Just seems weird to set a width just to set it back to nothing to force the resize) if(gridView != null) { foreach(var column in gridView.Columns) { if (double.IsNaN(column.Width) column.Width = column.ActualWidth; column.Width = double.NaN; } } Is there a better, more elegant solution, to accomplish this same thing?

    Read the article

  • Problem with poor font rendering with CSS3 transitions, jQuery, & Google Fonts

    - by Justin
    In Firefox, there is no problem. Here's an image: http://cl.ly/3R0L1q3P1r11040e3T1i In Safari, the text is rendering poorly: http://cl.ly/0a1101341r2E1D2d1W46 In IE7 & IE8, it's much worse, but I don't have a picture. Sorry :( I'm using Isotope jQuery plugin, and the CSS3 transitions seem to cause the poor font-rendering. I'm also using Google Font API. Here's what the CSS transitions for Isotope are written as: /**** Isotope CSS3 transitions ****/ .isotope, .isotope .isotope-item { -webkit-transition-duration: 0.8s; -moz-transition-duration: 0.8s; transition-duration: 0.8s; } .isotope { -webkit-transition-property: height, width; -moz-transition-property: height, width; transition-property: height, width; } .isotope .isotope-item { -webkit-transition-property: -webkit-transform, opacity; -moz-transition-property: -moz-transform, opacity; transition-property: transform, opacity; } I appreciate any help with this. Looks great in Firefox! Thanks!

    Read the article

  • Delphi Unit local variables - how to make each instance unique?

    - by Justin
    Ok, this, I'm sure is something simple that is easy to do. The problem : I've inherited scary spaghetti code and am slowly trying to better it when new features need adding - generally when a refactor makes adding the new feature neater. I've got a bunch of code I'm packing into a single unit which, in different places in the application, controls the same physical thing in the outside world. The control appears in several places in the application and operates slightly differently in each instance. What I've done is to create a unit with all of the features I need which I can simply drop, as a frame, into each form that requires it. Each form then uses the unit's interface methods to customise the behaviour for each instance. The problem within the problem : In the unit in question (the frame) I have a variable declared in the IMPLEMENTATION section - local to the unit. I also have a procedure, declared in the TYPE section which takes an argument and assigns that argument to the local variable in question - each form passes a unique variable to each instance of the frame/unit. What I want it to do is for each instance of the frame to keep its own version of that variable, different from the others, and use that to define how it operates. What seems to be happening, however, is that all instances are using the same value, even if I explicitly pass each instance a different variable. ie: Unit FlexibleUnit; interface uses //the uses stuff type TFlexibleUnit=class(TFrame) //declarations including procedure makeThisInstanceX(passMeTheVar:integer); private // public // end; implementation uses //the uses var myLocalVar; procedure makeThisInstanceX(passMeTheVar:integer); begin myLocalVar:=passMeTheVar; end; //other procedures using myLocalVar //etc to the end; Now somewhere in another Form I've dropped this Frame onto the Design pane, sometimes two of these frames on one Form, and have it declared in the proper places, etc. Each is unique in that : ThisFlexibleUnit : TFlexibleUnit; ThatFlexibleUnit : TFlexibleUnit; and when I do a: ThisFlexibleUnit.makeThisInstanceX(var1); //want to behave in way "var1" ThatFlexibleUnit.makeThisInstanceX(var2); //want to behave in way "var2" it seems that they both share the same variable "myLocalVar". Am I doing this wrong, in principle? If this is the correct method then it's a matter of debugging what I have (which is too huge to post) but if this is not correct in principle then is there a way to do what I am suggesting? Thanks in advance, Stack Overflow - you guys (and gals!) are legendary.

    Read the article

  • How can I detect if the Solution is initializing using the DTE in a VisualStudio extension?

    - by justin.m.chase
    I am using the DTE to track when projects are loaded and removed from the solution so that I can update a custom Test Explorer extension. I then trigger a container discovery process. But when the solution is first loaded it does an asynchronous load of some projects and fires a lot of Project Added events. What I would really like to do is to ignore all of these events until the solution is done loading. I can't quite figure out the order of events such that I know for sure that this initialization process has completed. It would be really nice to be able to just query the solution object and ask it. Does anyone know if there is a property or interface or event that I can use to determine this?

    Read the article

  • XAML Namespace http://schemas.microsoft.com/winfx/2006/xaml is not resolved

    - by Justin Poliey
    I'm using Visual Studio 2010 Express, working on a Silverlight 4 project in C#. This started happening all of a sudden in my project, I get the error that this XAML Namespace is not resolved: XAML Namespace http://schemas.microsoft.com/winfx/2006/xaml is not resolved If it helps, here is the section of the XAML file in which the error is being raised: <ResourceDictionary xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:GetGlue="clr-namespace:GetGluePlugin;assembly=GetGluePlugin" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:utils="clr-namespace:Seesmic.Sdp.Utils;assembly=Seesmic.Sdp.Utils"> What could the problem be?

    Read the article

  • node.js database

    - by Justin
    I'm looking for a database to pair with a node.js app. I'm assuming a json/nosql db would be preferable to a relational db [I can do without any json/sql impedence mismatch]. Considering couchdb mongodb redis Anyone have any views / war stories re compatiability/deployability of the above with node.js ? Any clear favourites ?

    Read the article

  • white-label collaborative open-source development (e.g. github/sourceforge/google-code in a box) ?

    - by Justin Grant
    Does anyone have a recommendation for an open-source or paid (either packaged or SaaS) solution for integrating collaborative development features into your own website? Here's more details: We currently host an online plugin gallery for our product. Users can upload and download plugins. But users can't easily collaborate on a plugin's development, can't easily report and track bugs on a plugin, can't easily track a plugin's versions or roadmap, etc. Of course, contributors can host their plugin development on github, sourceforge, google code, codeplex, etc. But keeping users on our website has some advantages. For example: We can use single-sign-on to avoid yet another username/password required we can integrate end-user issue tracking into our existing online issue-tracking systems we can get integrated analytics so we can better meet the needs of top contributors as well as downloaders We can easily reward reputation points to committers just like we do for people who answer lots of questions Anyone know a good solution for white-label sites for open-source project developer collaboration?

    Read the article

  • Why can't the style I have within a control template use templatebinding?

    - by Justin
    I have this control template that I am writing: <Style TargetType="{x:Type controls:InfoBar}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type controls:InfoBar}"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <StackPanel> <Grid> <Grid.Resources> <Style TargetType="{x:Type TextBlock}"> <Setter Property="FontFamily" Value="{TemplateBinding FontFamily}" /> <Setter Property="FontSize" Value="{TemplateBinding FontSize}" /> <Setter Property="Foreground" Value="{TemplateBinding Foreground}" /> </Style> </Grid.Resources> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <ItemsControl Grid.Column="0" ItemsSource="{TemplateBinding LeftInfoBarTextBlockCollection}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> <ItemsControl Grid.Column="1" ItemsSource="{TemplateBinding MiddleInfoBarTextBlockCollection}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> <ItemsControl Grid.Column="2" ItemsSource="{TemplateBinding RightInfoBarTextBlockCollection}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </Grid> </StackPanel> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> This section of xaml is throwing member is not valid because it does not contain a valid type name. exceptions for the template bindings on FontFamily, FontSize and Foreground. <Grid.Resources> If I change it to this: <Grid.Resources> It will build, but when I debug it, I get this XmlParseExeption: Set property 'System.Windows.Setter.Value' threw an exception. If I change controls:InfoBar to Control, which InfoBar inherits from, I get the same exception. What am I doing wrong?

    Read the article

  • spring or jetty.xml?

    - by Justin
    I have a spring web application (currently packaged as a war file) which I would like to be able to launch from jetty in a stand-alone configuration (small scale all-in-one deployment, and for launching in the development environment). Since I am already using spring, it seems like what I want to do is create my jetty Server and WebContext objects, and initial JNDI context using spring. However this seems to overlap with the jetty.xml method of configuring the same environment. Is one approach better? Is the does jetty.xml offer anything easier than I can get using spring?

    Read the article

  • can a python script know that another instance of the same script is running... and then talk to it?

    - by Justin Grant
    I'd like to prevent multiple instances of the same long-running python command-line script from running at the same time, and I'd like the new instance to be able to send data to the original insance before the new instance commits suicide. How can I do this in a cross-platform way? Specifically, I'd like to enable the following behavior: "foo.py" is launched from the command line, and it will stay running for a long time-- days or weeks until the machine is rebooted or the parent process kills it. every few minutes the same script is launched again, but with different command-line parameters when launched, the script should see if any other instances are running. if other instances are running, then instance #2 should send its command-line parameters to instance #1, and then instance #2 should exit. instance #1, if it receives command-line parameters from another script, should spin up a new thread and (using the command-line parameters sent in the step above) start performing the work that instance #2 was going to perform. So I'm looking for two things: how can a python program know another instance of itself is running, and then how can one python command-line program communicate with another? Making this more complicated, the same script needs to run on both Windows and Linux, so ideally the solution would use only the Python standard library and not any OS-specific calls. Although if I need to have a Windows codepath and an *nix codepath (and a big if statement in my code to choose one or the other), that's OK if a "same code" solution isn't possible. I realize I could probably work out a file-based approach (e.g. instance #1 watches a directory for changes and each instance drops a file into that directory when it wants to do work) but I'm a little concerned about cleaning up those files after a non-graceful machine shutdown. I'd ideally be able to use an in-memory solution. But again I'm flexible, if a persistent-file-based approach is the only way to do it, I'm open to that option. More details: I'm trying to do this because our servers are using a monitoring tool which supports running python scripts to collect monitoring data (e.g. results of a database query or web service call) which the monitoring tool then indexes for later use. Some of these scripts are very expensive to start up but cheap to run after startup (e.g. making a DB connection vs. running a query). So we've chosen to keep them running in an infinite loop until the parent process kills them. This works great, but on larger servers 100 instances of the same script may be running, even if they're only gathering data every 20 minutes each. This wreaks havoc with RAM, DB connection limits, etc. We want to switch from 100 processes with 1 thread to one process with 100 threads, each executing the work that, previously, one script was doing. But changing how the scripts are invoked by the monitoring tool is not possible. We need to keep invocation the same (launch a process with different command-line parameters) but but change the scripts to recognize that another one is active, and have the "new" script send its work instructions (from the command line params) over to the "old" script.

    Read the article

  • Calling a WPF Application and modify exposed properties?

    - by Justin
    I have a WPF Keyboard Application, it is developed in such a way that an application could call it and modify its properties to adapt the Keyboard to do what it needs to. Right now I have a file *.Keys.Set which tells the application (on open) to style itself according to that new style. I know this file could be passed as a command line argument into the application. That would not be a problem. My concern is, is there a way via a managed environment to change the properties of the executable as long as they are exposed properly, an example: 'Creates a new instance of the Keyboard Application Dim e_key as new WpfApplication("C:\egt\components\keyboard.exe") 'Sets the style path e_key.SetStylePath("c:\users\joe\apps\me\default.keys.set") e_key.Refresh() 'Applies the style e_key.HideMenu() 'Hides the menu e_key.ShowDeck("PIN") 'Shows the custom "deck" of keyboard keys the developer 'Created in the style application. ''work with events and response 'Clear the instance from memory e_key.close e_key.dispose e_key = nothing This would allow my application to become easily accessible to other Touch Screen Application Developers, allowing them to use my keyboard and keep the functionality they need. It seems like it might be possible because (name of executable).application shows all the exposed functions, properties, and values. I just have never done this before. Any help would be appreciated, thank you in advance.

    Read the article

  • Why is TreeSet<T> an internal type in .NET?

    - by Justin Niessner
    So, I was just digging around Reflector trying to find the implementation details of HashSet (out of sheer curiosity based on the answer to another question here) and noticed the following: internal class TreeSet<T> : ICollection<T>, IEnumerable<T>, ICollection, IEnumerable, ISerializable, IDeserializationCallback Without looking too deep into the details, it looks like a Self-Balancing Binary Search Tree. My question is, is there anybody out there with the insight as to why this class is internal? Is it simply because the other collection types use it internally and hide the complexities of a BST from the general masses...or am I way off base?

    Read the article

  • Share Link - Perform action in background

    - by Justin
    I have an application that will accept URLs from the built in web browser via the "Share page" menu item. I'm using the send intent and it works just fine. However, I'd like to accept a URL and process it in the background without bringing my application to the front. I don't want the user to have to actually leave the web browser. It will notify the user it has finished processing the URL with a Toast message. I'm just not sure what type of activity should be used for this. A good example of this behavior is the "Read Later" instapaper application in the android market. Any help would be greatly appreciated.

    Read the article

  • MongoDB complex MapReduce of video logs

    - by Justin Hourigan
    I have a dataset from video streaming logs. Each video is identified by a FileGUID. The log entries record the FileGUID, the fragment of the video watched and the bandwidth it was watched at. I would like to create a mapreduce outputting, for each video, a count for fragments both total and for each bandwidth. Ideally it would look like; {"FileGUID":"50acb3a5796634df0e073285", { "1":{"total":76, "0832":34, "1028":42}, "2":{"total":42, "0832":28, "1028":14}, ... } } Is this possible with one mapreduce or is it a multi-step process, or should I use a different method? Here is a sample of the data. { "_id": ObjectId("50acb3a5796634df0e073285"), "IP": "46.7.1.88", "DateTime": ISODate("2012-10-24T22:59:57.0Z"), "FileGUID": "8cdde821fb934a6da7c125a012a26612", "Bandwidth": NumberInt(1028), "Segment": NumberInt(1), "Fragment": NumberInt(237), "Status": NumberInt(200), "Size": NumberInt(576790), "UserAgent": "Mozilla\/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko\/20100101 Firefox\/16.0" } { "_id": ObjectId("50acb3a5796634df0e073284"), "IP": "46.7.1.88", "DateTime": ISODate("2012-10-24T22:59:52.0Z"), "FileGUID": "8cdde821fb934a6da7c125a012a26612", "Bandwidth": NumberInt(1028), "Segment": NumberInt(1), "Fragment": NumberInt(236), "Status": NumberInt(200), "Size": NumberInt(577100), "UserAgent": "Mozilla\/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko\/20100101 Firefox\/16.0" } { "_id": ObjectId("50acb3a5796634df0e073283"), "IP": "46.7.1.88", "DateTime": ISODate("2012-10-24T22:59:47.0Z"), "FileGUID": "8cdde821fb934a6da7c125a012a26612", "Bandwidth": NumberInt(0832), "Segment": NumberInt(1), "Fragment": NumberInt(234), "Status": NumberInt(200), "Size": NumberInt(576664), "UserAgent": "Mozilla\/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko\/20100101 Firefox\/16.0" } { "_id": ObjectId("50acb3a5796634df0e073282"), "IP": "46.7.1.88", "DateTime": ISODate("2012-10-24T22:59:42.0Z"), "FileGUID": "8cdde821fb934a6da7c125a012a26612", "Bandwidth": NumberInt(0832), "Segment": NumberInt(1), "Fragment": NumberInt(233), "Status": NumberInt(200), "Size": NumberInt(575692), "UserAgent": "Mozilla\/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko\/20100101 Firefox\/16.0" }

    Read the article

  • Are there equivalents to Ruby's method_missing in other languages?

    - by Justin Ethier
    In Ruby, objects have a handy method called method_missing which allows one to handle method calls for methods that have not even been (explicitly) defined: Invoked by Ruby when obj is sent a message it cannot handle. symbol is the symbol for the method called, and args are any arguments that were passed to it. By default, the interpreter raises an error when this method is called. However, it is possible to override the method to provide more dynamic behavior. The example below creates a class Roman, which responds to methods with names consisting of roman numerals, returning the corresponding integer values. class Roman def romanToInt(str) # ... end def method_missing(methId) str = methId.id2name romanToInt(str) end end r = Roman.new r.iv #=> 4 r.xxiii #=> 23 r.mm #=> 2000 For example, Ruby on Rails uses this to allow calls to methods such as find_by_my_column_name. My question is, what other languages support an equivalent to method_missing, and how do you implement the equivalent in your code?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >