Posts

Showing posts from March, 2015

notifications - Properly displaying a tray balloon tooltip in PowerShell -

itemprop = "text"> short version : I think I properly implement events in PowerShell as that one Need help with using a Windows message result to get rid of the icon of a balloon tooltip Long version :. I have a long-running PowerShell command that I have to be notified when it completes in a system tray / notification area through a balloon tooltip. Are there. I was able to make a Wright-BalloonTip script (below) that does roughly what I want. The only problem is that, until I do not mouse over it, the tray icon does not disappear. By reusing the same global variable to represent, I am able to reuse this script and only have a system tray icon to keep it (unless I do not mouse over it). It still seems like a hack. I tried to add an event handler so that it will be notified on the event and after that it will be settled in the event handler, I tried all the three techniques I have suggested that there is no use to get rid of the lininging icon Happened. The ...

asp.net - Adding an ajax control toolkit accordion to a page throws a security exception -

I have my web This line is declared in the config file: & lt; Add tagPrefix = "Ajax" namespace = "Ajax controlToolkit" assembly = "Ajax controlToolkit" /> When I add an AJAX: Eardron for my webpage, I get the following error message: Security exceptions Description: Application No attempt is made by security policy to try. Please contact your system administrator for this application's required permissions or change the trust level of the application in the configuration file. Exception Description: System.Security.SecurityException: Request failed for permission of 'System.Web.AspNetHostingPermission, System, Version = 2.0.0.0, Culture = Neutral, PublicKeyToken = b77a5c561934e089'. If I comment on Ajax: Accordion, the error disappears. Try setting the in your web.config below & Lt; System.web & gt; & Lt; Belief Level = "Full" Genesis = "" /> & Lt; /system.web>

jvm - List of Clojure Compatible Java Virtual Machines -

To vote for a community wiki above "I used jvm without this clause I have used this jvm with the closure and problems are "Problems" " below " Specifying the problems of comments will help others to tell that the risk Whether it applies to or not. Sun Java 6 hotspot JVM

algorithm - Creating a formula for calculating device "health" based on uptime/reboots -

I have a few hundred network devices that check in our servers every 10 minutes. Each device has an embedded clock, counting in seconds and reporting the seconds passed on each check on the server. Therefore, the sample data set is shown checkinetime runtime 2010-01-01 02: 15: 00.000 101500 2010-01-01 02: 25: 00.000 102100 2010-01-01 02:35: 00.000 102700 etc. If the device reboots, when it checks back to the server, it reports a runtime of 0. Am I trying to define some types of quantitative metrics for the device's "health"? If a device has rebooted in the last few times but has not rebooted in the last xx days, then it is considered healthy, compared to the device which has a big uptime except for the previous XX days Besides, where it has been repeatedly rebooted, a device that is running for 30 days and has just been rebooted, should not be considered "distressed" in comparison to that device, which is the last 24 hours or last xx days A Has b...

What is the SQL Server timestamp equivalent in sqlce? -

I have some data with timestamp in SQL Server, I fancy to store that value in SQL I would like to mix together both values. What is sqlce equal to the SQL Server timestamp? timestamp The timestamp is a data type that automatically Exposes generated binary numbers, which are guaranteed to be unique within a database. The timestamp is usually used as a mechanism for version-stamping table rows. Storage size is 8 bytes. This value does not make sense outside of that database. In this way I do not know how it can be changed. In the non-Sybase / SQL Server database, I will use a version number or the last update column

python - Django generic views with multiple parameters -

