Search Results

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

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

  • Apply Patch Update

    - by Velu
    Hi, We are the product devlopement company. We have the MSI setup for product it will install the more than 500 assemblies files in customers machine. Once we had released the product there may be some problem in any our of the assemblies due to serveal reason. At the time we will fix those problem and provided the patch update to the customer. [b]Current System:[/b] 1) Fix the problem in the devlopement environment and build the assemblies. 2) Generate the Patch setup using the Inno script with modified assemblies. 3) While installing the patch setup in the customer machine it will backup the old assemblies and replace the modified assemblies. [b]Drawback:[/b] Customer can't able to uninstall the installed patch becoz it just replace the assemblies. Is it possible to have the patch system in MSI like MSP files or else is there any option to uninstall the patch in my current system itself ? Thanks, Velu

    Read the article

  • Extract IP address from an html string (python)

    - by GoJian
    My Friends, I really want to extract a simple IP address from a string (actually an one-line html) using Python. But it turns out that 2 hours passed I still couldn't come up with a good solution. >>> s = "<html><head><title>Current IP Check</title></head><body>Current IP Address: 165.91.15.131</body></html>" -- '165.91.15.131' is what I want! I tried using regular expression, but so far I can only get to the first number. >>> import re >>> ip = re.findall( r'([0-9]+)(?:\.[0-9]+){3}', s ) >>> ip ['165'] In fact, I don't feel I have a firm grasp on reg-expression and the above code was found and modified from elsewhere on the web. Seek your input and ideas!

    Read the article

  • DeferWindowPos and SWP_SHOWWINDOW/SWP_HIDEWINDOW

    - by Tom Bell
    I am writing a virtual desktop application which utilises the DeferWindowPos API functions. The current method I am using is moving the windows off the screen if they're not on the current virtual desktop. However I know wish to also hide the windows that are off-screen so they do not appear on the task bar. I have attempted this by also passing SWP_SHOWWINDOW/SWP_HIDEWINDOW to the DeferWindowPos() calls. I have read a few sites regarding this and one of them suggested that if SWP_SHOWWINDOW/SWP_HIDEWINDOW are passed, then the window will only show or hide, and no reposition. Can anyone confirm this, or am I doing something wrong?

    Read the article

  • Flex: DateField how to get the value?

    - by Yevgeny
    I' m trying to use the DateField control. I can set the current value using the selectedDate field. Adobe says: "Selecting the currently selected date in the control deselects it, sets the selectedDate property to null", so when user selects other date the selectedDate = null. How do I can get the current selected value? I only saw in the debugger that DateField's text property contains the string with selected date? Do I need to parse it back? 10x in advance yevgeny

    Read the article

  • Utilizing multiple python projects

    - by Marcin Cylke
    Hi I have a python app, that I'm developing. There is a need to use another library, that resides in different directory. The file layout looks like this: dir X has two project dirs: current-project xLibrary I'd like to use xLibrary in currentProject. I've been trying writting code as if all the sources resided in the same directory and calling my projects main script with: PYTHONPATH=.:../xLibrary ./current-project.py but this does not work. I'd like to use its code base without installing the library globaly or copying it to my project's directory. Is it possible? Or if not, how should I deal with this problem.

    Read the article

  • Higher Performance With Spritesheets Than With Rotating Using C# and XNA 4.0?

    - by Manuel Maier
    I would like to know what the performance difference is between using multiple sprites in one file (sprite sheets) to draw a game-character being able to face in 4 directions and using one sprite per file but rotating that character to my needs. I am aware that the sprite sheet method restricts the character to only be able to look into predefined directions, whereas the rotation method would give the character the freedom of "looking everywhere". Here's an example of what I am doing: Single Sprite Method Assuming I have a 64x64 texture that points north. So I do the following if I wanted it to point east: spriteBatch.Draw( _sampleTexture, new Rectangle(200, 100, 64, 64), null, Color.White, (float)(Math.PI / 2), Vector2.Zero, SpriteEffects.None, 0); Multiple Sprite Method Now I got a sprite sheet (128x128) where the top-left 64x64 section contains a sprite pointing north, top-right 64x64 section points east, and so forth. And to make it point east, i do the following: spriteBatch.Draw( _sampleSpritesheet, new Rectangle(400, 100, 64, 64), new Rectangle(64, 0, 64, 64), Color.White); So which of these methods is using less CPU-time and what are the pro's and con's? Is .NET/XNA optimizing this in any way (e.g. it notices that the same call was done last frame and then just uses an already rendered/rotated image thats still in memory)?

    Read the article

  • textFieldShouldBeginEditing + UIKeyboardWillShowNotification + OS 3.2

    - by user193545
    I have multiple textfields on a UIView. I resign for a previous textField in textFieldShouldBeginEditing method, where following sequence of events are performed UIKeyboardWillHideNotification is received corresponding to that field where the keyboard for the previous field is hidden. the method textFieldShouldBeginEditing returns a YES and then UIKeyboardWillShowNotification is received where the keyboard for the current field is displayed. However, in OS 3.2 even though textFieldShouldBeginEditing returns a YES, UIKeyboardWillShowNotification for the current field is not received. The logic works for OS < 3.2 Any ideas where I might be doing wrong?

    Read the article

  • applying a var to an if statement jquery

    - by Dirty Bird Design
    Need to apply a var to a statement if its conditions are met, this syntax isn't throwing errors but its not working. <script type="text/javascript"> $(document).ready(function(){ var action_is_post = false; //stuff here $(this).ready(function () { if ($("#stepDesc0").is(".current")) { action_is_post = true; } }); //stuff here </script> should I use something other than .ready? Do I even need the $(this).ready(function ()... part? I need it to apply the var when #stepDesc0 has the class current.

    Read the article

  • How to get the if the Page is Liked in my Facebook Application page

    - by Axe
    I'm using the Facebook sdk from codeplex I've tried the suggestion at How to get the Page Id in my Facebook Application page which is this: if (FacebookWebContext.Current.SignedRequest != null) { dynamic data = FacebookWebContext.Current.SignedRequest.Data; if (data.page != null) { var pageId = (String)data.page.id; var isUserAdmin = (Boolean)data.page.admin; var userLikesPage = (Boolean)data.page.liked; } else { // not on a page } } But my data.page is null. Do I need to ask for some extra permissions on the authorization or something? Also tried this the FQL suggested at http://blog.woodylabs.com/2010/09/facebook-graph-api-is-user-a-fan-of-page-id-using-fql-and-opengraph-to-mimic-pages-isfan/ But I only have an appId not a page ID. Any ideas?

    Read the article

  • How to handle date difference between client and server?

    - by daydreamer
    I have an API which looks like /summary/yyyy/mm Which returns the summary of their data for the year and month requested. One of the things it returns the number of days left if this is current year and month. For example: days_left: 9 for 2013 and 10 and current date on server is 21 Oct 2013 How I calculate remaining days? This is implemented in python as def current_financial_month_details(self): time_from, time_to = self \ .get_start_end_time_current_financial_month() today = datetime.today() from_time = datetime(year=today.year, month=today.month, day=today.day) return { 'time_from': time_from, 'time_to': time_to, 'remaining_days': (time_to - from_time).days } The problem? The server is in east coast and the client(me with browser) is on pacific time zone When its 9PM PST the time changes in east coast, so if I run hit /summary/2013/10 and if it is Oct 21 2013 for me on PST, the date has already changed on EST, so days_left: 8 which is incorrect on client end. right? How do I handle this situation?

    Read the article

  • UTC date and time

    - by klaus-vlad
    Hi, How can I obtain the current UTC time and date using a gps location changed lsitener ? public void onLocationChanged(Location lastLocation) { lastLocation.getTime() }

    Read the article

  • Is there a best practice for maintaining history in a database?

    - by Pete
    I don't do database work that often so this is totally unfamiliar territory for me. I have a table with a bunch of records that users can update. However, I now want to keep a history of their changes just in case they want to rollback. Rollback in this case is not the db rollback but more like revert changes two weeks later when they realized that they made a mistake. The distinction being that I can't have a transaction do the job. Is the current practice to use a separate table, or just a flag in the current table? It's a small database, 5 tables each with < 6 columns, < 1000 rows total.

    Read the article

  • Git: Make one branch exactly like another

    - by G. Martin
    I am relatively new to Git, and I'm still not very comfortable with it. Right now, I'm looking for the command/options/magic that can make the current branch look like another branch; that is, to merge them, but when a conflict arises, to always choose the difference in the branch that is being merged into the current one. My situation is thus; I have an stable(ish) application on the "master" branch. I also have another branch, called "feature". I basically want to make changes/additions/deletions to feature until I like the new feature I'm working on. Once I feel it is ready, I want to make the master branch look identical to the feature branch. I know this probably isn't a best practice, but as I said, I'm new to Git. I plan on learning how to do more complicated things in the future, but for now, this is all I need. Thanks, SO!

    Read the article

  • Silverlight Memory Usage

    - by peter
    Hi All, Is there a way to measure the current memory usage of the silverlight plug-in from within the client side C# code? I am isolating a memory leak and it would be good to know the current memory usage of the plug-in. For instance it could be logged to a file before I clicked a button that it was using '60 mb' and after I clicked the button it was using '70 mb' etc. I could then gradually add in controls and use this technique to quantify the leak. Thanks.

    Read the article

  • Selecting one object from a one-to-many relationship in Hibernate

    - by Nick Thomson
    I have two tables: Job job_id, <other data> Job_Link job_link_id, job_id, start_timestamp, end_timestamp, <other data> There may be multiple records in Job_Link specifying the same job_id with the start_timestamp and end_timestamps to indicate when those records are considered "current", it is guaranteed that start_timestamp and end_timestamp will not overlap. We have entities for both the Job and Job_Link tables and defining a one-to-many relationship to load all the job_links wouldn't be a problem. However we'd like to avoid that and have a single job_link item in the Job entity that will contain only the "current" Job_Link object. Is there any way to achive that?

    Read the article

  • [perl] Efficient processing of large text

    - by jesper
    I have text file that contains over one million urls. I have to process this file in order to assign urls to groups, based on host address: { 'http://www.ex1.com' = ['http://www.ex1.com/...', 'http://www.ex1.com/...', ...], 'http://www.ex2.com' = ['http://www.ex2.com/...', 'http://www.ex2.com/...', ...] } My current basic solution takes about 600mb of RAM to do this (size of file is about 300mb). Could You provide some more efficient ways? My current solution simply reads line by line, extracts host address by regex and put url into hash.

    Read the article

  • How should I store Dynamically Changing Data into Server Cache?

    - by Scott
    Hey all, EDIT: Purpose of this Website: Its called Utopiapimp.com. It is a third party utility for a game called utopia-game.com. The site currently has over 12k users to it an I run the site. The game is fully text based and will always remain that. Users copy and paste full pages of text from the game and paste the copied information into my site. I run a series of regular expressions against the pasted data and break it down. I then insert anywhere from 5 values to over 30 values into the DB based on that one paste. I then take those values and run queries against them to display the information back in a VERY simple and easy to understand way. The game is team based and each team has 25 users to it. So each team is a group and each row is ONE users information. The users can update all 25 rows or just one row at a time. I require storing things into cache because the site is very slow doing over 1,000 queries almost every minute. So here is the deal. Imagine I have an excel spreadsheet with 100 columns and 5000 rows. Each row has two unique identifiers. One for the row it self and one to group together 25 rows a piece. There are about 10 columns in the row that will almost never change and the other 90 columns will always be changing. We can say some will even change in a matter of seconds depending on how fast the row is updated. Rows can also be added and deleted from the group, but not from the database. The rows are taken from about 4 queries from the database to show the most recent and updated data from the database. So every time something in the database is updated, I would also like the row to be updated. If a row or a group has not been updated in 12 or so hours, it will be taken out of Cache. Once the user calls the group again via the DB queries. They will be placed into Cache. The above is what I would like. That is the wish. In Reality, I still have all the rows, but the way I store them in Cache is currently broken. I store each row in a class and the class is stored in the Server Cache via a HUGE list. When I go to update/Delete/Insert items in the list or rows, most the time it works, but sometimes it throws errors because the cache has changed. I want to be able to lock down the cache like the database throws a lock on a row more or less. I have DateTime stamps to remove things after 12 hours, but this almost always breaks because other users are updating the same 25 rows in the group or just the cache has changed. This is an example of how I add items to Cache, this one shows I only pull the 10 or so columns that very rarely change. This example all removes rows not updated after 12 hours: DateTime dt = DateTime.UtcNow; if (HttpContext.Current.Cache["GetRows"] != null) { List<RowIdentifiers> pis = (List<RowIdentifiers>)HttpContext.Current.Cache["GetRows"]; var ch = (from xx in pis where xx.groupID == groupID where xx.rowID== rowID select xx).ToList(); if (ch.Count() == 0) { var ck = GetInGroupNotCached(rowID, groupID, dt); //Pulling the group from the DB for (int i = 0; i < ck.Count(); i++) pis.Add(ck[i]); pis.RemoveAll((x) => x.updateDateTime < dt.AddHours(-12)); HttpContext.Current.Cache["GetRows"] = pis; return ck; } else return ch; } else { var pis = GetInGroupNotCached(rowID, groupID, dt);//Pulling the group from the DB HttpContext.Current.Cache["GetRows"] = pis; return pis; } On the last point, I remove items from the cache, so the cache doesn't actually get huge. To re-post the question, Whats a better way of doing this? Maybe and how to put locks on the cache? Can I get better than this? I just want it to stop breaking when removing or adding rows.

    Read the article

  • How to optimize indexing of large number of DB records using Zend_Lucene and Zend_Paginator

    - by jdichev
    So I have this cron script that is deployed and ran using Cron on a host and indexes all the records in a database table - the index is later used both for the front end of the site and the backed operations as well. After the operation, the index is about 3-4 MB. The problem is it takes a lot of resources (CPU: 30+ and a good chunk of memory) and slows the machine down. My question is about how to optimize the operation described below: First there is a select query built using the Zend Framework API, this query is then passed to a Paginator factory that returns a paginator which I am using to balance the current number of items being indexed and not iterate over too much items. The script is iterating over the current items in the paginator object using a foreach loop until reaching the end and then it starts from the beginning after getting items for the next page. I am suspecting this overhead is caused by the Zend_Lucene but no idea how this could be improved.

    Read the article

  • How do I control output files name and content of an Hadoop streaming job?

    - by Eran Kampf
    Is there a way to control the output filenames of an Hadoop Streaming job? Specifically I would like my job's output files content and name to be organized by the ket the reducer outputs - each file would only contain values for one key and its name would be the key. Update: Just found the answer - Using a Java class that derives from MultipleOutputFormat as the jobs output format allows control of the output file names. http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/mapred/lib/MultipleOutputFormat.htmlhttp://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/mapred/lib/MultipleOutputFormat.html I havent seen any samples for this out there... Can anyone point out to an Hadoop Streaming sample that makes use of a custom output format Java class?

    Read the article

  • How to set the ReturnUrl for the Login link in MVC 3 app?

    - by user762196
    using System; using Microsoft.Practices.Unity; namespace <MyNameSpace> { public class UrlFactory { public static UrlFactory Current { get { return HttpApplicationUnityContext.Current.Resolve<UrlFactory>(); } } public string GetLoginUrl() { return String.Format("{0}/login?ReturnUrl={1}", MyConfig.BaseHttpUrl, <GET_PAGE_URL>); } } The user can be on any page on the site and click the Login link. But the ReturnUrl must always point to the exact page where he clicked it. I must take the user back to the page he clicked the login link. In my code above, how do I get the page url in <GET_PAGE_URL>? Thanks

    Read the article

  • Accesing server control from withing app_code class

    - by OverSeven
    My question is about how to acces a server control (listbox) that is located in default.aspx. I wish to acces this control in Functions.cs (this class is located in the App_Code folder). My page structures: - 1 masterpage with 1 content holder - Default.aspx (all the controls are within the content place holder) - Functions.cs (located in App_Code) Now when i try to fill up the listbox elements i get the error "object reference not set to an instance of an object." What i have tried to gain acces to this control: (this code is located in Functions.cs in App_Code). This is basicly showing some items in the listbox that are located in the xml file private static string file = HttpContext.Current.Server.MapPath("~/App_Data/Questions.xml"); public static void ListItems() { XmlDocument XMLDoc = new XmlDocument(); XMLDoc.Load(file); XPathNavigator nav = XMLDoc.CreateNavigator(); XPathExpression expr; expr = nav.Compile("/root/file/naam"); XPathNodeIterator iterator = nav.Select(expr); //ATTEMPT to get acces to ServerControl(listbox) Page page = (Page)HttpContext.Current.Handler; ListBox test = (ListBox)page.FindControl("lbTest"); //control is called lbTest in Default.aspx test.Items.Clear(); while (iterator.MoveNext()) { test.Items.Add(iterator.Current.Value); } } Code from the default.apx file <%@ Page Title="" Language="C#" MasterPageFile="~/MasterFile.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="default" Debug="true" %> <%@ MasterType TypeName="Master" %> <asp:Content ID="Content1" ContentPlaceHolderID="cphContent" Runat="Server" > <asp:MultiView ID="mvTest" runat="server" > <asp:View ID="vCollection" runat="server"> <asp:ListBox ID="lbTest" runat="server" CssClass="listbox" ></asp:ListBox> </asp:View> </asp:MultiView> </asp:Content> The masterfile itself just has 1 placeholder. Then i call upon the funcion ListItems in the Default.aspx.cs file protected void Page_Load(object sender, EventArgs e) { Functions.ListItems(); } Regards.

    Read the article

  • Check if a symlink has changed

    - by BCS
    I have a daemon that, when it's started, loads its data from a directory that happens to be a symlink. Periodically, new data is generated and the symlink updated. I want a bash script that will check if the current symlink is the same as the old one (that the daemon started with) and if not, restart the daemon. My current thought is: if [[ ! -e $old_dir || $(readlink "$data_dir") == $(readlink "$old_dir") ]]; then echo restart ... ln "$(readlink "$data_dir")" "$old_dir" -sf else echo no restart fi The abstract requirement is: each time the script runs, it needs to check if a symlink on a given path now points to a something other than it did the last time and if so do something. (The alternative would be to check if the data at the path has changed but I don't see that being any cleaner.) My questions: Is this a good approach? Does anyone have a better idea? Where should I put $old_dir?

    Read the article

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