Search Results

Search found 18677 results on 748 pages for 'current'.

Page 49/748 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Git: Can I commit my working directory to a new branch without commiting it to a current branch?

    - by Noli
    Somewhat new at Git.. I am working on a project, and had all of my tests passing on the master branch. I then made some changes, and when everything started failing, I realized that maybe I should have made those changes in a different branch. Is there I way I can commit the changes to a new branch without commiting them to my master branch, so that the master still has my passing tests?

    Read the article

  • How can I skip the current item and the next in a Python loop?

    - by uberjumper
    This might be a really dumb question, however I've looked around online, etc. And have not seen a solid answer. Is there a simple way to do something like this? lines = open('something.txt', 'r').readlines() for line in lines: if line == '!': # force iteration forward twice line.next().next() <etc> It's easy to do in C++; just increment the iterator an extra time. Is there an easy way to do that in Python? I would just like to point, out the main purpose of this question is not about "reading files and such" and skipping things. I was more looking for C++ iterator style iteration. Also the new title is kinda dumb, and i dont really think it reflects the nature of my question.

    Read the article

  • How do I programmatically determine the current zoom level of a browser window?

    - by Mihai Fonoage
    Hi, I want to find out the zoom level of what is being displayed in a browser window based on the javascripts' window object properties (http://www.javascriptkit.com/jsref/window.shtml) to which I have access. I just can't seem to find the right mathematical formula for the zoom based on the inner width, page offset, etc. I found a solution, but that uses the document.body.getBoundingClientRect call which does not return anything in my case and for which I can't tell if there's a suitable replacement from the window properties. I am using Safari. Thank you, Mihai

    Read the article

  • Getting the start address of the current process's heap?

    - by beta
    Hey, I am exploring the lower level workings of the system, and was wondering how malloc determines the start address of the heap. Is the heap a constant offset or is there a call of some sort to get the start address? Does the stack effect the start address of the heap? Thanks, Braden McDorman

    Read the article

  • How to get the current project directory or the bin directory and move a few level up?

    - by melaos
    I have an ASP.Net MVC app, and i have some xsl files inside of the Content directory. I've try a few methods to get directory dynamically buy keep on coming short. So how do i get the directory to point to the Content/xsl folder? the closest that i came to was with this: this.GetType().Assembly.CodeBase which only returns the project DLL, but i can't figure out how to move up a few levels from there or what .net library to use to navigate around the path. there's no ../.. :( Basically i want to navigate to the Content/xsl folder which is at the same level of the Bin directory.

    Read the article

  • delayed_job :run_at is not working. all jobs set to run at current time

    - by jtwg
    I have installed the collectiveidea fork for delayed_job at git://github.com/collectiveidea/delayed_job.git but cannot get it to accept :run_at from my gemfile gem 'rails', '3.2.2' gem 'delayed_job_active_record' when I try it in the console 1.9.2-p318 :005 > Time.now => 2012-03-24 10:20:34 -0700 1.9.2-p318 :006 > User.delay.new :run_at => 5.days.from_now SQL (0.1ms) BEGIN SQL (1.6ms) INSERT INTO `delayed_jobs` (`attempts`, `created_at`, `failed_at`, `handler`, `last_error`, `locked_at`, `locked_by`, `priority`, `run_at`, `updated_at`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["attempts", 0], ["created_at", Sat, 24 Mar 2012 17:20:36 UTC +00:00], ["failed_at", nil], ["handler", "--- !ruby/object:Delayed::PerformableMethod\nobject: !ruby/class 'User'\nmethod_name: :new\nargs:\n- :run_at: 2012-03-29 17:20:36.876374000Z\n"], ["last_error", nil], ["locked_at", nil], ["locked_by", nil], ["priority", 0], ["run_at", Sat, 24 Mar 2012 17:20:36 UTC +00:00], ["updated_at", Sat, 24 Mar 2012 17:20:36 UTC +00:00]] (2.7ms) COMMIT => #<Delayed::Backend::ActiveRecord::Job id: 17, priority: 0, attempts: 0, handler: "--- !ruby/object:Delayed::PerformableMethod\nobject:...", last_error: nil, run_at: "2012-03-24 17:20:36", locked_at: nil, failed_at: nil, locked_by: nil, created_at: "2012-03-24 17:20:36", updated_at: "2012-03-24 17:20:36"> I see there is some UTC offset in the runtime, but based on Time.now, I can tell run_at is not going forward by 5 days. "run_at", Sat, 24 Mar 2012 17:20:36 UTC +00:00 Any ideas?

    Read the article

  • Rails - how can I capture the URL that directed to the current action in my app?

    - by sa125
    Hi - I need to see what page a request came from in my controller so I could be able to redirect back to it. For example, if I'm on a page showing a specific product (say /products/1) and it has a link to its vendor (/vendors/12), I want to be able to detect inside the vendors_controller that I came to that page from /products/1. Is there a simple way in Rails to achieve this, so that I could access it via params or session? thanks.

    Read the article

  • Is their a definitive list for the differences between the current version of SQL Azure and SQL Serv

    - by Aim Kai
    I am a relative newbie when it comes to SQL Azure!! I was wondering if there was a definitive list somewhere regarding what is and is not supported by SQL Azure in regards to SQL Server 2008? I have had a look through google but I've noticed some of the blog posts are missing things which I have found through my own testing: For example, quite a lot is summarised in this blog entry http://www.keepitsimpleandfast.com/2009/12/main-differences-between-sql-azure-and.html Common Language Runtime (CLR) Database file placement Database mirroring Distributed queries Distributed transactions Filegroup management Global temporary tables Spatial data and indexes SQL Server configuration options SQL Server Service Broker System tables Trace Flags which is a repeat of the MSDN page http://msdn.microsoft.com/en-us/library/ff394115.aspx I've noticed from my own testing that the following seem to have issues when migrating from SQL Server 2008 to the Azure: XML Types (the msdn does mention large custom types - I guess it may include this?? even if the data schema is really small?) Multi-part views I've been using SQL Azure Migration Wizard v3.1.8 to migrate local databases into the cloud. I was wondering if anyone could point to a list or give me any information till when these features are likely to be included in SQL Azure.

    Read the article

  • Android: How to make current layout with scrollable text view?

    - by Solata
    I tried multiple solution but none seem to work. Layout: -------------------- |btn1| txt1 |btn2| -------------------- | | | | | | | txtview1 | | | | | | | -------------------- btn1 - top left aligned - decrease txt1 btn2 - top right aligned - increase txt1 txt1 - top center aligned - text/number entered with code textview1 - client aligned with vertical scrollbar, if needed - text entered with code

    Read the article

  • In Coldfusion, how do I init a component that is located above the current path folder?

    - by Dan Sorensen
    If I have a folder structure that looks like this: / /bin/myComponent.cfc /reports/index.cfm How do I initiate myComponent.cfc from index.cfm? myService = createObject("component", "bin.myComponent"); Using the dot syntax, I know how to go to deeper folders, but how to do I go up a folder, and down into the other folder? Using slash syntax it would be something like this: ../bin/myComponent.cfc But createObject() doesn't work that way. I'd like to keep a relative path so that I can move this folder to another server without breaking the paths. Ideas? Thanks!

    Read the article

  • Rails and Prawn PDF - add current item ID to filename?

    - by dannymcc
    Hi Everyone, I have two PDFs that are made "on the fly" using Prawn PDF. The PDFs are called jobsheet.pdf and discharge.pdf - their URL's are: railsroot/kases/IDNO/jobsheet.pdf railsroot/kases/IDNO/discharge.pdf I am trying to work out how to automagically append the filename with the ID number: railsroot/kases/IDNO/jobsheet_IDNO.pdf railsroot/kases/IDNO/discharge_IDNO.pdf To create the PDFs the code is as follows: Kases Controller def jobsheet @kase = Kase.find(params[:id]) respond_to do |format| format.html {} # jobsheet.html.erb format.xml { render :xml => @kase } format.pdf { render :layout => false } prawnto :prawn => { :background => "#{RAILS_ROOT}/public/images/jobsheet.png", :left_margin => 0, :right_margin => 0, :top_margin => 0, :bottom_margin => 0, :page_size => 'A4' } end end # GET /kases/1 # GET /kases/1.xml def discharge @kase = Kase.find(params[:id]) respond_to do |format| format.html { } # discharge.html.erb format.xml { render :xml => @kase } format.pdf { render :layout => false } prawnto :prawn => { :background => "#{RAILS_ROOT}/public/images/discharge.png", :left_margin => 0, :right_margin => 0, :top_margin => 0, :bottom_margin => 0, :page_size => 'A4' } end end Routes map.resources :kases, :member => { :discharge => :get } map.resources :kases, :member => { :jobsheet => :get } To view the PDF's I use the following links: jobsheet_kase_path(@kase, :format => 'pdf') discharge_kase_path(@kase, :format => 'pdf') Is this even possible? Thanks, Danny

    Read the article

  • DataGridView: how to make scrollbar in sync with current cell selection?

    - by David.Chu.ca
    I have a windows application with DataGridView as data presentation. Every 2 minutes, the grid will be refreshed with new data. In order to keep the scroll bar in sync with the new data added, I have to reset its ScrollBars: dbv.Rows.Clear(); // clear rows SCrollBars sc = dbv.ScrollBars; dbv.ScrollBars = ScrollBars.None; // continue to populate rows such as dbv.Rows.Add(obj); dbv.ScrollBars = sc; // restore the scroll bar setting back With above codes, the scroll bar reappears fine after data refresh. The problem is that the application requires to set certain cell as selected after the refresh: dbv.CurrentCell = dbv[0, selectedRowIndex]; With above code, the cell is selected; however, the scroll bar's position does not reflect the position of the selected cell's row position. When I try to move the scroll bar after the refresh, the grid will jump to the first row. It seems that the scroll bar position is set back to 0 after the reset. The code to set grid's CurrentCell does not cause the scroll bar to reposition to the correct place. There is no property or method to get or set scroll bar's value in DataGriadView, as far as I know. I also tried to set the selected row to the top: dbv.CurrentCell = dbv[0, selectedRowIndex]; dbv.FirstDisplayedScrollingRowIndex = selectedRowIndex; The row will be set to the top, but the scroll bar's position is still out of sync. Not sure if there is any way to make scroll bar's position in sync with the selected row which is set in code?

    Read the article

  • What are the programming religious wars of the generations before our current generation?

    - by Christopher Altman
    Being 32 years old, I did not follow debates in programming, language design, and platforms in the 1960s, 1970s, 1980s, and most of the 1990s. I sometimes hear glimpse of what the major debates were and how they turned the course of history. It makes me wonder what I take for granted. I am curious, what were the debates. The ones I know are: Procedural vs. Object Orientated Programming Lisp vs. C Software vs. Chips with Embedded Code

    Read the article

  • Is ASP.Net Server Control, Postback Architecture failed in current Web 2.0 World.

    - by Lalit
    What i am looking around me is the drastically change in ASP.Net Architecture. More and more company are following the approach of JSON based wcf service in middle tier. Plain HTML based UI tier with JQuery/Ajax. No Postback at all, This contradicts the Default behaviour of Asp.Net Server Control/Code Behind Event handler/Postback. I am a Asp.Net Web Developer for around 4 years, and concerned about the future of ASP.Net. Is the Default Architecture of ASP.Net is Outdated at all? Does MVC or ASP.Net 4.0 Tries to solve the Issue?

    Read the article

  • HTML Calendar form and input arrays

    - by Christopher Ickes
    Hello. Looking for the best practice here... Have a form that consists of a calendar. Each day of the calendar has 2 text input fields - customer and check-in. What would be the best & most efficient way to send this form to PHP for processing? <form action="post"> <div class="day"> Day 1<br /> <label for="customer['.$current['date'].']">Customer</label> <input type="text" name="customer['.$current['date'].']" value="" size="20" /> <label for="check-in['.$current['date'].']">Check-In</label> <input type="text" name="check-in['.$current['date'].']" value="" size="20" /> <input type="submit" name="submit" value="Update" /> </day> <div class="day"> Day 2<br /> <label for="customer['.$current['date'].']">Customer</label> <input type="text" name="customer['.$current['date'].']" value="" size="20" /> <label for="check-in['.$current['date'].']">Check-In</label> <input type="text" name="check-in['.$current['date'].']" value="" size="20" /> <input type="submit" name="submit" value="Update" /> </day> </form> Is my current setup good? I feel there has to be a better option. My concern involves processing a whole year at once (which can happen) and adding additional text input fields.

    Read the article

  • AuthLogic - how to determine current user id throughout the system?

    - by sscirrus
    Hi all, I have set up AuthLogic almost exactly as per the AuthLogic example app at http://github.com/binarylogic/authlogic_example. After someone logs in as User, they can click on links that send them away into the system and away from the users controller. This is an incredibly noob question, but how can I access that User's ID and other attributes from anywhere else, such as an unrelated view or unrelated controller? An example of what I'd like to do: #matchings controller @matching = Matching.find_by_user_id(user.id)

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >