Posts

Showing posts from July, 2015

mdi - C# glass on an mdiparent -

I'm trying to use the DwmExtendFrameIntoClientArea method on an mdiparent. IsMdiContainer = true; Although the glass does not present correctly, is it a limit of a limit that I can get around? If the form is not set as an mdicontainer, then the glass completely renders the glass area white instead of glass.

Unit Testing : How do I abstract the M to test the VM in MVVM when using RIA Services -

OK, I'm still having a crisis of discretion. I have no luck in trying to isolate RIA services from our Silverlight application so that we can do proper unit testing. At this time we have an idea and look at the models, and the domain contact model no matter how much we try, we can not find any way to summarize DomainContext or entities So that we can change them with test data. Recommended strategies for the unit are to test a visual model which is dependent on RIA services? Did you see my blog post that was displayed in this way? Specifically, this allows you to plug a fake domain client below DomainContext, so that you can test your visual model on any server using a domain contact without any reliance on it.

iphone - Get selected time from UIDatePicker -

मेरे पास एक UIDatePicker है। मैंने DatePicker तो उपयोगकर्ता केवल समय का चयन कर सकता है। उपयोगकर्ता द्वारा जो भी समय चुना जाता है, उसे टेक्स्ट बॉक्स में प्रदर्शित किया जाना चाहिए .. मुझे पता नहीं है कि टाइम वैल्यू कैसे प्रदर्शित किया जाए - जो कि उपयोगकर्ता द्वारा डेट पिक्चर-टाइम मोड के माध्यम से सेट किया गया है। कृपया मेरी मदद करें .. आपको NSDate को आपके द्वारा वापस करने के लिए NSDateFormatter का उपयोग करने की आवश्यकता होगी UIDatePicker । यहाँ कुछ अनचेस्टेड नमूना कोड है, मान लें कि आपके पास "myLabel" और "MyDatePicker" संपत्ति के रूप में एक यूआईएलबल संपत्ति है: NSDateFormatter * outputFormatter = [[NSDateFormatter alloc ] इस में]; [OutputFormatter setDateFormat: @ "एच: मिमी एक"]; Self.myLabel.text = [आउटपुटफॉर्मर स्ट्रिंगफ़ॉर्मडेट: self.myDatePicker.date]; [OutputFormatter रिलीज]; आप पृष्ठ पर तिथि प्रारूप पैटर्न की जांच करना चाहते हैं > आपके स्थान पर निर्भर करता है "h: mm a" आपको "12:08 अपराह्न"...

c# - Count number of objects of class type within class method -

How can I count the number of object types within a class of that class? For that matter, how to do this without a list of things outside a class? I should have thought about that! Thanks! I'm going to leave it unanswered for a while to see if there is a better way, because I agree. I am sortv just wrapping my head around oo, if you do not have any harm then explain me a bit more and maybe it can be better than usual? I have an object class, for which I want to add 3 pieces of information, but first I want to go through the cycle and make sure that out of three pieces There are no other objects with anyone, and if so, then do something different for each case. The only way to accomplish what you are looking for is to Keep a constant list of items in the class. If you want to see that there is an example where the garbage has not been collected, then you want to use the WeakReference class. For example ... Public class MyClass {Private Static List & lt; Wea...

iphone - How to make the text entry and keyboard active when loading a UISearchDisplayController -

मेरे पास एक UITableViewController है जो UISearchDisplayDelegate और UISearchBarDelegate को कार्यान्वित करता है जब मैं लोड करता हूं मैं पाठ प्रविष्टि को चाहूंगा सक्रिय हो और कीबोर्ड प्रदर्शित होता है ताकि उपयोगकर्ता तुरंत टाइप करना शुरू कर सके। मैंने कोशिश की [self.searchDisplayController setActive: हाँ]; viewDidLoad विधि में । फ़ील्ड सक्रिय हो जाती है और रद्द करें बटन प्रदर्शित होता है लेकिन कीबोर्ड दिखाई नहीं देता है। आप कुंजीपटल को लाने के लिए खोज बार या सर्च बार प्रतिनिधि को बनना फर्स्ट रेस्पॉन्डर भेज सकते हैं।

Native vs ODBC database connections with R -

I understand that some databases have basic support in R (like MySQL), but you connect to other DBSs like MS SQL Server can do. RODBC. How much speed improvement is there a benefit to reading / writing with native drivers versus RODBC? Are the other DB's native drivers in R? Reading faster or faster than writing at all? If you are interested specifically in SQL Server, the reference is slightly older but I It seems that it probably still holds. ODBC's performance as an original API The constant rumor about ODBC is that it is more natural than the original DBMS API This argument is based on the assumption that the ODBC drivers should be implemented as an additional layer on the native DBMS API, the translation of the ODBC statements coming from the application translates to the native DBMS API functions and SQL V In Yvinyas. This translation effort adds additional processing directly to the original API than the application call. This assumption is true for some ...

tsql - find enabled protocols -

Is there a magic TSQL command that can enable or disable SQL Server protocols showing me? I thought it is a * selection from sys.endpoints, but also indicates "start" for the state_desk field protocol (which I know from "configuration manager") which is disabled. any comments? Version: 2005 Hmmm I have done a quick search and can find the closest I found to you With the documentation you can create endpoint from T-SQL, but you can do a registry setting with the Configuration Manager to enable the protocol. Which begin to understand from security footage.

Silverlight RenderTransforms available to children? -

I have set up a StackPanel with a set of controls, each control is an example of the same class. Control is also a stack panel and it has another custom control. Then: StackPanel: Custom Control 1: StackPanel: Custom Control 2: List Box Custom Control 1: StackPanel: Custom Control2: ListBox Custom Control 1: StackPanel: Custom Control2: List Box Render transforms have been applied on the top stack panel as expected, all children accordingly control the scale. It's great as long as I do not come under control of this last list box. In that case, I want to either ignore the scale or be handled in a different way (evenly in the opposite direction). Is there a way to exclude control from the conversion? Alternatively, can I evaluate changes from within the listbox? Thank you You can apply the exact reversal of the change, though it's okay It may take some time to do so. If by doing this in code, you can use the VisualTreeHelper to raise the tree Read the corr...

c# - ASP.NET MVC: Default page works, but other pages return 404 error -

I have created a "Hello World" application, in the same blue. It works perfectly on my development computer, using the built-in web server. I have advised for the deployment of Phil Hack. I have used the publishing feature to get the output directory, and copied all the files at all places on ISP (Network Solutions). When I go to the site, I get the welcome page, but when I do, I get a 404 error. What could be the problem? This is obviously running the network solution IIS6. I got what I wanted. There is additional notification of .aspx after the controller placeholder {controller} .aspx / {action} / {id} IIS6 requires it Because it always thinks that it is talking to an actual Web page rather than a controller. I am not interested in extra characters in the url, but I may have to stay with it. / P> Are you sure you put it on the IIS7 server? If the server runs the IIS 6 check and

flash - viewstacks vs states in flex? -

