Posts

Showing posts from July, 2011

In python, sorting on date field, field may sometimes be null -

Coming to me in a real way to deal with this way. The data is back from reading the database I have. Although I want to sort on accoutingdate, sometimes it can be fake. I am currently working the following: result = sorted (result, key = operator.atmeter ('accountingdate'), reverse = true) But, because some details are empty, "this bomb with typeError: can not compare datetime.date for any type". What is the "most accurate" or "most powerful" way to handle this? It's definitely okay to use the key = function, you have to decide how do you want to treat any values ​​- a Select Date Time Values ​​that you want to be considered equivalent to none for sorting purposes. Eg: import routine brain = datetime.date (datetime.MINYEAR, 1, 1) def getaccountingdate (x): return x ['accountingdate'] or brain result = sort (result, key = Getaccountingdate, reverse = true) Just see how simple it is by defining a cmp function -...

rest - URL encoded route to Rails controller -

I have URL encoded resources such as: This is for A harsh webservice problem that uses user login in path is that the controller in the rail does not decode% 20 I get the following error: ActionController :: routing error ({: No route matched with method = & gt;: post} "/Joe%20Bloggs/index.xml"): What exactly am I trying to do 2 options Get one of (As my registration handler using authlogic): Either (preferably) users to register the user name with the spaces in them, and these are my controllers Has been properly received for. Authlogic default spaces & amp; @ /. Characters - which are ok with me if I can work it ... Or I can restrict authlogic so that the free space can be destroyed. I know that I can do this with: .merge_validates_format_of_login_field_options ... But I have given the correct syntax to provide a new sentence Not fully convinced Regex and the message to return to failure ... Any suggestions greatly appreciated! Usu...

iphone - Online MySQL database in Objective-C -

I am writing a game for the iPhone, and I want an online leaderboard using my SSL, which I I'm familiar. How do I apply this to my app? I think I need to get a frame / library? You should summarize from DB technology, wrap your MySQL db with a simple web service and Runs on a web server, you can use standard HTTP requests from your app to interact with your database. My suggestions (not the only way to do this in any way) ... Django (or some other simple web framework) to wrap your database model Use, you can ever make the Django code from your existing DB schema. / Li> Write a few basic ideas to modify your DB by using your basic POST calls and send username and score data in POST data Write a few simple pages, which will allow the data you want Returns an XML format that you can parse and display the app, but these are essentially just very simple web pages generated. You now have a publicly accessible leaderboard server, which your app can interface with, ...

css - Minimum height on vertically expandable div -

Is there a way to determine the minimum height for a single device, but is it still allowed to make it expandable? For example, I want a div to get an accurate height of 300px when my page loads. However, if more content has been added to the device with Javascript, then I want to extend it after that. If I specify the height and extends before the content div, then it adds the clip or the value of the scrollbar overflow. If I do not specify the height, it only spreads to the content. Thank you The solution given here is that to fix it 6, courtesy selector {min-height: 300px; Height: Auto! Important; Height: 300px; } CSS property minimum height does this. Note that it does not work properly in IE6, although IE considers the 6 code to be height as the low-height , so that you have height To be used, the property in a style sheet that is loaded by IE6 only.

Algorithm to find a number and its square in an array -

I have an array of integers, and I need an O algorithm to know that array Has a number and its square; A pair is enough. I tried to do it myself, but I only managed to find a solution in O (n 2 ). I thought of using counting sort, but memory usage is too big. Create an array twice the heap of the input array (2n) o (n) Copy all the numbers in - O (N) Copy sections of numbers in radix sort (we can do this because they are all intents) o (n) to see it once again After the other O (N) profits two numbers are the same! O (1)

Not able to Style my WPF Controls -

I'm getting mad here! What is missing me and why is not she styling anything: style x: key = "textbox type" targettype = "{x: type textbox}" & gt; & Lt; Style.Triggers & gt; & Lt; Trigger Property = "IFococled" Value = "True" & gt; & Lt; Setter property = "background" value = "red" /> & Lt; / Catalyst & gt; & Lt; /Style.Triggers> & Lt; / Style & gt; & Lt; Width of text box = "100" style = "{static resource text box style}" height = "20" background = "yellow" & gt; & Lt; / Textbox & gt; The above code does not do anything. This text box does not reveal control! This is because local values ​​override style values. (The properties set directly on an element are of very high priority.) You are setting the background directly on the text box, so going WPF, "OK, it would generally like that the text box ...

Zend Framework - adding a custom field to the session handler? -

Hey all I am using the Zend_SessionHeadler_DbTable session handler and I was curious if someone knows how to add a custom area to the best that the table in which he stores the session data? For example, I want to be able to log the person's username in the session table. Anyone know what is possible with Zend_Session_SaveHandler_DbTable? Now my set up code is $ config = array ('name' = & gt; 'session', 'primary' = & gt; 'id', 'Modified column' = & gt; 'Modified', 'Data columns' = & gt; 'data', 'lifetime column' = & gt; 'lifetime' ); Zend_Session :: setSaveHandler (New Zend_Session_SaveHandler_DbTable ($ config)); Zend_Session :: start (); I think this is possible, I'm searching for the same thing, but if you see that I do not have anything I can see, I think the way to do this is to create another table, as a session ID, in a column and in any other column

mathematical optimization - Genetic algorithms -

I am trying to implement a genetic algorithm which will calculate the minimum and I'm having some problems. I need to represent chromosome as a binary string and as can be explained in the list of numbers, as in the function of Rostridge there is a list of numbers in the form of a parameter? In addition, the rostridge wants the elements present in the list-5.12 & lt; = X (i) & lt; = 5.12 What happens when I generate chromosomes then it will not generate numbers in that interval Looking to implement a genetic algorithm, your implementation should be such that it works for any common minimum (or maximum) problem, and not only the Rastrigin function gives you a binary coded GA Or decide to implement a real coded GA . Both have their own uses and niche applications but for you, I would suggest implementing a real coded GA. According to your question, what to do if the generated variable values ​​are out of value [-5.12: 5.12], then a real coded GA and binary coded ...

regex: negative lookbehind in negation character class? (.NET flavour) -

