Posts

Showing posts from August, 2012

c++ - Resources to learn bitwise programming? -

I am a C ++ programmer and sometimes I come in some code that bitwise operator in things at bit level Is using manipulation, but I do not have any real understanding of those concepts, so I want a resource to help in knowing that it will become another nature. Does anyone know of good resources for this? A Google search did not provide me very useful information, maybe I do not know what to watch. Thanks! I absolutely love Henry Warren's book for this, Chapter 2 ("Basics" ) Provides a free sample, which, despite the name, provides some quite sophisticated bit manipulation moves. It can not be the best place to start, but once you become comfortable with a little arithmetic, then it's great.

dojo - Possible dijit.Tree Cookie issue (SaveStateCookie) -

Then our app has been installed with the tree like the standard left frame, the main content in the right frame is to click Loaded tree). Our web app displays an empty page in an inconsistent main frame in Firefox. Incompatible, I mean everyday for something, rarely for others, once for most, when we receive it, then go to another page on an empty page through our tree results. Are there. We have found that by removing "aSreeSaveStateCookie" the normal operation is restored "AT" is the name of our div. I found "SaveStateCookie" strings in the digit / tree.js This is also in IE, except I get a browser error page which I just can not remember thanks P> via Dojo 1.3 Firefox 3.1x IE 8 Windows XP In my case, I never change the browser settings around personal data. Please see whether the response code 413 (413 = request unit is too large), usually it Occurs when the cookie is used to store the maximum request size tree (STS) extens...

c# - Web service cannot write to Event Log when called by anonymous user -

summary: How to configure a web service, such as writing an event log is always possible (regardless of the caller) ? Description: I have a web service that writes an entry in the application log. I installed Event Source through a little console application and I think I understand that part of things. When I do this WS test, I think I am successfully writing my entry in the event log. The virtual directory that hosts this host, allows no anonymous access and is configured only for integrated Windows authentication. I have a web client application that calls this webservice when Web Client site is configured for integrated Windows Aith, then calls website service results to login as desired However, if I change the web client site to allow mismatched access, then an unknown operation exception I ignore it but it would be good to know how to get into the webservice. How to get it, how is it called? Here's a little bit of my code: public fileService () {try !! EventLo...

unix - Python scripts in /usr/bin -

I am writing a pretty basic application in Python (this is only a file at the moment). My question is how do I get it so that Python script can be run in / usr / bin without the .py extension? For example, instead of running dragon from any directory in which it is currently, I want to be able to do the CD htswap args thanks in advance! Just change the file name to .py extension. After that, you must enter the following line at the top of your file: #! / Usr / bin / env dragon env is a small program that sets the environment to execute the correct dragon interpreter to be done. You also have to make the file executable with command chmod a + x htswap and assign it to / Usr / local / bin . This is cleaner than / usr / bin , because the content of that directory is usually managed by the operating system.

ajax - script.aculo.us autocomplete stuck behind input elements -

मेरे पास कई स्क्रिप्ट है। Caculo.us Ajax.Autocomplete एक पृष्ठ पर नियंत्रण और जब ड्रॉप डाउन div प्रदान की जाती है हमेशा पृष्ठ पर अन्य पाठ बक्से के पीछे रह गया, चाहे मैं zIndex और स्थिति के साथ क्या करूँ। आईई और एफएफ में समस्या आती है किसी और ने यह अनुभव किया? क्या मुझे कुछ याद आ रही है, या क्या यह नियंत्रण के साथ ही ज़िंदगी है? ठीक है, मेरे प्रयास में सब कुछ नीचे मूल बातें करने के लिए एक उदाहरण पोस्ट करने के लिए, मैं वास्तव में इसे ठीक करने में कामयाब रहे दो भाग समाधान सबसे पहले, मुझे अपने नियंत्रणों में सभी जेड-इंडेक्स परिभाषाओं को ख़त्म करना पड़ा। वे समस्या का हिस्सा थे। दूसरे, मुझे स्वत: पूर्ण नियंत्रण के शो समारोह में जाना पड़ा और जोड़ना था: "update.style.zIndex = 1000;" समारोह में मेरी स्वत: पूर्ण ड्रॉप डाउन डिवाईस अब आवश्यकतानुसार नियंत्रण से ऊपर हैं I शायद एक और तरीका है कि मैं स्क्रिप्ट को संशोधित करने से बचने के लिए चीजें कर सकता था। Cculo.us कोड, लेकिन मैं सिर्फ खुश हूं कि यह काम कर रहा है।

c - Different access levels with PAM -

Currently I have a graphical application that has two levels of access, operator and administrator. Login and authentication are all homemade and I want to switch applications using PAM instead. I'm not sure what is the right way to do this. Correct me if I am wrong, but it looks like PAM boils down to "yes" or "no" to check - yes you can use this service, or you do not There is no provision based on the various levels of admission in which the user is logging on. I should be able to tell who is the operator and who is the administrator, though, and it is possible that I probably want to be able to do this through PAM. / P> So my idea is that I have two services with two different configurations , /etc/pam.d/pamdemo and Administrator /etc/pam.d/pamdemo-admin My application will then try to authenticate before pamdemo-admin , and if it is unsuccessful then pamdemo . If both fail, then admission is denied. Am I on the right track or am I complete...

log4net - Different appenders per namespace -

I am trying to set up a general logging library which is based on the ILog example Determine what is the best example of the current stack and how to use I have this kind of configuration set: & lt; Log4net & gt; & Lt ;! - attachments skipped - & gt; & Lt; Root & gt; & Lt; / Root & gt; & Lt; Name of the logger = "MyAssembly.MyNamespace" & gt; & Lt; Level value = "WARN" /> & Lt ;! - Appendix list - & gt; & Lt; / Logger & gt; & Lt; / Log4net & gt; And I have a class like this: namespace myAssembly.MyNamespace.SubNamespace {public class MyClass {...}} When I get an example of img , type me ( var log = LogManager.GetLogger (typeof) MyClass)) namespace; ) and I have to find out that no logger is configured, so it is named in the namespace tree ( MyAssembly.MyNamespace ) and then see if it is configured at that point. The problem is that for the ILog the MyAssembly.MyNamespa...

How to have a Tomcat WebApp auto deploy sub services? -