I have an app that I am currently using a view stack to display each page and I wonder if this is the right way to go, or I should use different states (or something). The site operates with the Top bar of Home, Devices, Support by the menu bar. Below the Tools menu, there is a submenu with Tool 1, Tool 2, Tool 3. Currently, when the user clicks on any tool in the tool submenu, I bring each child container to the viewstack (each child is actually in a separate component). Is this the right way to go, or should I use the states to bring the appropriate elements for each device page? It depends on how different it is if they are very similar, then the states are good because They help effectively re-use many markups already defined in the base component. If they have very different ideas, then it will be difficult for other developers to maintain it because it is not as simple as individual components for each scene. In addition to the use of the ViewStack, it allows for t...

csv - Validation of TSV file in Java -

I create a web application to upload a tsv file JDK -> 1.4 " -> 1 Resin -> 3.0.9 TSV file should be" \ t "," \ n "," \ R is parsed with " validation. 1. What is the file name with the naming convention? 2. Is this a TSV file? How should I recognize a picture or office document similar to TSV? It depends on your definition, a TSV file. Do all have the same columns? Or is it possible to leave the last empty pillars? If they all have the same columns, then you can first recognize it if it fails, then you know that the file is not valid. Do they have a top row? If so, you can use the answer to the above question and to parse the file. What is the permission to quote? If so, is it allowed to have tabs on carriage return or quotation marks? (Does not necessarily help in verification, but you will have to think about parsing) Is your text strictly a lesson? You can test for non-printable characters and reject it ...

iPhone web application development -

I would like to create a website that is friendly to iPhone ... it looks like an iPhone app, but in reality Server, like Gmail for Gmail I understand that Apple has originally planned for application development. However, I can not find this documentation to do this. Is there a link or something? I suggest using it. There are some good examples about developing such applications and it really makes it easy. You can choose your backend that you like anything (PHP, DJENGOGO, ASP ...)

Inserting date in sqlite db using adobe air and javascript -

I am trying to put a date value in sqlite db using air and javascript. Value is inserted, but when I try and see it, it says null. Later I came to know that using the SQLite store Julian format. How to convert javascript date to julian format? Adobe Air does not support JS date objects during inserting data I stmt.parameters [": myDate"] = was using new date (); It was putting a date in the database, but it was not returning back in a useful format. I tried the following and it worked like a charm. stmt.parameters [": myDate"] = new window.time.ad ();

How to set a server-wide variable in ColdFusion -

I have to maintain a variable in my application. (Cfm | CFC) to set up a current environment, environment (development | test | production) I want to set an environment variable on the server itself, so that I can read the value of it in application.cfm. Is this possible? It is easy to set an OS environment variable (run at the system level, or under ColdFusion for the user ), And restart the service variable then available in the CGI scope: & lt; Cfset EnvName = cgi.COLDFUSION_ENVIRONMENT & gt; & Lt; Cfoutput & gt; # Envname # & lt; / Cfoutput & gt; You can also use Java system properties. In your ColdFusion Administrator, go to "Server Settings / Java and JVM", and add something like "JVM Arguments": -Dcom.mycompany.environment = Evolution Then you Coldfusion may ask for that value: & lt; Cfset System = CreateObject ("java", "java.lang.System") & gt; & Lt; Cfset EnvName = System.getP...

c++ - How to make this template code work? -

टेम्पलेट कोड इस तरह से है: टेम्पलेट & lt; class type1 & gt; Struct DefaultInstanceCreator {type1 * ऑपरेटर () () {new type1; }}; टेम्पलेट & lt; क्लास टाइप 1, क्लास इंस्टेंससाइमर = डिफ़ाल्ट इन्स्टेंस क्रिएटर & lt; type1 & gt; & Gt; क्लास ऑब्जेक्ट कैश {सार्वजनिक: ऑब्जेक्ट कैश (इंस्टेंस क्रिएटर एंड इंस्टीस्यूटर्स): इंस्टीट्रेचर (instCreator) {} टाइप 1 * प्राप्त करें () {टाइप 1 * Temp = instCreator_ (); } निजी: InstanceCreator instCreator_; }; यह कोड ऑब्जेक्ट क्लास के साथ अच्छी तरह से काम करता है: class A {public: A (int num) {number = num; } इंट नंबर; स्ट्रक्चर बनाएँइन्स्टेंस {बनाएँइन्स्टेंस (इंट वैल्यू): value_ (value) {} ए * ऑपरेटर () () कॉन्स्ट {रिटर्न न्यू ए (value_); } Int value_; }; }; objectCache & LT; ए, ए :: बनाएँइंसटाइन & gt; intcache (ए :: CreateInstance (2)); A * temp = intcache.Get (); Cout & lt; & lt; अस्थायी- gt; संख्या & lt; & lt; endl; जब मैंने इस टेम्पलेट की तरह int, string ... objectCache & lt; Int ...

How to design database schema for a content management system (cms) with multiple language support? -

I am going to create a site with multiple language support, and I need to have the ability to control article workflow Is, companies, products all with multiple language support and multiple versions. Does anyone have a solution already or do I have to start with scratch? Have you seen You can use MS SharePoint. Have you seen: Joomla is an award-winning content management system (CMS), from which you Web sites and powerful online applications. Many aspects, including its ease-of-use and ease, have made Joomla the most popular web site software available. Best of all, Joomla is an open source solution that is freely available to all.

WPF listview remove extra column generated -

When I use a ListView in WPF, it always generates an extra column at the end of the ListView. For example, if I define two columns in my listview and when I run it, it generates those two columns and an empty column header. With any thought how can I remove it? Sample List View XAML & lt; ListView Items Source = "{Binding Path = Search Entries}" DockPanel.Dock = "Top" & gt; & Lt; ListView.View & gt; & Lt; GridView x: name = "grdView" & gt; & Lt; GridViewColumn Header = "Name" DisplayMemberBinding = "{Binding SearchFieldName}" /> & Lt; GridViewColumn header = "balance" width = "auto" cell template configuration = "{StaticResource searchFilterDataTemplateSelector}" & gt; & Lt; / GridViewColumn & gt; & Lt; / GridView & gt; & Lt; /ListView.View> & Lt; / ListView & gt; Thanks, Jithu The last column is just left space In you ne...

php - Is there any way to output the filtered data from Zend_Filter_Input? -

Is there a way to output all the filtered data from the class Zend_Filter_Input? Zend_Filter_Input provides several methods for retrieving filtered and valid data First of all, you can retrieve an associative array of all areas: $ data = $ input-> GetEscaped (); // Retrieve all data, Zend_Filter_HtmlEntities $ data = $ input-> Escaped with getUnescaped (); // Retrieve all data, not saved. You can also get an associative array of parts of the data, method names are very clear: $ invalidFields = $ input-> ; GetInvalid (); // fields that fail in validation $$ missingFields = $ input-> GetMissing (); // field that was declared as 'required' in 'metacommand', but input $ unknownFields = $ input- & gt; GetUnknown (); // fields which were not declared in validator rules but were present in the input. Above all of this, provides an object accessor through the implementation of magic method: $ oneField = $ input-> One field name ...