What I'm trying to do: is a specific, unexpected character ( \ escape) Input: [\ [x \]] \] \ [[\] [y]] output when looking for bracket around y: around X [\ [x \]] \ [\ [y]] output: \ [x \] \] \ [[\ [y] \ in search of bracket \ ]] In short, remove only the set of brackets around the specific character. I tried it (for): Regex.Replace (Input, @ "(? & Lt;! \\) \ [(*. (? , but this is not the last ] unchanged (before X). I thought I could change . [ and ] to exclude Wildcard with a negative character for class, but I need to reject them Unscacked of these editions, and when I I try to include a negative attitude such as (? & Lt;! \\) edit: To clarify To explain the content, The divided square brackets can be anything (except another unchanging class bracket), as long as they contain unsecured characters of interest ( y . All contents of the bracket should be. Lookbehind wrong for this job Pakrn instead try it: Regex r = new R...

django - How to make Admin link associated with imagefield display imagefield -

I'm hoping to use an image in one of my Django models, and therefore created a very simple model My settings file was adjusted, Image field was uploaded by adding image from within the Admin app. Unfortunately, the admin link does not provide the image associated with the image area in the app, irrespective of what I'm trying to use for MEDIA_URL, what am I missing? I am using the Jaguago 1.1 with the development server. PIL has just established it properly. I wish to store my image in / users / judy / sites / images / testphoto I define the field when using upload_to = 'testphoto' I use the following settings: MEDIA_ROOT = '/ Users / judy / sites / images /' MEDIA_URL = ??????? - I have tried quite a difference !!!!!!!!! Read ADMIN_MEDIA_PREFIX = '/ media /' .

Formating XML in Emacs -

I have a large XML file in which I am pasting it in an amax to copy and edit. It's all in one line, so I'd like to have a tool to create an XML element per line. Is there an amax function that I can use? I think I will also arrange for a command line tool that integrates well with Imphix, but it is not ideal. I've used XML for several years to reformat you want in that package That specific order is xml-reformat-tags Hope that helps!

jquery - Best option for sortable/draggable layout selector? -

Image
For my current project, I need to create a layout selector where some elements can be dragged by the user and This fake can be changed again: Now Until, I use the JQuery UI and Sortable to make a similar copy, although I'm currently only staying at the first level of control, where the vertical fibers Can be changed again elements. I understand what is the best way to handle nested horizontal elements (content / sidebar sections). Ideally, I need that each section (headers, body, footer, etc.) but also the alignment of the sections (the content on the left, right side of the sidebar and vice versa). You might see a powerful layout editor.

php - Why did the creator of prado create Yii? -

I wonder why the creator of Preera called a new framework Yii? Is the right way to go? Is Yii also component based? There is a reconstruction and reformat version of Yii Prado. Prado was slow and it was difficult to use its architect widely. Yii was made with all those things. The Yii component is also basic.

Java JTable restructure / reload / refresh -

I have a tree and a table, when I click on the tree node, the time the table will change on the same, but It is not. I search online and read Java tutorials and I do not find any solutions. From some posts I think I need to use fireTableStruetureChanged () , but it does not work in my code Can anyone help me with this? The following code is thanks a ton! Change the table structure of the public category increases the geometric tool ... {..... // // column name is a public variable, because I'll have to change the column later column name = new string [] {"Col1", "col2"}; * / Data = new string [] [] {{"Mary", "champion"}, {"alison", "attack"},}; Table = new JTable (new MyTableModel ()); Table.setAutoCreateColumnsFromModel (wrong); Feedback = new JScrollPane (table); // is the response panel below ... } // Following is the square problem, I need to reload the table i when class , But the table is not changed in ...

Jquery hover not fast enough -

When I leave the selector, I run very fast, then it will not be disposed: $ ("# items"). Hover (function {$ (this) .addClass ("hover");} function () {$ (this) .removeClass ("hover");}); I was unable to reproduce it. It's written in this page in Firebug: $ ("p"). Hover (function {$ (this) .html ('a')}, function () {$ (this) .html ('b')}); Always works, though I really move fast forward. Perhaps this is because you forgot the comma before the second function in your code? Which Browser Do You Use?

assembly - GCC Extended ASM syntax: load 128-bit memory location as source -

GCC generates the following code for this shuffle: Ideally this should be: pshufb xmm4, xmmvs ptr [rip + x + 0x125] What is the expanded ASM syntax to generate this single instruction? Many thanks, Adam PS: Internal for this comment generates optimal code for this example. It does not work normally (there is a possibility of generating unnecessary registers copies in the presence of GCC Global Registration variables). #include & lt; Stdint.h & gt; Typedef int8_t xmm_t __attribute__ ((vector_size (16))); Constxmm_t xmm_shuf = {128, 0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15}; Register xmm_t xmm __asm ​​__ ("xmm4"); #define NTL ".intel_syntax noprefix \ n" #define ATT ".att_syntax \ n" void shuffle () {// xmm = __Biltin_II 32_PHSW 128 (xmm, xmm_shuf); __asm ​​__ (NTL "pshufb% 0,% 1 \ n" ATT: "= x" (xmm): "x" (xmm_shuf)); } Int main () {} $ gcc-os -std = gnu99 -msse4.4 -flax-vector-conversions ...

Jquery form submit with PHP -

I thought that a simple form would submit a problem with Jquery, but I'm running into problems. I have a form, # listing_step_1, in which the user selects a category from the first dropdown. When a category is selected, the user clicks on "Next", the subcategory dropdown appears. When both a category and subcategory are selected, clicking on the next will take them to step 2 using a redirect. Upon submission, the form is reloading the same page using $ _SERVER ['PHP_SELF']. I want to resubmit the form automatically so that subcategories do not need to be revealed by clicking on next. I'm trying to do this on a change event on the use of jQuery, but the following code does not work. $ ('# item_category'). Change (function () {$ ('# listing_step_1'). Submit ();}); I appreciate any help with it because I'm new to presenting using jQuery and AJAX. Manually, it's working fine - that is, by pressing the page button and refreshin...

Looking for a django app for running my blog -

I am looking for a projection blog application to run my blog. I have the following options available Desego-Basic-Blog Byte Flow Recommendation can share. My basic needs are: - Easy to customize - After the original blog capabilities Recommended.

Flex DataGrid - How we get object of Custom Control from a cell -

There is a quick question about getting value from my control, which I added to my data grid via item render And how do I get it when I click on the cell in that column? You can access it & lt; Mx: DataGrid id = "fileGrid" click = "onclick" data provider = "{grpCollection}" width = "100%" height = "100%" & gt; & Lt; Mx: column & gt; & Lt; Mx: Data Grid column datafield = "label text" header text = "" visible = "{read only}" width = "100" & gt; & Lt; Mx: itemRenderer & gt; & Lt; Mx: component & gt; & Lt; Giver: LinkRendererWithEvent /> & Lt; / Mx: Component & gt; & Lt; / Mx: itemRenderer & gt; & Lt; / Mx: DataGridColumn & gt; & Lt; / Mx: column & gt; & Lt; / Mx: data grid & gt; Private Function onClick (Event: MouseEvent): Zero {if (event.target LinkRenderer is WitEvent) {var linkRenderer: LinkRendere...

creating a Mac OSX installer so the installed app won't set off the firewall -

I am currently delivering an .app file to the people in my organization. I drag it into the form of authentication in the form of authentication, but every time users launch the program, they get a firewall alert (checking the app for the launch update - is very important for us). Because users are not administrators, they can not prove to remove messages. Will an MPKG-installed application fire the firewall in such a way that the end users will need an administrator to allow updates? Is there a post-install script that I can add to my app to configure the firewall? The ultimate goal for me is that the administrator has authenticated the installer to run. After the installation, the administrator will log out, the normal user will log in and run the application without any firewall warning. Edit: I should mention that the minimum version is 10.5 in the organization, but that's fine if the solution has worked on Tiger too. If you sign the app to the app, even if it's ...

windows - Virtual Size and GlobalMemoryStatusEx -

मेरा सिस्टम Windows XP है TaskManager में प्रदर्शित वर्चुअल आकार MEMORYSTATUSEX.ullAvailVirtual के साथ GlobalMemoryStatusEx से मिला है। जब मैं बहुत सारे बफ़र्स बनाता हूं और मेमोरी उपयोग करना है, MEMORYSTATUSEX.ullAvailVirtual आभासी आकार के उपयोग को अच्छी तरह से प्रतिबिंबित कर सकता है। यह वही है। लेकिन जब मैं स्मृति को हटाता हूं, तो कार्य प्रबंधक में वर्चुअल आकार कम हो जाता है, लेकिन मेमोरिस्टैटयूएसएक्स.उलवेलवर्चुअल अभी भी बहुत छोटा है। मुझे नहीं पता क्यों .... मैं पूरी तरह से भ्रमित हूँ। आप सकते स्मृति विखंडन से पीड़ित हो सकता है (यदि आप प्रत्येक बड़े आवंटन के बीच कुछ बाइट्स लीए हैं, तो यह प्रभावी रूप से आपके आवेदन के आभासी बाइट को मजबूर करता है)। आपको ख़ुद के खिलाफ आंकड़े की तुलना में अधिक विश्वसनीय साबित हो सकता है - मैं हमेशा काउंटर अतीत में इस्तेमाल किया गया था निजी बाइट्स (स्मृति वास्तव में आवंटित) और वर्चुअल बाइट्स (स्मृति पता स्थान आवंटित) - अगर उन दो काउंटर अलग हो जाते हैं, तो आपके पास स्मृति विखंडन समस्या है, जो मेमोरी रिसाव का नतीजा होगा। टास्क मैनेजर में म...

android media player playing trailers -

I want to play the trailer using the following code but it is not working to throw the following error Command PLAYER_INIT An error or information PVMFFailure 02-02 13:40: 33.696: Error / Media Player (805): Error (1, -1) 02-02 13: 40: 33.706: Error / Media Player (805): Error (1, -1) trailer link = throws private ultimate zero plater (string URL) IOException, invalid argument exception {MediaPlayer mp = New Me DiaPlayer (); Logs. V (tag, "trailer:" + url); Mp.setDataSource (url); Mp.setOnPreparedListener (this); Mp.prepareAsync (); } Posted on Public Zero (Media Player MP) {mp.start (); }

asp.net mvc - validations on html.dropdownlist in MVC? -

How do I verify on Html.Dropdownlist in my MVC application, please tell me what will happen I do this. Thanks Ritz You can see stupid dinner, the way to add legalization Tutorial to know. Thanks

php - .htaccess deny access to specific files? more than one -

I am able to disable access to a file with .htaccess, but I do not know how to reject multiple files They are .php so that I can not disable a file type (i.e. only tutorial is called online ..) & lt; Files ...? & Lt; / Files & gt; Or something like "home.php, file.php, test.php" How do I deny permission to access all three files with that tag? Or similar, please help! If you want to exclude files based on regular expressions, instead of filesMatch files, like : & lt; FilesMatch ^ ((home | test | file) .php $ | mysecretfolder | asecretpicture \ .jpe? G) $ & gt; ... & lt; / File match & gt;

python - Hide filter items that produce zero results in django-filter -

I have an issue with the Dzegoo-Filters app: Zero results will hide the items that arise. I think that There is a simple way to do this, but how does the idak happen. I am using LinkWidget on a ModelChoiceFilter, such as: provider = django_filters ModelChoiceFilter (queryset = Provider.objects.all ()), widget = django_filters. Widgets.LinkWidget What I need to do is filter the query and select only the provider that will produce at least one result, and exclude others. Is there a way to do this? Actually, you need to apply a filter, and then apply it again, but new Something similar to the generated query: f = someFilter (request.GET) f = someFilter (request.GET, queryset = f.qs) Now that you have the right query set, you can dynamically override providers in init : def __init __ (auto, ** kw): Super (some filters, self) .__ init __ (** kw) self.filters ['provider']. Extra ['queryset'] = Provider Objects.filter (foo__in = self.queryset) Not...

visual c++ - What is the difference between a COM DLL and a VC++ MFC DLL? -

When we say that a DLL is a COM DL and when we say that DLL is vc ++ - MFC DLL? What is the difference between them? A COM DLL one or more COM For more information on COM DLL, please highlight

entity framework - MSDTC Configuration Automation -

We are developing a large-scale business application using the latest technologies through NAT 3.5 and we are looking at our architecture Are using EF as DataAccessless. In addition to transaction management, which automatically uses System.Transaction and MSTC, we need to deploy this application by the method of ClickOn for more than 300 over-users in each client's organizations, although we do this by ourselves or You may not be able to enable end-users to train Android. Transaction to support the system, in fact it is impossible for at least 200-300 users to 500 or 600, so we automatically configure these clients to configure the MSDTC engine and automate the clickon deployment, setup package and Solution is needed to provide the solution. Is there a way to do this, or do others like MSDTC configuration on the client automatically by manually editing the registry, PowerShell script, or similar? Any help or solutions will be grateful.

visual studio - Embed VSTS unit tests in standalone application -

The visual studio has so-called 'test views' that provides an overview of all the unit tests within the current solution / project. . I am surprised that it is possible to embed this view in a standalone application. The idea is a standalone application that lets you run a special integration test on a staging system. Any thoughts? This view is part of Visual Studio even if you want to ask It is unlikely to be legal because it is part of a licensed product. For such scenarios, you would be better off with an open source unit test framework, or where reuse is very much open.

ASP.NET MVC model bind ID mismatch -

I have a view in MVC 2 where I edit the page "Page" has a name, title and content. Content is editable content, which has width, CSS class and columns. The column is a list. When I do this in the scene: m.Name)%> This produces the following HTML: & lt; Input type = "text" value = "about page" name = "name" id = "name" & gt; And when I edit the action in ContentController: /// & lt; Summary & gt; /// Importing the specified forms /// & lt; / Summary & gt; /// & lt; Param name = "item" & gt; Content page & Lt; / Param & gt; /// & lt; Returns & gt; As a result for action & lt; / Returns & gt; [Http post] Edit Public Action Result (page item) {if (ModelState.IsValid) {} ​​Return View (item); } This name can not divide the property to the property. By looking at the values ​​in the request. Form, I see the name parameter. If I present the text box...

How to add a custom loglevel to Python's logging facility -

I have to TRACE (5) to loglevel for my application because I do not think that debug Enough is log (5, msg) is not what I need to do is how can I add a custom loglevel to a Python logger? I have a mylogger.py with the following content: import logging @ property def log (obz): myLogger = logging GetLogger (obj .__ class __.__ name__) return myLogger In my code I use it in the following way: class ExampleClass (object) ): Mylogger import log def __init __ (self): '' constructor with logger '' self.log.debug ("init run") Now I self I would like to call .log.trace ("foo bar") Thank you in advance for your help. edit (December 8, 2016): I have changed the accepted answer, an excellent solution based on a very good resolution from IMHO, Eric S. Eric S.'s answer is excellent, but I have learned from experiment that it will always be the reason for logging messages. New debug level is to be printed - despite being set...

android video, hear sound but no video -

I have tried many different instances but no video can be found to show me. I heard the voice but no video I thought I was just a wrong video format, so I downloaded a fat professional in 3GP format and was still not happy. I am using Eclips Java EE with Android SDK and my app targets 1.5 SDK (API Level 3) without Google SDK. Does anyone have posted a link to a video to play in Android or can tell me my problem with the code. / ** is called when activity is created previously * / @ Override Crate on Public Zero (Bundle Saved Instantstate) {Super. InstanceState); This.setContentView (R.layout.video_test); SurfaceView v = (SurfaceView) findViewById (R.id.surface_video); Surface holder = v.getHolder (); // Set Transparency //Vundo () .setformat (pixelformat.exe); // set a size for the video screen // holder. AddClallback this); Holder.setFixedSize (400300); Media Player MP = Media PlayerCredit (this, R.O.O.Fiet); Mp.setDisplay (holder); //mp.setAudioStreamType (2); Try {//mp.prep...

c++ - Opaque object for template in another namespace -

I know how to do an opaque object in C ++ as the following: // my_class HPP class opaque_object; Square my_class {my_class (); ~ My_class (); Opaque_object * m_opaque_object; }; // my_class.cpp # include & lt; My_class.hpp & gt; Class opaque_object {// ...}; My_class :: my_class () {m_opaque_object = new opaque_object (); } My_class :: ~ my_class () {delete m_opaque_object; } How to do this now when the opaque object is an existing class template in a different namespace, without this the header file of this one is included. The following code is not good, it is just to clarify my problem. // my_class.hpp class third :: party :: library :: opaque_object & lt; Third :: Party :: Library :: templated_class> Square my_class {my_class (); ~ My_class (); Third :: Party :: Library :: opaque_object & LT; Third :: Party :: Library :: templated_class & gt; * M_opaque_object; }; // my_class.cpp # include & lt; My_class.hpp & gt; # Include & lt; Thir...

Eclipse project export and CVS settings -

I exported nearly 100 projects from one machine to another in Eclipse I try to drag all the data from CVS through VPN Instead of having saved some time. The problem is, when I exported the project to Eclipse, it did not preserve every project CVS information. Is there any way to update all these projects to CVS information? Your CVS location, protocol and user are being estimated to be the same and any file changes Can not open, you can open all the CV folders and open them in a new place in your places.

python - Suggested GA operators for a TSP problem? -

I am creating a genetic algorithm to deal with travel vendor problems. Unfortunately, I influence those peaks which can be used to get out of them for thousands of generations and keep them before achieving better results. In this case, generally crossover and mutation operators are doing good? ordered ordered mutation and cross-over). Generally invalid solutions will result from standard mutation and cross-oppor operation (i.e. duplicate and / or missing cities in any route). There was a recent one. Interested in comparison to the performance of your implementation.