I have written a service structure using the Hayesian and want to keep the URL normal, but the flexability of the auto-deployment . If I deploy a service. I can access it properly using the Air / Service, however, I want a general location for all services. How can I make a different reference, where all the services live and get the auto deployed. How exactly does it make with axis2.war it its services directory? For example: I have deployed an explosion MyBridge.war, which includes a directory within the services of MLBridge.Well / Web-INF / HelvoldSesser within the services. Deploy the carrier and deploy it is. Can I access MyBridge / HelloWorldService again? Can this be done? I'm trying to self-deploy without using Spring and Hayesian and just Hayesian. By defining a simple servlet mapping: All of this is important. You can also use a filter. All servlets / filters will be received on the prescribed path and they will use the resources under the web-INF /...

ide - Editor for programming ML on windows? -

I know that I can use amax but I have not used it before ... is there any other option Are you? thanks The programmer's editor is easily configured for almost any programming language can be done.

What is the standard programming font used in Textmate? -

It looks very readable. I especially like the text is a bit lighter than the console, just like the comic suns. Is it downloadable for windows? Monaco This is a download for Windows (Direct link :)

c# - How do I deploy an ASP.NET MVC application if the ISP doesn't use a BIN directory? -

I have to do a bin deployment on our ISP, Network Solutions. Net Framework 3.5 SP1 is installed on their server, but not ASPNT TMVC. I need to point out my application in a directory called cgi-bin instead of bin. I Network Solutions says that this is the only directory that has been assigned to execute them The central belief is marked as. I need to put the system.web.mvc dll and application DLL there, and I need those ASP.NET MVC applications so they can search in that directory. It goes without saying that they will not enter Solution has been posted below. After tampered for a while, I finally got a real bin directory I created (a process that says Network Solution that does not work) works properly, and it appears. I had to implement the routing patch because the network solution is still running IIS6. People who are interested, you can specify a separate bin directory in web.config like this: & lt; Runtime & gt; & Lt; Assembly bind...

firefox - IE8 & FF XHTML error or badly formed span? -

I recently updated IE8 & amp; FF Designer, where JS creates some span tags for the layout dynamically (they were keeping round corner graphics on some tabs) Now XHTML, in JS, looked like this: & lt; Span class = "leftcorner" /> gt; & Lt; Span class = "right corner" /> And worked perfectly! As we all know that dynamically rendering elements in JS can be quite processor intensive, so I moved elements of JS above the top of the page source. ... And it was not working ... Not only does this work, it crashes IE8. Fix was simple, i.e. interval: & lt; Span class = "leftcorner" & gt; & Lt; / Span & gt; I'm a bit confused by this as far as I'm aware & lt; Span class = "leftcorner" /> Wholly valid XHTML is! Second, it works dynamically, but not in XHTML?!?!? Can anyone put any light on it or is it just another strange phenomenon of the browser? I think one of the answers will answer your ...

regex - Using sed and grep to search and replace -

I am using egrep -R followed by a regular expression with 10 unions Is like: .jpg | .png | .gif etc. It works well, now I want to change all the strings found with .bmp I think like something For example - lR "\ .jpg | \ .png. \ .gif". | That is why this issue is how do I make regular uniforms in sed and how should I tell it? To save changes to this file, from which input is found. Use this command: Example-L-R R jade "\ .jpg | \ .png. \ .gif" \ | Xargs-0 -l sed -i -e s /. Jpg \. \ .gif \. \ .png / .bmp / ​​g ' egrep : using extended regular expressions Find matching line -l : matches only file names -R : Search again through all the given directories -Z : as the record separator \ 0 to use ".jpg | \ .png. \ .gif" : ".jpg " , " .gif " or .png" . : Start searching in the current directory xargs : Execute an order with a stdin as argument -0 : Use the ...

iphone - How can I keep drawing my GLView while messing around with other views (like scrolling a picker wheel) -

