Search Results

Search found 19688 results on 788 pages for 'con current'.

Page 160/788 | < Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >

  • MFC/WIN32: mouse hover highlight in listctrl

    - by Mordachai
    The ListView control of Windows Explorer gives a highlight to whatever item is under the mouse, without affecting the current selection. This helps enormously with relating what item a given tooltip applies to within a listview - especially in report mode. However, I am currently unable to find any APIs that would give my MFC application's CListCtrl that same behavior. Extended styles only have LVS_EX_TRACKSELECT, which actually alters the current selection (yuck!). Does anyone know how to provide a standard CListCtrl (or whatever that actually sits on top of) the mouse-hot-tracking capability? I found some articles on how to provide per cell and per row tooltip text, but its hard to tell what the tooltips relate to without something highlighting...

    Read the article

  • Android: Constructing a triangle based on Geographical information

    - by Aidan
    Hi Guys, I'm constructing a geolocation based application and I'm trying to figure out a way to make my application realise when a user is facing the direction of the given location (a particular long / lat co-ord). I've got the math figured, I just have the triangle to construct. Here's a further clarification of what I want to do.. I just want to know is there a way to get java to construct 2 other co-ordinates based on my orientation in relation to true north and my current co-ordinate? I'd like to construct a tri-angle, 45 degrees out each way of my current location (one of the points) and 1 kilometer in that direction. The problem is I don't know how to make Android/Java recognise that I want to find that point in the direction I'm currently facing.. Anyone got any ideas?

    Read the article

  • Design in "mixed" languages: object oriented design or functional programming?

    - by dema80
    In the past few years, the languages I like to use are becoming more and more "functional". I now use languages that are a sort of "hybrid": C#, F#, Scala. I like to design my application using classes that correspond to the domain objects, and use functional features where this makes coding easier, more coincise and safer (especially when operating on collections or when passing functions). However the two worlds "clash" when coming to design patterns. The specific example I faced recently is the Observer pattern. I want a producer to notify some other code (the "consumers/observers", say a DB storage, a logger, and so on) when an item is created or changed. I initially did it "functionally" like this: producer.foo(item => { updateItemInDb(item); insertLog(item) }) // calls the function passed as argument as an item is processed But I'm now wondering if I should use a more "OO" approach: interface IItemObserver { onNotify(Item) } class DBObserver : IItemObserver ... class LogObserver: IItemObserver ... producer.addObserver(new DBObserver) producer.addObserver(new LogObserver) producer.foo() //calls observer in a loop Which are the pro and con of the two approach? I once heard a FP guru say that design patterns are there only because of the limitations of the language, and that's why there are so few in functional languages. Maybe this could be an example of it? EDIT: In my particular scenario I don't need it, but.. how would you implement removal and addition of "observers" in the functional way? (I.e. how would you implement all the functionalities in the pattern?) Just passing a new function, for example?

    Read the article

  • How do you manage your sqlserver database projects for new builds and migrations?

    - by Rory
    How do you manage your sql server database build/deploy/migrate for visual studio projects? We have a product that includes a reasonable database part (~100 tables, ~500 procs/functions/views), so we need to be able to deploy new databases of the current version as well as upgrade older databases up to the current version. Currently we maintain separate scripts for creation of new databases and migration between versions. Clearly not ideal, but how is anyone else dealing with this? This is complicated for us by having many customers who each have their own db instance, rather than say just having dev/test/live instances on our own web servers, but the processes around managing dev/test/live for others must be similar.

    Read the article

  • very weird problem concerning date and time in silverlight + ria services

    - by Patrick LHM
    Hello Friends i'm facing a very weird problem in sliverlight 4 + RIA Services, or maybe it's not weird and i'm just a newbie anyway i hope someone here can help, the problem is the following i've created a function on the server side inside the domain service this function is very simple and has a line in it that adds the server current date and time to the database (it's an HR application and employees should sign in and out thrue it each from it's own pc ) Emp.TimeOut = system.DateTime.now (C# syntax) the weird part is that for some users it always adds 3 hours to the current time(exp if he signes out at 5 it shows 8) and for others it works perfectly. the server and all the stations in the company have exactly the same time settings and the same time zone, and anyway my fucntion is on the server side so it should no be realted to the users time. any ideas why this is happening ? i've bin trying to find out why for days now but with no luck

    Read the article

  • file_operations Question, how do i know if a process that opened a file for writing has decided to c

    - by djTeller
    Hi Kernel Gurus, I'm currently writing a simple "multicaster" module. Only one process can open a proc filesystem file for writing, and the rest can open it for reading. To do so i use the inode_operation .permission callback, I check the operation and when i detect someone open a file for writing I set a flag ON. i need a way to detect if a process that opened a file for writing has decided to close the file so i can set the flag OFF, so someone else can open for writing. Currently in case someone is open for writing i save the current-pid of that process and when the .close callback is called I check if that process is the one I saved earlier. Is there a better way to do that? Without saving the pid, perhaps checking the files that the current process has opened and it's permission... Thanks!

    Read the article

  • Getting ready for learn html5

    - by vtortola
    Hi, I'm a desktop application developer, and I plan learning html5, but as it's not released, there is no (almost) published books and no too much infomation from beginners on the web... I fell I should start with html4 and the current web development skills. I think, I should start with html4, css and javascript... but there are so many technologies related that I get lost :D So, what current technologies will be sill used when html5 be released? I mean, what about "jquery" and "ajax"? I know they are javascript under the hood, but will they still make sense in the future? What would you recommend me considering that I have just a little bit of html knowlegde, almost null CSS and completely null in javascript? Thanks in advance.

    Read the article

  • Intercepting static and dynamic links using javascript

    - by soren.qvist
    Hi, I'm currently developing an ajax application and I'm looking for a feature that lets me intercept all static and dynamic links using javascript. The links look like these: <a href="link1/">link 1</a> <a href="link2/">link 2</a> etc. I then want the browser to redirect to: current.page/#link1/ rather than current.page/link1/. I'm using jQuery, so the live() function is an option, however using that as a solution just seems rather sluggish to me(am I hysterical?). If there is a way to intercept ALL links on a page, maybe through detecting a change in the address, that would greatly help. I've tried a few plugins for jQuery (jQuery address & SWFaddress) but they only seem to have event handlers that respond to changes in anchor tags in the address. Any ideas? thanks for your time

    Read the article

  • Implement Combobox/Option Menu funcionality on an iPhone interface?

    - by MikeN
    I want to give a list of choices on an iPhone GUI that works like a Combobox/Option menu. It needs to display the current selection, but on tapping it you should be able to change the current selection which will trigger a refresh of the screen. The option menu is letting the user choose which category a search is being performed under. So there is a default category and there are about 6 other choices. Idea 1: Use a label or button and when clicked on a new screen overlays that has all 6 options in a tableview, clicking on one closes the overlay screen and goes back to the main page with the updated value displayed. Idea 2: Should I use a totally different but native iPhone GUI widget like a Navbar at the bottom of the screen to reflect the different options?

    Read the article

  • Listbox that when you reach the end it goes back to the beginning

    - by Roy
    Hi, Is there a way to make a Listbox go back to the beginning of the list once a user scrolls all the way to the end of list? Current aspx code: <ListBox x:Name="listbox"> <ListBox.ItemTemplate> <DataTemplate> <Image Name="imgSource" Source="{Binding Path=Url}" /> </DataTemplate> </ListBox.ItemTemplate> </ListBox> Current code behind code: public class ImageScroller { public string Url { get; set; } } public MainPage() { InitializeComponent(); LoadImages(); } void LoadImages() { listbox.ItemsSource = new List<ImageScroller> { new ImageScroller { Url = "images/Chrysanthemum.jpg" }, new ImageScroller { Url = "images/Desert.jpg" }, new ImageScroller { Url = "images/Hydrangeas.jpg" }, }; } Thanks for your help!

    Read the article

  • "Inline" function call: function is never hit

    - by Shimrod
    Hi everybody. I'm trying to make a tabbed menu for the asp.net website I'm working on. One of the pre-requisite is obviously to color the current tab differently, so the user can know on which tab is currently is. To do this, I made this method in my code-behind: Protected Function GetCssClass(ByVal ctrl As LinkButton) As String If ctrl.ID = currentLink Then Return "current" Else Return String.Empty End If End Function and I call the method like this in my aspx page: <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="/Default.aspx" CssClass="<%#GetCssClass(LinkButton1) %>" >Home</asp:LinkButton> <asp:LinkButton ID="LinkButton2" runat="server" PostBackUrl="/Directory/page1.aspx" CssClass="<%#GetCssClass(LinkButton2) %>" >Page1</asp:LinkButton> But the method is never hit... As I understand, the method should be called each time the LinkButton is drawn... Does someone have an idea why? Thanks in advance !

    Read the article

  • How to determine the inner context node within an XSLT select

    - by Marcus Rickert
    Hi there! I'm trying to determine a subset of nodes stored in the variable objs by using a user defined function cube:is_active: <xsl:variable name="active_cubes" select="$objs[cube:is_active(XXX) = 'TRUE']"/ Since the function does not allow a local context I'm required to pass it as a parameter (denoted by XXX). However, the usual suspects "." or "current()" do not work since they refer to context node of the surrounding block and NOT to the current element of objs which is evaluated. The only solution so far which DOES work is: XXX=SOME_CHILD_TAG/.. But this is really ugly since it depends on the existence of the child tag for the parent node to work correctly. Is there any other way? Thanks!

    Read the article

  • Android how to create notification that resumes activity

    - by Adam Praiswater
    I a have a notification in a receiver that fires off fine, but it restarts the activity (thus clearing the edittexts and resetting the toggle button) How can i set it so that when its tapped on it resumes the activity rather that clearing and resetting everything? My current code doesnt work. Current Code String currentDateTimeString = DateFormat.getDateTimeInstance().format(new Date()); Intent intenti= new Intent(context, Locator.class); intenti.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent contentIntent = PendingIntent.getActivity(context, 0, intenti, 0); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setSmallIcon(R.drawable.xxxxxxnotifyicon) .setContentTitle("xxxxxxx Link") .setContentText("Auto Check In Complete at " + currentDateTimeString); mBuilder.setContentIntent(contentIntent); mBuilder.setDefaults(Notification.DEFAULT_SOUND); mBuilder.setAutoCancel(true); NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); mNotificationManager.notify(1, mBuilder.build());

    Read the article

  • Custom Error mode in Web.Config File

    - by Zerotoinfinite
    Hi All, I have deployed my application on server and Now I am getting this error: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off". Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL. ~~~ I have defined custom error pages for my applicatio. Please help me, how to rectify this issue. Thanks in advance.

    Read the article

  • Difference between Cloud and Virtualization

    - by Akash Kava
    Ops: This does not belong to ServerFault because it focuses on Programing Architecture. I have following questions regarding differences between Cloud and Virtualization.. How Cloud is different then Virtualization? Currently I tried to find out pricing of Rackspace, Amazone and all similar cloud providers, I found that our current 6 dedicated servers came cheaper then their pricing. So how one can claim cloud is cheaper? Is it cheaper only in comparison of normal hosting? We re organized our infrastructure in virtual environment to reduce or configuration overhead at time of failure, we did not have to rewrite any peice of code that is already written for earlier setup. So moving to virtualization does not require any re programming. But cloud is absoltely different and it will require entire reprogramming right? Is it really worth to recode when our current IT costs are 3-4 times lower then cloud hosting including raid backups and all sort of clustering for high availability? New programming architecture means new overheads of training staff, new methods of testing and new deployment schemes, does it justify over "on demand resource usage" words of cloud? We are having current development architecture with simple Server side ASP.NET WebServices with no local context and on client side Flex/Silverlight which offers pretty good REST architecture and its highly scalable. How does cloud differs from REST model of deployment? On storage, SQL Server or MySQL offers pretty good replication and high availibility then what is advantage in cloud? Data guarantee, one of our vendor hosting some other customer's app on cloud (one of most used), lost Entire Hard Disk (the virtual) and entire module in first 6 months. Second provider said its your duty to take backup, fine I agree, but no provider gives SLA for data guarantee, they give 99% uptime. However in most business apps, uptime is less important then data integrity. In our 10 years of dedicated hosting experience we had only one hard disk crash. This makes me little skeptical to go for cloud and loosing control over data. And I feel its just a big marketing buzz to sell virtulization in different form. Size of data, currently all providers charge very heavy for large data, if you are hosting only below 100GB cloud can be good alternative, but I think virtual servers and dedicated servers above 100GB to few TBs are still cheaper. Why would want to pay so high on cloud when there is no data guarentee as well as it doesnt say anything about redundancy. (I wish SO had something for spell check for Internet Explorer, sorry for wrong spellings in my post)

    Read the article

  • How do i tint an image with HTML5 Canvas ?

    - by djdolber
    My question is, what is the best way to tint an image that is drawn using the drawImage method. The target useage for this is advanced 2d particle-effects (game development) where particles change colors over time etc. I am not asking how to tint the whole canvas, only the current image i am about to draw. I have concluded that the globalAlpha parameter affects the current image that is drawn. //works with drawImage() canvas2d.globalAlpha = 0.5; But how do i tint each image with an arbitrary color value ? It would be awesome if there was some kind of globalFillStyle or globalColor or that kind of thing...

    Read the article

  • Why does this bash command take up all space on device?

    - by chelmertz
    Hey! I'm a little new on searching via bash, so feel free to give me suggestions on the methods to use instead of this, which I'll never use again :) I'm searching for occurances of a string, recursively in a directory, with ~50 not-that-large php-files in it; some in current directory, some in directories beneath current dir, three levels of directories down at most. The method I'm using is: find . | xargs grep "module" > module.txt When in simple (one level) directories, this works fine, but in this case, the file became 4 GB large until it filled up all space on the partition :) It wasn't even done yet.. Would someone educate me so I won't embarass myself again?

    Read the article

  • Joomla Session Variable as Plugin Parameter

    - by dosboy
    I have a Joomla plugin which takes varying parameters. I need to retrieve one of these parameters from the current session. I've tried using Jumi and a little PHP snipped to retrieve the value and output it in the plugin's parameter list, but the Joomla plugin parser only handles the outter-most set of curly braces. ex. {fabrik view=table id=62 resetfilters=1 fab_tours_ro___tour_id=[tour_id]} [tour_id] I need to retrieve from the current session. I've tried {fabrik view=table id=62 resetfilters=1 fab_tours_ro___tour_id={jumi [scripts/get_tour_id.php]}} In that case the {jumi} tag never gets parsed. I could hack the {fabrik} plugin, but I'd prefer to do this without making any core or component changes, especially since I update Fabrik quite regularly via svn.

    Read the article

  • Help for CSS Menu Dropdown, FF OK and IE6 Problem

    - by Taruhku
    IE Problem, FF OK. Please help..???? Screen Shoot problem click here This is my CSS dolphincontainer { position:relative; height:56px; color:#E0E0E0; background:#143D55; width:100%; font-family:Tahoma; left: 0px; } dolphinnav {position:absolute;;height:33px;font-size:12px;font-weight:bold;background:#fff url(images/dolphin_bg.gif) repeat-x bottom left;padding:0 0 0 10px;width:975px;} dolphinnav ul {margin:0;padding:0;list-style-type:none;width:auto;float:left;} dolphinnav ul li {display:block;float:left;margin:0 1px;} dolphinnav ul li a {display:block;float:left;color:#001b2c;text-decoration:none;padding:0 0 0 10px;height:33px;} dolphinnav ul li a span {padding:12px 20px 0 0;height:21px;float:left;font-weight:bold;} dolphinnav ul li a:hover {color:#fff;background:transparent url(images/dolphin_bg-OVER.gif) repeat-x bottom left;} dolphinnav ul li a:hover span {display:block;width:auto;cursor:pointer;} dolphinnav ul li a.current,#dolphinnav ul li a.current:hover {color:#fff;background:#00517e url(images/dolphin_left-ON.gif) no-repeat top left;line-height:275%;} dolphinnav ul li a.current span {display:block;padding:0 20px 0 0;width:auto;background:#00517e url(images/dolphin_right-ON.gif) no-repeat top right;height:33px;} .tuckUp { display:block; width:90px; height:30px; overflow:hidden; cursor:pointer; } .pullDown { width:90px; height:56px; } .item a:link, .item a:visited { display:inline; float:left; background:#fff url(images/dolphin_bg.gif) repeat-x top left;padding:0 0 0 10px; text-align:left; color:#444; font-size:11px; font-weight:bold; text-decoration:none; line-height:25px; margin:0 5px 0px 0px; width:80px; } .item a:hover { display:inline; float:left; background:#39c; color:#FFF; text-decoration:none; text-align:left; font-size:11px; font-weight:700; font-weight:bold; line-height:25px; padding:0 0 0 10px; margin:0 5px 0px 0px; width:80px; } HTML: <div id="dolphincontainer"> <div id="dolphinnav"> <ul> <li><a href="index.php"><span>Home</span></a></li> <li><a href="chooseus.php"><span>Why Choose Us</span></a></li> <li><a href="peraturan.php"><span>Rules</span></a></li> <li class="tuckUp" onmousemove="this.className='pullDown'" onmouseout="this.className='tuckUp'"><a href="#"><span>Transaction</span></a> <div class="item"> <a href="drop1.php">Drop Down 1</a><br /> <a href="drop2.php">Drop Down 2</a></a><br /> <a href="drop3.php">Drop Down 3</a><br /> </div> </li> <li><a href="download.php"><span>Download</span></a></li> <li><a href="aboutus.php"><span>About Us</span></a></li> <li><a href="help.php" class="current"><span>Support</span></a></li> <li><a href="promo.php"><span><font color="#FF0000"><blink>PROMO</blink> </font></span></a></li> </ul> </div> </div>

    Read the article

  • jquery animating different img widths

    - by romeozor
    Hi there, I've been searching for an answer for a long time with no avail, so it's time to ask. I'm trying to use .animate() to change the size of an image once clicked. The first state of the image would be a thumbnail size, which would animate to the image's original size, then to a thumbnail again. The problem is, not all the images have the same "original" size so I need a way to tell one generic function to switch to the current image's original size. This is my current code which loads on $(window).load: $('img[class=resize]').click(function (){ if ($(this).width() != 150) { $(this).animate({width: '150px'}, 400); } else { $(this).animate({width: ''}, 400); } }); Now this obviously doesn't work the way I want it, because .animate() thinks when I say width: '' I want to make the width = 0. Any suggestions how I should go about this?

    Read the article

  • How to reliably categorize HTTP sessions in proxy to corresponding browser' windows/tabs user is viewing?

    - by Jehonathan
    I was using the Fiddler core .Net library as a local proxy to record the user activity in web. However I ended up with a problem which seems dirty to solve. I have a web browser say Google Chrome, and the user opened like 10 different tabs each with different web URLs. The problem is that the proxy records all the HTTP session initiated by each pages separately, causing me to figure out using my intelligence the tab which the corresponding HTTP session belonged to. I understand that this is because of the stateless nature of HTTP protocol. However I am just wondering is there an easy way to do this? I ended up with below c# code for that in Fiddler. Still its not a reliable solution due to the heuristics. This is a modification of the sample project bundled with Fiddler core for .NET 4. Basically what it does is filtering HTTP sessions initiated in last few seconds to find the first request or switching to another page made by the same tab in browser. It almost works, but not seems to be a universal solution. Fiddler.FiddlerApplication.AfterSessionComplete += delegate(Fiddler.Session oS) { //exclude other HTTP methods if (oS.oRequest.headers.HTTPMethod == "GET" || oS.oRequest.headers.HTTPMethod == "POST") //exclude other HTTP Status codes if (oS.oResponse.headers.HTTPResponseStatus == "200 OK" || oS.oResponse.headers.HTTPResponseStatus == "304 Not Modified") { //exclude other MIME responses (allow only text/html) var accept = oS.oRequest.headers.FindAll("Accept"); if (accept != null) { if(accept.Count>0) if (accept[0].Value.Contains("text/html")) { //exclude AJAX if (!oS.oRequest.headers.Exists("X-Requested-With")) { //find the referer for this request var referer = oS.oRequest.headers.FindAll("Referer"); //if no referer then assume this as a new request and display the same if(referer!=null) { //if no referer then assume this as a new request and display the same if (referer.Count > 0) { //lock the sessions Monitor.Enter(oAllSessions); //filter further using the response if (oS.oResponse.MIMEType == string.Empty || oS.oResponse.MIMEType == "text/html") //get all previous sessions with the same process ID this session request if(oAllSessions.FindAll(a=>a.LocalProcessID == oS.LocalProcessID) //get all previous sessions within last second (assuming the new tab opened initiated multiple sessions other than parent) .FindAll(z => (z.Timers.ClientBeginRequest > oS.Timers.ClientBeginRequest.AddSeconds(-1))) //get all previous sessions that belongs to the same port of the current session .FindAll(b=>b.port == oS.port ).FindAll(c=>c.clientIP ==oS.clientIP) //get all previus sessions with the same referrer URL of the current session .FindAll(y => referer[0].Value.Equals(y.fullUrl)) //get all previous sessions with the same host name of the current session .FindAll(m=>m.hostname==oS.hostname).Count==0 ) //if count ==0 that means this is the parent request Console.WriteLine(oS.fullUrl); //unlock sessions Monitor.Exit(oAllSessions); } else Console.WriteLine(oS.fullUrl); } else Console.WriteLine(oS.fullUrl); Console.WriteLine(); } } } } };

    Read the article

  • Working effectively with unit tests / Anyone tried the in-assembly approach?

    - by CodingCrapper
    I'm trying to re-introduce unit testing into my team as our current coverage is very poor. Our system is quite large 40+ projects/assemblies. We current use a project named [SystemName].Test.csproj were all the test code is dumped and organised to represent the namespaces using folders. This approach is not very scalable and makes it difficult to find tests. I've been thinking about added a Tests folder to each project, this would put the unit tests "in the developers face" and make them easy to find. The downside is the Production release code would contain references to nunit, nmocks as well as the test code and test data.... Has anyone tried this approach? How is everyone else working with unit tests on large projects? Having a Tests project per "real" project/assembly would introduce too many new projs. Thanks in advance

    Read the article

  • "Single NSMutableArray" vs. "Multiple C-arrays" --Which is more Efficient/Practical?

    - by RexOnRoids
    Situation: I have a DAY structure. The DAY structure has three variables or attributes: a Date (NSString*), a Temperature (float), and a Rainfall (float). Problem: I will be iterating through an array of about 5000 DAY structures and graphing a portion of these onto the screen using OpenGL. Question: As far as drawing performance, which is better? I could simply create an NSMutableArray of DAY structures (NSObjects) and iterate on the array on each draw call -- which I think would be hard on the CPU. Or, I could instead manually manage three different C-Arrays -- One for the Date String (2-Dimensional), One for the temperature (1-Dimensional) and One for the Rainfall (1-Dimensional). I could keep track of the current Day by referencing the current index of the iterated C-Arrays.

    Read the article

  • Creating a Better Tabbed Interface in Django

    - by ygd
    I've been trying to create a tabbed interface using Django. The current effort (which works fine) is having each template have the header hard-coded in, with the selected tab given the "selected" CSS attribute. Of course, this is a massive violation of DRY and I'm looking to remedy it. My current idea is adding a jQuery script to the page that looks at all the tabs and sets one to "selected" if it's text matches the beginning of the title for the page. Is there a better way to do this without using JavaScript and just pure CSS?

    Read the article

< Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >