Saturday, 15 August 2015

iphone - Distorted navigation bar custom back button -


दर्ज छवि यहाँ वर्णन

मैं एक कस्टम वापस बटन है और बटन दिखाई नहीं दे रहा के रूप में इरादा है, यह बढ़ाया जा रहा है, और भले ही वापस बटन टेक्स्ट रिक्त है यह अभी भी प्रदर्शित कर रहा है" वापस "पाठ।

अग्रिम धन्यवाद

मैं आमतौर पर लिए इस तकनीक का उपयोग यह काम करने के लिए।:

  1. छुटकारा डिफ़ॉल्ट शीर्षक प्राप्त करने के लिए:

      [[UIBarButtonItem उपस्थिति] setBackButtonTitlePositionAdjustment: UIOffsetMake (-400.f, 0) forBarMetrics: UIBarMetricsDefault];    
  2. आकार बदलने योग्य छवि का उपयोग करें:

      UIImage * backButton = [UIImage imageNamed: @ "back.png"]; [[UIBarButtonItem उपस्थिति] setBackButtonBackgroundImage: [backButton resizableImageWithCapInsets: UIEdgeInsetsMake (0, backButton.size.width, 0, 0)] forState: UIControlStateNormal barMetrics: UIBarMetricsDefault];      

Ruby, Map, Object attributes -


मेरे पास एक ऐसा ऑब्जेक्ट है जो नीचे दिखेगा:

  class attr_accessor: weekly_stats, : Report_times def initialize @weekly_stats = हैश.न्यू {| एच, कश्मीर | एच [के] = {}} @report_times = हैश.न्यू {| एच, कश्मीर | H [k] = {}} मान = [] अंत की समाप्ति   

मैं साप्ताहिक_स्टैट्स और रिपोर्ट_टाइम के माध्यम से लूप करना चाहता हूं और प्रत्येक कुंजी को अप-केस करना चाहता हूं और उसे इसके मान को असाइन करना चाहता हूं।

अभी मेरे पास यह है:

  report.weekly_stats.map do | attribute_name, मान | Report.values ​​& lt; & lt; {: नाम = & gt; Attribute_name.upcase,: content = & gt; मान || = "वर्तमान में उपलब्ध नहीं है"} अंत रिपोर्ट.रेपोर्ट_टाइम्स.मैप करो | गुणक_नाम, मान | Report.values ​​& lt; & lt; {: नाम = & gt; Attribute_name.upcase,: content = & gt; Format_date (value)} end report.values ​​  

क्या कोई तरीका है कि मैं साप्ताहिक आँकड़े और रिपोर्ट बार दोनों को एक लूप में नक्शा कर सकता हूं?

धन्यवाद

  (@ report_times.keys + साप्ताहिक_स्टैट.कीज़) .map do | attribute_name | {: नाम = & gt; Attribute_name.upcase,: content = & gt; @report_times [attribute_name]? Format_date (@report_times [attribute_name]): @weekly_stats [attribute_name] || "वर्तमान में उपलब्ध नहीं है"} अंत    

Matlab figure keeps the history of the previous images -


I'm working on rotating the image manually. Every time I run my code with a different image, the previous images have been rotated, shown in the picture. I can not get it. Any help would be commendable code here:

