Posts

Showing posts from June, 2015

dvcs - git cherry confusion - doesn't work as described in doc -

The article "itemprop =" lesson "> after The documentation says:" Because instead of Git-Cherry Committed Id (SHA1), changeset compare, using Git-Cherry To find out whether the local commitments have been implemented under a separate commit id. " Let's see: $ git Cherry Master Release 1.1.0 | Head -1 -1 533e2559342910fbffa2be5b38fdd7f2ddb2ed53 $ git show533e2559342910fbffa2be5b38fdd7f2ddb2ed53 ... (Cherry was 409c61b3304373a73c787fdf9c08cc338934b74d) ... The GIT show shows the same changes for 409c .. and 533e $ Git br 533e2559342910fbffa2be5b38fdd7f2ddb2ed53 continue -1.1.0 --contains $ Git br --contains 409c61b3304373a73c787fdf9c08cc338934b74d master release -1.0.4 that means Changeset is both in master and release -1.1.0 then how does git cherry 533e reveal ..? It also says "Commits are compared to their patch ID, git-patch-id Received from the program. "When your cherry raised diff applied, it is possible to finish

browser - Can the browserCaps web.config section be ignored by asp.net/iis? -

Can Iis / ASP.net ignore browser caps section in webconges? I have an app that has been reported properly on servers and Dev environmental tests - but IE8 is not recognized in the deployment and the content has been given "downlevel" ..... Contents with browsers.ini in web.config settings? I came to know why this downlaw behavior was occurring. ASP 1.1 has a bug where the browser will be unable to recognize the browser when the browser string is too long. It has not been fixed in 1.1, but the 2.0 browser strugge works with long strings. 1.1 An interim step to achieve the site works for a device of IASPI such as the 'Fix' header on the go ....

Drawing UIImage into CurrentContext -

In my application I have used a UIImagePickerController to take a picture, and after this I can not attract it to the photo by using the UIImageView because I want to draw some lines from my finger. At the end I have written this code in Draw Rect Methods: - (zero) Direct: (CGRact) IMIS DREEN INVENT: RECTIT]; // Diazno Rattegolo del Tag CGContextRef myContext = UIGraphicsGetCurrentContext (); CGContextSetRGBStrokeColor (myContext, 0.5, 0.5, 0.5, 1.0); CGContextSetLineWidth (myContext, 3.0f); CGContextAddPath (myContext, PathTouch); CGContextStrokePath (myContext); } and touchesMoved: - (zero) touchesMoved: (NSSet *) touches with an event: (UIEvent *) event {UITouch * touch = [Touches any object]; CGPoint Location INView = [Touch Location Invoice: Self]; Drag a connected sequence of the line segment to the CGPEightAdline [] = {// .... // some lines}; CGMutablePathRef newPath = CGPathCreateMutable (); CGPathRelease (pathTouches); PathTouches = CGPathCreateMutableCopy (

asp.net - Problem finding a control within a FormView from code-behind -