user interface - Integrating GUI into console applications -

I have two independent console applications developed in C ++ I was asked to develop a GUI for both of them In this GUI I submit some parameters which are necessary to launch any of these applications. Can anyone give some orientation to integrate console applications with this GUI? Is it possible to launch an application from the GUI and not see the console? Can the applications written in the console be redirected to the log file? Thanks in advance. To minimize the GUI from the command line tools, you are able to supply the proper parameters to your GUI Call programs. You can use the API function. That call gets a composition where you can specify whether the window is shown for the command or not. Examine the link for examples, a complete make-up process can be found. This is a pure Windows API method to work If you use C ++ /. NAT is developing, so it is easy. If you can choose any language to do this, then I definitely change the .net (and also) language to C ...

c# - Keeping track number of connected users to WCF service? -

I have pure TCP PerSession WCF service, the number of connected users (active customers) using my current argument for keeping track Service maker and heart beat mechanism Producer I just add to a stationary member, and during raises one of these exceptions are sending heartbeat (TimeoutException, FaultException, CommunicationObjectAbortedException) for the client I number decreases. Besides, I am using heartbeat to send other goods. So far it works perfectly, but is there any better way? You can create your implementation, after the new instance contact is ready will be notified. public class MyInstanceContextInitializer: IInstanceContextInitializer {public void start (InstanceContext instanceContext, message) {events hook // for example up to be notified about changes in the state of reference. // Remember refernce to it}} and attach it public class InstanceInitializerBehavior: IEndpointBehavior {public void AddBindingParameters (ServiceEndpoint serviceEndpoint,...

Initialize Global Variables in PHP -

Is a good practice to start a global variable in PHP? The code snippet works fine, but is it better to start the variable outside of a function (called for a larger project, for performance) than the second start of the code? if (isset ($ _post ["The Return"])) Valid (); Function Validate () () (Fill ($ _ POST ["from"]) & amp; Empty ($ _ POST ["body"])) Send_Email (): fuse ();}; Send_Email () {global $ Alert; $ Alert = "Lomp Ipsum"; Mail ("", "", $ _ Post ["The Body"], "From:". $ _ Post ["From"]);}; Fuses Function () { Global $ Alert; $ Alert = "Put Dall"}; Function Alert () {Global $ Alert; if (! Is_null ($ Warning)) echo $ Alert;} The above variable $ Alert has not been started. $ alert; if (isset ($ _ post ["The Return"]) Valid (); Validate the function () ((empty ($ _ POST ["to"]) & amp; Empty ($ _ POST ["body"])) Send_Email (): fuse...

.net - When Debugging an ASP.NET Application, How to End Debug Session when Firefox Closes? -

please still looking for a solution I agree But with all of you, the thing is that with any other browser I'm looking for any kind of settings / options, such as it will kill the process only when the Firefox window is closed Original message Hi all, I'm going to set up Mozilla Fire Fox as my default web browser. The problem is that the application is running on running mode, I also close the browser window. Not so with IE. For some reasons I have to use Fire Fox instead of IF Is there a way to close the application when the Firefox window is off? (By not explicitly blocking the stop button on the project window) You get the initial action of the web application project Configure "Start an external program", point it to Firefox, set the command line argument on your site. Eg Start an external program: C: \ Program Files \ Mozilla Firefox \ firefox.exe command line argument: http: // localhost: 8888 /

authentication - Tomcat 6.x JDBC realm, classpath for driver problem -

I is shown below as set a JDBC in your META INF / Context.xml, and it works the problem is that the JDBC driver now $ Katalina_acoam / Lieb / to be kept under can no way that I load the JDBC driver from somewhere else, such as WEB-INF / My webpage in lib /? Meta-INF / Context.xml & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Context & gt; & Lt; Realm className = "org.apache.catalina.realm.JDBCRealm" Driver Name = "org.postgresql.Driver" connectionURL = "jdbc: postgresql: // Damon / Testdibi" userTable = "users" userNameCol = "userName" userCredCol = " password "Connection =" xxxxx "connectionName =" xxxxx "userRoleTable =" user "Bhumikanamcol =" role "digest =" MD 5 "/ & gt; & Lt; / Context & gt; I'm pretty sure you can not do that, no. The scope is present and managed out of the scope of any...

performance - Measuring the HTTP response time back to the client using only the server -

I need to measure how long it takes to send a web response to the client - only from server side I know that there are Ajaxian and client-side methods to do this, but I am limited to the server-side of the client's only way to measure timeframe. Is > Using ACK, the customer is sent back from the browser, when the server sends the response? as described by .... Is this figure reliable? ACK will come in at least one of the segments that you send (if all is well). They tell you that the customer has accepted the data. Therefore, assuming that the time of travel from the client to the server is the same, the average estimate of DeltaConnam / DeltaAt should be that how much was the average speed. Obviously, more packets of these two ACK segments are much better. If you look at the timestamp option, then you can get an estimate of RTT at different points on time - when one timestamp is sent to TSVil on one side, it resonates in the TSCER area of ​​the other return p...

vb.net - Convert String to Double - VB -

Is there an effective way to check that a string can be converted to double in VB? I am currently trying to convert the string to double and then seeing that it creates an exception. But it seems that my application is slowing down. Try 'if the number then formats it current = cdbl (x) current = math. Round (current, D) Returns as the current capture system. Transliteration exceptions' Items are not a number, do not format ... Skip X string X and try Double.TryParse () Try looking at .NET 1.1 / 2.0 / 3.0 / 3.5 / 4.0 / 4.5

version control - Git, can I use it instead of sourcesafe or subversion? -

Can the git be used as a source, should I directly check it in / out directly in Visual Studio Can I apply in the code and see history? Thanks guys. I did not try myself, though, I'm scared. There's a lot more you would like to see ...

SubSonic 2 migration ignores columns added later -

I have a migration (v2) that creates a table and adds some columns: TableSchema.Table layout = CreateTableWithKey ("layout"); Layout. Add column ("UserID", dbip.unit32); Layout. AddColumn ("WidgetID", DbType.UInt32); Layout. AddColumn ("Section", DbType.UInt32); Layout. AddColumn ("Rank", DbType.Int32); Another migration (v3) adds a column to this table: Taskache. Layout = gettable ("layout"); Layout. AddColumn ("Collapsed", DBTip Boilan); The problem is that, SubSonic 2 Migration seems to be ignoring the v3 statement. The Deputy Commander reports the success, but the new column is never added, and anything defined as Generated SQL Migration v3 is missing. Am I forgetting something? Is it not possible to add columns to an existing table? Try calling this.AddColumn ("collapsed Html>

Imply bit with constant 1 or 0 in SQL Server -

Is it possible to express a bit to 1 or 0 if used as a field value in a certain statement? For example In this case the statement (which is part of a selection statement) is of the ICourseBased type int. case when FC To get it as a bit of type I have to put both values ​​in. The case ends when FC.CourseId is not zero (as 1 bit) as other artists (in the form of 0 bit) IsCoursedBased Is there a small hand of expressing values ​​as a bit type without being cast every time? (I'm using MS SQL Server 2005) Cast F.C.Course ID is not empty, then in the form of 1 and 0 bit bit) CAST space is "CAST (Expression AS Type)". In this context, the case is an expression . If you have many types of expressions, then I will declare Bit Wars @true and @false and use them I or use UDF if you really want ... DECLARE @Treue bit, @false bit; SELECT @Treue = 1, @ False = 0; - can be combined with selection in SQL 2008 SELECT case when FC.CourseId is not zero then...

asp.net - Using web.config to ban user-agents -

Is it possible that some user agents have web Is restricted directly from config? Some robots do not follow robotstext, and I want to stop certain types of requests (especially based on a user-agent or perhaps IP address) to avoid wasted server load (and log-file spamming). Bonus Issues If you know that such requests are possible to prevent IIS log file from fully logging (i.e. if- request-match, if you receive my meaning then forward / Dev / null). One solution would be better for win2003, but this is a recurring problem - if there is a clean solution for IIS7 but not IIS6, I would be happy to know this. Edit: Sorry 'Compared to the first incomplete question, I had been tagged with a tab + mistake. This can be done very easily using the URLRewrite module in IIS7. But I do not really know if it will stop them from logging those requests. & lt; Rewrite & gt; & Lt; Rules & gt; & Lt; Rule name = "stop User-agent diagnostics" stop proce...

asp.net - SQL Sub Query NO execute if null -

I was wondering if my @ id1 tap was there any way to not perform my subconscious? formation process [DBO] [Test Table Search] @ Call 1 Int, @ Call 2 Unique Identifier, @ Call 3 Datam, @ Call 4 Data, @ Id 1 Wakr (10) SST Translation Accolation Level Select CAD * Read [DBO]. [TestTable] WHERE [Col1] = COALESCE (Col1, Col1) and [Col2] = COALESCE (Col2, Col2) and [Col3]> = COALESCE (@ Col3 + "00:00:00", Col3) and [Col4] & Lt; = COALESCE (@ Col4 + "23:59:59", Col4) and [Col5] IN (SELECT [ID2] FROM [dbo]. [TestTable2] WHERE [ID1] = @ ID1) Not sure about your meaning, but maybe this is what you are looking for: [test table] where [Col1] = COALESCE (Col1, Col1) and [Col2] = COALESCE (Col2, Col2) and [Col3]> = COALESCE (@ Col3 + "00:00:00", Col3) and [C-Ol4] & lt; = COALESCE (@ Col4 + "23:59:59", Col4) AND (@ ID1 IS Null or [Col5] IN (SELECT [ID2] FROM [dbo]. [TestTable2] WHERE [ID1] = @ ID1)

windows - What are the numbers on the end of lines in a stacktrace -

What does the number represent after the "+" at the end of the lines in the stack trace? Function source ntdll! Zowermeo Insertion + c kernel32! GetQueuedCompletionStatus + 29W3TP! THREAD_POOL_DATA :: ThreadPoolThread + 33 w3tp! THREAD_POOL_DATA :: ThreadpoldTread + 24 w3tp! THREAD_MANAGER :: ThreadManagerThread + 39 kernel32! BaseThreadStart + 34 They are + c +29 +33 +24 +39 +34 They are offset, in hexadecimal, from the beginning of the designated subroutine for example kernel32! BaseThreadStart + 34 Regular BaseStartstart in kernel 32 modules has 52 (34 hex) bytes.

c# - .NET Timer - Resource cleanup -

How the resource used by the timer in C # has been released, tried the following methods, The application is not working. T. translation (); T.Stop (); T.EndInit (); T.Close (); How do you know that it does not work? Removal () should work. Can you still use the timer (if you should not do it right)? If you want to delete the memory then you have to call GC. Compiler () The timer in a user statement (if you do not need a timer): using (timer t = new timer ()) {// content With T} timer.devase () will be automatically said. Here is an example of timer disposal: constant zero timestest () {usage (timer t = new timer (200)) {t. Start (); T.Elapsed + = New ElapsedEventHandler (t_Elapsed); System.Threading.Thread.Sleep (5000); // some work here} system. threading. Thread Sleep (5000); // Wait before application is closed} Fixed zero t_Elapsed (Object Sender, ElapsedEventArgs E) {Console.WriteLine ("Hello."); } Call it in your main () method. This wil...

mediawiki - how to set a wiki like application only for known users or know IP? -

Is there any way to establish access to a wiki like a known user and application for a known IP address? My requirement is, I want to store / share some of my project installation details and want to set my partner. But do not show it in the public. What do I need to do is like mediawiki-like applications but login and access are restricted. Yes, this is not a problem. My very favorite wiki is really easy to install and it will allow you to restrict access based on username / password addition, and if I want to add IP-based filtering, As I do. A little more: I like DokuWiki because the install is so easy, it is very easy (it has been done again and again), it is targeted for programmers and this is just about every feature I want. It is one of the few applications that every time I go to use it, I am happy.

python - What scripting language should I learn for file/text manipulation tasks? -

I am trying to design a script for automation of a very difficult configuration process I was doing by hand. Most different ClearCase sequences include copy files of the configuration process, their content is edited in the predefined way, and they are inserted into a new local tree of directories. It also includes some proprietary and MS SQL Server businesses, but it is not very difficult to do it manually. I am more worried about endless copying and pasting which is suffering from human error. The configuration process is mostly done in Windows XP, but there is also a good script running Red Hat Linux. I just know C ++ and Java, but I was thinking that some python manipulate all the files; It looks like a very high level of work so that a scripting language is appropriate. Am I on the right track? Do I particularly want to see common mistakes? [edit: In this initial phase I have no special technical questions (though I will not have any doubt when I am Nitty-gritty), okay, ex...

aop - Run Code Before Every Function Call for a Class in C++ -

I run some squares (perhaps function) before each function call for the class and run all the functions of the class I wish that the heir to that class really want to do this without editing every event, is there any such thing possible? I call the function as the first instruction of each function call, instead it is being said correctly. That is what you want I have not used myself, but the paradigm solve this exact problem Tries to do

c# - Can't get example for ASP.NET AuthorizationStoreRoleProvider to work -

I was following this example, but I am feeling something wrong I continue The parameter is incorrect (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Line error throw: line 30: If (Roles.IsUserInRole ("TestRole")) stack trace: [ArgumentException: parameter is incorrect (exception with HRESULT: 0x80070057 ( E_INVALIDARG))] [Target Invocation Expansion: The exception is thrown by the goal of a greeting.] System. Runtime type. Invok Disppment (string name, binding Flegj Invoit art, object target, object [] Algs, Boolean [] Bayforodifayr, Int32 culture, String [] namedParameters) +0 System.RuntimeType.InvokeMember (string name, BindingFlags BindingFlags, Binder binder machine, the target object, object [] providedArgs, ParameterModifier [] modifiers, CultureInfo culture, string [] namedParams) 337 system .Type.InvokeMember (string name, BindingFlags invokeAttr, binder binder, object target, object [] args, CultureInfo Culture) +36 System.Web.S Ecity.Authorizat...

Calling a WCF service from classic ASP -

Are there any good examples by calling the WCF service from the classic ASP page? I saw And it took me closer but I need to cross the criteria for service and I am not sure how to do it with a WCF? Currently I'm just getting back wsdl. The best way to do this is to class C # or VB Net. This class will expose its public methods as a COM object. All classes will do so to call the web service and return results. Then you will be able to use this COM object from classic ASP, which will not know that it is in contact with 21st BTW, BTW, outside of VBSCIPT and functionality in the modern world of NAT. There is a good way to re-implement - COM object one at a time. Later, if you want to convert pages to ASP.NET (or ten years after that), then you will have at least the effect of all the Bashois Logic, and ASP.net will be able to call it.

iphone - Acceptable (by ) HIG friendly approach to temporarily highlight a UILabel -

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

sql - Most efficient way to get lists? -

What is the best way to get a list of things? I have two tables: I want to get the list of object A, B with Subject B, but in the top five of B. Suppose there are people, and B is the type of food, with sort_key, how much a person likes food. How do I get each person (or some people) and their top five meals? On the previous comment, if it is an INT in which you can not enter non-numeric. Assume the following data: a - id 1 2 3b ------- -------------- --- ID Support sort_key 1 1 1 2 1 2 3 2 1 4 3 1 5 1 3 6 1 4 7 1 5 8 1 6 9 2 2 10 2 3 The following in MySQL The query will tell you: SELECT a. *, (As a SELECT GROUP_CONCAT (id) AS as a result from ASBC by BI WHERE BI .id = a.id command by sort_key LIMIT 5) a : id id 1 1,2,5,6, 7,8 2 3 9, 10 3 4

java - Counting trailing zeros of numbers resulted from factorial -

I am trying to calculate zero numbers of numbers that are from the results (which means that the number is big enough is). Takes the following code number, calculate the number of factorial, and count the indexed zero. However, when the number is about as big as 25 !, numzeros do not work. public static zero main (string [] args) {BufferedReader br = new BufferedReader (new InputStreamReader .in)); Double facts; Integer answer; Try {int number = integer Paradent (breadline) (); Fact = factorial (number); Answer = numZeros (fact); } Hold (NumberFormatException e) {e.printStackTrace (); } Hold (IOException e) {e.printStackTrace (); }} Public stable double factorial (int no) {double total = 1; For (int i = 1; i I am not concerned about the efficiency of this code, and I know there are several ways to improve this code. I am trying to understand why counting more than 25 numbers is being counted! not working. Any thoughts? Do not count your work factual but the number of ...

php - When INSERTing into a table can I get the value of the automatically incremented primary index? -

I am inserting one line into a table and automatically want to get the value of the increased primary index. The primary index is the only unique value in the table, so to prevent ambiguity from "SELECT [primary index] [table] where [column = the figure I have just inserted]" nothing Want to do I do not want to select my previous row because a line may have been inserted between my INSERT and SELECT statement. I can put an empty row, select the primary index and update the row with the data but it looks like quite an ugly hack, it makes me believe that their It is important that you put the primary schematic so far through the mysqli API, because I think it would be very omnipresent to do. Is anyone answering me? Your answer is You've tagged your question with "mysqli" right, in which case you will use

html - Show child element above parent element using CSS -

I have two divs, the nested basic element within the second is the defined width / height I use only CSS How can I show the child above (outside)? Edit: Sorry, maybe I should make it clear that I mean "up" like z axis and yes, i have already tried z-index. My problem is that when the child element is larger than the parent, the result is in the "frame" or "window" effect, which divides the part of Div Set overflow: visible; on the parent department. # Parent {Overflow: Visible; } Clicker's update has been changed to reflect.

language agnostic - Mechanism to ensure a loop ends -

When I was in college, we used to give guest lectures from David Parnas. In this they have mentioned a system which is used for guarantee that any loop (while loop, for loop, etc) safely comes out at some point. He ruled over the fact that no one knew what it was ... sadly it is that after a year I do not know whether anyone knows what this system is called? Looking at the basis of your area of ​​expertise (including the formal proof of purity), I think That means it means, which is a general technique that proves the loop termination.

c# - Windows Forms WebBrowser Control and AJAX -

I am currently calling my function at WebBrowser1_Document. It is not running correctly though when I press 2 button and call the same function. It seems that my code needs some time to run javascript and Ajax. When do I call my code from the event? I do not want to click on a button at all times? Use the document Finish and check the URI for the AJAX request.

what clearcase plugin to use with eclipse -

ईक्लीपीस 3.5+ के लिए कौन सी कस्ट्रेकेस प्लगइन का उपयोग करना चाहिए? जो प्रयोग करने में आसान है ? जो सबसे अधिक विश्वसनीय है? क्या कोई भी प्लग इन कई दृश्यों के साथ काम करने में संभाल सकता है? मुझे आईबीएम पर खिड़कियों के लिए एक साफ़-साफ़ एडाप्टर अपडेट साइट मिली: आईबीएम डाउनलोड पर लिंक टूट गया है।

website - Web navigation via paths -

I am a completely new Web novice but I could not help with paying attention to certain websites As www.stackoverflow.com) often seems to navigate to specific items through the way. For example, clicking on "Blah-Blah-Blah" item discussed in www.whatever.com/discusions will often link URLs with a pattern www.whatever.com/discussions/123456/blah- Blah-blah I am familiar with GET / POST, and passing the parameters through www.whatever.com? Disisculation = blah-blah-blah , but this method A search through Google is not very useful. I'm assuming that the number is the database ID in the path, but after that I'm just guessing. I am thinking that a separate web page has been created for each object, but it is redundant, but then perhaps it is SEO technology. Does anyone have the courage to expand? You should see the whole concept that when Web2.0 grew,

How do I compare two strings in Perl? -

How do I compare two strings in Perl? I'm learning Perl, I had this basic question seen on stack overflow and I did not get any good answer, so I thought I would ask. lt , gt , eq , ne , and cmp as appropriate for the string Code> use comparison: binary eq return is correct if the left argument stringing is equal to the right logic. Binary ne returns true if the left argument stringing is not equal to the right logic. The binary cmp depends on return -1, 0 or 1, that the left argument is less than stringwise, or more than the exact or true argument. Binary ~~ does a smartmatch between its arguments. ... lt , take , ge , gt and cmp If any legacy uses the locale (but ' ) is in effect, then use the specified order (sort order) specified by the locale. See . Do not mix it with Unicode, only with legacy binary encoding. Provide more powerful solutions for standard and module collation problems.

asp.net - Webservice Applicationpool -

I have two different web services (running on local machine) and an application pool (1.Can I Can I do this? Is this a matter of any working concern?). I do not know much about how the application will work. other. The Net application is using two servers, but often a web hosting is not responding, which is internally by the ssis package. Calling in Net Application. What could be the reason and to make sure that it responds all the time, is there a better way to improve performance? If there is unavailable or any other information, comments are welcome Yes, You can keep many web applications using the same application pool. Is this a performance concern? If this is really high traffic or a defective code, then perhaps it might be possible. The applications allow pool sites to reach different processes, which can reduce the risk of others affecting each other. If an app pool has an application / web application that contains a memory leak, the leak will only affect that p...

sql server - How to solve insert/delete deadlock on non-clustered index? -

I have found a deadlock problem and I came to know that this is due to two stored procedures called different threads (2 named web services). ). Merge which inserts data in the X table. Delete that deletes data in the X table. In addition to this, I got the result which happened to me in the non-unique and non-clustered index of X Table. Do you have any ideas to solve this problem? From Update , I think the error is due to the following statements. In the inclusion statement, the ID (clustering index) and then the non-cluster index is found. In the deleted statement, it is non-clustered before the id. Therefore, I have to select the statement of deletion as the following statement, to select the ID. SELECT id FROM X with (NOLOCK) WHERE [condition] PS Both stored procedures are called in the transaction. Thanks, You must see ... you mention the transaction; Is there a level of separation? One thing to try is to signal any query that connects (UPD...

layout - Android: How to make all elements inside LinearLayout same size? -

I want to create a dialog for displaying a video title and tag. Below the text I want to add buttons, view, edit and delete and make these elements the same size. Does anyone know how to modify the .xml layout file to create elements inside the same size as LinearView? The current layout file looks like this: & lt; LinearLayout xmlns: Android = "http://schemas.android.com/apk/res/android" android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: orientation = "vertical" & gt; & Lt; LinearLayout Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: orientation = "vertical" & gt; & Lt; TextView android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: id = "@ + id / txtTitle" Android: text = "[title]" & gt; & Lt; / TextView & gt; & Lt; TextView...

math - Similarity Between Colors -

I am writing a program that works with images and at some point I need to post an image. This means that I need to turn off the colors, but I am having difficulty in deciding how to tell about the second color of one color. Looking at one color in RGB, I can see at least 2 ways how different they are: | R1 - r2 | + | G1 - G2. 2 + (B1B2) ^ 2) And if I go to HSV, then I can think of other ways to do this. So I ask if the speed should be ignored, what is the best way to tell that there are two colors similar? Take a look here and

c# - How know when a winform is loaded by Process.Start? -

I am in a WindowsForm (c # .net 3.5) and launch another external application on the click of a button (this Also .net 3.5) Process. Understand using Start () and when to start it. PsInfo.RedirectStandardOutput = True; PsInfo.RedirectStandardError = True; PsInfo.UseShellExecute = false; PsInfo.CreateNoWindow = True; Process proc = process Start (psInfo); Proc ... IsFullyLoaded ()? How can I do this? Call the method of making your form. To know whether it is ready or not, try it: bool isReady = proc.WaitForInputIdle (0); Or, alternatively, bool isReady = (proc.MainWindowHandle! = IntPtr.Zero); You can also use the main windhands property to send messages in the form using the API function

c# - Arc based gradient -

I am trying to make an arc (variable width, variable number of the degree - potentially a whole cycle), which goes slowly, says, red on one end for green on the other. I do not know how to specify a gradient on an arch to accomplish this. For example, if you can imagine creating a round temperature gauge where the degrees from 0 to 500 different from the gauge marker on the circle. In the form of an added view, I gauge the perimeter of the grid To indicate the temperature, I would like a gradient color - being very hot (red) from good (green). I have tried both a footprint brush and LinerarGradientBrush (but maybe I missed something). Thank you. This code goes from red to green (left to right) will create an arc Comes to the form. Private Zero Button 1_Click (Object Sender, EventArgs E) {Usage (Graphics G = this.CreateGraphics ()) {LinearGradientBrush lgb = new LinearGradientBrush (New Point (0, 0), New Point (210, 0), color. Color, color green); Pen p = new pen (LGB, 10)...

overloading - LD_PRELOAD equivalent for Windows to preload shared libraries -

I'm actually trying to do what LD_PRELOAD does, i.e. a shared library or DLL file on Windows Override some tasks in a given program. Is LD_PRELOAD equivalent for Windows? I do not have any special functionality. I just know that it is possible on Linux, and I'm curious how a native DLL can be overloaded on Windows. AppInit_DLL should be renamed Deadlock_Or_Crash_Randomly_DLLs P> P> You may also want to look in "DLL injection." Four methods (including AppInint_DLL) are described here:

printing - Calculating a formatted string's width & height in C# -

I try to convert XML from a database to generate a PDF using an XML XML (XML-FO) I am doing Due to complex rules in the context of paging for this document, when I generate XML, which is consumed by XSL, then calculate in determining the page break I have seen that these calculations I am getting inconsistent results. For example, in the context of height, the required print area is 9 inches, which I increase by 72 points to points with a score (64 inches per inch) = 648 points. So for every line, I want to reduce the line height to the measurement string, which I want to reduce by then 648, to see if the line is still available to print. But whenever a page break is determined, there will be a large white spot left below. It seems that the 648pt conversion is wrong. Now I am also worried that the height of the measurement string method can also be wrong. I apologize for the long post, but I appreciate any input / suggestion that what I am doing. P> Thank you very much! ...

sql server - Trimming alphanumeric characters from a strings of varying lengths in T-SQL -

I have a result that I want to trim 2 points suffix The strings will always be of different lengths, but the suffix will always be two digits separated by '-'. Example: APPTR-W302-01 NRSB-8920-09 Right now I am using the following: It is a hack Because '20' parameter is irregular. reverse (SUBSTRING (REVERSE (COURSENAME, 4,20)) What is a better way? Will the suffix always be '- ##'? If the suffix length does not change, then left (Korean, LAN (Korean) -3)

vb.net - Ways to go about resizing controls in resizable windows? -

I have two with a VB 2005 form size and need to move up three buttons in between them in The DataGridView control is, around the size of the form. The code below works, and whatever I want. It takes the difference between the new size and default size, divides the height difference between two DataGridViews, and moves things around correctly. missed what I'm about bugs that I have hard-coded ResizeEnd handler I would go about how to pass the default size, so I will not repeat itself? Even better, is there a way to do this with anchoring, docking and other stuff, so that I can not even write the code in advance? Thank you! private sub dlgShowAssets_ResizeEnd (ByVal new System.Drawing.Size as this object, ByVal e As System.EventArgs) Handles Me.ResizeEnd dim defaultWindowSize (759, 619) dim defaultAssetDGVSize New System.Drawing.Size (730, 153) dim defaultAssetDGVPos New System.Drawing.Point (9, 186) as well as dim defaultButton1Pos New System.Drawing.Point (9, 345) di...

asp.net - Can i pass the ID name in an onChange event for a textbox? -

I have 3 text boxes that check the entered date. I was originally code for a text box. On-Change Event & lt; Asp: textbox id = "txtDate" runat = "server" width = "110px" onChange = "there is a way to pass ID name on checkEnteredDate ('txtDate' ')" & gt; & Lt; / ASP: text box & gt; Function checkendend (var text box = new string ();) {var inputDate = document.getElementById (textbox); // if statement to check for a valid date var formatDate = new date (inputDate.value); If (formatDate> nowadays) {Warning ("You can not select a date compared to today."); InputDate.value = Today's date. Format ("MM / DD / Yay"); }} You must do this in your code's page_load Is behind: txtDate.Attributes ["onchange"] = string.format ("checker date ('{0}');", txtDate.ClientID);

Is WCF Username Authentication without Transport Security a security risk? -

I am trying to use username protection in WCF. I am trying to figure out whether the transport None of the Credential Type / Anonymous will create a certain security risk. My concern is with the initial exchange where binary data is created using the WS-Trust specification (TLS negotiation) Any ideas are welcome. Thank you. & lt; Security mode = "message" & gt; & Lt; Transport Customer Credential Type = "None" /> & Lt; Message Customer Credential Type = "User Name" Conversation Service Credential = "True" AlgorithmSite = "Default" Install SecurityContact = "True" /> & Lt; / Safety & gt; According to the specs for security of the WS-username, the user name in the token can be both. And passwords, unencrypted. It will be obvious that this information will be clearly transferred to unencrypted wire. Binary formatting is not preventive, usually referred to as "security by amb...

preventing xml namespaces passing to children -

I have an XSL: Stylesheet element has a bunch of namespaces, how can I stop the namespace from reflection of children? Let me say I generate something like this: For example: & lt; Xsl: stylesheet xmlns: a = "aaa" xmlns: b = "bbb" & gt; & Lt; / XSL: stylesheet & gt; & Lt; Results xmlns: a = "aaa" xmlns: b = "bbb" & gt; & Lt; Child1 & gt; & Lt; Gchild11 & gt; & Lt; / Gchild11 & gt; & Lt; / Child1 & gt; & Lt; Child2 & gt; & Lt; / Child2 & gt; & Lt; Child3 & gt; & Lt; / Child3 & gt; & Lt; / Results & gt; Now, when I bring a special child from the tree, how can I stop the name space from being passed? That is, I should get: & lt; Child3 & gt; & Lt; / Child3 & gt; no more & lt; Child3 xmlns: a = "aaa" xmlns: b = "bbb" & gt; & Lt; / Child3 & gt; Thanks, Aditya Add the followin...

RHEL/Apache ssl.conf configuration problem -

We have more than one subdomain, each of which this virtualhost entry is in httpd.conf and good as SSL the way. Our main www is a GoDaddy cert associated with it in subdomain. The subdomain I am currently configuring on our dev server ("api.bulbstorm.com") has a ssl.conf virtualhost entry that looks like this: & lt; VirtualHost 172.16.247.153: 443 & gt; DocumentRoot "/ var / www / api" server name api.bulbstorm.com:443 error log / api-error_log custom log / api-access_log warning all SSLEngine general Loglivl SSLProtocol - all-SLV 2 SSLCertificateFile / var / www / Certs / api / server CRT SSLCertificateKeyFile /var/www/certs/api/server.key & lt; Files ~ ". (Cgi | shtml | phtml | php3?) $" & Gt; SSLOptions + StdEnvVars & lt; / Files & gt; & Lt; Directory "/ var / www / cgi-bin" & gt; SSLOptions + StdEnvVars & lt; / Directory & gt; & Lt; Directory "/ var / www / api" & gt; Options + ...

javascript - Any function / method in Java to implement a "freeze panes"-like sheet? -

We are using java and javascript to display a huge sheet with freeze pen But it is very difficult, does anybody know about such a library, method, script or something, either free or commercial, to do so? Thank you. After viewing, I believe that you are looking for similar functionality in the table? One way to do this would be to have two tables, which were "frozen" rows (or pillars) that were frozen in your shape, and which were shrunk in size depending on falling or falling in size, how many There were fires.

interface - ASP.NET System.Web.Abstractions why were they created as an abstract Base class? -

In fact, from the top, I'm thinking that the reason for releasing the intangible as an abstract class in lieu of the Microsoft interface is ? I would be interested in any insights because the system for me file and directory. Something similar to the standard things like the IO facility, though I think an interface would look good? Instead there should be a good reason to select an essence, instead the fact is that it fits better in their assembly namespace, System.Web.ABSTRActions. Thanks I believe Phil (AAP.NET MVC team Haak) explained this decision on his blog: Check this post:

asp.net - IE8 not refreshing popup window -

IE8 shows an image with some basic javascript manipulators that a popup window is not refreshed I'm trying to check problems with IE 8 and ASP.NET 3.5, but I'm not fortunate enough with this research. So what am I doing? I have a tab container (AJAX control toolkit) that has a gridview on which you select it, it will show a popup with the selected image. I'm passing the image space through a session variable in Firefox 3.5 it always displays different images. Here the code for JavaScript is being inserted into the page: Dim javatext as new system. Text.StringBuilder () session ("ImageLoc") = path javatext ("Top = 100, height =", " 600px, width = 600px ("toolbar = no, location = no, menubar = no '); ") ClientScript.RegisterStartupScript (Me.GetType (), position = no, resizable = yes, scrollbar = Yes, ") javatext.Append," Show Metadia ", javatext.ToString ()) With different paths this code is in the grid v...

cocoa - NSString Retain Problems -

I'm having some problems with maintaining NSString. My problem is that this item on the second function (runItem) 1 does not matter, it does not matter what I set it, it seems that it's set to zero only. I am programming for coco (desktop versus iPhone), and I have this Type problem is not before NSString I'm not sure that I Because of what I am doing, so if someone can help me on this, I appreciate it! My code is in my AppController.h file: @interface AppController: NSObject {NSString * item1; } @protect (NSString * item1; - (IBAction) Run ITEM: (ID) sender; @end and AppController.m: @ synthesis item 1; - (zero) Wake EphronNiB: {NSDictionary * savedFile = [Contentofffile with NSDictionary dictionary: @ "user / me / desktop / testing.plist"]; If (saved file! = Zero) {item 1 = [field item saved: @ "item title"]; AppController * Runfunction = [[[AppController alloc] init]; [Runfunction Run ITEM: Self]; } Else {item1 = zero; }} - (IBAction) Run...

frameworks - Redirection problem in Java(Wicket) -

I have a page inherited from the webpage and protected by the square below: The public final category WiaAuthorizationStrategy implies IAuthorizationStrategy, IUnuthorizedComponentInstantiationListener {Private RealmPolicy roleManager; Private static WiaAuthorizationStrategy example; Personal WiaAuthorizationStrategy () {roleManager = RealmPolicy.getInstance (); } Public Static WiaAuthorizationStrategy getInstance () {if (Example == Faucet) Example = New WiaAuthorizationStrategy (); Return example; } Public Boolean Instantation is authorized (class component class) {if (ProtectedPage.class.isAssignableFrom (componentClass)) {if (WiaSession.get (.) GetUser () == faucet) {return false; } If (RoleManager.isAuthorized (WiaSession.get (.) GetUser (). GetRole (), componentClass.getName ()) // // WiaSession.get (). IsAuthenticated (); {WiaSession.get () SetAccess (wrong); return false; } And true back; } Back true; } Public Zero (Component Component) on Unknown Authorization (New Resum...

ASP.NET MVC routing - trying to have a name in the URL -

मेरे पास वर्तमान में निम्नलिखित मार्ग हैं: routes.IgnoreRoute ("{resource} AXD / {* pathInfo} "); routes.IgnoreRoute ( "{} संसाधन .gif / {* pathInfo}"); MvcRoute.MappUrl ("{नियंत्रक} / {action} / {ID}")। डीफॉल्ट के साथ (नया {नियंत्रक = "होम", एक्शन = "इंडेक्स", आईडी = 0})। कंसल्टंस के साथ (नया {नियंत्रक = ".. । "})। AddWithName (" डिफ़ॉल्ट ", मार्ग) .RouteHandler = नया MvcRouteHandler (); MvcRoute.MappUrl ("{title} / {ID}")। डीफॉल्ट के साथ (नया {नियंत्रक = "विशेष", एक्शन = "इंडेक्स"})। AddWithName ("view", मार्ग) .टाउटहेन्डलर = नया MvcRouteHandler (); स्पेशल कंट्रोलर का एक तरीका है: पब्लिक एक्शन रिजल्ट इंडेक्स (इंट आईडी) जब भी मैं अपने ब्राउज़र को http: / / Hostname / test / 5 , मुझे निम्न त्रुटि मिलती है: पैरामीटर शब्दकोश में 'non- 'स्पेशल कंट्रोलर' में 'System.Web.Mvc.ActionResult Index (Int32)' विधि एक पैरामीटर वैकल्पिक बनाने के लिए इसका...

perl - OpenOffice::OODoc stylize text within a paragraph -

I have a simple task to add a paragraph in which it has some formatted text, I can not understand the text to style Example Production: John Smith 200 Main Street Single My $ doc = odfDocument (file = & gt; 'Outputfile.odt', Create = & gt; 'Text'); $ Doc- & gt; Append paragraph (text = & gt; "John Smith 200 main street single", style => "optional paragraph style"); $ Doctor & gt; Save; I am reading documentation on CPAN I see that I can use the text style (element [, style]) to change the style of the existing element. Do I have to add text first in style? Please see and in documentation. Here is an example that you want: Use OpenOffice :: OODoc; My $ doc = odfDocument (file = & gt; 'outputfile.odt', create => 'text'); $ Doc- & gt; CreateStyle ("strong", family = & gt; "text", attribute = & gt; {"fo: font-weight" = & gt; "bold...

asp.net mvc - How to modify a value being roundtripped to an MVC action method? -

अगर मेरे पास एक साधारण मॉडल है: आदर्श: देखें: & lt;% = Html.TextBox ("प्रजातियां")% & gt; क्रिया-विधि (पोस्ट): पशु मॉडल मॉडल = नया पशुमॉडल (); // अद्यतन मॉडल UpdateModel (मॉडल); // अपडेट्स देखें Dataata.ModeState // सही वर्तनी अगर (model.Species == "catt") {model.Species = "cat"; } // वापसी दृश्य वापसी देखें (मॉडल); तो एक पोस्ट पर कार्रवाई विधि को 'बिल्ली' की वर्तनी को 'बिल्ली' में सही माना जाता है। समस्या यह है कि 'टेक्स्टबॉक्स के लिए स्रोत कोड 'वोडाडाटा.मॉडेलस्टेट से मूल्य लेगा, अगर इसमें' प्रजाति 'का मूल्य मिल जाएगा। इसका अर्थ है कि मेरा सही मान किसी पोस्टबैक पर अपडेट नहीं होता है क्योंकि 'कैट' प्राथमिकता लेता है। तो मैंने सोचा - आह अच्छी तरह से मैं इसे इस तरह स्पष्ट कर दूंगा: & lt;% = Html.TextBox ("प्रजाति", मॉडल। प्रजातियों)% & gt; हैरानी की बात है कि यह काम नहीं करता है और अभी भी ViewData.ModelState से मान लेता है। मुझे पूरा यकीन है कि यह MVC में ए...

Changing window position with javascript to a specific element? -

Say I have found a large list of elements that look stacked. How can change so that JavaScript can be displayed at the top of the specified element page in the list? Is this the way to major browsers (i.e. 6+, Firefox, Safari, Chrome)? Thanks This method scrolls The content of a window, the specified co-coordinate area becomes the top left corner of the viewable area. Both parameters are integers and they represent coordinate x and y in pixels. This method is only useful, where areas of the document are not viewable within the current viewable area of ​​the window and the visible property of the scrollbar of the window should be set to correct (enabled). At Viol and Agriev !;

Linux command within Javascript or PHP -

I have a Linux command line, which I need to execute either PHP or Javascript (PHP preference.) Command keygen AB3554C1D1971DB7 \ pc_code 365 However, I have a string like $ pccode on \ pc_code I want to change with where the user enters the generated PC code. This is for a legal project, but I get help when there is a problem with the creators of the program. Please help! It may be that this program is poorly written and its information output to stderr rather than stdout is. Or it may be that it is failing and printing (error) stderr error message correctly. In either case, shell_exec would not be able to capture stderr, however, you should be able to capture stderr by adding " 2> and " at the end of your order, that is : $ Result = shell_exec ('keygen AB3554C1D1971DB7 \ pc_code 365 2 & gt; and 1'); Echo '& lt; Pre & gt; Htmlspecialchars ($ results) '& Lt; / Pre & gt; '; Edit : For continuity, some of the...

c# - Any Ideas to Optimize the ASP.Net Server Load? -

मैं VSTS 2008 + C # + का उपयोग कर विकसित कर रहा हूं .NET 3.5 एक एएसपी.Net एप्लिकेशन को विकसित करने के लिए क्लाइंट की तरफ, सत्र को लाइव रखने के लिए, मैं हर 5 सेकंड में सर्वर को रीफ्रेश करूंगा। क्लाइंट साइड में मेरा कोड है, सर्वर पक्ष डिफ़ॉल्ट.एस्पक्स कुछ नहीं करेगा - एकमात्र उद्देश्य ग्राहक को जीवित रखने के लिए है। & lt; html & gt; & Lt; शीर्ष & gt; & Lt; मेटा http-equiv = "ताज़ा करें" सामग्री = "10" / & gt; & Lt; iframe src = "http: // स्थानीयहोस्ट: 20000 / डिफॉल्ट.aspx" width = "1" height = "1" / & gt; & Lt; / head & gt; & Lt; body / & gt; & LT; html & gt; मैंने यातायात की निगरानी कर ली है और हर बार पाया है कि क्लाइंट सर्वर के पक्ष में कुछ हेडर भेजेगा I सर्वर लोड या ट्रैफ़िक को कम करने के लिए कोई भी विचार? यदि ग्राहकों की संख्या बड़ी है, तो मुझे डर है कि सर्वर वर्कलोड में काफी बढ़ोतरी होगी। यहां पर अनुरोध और प्रतिक्रिया हैडर जो मैंने मॉनिटर किया है, अनुरोध है...