Enter image details here [screenshot ]

  im1 = imread ('gradient.jpg'); [H, w, p] = size (im 1); Theta = p / 12; Hh = round (h * cos (+ theta) + wade * abs (sin (theta)); % Closest integer ww = round (w * cos (theta) + h * abs (sin (theta)) round;% closest integer R round = [cos (live) -n (theta); sin (theta) cos ); T = [w / 2; g / 2]; rt = [for (r) t; 0]; for z = 1: x for x = 1: y = 1 ww: hh% Using matrix multiplication i = zero (3,1); i = rt * [x-ww / 2; y-hh / 2; 1]; %% nearest neighbor i = round (i); if i (1) Gt; 0 & amp; amp; amp; (2) & gt; 0 & amp; amp; i (1) & lt; = w & amp; amp; amp; (2) & lt; = h im2 (y, x, Z) = im1 (i (2), i (1), z); end end end end x = 1: ww; y = 1: hh; [x, y] = meshgrid (x, w) ;) Generate X and Y arrays for the% 3-D plots. Orig_pos = [X (:) 'Y' (''; ''; people (1, numel (x)); elements in array or subcriptive array expression Number of orig_pos_2 = [X (:) '- (ww / 2); y (:)' - (hh / 2); people (1, numel (x)); New_pos = round (RT * orig_pos_2); % Check the nearest neighboring% to the neighbor that the new status comes from the map: valid_pos = new_pos (1, :) & gt; = 1 & amp; New_pos (1, :) & lt; = W & amp; New_pos (2, :) & gt; = 1 & amp; New_pos (2, :) & lt; = H; Orig'pos = orig_pos (:, legal_pos); New_pos = new_pos (:, valid_poz); Siz = size (IM1); Siz2 = size (im2); Expand the 2D index to include the third dimension IndiOver_poz = sub-ind (Sees 2, Orsipop (2 * ones (p, 1), :), parent_pose (w (p, 1), :), ( 1: P) '* ones (1, length (parent_position)); Ind_new_pos = sub2ind (siz, new_pos (2 * ones (p, 1)), new_pos (ones (p, 1), :), (1: p) '* ones (1, length (new_pos))); IM2 (Ind_orig_pos) = IM1 (IND_NU_pos); Imshow (IM2); There is a problem with the introduction of  im2 ,    

im2 has been created in the following section:
  If i (1) & gt; 0 & amp; Amp; I (2) & gt; 0 & amp; Amp; I (1) & lt; = W & amp; Amp; I (2) & lt; = H im2 (y, x, z) = im1 (i (2), i (1), z); End   

If this code is present before im2 and its width or height is greater than the image that you are generating a new image then only the top Attempting to start im2 by adding Do;

first

 for  z = 1: p for x = 1: ww y = 1: hh ...          

javascript - Showing specific text output based on 2 drop down selections -


I want to display two text strings based on the user's selection with two drop down lists.

Then there are two drop down options: Enter image details here < P> For each month's option, I want to keep a related value. So for the January option, the value will be "Jan's name". For each color option, there is a similar value too. For the green option, the value is "Green Name".

Once the user selects both options (months and colors), then I want to display the output with the completion of two values ​​to display the text.

For example, if I select January and green, the output will be:

 Enter image details here

If I change something else a month, then the name will be updated accordingly.

I have put some HTML / CSS code as a start. I highly appreciate if anyone has shed some light on how I can use this work jquery! Apart from this - how can I fade in text output? Thanks a lot! & lt; Body & gt; & Lt; H2 & gt; Find your animal's name & lt; / H2 & gt; & Lt; P & gt; Select your birth month and your favorite color and find your animal name. & Lt; / P & gt; & Lt; Form & gt; & Lt; Select ID = "month" & gt; & Lt; Option value = "" & gt; - Birth month - & lt; / Options & gt; & Lt; Option value = "Jan" & gt; January & lt; / Options & gt; & Lt; Option value = "February" & gt; February & lt; / Options & gt; & Lt; Option value = "march" & gt; March & lt; / Options & gt; & Lt; Option value = "April" & gt; April & lt; / Options & gt; & Lt; Option value = "may" & gt; May & lt; / Options & gt; & Lt; Option value = "June" & gt; June & lt; / Options & gt; & Lt; Option value = "July" & gt; July & lt; / Options & gt; & Lt; Option value = "August" & gt; August & lt; / Options & gt; & Lt; Option value = "September" & gt; September & lt; / Options & gt; & Lt; Option value = "Oct" & gt; October & lt; / Options & gt; & Lt; Option value = "November" & gt; November & lt; / Options & gt; & Lt; Option value = "December" & gt; December & lt; / Options & gt; & Lt; / Select & gt; & Lt; Label class = "jan" = "january" & gt; January name & lt; / Label & gt; & Lt; Label class = "February" = "February" & gt; February name & lt; / Label & gt; & Lt; Label class = "march" for "march" & gt; March name & lt; / Label & gt; & Lt; Label class = "April" for = "April" & gt; April name & lt; / Label & gt; & Lt; Label class = "May" for "May" & gt; May name & lt; / Label & gt; & Lt; Label class = "June" for "Jun" & gt; June's name & lt; / Label & gt; & Lt; Label class = "July" for = "July" & gt; July name & lt; / Label & gt; & Lt; Label class = "August" for "August" & gt; August name & lt; / Label & gt; & Lt; Label class = "September" for = "September" & gt; September name & lt; / Label & gt; & Lt; Label class = "october" = "october" & gt; Name of October & lt; / Label & gt; & Lt; Label class = "November" = "November" & gt; November name & lt; / Label & gt; & Lt; Label class = "December" = "December" & gt; December name & lt; / Label & gt; & Lt; Select ID = "Color" & gt; & Lt; Option value = "" & gt; - Favorite Colors - & lt; / Options & gt; & Lt; Option value = "green" & gt; Green & lt; / Options & gt; & Lt; Option value = "blue" & gt; Blue & lt; / Option & gt; & Lt; Option value = "red" & gt; Red & lt; / Options & gt; & Lt; / Select & gt; & Lt; Label class = "green" = "green" & gt; Green name & lt; / Label & gt; & Lt; Label class = "blue" = "blue" & gt; Blue name & lt; / Label & gt; & Lt; Label class = "red" for = "red" & gt; Red Name & lt; / Label & gt; & Lt; / Form & gt; & Lt ;! - & lt; P class = "output" & gt; Your animal name generator name is Green Name & lt; / P & gt; - & gt; & Lt; / Body & gt;

BTW - I also want to make selected field style ... so does it make more sense to write as LIST (LI, UL)?

  $ ("# months, #color"). Change (function () {var month = $ ("# month") = ("#color"). Val (); var content = ''; if (month & amp; color) {var monthlabel = $ ("label "Color" = "" ("label [for + color +"] "for [+ +" (+ + "+ color +"]. Text (); content = 'Your animal's name is + month's label + '+ + + Color label;} $ ("#output"). Text (content). FadeIn ();});   



rails search form 'no such column: name' error -


I am trying to apply a simple search box in my index view, but he gave me this error: < / P> <<">" Ticket "from where (name '% s%')

I can" TICK "Find out why this is and I How do I correct it? Below is my MVC

See

  

listing ticket & Lt;% = form_tag tickets_path ,: method = & gt; 'get'%> & lt; p & gt; & lt;% = text_field_tag: search, parameter [: search]% & Gt; & lt;% = submit_tag 'search'%> & lt; / p & gt; & lt;% end% & gt; & lt; table & gt; & lt; tr & gt; & Lt; / tr & gt; & lt;% @ tickets.each do | tickets & gt; & lt; tr & gt; & lt; td & gt; & lt;% = ticket.caller_name% & gt; <% = ticket.called_date%> <% = ticket.problem % & Gt; & lt; / td & gt; ... & lt;% end% & gt; & lt; / table & gt;

model

  class tickets & lt; ActiveRecord :: Base attr_accessible: called_date ,: caller_name, problem: has_many: logs,: dependent = & gt; delete DEF self.search (search) if search (all :: conditions => Other end and end   

controller

  Class Ticket Controller & LT; ApplicationController def index @tickets = Ticket.all @tickets = tickets. Search (params [: search]) response_to do | Format | Format.html # index.html.erb format.json {render json: @tickets} and end    

You are trying to query the column name on your ticket table. So replace it with the column in your column, caller_name . Change the following line:

  find (all:, conditions => [['name'? ','% # {Search}% "])   
  find (all:, conditions => [like 'caller_name', '% # {search}% "])    

asp.net - Request.ServerVariables("LOGON_USER") VS2010 and VS2012 -


I'm very strange for me, I started developing a web site in Visual Studio 2010 and ended in 2012. This is VB.NET, Framework 4.0. During the Web site, I use Request.ServerVariables ("LOGON_USER"). Everything works just as it should be.

I have recently started developing another web site from the beginning of 2012. What happens is the request. Whitelist ("LOGON_USER") does not return any value! It's just empty! However, if I open this same application with Visual Studio 2010, then it works!

Can anyone tell me what is happening here and how can I fix it in VS 2012? Thanks!

This problem occurs because the authentication-related variables in the ServerVariables store are not populated. Use anonymous access protection to access the aspx page. This problem can also occur when you give an anonymous user access to the section of the Web.config file.

To populate the LOGON_USER variable, when you use any authentication mode other than anyone, you can deny access to an anonymous user in the section of web.config.

Just change the authentication mode to anything other than the Web.config file. For example, the following entry in the Web.config file sets the authentication mode for form-based authentication: < / P>

  & lt; Authentication mode = "form" / & gt; & Lt ;! - To deny access to the anonymous user in Web.config file, use the following syntax: -! & Gt; & Lt; Authority & gt; & Lt; Deny users = "?" / & Gt; & Lt ;! - This anonymous / unregistered user - & gt; & Lt; Allow users = "*" /> & Lt ;! - This allows access to all registered users - & gt; & Lt; / Authorization & gt;    

I'm not sure that this is a VS 2010 & amp; 2012, but before that this has happened to me, and I used the above steps to remedy it. Like I said, just your web Check config file!

Answer this question for your questions!

Delphi mask for binary numbers -


I have a string grid and want only cells in it 1 or 0 . I try to use StringGridGetEditMask

  Process TForm1.StringGrid1GetEditMask (Sender: Tubect; ​​Acol, Arrow: integer; var value: string); Starting value: = '0'; If not ([0,1] in strontone (value) then value: = # 0; End;   

But I can input all the numbers from 0 to 9. How do I filter all the numbers except 0 and 1?

For your intentions you will need a sub-class of the class and in these sub-classes the in-site editor Allocate examples of this event in the Interposor class:

  Type TStringGrid = class (Grids.TStringGrid) Personal process InplaceEditKeyPress (Sender: TOBject; var key: four); Protected function CreateEditor: TInplaceEdit; Override; End; Implementation {TStringGrid} function TStringGrid.CreateEditor: TInplaceEdit; Start the result: = inherited CreateEditor; TMaskEdit (Results) .OnKeyPress: = InplaceEditKeyPress; End; Process TStringGrid.InplaceEditKeyPress (Sender: TOBject; var key: four); If not start (# 8, '0', '1'] key) then key: = # 0; End;