The code behind here ... I am trying to regain this control so that I am in the drop down list Add item (I am retrieving the code-back to add to the drop-down list in the role group) Protected Sub Page_Load (ByVal, as in this System.Object, ByVal e System. EventArgs handles MyBase .load dim DDRoleGroups DropDownList DDRoleGroups = FormView1.FindControl ("DDRoleGroup") as End Sub Here is the FormView: (I Es took most so it's easier to read) & lt; ASP: FormView ID = "FormView1" runat = "server" DataKeyNames = "id" DataSourceID = "ObjectDataSource_Vendors" DefaultMode = "Insert" BorderColor = "DarkGray" BorderStyle = "solid" Borderwyuth = "1 px" cellpadding = "4" visible = "Wrong" & gt; & Lt; EditItemTemplate & gt; & Lt; / EditItemTemplate & gt; & Lt; InsertItemTemplate & gt; & Lt; Label class = "form_label" & gt

c# - Is there type or interface that implements of collection and selected value? -

I need a type that holds a collection of archives and values ​​selected in a collection, as what is a list box Will do Is there any existing (non-GI control) collection for this? I know that this is quite simple, but I would like to use Microsoft's provided type if any. Actually, this is what I want to do: interface i select list No, it is not something that is in the .NET framework . I would like to suggest that you make your interface to take advantage of the power of interfaces inherited in a slightly different way. Try doing something like this: Select interface> T & gt; : ILIIT & lt; T & gt; {T Select {Receive} Set; }} This will give you your ISelectionList & lt; T & gt; to be a IList & lt; T & gt; .

Creating Sharepoint/MOSS sitemap -

text after "itemprop =" text "> I'm trying to create a sitemap for my MOSS publishing site, I've got two approaches but stuck with Both are happening. My first approach is the use of PortalSiteMapProvider, which has already been created and well cached ... PublishingWeb rootWeb = PublishingWeb.GetPublishingWeb (SPContext) .Current.Site .RootWeb); // Get the default page URL in the web string default PageUrl = rootWeb.DefaultPage.ServerRelativeUrl; PortalListItemSiteMapNode Webnode = (PortalListItemSiteMapNode) PortalSiteMapProvider.CurrentNavSiteMapProviderNoEncode.FindSiteMapNode (defaultPageUrl); HttpContext.Current.Response.Output.WriteLine ("top level:" + webNode.Title.ToString () + ' But this site seems to back up everything in collections (such as lists, surverys). I only want to show SharePoint webs My second method was to use this piece of code. SPSite siteCollection = new SPS ite ("http: // example .org "); SPW

Blocking issue with AJAX using JQuery -

Try again Do not think I have questioned clearly. The big problem is contracting with the company, I have been delayed loading using AJX to convert from site to me. To do this, I am using page methods to load control. Javascript looks like this ... works like a winner! $ (document) .ready (function () {var clientID = '#' + '& lt;% = BackUpPower.DivBackUpPower.ClientID% & Gt; if ($ (client id)) Data type: "Application / Jason; Charset = UTF-8", Data type: "Jason": {$ .JAX: {Type: "Post", URL: "Dashboard. Espacks / Getback Controll", Data: "{}", Content Type: ", Timeout: 15000, Success: Function (result) {$ (Client ID). CSS ({" Display ":" None "}); $ (Client ID) .removeClass ('Load'); $ (ClientID) Attr ('innerHTML', result.d); $ (clientID). FadeIn ("slow");}, error: function (xhr) {// Warning ("GetBackUpControl Failed");}})}} }); The server-side

asp.net - How do I pass login ID as parameter to SharePoint login page? -

I have ASP.NET home page where the user provides his login ID. The application is linked to the ID based on the SharePoint site - the user is directed to the related SharePoint site. For example, if the user is the site 1 user, then ASP.NET The page gives the user instructions on SharePointSite1. This work is very far from me. Now, how do I pass the login ID from ASP.NET to the SharePoint login page so that the user does not type in the user ID again. I tried passing the URL parameter but it is not working. If you are using form-based authentication (FBA) ASP.NETTAP you use FBA You can also configure SharePoint to get SharePoint to use the same FBA configuration as your ASP.NET application. The advantage of doing this is that you have a user login your ASP.NET application and simply redirect them to your SharePoint site and they will be automatically logged in. You do not have to pass a username or customize any page in any way in SharePoint. If you have not done it

c++ - ISAPI Extensions: What is the difference between TerminateExtension and the extensions destructor? -

What is the difference between Terminator Extension () and Extension Destructor? Obviously both resources are used to clean, but what kind of cleaning should be done in one function and not the other? Terminest Extension function takes DWORD dwFlags. If this is HSE_TERM_ADVISORY_UNLOAD, you can either return the incorrect or true to allow the cancellation or blocking. There is no such option in the destruction of your class of course.

deployment - Installing with Client Profile Application doesn't show app in start programs menu -

I am using an application to install, but this does not put applications in the Start Program menu. I'm searching for the configuration of the setup project, but I can not find enough self explanatory, and I can not even find it in Google Any ideas? Thank you! Right-click on the File Systems tab, click on "Add a Special Folder" and click on the "User's"

avr gcc - avr-gcc: suppress warning "'__progmem__' attribute ignored" -

Do anyone know how this warning can be suppressed? Thanks From the GCC (1) man page: < Blockquote> -no-attributes Do not warn if an unexpected "__attribute__" is used, as the unrecognized attributes, the function attributes are applied to variables, etc. This will not prevent errors for misuse of supported features.

Exceeding Max Email Address Sizes -

RFC Standard says that the maximum email size is 320 (in fact, 256 accordingly). Is there a conceptual scenario where email addresses can be larger than this? Read it: The result means that you use 254 characters to store email addresses Because it has maximum permissions in an SMTP transaction. It is specified in RFC5321 (your article says this, and I am actually quoted), which is official.

subsonic - Create Foreign Key to ASP.Net Roles table -

I have a page table, I have PageID, a pageroll table with RoleID, which is the ASP.Net membership rolls The table is linked from and the page table. I would like to return a page that links to the currently logged in user's roles. Users may have more than one role against one page against more than one role. I have a page class in which IQueryable has a foreign key property in page rolls and IQueryable for the Aspen Roll Table (IQueryable) and IQueryable thanks Edit: Using Adam's Answer to Get All Answers on pages with an assigned role that match the one of the currently logged in user roles Have an account, I have an extra problem. I have a menu table with a PageID foreign key and a range id. I would like to return all menu items from 4 to CategoryID Those who have a page ID, I need to make sure that the user has permission to view that page on the basis of his role. I think Adam's inquiry will do this, so I think I need a union, return all the menu ite

gorm - Grails validation of a list objects -

I'm trying to get grails to validate the contents of a list of items, if I show the first code : class item {contact recipient = new contact () list additional receipts = [] stable hamani = [additional receipts: contact] fixed constraints = {} static embedded = ['recipient']} Class contact {string name string email static barriers = {name (empty: incorrect) Mail (email: true, empty: incorrect)}} Actually I have only one necessary contact ('recipient'), it works just fine: def i = new item () // will be wrong! I.validate () // will have an error for 'recipient.name' and 'recipient.email' i.errors Do I also add any of the attached I want to validate the 'additional' receipts in the Contacts: def i = new item () i.recipient = new contact (name: 'one name', email: 'Em Ail@example.com') // should be correct because all contacts are valid i.validate () i.extraRecipients & lt; & Lt; New contact () // Inval

Selecting a programming language for easy web development with good IDE -

I'm looking for some recommendations about web development programming language / technology selection. I know there has been a lot of discussion around so much of the subject, but perhaps the following set of criteria (in the order of importance) adds a bit of spin: Development in good quality IDE The process is conveniently ( object-oriented and strongly typed Just like a data back-end (such as creating a blog) is quite easy (i.e. ) Allows web development Li> different platforms (Win / Linux) Free (at least in some original version, including IDE) This is where PHP is low for me Include language / profile / IDE set suggestions. So it is more that what is around it rather than language. There is a good direction after that you can use that framework, such as, and they can be well integrated with ORM. Other C # and .NET. Apart from this, a valid alternative and many projects made for Java have been placed on the Net.

vba - Creating a Powerpoint with Graphs from Access -

I'm trying to create a PowerPoint from the graph in programmable access. Ideally, when graphs take on to PowerPoint they will not link to static images and graphs still access data I have tried the processes such as this. Personal set command1_click () object set pwrpnt = CreateObject ("Powerpoint.Application") pwrpnt.Activate the set presentation = pwrpnt.Presentation.Open as object dim position rendered slow pwrpnt ( "C: \ test.ppt") Me.Graph1.SetFocus Runcommand acCmdcopy Presentation.Slides (1) .Shapes.Paste Set pwrpnt = None Set Presentation = Nothing End Sub And I get an error message such as:. Paste method failed Is there a better way? And can it be forced to become a stable image? Thank you. OK, I found a way to do this. I still have a more elegant way to anyone, so interested, but to deal with a similar problem to someone else: private sub-command1_click () 'Note: only sample In the actual code it should probably be 'PPT

xmlhttprequest - POST response taking too long -

क्लाइंट साइड अजाक्स जावास्क्रिप्ट कोड XMLHttpRequest का उपयोग POST अनुरोध भेजने के लिए कर रहा है, लेकिन मुझे मिल रहा है जैसे कि प्रतिक्रिया में 0.5 सेकंड की देरी हो रही है और मैं यह जानने का प्रयास कर रहा हूं कि क्यों, मैं इसे तेज होना चाहता हूं, और 0.2 सेकंड की तरह। दोनों अंत बिंदुएं एक ही इंट्रानेट में हैं, ग्राहक सीधे ईथरनेट और सर्वर से 802.11 बी का इस्तेमाल करके जुड़ा हुआ है। वायरसहार्क का उपयोग करके मैंने निम्नलिखित टीसीपी लेनदेन को सूँघा: समय (एमएस) से लेकर जानकारी -------------------- -------------------------------------------------- - क्लाइंट सर्वर [एसवाईएन] 11.7 सर्वर क्लाइंट [एसएनएन, एसीके] 11.8 क्लाइंट सर्वर [एसीके] 12.0 क्लाइंट सर्वर [POST] 12.1 क्लाइंट सर्वर निरंतरता 39.0 सर्वर क्लाइंट एसीके 46.0 सर्वर क्लाइंट एसीके 150.0 सर्वर क्लाइंट टीसीपी सेगमेंट पुनर्संबेल्ट पीडीयू 311.0 क्लाइंट सर्वर एसीके 324.0 सर्वर क्लाइंट एचटीटीपी / 1.1 200 ओके (टेक्स्ट / एचटीएमएल) 512.0 क्लाइंट सर्वर एसीके वास्तविक पोस्ट और प्रतिक्रिया वास्तव में कम है। मूल रूप से पोस्ट अनुरोध की सा

c# - How can I make DataTable enumerable? -

I can not use asEnumerable () on DataTable, I am using C # 3 but I'm just targeting 2.0 framework (LINQ capacity). ) Is there any way I can make dataable calculable without using the selection ()? bool isExisting = (Datasource as DATATAS). Choose (). Any (xxx => (string) dr ["filename"] == file name); Update: I wanted to show it like this: bool isExisting = (bdsAttachments.DataSource as DataTable ) .Asnumerable (). Any (xx = & gt; (string) dr ["filename"] == filename); I'm getting a hint that the DataTable selection method copies, I'm just thinking about using AsEnumerable, the problem is that I'm just 2.0 frameworks, the system . I'm targeting data. Dataset extension is not available BTW, I tried to do this :, but there are compilation errors in it. public static IEnumerable & lt; DataRow & gt; Enemerate RO (this datatable table) {foreach (rows in table .ro) {returns the row of returns; }} allows you to call:

.net - How can i convert IQueryable<string> to a string array? -

अगर मैं ऐसा करता हूं ... rowNames = _myDB.RowSet.Where (r = & Gt; (आर। आरआईडी & gt; = न्यूनतम आईडी) & amp; amp; (आर। आरआईडी & lt; = maxId))। चुनें (आर = & gt; आर। आरओएनाम); यह एक IQueryable देता है, मैं इसे कैसे डाल सकता हूँ: string [] myStringArray ? इसे आज़माएं: _myDB.RowSet। जहां (आर = & gt; (आर। राइड & gt; = न्यूनतम आईडी) & amp; amp; (R.RowId & lt; = maxId))। चुनें (r = & gt; r.RowName) .ToArray (); यह एक्सटेंशन विधि का लाभ उठाता है।

email - Authenticate via POP3 using vPopMail -

I'm working on installing vPopMail on CentOS for using a Qmail / Courier-IMAP mail-server setup Until, everything is working well. Mail has been sent to any virtual user, I have set up under any virtual domains (domain is handled properly in order to handle MX records) I add to vPopMail vPopMail is sent correctly . / Melldir / and / home / vpopmail / domains / Domain-example.com/user.name/Maildir/new. I'm now having trouble asking pop-ups to authenticate to use the vPopMail instead of the ~ default ~ QMail / Courier-IMAP authentication method (S). "To use the vchkpw program for authentication, you also need to modify your pop server startup line." (Found) I can get in any document, I need to give this also a clue. So, the question: How do I authenticate with my pop VPopMail server? Thanks a long time ago! :) (I do not hesitate to know if (if) needs more information to answer my question ..) < Go ahead and check it i.e. Item 12 Then go ahead a

sql server - What is the result when calling BEGIN TRANS, but not COMMIT, ROLLBACK, or END TRANS? -

In a clear transaction, if I start the transaction by giving the transaction, but if I do not give committ, rollback or the END transmissions What happens to the application? Nothing - the transaction is still going on. If you terminate the connection, it is rolled out.

How can I check the permissions of a user for an specific element on Sharepoint? -

How can I check that there are some permissions on a random user (not a current user, I only know his username) A specific SharePoint list item, list etc? Best Relationships Oliver Hanapi PS: I'm reaching SharePoint through my web services. I do not think you can, you should write your own website which is a specific The user is specific to YouTube. . Then deploy the webservice to SharePoint ...

iphone - Is it possible to adjust the width of a UITableViewCell? -

I would like to know whether it is possible to adjust the width of UITableViewCell I would like to put an image on the left side (such as address book In contact view). I got a post which is trying to fulfill me. I would also like to confirm the reply of this post. There are some style options in OS 3.0 which APIs you want, can do. Or, you can create a fully custom table view cell inside the interface builder, for example, in one of my applications I do this in my cellphone breakpoint: < Code> Place ViewCell * cell = (Place ViewCell *) [Table View dequeueReusableCellWithIdentifier: CellIdentifier]; If (cell == blue) {cell = [self made new placecellFamnib]; } And this is the method of digging it from NIB - (Place Vivekel *) CreateNew PlaceCellFromNIB {NSAR * NIB Contents = [[NSBindal Main Bundle] LoadNib nominated: @ "Placecel" owner: self choice: zero]; NSEnumerator * nibEnumerator = [nibContents Object Enumerator]; Place ViewCell * placeCell = Zero;

css - Combobox shows up in IE6 when a grey background image is used for the page -

I am facing this strange problem: what I am trying to achieve, a pop on page load -Up will be shown Users will have to do something to go to the page, a gray image background is applied to the body to disable the page, i.e. the 6th of the page's cubosheets appear active and the user can select the value So frustrated Be the parent. Can we disable the comb with the help of CSS? Thanks in advance! You can use two forms for this. Your popup stays in one form and all other controls stay in another when you click on the button to show popup, you can disable the first form. You can also keep an iframe with 100% width and height which will hide the combobox. Simplify

String manipulation in MySql -

I am using mysql in a field I have inserted strings like string 1 :: string 2: now i Only want to get the second string, can anyone help me in this, thanks in advance SELECT SUBSTRING_INDEX ('string1 :: string2', '::', -1)

c# - Thinking OO with TDD - Where to start? -

I am trying to improve my TDD / OO skills and every time I use TDD for the effect of the design Here's my case / story: Identify a subset of customers for a review, start a review for them and some Send the letter. Now the memory of my muscles has already written a question window, in which a UI has been designed and then I have to write some code I want to That should be the domain code focus and I want it under test. So what is the easiest thing in this matter? I think I want a list of my clients I already have a client object (CSLA-style), though it has a load of reliance which is difficult to break. I think I can have a client reviewed object and it tests that I get the exact number of reviews. There are several factors that I need to consider, so it does not seem simple. And yet how do I guess the fact that I have 10 out of 20 clients? Can someone help me on my way? here - I will close you with some tests: Class IdentifyClientsDueForReview {Public Z

css - Image Optimization -

I should know that to convert an image (GIF or JPEG) to PSG 8 via the USLO smash site Will speed of display increase? Will it work in 6? It is suitable for PNG-colored blocks depending on the image, while the JPG picture type Good for images of Smushit will shave any external bytes, reducing the file, but if you have several small images in different files, you should spray them to reduce the number of connections needed to load your page. It will help reduce the filesystem, but reducing the number of files will most likely help (usually) help.

Java IOException: No buffer space available while sending UDP packets on Linux -

I have a third party component which, in a certain position, tries to send many UDP messages to many different addresses It is a burst, which happens when the software is started and the situation is temporary. I'm not sure whether this is a fair amount of messages or the fact that each of them goes to a different IP address. Nevertheless, changing the underlying protocol or problematic component is not an option, so I'm looking for a workaround. StackTrace looks like this: java.io.IOException: No buffer space available on java.net.PlainDataagramSocketImpl.send (at the native resident method) on java.net.DatagramSocket.send (DatagramSocket. Java: .612) This problem occurs because of (at least) Java version 1.6.0_13 and 1.6.0_10 and Linux versions with Ubuntu 9.04 and RHEL 4.6 < P> Is there any Java system properties or Linux configuration tweaks that can help? I have finally determined what the problem is Java IOException is misleading because this "bu

embedded - As a hobbyist, what do you want in a hardware dev kit for .Net Micro Framework? -

As an amateur who works on embedded systems / robotics, what do you do as the hardware characteristics of the micro framework development kit Want to see? I have seen a lot of questions about what is available, and there is nothing really about what is missing. I should get the maximum number of existing kits aimed at product development compared to amateur. Modular designs using IDC / Jumper blocks are better or do you prefer built-in components? How many GPIO pins? Can some memory mapped devices be useful? Do you see more than one SPI bus stand? What wireless / serial protocol would you like to see? Are you talking like things or? I think they have done some extremely great things.

sql - Change Date and group by Fiscal Month End -

I created the following table (union all): date of ID Hours Weight Financial AAA 1/2/2009/2009 0 10 0 AAA 1/30/2009 0 20 0 AAA 2/14/2009 0 10 0 AAA 2/18/2009 0 20 0 AAA 2/27/2009 0 20 0 AAA 2/28 / 2009 0 20 0 AAA 1/14/2009 10 0 AAA 2/14/2009 20 0 AAA 2/16/2009 10 0 AAA 2/25/2009 10 0 AAA 2/26 / 2009 10 0 AAA 3/3/2009 20 0 Faucet 0 0 0 1/28/2009 Faucet 0 0 2/27/2009 Faucet 0 0 3/2 9/2009 And I want to retrieve: ID date hour weight AAA 1/2 8/2009 10 10 AAA 2/27/2009 50 50 AAA 3/2 9/2009 20 20 before The column should be changed in the interval of the next fiscal year (e.g. 1/27/2007 -> 1/28/2009, 1/30/2009 -> 2/27/2009, etc.) and after that group . I was able to use it: but it is only related to the group calendar , does not happen according to the month of month i in the FISCAL column. You should not be linked to fiscal dates in your table. But now with your table, you can make a table for the first time (together, special privileges are required) Joi

Word document in HTML page does not display toolbars -

I need to display a dynamically-generated word document on the server in an HTML page, And the attempt to use the document was actually displayed correctly but the toolbars like print, file etc. are missing. Note: The word that displays the secondary requirement is to enable the user to print the content of the document, so the print toolbar is necessary for this. I'm not sure that this is actually possible when you & lt; Object & gt; tag, the word is being applied to present the document, but in reality there is not a complete example of running a word in the browser. I suspect that the word & lt; Object & gt; There is no way to display your UI inside the area. You may have to type some javascript to open the browser's print capabilities. / P>

javascript - Getting the width/height of the entire browser in IE? -

Is there anyone here that knows the Javascript call width / height of all browser windows (navs, menus, etc?) I know that external video, , external height is in FF, Safari and other browsers. This can also be helpful, with what to ensure you are trying to fulfill Are: window.moveTo (0,0); Window.resizeTo (screen.width, screen.height); Var navButtonsEtcHeight = screen.height - window.innerHeight; Var navButtonsEtcWidth = screen.width - window.innerWidth; Note: For browser-independent solutions for "window.innerHeight" support, see Then you have the answer for what you are looking for - non-fullscreen users With the negative side of the screen, before viewing the screen bounce around the screen.

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

Using Visual Studio 2005, if I open the test in VSMFI and try to run the tests, then sometimes the projects are ready. However, they run very slow. CPU 99% waste and output window VS Shows things associated with compiling it. Is there any way to fix this? It does not make any sense. It is not necessary to upgrade that we are a viable alternative to those people who have to deal with the legacy code. Did you try to upgrade SP1? I do not know of any specific problem in this area, but this will be the first change I tried to do.

System.Web.UI.Page won't let me access CurrentUser or User.Identity from a Controller in ASP.Net-MVC -

जब मैं कोशिश करता हूं user = System.Web.UI.Page.CurrentUser या उपयोगकर्ता = सिस्टम। वेब। यूआई.पृष्ठ। उपयोगकर्ता। पहचान मुझे यह कहते हुए एक त्रुटि मिलती है सिस्टम.Web.UI.Page के लिए विधि परिभाषित नहीं है मैं एक नियंत्रक के भीतर इसे एक्सेस करने का प्रयास कर रहा हूं, क्या यह मामला है? मैंने जाँच कर लिया है कि मेरे पास एक और वर्ग नहीं है पृष्ठ का नाम, ऐसा क्यों कहा गया है कि यह विधि परिभाषित नहीं है? ऐसा करने के कई तरीके हैं ( मूल रूप से, वे सभी एक ही हैं) उपयोगकर्ता.आईडेंटीटी // नियंत्रक में HttpContext.User.Identity // नियंत्रक प्रणाली में। Web.HttpContext.Current.User.Identity // कहीं भी पृष्ठ। उपयोगकर्ता संपत्ति जब एक पृष्ठ है, तो वह काम करता है जो मौजूदा अनुरोध को प्रसंस्करण कर रहा है। एक एमवीसी नियंत्रक के रूप में, अनुरोध पृष्ठ वर्ग को नहीं दिया गया है, यह काम नहीं करेगा। नियंत्रक में। < / html>

How to initialize a derived class in C#? -

मैं एक आधार वर्ग है: सार्वजनिक वर्ग प्रोसेसर {ParsedString _parsedMessage; यूटीलीजैडर _्यूटिलीजैडोर; सार्वजनिक प्रोसेसर (पर्सेडस्ट्रिंग पार्सेड मेसेज, यूटीलीजादोर यूविसिज़ाॉर) {_parsedMessage = parsedMessage; _utilizador = utilizador; } सार्वजनिक वर्चुअल स्ट्रिंग एक्जिक्यूट () {string result = null; वापसी परिणाम; }} तो एक व्युत्पन्न वर्ग सार्वजनिक वर्ग RegistarAnuncio: प्रोसेसर {सार्वजनिक RegistarAnuncio (ParsedString parsedMessage, Utilizador utilizador) {}} < / पूर्व> और संकलक कह एक त्रुटि दे रहा है: त्रुटि 9 विधि 'प्रोसेसर' के लिए कोई अधिभार लेता है '0' तर्क C: \ दस्तावेज़ और सेटिंग्स \ उपयोगकर्ता \ My Documents \ projectos \ Licenciatura \ Prototipo \ Agrinfo \ AgrinfoLib \ इंटरफेस \ एसएमएस \ प्रोसेसर \ RegistarAnuncio.cs 11 16 AgrinfoLib मैं सी # संदर्भ के लिए googled लेकिन मैं एक कोड उदाहरण है जहां लोगों को तर्क के साथ एक आधार वर्ग विधि प्रारंभ नहीं पाया था, कोई मुझे मदद दे सकता है। सादर, आप इसका उपयोग करना चाहते हैं बेस कंसट्रक्टर

asp.net - JavaScriptSerializer.MaxJsonLength exceeded. What's the best practice for handling this? -

I have a huge amount of data that I'm sending to clients using the $ .jax () function of jQuery. I am calling a method in the ASP.NET Web Service which returns JSON data. Everything is great for most searches, but when I have a large data set I go into a problem with the JavaScriptSerializer MaxJsonLength property. What is the best practice to deal with this? I just do not want to set a maximum length arbitrarily, can I set up Maxson Lamben in the web service if the return data is bigger than the current maximum or will I write and send the client in exchange for the data? Here is the relevant snippet from the web Service: Dictionary The only way to set maximum length for web methods to call from client scripts Way Web What is your problem with setting up the config file (below)? I will do this on several exhaust calls to stream some of the data. & lt; System.web.extensions & gt; & Lt; Screening & gt; & Lt; Webservices & gt; & Lt; JsonS

Streaming large file uploads to ASP.NET MVC -

I'm working for an application, I need to allow the user to upload a very large file - that is Probably many gigabytes - Unfortunately, through our website, ASP.NET MVC appears to load the entire request to load into RAM - not exactly ideal for such an application. Specifically, trying to solve this problem via code: if (request.Method == "POST") {request.ContentLength = clientRequest.InputStream.Length; Var rgbBody = new byte [32768]; (Var requestStream = request.GetRequestStream ()) using {int cbRead; While ((cbRead = clientRequest.InputStream.Read (rgbBody, 0, rgbBody.Length)) gt; {fileStream.Write (rgbBody, 0, cbRead); }}} The buffer-to-request-in-RAM fails to circumvent the psyche. Is there an easy way to work around this behavior? It has been found that my initial code was originally correct; Only needed to change request.ContentLength = clientRequest.InputStream.Length; request. Contact lang = clientRequest.ContentLength; Pre-stream in fu

python - An integer is required? open() -

I have a very simple dragon script, which should scan a text file, in which The form of lines is formatted as id = ' value ' and put them in a word Python module is called chval.py and the input file is in.txt. This code is: os, sys import * vals = {} f = open (sys.argv [1], 'r') from the OS import to the line in sys: val_f : T = line.split ('=') T [1]. Strip ('' '') vals.append (t [0], t [1]) print vals f.close () When I try to run it I get: traceback (most recent call final): File "chval.py", line 9 , In? F = Open (sys.argv [1], 'r') TypeError: An integer is required I am using Python 2.4 ... because I do not use Has challenged anything new, what about open () is something I do not know? Why does it want an integer? After that line, nothing is unheard of. In short: Why is this giving me the error and how do I fix it? Because you have been using osopen from os import * by , Which in fact requires a

php - Which characters should I escape/sanitize for file names? -

I have to clear some data that will be used in file names. Some data contains empty space and ampersands character What is a function that should be used in a file name (or path) to save or secure the appropriate data? I did not find anyone in the PHP manual's 'Filesystem Function' section. So, suppose I have to write my function, which characters do I need to escape (or change)? If you have an opportunity to store the original name in the database, then I will create a file with just a random hash (mt_rand () / Md5 / SHA1). The advantage will be that you do not rely on the underlying OS (character / path length), value or length of user input, and additional file names can be estimated. Probably Base 64 encoding is also an option.

asp.net - Dynamic nested master pages, shared properties -

I have a base master page that specifies the website's main layout template. It also handles some logic that changes the tab based on the section, and also sets page meta information. I'm loading nested master pages dynamically by looking at the query string, loading a record from the database, and setting the nested master page based on the value found in that record I am I need to load dynamic nested master pages for layout and functional differences. That record contains additional information that I want to use in the master master page and in the dynamically loaded master page so that I call additional databases. Currently, I have established a class that inherits the masterpiece to work as a base class for the original master page. I have a share (static) property that represents the database call to the object that I want to share between the base master page and nested, dynamically the master page. It works, but it seems a bit ugly. Is there a better solutio

nhibernate - Link two entities based on unique value not ID -

I have the following database tables Primary Key ID and AnimalType.Type is a unique string. Animals - ID - Name - TypeID AnimalType - ID - Type [Hervivor, Carnivore] My classes are as follows. Public category Animals {Public Entry ID {Receive; Private set; } Public string name {get; Set; } Public AnimalType type {get; Set; }} Public Square AnimalType {Private Int ID {get; Set; } Public string type {get; Set; }} How do I get the following code to work in NHibernate so that it herbivore <> horse = New animal () {name = "horse", type = new animal type () {"herbivor"}}; Repository.SaveOrUpdate (horse); Var rabbit = new Animal () {name = "rabbit", type = new animal type () {"herbivor"}}; Repository.SaveOrUpdate (rabbit); Update If I can get NHibernate to do this argument well: I'll check some options. 1) If the data does not change frequently, you can type an annuity instead of an entity object? 2) Instru

actionscript 3 - menu bar control in flex ,needed to handle separate method for individual menu item -

I need to set fire to different menu items in different ways so that individual items can handle different methods . And I should know that all types of properties like menu type = "radio" are available in the menu. & lt; Mx: menubar id = "jj" labelField = "@ label" itemClick = "menu itemclick (event)" x = "23" y = "228" & gt; & Lt; Mx: XMLList & gt; & Lt; Menuitem label = "file" & gt; & Lt; Menuitem label = "new" type = "radio" /> & Lt; Menuitem label = "open" data = "openfile" type = "check" /> & Lt; Menuitem label = "save" /> & Lt; Menuitem label = "existence" /> & Lt; / MENUITEM & gt; & Lt; / Mx: XMLList & gt; & Lt; / Mx: menubar & gt; Can you give a link or example to control the menu bar? Thanks & Lt; Menuitem label = "menu item 1-b"

Json.NET serialization pre and post calls -

I jason to serialize an object graph I am using Net. Each object has been serialized or deserialized, I want to call a method on that object before serialization occurs. For example, all my objects apply an interface with inserilization with a method. Before I serialize the object, I would like to be called onserilyising. Is there a way to get it without touching the Jason.Net source code? The latest version of support.

DataGridView row repositioning -

Is there an easy way to swap the position of the two rows in a constant datagrid view? I am using this to display an order list, where I want to move the up / down arrow key up and down in a grid in the top and bottom, but without completely restoring a line within the grid There is no way to see a way to restore a place, which seems to be high, the index value for the row is read-only. To move a line, use DataGridView.Rows. Remove Import and then DataGridView.Rows.Instore

asp.net - jquery $post posts page, but Request.Form is null -

I have some input fields in a form. After some verification, I use jquery to post page . $ Post ("Myproduct.aspx? Action = 1"); appears to go through the post but when I debug the server code, then request.form [] is zero. Anyone have this problem? if <. $ post (? "Myproduct.aspx action = 1 ") East; The only thing that is being posted is no wonder, because you are not leaving the second parameter only in the post parameter ($ .post () function). You might want something like this: var post_data = {'key': 'value', 'key2': 'value2'} // or some form of data reading from a form $ .post ('Myproduct.aspx action = 1', post_data);

Where do you load the Google Maps API in a GWT project? -

मेरी प्रोजेक्ट.gwt.xml फ़ाइल में मेरे पास & lt; script src = " Http://maps.google.com/maps?gwt=1&amp;file=api&amp;v=2&amp;sensor=false;key=MYKEY "/ & gt; लेकिन, जब मैं अपना पेज लोड करता हूं, तो मुझे आने के लिए Google मानचित्र गैजेट मिल जाता है, लेकिन कोई नक्शा नहीं है और कोई त्रुटि संदेश "आपका पृष्ठ Google मानचित्र एपीआई गुम है।" क्या मुझे एपीआई लोड करने की कोई दूसरी जगह है? ऐसा लगता है कि मुझे स्वयं को काम करने के लिए मिला है मैंने अपने project.html फ़ाइल में जोड़ा: & lt; script src = "http://maps.google.com/maps?file=api&v=2&key=MYKEY" प्रकार = "text / javascript" & gt; & lt; / स्क्रिप्ट & gt; और यह काम करना शुरू कर दिया शायद समस्या को हल करने का सबसे अच्छा तरीका नहीं है, लेकिन यह काम किया!

c# - WPF: How do I prevent tearing with WriteableBitmap? -

I am using images to display which I process myself at approximately 20 frames per second. This question () and this question () indicates that the best way to do this is to use a WriteableBitmap WriteableBitmap indicates that the call to write WritePixels () will be due to the thread rendering thread on the UI thread: MSDN documentation: The UI thread writes content back in the buffer. The render thread reads the contents in front buffer and copies it to video memory. The changes made in the back buffer are tracked with changing rectangular areas. & lt; Snap /> When an update is sent to the rendering thread, the rendering thread copies the rectangles converted from backup buffers to the front buffer. The rendering system controls this exchange to prevent circumvention and to recreate artifacts, such as "torn". I process my images on a background thread, then use Dispatcher.BeginInvoke () to call WritePixels () , To make sure that

php - accessing values globally -

मेरे पास 2 फ़ाइलें हैं: uploading.php emaillinks.php दोनों में एक फ़ाइल शामिल है inc.php जिसमें सभी शामिल फ़ाइलें हैं और आरंभ करें डेटाबेस कनेक्शन। फ़ाइल uploading.php में एक वेरिएबल घोषित किया गया है, मुझे यह जानना चाहता था कि मैं इसे कैसे emaillinks.php में देख सकता हूं, I cant uploading.php में emaillinks.php शामिल है। मैं कुकीज़ से बचना चाहता हूं क्योंकि डेटा बड़ा और हमेशा अलग होता है। Emaillinks.php द्वारा इसे सुलभ बनाने का सबसे अच्छा विकल्प क्या है? धन्यवाद यह क्या है पर निर्भर करता है, आप इसे डेटाबेस में डाल सकते हैं या ( $ _SESSION )

logo lang - How can I load a file which includes text and numeric data? -

How can I load an * .csv file that includes the number of people in the logo and logo? For example, EN 43.876W Since it is so, I think that You have the meaning within the code. Actually you are reading in a row, and looking for parsing (comma, spaces, pipes, whatever you use to delimit), and get an array of your own To assume the division (most languages ​​support it in their string library). If you know which value should be an integer then you can change it. If you want you to see it yourself - Notepad, WordPad, Word, Excel, Openoffice, Peep, VIM, Pico, whatever you want. EDIT: Now that you have included more information - the logo includes the file to read and remove information about the files.

c# - How to Load Config File Programmatically -

Assume that I have a custom config file that matches custom-defined configuration sections and config elements. These configurations are stored in class libraries. The config file looks like this & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Schoool name = "RT" & gt; & Lt; Students & gt; & Lt; / Student & gt; & Lt; / Schoool & gt; How can I load and use this configured file from the program? I do not want to use raw XML handling, but leverage the already defined config class You have to customize it for your needs, but here's the code I use in one of my projects to do this: var fileMap = New Configure File Size ("Pathtoconfigfile"); Var Configuration = Configuration Manager OpenMapCache configuration (filemap); Var section group = configuration GetSectionGroup ("applicationSettings"); // This section is the name of the group, changes your requirements var se

asp.net mvc - Binder for long{} in MVC -

[स्वीकार करें वर्क्स (एचटीपीवीर्ब्स.पोस्ट)] सार्वजनिक जेसनएक्शन रिजल्ट & lt; बेसएसिन्करस्पॉन्स & gt; जोड़ें (लंबे [] IdList) {for (int i = 0; i & lt; idList.Length; i ++) {// कुछ करना}} var o = {url: addButton.action.url, विधि: addButton.action.method , पैराम्स: {'IdList': Ext.encode (allIds)}}; Ext.Ajax.request (ओ); मैं एक अजाक्स कॉल से पीछे कोड के लिए एक लंबा [] पास करने का प्रयास कर रहा हूं Idlist वर्तमान में एक स्ट्रिंग है जो मैं एक JsonArray में कनवर्ट के रूप में आता है। क्या बाँध विशेषता का उपयोग करने का कोई तरीका है? यदि आप DefaultModelBinder का उपयोग करना चाहते हैं अनुरोध सामग्री की तरह दिखना चाहिए: आईडीएलआईआईएस [0] = 100 और आईडीलाइंस [1] = 200 और आईडीलिस्ट [2] = 300 और आईडीलिस्ट [3] = 400 & amp; ... और आईडीलिस्ट [N] = ...

Force all asp.net requests to a single page? -

I have to tell the bat that I am not familiar with ASP.NET MVC, and I do not think I'm familiar with this project. And have time to switch. I am creating a website where only one physical page is mysite.com/default.aspx. If a user browses to mysite.com/foo/bar, then I want (somehow) my default.aspx to handle that request. I know that this seems very "oriented" / "controller" oriented ... but is there any way to do this without switching MVC completely? Apart from the note, there will be static images and things on the site that I do not want to serve by my page ... so mysite.com/foo/bar may result in html in HTML which includes IIG tag With mysite.com/images/foo's src GIF, so I have to stop some folders / files / process fromnetnet. What you are talking about is called rewriting the URL and yes, an ASP .NET forms application is able to do this. The technique is well understood in this entry: ASP.NET MVC hunts on this issue, even if yo

html - Did iPhone Simulator 3.0 break two-finger div scrolling? -

I have recently upgraded to iPhone Simulator 3.0, and when I scroll two-finger on a divan (Safari Or in UIWebView), it does not work anymore To scroll a two-finger in the iPhone Simulator, keep the option to get two fingers, keep shift to move fingers relative to each other, and then drag and drag the div. You can try to scroll the example div on this page: Can anyone reproduce it? I got someone to reproduce it. Based on that, it seems that Simulator 3.0 broke the two-finger scrolling connected, but did not break it on the actual device.

datetime - Weird flex date issue -

Flex is driving me crazy and I think it's a wonderful collection of how it controls leap years and there is no leap year. So here is my example. I have a date date method that finds the number of days or milliseconds between two dates. If I run the following three statements, then I get some strange issues. dateDiff ("Date", New Date (2010, 0,1), New Date (2010, 0, 31)); DateDiff ("Date", New Date (2010, 1,1), New Date (2010, 1, 28)); DateDiff ("Date", New Date (2010, 2,1), New Date (2010, 2, 31)); DateDiff ("Date", New Date (2010, 3,1), New Date (2010, 3, 30)); If you want to see the date of comparison above, you are expected to get the number of days between 30, 27, 30, 29 dates. The strange thing about me is that compared to 1 October to 31 March, I get 29. Why is it like this? What is there to be only 28 days in February? If anyone has any input on this which would be highly appreciated. Public stable work date def (datepart: str

iPhone SDK 3.0 Vs. 2.2.1 -

I have just installed the iPhone SDK 3.0 and have found that the text property of the UTABL vixel is no longer used, and its Instead of using textLabel.text. Does this mean that I have to know the current system version and call this method? like. UIPTEWUSECEL cell = ...; If ([[[UIDewis current device] systemview] excelstostring: @ "3.0"] {cell.textlabel.text = @ "..."; } Else {cell.text = @ "..."; } If so, then it would be very upset. Build for just 3.0 and do not worry about 2.2. Unlike major OS upgrades, people are upgrading to a new version of the iPhone OS very fast. View this post on the tapbot blog:. Until your app is approved (2 weeks to + some?) Will not use almost any 2.2!

delphi - Freeing Multiply-referenced Objects -

This is another post about which I got an intraab application, according to the report of FastMM4, memory leaks had a 2 MB text file, where I found it below in 115 instances of leaking 52 bits of each class is. Leaks are from the mere complex implication and class handling. If the app needs every moment of the classroom to work now, then I'm looking for some way to either clone the clone with some straightforward cleaning, or referencing it in a different way, or doing ..? The first instance of the class (TCwcBasicAdapter) has been added to a local variable A TOBjectList (not the owner) that is deleted and deleted with TObjectList (FCDSAdapters): Process TCwcDeclaration.AttachAdapter (DS: TDataSource; Constants Run, KeyFN, TitleFN: String; Constant Multiple: Boolean = Fault; Concept Allow Attachment: Boolean = Falls, Const. Vacation: Boolean = Falls); Var form: TCVC session form; Adapter: TCwcCDSAdapter; Mainfield, TitleField: TFild; Start the form: = GetForms (FormName); Ke

html - PHP: Auto-generated XML carriage return entities appear w/ SimpleXML and xpath -

I am using SimpleXML and xpath to read the elements from an external UTF-8 XHTML document. I resume the output of Simplex executable XXML () function executed on each element returned with a xpath selector. But the XML Carriage Return Unit is disturbed by every row of my code is inserted There is no extra character in the XHTML document. What is causing this? It seems that the way I'm running through every array element returned from XP . I can not find institutions when I'm just outputting an element straight from SimpleXML (without using Expath). & lt ;? Php $ content = new DOMDocument (); $ Content- & gt; LoadHTMLFile (CONTENT.html); $ Story = simplexml_import_dom ($ content-> getElementById ('story')); $ Theme = $ story- & gt; Xpath ('div [@ class = "topic"]'); Forex Currency (subject as $ subject $) {$ topicContents = $ topic- & gt; Xpath ('div / child :: node ()'); // The array of elements within the 'cont

Block procedure PL/SQL with Oracle -

I have a process and I want only one user to execute this process at the same time. This is only on top of my head: consider using the lock named by dbms_lock After the statement that starts, get locked, do it, then keep it on the exit (keep in mind the errors / exceptions!). Katie

scripting - How do I programatically mount a raw iscsi volume in windows, and get it ready to use? -

The API is very straight forward to create a new volume on our SA. What I can not understand is to connect the program to the ICSI Initiator, to start the space (Understanding Windows Disk Manager) and finally format it and mount it is a drive letter. I currently use win2k3, however going to win2k8 has an option if it is easy to implement. To apply disk initialization, partitioning and formatting to one of my company's products I can not share the code, but I can tell you in the right direction. You want the API to be called VDS - this is a COM API but I have used it successfully from C ++ (ATL) and C # (COM interop). Unfortunately the documentation is quite low; All you have to do is immerse yourself in the object model, write some code, and gradually you will feel for it. In Windows Server 2008, there is a non-documentary but quite useful C # ship around VDS with the cover. Microsoft. Storage. Search for DLL named Vds.dll. You can use reflective to find your dif

java - Passing a concrete List of EnumMap objects to generic List of EnumMap parameter causes compile error -

I have a piece of code that I think should be compiled, but it is not. Public Code Program {Public Zero My Mathew (List & lt; EnumMap & lt ;, MyInterface, String & gt; & gt; Maps) {} Public Zero Collar () {EnumMap & lt; MyEnum, String & gt; ; Map = new enamel map & lt; MyName, String & gt; (Myanm. Class); List & lt; EnumMap & lt; MyEnum, String & gt; & Gt; List = new linked list & lt; EnumMap & lt; MyEnum, String & gt; & Gt; (); MyMethod (list); // error logic type is not compatible} } MyName is an eMan that implements the MyEnfaces Why does myMethod (list) call me logic type not compatible? If I change the signature of my Mathi in the following: Public Zero expand my Math (List & lt;? Map, Mieantface, String & gt; ; & Gt; spreads the map) Then everything works fine, but I am still surprised and want to know why the basic method signature does not work. enummark & ​​lt; MyEnum, Strin

How to get internal resource pointer from a MySql result set in Php? -

Mysql_fetch_array transfers the internal resource indicator on a MySQL result set, but how do you achieve the current value of internal processing? gives the resource you can find. mysql_connect - Open connection to a MySQL server Return value Returns a MySQL link identifier on success, or on failure FALSE Unless I misunderstand ..

django - djapian based search returns no result -

I am trying to implement full text search based DJAPPION for searching user profiles in my DJ site. I basically follow these steps to create indexes: Modal profile has been updated to add the DJPI indexer. Run python manage.py index --rebuild to reconstruct the index. However, when I try to search using the profile pointer: Profile.indexer.search ("query") It does not give me any results, I have not received any error. Can anyone help me with it? I am a newbie w.r.t. Django + djapian Update 06/29/09 My index plan resides in definitions and follows: class profiles (models.model): User = Models.ForeignKey (user, exclusive = true, verbose_name = ('user')) name = model. About Kharefield ( ('name'), max_long = 50, empty = true, empty =) model = model Textfield ( ('about'), null = true, empty = true) organization = model.carfield ( ('organization'), max_length = 100, null = true, empty = true) location = Model.Carfild (_

Is it possible to wake up iPhone? -

I would like to know if it is possible for the iPhone to wake up from sleeping in programming? I have an NSTimer set to run the sound after a certain time, but I want to wake it up during the timer rings. Is this at all possible? Thanks! No, you can not do this right now.

c# - How do I tell when I need to write my own Interface and Wrapper for unit testing? -

I am still confused when I have to make cover and interface for my tests. As I read about MVC in a book, the author uses the Mac Framework. Then the author creates an IFormAuthentication interface first. There are a few ways to write and then a rappelling code that implements the actual code for these methods and methods (i.e. signout). Then he uses the interface in Moq. So I understand it, but if I'm wrong then correct me. He is doing this because he wants to make fake textures using the interface. Then in the MVC application they have taken this step that if the interface is zero then it will create a new cover class. That's why I'm guessing that when it actually uses the time cover to run, really the real methods are included so that the application will work as much as it should. So hopefully I got this right. Now he goes to the people with the membership and he says something like "Look how many ways I have to apply with an interface (I'm a

F#: is there no UI (like WPF) for it? -

I recently watched some videos on F #. It seems that it is used primarily for services or classes? Can not I see any "F # WPF" app in VS2010 beta? F # In fact there are some very good structures for creating event-driven UI applications, like calling Sets from property constructor like: New form (text = "my window title", width = 600, height = 400) , and more . However, creating a form designer in VS confirms a codedom for your language. Existing codedom architecture works great, as long as your language looks like absolutely C # or VB; It does not lend itself well to build the F # code (it's from a webcast or interview that I can not find right now) Partial classes are required for those who remember me correctly, beta 1 is not supported in the language. Instead of focusing on designer support in the first release, the F # team decided to spend their resources on increasing other parts of the language, such as asynchronous and parallel progr

html - Is there a way to make HTML5 video fullscreen? -

क्या HTML5 & lt; वीडियो & gt; टैग टैग का उपयोग करके एक वीडियो फ़ुलस्क्रीन चलाने का कोई तरीका है? / P> और अगर यह संभव नहीं है, क्या किसी को पता है कि इस फैसले का कोई कारण है? एचटीएमएल 5 एक वीडियो फुलस्क्रीन बनाने का कोई रास्ता नहीं देता है, लेकिन समानांतर requestFullScreen विधि प्रदान करता है जो कि मनमाने तत्वों ( & lt; वीडियो & gt; तत्वों सहित) को अनुमति देता है मूल उत्तर: (लेखन के समय: जून '0 9) से: उपयोगकर्ता एजेंटों को पूर्ण-स्क्रीन दिखाए जाने के लिए वीडियो सार्वजनिक API प्रदान नहीं करना चाहिए एक सावधानीपूर्वक तैयार की गई वीडियो फ़ाइल के साथ संयुक्त एक स्क्रिप्ट, उपयोगकर्ता को सिस्टम-मोडल डायलॉग को सोचने में छल सकता है, और उपयोगकर्ता को पासवर्ड के लिए संकेत मिलता है यहां "केवल" झुंझलाहट का खतरा भी है, जहां लिंक क्लिक किए जाते हैं या पन्नों नेविगेट किए गए पृष्ठों पर पूर्ण स्क्रीन वीडियो लॉन्च होते हैं। इसके बजाय, उपयोगकर्ता-एजेंट विशिष्ट इंटरफ़ेस सुविधाओं को आसानी से उपयोगकर्ता को पूर्ण-स्क्रीन प्लेबैक मोड प्राप्त करने की अनुमत

java - What are the advantages of chain-of-responsibility vs. lists of classes? -

Recently, I would like to refactor a huge (1000 lines) method filled with "if" statement with another programmer Was the best way . The code is written in Java, but I think this problem can be with other languages ​​such as C #. To solve this problem, he suggested using a series-Ledge pattern to propose a base "handler" class. After this, "Handler 1", "Handler 2", Etc. will extend "handler". Then, handlers would have a "recipient" method, which would either return to the tap (if it was the final series) or the next chain handler. Then, a "handlereequest (request)" function will either deal with the request, or give it to the next part of the series, and if none of the previous solutions will work, then it will only be empty or thrower An exception. To add a new handler to the series, the encoder will go to the last element of the series and tell it that there was a new element. To do something, he used to

ruby on rails - How should I handle model attribute that doesn't match request params? -

I have such a model ... receipt ------ - Amount: int # = & gt; But in these views I have these fields ... amount_dllter's amount_number / Pre> T work there. What is the standard way to deal with this situation? Where do you put the code that converts incoming values ​​to the amount of cents? Add attr_accessors to zodiac_dollar and use first_service callback to update amount_cents amount.