Is it possible to use normal view with additional parameters in URL mapping - that is, I found the following model: Root of class (models.Model): area = model. Exotic (region) slug = models.SlugField (tap = true, empty = true) @model Statue def get_absolute_url (self): Return ('url-mapping: code> url (r' ^ (? P & lt; Area & gt; [- \ w] +) / (? P> slug & gt; [- \ w] +) / $ ',' routes.views.route_details ', name =' route_details Def path_details (auto, area, slug): route = get_object_or_404 (root, slug = slug) returns render_to_response ("route / route_ command html" , {'Route': route}) As you can see, I'm actually identifying the bus route through route slags and To resize the slug bus URL (e.g., routes / central-park / mouse rock ). Can I do the same using a normal view? Sure, something like this: url (r '^ (? P & lt; area & Gt; [- \ w] +) / (? P & lt; slug & gt; [- \ w] +) ...

iphone - Smoothing a rounded stroke in Core Graphics -

I am making my own UITableViewCells with a gradient background. I have worked all the logic and drawing, but the one that I want to fix is ​​"chunky" around the corners of my custom cell: If you have corners, you See what I'm talking about. Here is the code that I am using to generate cells: CGCTXT C = UigRxGroupCertexConnect (); CGColorSpaceRef myColorSpace = CGColorSpaceCreateDeviceRGB (); CGGradientRef myGradient = Zero; CGFloat component [8] = TABLE_CELL_BACKGROUND; CGContextSetStrokeColorWithColor (C, [[UAColor colorWithWhite: 0.7 alpha: 1] CGColor]); CGContextSetLineWidth (C, 2); CGContextSetAllowsAntialiasing (C, Yes); CGContextSetShouldAntialias (C, Yes); CGFloat minx = CGRectGetMinX (RECT), MIDX = CGRactgetMIDX (RECT), MAX x = CGTXxX (RECT); CGFloat miny = CGRectGetMinY (Rect), maxy = CGRectGetMaxY (rect); CGMutablePathRef Path = CGPathCreateMutable (); CGPathMoveToPoint (path, NULL, minx, miny); CGPathAddArcToPoint (default margin of path, NULL, mix, ...

winapi - How to check if a file is open -

I need to check whether any other file in a folder is open by other applications. Unfortunately, if a file is open, GetFileAttributesA () returns the wrong value. Is there any remedy for this or am I doing something wrong? GetFileAttributes The way that somebody has opened the file (which can prevent you from opening it), it is to try to open itself. bool , GENERIC_READ / * | GENERIC_WRITE is a part of /, 0, // 0-any null, open_real); If (hfile! = INVALID_HANDLE_VALUE) {CloseHandle (hfile); return false; } Return (GetLastError () == ERROR_SHARING_VIOLATION); } But you do not like to write this function, because when you come to open th file for processing, you can open the file in any other application. The only safe way to do this is to do what you want to do with the file, and when you try and open it for processing, note the error value if you fail Once you have the file open, you should keep it open until you can do it or some other process can open it behind yo...

iphone - How to drag the url in WebView and drop to a textlabel -

I have a webview and want to drag url into textile on weblev. I know that there is an option to 'copy', but I like to do it in simple computers as a dragroop function. Is it possible for the iPhone app? Any comment thanks interdev I'm thinking that you drag and amp Unfortunately I suspect that this is trivial, if for everyone, a hyperlink drop from an HTML page given in a UIWebView control Please. A UIControlEventTouchDown event received by the UIWebView object is not a documented method to kill a raider hyperlink and find out the URL of the hyperlink. If you were able to do this, you still have to create a custom view and can be shown which will touch the touch and after pressing it will be detected that when the user leaves it , And if it comes to desired destination control.

.net - What are pros/cons to DevExpress Reports? -

I'm looking at a new reporting tool and it looks great. I did not get any discussion on them, so we go here. Do you have a problem with the report format, and save the reports to a database? Any common performance problems? The End User Report Designer's Work? How does this work against SSRS? (It seems like a normal benchmark) Note: We already use DevEx, so the price is not a problem for me. Additionally, we prepare complicated reports for our customers. , But (hopefully) they will also prepare their reports. 1- There is no problem saving the formats or saving the reports in the database, check their website 2- Very fast ... 3- You can use it to allow the end user to create the report, it only works on windows applications It does not support web applications To allow customers to create their own reports, they need to understand their database structure and you should provide them a good way to write the interface query and then pass it on the Report...

asp.net mvc - How to get started with Linq to sql? -

I am developing a new web application that will be simple and I have a ASP.NM Decided to use SQL from MVC and Linux. I do not know about SQL yet ... How to get started with Linq from sql? What should I see when using linq to sql?

powershell 2.0 try catch how to access the exception -

यह PowerShell 2.0 में पकड़ने का प्रयास करें $ urls =" http://www.google.com "," http://none.greenjump.nl "," http://www.nu.nl "$ wc = नई ऑब्जेक्ट सिस्टम। नेट। वेबक्लेक्चर विदेशी ($ url में $ url) {{$ url $ परिणाम = $ wc.DownloadString ($ url)} को पकड़ें [System.Net.WebException] {[void] $ fails.Add ( "Url webfailed $ url")}} लेकिन मुझे क्या करना है, कुछ ऐसा है जैसे c # पकड़ (वेबएक्सेशन पूर्व) {लॉग (ex.ToString ()); } क्या यह संभव है? ऐसा कुछ करने की कोशिश करें: प्रयास करें {$ w = नया ऑब्जेक्ट नेट। वेबक्लाइंट $ d = $ w.downloadString ('http: // foo')} पकड़ [ Net.WebException] {लिखें- होस्ट $ _। अपवाद.ToString ()} अपवाद $ _ चर में है आप $ _ इस तरह से एक्सप्लोर कर सकते हैं: प्रयास करें {$ w = नया ऑब्जेक्ट net.WebClient $ d = $ W.downloadString ('http: // foo')} पकड़ [नेट। वेब एक्सपेक्शन] {$ _ | मुझे लगता है कि यह आपकी सभी आवश्यक जानकारी देगा। मेरा नियम: यदि कोई ऐसा डेटा है जो प्रदर्शित नहीं होता ...

C# and C++ Synchronize between processes -

We have 2 apps written in C and another C ++ is shared between these processes in a counter ( In Memory) we need to maintain each time one of these applications starts, it should check and extend this counter and every time the application is shut down it needs to reduce the counter. If the app has a crash or shutdown using the Task Manager, then we also need a counter to reduce it. We think about using OS synchronization objects such as MUTEX. My question: What type of sync object is best for cross process (when there is a C # and other C ++) Hope that my question was clear. Thank you very much, etc. Varda with the nominated Sikram It may be far away Semofor is basically a count, it is to allow the developer to limit the number of threads / processes that reach some resources. Usually this works that you make a semaphore with the maximum count N. N Thread Wait for this function call, WaitForSingleObject or similar and every one of them is waited every time the in...

wpf - Do I always have to write a converter for date-formatting? -

I often use textboxes in my wpf-projects which are bound to datetime-propertys. I want to format the dates in German format dd.m.yyyy . Currently I do this with a written converter, which I can give the necessary date format. For example: & lt; Text box name = "date" text = "{binding relative source} = {reliability mode = search installers, exterior type = {x} type prize: mibro}}, path = date, converter = {static resource debug controller}, converter piramat = DD. MM.Yyy}} "/> The only thing that converts is, ToString (string format string) - The method of calling time is to call. Would it be smart to format a date with 'data binding', if there is no need to write C # -Code, maybe there is an existing class in Microsoft-Libs, which is a date- Such a date-conversion can be done for binding, but I have not found it yet. If there is any advice then it would be great, Greetings, Martin is the stringformer in .NET 3.5 SP1. ...

c++ - Getting input from user using cin -

I am using the Turbo C ++ 3.0 compiler When using the following code four * names; Cin & gt; & Gt; Name; Cout & lt; & Lt; Name; When I input with space ... only the only saving character that was typed before the space .. like I had given the input "QWERT YUIOP" ... in the name "QWERT" Will happen; Why any explaination ?? You need to allocate space for the four arrays in which you want to read the name Four * names; will not work because it only declares a four indicator, not the four array the name of the character [30]; In addition to cin & lt; & Lt; Only allows us to enter a word in the string (four names [30]). However, there is a canon function that reads text containing text. Receive cin.get (name, MAX) All characters, including spaces, will be read or line characters after reading the maximum characters ( '\ N') and will put them in the name variable.

c# - How to retrieve pair of columns from a DataTable as a Dictionary -

I have a datat that has a simple key value added. How do I return a dictionary object (DataTable.AsEnumerable ( ) code dict = DataTable.AsEnumerable (). ToDictionary (R = & gt; r.Field & lt; String> ("KeyColumn"), r = & gt; r.Field & lt; DateTime> ("ValueColumn");

.net - Why Microsoft is still sticking to COM technology -

Is there any reason that Microsoft is still sticking to COM technology (Office component still COM). What happens to a .NET with a better and efficient way One reason Microsoft's products bloat For the backwards is the focus on compatibility, the vast number of offices manipulate the office via COM, and they will break all, if not MS He dropped it. COM integration was the first time Microsoft's customers had to do this. Customers feel totally awkward if they have to rewrite all their apps to use another integration method. This, or they just want to be with Microsoft's older versions, upgrade treadmill will be very slow, and MS does not want it.

visual studio 2010 - Do I need anything other than VS2010 beta 2 to use "Code Only" in Entity Framework 4? -

Is it possible to use "only code" with the unit framework in the box of VS2010 beta 2, or do I have some additional downloads is required? It should work in Beta 2, but, which is an add-on for beta 2.

.htaccess - Forcing users to access the site with www. and https -

I am trying to write an .htaccess rule that connects to www and https if necessary, in HTTPS , But I can not get a set of rules or rules that works for each case. There are cases ... \ - just work should be done \ - should go \ - / P> \ - - should go Any help greatly appreciates. Try this rule: RewriteCond% {HTTPS} ! [OR]% {HTTP_HOST} on RiverCount! ^ Www. RewriteCond% {HTTP_HOST} ^ (www \.)? (. +) Rewariyitium ^ https: //www.%2% {REQUEST_URI} [L, R = 301] This should cover both cases where either the request HTTPS (first Condition) or host www (second condition) does not start with. In that situation, the third condition starts with host www (if present), which is then used in the replacement of the rule.

.net - Is there a Query-Mapper like iBATIS.NET but with dirty tracking, lazy-loading and cascading updates? -

समस्या: एक संग्रहित प्रक्रिया-केवल जनादेश के साथ एक DBA- नियंत्रित डेटाबेस एक उम्मीद है कि डोमेन को POCO में परिभाषित किया गया है। इसलिए मैंने तय किया है कि मुझे संग्रहित प्रक्रियाओं और / या विरासत डेटाबेस के लिए डिजाइन किए ORM की आवश्यकता है। मुख्य रूप से ORM मुझे सीआरयूडी संग्रहित प्रक्रियाओं को घोषित रूप से (या आसानी से) मैप डोमेन ऑब्जेक्ट की अनुमति देनी चाहिए। कुछ निष्कर्ष इस प्रकार दूर हैं: NHibernate काम करेगा अगर केवल मैं आलसी-लोडिंग के लिए उत्पन्न होने वाली क्वेरी को नियंत्रित कर सकता हूं। iBATIS.NET पूरी तरह से काम करेगा, लेकिन मुझे कोई भी उदाहरण नहीं मिल सकता है : ऑब्जेक्ट स्टेट ट्रैकिंग (नया / अपडेट किया गया / हटाया गया / आदि) माता-पिता / बच्चा प्रतिबद्ध लेनदेन (यदि माता पिता को अपडेट किया गया है, तो सभी गंदे बाल ऑब्जेक्ट भी अपडेट करें)। एक इन-हाउस विकसित किया गया ओआरएम जो हमारे डेटाबेस कॉन्सेप्टेंस के साथ काम करता है, एक विकल्प होता है और हम इसके साथ पहले ही शुरू कर चुके हैं। लेकिन मुझे यह सुनिश्चित करना है कि हमारे पास कोई अन्य विकल्प नही...

asp.net - Caching WCF Proxy? -

I am trying to use the channel factory and caching it in my asp.net mvc. I'm using the example mode per session because I need to know the state. For this reason I can not immediately stop the proxy and I do not want to reopen it, shutting down the proxy every time I leave the proxy, it ends in 12th time. I can end the time of the concurrent session, but I want to know whether it is the right approach to go. I'm new to WCF. So sorry if my question is stupid, thanks to Pratt in the past The answer is probably Forms activating the sliding expansion property in the Certification Element, although by default it is turned on, with each call, the timer is reset to the timeout value so that the session is actively used. View this Edit - Reply to Comment: Yes, when the session expires, you will be able to reuse services You will need to re-initialize before it can be done. You should set the timeout value to the length of inactivity (in minutes), which you believe the us...

c# - How do I find out what user my ASP.Net MVC application is running as? -

I want to show the Windows user that the application is being run on the diagnostic page on my ASP.NET MVC database check page To check whether they are setting up their IIS correctly, where can I get this information? I tried the system. threading. Thread Custom Principal. Identity name. But it appears that the entry form by the user is not by authentication, as the built-in window user is running the code. WindowsIdentity.GetCurrent (). Name

c++ - Static library API question (std::string vs. char*) -

I have not worked with fixed libraries before, but now I need it. Scenario: I am writing a console app in Unix, I can easily use std :: string everywhere because it is easy to do though I recently found out that I would have to support it in Windows and for a third party my code would need an API (I would not just share the source, only DLL). Keeping this in mind, can I still use std :: string in my code everywhere, but they can not be used by char * Can I provide API codes when I do? Will this work? Yes internally use std :: string and then the interface Use const char * on the function (which will be converted to std :: string s.

c# - WriteFile vs TransmitFile for large files that need to be deleted from the server after transfer -

I have to trigger user downloads of large files in the web browser, where I am creating a file to transfer to the server , Then remove it immediately afterwards i get enough examples that i probably should use the feedback. Transmission file or Response The Vir file ... but has problems with both: The file is synchronous, but it buffer the file in memory before sending the user as I am working with very large files , So it can cause problems. The transmit file does not buffer locally, so it works for large files, but it is asynchronous, so I can not remove the file later Calling transmit file clearly guarantees the file flushing Is not it that I can remove it either? What is the best way to deal with this? Here also there is binary ... I have to copy it into sections, through the loop file stream? Here's a good solution that uses transmit files, but you Simply replace the logging with the file removal at the end.

how to build vim with cscope feature enabled -

Since the VIM I used does not have a cscope feature, I use the CSCP to retrieve the VIM from the source code Have to make. After a little Google, I did not get "how to answer really", then turn to the stack ** for help. wget failfast. Puff Vim.org/pub/vim/unix/vim-7.2.tar.bz2 tar -jxvf vim-7.2.tar.bz2 cd vim72 ./configure --enable-cscope Install If the .configure line fails, be prepared to set the header for the required libraries. If you are using your distribution package manager, they will usually be in the -dev version of the library package. For more information, check the available configuration options: ./configure --help

java - How to create an alias for a private inner class (using XStream)? -

I'm making nickname for long class names ... it works perfectly well, but the serial key One of the classrooms is private. Internal orbit I can not think of a way to make a surname other than making it public, I do not like this solution, because it should not be public in the first place. But making aliases for this will help to change the names of packages and class names without modifying xml files (because the first tag is fully qualified category name). In this way I am making nickname: xstreamInstance.alias ("Class Alayas", OuterClass.InnerClassToAlias.class); That's why I need public access in that internal classroom. Therefore, if anyone knows the name of a private inner class, then I really want to hear about it. You can write about the You can create a class like the following and the alias method for xstreamInstance the parents of the public class {public zero Surname (Xstream X) {x.alias ("Kidi", parent, child class); } Pri...

Find command in unix -

I want to execute a search command in a directory, and exclude all the files from the set of results .gif, jpeg, And .class. I was thinking that someone could help me, I wanted to play with the regex option, but clearly I am not doing it properly. Something like this: find \! -name '* .class' \! -name '* .jpeg' \! -name '* .class'

sql server 2005 - Find out If index and table statistics are out of date -

मैं पूर्ण स्कैन साप्ताहिक के साथ अनुक्रमणिका को अपडेट करता हूं। इसलिए जब मैं चलाता हूं: SELECT नाम AS अनुक्रमणिका_name, STATS_DATE (OBJECT_ID, index_id) एसएएसएंडएक्सएक्स से अद्यतन। रेफरी: मुझे उम्मीद है कि यह मुझे दिखाएगा कि सभी सूचकांक इस सप्ताह के अंत में अद्यतन किए गए थे। लेकिन ऐसे कई रिकॉर्ड हैं जो दिखते हैं: index_name StatsUpdated क्लस्ट 2005-10-14 01: 36: 26.140 क्लस्ट 2005-10-14 01: 36: 26.140 इसका क्या अर्थ है? और, मुझे कैसे पता चलेगा कि आँकड़े पुराने हैं (यदि मुझे पूर्ण स्कैन के साथ आँकड़ों को अपडेट करने की आवश्यकता है तो अधिक बार) धन्यवाद। जैसे "क्लस्ट" नाम के साथ वे शायद सिस्टम सारणी और अनुक्रमित होते हैं। चेक करने के लिए इस फ़िल्टर को जोड़ें: जहां ऑब्जेक्टप्रोआरटीटीईएक्स (ऑब्जेक्ट_आईडी, 'आईएससिस्टमटबल') = 0

A book about Ruby On Rails for the Ruby illiterate? -

Is there a book about Ruby on Rail, which has no information about Ruby? Although Ruby on Railals is a good reason to start learning Ruby, if I want to read a book about Ruby on Rail and complete book on Ruby, I would be bored with my pants. Something indicates that the fundamental principles of both Ruby and Ruby on Rail are an ideal introduction to this world. Excel Web Development (Thomas, Honeymeyer Hansson) with rail is a good identifier for rail, and Ruby appears slowly in the way, you do not need to know Ruby to read it.

xhtml - HTML - how to make an entire DIV a hyperlink? -

इस सवाल का पहले से ही एक उत्तर है: 24 उत्तरों मैं एक संपूर्ण कैसे करूँ DIV एक क्लिक करने योग्य हाइपरलिंक अर्थ, मैं अनिवार्य रूप से करना चाहता हूं: & lt; div class = "myclass" href = "example.com" & gt; & Lt; div & gt; ... & lt; / div & gt; & LT; तालिका & gt; & lt; टीआर & gt; .. & lt; / टीआर & gt; & lt; / तालिका & gt; .... & lt; / div & gt; और जब भी कोई माईक्लस DIV का होवर करता है, तो मुझे एक क्लिक करने योग्य हाइपरलिंक होने के लिए पूरे DIV चाहिए। आप div पर जावास्क्रिप्ट के लिए onclick जोड़ सकते हैं। & lt; div onclick = "location.href = 'newurl.html';" & gt; & amp; nbsp; & lt; / div & gt; संपादित करें: नई विंडो के लिए & lt; div onclick = "window.open ('newurl.html', 'mywindow');" शैली = "कर्सर: सूचक;" & gt; & amp; nbsp; & lt; / div & gt;

executable - Install wizard for my windows form application - or not? -

I'm thinking of requiring an established wizard for my small Windows form application. There is no database access, only file on a shared network drive. I have seen many times when executed in an email, copied to a desktop and used. An 'installed wizard' is being used to set up an animation. Is it needed or not? And if I want to use one - what should my windows have been added to the form app? If your app is actually just an .exe file, then it's probably ok to distribute it As for without an installer It would be better for more advanced users, because they do not have to worry about installing broken / unwanted ones - they can only be removed from the file and can be done with it. On the other hand, most Windows users are used to work with installers, and are used to create shortcuts automatically on desktop or start-> programs, this is where An MMSI can really help. In addition, the use of an installer will usually put your application into the ...

c# - Is ASP.NET MVC's FileStreamResult less efficient than writing directly to the Response Output Stream, or am I missing something? -

First of all, I do not have any criticism about this question as love asp.NET MVC. Instead, I want to confirm what I am thinking and I will ensure that I have not left anything. Stay with me ... I can not go on without question providing a little context. In response to an HTTP post, you have to query the data back into a stream, in the earlier days of ASP.NET MVC, you can do your data directly by piping in the Response stream. For example, you can do something like this: Some Objects DumpApotputTovAstream UIHDact. Write (Response .uputup stream); See the main aspect of this code: I did not apply any backing store I did not need to stream information in the byte array, Instead of dump into the temporary file, ASP.Net had already installed a stream for the purpose of communicating the response in the browser, and I have put that stream directly into that stream. In the case of CPU, memory and execution time, it is more efficient than copying all the data from some tempor...

Zend: Strategy for admin login -

itemprop = "text"> The user belongs to the guest, and he reaches when / admin / I think the redirect For / admin / login and when a user is in the default module and accesses a resource in which it does not have access, then I will call it at / error I want to redirect. Let's assume that / admin is a module, how can I complete it? Here I have so far:? & lt; Php class KG_Controller_Plugin_Acl extends {Zend_Controller_Plugin_Abstract {public function __construct (Zend_Acl $ ACL, Zend_Auth $ certification) $ this- & gt; _acl = $ ACL; $ This- & gt; _auth = $ auth; } Public Function preDispatch (Zend_Controller_Request_Abstract $ request) {$ auth = $ this- & gt; _auth; If ($ auth-> isiDentity ()) {$ identification = $ auth-> GetIdentity (); $ Roll = stroller ($ identity-> role); } And {$ role = 'guest'; } $ Controller = $ request-> Controller; $ Action = $ request- & gt; Action; $ Modules = $ request-> Module; I...

php - How to store configuration settings for web app? -

I have some site metadata, I want to change ... for example, in my application, if sysadmin didn site Wants to use the "inventory" part of, it can turn it off, and it will disappear from the main site. So I was thinking, maybe I could create a table, my database is called "meta", and put value (or tubal) there! Then, if a module is closed, then the script will update the line, and set the "module x" to 0, and I will be done with it, right? Except that it is an overhead for a set of very awesome values ​​(creating a complete table, maintaining, etc.) ... In fact, my solution is to move a square peg in a circular slot Sounds like The Drupal database did not get anything, and I'm guessing they themselves use a configuration file on the server? If that's the case, then I do not know actually one. The values ​​saved in the Cfg file can be read by the web app (for example), and I do not know how to save information to such an app file. I apprec...

open source - What tool would you use to find security holes in Google Chrome -

I want to know from security experts and hackers that what type of device Will you use? And what programming and testing techniques are you using? I'm especially interested in open source tools running on Linux. Google plans to pay $ 1337 for key bugs. Thanks and happy hunting! Just my opinion, If you do not have experience in the software, Developing some common applications / web apps to exploit skills, then trying to get money from Google. All of the freelance developers are about $ 500 after two days Finding exploitation is a difficult task and actually requires a great knowledge of computer work. There are many techniques to find exploitation, but none of these is automatic. If it was just using one tool, Google itself would have been like this. You can try some basic tools, but in reality it is not certain how it will behave with a browser.

osx - How to make the apple script file configurable ? can apple scipt file, shipped from window? -

In the script editor, I have written a command to boot the jar. The shell script "cd / desktop / runzer / java work runmere jar" and saved as a script file in the form of an application. Run when I click on the script file jar. As Apple script file is saved as an application We can not open the file on the Window OS, so we are configuring such a script file in this way That any Users will only run that script file and the script will automatically get the name of the current directory and write the CD / desktop / runner Instead of running the jar; OR We can say the ability to ship the script with the blank value of the variable the current director and the user can open And its working directory can specify its working directory I need The Apple Script file automatically captures the current directory (/ Desktop / Run / ) In which the JAR is being executed. Or can we send an Apple script to a MAC user from Windows and the user can ask to open ...

c# - how to protect application files from being modified? -

I have a windows app that I created with Visual Studio 2008. Some graphical files in this application like jpeg.i are a setup for this appreciation but I worry that such files are being modified by the client. Would you please help me how to protect those files? To detect this kind of tampering, you can get your graphical file from your application (or other assembly) Load) as a resource and should use it. Regardless of this, it can prevent most people from changing their resource files.

asp.net - When building a datagrid helper, how do you access the new data annotation attributes using Reflection? -

After I have eagerly added the name of the system.ComponentModel.DataAnnotations to my model. I am involved in Ve: [required] [DisplayName ("first name")] public string first_name {get; Set;} I really like these properties, because they save me from writing custom T4 and / or modifying it in a heavily modified format. In this way, I can rebuild a belief that it will add display names to my name. Etc. The problem comes when I started constructing one-driven Data Grid Assistant in ASP.Net MVC 2. In this assistant, Stephen uses reflection on column headings. value = typeof (t) .GetProperty (columnName) .GetValue (item, tap) ?? String.Empty; Well, the problem is that I do not want to retrieve the name of the property. I want to retrieve the value for the DisplayName feature. My first attempt at this was to look inside the properties properties of property properties. Unfortunately, no data annotation is visible as a feature. Is there a way to get data annot...

Why Dumping a .NET Process Increases Memory Usage -

We have a .NET service using ~ 30 MB of memory at startup. (VM ~ use mem =) I dump this process and what those 30MB wanted to find out CDB debugger generated mini dump increased mem usage by 100 MB . From the dump - I can see (DLLs) those were 100 MB image memory ----------- ----- ---- Usage Summary -------------------------- Tot Siez (KB) PCT (Totes) PCT (Busy) Use 2d07000 (46108) : 20.02% 28.45% Kshetrupyog Aisaviadi 761 C 1000 (1 9 35024): 92.27% 00:00% Kshetrupyogi 64 B-0000 (103104): 04.92% 63.62% Kshetrupyog Ayoji 900000 (9216): 00:44% 05.69% Kshetrugstakt 9000 ( 36): 00.00% 00.02%: RegionUsageTeb 380000 (3584): 00.17% 02.21%: RegionUsageHeap 0 (0): 00.00% 00.00%: RegionUsagePageHeap 1000 (4): 00.00% 00.00%: RegionUsagePeb 1000 (4) : 00.00% 00.00%: RegionUsageProcessParametrs 2 000 (8): 00.00% 00.00%: Re GionUsageEnvironmentBlock Tot: 7fff0000 (2,097,088 KB) Busy: 09e44000 (162,064 KB) mem use is high left, long after the debugger is different I know what this image...

scripting - How to spawn several processes from the Windows shell and wait for them all to complete? -

I want to do the following from Windows Batch Script: Start proc1.exe Start proc2 .exe ... start procN.exe & lt; To complete all the N processes & gt; & Lt; - What do I do here? How do I complete the fully-prepared processes? It's ugly, but you can enter each command in another batch file Which can execute the command and then the signal is completed your main batch file calls each batch file asynchronously and sits in the loop waiting for the signal. For example: main.bat Start CMD / C proc1.bat start CMD / C proc2 .bat: Waiting Sleep 1 If wait already proc1done wait before proc2done goto wait del proc1done del proc2done echo all the processes are complete proc1.bat proc1.exe echoed & gt; Procap1done Sleep command is available. If you do not have this, you can use ping on the local host to slow down that tight loop.

django - Get last record in a queryset -

मैं एक निश्चित ख़तरनाक में अंतिम रिकॉर्ड कैसे प्राप्त करूं? आप बस ऐसा कुछ कर सकते हैं, इसका उपयोग कर: queryset.reverse () [0] इसके अलावा, Django दस्तावेज़ीकरण से यह चेतावनी सावधान रहें: ... ध्यान दें कि रिवर्स () को आम तौर पर केवल एक QuerySet पर कॉल किया जाना चाहिए, जिसमें एक परिभाषित क्रम (उदाहरण के लिए, जब कोई मॉडल जो कि एक डिफ़ॉल्ट ऑर्डर देने को परिभाषित करता है, या order_by () ) का उपयोग करते समय क्वेरी करता है। यदि कोई ऐसा आदेश किसी दिए गए QuerySet के लिए निर्धारित नहीं है, तो रिवर्स () पर कोई वास्तविक प्रभाव नहीं होता है (आदेश reverse () कॉल करने से पहले अपरिभाषित था , और बाद में अपरिभाषित रहेगा)।

authentication - Git-SVN clear auth-cache -

How can I forget the svn authentication details to git-svn? We have a pair of machines running Windows Server 2008 on which we have a GIT repo and we check in a central defect store. Every time I check in, I would like to point out my colonist certification details for the guitar. I have removed subversion files under% APPDATA% \ subversion \ auth \ svn.simple. Now whenever I use a regular Demolition customer, then send me your Subversion Oath Is inspired, but git-svn still remembers the credentials. Anyway, can I forget the authentication details? % by HOMEPATH% Clear Svn Authentication . It resets the svn authentication and gives the git prompt for the next time the username Note that I first removed the authentication below the% appdata% \ subversion \ auth \ svn.simple and it worked does not.

dokuwiki - Wiki with good support for page moves? -

We use dokuwiki to manage our internal documentation, but the name of the page varies / moves very well (There is no built-in except for manually messing up the raw files and the third-party plugin 'pagemove' is no longer developed). Which is a pain. I'm looking for an option that would be as simple as DokuKI (should be filesystem-based), but the name / operation of the page should be handled well. any suggestion? Starting and classifying data backend, a lot of file system based wiki is given below or webpages The following viable candidates emerge by touching: (after installing a plugin) Finally, to decide which of the following is most appropriate to your needs & amp; Supports migrating your existing content to a new wiki (a small achievement), but at least this is a start.

haskell - What do the parentheses signify in (x:xs) when pattern matching? -

When you split a list using x: xs syntax, then why is it wrapped in parentheses? What is the importance of brackets? Why not [x: xs] or just x: xs? Opposition cell should not be bracket in every context, but in most contexts it is because The function application becomes harder with any infix operator. Burn it into your brain in a fire letter. Example: length [] = 0 length (x: xs) = 1 + length xs if leaving the parentheses The compiler will be thought, then you have got a logic x after an unlucky infix operator, and this bitter complaint will be done on the other hand it is ok length L = the case l] - & gt; 0 x: xs - & gt; 1+ length xs In this case neither x and xs possibly a function can be applied as part of the application Therefore there are no brackets required. Note that the same unique rule function makes the application harder with any infix operator which is why we write 1 to write length xs Allows + length xs without any bracke...

flash - Actionscript on change handlers -

I have been changed by JavaScript using a text box (dynamic) whose value is set variable method Actually now I am stuck in recognizing the flash app when the text box value has changed, onKeyUp etc. Does not seem to work. The code below works if the user types in the box, but if it changes via JS then this does not take effect, not by populizing my variable. Should the listener use me? someListener = new object (); SomeListener.onKeyUp = function () {var stationname = stationbox; Var test = "station:" + StationName; Trace; _global.StationNameGlobal = Stationbox; Outputct = "test"; } Key.Dalal (some listener); Instead of waging direct data inside the text box instead to root your JavaScript call An internal functional function that will replace / attach both data and synchronize the program with your on-change function synchronously. For example, if you have a flash movie and give an object and embed the same ID example: & lt; Object id = ...

asp.net - Failed to Map Path '/doc'. server.map path -

If I run the site using the internal Visual Studio Web server, then I failed to map the path error. It seems that there is a security problem. I think you have the actual studio 2008 and Vista or Windows seven. Launch Visual Studio with the administrator, and the problem should be missing.

c++ - Correct way to distribute VC++ runtime files -

I have an MFC application that I am trying to package for deployment seems to be that file 'msvcr90.dll ',' Msvcp90.dll 'and' mfc90.dll '. What is the right way to distribute these files? I can not use merge modules because my installer does not support them. I know that I can run VCREDIST_x86.exe, but I do not want to do it for a number of reasons. As far as I can see, my only option is the Private Side-by-Side Assemblies. Is it true? According to the correct method of setting up a private assembly, copy 'Microsoft.VC90.CRT' and 'Microsoft.VC90.MFC' folders as executable in the same folder. Is this the right way to solve the problem? It works, but in order to copy the system files in such a way, it looks like 1990 can someone show me an example of another application (or at least one demo project)? Finally, why do I need to worry about the distribution of a manifest file for my application? Do I want to explicitly set up the XML file...

php - I can't delete an Event Feed with Google data API -

Hi friends, I'm trying to remove many incidents from the Google Calendar API (from a date range). I get the feed correctly, this problem is not Probleme removal function. I get this error: "Error: You have to specify the URI to post." Can anyone help me out! Thanks $ Service = New Zend_Gdata_Calendar ($ customer); $ Query = $ service-> New event (); $ Query-> SetUser ('xxxxx'); $ Query-> SetVisibility ('Private- XXXX'); $ Query-> SetProjection ('full'); $ Query-> SetOrderby ('StartTime'); $ Query-> SetStartMin ('2010-01-20'); $ Query-> SetStartMax ('2010-01-28'); // Recover event list from calendar server {$ eventFeed = $ service-> GetCalendarEventFeed ($ query); } Hold (Zend_Gdata_App_Exception $ e) {echo "error:". $ E & gt; GetMessage (); } // Repeat through the list of events, by removing them // foreach ($ eventFeed as the $ event) {try {$ event- & gt; Delete (); } Hol...

java - Why this is not possible in C# Generics? -

A colleague told me a strange case in C # (though this is not really strange) You have a class employee if you want to create a general list, you can do this: list & lt; Employee & gt; X = new list & lt; Employee & gt ;; I understand that I need to pass the type of employee in the general list so that I can know the essential types of information about the employee and generate those methods which are relevant to the employees Return and accept the parameters. Now my question is, why is not it possible to do the following? employee x = new employee (); & Lt; Typeof (x) & gt; List = new list & lt; Typef (x) & gt; (); The necessary information for the list should not be sufficient to know, to create the list? In other words, the type of X that is the type of employee has now been passed as a generic type parameter to list, (as I believe) the same type of list (in this case the employee). I know that something like this is available...

Software serial port loopback on linux -

Currently I need to develop some programs that will communicate with Cisco devices on the serial line. I want to build a testing environment on my development Linux machine. So, I got the mobility of the sync emulator, this emulator could provide the interface through the serial line with the option '-U / DEV / TTI 0'. Well, this causes mobility to open the hardware serial port and communicate through it. I can connect from this hardware serial port to another Linux machine with a serial client like MiniCom. However, since I am using virtualboxes for both Linux machines, I am linking to serial ports through the ability to forward virtualboxes. Serial Port for Named Pipe This scheme is working, but it is very typical I am looking for a method to run mobility and minicom on a Linux machine. I found that the pseudo terminal can be useful in my case. But I have tried to run the dynamics with'U / Dive / PTX 'and then created with minisque / dev / pts / ... port and i...

Find text autoscroll in MFC CRichEditView -

I have an application with a CRICHEditView, and I want to find text in it. By creating a "Find" menu item with ID_EDIT_FIND, the view opens the search window and the text is found by highlighting. But ... this view has not been scrolled, so if a text is shown below 100 lines, then that is what do the control autoscroll so that the item will always appear ? OK, answer: ctrl.SetOptions (ECOOP_OR, ECO_AUTOVSCROLL); The move was :)

agile - Building PHP Competencies in an organization -

This is not really a technical programming question, but it is more with best practices and programming / project management processes. Here are some background information: I am a consultant with an agile software development company which specializes in Java, J2EE, Flex Technology Stack. Here generally it is believed that many people are not marked with the quality of PHP people, compared to Java, etc. compared to projects. When I often face that claim, I believe that there is an overall constraint to enter PHP, which sometimes attracts low-quality people who do low-quality jobs. For us, the quality comes first. During the next few quarters we are also looking to develop a high level of qualification in PHP. And we want to achieve the highest level of quality and our process should be such that we are continuously improving all the time while starting at a higher level. Our new recruiter is going through a rigorous selection process where technical assignments have a lot ...

java - Is it okay for constructors to throw runtime exceptions? -

When a constructor is disconnected from the methods examined, which can not handle the constructor, OK to throw out as a runtime exception, if you have a confirmation that this app can not handle it and will be useless without creating the object? Yes, in many constructors they are indispensable when they call other methods because always a possibility That they will throw an unsolicited exception in advance.

How to create a live feed using Rails -

I am trying to create a live feed block that identifies the latest data added in the forum related discussion and automatically Updates a block on the second page from the latest post on that platform I am using Ruby on Rail and I would appreciate any help on this. (If my question is not clear, I hope I can be more specific with one of these examples). I am trying to create some things like Rolling Twitter Advisory which are blog sites these days or will not mind like Twitter's home page, which automatically updates "post-text" itemprop = "text"> This site was created by JavaScript automatically Vote on the server with XmlHttpRequests. This is possible by the setInterval function The smallest version is something like this (jQuery but the library translation will be simple): set interval (function () ($ .getJSON ('/ posts.json', function (post) {// code to remove old post / code to insert new post});}, 5000); In the millise...

Silverlight import references -

If I have a Silverlight Project and Silverlight Class Library. I imported Rajatlite folklore in class library .dll Silerlight project imports this class library and Silverlighttoolkit.dll also does. Will this increase my XAP file? How can I handle something like this? Should I Use Toolkit DLL Through Class Library? No, once XAP will only pull in the library.

web services - Server-Side XML Validation with CXF Webservice -

I am working on an Apache CXF Web Service (on JADS-SSAP, SOAP) This service is very simple: get a request, enter a request in a database, and return to see if the join was successful I would like to rely on XML validation to apply several restrictions on the request. So, my question is how can I return detailed verification errors to my service customer? I have configured my endpoint and started verifying the server-side. & lt; Jaxws: endpoint id = "some pointpoint" implementor = "# someImpl" address = "/ impl" & gt; & Lt; Jaxws: Properties & gt; & Lt ;! - This entry should enable JAXB authentication on the server-side of our web service. - & gt; & Lt; Entry key = "schema-verification-enabled" value = "true" /> & Lt; / Jaxws: Properties & gt; & Lt; / Jaxws: endpoint & gt; I have searched using the interceptor on the server (for example, Barine Interceptor), and in some way to ho...

c# - AutoMapper converters fail for null values -

Note: This question is now outdated and only applies to older versions of Automaker has gone. Problem: I have an automaker converter which is a nullable / bool? and a string . I apply this profile globally to my profile, and it works for true and false , but not for null I have this in my automaker profile: CreateMap & lt; Bool?, String & gt; (). Convert Using & lt; NullableBoolToLabel & gt; (); And here is the converter class: Public class NullableBoolToLabel: ITypeConverter & lt; Bool?, String & gt; {Public string convert (boole? Source) {if (source.HasValue) {if (source.Value) returned "yes"; And return "no"; } And return "(N / A)"; }} Example which shows the problem Public square fu {public boole? IFooBrread {get; Set; }} Public class FooViewModel {public string IsFooBarred {get; Set; }} Public Square TryIt {Public TryIt () {Mapper.CreateMap & lt; Bool?, String & gt; (). Convert...

visual c++ - VC++ WebBrowser Control .Net Dependancies -

What is the use of web browser controls when used in VC ++ depending on the .NET framework? WebBrowser has nothing to do with ActiveX control. met. Occasionally, the .Net Framework has an identically named WebBrowser control which is a cover around ActiveX control.

ruby - Checking for nil string before concatenating -

This question is very similar to many queries, but it is not that it is anything from a duplicate. Is about and writing better code for zero / zero probes. Currently I have: file.puts "cn:" + (Var1.nil ?? "UNKNOWN": var1) Which works fine but does not look good What is a better way to write it in Ruby that I am checking for zero and not including it " Post-text "itemprop =" text "> You can: file.puts" cn: "+ (var1 ||" UNKNOWN ") Or, if you prefer: file.puts "cn:" + (var1 or "UNKNOWN") Or my favorite, which I think is The most idiomatic Ruby is: file.puts "cn: # {var1 or 'unknown'}"

hyperlink - Javascript onclick in script -

OK I'm new to javascript, but I add onclick = "function ()" without anchor to an onclick function I want to call the tag. Here's my script, but I can not do it for work: & lt; Script type = "text / javascript" & gt; Function click () {alert ("hi"); } Document.getElementById ('click'). Onclick = clicka; & Lt; / Script & gt; & Lt; A href = "#" id = "click" & gt; Click & lt; / A & gt; When I click on the link, it should "Hi", any ideas should be alerted? Place either the script after the a tag or window Wrap the script inside the .onload function. Any of these will work: & lt; Script type = "text / javascript" & gt; Window.onload = function () {function clicka () {warning ("hi"); return false; } Document.getElementById ('click'). Onclick = clicka; } & Lt; / Script & gt; & Lt; A href = "#" id = "clic...

java - Apache Pivot 1.4 vs. JavaFX, Flex, Silverlight, Swing -

I recently moved to the top-level project category about Apache Pivot And I was thinking that who has tried the most recent version and compared it to other RIA tools. What are the appropriate categories for comparison? For Java developers, Java Fx has a different scripting language, so it seems easy to take Pivet developers say what did the Sun do instead of XX of Java should go. Good to hear from you. :-) I believe that we focus more on applet deployment in Pivot's design. However, there is nothing implicit in the platform that prevents you from using more than one top-level window, it is not something that we fulfill because it is not relevant to our primary use case (which You noted, it's browser deployment). Note that it is also not possible to create multiple top-level windows in Flex or Silverlight. Re: "Who is making the applet these days?" There is nothing about making this applet because it is about making RIA if you ask questions, "Who...

visual studio 2008 - Does Code Analysis support defining two languages for mixed language Spell Checking? -

Brazilian was able to obtain code analysis to check spellings in Portuguese. P> This is a common practice in Brazil to mix Portuguese and English on type and member names. I have seen this practice in other languages ​​in the code coming from Europe. So what are I trying to do, enable both languages? I searched around and after searching for nothing I experimented with things like & lt; CodeAnalysisCulture & gt; N-US; PT-BR & lt; / CodeAnalysisCulture & gt; and Neither worked beforehand with a compilation error broke and the final language defined in the second language was used. I'm pretty sure that code analysis does not support it, but as a last resort, I'm asking: Mixed language for spell checking, two languages Defines code analysis to define? PS: I already know about custom dictionaries. This is my backup plan. People from the Code Analysis team do not have it as a scenario supported by the current scenario. I must say...

create an array that mimics a clock (javascript) -

How can you create an array of values, for every hour, starting at 12 o'clock at 11 o'clock AM / PM In javascript? There are millions of ways to do this. Here's one: var theHours = []; (Var i = 0; i & lt; = 23; i ++) for {thehours [i] = (i == 0)? "12 o'clock": ((I and LT; 12)? I + "AM": (I12 = 12) + "PM"); } , "6", "1 p.m.", "2 p.m.", "3 p.m.", "4 p.m.", "5 p.m." , "6 AM "," 7 AM "," 8 AM "," 9 AM "," 10 AM "," 11 AM "," 12 PM "," 1 PM "," 2 PM "," 3 PM "," 4 PM "," 5 PM "," 6 PM "," 7 PM "," 8 PM "," 9 PM "," 10 PM "," 11 PM "] / html>

How do I register an mysql database? -

Sorry for a noob question about MySQL I've downloaded to learn about mysql but I know this Do not think how to register it with your local host ISQL DB. I know in MS SQL that you can register any SQL DB using SQL Studio. I tried Google but there were no results. Perhaps, my search phrase is incorrect. I'm searching with "how to register a mysql database, register mysql database ... etc ..." How can you register or setup flight database from existing database? Am I using DBVisualizer? Is there a way in debugis that I do not know how to regulate a database? Thanks EDIT: Sorry for the bad words. I found . I have .myd, .myi and .frm and I want to get it to be restored with my local mysql example? I see all the answers, but I am still confused how do you restore the database from those 3 files. A small background first. The linked FlatStats download page, in the original question, appears to provide zipped torballs of binary table storage files from MySQL data...

c# - detecting window text change with pinvoke -

Is there a way to see if the content of 'window' has changed, it was only referenced by a handle is? Like those obtained from Pinwalk fundwondo? If you have been informed that the text has changed, then not. Some windows send notifications of changes in their original window, but you have to be in the process to stop those messages, and not all windows will also send notifications. (I guess by the fact that you are using FindWindow that you are not in-process) If you want to get the text and want to check your ASP, GetWindowText or SendMessage (hwnd, WM_GETTEXT, ...); (GetWindowText is just a useful cover around a SendMessage)

How to make a WYSIWYG editor in PHP -

I am trying to create a WYSIWYG editor in PHP. So far I got this (I have a new beta): HTML: & lt; Form action = "method =" POST "& gt; & Lt; Select name = "font size" onchange = "this.form.submit ();" & Gt; & Lt; Options & gt; Font size & lt; / Options & gt; & Lt; Option value = "14px" & gt; 14px & lt; / Options & gt; & Lt; Option value = "24px" & gt; 24px & lt; / Options & gt; & Lt; Option value = "34px" & gt; 34px & lt; / Options & gt; & Lt; / Select & gt; & Lt; / Form & gt; & Lt; Form action = "" method = "post" & gt; & Lt; Textarea name = "bodyText" style = "width: 500px; height: 200px; font-size: & lt ;? php echo $ fontSize ;; & gt; & Gt; & Lt; / Textarea & gt; & Lt; / Form & gt; PHP: & lt ;? Php $ fontSize = $ _POST ['fontSiz...

QueueUserWorkItem with COM in C++ -

I have a display issue where the client has hundreds of "FU" types of a special type of object in the domain of my C ++ application. Are making Each Foo frequency has its own asynchronous work queue which is obviously with its own thread, it is not on scale. I need to share threads between working queues, and I do not want to invent the wheel again. I need to support XP, so I can not use the Vista / Win7 thread pool. The need to work on the process of each queue item is to include a com call in a multi-threaded COM apartment. The document for the XP Thread Pool says it is OK to call CohenialLeaxX () with MTA Apartment in Thread Worker Function Callback. I have written a test app and verified that it works, I run the app with 1 million iterations and without the CoInitializeEx / CoUninitialize pair in the worklist callback function. Without it CoInit * calls them and takes 35 seconds with 5 seconds. This is too much overhead for my application. Since the thread is a proc...