Questions

It's Possible To Develop Using Cocoa In Windows And Linux

I'm starting to learn Objective-C and I don't have a Mac (and I don't have plans to get one), but as I see that Cocoa is a very good framework to develop in Objective-C, I want to know: Is it possible to develop using Cocoa in Windows and Linux? Thanks. ...

ASP.NET Ajax - Using jQuery BlockUI in two places; can I unblock a specific div?

I'm using the jQuery BlockUI Plugin (v2) because it rocks the casbah. For every ASP.NET AJAX request made on the page, I use the InitializeRequest and EndRequest client-side events to block and unblock the UI, respectively -- this allows me to easily throw up a "Please wait..." dialog. ...

How to dynamically assign report and connectioninfo to crystal report

I am completely lost on this one-- I have a .Rpt file that runs fine by itself. This report file takes 4 parameters and connects to an oracle database. I have all the database code set up correctly. So i think. I cannot for the life of me connect this report file to the connection and ...

Selecting combination using linq

This is also one of the interview question i have faced recently. Description : The task is $ 100(Please consider some currency) will be given to me.I need to purchase three items itemA,itemB,itemC.The cost of (I am not sure 0.25$ or 0.75 $ are meaningful,so think it as other currency) ...

PHP File upload to memory

I would like to upload a file from an html form, post it to PHP and load it into memory, bypassing writing it to a file. Is it possible to do a file upload and keep it in memory, or do I have to write it to a file? ...

I'm going to write 'Unit of Work', please help me find out all gimmicks

I'm going to write my own DAL in C#. I decided to use 'Unit of Work' pattern (next mentioned as uow) with request as a scope and Identity map stored in HttpContext.Items. I have right now question about implementing of CRUD methods. How/where are they implemented? Are they implemented i ...

WPF in a browser and printing

Can WPF be hosted in a web browser? If so how? (I think it can as I have seen some examples of it.) While hosted in the web browser what printing support does it have? What are the drawbacks to using WPF in a browser? My company is looking for a rich web app platform. They will not ...

Installing a self-developed Windows Service

I'm trying to deploy a service that I wrote. Here's the InstallLog file: Installing assembly 'c:\Users\brwatson\Development\Projects\TweetLinks\TweetLinkQueue\bin\Debug\TweetLinkQueue.exe'. Affected parameters are: logtoconsole = assemblypath = c:\Users\brwatson\Development\Proj ...

High-speed performance of image filtering in C#

I have Bitmap. I want to apply median filter to my bitmap. But I can’t use GetPixel() and SetPixel() because speed is very important factor for me. I need very fast way to do it. May be it can be done with a Graphics.DrawImage(Image, Point[], Rectangle, GraphicsUnit, ImageAttributes). A ...

Profiling a Java Application in Eclipse? (plug-in) [closed]

I'm looking to find bottlenecks in my Java application in Eclipse. I'm thinking this might be useful: http://www.eclipse.org/projects/project%5Fsummary.php?projectid=tptp.performance Any other good plug-ins to use? EDIT OK, it doesn't necessarily have to be an Eclipse plug-in. But it ...

Visual Studio 2008: Project dependencies and build order all out of sync, plugin available?

I have quite a large project, actually 2 but they share a lot of projects between each other. The problem being when I compile from NOTHING, that is, no DLLs in my common bin directory, it fails.. This is due to the fact that some projects are not compiling before others that are depend ...

When is the size of the database call more expensive than the frequency of calls?

Can someone give me a relative idea of when it makes more sense to hit the database many times for small query results vs caching a large number of rows and querying that? For example, if I have a query returning 2,000 results. And then I have additional queries on those results that t ...

Byte Array to Image File

I am given a byte[] array in Java which contains the bytes for an image, and I need to output it into an image. How would I go about doing this? Much thanks ...

How can I modify the entire ASP.NET page content right before it's output?

I have a page that has a bunch of user controls on it. I want to be able to have "macros" or "placeholders" directly in the content that will get replaced in my code. It shouldn't really matter, but I'm using Ektron as my CMS. Are there any page events that I can hook into to do a str ...

Twitter notification ajax bar, how did they do it?

I'm trying to get that cool, ajax sliding bar that twitter has (its slightly transparent, white). I tried looking at the html/css, but it seems that they dynamically inject the various DOM layers. Does someone know how they implemented it? I really want to learn how to do this. ...

Opening multiple sessions simultaneously in NHibernate

I finally figured out what's wrong with my code, but I'm not sure how to fix it. I have some background processes running on a separate thread that perform some database maintenance tasks. Here's an exmple of what's happening: //Both processes share the same instance of ISessionFactory ...

How do I Pivot on an XML column's attributes in T-SQL

I need to perform a pivot on an XML column in a table, where the XML contains multiple elements with a number of attributes. The attributes in each element is always the same, however the number of elements will vary. Let me give an example... FormEntryId | FormXML ...

Opaque pointers in F77

I have a project that is half in C and half in Fortran 77. [No, not Fortran 90 or 03, Fortran 77.] The code would be much cleaner if I could pass pointers generated on the C side back to Fortran, which would then pass them back as necessary for handling in other C functions. As it is, th ...

How to check for an exploding zip file in bash?

I have a bash shell script that unzips a zip file, and manipulates the resulting files. Because of the process, I expect all the content I am interested to be within a single folder like so: file.zip /file /contentFolder1 /contentFolder2 stuff1.txt stuff2.txt . ...

Triggering on a ScrollViewer's scroll bar visibility (WPF)

Is it possible to create a Trigger that is triggered based on a ScrollViewer's scroll bar visibility? I have a ScrollViewer with its VerticalScrollBarVisibility set to Auto and I want to change some of the ScrollViewer's properties only when the scroll bar is actually visible. Something ...

asp.net textbox won't show vertical scrollbar on iphone

I have an company asp.net website with textboxes which may contain several hundred words. These display just fine with a vertical scrollbar in Firefox and Safari on a Mac. But on Safari on an iphone (the majority of users will have these) there is no vertical scrollbar. Is there any w ...

SharePoint, VirtualPathProviders and Application Restarts

Given that the only way to unload dynamically compiled assemblies (to reclaim memory) is to unload the app domain, how does SharePoint rely on VirtualPathProviders, for master pages and page layouts in particular, without bumping into this limitation? The restart can be delayed through ...

show “webpage has expired” on back button

What is the requirement for the browser to show the ubiquitous "this page has expired" message when the user hits the back button? What are some user-friendly ways to prevent the user from using the back button in a webapp? ...

Does “svnadmin dump” lock the repository?

... what happens if someone tries to commit during a svnadmin dump REPOS_PATH? The subversion book doesn't say anything about that. ...

High performance comparison of signed int arrays (using Intel IPP library)

We're trying to compare two equally sized native arrays of signed int values using inequality operations, <, <=, > and >=, in a high performance way. As many values are compared, the true/false results would be sotred in a char array of the same size of the input, where 0x00 means ...

Modify Array to Output in JSON using PHP and jQuery

I'm currently working with the jQuery Autocomplete Plugin. The code they provided in the demonstration is: <?php $q = strtolower($_GET["q"]); $items = array( "Peter Pan"=>"peter@pan.de", "Molly"=>"molly@yahoo.com", ); $result = array(); foreach ($items as $key) { ...

How to Replace Multiple Characters in SQL?

This is based on a similar question How to Replace Multiple Characters in Access SQL? I wrote this since sql server 2005 seems to have a limit on replace() function to 19 replacements inside a where clause. I have the following task: Need to perform a match on a column, and to improve ...

C# - Windows Service installer fails in custom action

We install a windows service from a custom action as described here: CodeProject Every so often, when uninstalling our application, it does not properly uninstall the service. Instead it "marks the service for deletion". You can see this message by running installutil.exe /u on our ex ...

Rspec Mocks: mock / yield the block from a method call

I've got this code: Net::SSH.start(@server, @username, :password => @password) do |ssh| output = ssh.exec!(@command) @logger.info 'SSH output: ' @logger.info output end I can mock the SSH.Start using RSpec's mock framework like this, to tell me that I've started ...

Data structure for quick time interval look up

I have a set of time intervals In = (an, bn). I need to run lots of look ups where I'm given a time t and need to quickly return the intervals that contain t, e.g., those intervals such that an <= t <= bn. What is a good data structure or algorithm for this? If it matters, in my ...

Hot Tags