delphi - My Application's Auto-update utility is triggering Anti-Virus -

I have created an auto updating app that is distributed to 100 users. Auto-updating is being flagged by 55% of the antivirus to Vicious (). My application was made in Delphi 7. Most flags are saying that this is a common Trojan / malware, obviously this software is' malware actually (I'm using only one source code and accesses the server that hosts it), but it Creating a lot of users Do anyone have any idea how I can stop this flagged incorrectly? If you have said, the empty form application is rated as a virus, then you More information about this may be infected by the Delphi virus very well ... Thing:

Java File parsing toolkit design, quick file encoding sanity check -

(Disclaimer: I've seen many posts here before asking, I found it particularly useful, I only have one Hi all, I have an internal Java product that I have created to load the data files in the database (aka A et al. Equipment). I have XSLT changes For the pre-rolled phase, and working as a paradigm within the original file. Can be format, they can be flat data files or XML data files, you specifically configure the steps to load datafeed. I have not yet noticed the issue of the file I have been encoding (a mistake I know), because all were working fine (in the main) However, I am now coming against file encoding issues, to reduce a long story, the way the A Can be configured with, due to the nature of, I have to find the file encoding of the input file and create a Java Reader object. I want to do a quick discretion with people before plunge into just a few people I can not claim to fully understand: Adopt standard file encoding of UTF-16 Use input file encoding or to...

.net - How to get the origin IP of a netTcpBinding call in WCF? -

Is the method called binding-level information accessible to the original IP address? You should be able to use this snippet: (RemoteEndpointMessageProperty) OperationContext.Current.IncomingMessageProperties [RemoteEndpointMessageProperty.name address;

ajax - POST to server, receive PDF, deliver to user w/ jQuery -

I have a link that the user clicks to get PDF. In jQuery, I create a post Ajax call on the server to get PDFs. PDF comes with the right content header, etc., which usually causes the browser to open the reader plugin, or allows the user to save the PDF. Since I am getting a PDF W / AJAX call, I am not sure what to do with the data that I get in onsite callback. How can I give data to the browser and allow it to do its default thing with PDF feedback? itemprop = "text"> You do not need jQuery at all. Simply submit your mail via a form normally, and on the server side, add an HTTP header content-dispute: attachment; The browser will do its default thing. Alternatively, if you want to be careful about the notification of any mistake that the PDF generation, you can do so to post your parameters on your server with JQuery. On the server, generate binary content and cache it somewhere for a few minutes, which you have inserted into the user's session, and...

sql server 2005 - TSQL: Datetime overlapping and interval values -

Need help creating a query for this. get started. End 2009-01-01 06:00:00 | 2009-01-01 14:00:00 2009-01-01 06:00:00 | 2009-01-02 06:00:00 2009-01-02 07:00:00 | 2009-01-02 08:00:00 2009-01-03 06:00:00 | 2009-01-03 14:00:00 2009-01-03 09: 00: 00 2009-01-03 11:00:00 2009-01-04 22: 00:00 | 2009-01-05 06:00:00 2009-01-05 01:00:00 | 2009-01-05 10:00:00 I want to get un-overlap time for the interval ( 2009-01-01 00:00:00 - 2009-01-31 00:00:00 ) with Yoga for each day: Date | Duration 2009-01-01 | 18 2009-01-02 | 7 2009-01-03 | 8 2009-01-04 | 2 2009-01-05 | itemprop = "text"> Try it: with in the form of times (select the interval (interval) for the interval from time to select the unius all ([end]) as the interval of time, Times (select date time, date, date, 0, time)) as times (times in the form of Times) (select time from time to time all time select time) Times 3 Select ROW_NUMBER () timely (according to time), ta Times 2 times from Ms), Times 4 AS (S...

sIFR and jQuery: dynamically replacing text -

I have a problem. I want to update a counter (seen by the user as it appears in a specific device ) When a button is pressed, it is when the button is pressed: $ ("# photo-counter span") empty (). Append ((start_index + 1) + "-" + (end_index + 1) + "/" + Files.length); SIFR. Rayleigh (netto, {selector: "# photo-counter span"}); The first time it runs automatically and everything works well, but when I click the button div sIFR . Can anyone help? You can actually do this: sIFR.replacements ["# Photo-counter span"] [0] .replaceText ((start_index + 1) + "-" + (end_index + 1) + "/" + files.length); HTML does not need to be updated, SIFR takes care of it for you.

interface - Java Pass Method as Parameter -

I'm exploring a way to pass the method by reference. I understand that Java does not pass methods in the form of parameters, however, I want to get an option I have been told that there are options to overcome the methods of interface parameters, But I do not know how an interface can work as a reference by reference. If I understand correctly, then an interface is only a summary of methods that are not defined. I need to define an interface every time because many different methods do not want to send the same parameters as well as the method can say What is my goal to do this? Something similar for public zero setAllComponents (component [] myComponentArray, method MyMethod) {For (Component Leaf: myComponentArray) {(Container instanceof Leaf) If {// recursive call}, Container container node = (Container) leaf; SetAllComponents (node.getComponents (), myMethod); } // end if node myMethod (leaf); } // looping through end components} apply as: setAllComponents (this...

I want to port my delicious bookmarks to my website -

I have started preparing an app that will automatically download my delicious bookmarks, and save a database , So that they can see my favorite format in my own website. I have a Yahoo ID to log in to ownership, because I have been forced to use the author. The problem is that I'm stuck at that point where the user needs to go and manually authenticate the Auto. Is there a code / direction available, wherever I can follow? I want all that is a way to save my bookmarks in my database. Any help is appreciated. I java. Can work on Net and PHP Thank you. Delicious it already provides an API: returns all the posts, please use with caution logic & amp; Tag = {TAG} Call the update function to see the filter (optional). By this tag & amp; Amp; Start = {#} (optional). & amp; Result = {#} (Optional) Return this many results. & amp; (Optional) Filter for posts on this date or later / Li> & amp; Todt = {CCYY-MM-DDThh: m...

android - TakeKeyEvents not working effectively (no focus window error) -

My activity comes into play at the screen off. I either take advantage of it or lose focus. I have no indication that this focus has been lost, however, I see that major events come to the floor, and the window manager's report in the log - there is no focus window, leave: key events (all the key details that contained the key ) It is only occasionally, so it is making me difficult to solve a cause. Because this is an event that we sleep after indefinitely, I do not want to partial wallock. Most of the time, everything works correctly. After the failed key incident, my activity starts again and then the screen is on the broadcast, and we are just awake on the activity that is not usually sitting on the screen because the main event floor Fell on I am trying to understand why it happens, but whenever I use the takeaway events (truthful), which claims that it will help your activity to achieve your events. Even then there is no visualization with focus. I tried to start the...

C++ containers behavior -

My question is simple when I use STL containers, do they copy the value that I have there Do you archive (using copy constructor) or not? What if I give them the alphabet (character *) instead of the letter? How do they behave? What is the guarantee that the information will be stored in the system stack instead of a heap? Thanks for the reply. Values ​​are stored in STL containers. If you have a vector like this: class BigObject {...}; Of vector & lt; BigObject & gt; MyObjs; MyObjs.push_back (obj1); MyObjs.push_back (obj2); ... The vector will make a copy of the object that is pushing in you. Apart from this, in the case of a vector, it can make new copies later when it is the underlying memory, so keep in mind. The same thing is true when you have an indicator such as vector & lt; Char * & gt; - But the difference is that the value of the copied value is, the string does not indicate it. So if you have: vector & lt; Char * & gt; MyStrin...

browser - HTML Control in Windows Mobile 6.1 Professional -

I have an application that hosts webbrowser controls; It runs fine on WM5 and WM6 on my WM6.1 Professional device, I do not think I am able to control HTML elements with CSS. Page 6.1 protocol provided in IMEobile does not treat similarly on device control. On WM6 and 5, things are fine. Any suggestions? I have learned a lot from reading this thread. For me, I added the line HI_RES_AWARE CEUX {1} in my RC file. So now my control runs in "high resolution", and I can scale down the text scale where I need it crazy

php - htaccess mod_rewrite -

I'm trying to do something with it, whenever I go to a page: http://www.example.com/character.php?id=3 I want to overwrite it: http://www.example.com/character/Jim_Carrey Which is the line of the curriculum, id character .. . For such an example ... I have tried to work with it, but I could not get much of the HTACK production Yes, because I .htaccess is the truth. This is actually another way: On the website, you write to all your links the way you want to see it. For example http://www.site.com/character/Jim_Carrey In your database, you add fields, usually "slug" Or "post_slog" which indicates "part of UML" Gimarera. This is a primary element, which will be very much in the way of the primary key. So make sure that you have a function that takes care of creating a slug based on a given string string (for example the title of the post) and make sure there is no duplicate. Then you do something like this in you...

security - SQL Server 2008 Database (How to lock it from copying and attach it in another machine) -

I have data with databases that I do not want to copy. Now, how can I get access to other users in the local machine, but whenever I want to work with, I have permission. And another issue I'm wondering, how can I lock the DB so that someone can copy the .mdb file and then try to attach it to another machine He can not see anything? Many different types of encryption options are available in SQL Server. If you do not want to rewrite your application, the new feature in SQL Server 2008 has been named Transparent Data Encryption (TDE) . This means that you can encrypt the data files so that unauthorized users can obtain data from a backup or copy data files. This should be enough to get you started.

Windows Mobile app copy file to desktop? -

Is it possible to write a WinMo app that copies the file from the device to the attached desktop? I know that Wrappy works from desktop to mobile, but I would like to turn around it if I can. was a download CERApi that has a managed cover around RAPI call, it was turned on, this Here's an example of how to use it Unfortunately WinToolZone can not get CERAPi, I'm still searching for DLL as download ... I get the download link Once again I will revise this answer again Hope it helps, Best regards, Tom.

java - JComponent: How can it resist smallification? -

I have a custom JComponent that paints some stuff when called paint Limit layout, however, this minimum size is not being respected I have included it @ Override public dimension getMinimumSize ( } {System.out.println ("asking for minimum size"); Return MINIMUM_SIZE; } And it is never called, I have also tried to set the minimum size on the container that holds it, and on Jeffram it assumes that I have some limitations here Can i keep I do not think that borderlayout minimum size respect; It shapes things to fit the container, you should try the other layout (probably BoxLayout ).

regex - C#: What should the regular expression be for this? -

I know there are so many analysts, but they spend a lot and like, I try to write my own I am doing I'm new to regular expressions so to remove text for placeholders A, B, C and D, the regular expression should be in C #? A :: = B {C1D, C2D2, C3D3} Where A, C and D are not valid The word can contain any combination of the following AZ az 0-9 _ and any type of ASN.1 like "sequence" , "Sequence", "options", "UTF8String", etc. A complete list can be found in the "Universal Class Tags" table. What do you mean that you want to build complete with a Reggae? It is a bad idea to be useful as the component of the Regexes parser, but it is best to keep your role minimal, attempts to match large amounts of text, especially recursive or looping structures. Do not C # Reggae is able to handle such things in many cases in such a way, but not all - and that too is beyond the beginning level. I recommend that...

ruby on rails - how to create scaffolding for model that is already in place -

I already have a model. I just want some admin screen designed for this, which is the add / edit / update Delete / delete functionality. My model name is user and it has user_id, first_name, last_name, user_status, created_atam, updated, has been updated, Its code on this model> script / generate so that crude functionality will come in its own way and then I can look like this other application I do not know if it makes a difference , But in the user model via related to another table I believe you can use it for

web applications - How to get user region/country information in web-applicaiton? -

My main purpose is to show a different page for different country people. I think this user area / country Should be based on, which I think can get out of the IP address? Example: * For people of N nation, they will see it. Www.example.com * For the Japanese, they will dispatch on this. Www.example.com/jp In addition to this I told some people to fulfill these objectives, the best method is based on the web-browser language, which can be obtained from the http header is. I do not know which is better, what is the common way and why ..? Thank you for your advice! I'am is using Flex and Java. To easily find area / country / province from zolo, IP address, you can get some of the maximum GIOP database , But there are some drawbacks: VPN and cache may get false value Users can not override it easily. With browser acceptability: Headers are generally preferred because a Spanish speaking person in America can set their language settings to 'N' instea...

Is there any free tool for creating database (mysql preferred) tables from existing html forms automatically? -

I have found front end designers to write lots of HTML forms for me to create databases from databases automatically from existing HTML forms Have a Free Tool (Miskul Likes) for? The table names and datatype form will be generated based on the names and types of elements. This will be quite difficult with traditional relational database such as MySQL, where you can insert and manipulate data Before having the situation, you have to define the schema for your database. Schema has to define all column names, as well as their datatype. All this is very hard to auto generate from an HTML form.

javascript - html menu lists -

सभी, & lt; html & gt; & Lt; ul class = "menu" & gt; & Lt; li & gt; & Lt; a href = "" & gt; हैडर & lt; / a & gt; & Lt; ul class = "submenu" & gt; & Lt; li & gt; & lt; आईएमजी src = "" / & gt; लिंक 1 & lt; / li & gt; & Lt; li & gt; & lt; आईएमजी src = "" / & gt; लिंक 2 & lt; / li & gt; & Lt; / ul & gt; & Lt; / li & gt; & Lt; / ul & gt; & Lt; / html & gt; क्या कोड बदला जा सकता है, जैसे कि link1 और link2 माउस पर दिखाई देगा .... सीएसएस या जे एस के साथ? यहां सीएसएस के साथ: & lt; html & gt; & Lt; शीर्ष & gt; & Lt; शैली प्रकार = "टेक्स्ट / सीएसएस" & gt; Li: हॉवर & gt; उल {प्रदर्शन: ब्लॉक; } .submenu {display: none; } & Lt; / style & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; ul class = "menu" & gt; & Lt; li & gt...

In Haskell, is there a built-in function that creates a list of one element? -

एक अंतर्निहित कार्य की तलाश कर रहा है जो निम्न कार्य करेगा: mklist x = [X] लाभ यह है कि मैं इसे एक तत्व की एक सूची बनाने के लिए संरचना में उपयोग कर सकता हूं। समझें कि (दोहराने 1) उपलब्ध है, लेकिन क्या कोई और अधिक प्रत्यक्ष कार्य है? इस तरह की परिस्थितियों में उपयोगी होगा: ["ऐलिस", "बॉब", "चार्ली"]> gt; & gt; = mklist ("नमस्कार" ++) मोनादिक: वापसी x या: (: []) x यह कम वर्ण है, लेकिन अधिक शिफ्ट-कुंजी उपयोग, इसलिए टाइप करना कठिन हो सकता है।

windows - How to break someone into testing? -

But how to ensure quality? We need a tester! How can I get somebody fresh from the street in the trial? We are a small team: 2 architects (as buildings, not software, they are domain experts here) what to create This building me And a new boy, before we do some tests, we press on Relations None of us There is no clue about how to do this profession so far: A bunch of virtual machines spread over the configuration we windows Different versions Want to test German and English The host software we are writing for (Autodesk Revit Architecture 2010, we are making a plugin for energy calculation) A bug tracking system that the tester finds can add all the bugs I hope we will need a test script but how? Who? what? when? Why are you looking for "out of the road"? For me, it seems like asking, "I want to rent a new programmer, how do I get someone out of the road and get them into my programming programming speed?". Why do you w...

c# - Convert all video format to 3gp and mpeg4 video format? -

Due to this issue I am stuck in my application right now Anyone out of this helps. Want source code to secret all video formats in 3gp and mpeg4 format I have developed this app on the asap. Used as Backend Language using C # as Net. There is a command line binary for both UNIX / Linux and Windows, and standard devices for video conversion is. To get started, check for 3GP conversion related. Check how to integrate ffmpeg with C #.

spring - Using Camel 2.1 with Grails 1.2.1 - Classloading problem -

I am trying to define a camel reference in my Grails application. resource.groovy: xmlns camel: 'http://camel.apache.org/schema/spring' camel {camelContext ( ID: 'camelContext') {}} results in a stacketrace: 2010-02-03 13: 24: 42,209 [main] Error spring.GrailsRuntimeConfigurator - [RuntimeConfiguration] resources.groovy org.codehaus.groovy.runtime.InvokerInvocationException: Unable to load bean: java.lang.NoClassDefFoundError: org / Apache / Camel / SPI / ManagementStrategy The strange thing is that ManagementStrategy is in lib / camel-core-2.1.0.jar. I am neither familiar with spring nor camel, so any suggestions are welcome, can this be a classloader issue? Release Notes for Apache Camel 2.1 with new .jar dependencies A section is a commons-manager on the classpath. Requires jer.

How do I remove 'index.php' from URL in CodeIgniter? -

How can I remove index.php from my code in CodeIgniter? I deleted index.php from my configuration file, and I have run my rewrite_module in Apache (2.2.11) and my file is: Revive Engines on Rewrite $ 1! ^ (Index.php | picture | cappa | css | js | robots \ .txt) revival ^ ^. (. *) $ / Index.ftp / 19 [l] Now, Whenever I click a link, it indicates that the URL is not found. What's the problem Try it in your file: Comments should help you get it ... This works perfectly for me in many CodeIgniter website installations. Also, if mod_rewrite is not installed, it will send you to 404 page (or you can change it for your purpose). & lt; Ifmodule mod_rewrite.c & gt; RewriteEngine OnRewriteBase / # 'System' can be changed if you have rename your system folder RewriteCond% {REQUEST_URI} ^ System * Rewrite ^ (. *) $ Index.php / $ 1 [L] # To check that the user is trying to access a valid file, #such as an image or CSS document, if this is not true Con...

Java implementation of stochastic indicator for finance -

Hi, I am looking for an API / library that can implement the financial stochastic technology Offers Analysis Does anyone know a ready-to-use solution? Thank you, If you have an open source code for calculating technical indicators If you are looking for a library, then giving one go is available for the source code Net, Java and C / C ++. The open-source version has not been updated since September 2007, as well as the payment for the Excel version as well. If you are working in a net environment and want only the chart rendering, then I think the control supports a small set of TA indicators (purchased from Microsoft by Poles). If you want to implement the indicators themselves, then they have a 'bible' document (affiliate link).

How to use the keyword 'references' in MySQL? -

When using the context keyword is used in the table? Let's say I want to make two tables person and hobby and I want a hobby table ID to reference the person's ID? person table - id - name hobby - id - person_id - hobby_name How do I do this? Prepare hobby list like this: Make Hobbies Table (ID INT is not an AT & T, the person is not an IID INT, hobby_name VARCHAR (255), primary key (ID), foreign key (person_id) reference person (ID)

c++ - To get reference counting, do I have to clutter my APIs with shared_ptr? -

I recently had the following memory bug , which is easy to monitor here, but It can be difficult to find out more complex code: square fu: public IFoo {const bar & amp; Bar_; Public: Foo (Constant Bar and Bar): Bar_ (bar) {} zero test () {// login bar_ here}}; Int Baz () {IFoo * foo = NULL; If (whatever) {repeatedly; Foo = new foo (bar); } Other {// create another foo} foo- & gt; exam (); // block fault) The bug is that times goes out of the area immediately, is destroyed and then foo-> test () Is used in . One solution is to create bar on a heap, using bar * time = new bar () . However, I do not like to do this because I have to keep the bar * bar pointer at the top level so that I can access it and delete this though at the end, The bar is such a code that is specific to that particular code block (if) {} . Another solution is boost:: shared_ptr , but I can not write it now: if (if any) {boost :: shared_ptr & lt; Bar & gt; Bar (new bar ...

c# - Visual Studio 2008 custom class item template, $safeprojectname$ not reconciling -

Just set up some quick square and object item templates and all this is working very well, but one thing I I'm stuck in the $ secure project name $ template parameter. I've added it as part of the namespace part and $ Registered organization organizational $ is working fine namespace $ Registered organization $ $ Secure project name $ {public class $ security name $ {public $ security name $ ()} {// default constructor}}} and I have gone into 'wistlelettile file' and it Ensured that is ReplaceParameters = "true" , that's why I have only guessed at this point that there is a period between the company and the project name, so I tested it laughing this period Removed, still not. Edit : I accept Jared's answer because it answers my main question, "Why is not this working?" But I'm adding to this follow-up action to find out how I got my desired result, instead of using $ secureprojectname $ or $ projectname $ I found ...

PHP/Javascript/Jquery - Dynamic Website Diagram -

I have to make an application that displays the external link to all my websites and outputs a diagram. For example, www.example.com/articles/some-title.html is linked to my homepage. Home - www.example.com/some-text-www.another-site Com / my-title - www.example.com/articles/some-title.html Product Products - www .buy-now.com / product-reviews / 231/098989 - www.sales.com/432/title-page Html Categories - www.ezinearticles.com/blah-blah-blah Something like this but not on CSS I have set up a table on my DB, so it will be dynamic and more link to come. Any ideas / suggestions I'm using CakePHP to work on? Thank you for your time. You can use PHP to get results from the database and you can display them Can be used. In addition to this, there may be interest, especially its plugin, its completely customizable and should be something to check.

PHP Objects vs Arrays -

I have a large number of PHP objects for a neural network, for which I have to pay attention again and do some math . I was wondering if it would be better to use an associative array on the examples of classes? I'm working with approximately 3640 objects and around 500 at the top of that time (best) then any micro-optimization is a Does it help in great deal? Essentially $ item ['value'] to $ object-> Value ? Edit: So they are both the same. But I think the constructor will be a little higher? Either way, I do not think I want to trade in my beautiful sections for dirty arrays: based quasal, I ran the next code (5.4.16 Windows 64 bit): & lt ;? Php class someclass {public $ aaa; Public $ BBB; Public $ ccc; } Function p ($ i) {echo '& lt; Pre & gt; '; Print_r ($ i); Echo & lt; / Pre & gt; '; } $ T0 = microgram (true); $ ArraysOf = array (); $ Inicio = memory_get_usage (); For ($ i = 0; $ i aaa = 'aaa'; $ Z- ...

c# - When to pass ref keyword in -

I've read the difference between passing and did not let the criteria go into the referee, nevertheless, when would I want to use them? For example, I had some argument in a method that can be re-implemented in my own method, Razor 4.5 made any one of the parameters, but I do not think if If I'm refactoring manually, then I have to do this. Obviously I do not understand anything. What could possibly happen when in the memory of the red keyword, coding would help in some sort or some scenario? Thanks Let me break it down in two questions: 1) When using any method, should use formal parameter declarations at any time? Use the referee instead of being able to read and write a variable passed by the caller / 2) Why does a "extraction method" refactoring produce a ref parameter? I do not know the details of the ribs, but I can think of the following negative non-negative value types: struct S {Private int x; Public int X () {return.x; } Public...

erlang - why gen_tcp:controlling_process() can failed with badarg? -

I have a problem with ejabberd module, it is http_bind but when I debug deeply, I found that socket and spelling After accepting the Hilling Process and when the GN_TPP: the process of re-signing for the receiver data for the new process received by the controlling process failed in Berang, why? ... {ok, socket} = get_tcp: accept (summons), opts = [{active, false}, ...],% here proc_lib Function Return result: spawn_link (handler, ..) {OK, PID} = ejabberd_http: start ({gen_tcp, socket}, opts), gen_tcp: controling_process (socket, pid): {badarg, [erlang, Port_connect, [# port & lt; 0.140743856 & gt;, & lt; 0.5939.4350 & gt;]}, {inet, tcp_controlling_process, 2}, {ejabberd_socket, start, 4}, {ejabberd_listener, accept, 3}, {proc_lib, init_p, 5}]} Any help? Most probably have crashed before calling for controlling the socket or process. Why did they get crashed, I do not know, you have ensured that there is a process of ebbird, should it run?

java - Is there any difference between default (package) and public access level of methods in class with default (package) access level? -

कोड में यही प्रश्न: वर्ग फू {int getIntProperty () {.. ।}} कस्टम ऑब्जेक्ट getObjectProperty () {...} शून्य सेटआईंटप्रॉपर्टी (इंट आई) {...} शून्य सेट ओबिजेन्टप्रॉपर्टी (कस्टमऑब्जेक्ट ओबीजे) {...} // डिफ़ॉल्ट पहुंच स्तर वाला कोई भी अन्य तरीका} VS वर्ग फ़ू {public int getIntProperty () {...} सार्वजनिक कस्टमऑब्जेक्ट getObjectProperty () {...} public void setIntProperty (int i) {...} सार्वजनिक शून्य सेट ओबिजेन्ट प्रॉपर्टी (कस्टमऑब्जेक्ट ओबीजे) {...} // सार्वजनिक एक्सेस स्तर के साथ कोई अन्य विधि} सार्वजनिक वर्ग बार Foo {} का विस्तार करता है फिर दूसरे पैकेज में आज़माएं: नया बार ()। GetIntProperty () यह आपके उदाहरणों के दूसरे (सभी तरीकों को सार्वजनिक) पर संकलित करेगा, लेकिन नहीं पहले (सभी तरीके डिफ़ॉल्ट पहुंच)

Why Java provides two methods to remove element from Queue? -

जावा में कार्यान्वयन क्यू तत्व को हटाने के दो तरीके हैं, एक को हटायें ( ) जो अपवाद फेंकता है और दूसरा है poll () जो खाली कोड के लिए null देता है कुछ स्थितियों में यह उम्मीद की जाती है कि एक पंक्ति खाली होगी, और उन मामलों में ऐसी कोई विधि नहीं है जो नहीं है। अपवाद फेंकना उचित है अन्य स्थितियों में यह असाधारण परिस्थिति है कि कतार खाली है, और एक अपवाद उचित है। अपवादों को फेंकने पर प्रदर्शन दंड लग जाता है, और यदि ऐसा होता है तो आप अपेक्षा करते हैं कि कतार समय-समय पर रिक्त हो आप एक अपवाद को पकड़ने के रूप में कतार खाली तर्क को संभालना नहीं चाहते हैं - यह पढ़ने के लिए महंगा और कठिन है। विपरीत मामले में जहां आप कतार की अपेक्षा नहीं करते हैं खाली होना यह प्रोग्रामिंग त्रुटि, या किसी अन्य अपवादात्मक परिस्थितियों का संकेत है, और आप बदसूरत त्रुटि हालत जांच कोड लिखना नहीं चाहते (उदाहरण के लिए रिक्त की जांच करना), क्योंकि इस मामले में यह कम पठनीय होगा अपवाद को पकड़ना (जो आप एक अन्य अवसर पर कर सकते हैं)।

visual studio - WPF XAML Properties Description -

क्या VisualStudio XAML संपादक में सार्वजनिक गुणों का एक छोटा पॉपअप विवरण दिखाने का कोई तरीका है?

c# - pass an object to a user controls ViewModel in asp.net mvc -

I have a view that uses a specific view modal. Various objects of the view modal eg. Foo, bar ... etc. I have a user control, which has its own view modal in which Foo is the object. How to pass the Foo object from the page View the usercontrols ViewModel? If you do this: & lt;% HTML .RenderPartial ("partial", model FU); & Gt%; Then one of the two things will be. If the Model.Foo is not of the view , then the user code model will be equivalent to Model.Foo , and Model.Foo of Model.Foo of UserControl. * If the Model.Foo is null of the view, then the model of UserControl model , and Model.Foo of the UserControl will be Model.Foo . If the view's model and models Fu is not the same type and view the model is absent and if the user controller uses the view typed strongly Ugrkantrol models now instead of TViewModel TUserControlModel HTML>