Search Results

Search found 1163 results on 47 pages for 'jeff'.

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

  • Npgsql pass parameters by name to a stored function

    - by Jeff
    I'm working with code I'm converting to Pgsql working with .NET. I want to call a stored function that has several parameters, but I'd like to bind the parameters by name, like so: NpgsqlCommand command = new NpgsqlCommand("\"StoredFunction\"", _Connection) command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("param2", value2); command.PArameters.Add("param1", value1); Attempts to do this so far look for a function with parameter types matching in the order in which I added the parameters to the collection, not by name. Is it possible for Npgsql to bind parameters to stored functions by name?

    Read the article

  • Using OLEDB parameters in .NET when connecting to an AS400/DB2

    - by Jeff Stock
    I have been pulling my hair out trying to figure out what I can't get parameters to work in my query. I have the code written in VB.NET trying to do a query to an AS/400. I have IBM Access for Windows installed and I am able to get queries to work, just not with parameters. Any time I include a parameter in my query (ex. @MyParm) it doesn't work. It's like it doesn't replace the parameter with the value it should be. Here's my code: I get the following error: SQL0206: Column @MyParm not in specified tables Here's my code: Dim da As New OleDbDataAdapter Dim dt As New DataTable da.SelectCommand = New OleDbCommand da.SelectCommand.Connection = con da.SelectCommand.CommandText = "SELECT * FROM MyTable WHERE Col1 = @MyParm" With da.SelectCommand.Parameters .Add("@MyParm", OleDbType.Integer, 9) .Item("@MyParm").Value = 5 End With ' I get the error here of course da.Fill(dt) I can replace @MyParm with a literal of 5 and it works fine. What am I missing here? I do this with SQL Server all the time, but this is the first time I am attempting it on an AS400.

    Read the article

  • Copying a directory off a network drive using Objective-C/C

    - by Jeff
    Hi All, I'm trying to figure out a way for this to work: NSString *searchCommand = [[NSString alloc] initWithFormat:@"cp -R /Volumes/Public/DirectoryToCopy* Desktop/"]; const char* system_call = [searchCommand UTF8String]; system(system_call); The system() method does not acknowledge the specific string I am passing in. If I try something like: system("kextstat"); No problems. Any ideas why the find string command I'm passing in is not working? All I get is "GDB: Running ....." in xCode. I should mention that if I try the same exact command in terminal it works just fine.

    Read the article

  • Getting MSDeploy working on our build/integration server - Is an MSBuild upgrade necessary?

    - by Jeff D
    We have what I think is a fairly standard build process: 1. Developer: Check in code 2. Build: Polls repo, sees change, and kicks off build that: 3. Build: Updates from repo, Builds w/ MSBuild, Runs unit tests w/ nunit, 4. Build: creates installer package Our security team allows us to pull from the build server, but does not allow the build server to push. So we generally rdp in, d/l the installers, and run them, which rules out the slick deployment services, so I would need to generate packages instead. I'd like to use MSDeploy, except that we have the following issues: We're on .net 3.5, and the MSBuild target (Package) that uses MSDeploy requires 4.0. Is there anything I'd need to install other than .net 4.0 RC for this? (Would MSBuild be part of that upgrade?) When I generate packages with MSDeploy, I see that I don't have just 1 file. There's a zip, deploy.cmd, SourceManifest.xml, and SetParameters.xml. What are all the other files for, and why wouldn't they all be in the 'package'? It sounds as if you can create packages by telling the system to look at a working IIS site. But if the packages are build from a CI environment, aren't you basically out of luck here? It feels like they designed some of this for small-scale developers deploying from their dev environment. That's a fine use case, but I'm interested in see what everyone's enterprise-experience is with the tool Any suggestions?

    Read the article

  • Constant opacity with glBlendFunc on iPhone

    - by Jeff Johnson
    What glBlendFunc should I use to ensure that the opacity of my drawing is always the same? When I use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) and multiple images are drawn on top of each other, the result is more and more opaque until it's completely opaque after a certain number of imgaes. The closest I have come is to use glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA) which maintains a constant opacity no matter how many images are on top of each other, although there is a slight variation in opacity if the images overlap each other. Any other render states I should consider trying? Any other ideas? I am making a drawing app for my kid and I don't want the images (brush) they draw to cover up the background. Heres the closest I've got: I want to have it so that the overlap part of the circles is the same color and opacity as the center part of the circle. I am using cocos2d iphone v. 0.99

    Read the article

  • Frame Buster Buster ... buster code needed

    - by Jeff Atwood
    Let's say you don't want other sites to "frame" your site in an <iframe>: <iframe src="http://yourwebsite.com"></iframe> So you insert anti-framing, frame busting JavaScript into all your pages: /* break us out of any containing iframes */ if (top != self) { top.location.replace(self.location.href); } Excellent! Now you "bust" or break out of any containing iframe automatically. Except for one small problem. As it turns out, your frame-busting code can be busted, as shown here: <script type="text/javascript"> var prevent_bust = 0 window.onbeforeunload = function() { prevent_bust++ } setInterval(function() { if (prevent_bust > 0) { prevent_bust -= 2 window.top.location = 'http://server-which-responds-with-204.com' } }, 1) </script> This code does the following: increments a counter every time the browser attempts to navigate away from the current page, via the window.onbeforeonload event handler sets up a timer that fires every millisecond via setInterval(), and if it sees the counter incremented, changes the current location to a server of the attacker's control that server serves up a page with HTTP status code 204, which does not cause the browser to nagivate anywhere My question is -- and this is more of a JavaScript puzzle than an actual problem -- how can you defeat the frame-busting buster? I had a few thoughts, but nothing worked in my testing: attempting to clear the onbeforeunload event via onbeforeonload = null had no effect adding an alert() stopped the process let the user know it was happening, but did not interfere with the code in any way; clicking OK lets the busting continue as normal I can't think of any way to clear the setInterval() timer I'm not much of a JavaScript programmer, so here's my challenge to you: hey buster, can you bust the frame-busting buster?

    Read the article

  • How do I add additional data to a DataGridRowGroupHeader?

    - by Jeff Yates
    I have a DataGrid that is showing some data via a PagedCollectionView with one group definition. I have created a Style for the corresponding DataGridRowGroupHeader under which I have added a ControlTemplate containing an additional TextBlock and a spacing Rectangle. I would like to bind the widths of these controls to the widths of particular columns, but I am struggling to get this working. I would also like to bind the Text property of the TextBlock to a value. I tried binding the widths via the Width property of a Rectangle in resources but this didn't work (possibly because the Rectangle was never drawn and therefore didn't calculate it's layout). However, I believe both sets of bindings can be performed with some use of one or more ValueConverter implementations, but I was wondering if there was a better way. Can any of this be achieved through the definition of a ControlTemplate?

    Read the article

  • How to test controllers with CodeIgniter PART 2?

    - by Jeff
    I am having difficulties testing Controllers in Codeigniter: I use Toast but when I invoke my Home Controller class I get an exception that "db" is not defined. Has anybody an idea how to test this 1-1? Thanks class Home_tests extends Toast { function __construct() { parent::__construct(__FILE__); // Load any models, libraries etc. you need here } function test_select_user() { $controller = new Home(); $controller->getDbUser('[email protected]','password'); assert($query->num_rows() == 0 ); } }

    Read the article

  • Visual Studio 2010 web.config transformations (TransformWebConfig target)

    - by Jeff D
    I am trying to write unit tests for my transformations, so I am running: msbuild migrated-project.csproj /p:Configuration=Release /T:TransformWebConfig. This works for a new project I create in VS2010, but doesn't in this project. I'm assuming it's because it was originally a 2008 project. I know this is supposed to run in a webplatformbuild whatever, but what I'm trying to do, is just run the transform, so I can grab the transformed web.config, and run some unit tests to make sure the right values exist. I don't see TransformWebConfig referenced as a target in either project, so I'm not sure what I'm looking for.

    Read the article

  • How to access uploaded files in Ruby

    - by Jeff King
    I am trying use a Java Uploader in a ROR app (for its ease of uploading entire directories). The selected uploader comes with some PHP code that saves the files to the server. I am trying to translate this code to Ruby, but am stumped on this point: PHP has a very convenient superglobal – $_FILES – that contains a hash of all files uploaded to the current script via the HTTP POST method. It appears Ruby does not have a similar resource. Lacking that, what is the best way to access and save the uploaded files? I am using the JavaPowUpload uploader ( http://www.element-it.com/OnlineHelpJavaPowUpload/index.html ).

    Read the article

  • CGBitmapContextCreate issue while trying to resize images

    - by Jeff
    Hello! I'm running into an issue when I try to create a CGContextRef while attempting to resize some images: There are the errors Sun May 16 20:07:18 new-host.home app [7406] <Error>: Unable to create bitmap delegate device Sun May 16 20:07:18 new-host.home app [7406] <Error>: createBitmapContext: failed to create delegate. My code looks like this - (UIImage*) resizeImage:(UIImage*)originalImage withSize:(CGSize)newSize { CGSize originalSize = originalImage.size; CGFloat originalAspectRatio = originalSize.width / originalSize.height; CGImageRef cgImage = nil; int bitmapWidth = newSize.width; int bitmapHeight = newSize.height; CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); CGContextRef context = CGBitmapContextCreate(nil, bitmapWidth, bitmapHeight, 8, bitmapWidth * 4, colorspace, kCGImageAlphaPremultipliedLast); if (context != nil) { // Flip the coordinate system //CGContextScaleCTM(context, 1.0, -1.0); //CGContextTranslateCTM(context, 0.0, -bitmapHeight); // Black background CGRect rect = CGRectMake(0, 0, bitmapWidth, bitmapHeight); CGContextSetRGBFillColor (context, 0, 0, 0, 1); CGContextFillRect (context, rect); // Resize box to maintain aspect ratio if (originalAspectRatio < 1.0) { rect.origin.y += (rect.size.height - rect.size.width / originalAspectRatio) * 0.5; rect.size.height = rect.size.width / originalAspectRatio; } else { rect.origin.x += (rect.size.width - rect.size.height * originalAspectRatio) * 0.5; rect.size.width = rect.size.height * originalAspectRatio; } CGContextSetInterpolationQuality(context, kCGInterpolationHigh); // Draw image CGContextDrawImage (context, rect, [originalImage CGImage]); // Get image cgImage = CGBitmapContextCreateImage (context); // Release context CGContextRelease(context); } CGColorSpaceRelease(colorspace); UIImage *result = [UIImage imageWithCGImage:cgImage]; CGImageRelease (cgImage); return result; }

    Read the article

  • Embedded file system and sqlite

    - by Jeff Lamb
    I'm working on an embedded project that has no file system, and our kludge of a database has ballooned in functionality. It's now so inefficient, we can't stand it any longer. I'm trying to figure out if there's built-in support for a flat file system in SQLite. I've dug around http://sqlite.org for a while now, but haven't found anything specifically covering it. Has anyone found a supported implementation written in C? It seems like such a straightforward request, but I can't find anything written about it. We have plenty of memory available. In a perfect world, I'd like to just set aside a large portion of it, pass the FS a pointer, then let the FS/SQLite library just use what it wants.

    Read the article

  • Redirect with htaccess for images onto another server without redirect looping

    - by Jeff
    Hey guys, I currently have a host where my main site is hosted on. I have set up nginx on another server to mirror/cache files being requested if it doesn't have it already, in particular images and flv videos. For example: www.domain.com is my main site. www.domain.com/video/video.flv www.domain.com/images/1.png I would like to ask apache to redirect it to imgserv.domain.com (imgserv.domain.com points to another server IP) imgserv.domain.com/video/video.flv imgserv.domain.com/images/1.png Basically redirect everything with certain filetypes and preserving the structure of the URL, like flv etc. I tried something but I am getting a redirect looping error. Could someone help me out? Thank you!

    Read the article

  • Switching from ListView to VirtualStringTree

    - by Jeff
    Hey S.O! I am trying to build my projects with a VirtualStringTree rather than a Listview, because of the vast speed difference. The thing is, even after looking thru the demo's, I just can't figure out exactly how I would use it as a ListView. Like, adding, deleting, and basically just working with ListView items is so easy, but when I look at the VT, it gets almost too complicated. All I am looking for, is a VT that looks like a ListView, with subitems etc. Here are some routines using the ListView, that I would like to use with VT (This is just a pseudo example: procedure Add; begin with ListView.Items.Add do Begin Caption := EditCaption.Text; SubItems.Add(EditSubItem.Text): End; end; Procedure ReadItem(I : Integer); begin ShowMessage(ListView.Items[I].Caption); ShowMessage(ListView.Items[I].SubItems[0]); end; Of course, also the Delete function, but since thats like 1 line, I didnt bother :P Could anyone maybe translate the above examples into using a ListView style VT? Thanks!

    Read the article

  • Silverlight ChildWindow for WPF

    - by Jeff
    is it possible to make a ChildWindow like ChildWindow in Silverlight, but for WPF? I tried to adapt the Silverlight ChildWindow to WPF but ran into issues with Transformations and not being able to set the Popup's Parent. I'm trying to make something that works simular so I do not have to add code to the XAML for popups. Any ideas?

    Read the article

  • How do DotNetOpenAuth whitelist and blacklists work?

    - by Jeff
    Does anyone have any documentation on DotNetOpenAuth and the way it handles while lists and black lists? My config <untrustedWebRequest> <blacklistHosts> <add name="*" /> </blacklistHosts> <whitelistHosts> <add name="www.mysite.ca" /> <add name="mysite.ca" /> <add name="devel.mysite.ca" /> <add name="devel.mysite.com" /> <add name="mysite.com" /> <add name="www.mysite.com" /> </whitelistHosts> </untrustedWebRequest> What I want is to have it cancel the request if it's any site not in the whilelist. I'm currently running version 2.5.49045 but plan to update soon. using <blacklistHostsRegex> <add name=".*" /> </blacklistHostsRegex> blocked ever site even ones in the whitelist.

    Read the article

  • OutOfMemoryException with Image.Clone - Only on Windows 2003

    - by Jeff Rapp
    So here's my issue. I have an image that I need to shrink. The original image is a grayscale PNG, which isn't a huge issues except that when I shrink it down, the thermal label printers pickup the artifacts and print them on the label. So, what I did was change the image to black & white (Format1bppIndexed) before resizing, like this: Dim bte() As Byte = System.Convert.FromBase64String(imgStr) Dim ms As New IO.MemoryStream(bte) Dim bmp As New System.Drawing.Bitmap(ms) Dim monoImage As Drawing.Bitmap = New Drawing.Bitmap(1200, 1800, Drawing.Imaging.PixelFormat.Format1bppIndexed) Dim rect As New Drawing.Rectangle(0, 0, 1200, 1800) monoImage = bmp.Clone(rect, Drawing.Imaging.PixelFormat.Format1bppIndexed) And then I resize it. This code works fine on my Windows 7 machine, but when I run it on the Windows 2003 Server box that it calls home, it always throws an OutOfMemoryException when it hits the bmp.Clone line. Any ideas as to what's happening, or perhaps a better solution to converting the image to B&W?

    Read the article

  • Rename "Event" object in jQuery FullCalendar plug-in

    - by Jeff
    GREAT PLUGIN!!! BUT... choice of word "Event" to mean a "calendar entry" was particularly unfortunate This is a wonderfully well-written plug in, and I've really impressed people here at work with what this thing can do. The documentation is astonishingly thorough and clear. Congratulations to Adam! HOWEVER, this plug-in refers to entries in the calendar as "Events" -- this has caused a lot of confusion in my development team's conversations, because when we use the word "Event" we think of things like onmouseover, click, etc. We would really prefer a term like CalendarEvent or CalendarEntry. I am not all that experienced with jQuery yet, so am wondering if there is a simple way to alias one of those terms to this plug-in's Event/Events object? (I know we could recode the plug-in directly, but our code will then break when we download an update.) Thanks!

    Read the article

  • telerik nested grid issue

    - by Jeff
    1.Here I am having a grid within a parent grid and there is a link button within the nested grid. 2.For the link button I need to use the item command event of the nested grid or I can use the item command of parent grid as well. 3.The issue is when I click on the link button within nested grid then item command event doesn’t get fired for the nestedgrid.But in case of parent grid its working fine. 4.I have tried handlers and item created event also to use handlers in code behind or in aspx.But nothing helped in getting me item command event hit for the nested grid. 5.Previously in case of repeaters there was one item command which was handling all the grids. I have tried different item command event for child and parent but it also didn’t work.

    Read the article

  • msbuild TransformWebConfig task - doesn't work for App.configs?

    - by Jeff D
    I have a windows service that will need to have the same kind of transformations that the web.configs would use, but VS 2010 doesn't seem to support that. I've tried manually adding the App.Release.Config files, and then using msbuil [PROJ] /T:TransformWebConfig /p:Configuration=Release but no transformation is performed. I got a TransformWebConfig folder createed in my obj subdirectory, but that's it. Is this thing hardcoded to only work with web.configs?

    Read the article

  • Disable Shadow on a ScatterViewItem on Microsoft Surface

    - by Jeff
    Hello, I'm developing a program on Microsoft Surface. And I didn't succeed to make disable completely the shadow. Here is my problem : http://i61.servimg.com/u/f61/11/31/25/01/sans_t10.png Heres is the XAML code : <s:ScatterViewItem Height="130" x:Name="jetons1" Width="180" CanScale="False" BorderThickness="0" ShowsActivationEffects="False" StaysActive="True" SnapsToDevicePixels="True" Foreground="{x:Null}" Background="{x:Null}" BorderBrush="{x:Null}" />

    Read the article

  • DotNetOpenID / DotNetOpenAuth

    - by Jeff
    Does anyone have any documentation on DotNetOpenAuth and the way it handles while lists and black lists? My config <untrustedWebRequest> <blacklistHosts> <add name="*" /> </blacklistHosts> <whitelistHosts> <add name="www.mysite.ca" /> <add name="mysite.ca" /> <add name="devel.mysite.ca" /> <add name="devel.mysite.com" /> <add name="mysite.com" /> <add name="www.mysite.com" /> </whitelistHosts> </untrustedWebRequest> What I want is to have it cancel the request if it's any site not in the whilelist. I'm currently running version 2.5.49045 but plan to update soon. using <blacklistHostsRegex> <add name=".*" /> </blacklistHostsRegex> blocked ever site even ones in the whitelist.

    Read the article

  • RegEx match open tags except XHTML self-contained tags

    - by Jeff
    I need to match all of these opening tags: <p> <a href="foo"> But not these: <br /> <hr class="foo" /> I came up with this and wanted to make sure I've got it right. I am only capturing the a-z. <([a-z]+) *[^/]*?> I believe it says: Find a less-than, then Find (and capture) a-z one or more times, then Find zero or more spaces, then Find any character zero or more times, greedy, except /, then Find a greater-than Do I have that right? And more importantly, what do you think? =) EDIT: Hmm, which answer to mark as correct? For the record, ALL the answers are appreciated. Many thanks!

    Read the article

  • Constant NSDictionary/NSArray for class methods.

    - by Jeff B
    I am trying to code a global lookup table of sorts. I have game data that is stored in character/string format in a plist, but which needs to be in integer/id format when it is loaded. For instance, in the level data file, a "p" means player. In the game code a player is represented as the integer 1. This let's me do some bitwise operations, etc. I am simplifying greatly here, but trying to get the point across. Also, there is a conversion to coordinates for the sprite on a sprite sheet. Right now this string-integer, integer-string, integer-coordinate, etc. conversion is taking place in several places in code using a case statement. This stinks, of course, and I would rather do it with a dictionary lookup. I created a class called levelInfo, and want to define the dictionary for this conversion, and then class methods to call when I need to do a conversion, or otherwise deal with level data. NSString *levelObjects = @"empty,player,object,thing,doohickey"; int levelIDs[] = [0,1,2,4,8]; // etc etc @implementation LevelInfo +(int) crateIDfromChar: (char) crateChar { int idx = [[crateTypes componentsSeparatedByString:@","] indexOfObject: crateChar]; return levelIDs[idx]; } +(NSString *) crateStringFromID: (int) crateID { return [[crateTypes componentsSeparatedByString:@","] objectAtIndex: crateID]; } @end Is there a better way to do this? It feels wrong to basically build these temporary arrays, or dictionaries, or whatever for each call to do this translation. And I don't know of a way to declare a constant NSArray or NSDictionary. Please, tell me a better way....

    Read the article

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