There are two views of my app, that holds an OpenGL context that is constantly reproducing itself (a NSTimer) and the second picker wheel while I'm spinning wheel, it seems that the timer firing stops. Can there be any way I override to see the picker so that it is attracted manually? Or any way to keep timer firing? Thank you, -s Your timer is not firing because it's main Built on the thread. There are user interface interactions on that main thread too, so when you are working with picker or any other processing touch event, your timer will be blocked from firing. One way to handle this is to create a thread that acts as a timer, an example of which you can use it for - ( Zero) OpenGL UpdateDetrait; {While (IsOpenGLUpdateCancelled) {{Self Update OpenGLView}; // do it at 30 fps [nstead sof forte interval: (1.0 f / 30.0f)]; }} You can then to open I believe that you can update the OpenGL layer's performance on a background thread without any problem...

How to implement back functionality in a asp.net web page? -

I have a page that has different buttons to load different pages. In that panel I have two buttons "Search Products" and one "Add Product". When I click on Add Product, this page is loaded on this page, on this page I have a button that takes me back to the Search Product page, now I want to know somehow that this page (Search Product) has been opened with Add Product Cause, then enable some buttons on the Search Products page, and if I click the Panels button to go directly to the search page then I do not want to enable those buttons. Ta said. I did not find anything, please help me with anyone. You can use the value in context to achieve it. Add it before going from the current page to the goal page context.Items ["PageOpener"] = "AddProduct.aspx"; Check whether this reference is null or not in the target page. If this is empty the page is not loaded from the first page. It can be used when you are doing the server. Transfer...

asp.net - Is it usual for ASPX files to take 5-10 seconds to save? -

Using Visual Studio 2008 with Resharper, is it normal for ASPX files, so that it took a long time to save ? I usually think that it takes about 10 seconds on average PC (18 months old). What is this doing? It is more likely that the problem is the choice of your anti-virus software. Every source file, assembly and jar are scanning whenever some breathes (cough cough cough) with curiosity in the well-established cases and making the developers' life hell.

pascal - Repeated setters logic in Delphi -

For each setter of a class, I have to apply some event logic (On Chengning, On Changing): "post-text" itemprop = "text" TBlock.SetWeightIn process (const value: double); Var oldview: double; Start Oldwell: = FWite In; DoOnChanging (OldValue, Value); FWeightIn: = value; DoOnChanged (OldValue, Value); End; Process TBlock.SetWeightOut (const value: double); Var oldview: double; Start OldValue: = FWightight; DoOnChanging (OldValue, Value); FWeightOut: Value =; DoOnChanged (OldValue, Value); End; Can you recommend a way to apply it without repeating all these rows for each setter? Try it out: Process TBlock.SetField (var field: Double; constant value: double); Var oldview: double; Start OldWell: Field; DoOnChanging (OldValue, Value); Field: = Value; DoOnChanged (OldValue, Value); End; TBlock.SetWeightIn process (const value: double); Start Setfield (FWeightIn, Value); End; Process TBlock.SetWeightOut (const value: double); Start Setfield (FWeightOut, Value...

web scraping to fill out (and retrieve) search forms? -

I was wondering whether to "automate" the task of typing in entries for finding forms and removing the results from the results possible . For example, I have a list of journal articles for which I want to get a DOI (Digital Object Identifier); For this manually I will go to the journal article search page (for example), type in the authors / title / volume (etc), and then find the article from the list of returned results, and select and paste the DOI. In the reference list, I regularly use R and Python for data analysis (I was inspired by a post on RQRL), but not much information about the Web protocol Is it possible ... Is it possible (for example, to use something like Python's beautiful soup?). Are there any good references to doing something remotely from this task? I am interested in learning about web scrapping and web scrapping as much as to accomplish this special task normally ... Thank you for your time! Beautiful soup is great for parsing webpages - ...

java - List as a named parameter in JPA query using TopLink -

In the following JPA query, named parameters should be a list of integer values: @NamedQuery (name = "SortTypeNWD.findByFcIds", from the query = "s Select SortTypeNWD where s.sortTypeNWDPK.fcId in (: fcIds)") quite logical, when this The named query is called what is done: query findByDatesPlFcIds = em.createNamedQuery ("SortTypeNWD.findByFcIds"); FindByDatesPlFcIds.setParameter ("FCIDs", FCID); Where the variable is an ArrayList containing FCIds integers All the above code works fine with Hibernate but does not do with TopLink: Due to: java.lang.IllegalArgumentException: Select the query string from SortTypeNWD from you s with the expected type of int parameter type fcIds for class java.util.ArrayList value (S: fcIds) in s.sortTypeNWDPK.fcId where you tried to set Is there any alternative way to use the list as a designated parameter in the top links? Can the type of named parameter be compelled? Toplink applies JApA...

.net - C# Winform Label reversed on Vista -

I develop and compile Winform applications in C # with an unmanaged C ++ library on the XP computer. On Vista , everything works fine (excluding C + + DLL, results and curves, ...) and label component except problem of displaying F (t / m) is displayed (F (T / M) L (%) (%) L Ra is displayed [ra / ra > These 3 values ​​correspond to the text properties of the 3 label component. These values ​​are directly on the designer No coding. Do anyone have any ideas to fix this problem? Thank you in advance Your problem reminds me of a year ago - it has to do with RTL (right to left) property of control. On label controls, or anywhere can RTL 'true' or otherwise inside DLL?

Return value on condition failing in PHP -

If the query fails then I need a wrong return ... where do I keep it ... function ass ($ username, $ password) {$ qry = "Member from WHOE login = '$ usernamename' and passwd = '". Select from MD5 ($ password). $ Result = mysql_query ($ qry); While ($ line = mysql_fetch_array ($ result)) {returns (array ($ line ['uservelle'], $ line ['email'])); } // return 'invalid user name / password'; } False Return on Failed, Just Like Therefore, your code should be as follows: function asas ($ user name, $ password) {$ qry = "select from member WHERE login = '$ user name' and passwd = '' $ (= $ Password) "." $. $ Result = mysql_query ($ qry); // If the failure of the mysql connection is intended, return (! $ Results) return false; $ line = mysql_fetch_array ($ result) ; If ($ line) return array ($ line ['userlevel'], $ line ['email']); // If unsuccessful intention is to return the username ...

python - Trying to understand Django's sorl-thumbnail -

I'm playing with Django for sorl-thumbnail . And it's trying to understand how it works better. I have read the guide for it, installed it in my site-package, it has been ensured that PIL is installed correctly, sorl.thumbnail is set to INSTALLED APPS In my settings.py , import ImageWithThumbnailsFile with the sorl.thumbnail.fields located at the top in my models.py , Added image = ImageWithThumbnailsField (= "images /", upload thumbnail = {'size': (80, 80)}) as my model field, the mean of your view on the template The model has passed, and above template {% load thumbnail%} was added and the put in variable {{mymodel.image.thumbnail_tag}} . But what I have understood is that when I upload an image through an administrator, it will create a thumbnail directly, but when I see my template in the browser, is it exactly the same? is made? is this correct? Thumbnail looks fine, it looks really great, but I think its model will make field part t...

silverlight - Removing Geometry from Canvas -

I want to remove geometry from the canvas in the lightlight ... I am able to remove it, but can not be removed immediately I mean, when I'm Geometry Group. Do children. Revive (geometry) is removing it from the tree, but not from the canvas ... The surprisingly deleted geometry is still visible in the canvas until I do some mouse action. Please tell me, what is the correct way to remove geometry? Thank you very much.

mvvm - TextBox binding in WPF -

I have a textbox in the XAML file, the prop setter is not being called when I change the text in the text box I have a ProjectOffister I am able to get value in the text box and I am not able to update it. I am using the MVVM pattern Below is my code XAML textbox text = "{Binding Path = Officer, Mode = Dove, Update Resource = Changing Property}" x: name = "Pro JectOfficer "/> See Model C Public Staff Officer {Returns __Con.PrimaryOfficer; } Set {_con.PrimaryOfficer = value; _con.PrimaryOfficer.Update (true); }} Staff.cs Public class employee: EntityBase {public employee (); Public string address {get; } Public string code {get; Set; } Public override zero updates (); } thanks You are binding the type of property String on the text box for the property of the type officer on your viewhold I hope the setter is not being called because WPF can not convert. If you check the output window in Visual Studio, you will likely see a binding e...

html - Strange website navigation mechanism -

I am displaying UAT on someone else's web based application. The system is quite large with tens of forms, and hundreds of different input fields, overall, it seems well-made and usable. One thing I have seen is that it sounds awkward for me, the link I click on, actually fulfills a post request (the details of the page in which I want), on that page Already, with the reaction that redirects to a page which I want I can do this for some pages that have changed the data - it will obviously force the system to save data without the user. However, this behavior is also not used on pages of any user input. Why is this done? It seems to be some major recession in the system. If this is a help, then this system is written using JSF. I will not pretend to be a developer who has worked w / JSF widely. However, I have created many web applications on other technologies. Generally speaking, sending additional data for navigation using POST requests increases data load and ma...

What are the basic principles/tenets of semantic web that an architect should know? -

Core principles and principles for system design Is it really Web 3.0? The main principles will include understanding of RDF, RDFS, OWL and how arbitrary. I can represent knowledge using these glasses. It is necessary to understand what can give reason with the semantic data. Then the idea of ​​intelligent agents comes and then it is understandable that why all this is necessary and why it is designed. This will give you an indication of how to promise this technique (or not) for software architects, it would be good to know how OWL data can be efficiently stored (for example RDBMS or any other In a proper way). I find it interesting for myself but in fact it is far too far where the average user can take advantage of it on the regular web.

c# - .Net - When is List<T>.ForEach prefered over a standard foreach loop? -

सामान्य सूची वर्ग में एक है .पहले (कार्रवाई & lt; T & gt; कार्रवाई) विधि। अब मैंने कुछ ऐसे सरल समय दिए हैं जो वे दोनों करते हैं और ऐसा लगता है कि जेनेरिक फॉर ईच खराब कलाकार है। (स्निपेट कंपाइलर फ्रेंडली) कोड नीचे है - सार्वजनिक स्थिर वर्ग टाइमर {सार्वजनिक स्थिर लंबी foreachloop = 0; सार्वजनिक स्थिर लंबी Gforeachloop = 0;} सार्वजनिक वर्ग कुछ {सार्वजनिक सूची & lt; स्ट्रिंग & gt; MyStrings = नई सूची & lt; स्ट्रिंग & gt; (); सार्वजनिक कुछ () (के लिए (int i = 1; i & lt; = 5000000; i ++) {myStrings.Add (i.ToString ()); }}} सार्वजनिक वर्ग cls1 {निजी स्थिर सूची & lt; स्ट्रिंग & gt; स्ट्रिंग = नई सूची & lt; स्ट्रिंग & gt; (); निजी स्थिर सूची & lt; स्ट्रिंग & gt; अन्य स्ट्रिंग्स = नई सूची & lt; स्ट्रिंग & gt; (); सार्वजनिक स्थिर शून्य RunSnippet () {कुछ एस = नया कुछ (); स्टॉपवॉच घड़ी = नया स्टॉपवॉच (); watch.Start (); विदेशी (स्ट्रिंग x में s.myStrings) {स्ट्रिंग्स.एड (एक्स); } घड़ी। रोक (); Timer.foreachloop = watch.Elapsed ...

asp classic - IIS 6 Hangs , then app pool resets. IIS Debug Diag Dump Attached -

IIS 6.0 is hanged, then after the Approximately 3 minutes the app reset the pool it is an ASP site, reset it After working for a few seconds, then it is hanging. All other app pools work correctly on this example of IIS 6 function. I do not see any display problem with this machine. Using the IIS debug diagnostics I took the memory dump and it is a sung analysis. Can anyone lend some support? Analysis Summary Type Description Recommendation Warning Possible blocking or leaking block block possible on ntll! LDRPilloder log w3wp.exe__SupportSiteAppPool__PID__3960__Date__07_23_2009__Time_02_22_36PM__551__Manual Dump.dmp p> The effect of this lock 66.67% of the ASP request blocking is blocked 22.58% of the thread blocking (threads 6 22 23 27 28 29 30) The following tasks are trying to enter this important section ntdll! LdrLockLoaderLock + 133 ntdll! LdrpGetProcedureAddress + 128 ntdll! LdrpInitializeThread +68 The following important modules (s) are included wit...

c++ - Function passed as template argument -

I am acting as the argument of the C ++ template function. It is supported by the example C ++: #include & lt; Iostream & gt; Zero add1 (int and v) {v + = 1; } Zero add2 (int & v) {v + = 2; } Template & lt; Void (* T) (int & amp;) & gt; Zero doOperation () {int temp = 0; T (temporary); Std :: cout & lt; & Lt; "The result is" & lt; & Lt; Temporary & lt; & Lt; Std :: endl; } Int main () {doOperation & lt; Add1 & gt; (); DoOperation & LT; Add2 & gt; (); } Learning about this technique is difficult, yet does not take much, and the classic does not even talk surprisingly (at least not from my search). I have questions that this is valid C ++ (or just some widely supported extensions). Also, is there a way to allow a Makkar to use each other with the same signature with explicit actions during this type of template charge? In the following no works, the above program, at least, because the syntax is...

printing - What's the best way to directly print to a printer, like POS printer, over the web? -

Is it possible to print from a web app to a network printer? Are there any POS or similar form factor printers that can be connected to the internet and printed directly (given that a port has been opened through a router)? My ideal case would be a printer, on which I send XML and print it without the need for PC and therefore no driver. One more thing that is good is to create an SSL connection on the printer, but this is not important. Most thermal POS or labels can be connected to a printer manufacturer with an add-on network card from the printer is. The big brand names are Zebra and Intermax. The interesting thing is that most of these printers have direct ASCII mode, so you just connect to a plain old TCP / IP connection and spit some formatting commands. ., Is written in a proprietary printer language which the manufacturer will give you. In the case of an intermediate, it is called the IPL (Intermediate Printer Language). You have two options ... You can click ...

Visual Studio Installer Package not Building -

I am trying to create an installer for a Windsor service that I have created and when I'm going to create a module I have the following message .. ========== All rebuilding: 1 succeeded, 1 failed, left 0 ========== But there really is no information about the failure. The installer is not making it right for any reason Does anyone know how I can get more information? It is very strange that this is an error message. Can you clearly try to clean up a building after the creation of everyone. Please make sure that the output window the task list (make sure that it is not pointing to error and todd information)

keyboard hook - Blocking shortcut keys using c# -

Text after "div class =" itemprop = "text"> I use the code given below to disable Alt + Tab, Alt + Esc, Ctrl + Esc, and Windows key Is doing it, but in some way it is not working. Please help me improve it. Nameslorn Block Shortcuts {Public Partial Category Form 1: Form {Public Form 1 () {Initial Group (); } Private Representative Int Livelweel ChebierPcrilGetGet (Int Encoded, Int. Vapam, Ref KBDLLHoccard ElPiram); [DllImport ( "user32.dll", EntryPoint = "SetWindowsHookExA", charset = CharSet.Ansi)] private static extern int SetWindowsHookEx (int IdHook, LowLevelKeyboardProcDelegate Lpfn, integer hmod, integer dwThreadId); [DllImport ("user32.dll")] Private static extern int UnhookWindowsHookEx (int hHook); [DllImport ( "user32.dll", EntryPoint = "CallNextHookEx", charset = CharSet.Ansi)] private static extern int CallNextHookEx (integer hHook, int nCode, int wParam, ref KBDLLHOOKSTRUCT lParam); Const int WH...

terminology - "Assembly" vs. "Assembler" -

I have been taught that "assembly" is what you write in your files so that your "endbabel" Can be binary code. But I see these two words mixed and mixed in various functions. I have also heard that you write "assembler", after which an "assembler" makes it executable. Let me know what is the correct words to use? More info: Wikipedia:

Constructor dependency injection with NHibernate 2.1 and StructureMap -

I have read somewhere that NHibernate 2.1 supports manufacturer dependency injection for its entites. How do I go about structural map and NHBnet 2.1 configuration to get it? I know this is an old question, but if it can be useful Edit: The original post links were not effective for NHib 2.1, got better information. For NHibernate 2.1, you can create an interceptor and override the instantiate method and create your container. Your example is there If you want to eject the property instead You can use the same technique, but instead you can do your work in the onload method.

sql server - sp_executesql with a string from db -

How can I get a record (like 'Select 1') from a record and make it eval it Pass sp_executesql something like that? DECLARE @MySQL nvarchar (MAX) SELECT @MySql = MyClable to SqlColumnMyId = 1 EXEC (@MySql)

batch file - How do I prevent the "Could Not Find" error message from del *.txt? -

एक विंडोज बैच-फाइल में, यह पंक्ति: डेल * .txt त्रुटि / चेतावनी संदेश देगा: सी नहीं मिल सका: \ *। Txt यदि कोई हो पैटर्न * .txt से मेल खाने वाली कोई भी फाइल नहीं है क्या उस संदेश को रोकने का कोई तरीका है? यदि आप सभी त्रुटि संदेश, आप ऐसा कर सकते हैं: डेल * .txt 2 & gt; NUL

Sifr 3 a:hover not active outside text -

I have an anonymous list with links: Display of links: block; In CSS, there will also be effect in padding around the link of Hover link. I replace list items with sIFR 3. In Sifr-config.js I specify a hover color for the text, but it works only on the text, not on the padding around the text. Is there a solution to this problem? Adding this margin-left to me is working for padding on the left side of the text:. In the configuration for SIFR-Route '25 'but margin-write has no effect, it is hard to say based on your appreciation, but if you replace it individually, you will get a lot of help ;-) List item, the complete list item will be a sIFR link if you want more space around the lesson It should be done in Flash movie instead of CSS. You can use the parameter for tunewid , tohayight , offsetTop and offsetLeft .

How do I ignore the authenticity token for specific actions in Rails? -

When I have a specific action, I do not want to check authenticity tokens, how do I leave the train Tell me For personal action, you can: For a complete controller, you can: skip_before_action: verify_authenticity_token > and Rail 3.x is required: skip_before_filter: verify_authenticity_token

c# - How to move the textbox caret to the right -

I would like to change all the characters entered in the text box in the upper case. Code will add character, but how can I get the correct direction? Private Zero Text box3_keyPress (Object Sender, KeyPressEventArgs E) {textBox3.Text = = e.KeyChar.ToString (). ToUpper (); E.Handled = True; } text box to above ; You do not need to manually process it. Note that textbox3.Text + = e.KeyChar.ToString (). ToUpper (); The new character ends at the end of the string even if the input is in the middle of the carat string (which means that most users will be highly misleading). For this reason we can not assume that after inputting the character, the input carpet should appear at the end of the string. If you still want to do this in the code, then you should do something like this: // is required for backspace and for working in this way (Char.IsControl (e.KeyChar)) {return; } Int selStart = textbox3.SelectionStart; String = first text box 3 Lesson Shuttle (0, selSt...

c++ - Shared libraries memory space -

Is the C ++ shared library its own memory location? Or is this collar process 'one?' Does sharing? I have a shared library that contains some classes and rapper functions, and this is a bit of a cover function: libXXX_construct () Initializes and returns the indicator to the object. Once I have been placed in the Collider program> libXXX_construct () object? Is this "collar" in memory space or in library memory space? The associated example of the shared library shares the memory space of the examples executable directly or indirectly . It is true for both operating systems like Windows and UN * X. Note that static variables in shared libraries are not a method of inter-process communication (some people think).

url - Simple URI rewrite with .htaccess -

मेरी वर्तमान। Htaccess फ़ाइल विकल्प + अनुवर्ती लिंक पर पुनर्लेखनइन्गइन पुनर्लेखन% {HTTP_HOST} पर। RewriteCond% {HTTP_HOST}! ^ Falsebase \ .net rewriterule (। *) Http://falsebase.net/$1 [आर = 301, एल] मैं इस पर जोड़ना चाहता हूं इसलिए जब एक उपयोगकर्ता अपने पता पट्टी में प्रवेश करता है तो वे "" को निर्देशित करते हैं। मुझे लगता है यह बहुत सरल है, मुझे .htaccess के साथ कोई अनुभव नहीं है, और 12 अन्य धागे के माध्यम से स्कैनिंग के बाद जो इसके जैसा दिखता था, मुझे इनमें से किसी एक से एक लगातार जवाब नहीं मिला। आपको एक आंतरिक पुनर्लेखन नियम का उपयोग करें, बाहरी रीडायरेक्ट नहीं। आप वास्तव में अपने उपयोगकर्ताओं को कभी भी बदसूरत यूआरएल जैसे /profile.php?name=USERNAME नहीं देखना चाहते हैं। तो ऐसा कुछ करने का प्रयास करें RewriteEngine On RewriteRule ^ /(.+)$ /profile.php?name=$1 कहां। + एक ऐसा पैटर्न है जो उपयोगकर्ता नाम से मेल खाता है। यदि आप जानते हैं कि आपके उपयोगकर्ता नाम सभी हैं उदाहरण के लिए, एज़ या एज़ अक्षरों में, आप रीव्रेटइंजिन ऑन रीव्रेट नियम ^ / (a-zA...

How do I select the rows of a table that don't match another table in SQL? -

I am trying to display all the names in the table glossary where vid Does not match the collapse_menu in s vid . How do i do this table terminology vid name 1 section 2 post 6 forum 5 department 13 free tags 8 committees 9 training and workshops 10 policies 12 projects 14 teams table fall_manu vid 8 5 10

data structures - What is better in Perl: an array of hash references or list of "flat" hashes? -

I can not decide which approach is more (1) idiomatic pearl, (2) efficient, or (3) Let me explain by code. First of all, I sub somewhat {... $ ref-> gt; {Size} = 10; $ Ref-> {Name} = "Foo"; $ Ref-> {Volume} = 100; Push (@ references, $ ref); ... Reference @ Return; } Or, I can sub something {... push (@ name, "foo"); $ Size {Foo} = 10; $ Volume {fu} = 100; ... Return (\ nname, \% size, \ version%); } Both essentially do the same thing. The important thing is that I need an array, because I need to place an order. I know, there is always more than one way to do anything, but still, do you like any of these? Instead of thinking in words without meaning, some , think and phrase Issues in Solid Conditions In this case, you are returning a list of objects that have names , size and quantity attributes. When you think of it in this way, there is no reason to consider the second method. After you run into problems, you can think of o...

Can javafx application display different stages on different monitors? -

Two different windows (stages) on each monitor are an idea of ​​displaying an app, the app should know how many Near the monitor computer and its resolution. Is it possible with JavaFix? You can use the current version of JavaFX (2.2) for This will give you an overview list of screen objects. See the screen javadoc page here:

How can I access the data in many large CSV files quickly from Perl? -

I have several scripts that currently read a lot of data in some CSV files. For efficiency, I use those modules to read and then make a hash by using one of the columns as an index. However, I have lots of files and they are quite large. And every script needs to be read in the data again The question is: How can I continuously store these Pearl hasheets so that everyone can read at least with the CPU? The combination of scripts is not an option. I want to ... I applied the second rule of optimization and used to find out that most CPUs (about 90%) were in: Text :: CSV_XS :: Field Text :: CSV_X :: Pars Text :: CSV_XS :: Pars So, I created a test script which was used by all CSV files ( text: CSV_XS ), they were dumped using the Level module, and then went back and Stor Read them back using the enabled module. I have done this so that I can see the CPU time: $ c: /perl/bin/dprofpp.bat Total time spent = 180 9 39 seconds user + system time = 950.5560 seconds spe...

python - Using subprocess.Popen for Process with Large Output -

There is nothing left to do. My code looks like this: p = subprocess.Popen (cmd, shell = true, stdout = subprocess.PIPE, stderr = subprocess.PIPE) errcode = p.wait () rate = p . Stdout.read () errmess = p.stderr.read () if errcode: log.error ('cmd is unsuccessful & lt;% s & gt;:% s'% (errcode, errmess)) Docs has comments that indicate a potential problem. Waiting, there is: WARNING: If the child process generates enough output in a stdout or stderr pipe, then this deadlock It will be waiting for the OS to accept more data for pipe buffer. Note: Read Data Storage In Buffer, so if the size of this data is large or unlimited, then do not use this method. So it is unclear to me that I should use any of these if I have too much data they do not indicate which method I should use in that situation. I need the return value from exec and parse and both stdout and stderr . So what is the equivalent method in python to run an ext...

ruby on rails - Activerecord error .include? nil -

I am writing a rail app, in which there are some modules and methods loaded through Lib Libretti, I have also added trusted authentication modules, now every time I run using the mongrel server on production, I do not get this error, although because model classes and controller classes are cached, but in development I get this error , First place After that, I get the right treatment after development and running, but when I refresh the page, I get this error, whereas it shows that there is a need for a blue to be repeated in every method, I There are also some homework, as I said method, for all the methods of that example, for example, I do not have any method definitions such as ID, name, title for the table attributes Purchaser. I am unsure about this, I am using Rails 2.2.2 and Ruby 1.8.7. Server mouth & amp; Webrick This situation occurred to me, where I get the error after refresh (i.e. Second call). It is possible that you have defined a module in your / lib ...

java - Problem in running Classic tag handler -

Text after "div class =" itemprop = "text"> I want to display the value of JSP in simple custom tag name from body tag handler by increasing the class, BodyTagSupport, but a runtime Getting an exception; O) The JSP code is: & lt; Html & gt; & Lt; Body & gt; & Lt;% @ taglib prefix = "my" ury = "simple tag"%> Advisory Page & lt; My: Simple & gt; Bailey Baale & lt; / My: Simple & gt; & Lt; / Html & gt; & Lt; / Body & gt; and the tag handler class is: package foo; Import java.io * *; Import javax.servlet.jsp *; Import javax.servlet.jsp.tagext. *; Public Selection SelectionTagHandler BodyTagsport {Expanding {Public IntersertTag ()) throws JspException {Return EVAL_BODY_BUFFERED}; } Public int endTag () {try {pageContext.getOut ()} print (body content); } Hold (exception e) {} return EVAL_PAGE; } And the exception, which I'm getting: type exception report message descript...

open source - What are the steps in licensing a library? -

I wrote a library and I want to make it open source, but I'm scared to steal others and take ownership I am very new to licensing software about it. What should I do and what is the steps given in the license on my software? GNU Library License Options There are many that you can choose from. Applications Usually it is enough to include documents in the header of all source files that refer to the licensing terms. Also, it is common to include a text file in which the software can be used. Software theft Once your software is published open source licenses, generally each person uses the code for any purpose Gives you the right to usually do not need to be worried because it is the issue of releasing the source code. In fact, you want to encourage others to pick up your software and use it. Ownership Here's the real concern, in my mind, people will be taking and claiming software, this happens in their own form (something DD John, Microsof...

jsp - Custom Tag inheritance. -

I have a JSP custom tag "A" which is defined in my .tld. I have 3 essential properties, it is an attangler That simplifies the hedgehanger in heritage. I need a new tag "B" which does a very little thing in the form of the above "A" but in a slightly different way. In addition to those attributes in "A", I copied them into ".b" in .tld file (code duplication). Apart from this, I made a bitagainthalar as an intagladler, and by these means actually crossed some of the methods, which in fact actually turn into these two handlers. And the rest of the functionality is defined in "Attahhandler". Because of its tranquility on Java, many codes avoid duplication due to heritage. But in the .tld file with the definition of Tag A and TAG B, there is a duplication of the attribute definition. Is there a way to avoid this repetition? If not, is there a completely different approach to me? Problem (Both tags excatly do the same thing,...

asp classic - Server-side includes in ASP.NET (on Mono, Perhaps): Deprecated? -

I have a small task to perform on the HTML / ASPX site, and I have ASCX (though I have enough First done, and this is a wonderful technique). My question is: Is "classic" ASP deprecated in ASP.NET in server-side or is not recommended only? Will they work on mono Edit: Yes I have seen it. The server-side also includes unnecessary, and usually the production is closed on IIS sites Do not use

optimization - Type of path best to use in web apps? -

There are two ways to call an image in your web application. & lt; Img src = "/ myapp / img / world.gif" /> OR & lt; Img src = "http://www.example.com/myapp/img/world.gif" /> Which would be best to use or both would be the same if both mean not equal, then why? And if I use the second method in my app to call all the files (images, SDF, FLV etc.), then there are any performance constraints Generally speaking, the first method is a part of your application that should be your preferred way of referencing any resource. This is called Relative URI Reference and it allows you to transfer your application to any other domain-name without changing all the links. You are the relative path such as ... assuming that the HTML appears at some place like in this way you are not bound to the / myapp path prefix and can easily Your application can transfer / superpap without changing anything. Most application frameworks and templat...

webforms - codeigniter sticky forms -

I am starting to use CII today. I usually use KPHP but one of the small projects A whole lot needs "heavy" What is the easiest way to apply sticky forms in CI (retaining user input after reloading)? I currently have lots of radio buttons for multiple choice quiz and some other text areas and when the verification fails, the data is lost ... I could probably Do not need session wars because I'm not redirected, I'm just loading the view on the validity failure, so the data should be available in $ _POST. have you seen? Most of the CodeIgniter handling the underlying form is there. Use the set_value () function to reset the values ​​after reloading the form: & lt; Input type = "article" name = "some field" value = "& lt;? Php echo set_value ('some field', 'default') ;? gt; size =" 50 "/> Note that to work for set_value () , you need to run verification on that field. If you do not nee...

windows - MFC: troubleshooting on which thread is responsible for causing a crash -

I currently have two separate threads running for my project (for an MFC operation, such as view / projection, application Window etc.) and for an infinite, while loop in its main function). However, for some situations, when I run my program in debug mode, I have found that the 'exit status' of threads was 1 (in other words, this was returned non-zero numbers to the operating system). When applying in Visual Studio 2005, what would be the easiest way to figure out which thread is responsible for the return value, so that I can get rid of what is going on? thank you in advanced. Including the suggestion of Steve Gilham: After checking the detective ++, which thread is responsible for error, after checking, I have a line of HDL Unit Device () call Pinched is responsible for this return message by the Novvant Falcon SDK. Returning the failure status with this call does not cause any error message to pop up, however, I do not know that this is a big deal that is necessary ...

bash - Parsing data from traceroute command -

I try to parse the "number of hops" value and output it by using the traceroute I am doing a bash script with any sign? Thanks a lot. My script looks like this so far: #! / Bin / bash #parse traceroute hops and stdout for output Echo -n "Enter a host name (such as www.google.com):" Hostname traceroute 2 & gt; 1 and host name | Grep "hops" echo "is the number of hops" " did you take it Looking for the number of hops, or the "64 Hops Max" value? If it is pre-use, then use tail to get the last line of output, then print the first column awk for: traceroute "$ hostname" 2 ", / dev / null | Tail-1 Awk '{print $ 1}'

php - APC Enabled but Apache Still Opening Files? -

I am working on a high-traffic webserver farm, which provides dynamic PHP code, with a maximum of 100 requests on most requests. The files include the API opcode cache enabled, include_once_override is enabled, and I've allocated 64MB rams in the cache, even when I strace an Apache process I still open it () ing and stat () all these covers Which should be included for every request, pull it from the cache I'm going to use is populated cache that I can see in the data cache and 100% Hitred. Can anyone offer any insights? . According to the APC document: apc.stat integer Be careful to change this setting. To trigger this default, APC has been forced to compulsorize the script (check) on every request, whether it has been modified or not. If it has been modified it will recompile and cache the new version. If this setting is off, then the APC will not be checked, which means that in order to force the APC to check the files again, the web server must restart or manually ...

asp.net 2.0 - Link to CSS directory with ~ -

मेरे पास एक सीएसएस लिंक है जो इस तरह दिखता है: & lt; link href = " ../../css/WW/parts.css "प्रकार =" टेक्स्ट / सीएसएस "rel =" स्टाइलशीट "/ & gt; लेकिन अब मैं सीएसएस निर्देशिका को "../../" के रूप में नहीं जोड़ा जाना चाहता, बल्कि "~ /" के रूप में, अर्थात् परियोजना के ऊपर से। इसलिए मैंने सीएसएस कॉल को इस पर बदल दिया: & lt; link href = "~ / project / css / ww / parts.css" प्रकार = "text / css" rel = "स्टाइलशीट" / & gt; लेकिन क्या होता है कि वर्तमान पृष्ठ पर पथ को जोड़ा जाता है, इस परियोजना के शीर्ष पर जाने की स्थापना: ~ / project / css /WW/parts.css मैं क्या कर रहा हूँ गलत? इस बारे में जाने का सही तरीका क्या है? आम तौर पर, "परियोजना के ऊपर" का अर्थ है दस्तावेज़ रूट। यदि आप ऐसा करने का प्रयास कर रहे हैं, तो कोशिश करें: & lt; link href = "/ project / css / WW / parts.css" प्रकार = "टेक्स्ट / सीएसएस" rel = "stylesheet" / & g...

wpf - Animate from one style to another -

If someone wants to animate from one genre to another, then he is thinking that going from ordinary to style to Activist, when the user focuses on the text box. & lt; Style x: key = "normal style" target type = "{x: type text box}" & gt; & Lt; Setter Property = "Borderbrush" Value = "Gray" /> & Lt; Setter Property = "Frontline" value = "2" /> & Lt; / Style & gt; & Lt; Style x: key = "ActiveStyle" TargetType = "{x: type text box}" based on = "{static resource normal style}" & gt; & Lt; Setter Property = "Borderbrush" Value = "Green" /> & Lt; Setter Property = "Frontline" value = "4" /> & Lt; / Style & gt; If you want to swap the whole style, then I think you In the code: & lt; StackPainel & gt; & Lt; Text box style = "{static resource common style}" GotFocus = "...

How to correctly configure netbeans 6.7 and c++ on windows? -

Image
I have installed and configured NetBusiness 6.7 for C ++ according to the official manual: Configuration The window looks like this: Unfortunately, the ' Compile 'command is displayed: / usr / bin / make -f nbproject / Makefile-Debug.mk SUBPROJECTS = .build-conf build successful (total time: 642ms) Since I am on windows and it is not / usr / bin / make, executable compilation Not sure :(.) How correctly Netbeen is configured, so it will create it from config, not / usr / bin? Updated I have problems EMMS Netbeans 6.7.1 / C ++ / min are also working not me Know that it will help, but I thought I used to describe my experience anyway. I was making a successful but Netbeans were unable to launch my executable. I was able to verify that it was being executable and I could run it from the external command prompt. But was unable to open the property. After one day of searching the net, I found a tedbet of information that goes ahead for solution. Actually, ...

iphone - Getting UIResponder touches -

UIResponder class (such as UIView) is overriding without subclassing and its ends: Brinjal: with event: method, is it possible to get information about this contact? Events in the UIResponder class? This question has been answered. Your question is something confusing ... 'UIResponder without subclassing ... you touch events of UIResponder Can you inform about? Are you asking that you can touch any NSObject? I am not comfortable with the framework to ensure that those methods are implemented if they are implemented as class or class on NSObject?!? But, regardless of what you are doing, the answer is the top (end) of the series UIApplication (also a sub-section of the UIResponder), and if you have an iPhone app, then you have a single unit of UIApplication. Can query for touch events ...

c++ - Memory barriers in userspace? (Linux, x86-64) -

Memory barriers are easy to set on the kernel side: macros MB, WMb, RBB, etc. are always in place, Linux kernel headers Thank you for How to complete it in the user side? Pausix functions as memory barriers. Memory locations should not be entered concurrently; To prevent this, use synchronization - and this synchronization will also act as a barrier.

debugging - Browser keep stopping with user breakpoint and opens visual studio 6 in debug mode -

After my last question (see :) I ran into a strange problem, I hope it is here for experts The simple issue would be: Every time I run some applications such as Earth Explorer or Firefox, then Visual Studio 6 will suddenly "code the user breakpoint" on 0xSOMETHING from a message in debug mode "I continue to I can press F5, but these applications can move slowly And I do not have to say that I do not want to debug these applications ... My guess is that when I work on my VC ++ application, I use window methods like breakpoint CAxDialogImpl: : Create (), AtlaxCertDialogae () etc. ', and for some reason it was placed somewhere. Of course now I have removed all the breakpoints and have compiled this project again but it still I have been Checked in options-> "Bus-in-time debugging" has not been marked. Any ideas? (I use Visual Studio 6 Eric Definitely helps it, but anyway: / P> Try disabling the default debugger option (this is Dr. W...

.net - Do LINQ queries have a lot of overhead? -

एक IEnumerable & lt; T & gt; हल्के या हेवीवेट पर सरल LINQ क्वेरीज़ हैं? वे के लिए या foreach लिपियों के हाथ से कैसे लिखते हैं? उदाहरण के लिए: var कम नम्बर = n से संख्या में जहां n & lt; के लिए एक सामान्य दिशानिर्देश है जब LINQ versus मैन्युअल खोज को पसंद करते हैं? 5 चुनें n; की तुलना में: सूची & lt; int & gt; कम संख्या = नई सूची & lt; int & gt; (); अग्रगण (संख्या में एनएन) {if (n & lt; 5) {lowNums.Add (n); }} मैं LINQ के बारे में एक सहकर्मी से बात कर रहा था और उसने इसे इस्तेमाल करने के बारे में कुछ झिझक व्यक्त किया उन्होंने यह अनुमान लगाया कि LINQ कर सकते हैं सब कुछ का समर्थन करने के लिए "पर्दे के पीछे" चलने में बहुत कुछ हो सकता है। क्या उपर्युक्त उदाहरणों के बीच एक महत्वपूर्ण प्रदर्शन अंतर है? क्या कोई अच्छा संसाधन हैं जो संग्रह पर LINQ के प्रदर्शन के बारे में बात करते हैं? कुछ सरल प्रतीत होता हुआ पुराने लेखों के लिए एक सरल Google खोज। लेखकों ने के लिए, foreach, सूची & lt; T & gt; .FindAll , और LINQ क्वेरी...

canvas - SVG Parser in Javascript -

I believe at one point, I used to work in the browser using a canvas element as backend Saw small SVG implementation I found some sites that appeared to indicate, however, this site no longer exists. Is this project (or similar one) still anywhere on the web? After looking good around Google, it seems that the Canvas SVG compared to a project There was never too much, which are now working for Apple. I have noticed that Google has cached its site at least on July 2, not staying offline for a long time, although there is no trace of Canvas SVG in Google Cash, only There is an old blog. Archive.org has any part of that page, though it includes a download link. I found a project on Google code. Both of those downloads are version 0.1. I have some other, similar projects, but there is no such thing that actually sent SVG to & lt; Canvas & gt; . For example, goes to the other side.

asp.net - Trust Level required for Membership Providers -

It seems that the level of trust for the application is minimal, it seems that standard SQLMembershipProvider does anyone help me understand this Does it have a limit of SQLMembershipProvider, or the fact that I have only minimal confidence? To keep it in any other way, is it possible to use the membership / role provider infrastructure? Or I need to use a different approach to authentication / authorization. Yes, it is possible to do this work in the SQLMashhip provider in the minimum trust. See As you do not indicate which problems you are experiencing, it is wrong to recognize that it is not possible to identify.