Monday 15 June 2015

xamarin.ios - iPhone 4/iPhone 5 User Interface compatibility in MonoTouch -


I hope someone can help me with this one. I have an app that I'm trying to update to get rid of letterbox look while walking on iPhone 5. I've added the default 568H @ 2x.png to this project and scales the app correctly. Either the splash screen looks correct on the device, but I have a toolbar on the "Home" screen that I can not find in the right place. If I find it right for 5, then I can not see it on 4S, and if I understood it for 4s, then it is very low on 5.

Am I missing something? Do I need to manually move the toolbar at the top manually?

Any advice is appreciated!

Thanks

Some suggestions on using the interface builder to handle resizing Given are

  1. Take advantage of simultaneous metrics in the interface builder, as shown here: attribute inspector, simulate metrics, size: retina 4 fullscreen
    To do this, select your top-level view, and open the attribute inspector. After this, you can choose different sizes and orientations to see the answer to your idea.
  2. Select the automatic option option as shown here:
    Size Inspector, see Fixed top margin
    In your case, you want a certain margin on top, but want a flexible margin below. Note that this is contrary to the default for the toolbar because the iOS configuration tool is for the bottom part of the toolbars.
  3. It suggests that due to rotation and different screen sizes, that size can often be handled in the same way. (Thus, if you handle portrait and landscape orientation using autosizing, iPhone5 layout usually takes care of itself.)

python - Can functools.partial be used to bind arbitrary positional arguments? -


Suppose you define partial to set positional arguments in an arbitrary order To correct 2 and 3 th arguments you want, the results you want to apply partial to str.split are as follows:

  Lambda: str.rsplit (S, SEP, 1) #Sep was given.   

(I use s.rsplit (... instead of str.rsplit (s ... and To make more points)

  partial (str.rsplit, sep = SEP, maxsplit = 1) #         SEP   

but str.rsplit does not use keyword logic, only positional.

Partially, how to fix those arguments? The only option is long and wrapper?

If you want to define the function inline, then the rapper is ugly, like the function's Defining the argument for the dispute. Lambda is Defacto here, and partial is the second option, but in this case it is lacking. You can not do this with the partial . This is because The PyArg_ParseTuple function uses the API that does not provide keyword logic from split . From Python's perspective, it seems that the method is defined as Interpretation:

  DEF division (self, * Arges): If Len (Arjis) & gt; 2: Increase the type arrow (...) sep = args [0] if the args and none maxsplit = args [1] if LAN (Args)> gt; 1 and -1 ...   

Can only provide positional logic in partial order. It is mentioned, where they say that partial "is almost equivalent":

  def partial (func, * args, ** keywords): def newfunc (* Fargs, ** fkeywords): newkeywords = keywords.copy () newkeywords.update (fkeywords) return func (* (args + fargs), ** newkeywords) newfunc.func = func newfunc.args = args newfunc.keywords = keyword newfunc   

Note return func (* (args + fargs), ** newkeywords) which clearly shows that you partial Other functions are included in Arguments.

The conclusion is that lambda is more powerful than partial .

On the one hand, in Python 3.3, you can specify maxsplit as a keyword argument:

  & gt; & Gt; & Gt; '' Some strings with spaces ''. (Same as 'max', 'some', 'string', 'empty space']   

and this was also the same issue for many other methods / functions.

paypal access oauth login json_decode returned null -


I have 2 PHP files, one index.php and the other is paypal.php. Code for PayPal.FPP is:

   1, CURLOPT_POSTFIELDS = & gt; $ POST, CURLOPT_RETURNTRANSFER = & gt; 1, CURLOPT_SSLVERSION => 3); Curl_setopt_array ($ ch, $ option); $ Response = curl_exec ($ ch); Curl_close ($ ch); $ Atoken = json_decode ($ response); $ Profile_url = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/userinfo?" "Schema = OpenID". "Access_token =". $ Atocon-> access token; $ Ch = curl_init ($ profile_warnel); $ Option = array (CURLOPT_RETURNTRANSFER = & gt; 1, CURLOPT_SSLVERSION => 3); Curl_setopt_array ($ ch, $ option); $ Response = curl_exec ($ ch); Curl_close ($ ch); $ Profile = json_decode ($ response, true); $ _SESSION ['paypal_use'] = "true"; $ _SESSION ['profile'] = $ profile; Echo ("& lt; scripts> top position .hr = 'index.php' "); }? & Gt;   

The code for index.php is:

   LOGOUT & lt; / a & gt;"; } Else {// login? & Gt; & Lt; A href = 'paypal.php' title = 'PayPal Out Login' & gt; & Lt; Img src = 'https: //www.paypalobjects.com/en_US/Marketing/i/btn/login-with-paypal-button.png'> & Lt; / A & gt; By & lt;? }? & Gt;   

Any idea why this code is not working? I tried var_dump json_decode and it returns empty.

Thank you!

I am wrong, but I believe that you must have a scope ...

  "scope": "email https://uri.paypal.com/services/paypalattributes",   

is the URL profile

c# hookinig API -


I am working on an anticheat and I would like to read / write process memory, open process like API and maybe check some more It reads or writes some data.

But I am not going to do that experienced programmer on my own, so I tried to make it easy through Hook. First of all, to get me the work (example) I tried to replace CreateFile with ReadProcessMemory , but it was a line . questions. Push (hpr.); , how should I change hProcess in case I'm hooking ReadProcessMemory ?

I can not find any other examples of hooking API # A hooking CreateFile was posted above. Apart from this it is not necessary to be easy to hook if there is any easy way. Thank you.

I did not read all that article, but the way I understood it, < Pre this.Queue.Push (& lt; logic for original function & gt;)

The part is for the tracer part of its example.

If you want to do anything, then anyone can be prevented from calling ReadProcessMemory, then you do not have to do this and you will not call the original entry point - just return the caller wrong.

ios - Multiple Push Segues to One View Controller in Storyboard -


I have an application in excode 4.6 which uses the storyboard. The Root View Controller is embedded in a navigation controller, and all the view controllers are accessed through the navigation through the navigation through the navigation controller.

When I reached a particular scene controller (called a photo) by two different view controllers through a push seagu, then I ran into a complexity. After adding another controller, the photo controller was seen as a navigation controller inside a navigation controller. The goal is to do only one with a discarded button (when pressed) in one navigation bar, whichever comes out of the two view controllers, the photo view controller presents I am new to iOS And I'm not sure whether or not this is the best way to accomplish this or how to handle this situation generally.

Here is a picture of my storyboard for reference:

here Enter the image details

You really should program it using sleepboardID. There are only a few lines of code in each view controller.

Adding Tomcat into Eclipse -


I am trying to add a tomcat server to a runtime environment. I have successfully installed Tomcat. I already have Java EE eclipse, but window-> Priority-> Server- & gt; After searching the runtime environment and apache tomcat, and then after searching under a window with the following text popup, click OK: No new server runtime environment was found. What am I doing wrong? I thought after switching to Java EE and installing the Tomcat, I would be able to add RE ... Thanks a lot in advance!

After trying to add again: a tomcat server list !!! Enter image details here

After searching (C: / Program Files / Apache ..) enter image details here

and finally choose "Apache Software Foundation" Popup "and then  enter image details here

You must specify the server runtime in that window with the browse button, that directory Select the base path from where you have installed the Tomcat and proceed. Hopefully, if you have internet connectivity, then there may be an option to download and install.

If you do not see a server type in the 'Add new server' dialog, then in which case, in the server adapter you can click on the 'Download Additional Server Adapter' link, this is called 'Tomcat Server A' Eptr 'will allow you to select and download the one time.

Add new server

 Add new server

Some screenshots will also help you understand and assist your problem.

Hope it helps.

python - Yield & closing file objects properly -


मेरे पास निम्न श्रेणी है:

  वर्ग JsonIterator (ऑब्जेक्ट): def __init __ (self , फ़ोल्डर): self.root = os.path.join (os.getcwd (), फ़ोल्डर) self.fis = [os.listdir (फ़ोल्डर) में फाई के लिए अगर डीआईएफ __iter __ (स्वयं) में "गीत": I = 0 ओपन के साथ (os.path.join (self.root, self.fis [i])) च: उपज json.load (f) i + = 1   

यह है काम नहीं कर रहा मैं इसे कैसे करना चाहता हूं - ऐसा लगता है कि पहली फाइल से परे नहीं जाना मैंने कोशिश की है

  def __iter __ (स्वयं): i = 0 f = open (os.path.join (self.root, self.fis [i])) js = json.load (F) f.close () उपज जेएस i + = 1   

लेकिन किसी भी तरह से, लेन (सूची (जेसनइटरेटर ("पथ / टू / मायफ़ोल्डर"))) मुझे 1 देता है, और मैं एक तथ्य के लिए जानता हूँ कि फ़ोल्डर में एक से अधिक फाइल है वैकल्पिक, निश्चित रूप से, कुछ ऐसा होगा

  def __iter __ (स्वयं): i = 0 उपज json.load (खुला (os.path.join (self.root, self.fis [ I])))) i + = 1   

लेकिन उन सभी खुली फाइलों को खिसकाने से मेरी प्रक्रिया को बहुत मेमोरी हो जाती है, मेरी प्रक्रिया को मार दिया जाता है

तो मुझे क्या करना चाहिए? मैंने किसी प्रकार की डेकोरेटर लिखने के बारे में सोचा, लेकिन मैं वास्तव में यह समझ नहीं पा रहा हूं कि ये काम कैसे करें, या यहां तक ​​कि अगर मेरी समस्या हल हो जाए।

धन्यवाद!

आपको self.fis में फ़ाइल नामों पर लूप की आवश्यकता है:

  class JsonIterator ( ऑब्जेक्ट): def __init __ (self, folder): self.root = os.path.join (os.getcwd (), फ़ोल्डर) self.fis = [os.listdir (फ़ोल्डर) में फाई के लिए अगर "lyrics" ] Def __iter __ (स्वयं): स्वयं के लिए फाई के लिए: खुले (os.path.join (self.root, fi)) के रूप में च: obj = json.load (f) उपज obj    

entity framework - How to avoid anemic domain model with business logic in the form of rules -


I am preparing a system in which a simple entity framework is backed domain object based on a series of fields I need to update the rule - I want to apply these rules gradually (in a tight style) and as I am using EF, I doubt about putting each rule in a domain object . However, I want to write "procedural code" and avoid using anemic domain models.

As an example, the object is:

  class employee {private string name; Private float pay; Private float pensionpot; Private bull pensions; Private child-rights; } I need to make rules such as "If salary is more than 100,000 and the qualifying qualification is wrong, then set the right form as correct" and "If the obligation is right, then correct Set the Eligible Force as ".  

There are about 20 such rules and I would like to advise whether they should be implemented in the staff or anything like the staff? My first thought was to create a separate category for each rule that was received from "Rule" and then implementing each rule in the Employee class, possibly using Visitor Pattern, but to expose all the areas of rules to do this In order to do so it seems wrong, despite having every rule on the working class, it does not seem quite right. How can this be implemented?

The second concern is that the actual employee units are supported for framework organizations DB, so I am not happy to add logic to these "institutions" - especially when I need to duplicate the object for each unit of rules If I follow the rules, then I can test the same thing.

Before I apply the rule, I'm considering using Automapper to convert to a simple domain object, but then need to manage the updates of my own fields. Any advice?

One way is to make the code an employee of the internal code . The advantage of this approach is that the area can be private. In addition, the invocation of rules can be applied only by the employee class, to ensure that they are always applicable when necessary: ​​

  class employees {string id; String name; Float pay; Float pensionpot; Bull Pension; Boolean character forward; Public Zero Change Salary (Float Pay) {this.salary = salary; ApplyRules (); } Public Zero MakeAgigibleForPension () {this.eligibleForPension = true; ApplyRules (); // may or may not be necessary) Zero Application Form () {rules.ForEach (rule = & gt; rule. Apply (this)); } Read Only Stable List & lt; IEmployeeRule & gt; Rule; Stable Employee () {Rule = New List & lt; IEmployeeRule & gt; {New incremental PensionEligibilityRule ()}; } IEmployeeRule {Apply zero (employee employee); } Class Salary Practice Disability Rules: IEmployeeRule {Apply Public Zero (Employee Employee) {If (Employee Gold> 100000 & Employee! Eligible Forward) {employee.MakeEffectForPension (); }}}}   

There is a problem here that all rules must be enforced in the employee class. This is not a major problem as the rules involve business conjunctions related to employee pension And so they are together.

android - Anybody experiencing ANR when using MediaPlayer as service? -


Hi, I am getting ANR (no application answer) errors but why can not I understand if I click on "Waiting" then everything works properly and ANR is not coming back now.

Now, I know that when MediaPlayer is used as a service, then preprocessor and .prepared () method instead of simple .prepare () and .start () This UI does not lock the thread and works great.

The problem is that while opening the file all my ANRs are not being done (you guess high processor there), but randomly when they are playing and when the CPU is at least % As I mentioned earlier that nothing is too close to being responsive and there is little left over the UI thread.

The only clue is that I do not have to play any track for the first time, but after only one track it has been changed. I thought that the ready threads were knocking and I did not add any changes to the lock itself.

I tried to release the media player every time before starting a new track. No change

I tried resetting, stopping etc. in many scenes. no changes.

Has anyone experienced the same thing?

As an alternative solution, is there any way to automatically dismiss ANR? I know that this is not the answer but I can not find any option I am on a Routed tablet (I compiled Rome) and this is for myself - no delivery

thanks

A standard service actually runs on the main thread, if you are looking at ANR, then you probably have the entire media player Should be taken in

Most confusions about service classes actually spill which is not it:

  • One service no is a different process .
  • No service no is a thread that does not mean it works for the main thread (no answer to errors to avoid the application)

    You are already using prepareAsync () , but as you said the error occurs when MediaPlayer is running, is not preparing . Without actually knowing more about the cause of ANR, I believe that switching to the Handler Triad is your best choice.

performance - Why is iterating over a hashmap O(c/n)? -


There are too many links that tell me that there is a big hush for a hashp:

  O (1) o (1) o (o) (1) next object o (c / n) c = table capacity (number of bucket) in o (1) o (1) n = size  < / Pre> 

It is a bit obvious why why get / join / include O (1), but I want to know why this frequency is O (C / N).

And when I am in it, I'd love to know that Big O, they are concurrently hashap, treemark etc.

Has anyone got a good link?

Linked papers not say that the code is O (C / n) . It says "next entry" is o (c / n) . The change for each N is "next entry".

First of all, note that c (capacity)> N (entries) is an irreversible - and C is of some function - then O (c / n) & gt; O (1 / n) . (Note: According to the comment, I am not entirely sure about claiming irreversible in the implementation of Hashmap which uses Channing for collision resolution.)

What does effectively say that a standard hashmap should be left on empty and a few buckets that are seen when doing "next entry". Thus the limitations are "more" than "over" for "next entry" but even though this limits the care while reading, because not indicates it Running faster with more n - it only describes "next entry". Total N entries.

  Since O (1 / n * N) -> gt;  

Since the regeneration is effectively just "next entry" for everyone, for the repetition of a hashmap:

  O (1 / n * N) - & gt ; O (n) o (c / n * n) - & gt; C * O (N) - & gt; ~ O (n)   

(Since c is a function of n may be a bit Be differently, in different circumstances, to drag it as a constant, therefore deviation.)

javascript - Upload image,and some text with Ajax and PHP -


I am trying to upload the image and 2 values ​​from the text field, but I use the input type = "file Can not "for processing, because I first got the camera capture and preview image and lt; Img ... , after which I replace the source of the image tag (maximum 500kb) and upload the image I try. If I use an input type = "file", then I upload a first image, one size does not change. Any sugestions?

You can capture the cam image and transfer the form (base 64 encoded) to your server from the form can do. Or put base 64 encoded image into hidden input.

php - How to change root of a node with DomDocument methods? -


How can one change the name of the root of only one dom node?

We can not change the property document element in the DOMElement object in the DOM document model, therefore, we need to "rebuild" the node. .. But how to "rebuild" with childNodes property?


Note: I can do this ... but this is a solution, not a DOM-solution. PHP example

PHP example (does not work, but why?):

try-1

/ H3>
  // DOMElement :: documentElement can not be changed, hence ... function DomElement_renameRoot1 ($ ele, $ ROOTAG = 'newRoot') {if (Gettype ($ ele)) == 'Object' & amp; $ Ele- & gt; Node type == XML_ELEMENT_NODE) ​​{$ doc = new DOMDocument (); $ Eaux = $ doc- & gt; Create Element ($ ROOTAG); // DOMElement foreach ($ ele-> Child nodes as $ node) if ($ node-> node type1 = 1) // domilement $ eaux-> AppendChild ($ node); // Error! Otherwise ($ node-> node type == 3) / DOMText $ eaux-> Append chald ($ node); // Error! $ Eaux return; } And die ("Error: invalid DOM object as input"); }>   

Append shield ($ node) Due to error:

  Fatal error: 'Exception exception' with message 'DOMException' Wrong document error '  

try-2

@ suggestion (only pointing link) and my interpretation of the poor

  function DomElement_renameRoot2 ($ ele, $ ROOTAG = 'newRoot') {$ ele- & gt; Owner Document- & gt; Rename ($ ele, null, "h1"); $ Ele returned; }   

An error occurred with the renameNode () method,

  Warning: DOMDocument :: renameNode (): Not yet implemented   Rename Function (DOMElement $ node, $ newname) {$ newNode =    $ node- & gt; OwnerDocument- & gt; CreateElement ($ NewName); Forex Currency ($ node-> Features $ attribute) $ newNode- & gt; Set attribute ($ attribute- & gt; node name, $ attribute-> node); While ($ node-> first hair) $ newNode-> Append chald ($ node-> first hair); // Change baby first! Next! $ Node- & gt; Owner Document- & gt; Replaceable children ($ newnode, $ node); // change $ node? // $ newNode's return is not required; }   

An error occurred due to the replaceChild () method,

  Fatal error: message 'not found error' with 'exception' DOMException '  

As it has not actually been answered yet, the error you get is slightly You have copied the renameNode () function.

I have seen this problem well and do not have this error:

  / ** * A node changes the name of a DOM document. * * @ Param Domellement $ node * @ Ultimate String $ name * * @ Return Domod * / Function dom_rename_element (Domain $ node, $ name) {$ name = $ node-> Owner Document- & gt; Create Element ($ name); Forex currency ($ node-> attributes as $ attribute) {$ renamed-> Set attribute ($ attribute- & gt; node name, $ attribute-> node); } While ($ node-> First Child) {$ named-> Append chald ($ node-> first hair); } $ Node- & gt; ParentNode-> Replace the changed child (changing $ name, $ node); }   

You can see it in the last line of the function body: this - & gt; Owner.document instead of -> ParentNode is using . As the $ node was not a child of the document, you found the error and it was wrong to believe that it should be. Instead use the basic element to change the child there;)

It has not yet been outlined in PHP manual users, however, if you follow the link of the blog-post, the original form From the renameNode () function it has been suggested that you can also offer this solution to a comment given below.

Anyway, my version uses a few different variables naming here and is more specific, as in the example in the PHP manual about the types it works with names nodes. I have not been booked yet what would be best, e.g. An additional work is working with it, taking from the node to the namespace to clearly change or change a different function at a different function.

asp.net mvc - Why isn't the value of default-only variable added to an outbound URL as part of the query string? -


क्यों डिफ़ॉल्ट-केवल चर myVar का मान नहीं है आउटबाउंड URL में क्वेरी स्ट्रिंग के भाग के रूप में जोड़ा गया है:

  routes.MapRoute ("MyRoute", "{नियंत्रक} / {कार्रवाई } ", नया {myVar = 1});   

Index.cshtml:

  @ एचटीएमएल.एक्शनलिंक ("मुझे क्लिक करें", "कस्टमवेरबल", "होम", नया {myVar = 1, नया मैवर = 1000}, नल);   

ऊपर से रूटिंग सिस्टम उत्पन्न करता है:

  & lt; a href = "/ home / customvariable? NewMyVar = 1000" & Gt; मुझे क्लिक करें & lt; / a & gt;   

धन्यवाद

अपने रूटिंग नियम में आप यह कहते हैं कि यदि डिफ़ॉल्ट मान प्रदान नहीं किया गया है, तो इस मान का उपयोग करें।

इसलिए मूल मूल्य के समान ही मूल्य प्रदान करने की कोई आवश्यकता नहीं है, क्योंकि यह केवल डिफ़ॉल्ट मान का उपयोग करेगा।

asp.net - Creating non-trivial database on SQL Server on request -


The code that I sent from asp.net as a new batch slows down slow new database using 17000 lines of script I am facing a problem with the creation. The problem with an order is that execution of this script sometimes takes more than 20 during peak times. If I run this script in SQL Server Management Studio, then it takes 2S.

What is the best practice to build a database on request, DB by scripting an archived procedure, database cloning, pre-creation and renaming it? We need to ensure that it is compatible under load under concurrent environment.

Thank you.

17000 lines on the wire on a SQL server seem like a terrible quantity and as slow as possible is. So, using ASP.NET's SQL client to do something like that.

Yes, I am in your favor using a stored procedure to do this. DB is also not sure about cloning and renaming operations; I can bet you can be away from defining it by using parameters in your stored procedure.

javascript - jQuery hover and Slide -


मेरे पास 20 भिन्न डिविज़ हैं।

5 वर्ग = "आइकन",

4 वर्ग = "शास्त्रीय",

4 वर्ग = "वॉलपेपर", और

2 वर्ग = "विविध "।

प्रत्येक div में वर्ग के साथ एक div है ="। प्रकार " मेरे पास शीर्षक प्रकार के शीर्ष भाग (लगभग 27 पिक्सल) हैं, लेकिन बाकी का छिपा हुआ है जब कोई व्यक्ति। प्रकार की डिवा पर जाल करता है, तो यह ऊपर स्लाइड करता है (मार्जिन-टॉप: 0 पिक्सेल को बदलकर) जब माउस अब इसे नहीं खोता है, तो इसे अपने मूल स्थान (मार्जिन-टॉप: 110 पीएक्स) पर वापस जाता है।

और जावा कोड।

  (फ़ंक्शन ($) {Var मूल = []; $ ('। प्रकार')। प्रत्येक (फ़ंक्शन (i) {मूल। Push ($ (this)। सीएसएस ('मार्जिन-टॉप'));}); $ ('। Type' ) .होवर (फ़ंक्शन (ई) {$ (यह) .स्टॉप ()। चेतन ({"मार्जिन-टॉप": ($ (यह)। Parent ()। बाहरी हेइट () - $ (यह)। OuterHeight ()) }, 250);}, फ़ंक्शन (i) {var i = $ ('। प्रकार')। इंडेक्स ($ (यह)); $ (यह) .स्टॉप ()। चेतन ({"मार्जिन-टॉप": मूल [I]}, 250);});} (jQuery));   

यह पूरी तरह से ठीक काम करता है, किसी को भी एक पर जाली नहीं छोड़ता। टाइप डिव, और दूसरे पर होवर करने के लिए जाता है। पहले पहले टाइप डायल। तो .इनन, .रिकिन, .स्कूल प्रोजेक्ट, आदि। डिव एक बिट से नीचे ले जाया गया है। और अपने आप को इसे बाहर की जाँच करें मुझे नहीं पता कि यह क्यों कर रहा है।

जब आप "मार्जिन-टॉप" का उपयोग करते हैं वास्तव में सीएसएस डिविज़ के प्रवाह के साथ गड़बड़ है, इसलिए यदि आप "टॉप" का प्रयोग करते हैं, तो स्थिति उस डिवेल पर लागू होती है, आपको भी "रिश्तेदार" के रूप में सेट करना होगा। एक अन्य बात, आपकी मूल स्थिति सिर्फ "0" हो सकती है, और खींचने की मात्रा आपके टाइप का आकार हो सकती है।

इस संशोधन को बाहर की जाँच करें:

( यहां टेस्ट करें:)

  (फ़ंक्शन ($) {var मूल = []; $ ('। प्रकार')। प्रत्येक (फ़ंक्शन (i) {मूल.push (0);}) ; $ ('। प्रकार')। हॉवर (फ़ंक्शन (ई) {$ (यह) .स्टॉप ()। चेतन ({"शीर्ष": - ($ (यह)। हाइट ()), 250);}, फ़ंक्शन (i) {var i = $ ('। प्रकार')। इंडेक्स ($ (यह)); $ (यह) .स्टॉप ()। चेतन ({"शीर्ष": मूल [i]}, 250);} );} (JQuery));    

Rails::Rack:LogTailer and Unicorn -


I'm going from Uncut to Unicorn So far everything works and my test is passing, but I'm going through my terminal Can not find a useful log statement in. I have to do tail log / development.log to see it.

I read and was able to work by changing the logs to STDOT, but I want to have my development log file as well, I can do this later grep I am

How can I get Rail: :: Rack :: log log, can it be shown even after booting my server?

Maybe I do not need Rail :: Rack :: Log Tyler? I would not like to tail my log file after every request.

If it is relevant ... I am running Rail 3.2.13, Rack 1.4.5, and Unicorn 4.6.2.

- Edit -

I created my config / environment / development.rb

config.middleware.insert_after ( Rail :: Rack :: Wood, Rails :: Rack :: Log Tyler, "/log/development.log")

But it does not seem to have any effect.

fix is ​​very simple, delete leading "/".

Change:" /log/development.log "
To:" log / development.log "

ruby on rails 3 - Uploadify - How to upload contents of a folder recursively -


I have to upload files in a folder recursively

in the folder Is it possible to use uploads to upload folder contents by choosing a folder instead of selecting individual files?

I do not think so. Browser is in the control of file selection dialog (which will not allow you to select folders, only files).

I paid the Uploadifive (HTML 5 edition), but it can support dragging a folder. Not sure how HTML5 allows drag-drop

Java : Stack -> ArrayList -


यहाँ है जो मैंने अभी तक किया है:

  System.out.println ("\ fStack - अर्रेलिस्ट डेमो \ n "); ArrayList & LT; स्ट्रिंग & gt; अल = नया अर्रेलिस्ट & lt; स्ट्रिंग & gt; (); ढेर & LT; स्ट्रिंग & gt; St = नया स्टैक & lt; स्ट्रिंग & gt; (); // ArrayList al.add ("A") में कुछ तत्वों के साथ प्रारंभ करें; al.add ( "बी"); al.add ( 'सी'); st.addAll (अल); // स्टैक के लिए ArrayList तत्वों को पुनः प्राप्त करें और उन्हें वहां जोड़ें al.clear (); // भंडारण के लिए स्पष्ट सूची // बाद में स्टैक में अंतिम तत्व पॉप आउट करें। System.out.println ("\ n अंतिम तत्व को दबाएं:" + al.add (st.pop ())); System.out.println ("क्या ढेर के छोड़ दिया है:" + st + "\ n"); System.out.println ("अरेरेस्ट, अब:" + अल); // पॉपिंग रखें ... int count = st.search ("A"); जबकि (गणना! = -1 & amp;; & count; = 1) {System.out.println ("अगले पपिंग .." + al.add (st.pop ())); count--; } // क्या ढेर खाली है? System.out.println ("\ n स्टैक रिक्त?" + St.empty ()); System.out.println ("आरे लिस्ट अब:" + अल);   

al.add (st.pop ()) का उपयोग करना; रिटर्न "true" जब मैं प्रोग्राम चलाता हूं। क्या वास्तविक तत्व को (ए, बी, सी) पॉप किया जाना चाहिए?

जोड़ राज्यों के लिए:

  रिटर्न: सच (जैसा कि निर्दिष्ट है Collection.add (ई) द्वारा)   

ऐसा लगता है जैसे आप जो तत्व जोड़ रहे हैं उसे प्रिंट करना चाहते हैं। इसलिए:

  स्ट्रिंग elem = st.pop (); System.out.println ("जोड़ने" + elem); Al.add (elem)   

यदि आप सॉफ्टवेयर डेवलपर होने की योजना बनाते हैं, तो दस्तावेज पढ़ना और समझना अभ्यास करने के लिए एक महत्वपूर्ण कौशल है।

java - How do I make the circle bigger than the arcs inside without going off center? -


यह मेरा कोड है:

  आयात करें java.awt.Graphics; आयात करें java.awt.GridLayout; आयात javax.swing.JPanel; आयात javax.swing.JFrame; सार्वजनिक वर्ग के चौफ्रेट्स जेफ्रेम {सार्वजनिक चारफन () {setTitle ("DrawArcs") में फैली हुई है; जोड़ (नया आर्क्सपैनल ()); जोड़ (नया आर्क्सपैनल ()); जोड़ (नया आर्क्सपैनल ()); जोड़ (नया आर्क्सपैनल ()); } सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {चौफिंस फ्रेम = नया चौफन (); ग्रिड लेआउट परीक्षण = नया ग्रिड लेआउट (2,2); frame.setLayout (परीक्षण); Frame.setSize (250, 300); frame.setLocationRelativeTo (शून्य); // केंद्र फ्रेम फ्रेम। सेटडिफ़ॉल्ट क्लोज ऑपरेशन (JFrame.EXIT_ON_CLOSE); frame.setVisible (सही); }} क्लास ArcsPanel JPanel {संरक्षित void paintComponent (ग्राफिक्स जी) {super.paintComponent (जी); Int xCenter = getWidth () / 2; Int yCenter = getHeight () / 2; इंट त्रिज्या = (इंट) (मैथ। मीन (getWidth), getHeight ()) * 0.4); Int x = xCenter - त्रिज्या; Int y = yCenter - त्रिज्या; जीफिलएआरसी (एक्स, वाई, 2 * त्रिज्या, 2 * त्रिज्या, 0, 30); G.fillArc (एक्स, वाई, 2 * त्रिज्या, 2 * त्रिज्या, 90, 30); G.fillArc (एक्स, वाई, 2 * त्रिज्या, 2 * त्रिज्या, 180, 30); G.fillArc (एक्स, वाई, 2 * त्रिज्या, 2 * त्रिज्या, 270, 30); G.draw ओवल (एक्स, वाई, 2 * त्रिज्या, 2 * त्रिज्या); }}   

हर बार मैं 2 * त्रिज्या से 2.1 * त्रिज्या बदलने की कोशिश करता हूं, यह मुझे दोहरा नहीं करता क्योंकि यह एक डबल है तब जब मैंने एक निश्चित संख्या में रखा जो आर्क्स से बड़ा होता है, तो यह सर्कल ऑफ सेंटर को बनाता है।

आर्क की तुलना में बड़ी संख्या में डालने का कारण यह है कि आपका वर्तुळा केंद्र बंद हो जाता है क्योंकि जावा आप सर्कल / सर्कल आर्क की उत्पत्ति के बजाय एक्स, वाई के रूप में ऊपरी बाएं कोने को प्लगइन करते हैं इसलिए यदि आप इनमें से एक को बड़ा बनाते हैं तो आपको उसकी पुनरावृत्ति करना होगा कि उसका एक्स और वाई क्या होगा, उदाहरण के लिए

  int radius = (int) (math.min (getWidth), getHeight () ) * 0.4); इंट रेडियस ओवल = (इंट) (मैथ। मिन (getWidth), getHeight ()) * 0.4 * 1.05); Int x = xCenter - त्रिज्या; Int y = yCenter - त्रिज्या; Int xOval = xCenter - त्रिज्या ओवल; Int yOval = yCenter - त्रिज्या ओवल; जीफिलएआरसी (एक्स, वाई, 2 * त्रिज्या, 2 * त्रिज्या, 0, 30); G.fillArc (एक्स, वाई, 2 * त्रिज्या, 2 * त्रिज्या, 90, 30); G.fillArc (एक्स, वाई, 2 * त्रिज्या, 2 * त्रिज्या, 180, 30); G.fillArc (एक्स, वाई, 2 * त्रिज्या, 2 * त्रिज्या, 270, 30); G.draw ओवल (एक्सवॉल, ओवल, (इंट) (2.1 * त्रिज्या), (इंट) (2.1 * त्रिज्या));    

bash - Re-Routing Raspberry Pi GPIO - Dummy Pin? -


I am working on open-source project openrovy porting for Raspberry P (this project was developed for beagle bone ). The only important challenge of the port is changing the reference of GPIO1_0 (aka GPIO32) software to a pin that is open on top of Raspberry PI (I am thinking GPIO18). The original code is as follows:

  #! / Bin / sh # GPIO1_0 equals / sys / class / gpio32 (32 + 0) #see http://ninjablocks.com/blog/ 2012/1/20/set-up-GPIO -On-The-BeagleBoneHTML BackTor_Oormal () Echo "high" & gt; higher than Sleep 1 # GPO1 SIP; / Sys / class / gpio / gpio32 / direction} reset () {sleep 1 #prepare gpio echo "32" & gt; / Sys / class / gpio / export Echo "Out" & gt; / Sys / class / gpio / gpio32 / direction echo 7 & gt; / Sys / kernel / debug / omap_mux / gpmc_ad0 #set GPIO1_0 to lower the "lower" echo & gt; / Sys / class / gpio / gpio32 / direction back_to_normal} echo arduino reset 1 & gt; 2 resets & amp;   

Of course, I can go through bus and can change a lot of references from 32 to 18, but with this every update will require additional work. Instead, is there any way to create a dummy GPIO 32 which automatically redirects the command to GPIO 18?

I just python and rpi with risberry p and its GPI The GPO started using the Linux package. I have written about my first simple steps on my blog:

is a call that sets the mode of the board or BCM, which is the GPIOOSCET (GPIO board) or GPIO. Sitmoda (GPIO.BCM) By calling and changing between two pin configurations. If you see how it can help you with your problem.

java - Error in Android's "Building a Simple User Interface" tutorial -


So I'm trying to follow with Android's "Eclipse using a Single User Interface Building" tutorial, But I'm getting two errors which are preventing my code from running

The first error is in the res / menu / main.xml ad:

Error: Error : No resource found which matches the given name ('Title' at

Line of code let me know this error Is:

  android: title = "@ string / action_settings" />   

My second error res / values ​​/ strings.xml Error: The tag string in which the item is expected

for line

   

Code> & lt; string name = "menu_settings"> settings

The entire "String.xml" file is as follows:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & lt; Resources & gt; & Lt; String name = "ap_name" & gt; My first app & lt; / String & gt; & Lt; String name = "edit_message" & gt; Enter a message & lt; / String & gt; & Lt; String name = "button_send" & gt; Send & lt; / String & gt; & Lt; String name = "menu_settings" & gt; Settings & lt; / String & gt; & Lt; String name = "title_activity_main" & gt; Menactivity & lt; / String & gt; & Lt; String name = "action_settings" & gt; Settings & lt; / String & gt; & Lt; / Resources & gt;   

Although I have experience using Java / Alepsay, I'm new to Android and XML, so I do not know exactly what these errors mean. Whatever help you can provide, it will be appreciated! Change from string to string (lowercase ''



mysql - Login with LDAP using JSF 2,1 & Apache Tomcat -


More than a problem, I need to authenticate using JSF. I have developed a login, which is a user Receives names and passwords that are stored in MySQL. After logging in from Active Directory, the username and password of E. should be taken, which, I think, should be the same as MySQL.

Then, to enter the system, you should now see

Greetings.

This is my solution, it worked for me: edit faces-config.xml: < / P>

  & lt; Lifecycle & gt; & Lt; Step Listener & gt; Com.xxx.admin.security.login & lt; / Phase-listener> & Lt; / Life cycle & gt;   

Category login:

  applies the public class login PhaseListener {Private Static Last String USER_LOGIN_OUTCOME = "Login to"; Override public zero after @files (Festive Event) {FacesContext Reference = event.getFacesContext (); If (userExists (reference)) // // 1. Last login // update 2. can end ??? ExternalContext extContext = context.getExternalContext (); . {ETT_UserDTL tmpUser = (ETT_UserDTL) try extContext.getSessionMap () find (User.USER_SESSION_KEY); If (! Authenticator.authenticateUser (tmpUser, context)) {// Login view to the user in re-entry (reference); } other { ; } // Allow the process of the requested view} Catch (Exception Pre) {SystemLogger.getLogger (). Error (ex); ClientMessage.logErr (ex.toString ()); Re-login (context); }} And {// send the user login view in re-entry (reference); }} Private Boolean UserExists (Facessex Context) {// Researcher Authenticator is required. // Check User ExternalContext ExtContext = context.getExternalContext (); Return (extContext.getSessionMap (). Contains KEY (User.USER_SESSION_KEY)); } Private Zero Rewrite (FacesContext Reference) {// login to user in login view if (requestingSecureView (reference)) {context.responseComplete (); Context.getApplication (). GetNavigationHandler (). HandleNavigation (Reference, Blank, USER_LOGIN_OUTCOME); } other { ; }}}   

LDAPAuthentication:

  public class LDAPAuthentication {static string ATTRIBUTE_FOR_USER = "sAMAccountName"; @SuppressWarnings throws public property authenticateUser (string user name, string password, string strDomain, string strhost, string dn) NamingException {string searchFilter = "(& objectClass = user) (" + ATTRIBUTE_FOR_USER + "= "+ Username" +)); // Search Control Search Search Search Search Certificate = New Search Search (); // searchCtls.setReturningAttributes; // Specify search scope searchCtls.setSearchScope (SearchControls.OBJECT_SCOPE); String Searchbase = DN; Hashtable Environment = New HashTable (); Environment.put (reference. INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); // Using StarDard Port, check your installation environment. Input (context.PROVIDER_URL, "ldap: //" + strHost); Environment.put (reference. SECURITY_AUTHICICATION, "SIMPLE"); Environment.put (reference. SECURITY_PRINCIPAL, user name + "@" + strDomain); environment. Input (reference. SECURITY_CREDENTIALS, password); LdapContext ctxGC = Faucet; {CtxGC = Try New InitialLdapContext (Environment, Blank); // search for objects in GC using filter naming Answer = ctxGC.search (searchBase, searchFilter, searchCtls); While (Answer hasMoreElements ()) {SearchResult SR = (SearchResult) answer.next (); Attribute = sr.getAttributes (); If (attrs! = Null) {return attrs; }}} Hold (exception e) {SystemLogger.getLogger (). Error (e); } Return tap; Authentication:   

Authentication:

  Public Stabilized Bullion Certified DripUuser (String strUser, String Straps, String Strodman, String Strhost) Naming Exceptions, Exceptions {LDAPAuthentication ldap = New LDAP authentication (); Att att = ldap.authenticateUser (strUser, strPass, strDomain, strHost, ""); If (! Att = null) {try {ETT_UserDTL tmpUser = (ETT_UserDTL) DataUtil.performAction (DATA_UserGUI.class, "getInfByUserName", strUser); TmpUser.setPassword (strPass); If (! Other System (tmpUser)) {Authenticator.removeUser (); return false; } other { ; } PushUser (tmpUser); Back true; } Hold (TelsoftException East) {SystemLogger.getLogger (). Error (ex); return false; }} And {updateLoginFail (); return false; }}    

xpath - In XSLT for MODS XML to FilemakerPro conversion, how treat a mod with a parameter? -


Referencing the query, how do I reference a mod in XSLT such as: < Pre> & lt; Style Authority = "Marcus" & gt; Book & lt; / Genre & gt; There are several modes beginning with

( style authorization ), each with a different parameter. So what is the syntax for XSLT? I tried the following But Filemaker says that there is a syntax error.

          

Looks for selection node It seems that you point it out Trying:

  & lt; xsl: select value = "mod: genre [@ authority = 'marcgt']" />    

css - Using overflow-y: hidden or overflow-x: hidden to only hide one side of an element -


The title asks too many questions but I know that overflow-y: hidden and Overflow-X: hidden You can either ride towards an element on the top and bottom or to the left but using one of these selectors is one way to hide only one side.

Especially I am interested in hiding under a section which is flowing above, but not at the top.

If there is no other CSS to cater to the desired effect?

There is a legitimate purpose for this and I have to see that there is a standard way of doing this.

To make it a little clearer, I am under the control of CSS only Slideshows and I have to cover an element within the slideshow above the div above div , But overflow: hidden values ​​are pushed to this div when I do this I can completely remove overflow: hidden But then he does not do a very good slideshow!

A Bela is included below:

below Based on the example given in the given jsfiddle question only provides the desired effect of cutting the bottom edge using Clip :

Complete for reference The code has been copied:

HTML

  & lt; Div class = "outer-container" & gt; & Lt; Div class = "inner-container" & gt; & Lt; / Div & gt; & Lt; / Div & gt;   

CSS

  .ter-container {background: red; Height: 100 pixels; Margin-top: 100px; Width: 150px; Padding-left: 50px; } .non-container {background: green; Height: 200 pixels; Width: 100px; Conversions: Translator Y (-50px); Status: Completed; Clip: Rect (0, 100px, 150px, 0); }    

Chef and ruby: how to convert a array into a set -


I have an array that looks like this:

  nodes = ['server 1 '' server1 ',' server2 ']   

In a chef recipe, I have to convert the set before going to a template ARB. How do i do this

This works with pattern set, matrix, JSON etc; This is the first try.

  'Set' nodes are required [['server1', 'server1', 'server2'] p nodes.to_set # # & lt; Set: {"server1", "server2"} & gt;    

java - Reading data from a server and detecting network unavailability in C# -


I have a simple task: to read data from a server, if the server is unrecoverable (server down or bad network) Load data (potentially stale) from local disk cache.

How Java code looks like this is a simple pseudo representation:

  try {// read from server //} (iOException ioe) {// Most likely That socket timeout read from the local disk exception} {{free I / O resource}}   

but implementing it does not appear in C # It seems that the WebClient , whenever there is no internet access on the host machine, then through the catch block, that situation So there is no way out and back into the local cache. I am aware of the async API of the WebClient and instead the fun callback series, but I consider it very strange and do not properly adhere to my design goals. Is there any way that I can do this in C # as easily as the Java Skeleton Code shown above? Thank you.

WebClient will be timeout, but only after 100

I would recommend that instead you use HttpWebRequest it has a fixed timeout asset.

View

java - Setting the left attribute of a binary tree node through a for loop -


itemprop = "text">

I have a binary tree, which is being implemented through linked nodes (with: int element, binarronode left , Binary node correct, bien node parent attributes). And I want to set the nth node from the root, say, x if n = 3, so i want to root. Left.left.left.left = x

Initially, I was thinking of setting up a temporary BinaryNode variable and doing the following:

  BinaryNode temp = Route; BinaryNode x = new BinaryNode (10, empty, null, empty); For (int i = 0; i & lt; n; i ++) {temp = temp.left; }   

And then once I went to the end, I wanted to say, temp.left = x, but then I realized / did not do that to the actual tree would be nothing , Because there is only a copy of the temporary root?

So how would I go about trying to do this? : & Lt;

In your example, there is a copy of the temp root. This is the reference for the root, so your code will modify the original tree. However, you have another problem - what if the tree does not have nodes? In other words, if n is 5 and only three of the nodes are nodes, then you will get a NullPointerException . When you go down the chain, then you have to do a redundancy check.

java - Cannot read pdf generated by iText __OKBPDF -


<पूर्व> import android.os.Bundle; आयात एंड्रॉइड। एप। Import android.view.Menu; आयात करें java.io.FileOutputStream; आयात एंड्रॉइड। एप। Importroid.os.Bundle; आयात करें android.os. पर्यावरण; आयात करें com.itextpdf.text.Document; आयात करें com.itextpdf.text.Paragraph; आयात करें com.itextpdf.text.pdf.PdfWriter; सार्वजनिक कक्षा मुख्य गतिविधि गतिविधि को बढ़ाता है {निजी स्थिर स्ट्रिंग FILE = "/HelloWorld.pdf"; @ ओवरराइड संरक्षित शून्य को क्रिएट (बंडल सहेजा गया इन्स्टैंसस्टेट) {सुपर.नक्रेट (सहेजे गए इन्स्टेंसस्टेट); setContentView (R.layout.activity_main); & Lt; / i & gt; कोशिश {दस्तावेज़ दस्तावेज़ = नया दस्तावेज़ (); बूलीयन mExternalStorageAvailable = true; बूलियन mExternalStorageWriteable = false; स्ट्रिंग स्टेट = पर्यावरण .getExternalStorageState (); यदि (पर्यावरण। एमआईडीएआईमाउटेज.एक्वांस (राज्य)) {/ हम मीडिया को पढ़ और लिख सकते हैं एमएक्सटाइटलस्टॉरेजएवएबल = एमएक्सटायटल स्टोरेजड्रायबल = सच; } और अगर (पर्यावरण। MDIA_MOUNTED_READ_ONLY.equals (राज्य)) {// हम केवल मीडिया mExternalStorageAvailable = true; पढ़ सकते हैं; MExternalStorageWriteable = false; } Else {// कुछ और गलत है यह कई अन्य राज्यों में से एक हो सकता है, लेकिन हम सभी को // जानने की ज़रूरत है कि हम न तो पढ़ सकते हैं या न ही लिख सकते हैं mExternalStorageAvailable = mExternalStorageWriteable = false; } स्ट्रिंग फ़ाइल = नल; If (mExternalStorageWriteable) {file = Environment.getExternalStorageDirectory ()। GetPath () + FILE; } PdfWriter.getInstance (दस्तावेज़, नई FileOutputStream (फ़ाइल)); document.open (); अनुच्छेद p = नया पैराग्राफ ("हैलो इटस्टेड वर्ल्ड!"); document.add (पी); document.close (); } पकड़ (अपवाद ई) {e.printStackTrace (); }}}

मैं एक और डेटा सेट के लिए एक और उत्पन्न करने की कोशिश कर रहा हूं और उत्पन्न फ़ाइल में आकार 0kb है, और जब खोलता है संदेश "एडोब रीडर नहीं खोल सकता है" सूची.pdf " और फ़ाइल को टाइप या अनुपस्थित किया गया है। "

iText को लाइसेंस कुंजी की आवश्यकता है अपवाद के लिए आपको लॉगकट की जांच करें लाइसेंस की कुंजी पाने के लिए और इसे कैसे लागू करें यह देखने के लिए अपनी साइट पर जाएं।

sql - MySQL leftjoin and ORDER -


मैं एक mySQL क्वेरी से एक समस्या का सामना कर रहा हूं।

मैं प्रत्येक credit_memo से पिछले दर विनिमय HISTORIQUE_DEVISE तालिका

<कोड> के लिए मेरा रिकॉर्ड HISTORIQUE_DEVISE तालिका हैं निम्नलिखित:। < पूर्व> आईडी | ACCOUNT_ID | Code_source | Code_destination | तिथि | Taux | .. 242 | 12 | 1 | 133 | 2013-02-22 | 0.82000 | .. 243 | 12 | 1 | 133 | 2013-03-26 | 0.96000 | .. 244 | 12 | 1 | 133 | 2013-03-26 | 1.2 9 000 | ..

वर्तमान में, मेरे आखिरी बाएं जुड़ने में 3 पंक्तियाँ वापस आती हैं (यदि credit_memo.date बराबर होता है 2013-03-26 और चयन रिटर्न 0.82000 में rate.taux । मैं 1.29000 प्राप्त करने के लिए क्वेरी को कैसे रूपांतरित कर सकता / सकती हूं, मेरे बाएं जुड़ने का आखिरी मान? मैं केवल पिछले # 244 रिकॉर्ड करना चाहते हैं। यह संभव बाईं अंदर सबक्वेरी से बचने के लिए शामिल हो?

आपकी मदद के लोगों के लिए धन्यवाद!

  का चयन करें credit_memo.code_avoir_client, credit_memo है .total_ttc, credit_memo.date, credit_memo.code_utilisateur, credit_memo.montant_restant_a_payer, DEVISE.code_iso, PAIEMENT_FACTURE_FOURNISSEUR.date_reglement, customer.code_client, customer.code_utilisateur_client, customer.prenom, customer.raison_social, lead.code_client, lead.code_utilisateur_client, lead.prenom , Lead.raison_social, project.project_code, project.name, rate.taux से AVOIR_CLIENT के रूप में क्रेडिट_एमएमओ ग्राहक को ग्राहक के रूप में छोड़ दें ग्राहक के रूप में दर्ज करें cod_client = credit_memo.code_client और customer.code_profil_client = 1 और (customer.account_id = 0 या customer.account_id = 12) और customer.etat = 0 बायाँ शामिल हों ग्राहक नेतृत्व के रूप में पर lead.code_client = credit_memo.code_client और lead.code_profil_client = 2 और (lead.account_id = 0 या lead.account_id = 12) और lead.etat = 0 बाईं तरफ project.project_code = credit_memo.project_code परियोजना के रूप में परियोजना में शामिल हों और (project.account_id = 0 या project.account_id = 12) और project.etat = 0 बायाँ शामिल हों पर चिंतन DEVISE.code_devise = credit_memo.code_devise और (DEVISE.account_id = 0 या DEVISE.account_id = 12) और DEVISE.etat = 0 बायाँ शामिल हों PAIEMENT_FACTURE_FOURNISSEUR पर PAIEMENT_FACTURE_FOURNISSEUR.code_avoir_client = credit_memo.code_avoir_client और (PAIEMENT_FACTURE_FOURNISSEUR.account_id = 0 या PAIEMENT_FACTURE_FOURNISSEUR। ACCOUNT_ID = 12) और PAIEMENT_FACTURE_FOURNISSEUR.etat = 0 वाम ईटा के रूप में ETABLISSEMENT शामिल हों पर eta.code_etablissement = credit_memo.code_etablissement और (eta.account_id = 0 या eta.account_id = 12) वाम जम्मू ओआईआईएन HISTORIQUE_DEVISE दर पर दर CODE_etablissement = credit_memo.code_etablissement और दर। CODE_DEVISE_SOURCE = credit_memo.CODE_DEVISE और दर। CODE_DEVISE_DESTINATION = eta.CODE_DEVISE और दरडेटा & lt; = credit_memo.date और (rate.account_id = 0 या rate.account_id = 12) और rate.etat = 0 कहां (credit_memo.account_id = 0 या credit_memo.account_id = 12) और credit_memo.etat = 0 ग्रुप credit_memo.code_avoir_client द्वारा;    

आप उन पंक्तियों को जोड़कर अन्य पंक्तियों को समाप्त कर सकते हैं जहां उन्हें फ़िल्टर किया जाता है। आपका एसक्यूएल मेरे लिए कुछ जटिल ज्ञान के बिना समझने के लिए थोड़ा जटिल है, लेकिन सामान्य तौर पर यह कहां कुछ ऐसा होगा:

  और नहीं (HISTORIQUE_DEVISE दर से * चुनें WHERE rate.accoun_id = Rate_2.accountid ... अन्य कुंजी फ़ील्ड यहां जोड़ें यदि उन्हें समान होना चाहिए ... और दर_2.ID & gt; rate.ID)   

दूसरे शब्दों में, रिकॉर्ड छोड़ें जहां आप HISTORIQUE_DEVISE में "मिलान रिकॉर्ड (रिकॉर्ड्स)" ढूंढें, लेकिन एक उच्च आईडी

jQuery - prevent same click function to run more than once at a time -


I just started to start javascript and jquery, and my first problem is that I have real headache. I am searching for hours to solve it, but none of the solutions work.

My problem is this: I have created a "carousel" website, where the content has been omitted Or right, if the menu is clicked on the link.

Everything works fine, but if you click on, another menuulin has finished again before the click function's animation, the content has been slammed and is not in the correct position.

I promised (). Did not work for me (), flags, callback and so on, but nothing worked for me :( Maybe I did it wrong ..

I'm searching for a solution, until it's over Or it is better to make a queue of this celebration, move after each other, but not at the same time.

This is my JS code, I know that this is not right and better Can be solved, but as I said, today I started learning these things And I am not familiar with the syntax, and so on.

  var getoPage = function (pos) {if (pos == 'home') {$ ('li Css ({"left": "1700px"}) $ ('li #home'). Chetan ({" $ ('Left # news'). Chetan ({"left": "-1700 px"}, speed,' camerainte quest '); $ (' Chetan ({"left": "-1700 px"}, speed, 'Kamiren Quest'); Chetan ({"ambiguity": 0}, 0); $ ('Li # Gallery'). $ ('Li # Gallery'). Animate ({"Opacity": 0}, 0);} and A And (pos == 'news') {$ ( 'li # news'). Css ({ "ambiguity": 1}); $ ('Li # News'). CSS ({"left": "1700px"}); $ ('Li # News'). Animate ({"left": "0px"}, speed, 'easeinOutQuint'); $ ('Lee # Home') Chetan ({"left": "-1700px"}, speed, 'easeinOutQuint'); $ ('Lee # Home') Animate ({"opacity": 0}, 0); $ ('Li # Gallery'). Chetan ({"left": "-1700 px"}, speed, 'camerainte quest'); $ ('Li # Gallery'). Animate ({"opacity": 0}, 0); } Else if (pos == 'galery') {$ ('li # galery'). CSS ({"Opacity": 1}); $ ('Li # Gallery'). CSS ({"left": "1700px"}); $ ('Li # galery') Animate ({"left": "0px"}, speed, 'easeinOutQuint'); $ ('Li # News'). Chetan ({"left": "-1700px"}, speed, 'Kamiren Quest'); $ ('Li # News'). Animate ({"opacity": 0}, 0); $ ('Lee # Home') Chetan ({"left": "-1700px"}, speed, 'easeinOutQuint'); $ ('Lee # Home') Animate ({"opacity": 0}, 0); }} $ (Document) .ready (function () (hide) All (); AutoSeat (); $ ('# Home') Click (function () {Goto page (poshom);}) $ ('# Click '). Click (function () {Goto page (Poznews);}); $ (' # gallery). '(Function () {Goto page (PauseGallery);}}}});   

Can you please help me?

The answer to Brad Greens is most accurate.

Here's an option for fun:

You can tell whether the animation is still performing or not, you can "currently" again after the animation is complete, Set to false;

  var animating = false if (pos == 'home' & amp; animating) {animating = true; $ ('Li # Gallery'). Animate ({"opacity": 0}, 100, function () {// animation complete. Animating = false;});); }    

Where does PHP get its settings if no configuration file is loaded? -


I have installed PHP 5.3.10 on a RHEL 4 server.

When I PHP -i | Grep "loaded" returned it

Loaded configuration file = & gt; (None)

With that setup, okay PHP is working the way we need it. I should know now, if no php.ini is being used, where does PHP get all its settings? Thank you.

Update: I realized this after submitting the hit. Sorry, how do I transfer it to stack overflow? - <->

/ Lib loaded configuration file: Scan for additional .i files in (none): Extra .i files have been parsed: (none) < P>

If a php configuration file is not loaded, then it only takes the default value. For a list of default values, please check the documentation: < P>

simple encrypt with key and string for python -


Here's an example of what my code needs:

  encrypt ('7521068493 ',' 123 ') # 521'   

returns

keys that change 0-9 For example 7 0 , 5 is 1 , 2 is 2 , 1 is 3 , and so on.

The second string is the string that needs to be encrypted.

Here is my code:

  def encrypt (key, string): in the range I (LAN): I print (string) in the string   

I can not understand it

  def encrypt (key , Msg): cypher = {x: y in z, z ('0123456789', key)} Encrypted = [] in C: msg: encrypted.append (cipher [C]) returns '' .join (encrypted)    

javascript - How to get json data and construct a modal using Angular JS -


When I click on the View Details button, I want to request JSON data and then create a model view on the content Want to do

HTML:

  & lt; A href = "#" & gt; See details 1 & lt; / A & gt; & Lt; A href = "#" & gt; See details 2 & lt; / A & gt; & Lt; A href = "#" & gt; See Details 3 & lt; / A & gt;   

Get JSON:

  function myCtrl ($ scope) {$ http.get ('json / story.json'). Success (work) {Console.log (data); $ scope.story = data;}); }   

When a user clicks on a detailed button, then what is the best way to use the MyCtrl function to use angular.js? Apart from this, HTML is being printed using another controller. I hope there is no way to force clicks vs hard-coding IDs and links.

You can call ways in your controller like this:

  & Lt; A href = "#" ng-click = "getDetails ()" & gt; View Details & lt; / A & gt;   

and then in the controller:

  $ scope.getDetails = function () {$ http.get (...). Success (work) {$ scope.story = data;}); }    

javascript - Assigning objects to a temp variable -


यदि आप इस तरह ऑब्जेक्ट बनाते हैं:

  building [45] = नया ऑब्जेक्ट () ; इमारत [45] .name = myName; इमारत [45] .price = parseInt (myPrice); इमारत [128] = नया ऑब्जेक्ट (); इमारत [128] .नाम = myName; इमारत [128] .price = parseInt (myPrice);   

अब अगर मैं बिल्डिंग [128] को फ़ंक्शन में उपयोग करना चाहता हूं तो इसे अस्थायी चर में निर्दिष्ट करना बेहतर है ताकि ब्राउज़र को नहीं करना चाहिए इमारत [128] गुणों को ढूंढने के लिए सभी वस्तुओं के माध्यम से फिर से चलाना

उदाहरण:

  var theID = 128; Var temp = भवन [theID]; //temp.name और amp; Temp.price   

या बस निर्माण [theID] .name और बिल्डिंग [theID] .price का उपयोग करें?

क्या इन्हें देखा जा सकता है?

एरे एक्सेस एक निरंतर समय आपरेशन (बिग-ओ नोटेशन में, यह O (1) है)। दूसरे शब्दों में, ब्राउज़र नहीं को build [128] तक पहुँचने से पहले 127 वस्तुओं से दोबारा करने की आवश्यकता है।

यह मामला है, मैं अभी भी एक चर में सरणी वस्तु को संग्रहीत करने की अनुशंसा करते हैं ऐसा करने का मुख्य कारण यह है कि जावास्क्रिप्ट मिनिनाइज़ेशन प्रोग्राम वेरिएबल को a जैसे कुछ कम नाम से बदलने में सक्षम होंगे, ताकि संपत्ति का एक्सेस a.name और इसी तरह किया जा सके। यह कुछ बाइट्स को यहां और वहां बचाता है और बड़े पैमाने पर कुल बाइट बचत महत्वपूर्ण होती है।

जावास्क्रिप्ट सरणियां जावास्क्रिप्ट ऑब्जेक्ट का एक विशेष रूप है, और सरणी इंडेक्स वास्तव में संपत्ति के नाम से थोड़ा अधिक है यह पूर्णांक होना चाहिए

एक सरणी की फ्लैनगन की परिभाषा का उपयोग करते हुए, हर बार जब आप अपने इंडेक्स से एक सरणी वस्तु तक पहुंचते हैं, तो आप दो-चरण प्रक्रिया प्रभावी ढंग से शुरू कर रहे हैं: सरणी ऑब्जेक्ट तक पहुंचें, फिर से मूल्य देखें गुण नाम (सूचकांक) सरणी वस्तु को एक चर में सहेजकर, इसे एक्सेस करना स्मृति में मान को देखने के लिए उतना आसान है।

php - The dialog can't pop up when the date validation is invalid -


I am a new UI user, I have a problem when I want to create a website is a part of my website which is user input Requires a start date and end date, I have a function, if the last date is set before the start date, then it will show a dialog box to automatically warn the user, but I can not do this Do you have any idea to do this?

Here is my code of two date text fields:

  & lt; Td> Start & lt ;? Php $ this- & gt; Widgets ('Zii.widgets.jui.CJuiDatePicker', array ('name' = & gt; 'COURSE_START_DATE', 'model' => $ Cmodel, 'attribute' => 'COURSE_START_DATE', 'languages' = & Gt; Yii:: app () - & gt; language == 'en_us',' options' => array ('Showenim' => gt; 'fold', // 'show' (default), ' SlideDown ',' Fadein 'button,' '' '' '' '' '' '' ',' Button ',' 'Focus'' 'Button' '' '' Button Text '= & gt; Yii :: T (' I ',' Calendar '),' Button Image '& gt; Yii :: App () - & gt; Request- & gt; BaseUp.' / Images / Calendar.png ',' Button image only '= & gt; true,))? & Gt; & lt; / td & gt; & lt; td & gt; Finish & lt ;? php $ this- & gt; ; Widgets ('zii.widgets.jui.CJuiDatePicker', array ('name' = & gt; 'COURSE_EN' D_DATE ',' Model '= & gt; $ Cmodel,' attribute '=>' COURSE_END_DATE ',' language '=> Yii :: app () - & gt; language ==' en_us ',' options '= & Gt; Array (' Showenem '= & gt;' Guna ', //' Show '(default),' SlideDown ',' Fadein ',' Show '' = ',' Button ', / / 'Focus',' Button ',' Both '' ButtonText = & gt; Yii :: T ('I', 'Calendar'), 'Button Image' = & gt; Yii :: app () - & gt; Request-> Baseball '/ Images / calendar.png', 'Button image only' = & gt; This is the truth,),)); ? & Gt;    

If you are really new to yii, you will learn a bunch of stuff :

How to verify AJAX and client in Yii:

In your form, you must indicate that AJAX and client can be verified. Here's an example:

  & lt ;? Php $ form = $ this- & gt; Start the widget ('Cactiform', array ('id' = & gt; 'contact form', 'enabled ajax validity' = & gt; true, // it turns AJAX verification 'enabled client validity' => ; True, // it turns on client verification);? & Gt;   

2 Enable AJAX accreditation in your controller < P> For example, in your controller action call:

  $ this-> display agax validity ($ model);  with  

: < / P>

  secure function Demonstrate ajoxualdition ($ model) {if (isset ($ _ POST ['ajax']) and $ _POST ['ajax'] === 'contact form') {echo cactiform :: validate ($ model); Yii :: app () -> end ();}}   

3 Create verification rules in your model

Then you You will need to create verification rules that will compare your two values, to do this, to the default operator, for example & gt; So in your model you will have something like this:

  public Hnkshn rules () {return array (// than your other rules array ( 'COURSE_END_DATE' Compare 'to' = & gt; 'COURSE_START_DATE', 'operator' = & gt; '& Gt;');); }    

java - How i can detect JasperViewer processing report time -


We know that the viewers of JSP will need more time in the report process according to the data, which will display. I want to load it, give user loading information This is my step:

  1. Check, the viewer is processed or done.
  2. If in process, set JLabel and text in "Loading report ..."
  3. If it is, set the text to "" or

    and point 1 , I do not know how the viewer is creating the process? Please help me. Thank you :)

    call view airport () separately thread After the report is created, store an atomic level atom bullion and make it false. In the client checking method, check this frequency from time to time to check what the report is.

    Example pseudocode:

      public zero your class {Private nuclear bullion report; ... private zero getReport () {new thread () {reportRunning = new nuclear bullion (true); JRViewer.viewReport (); ReportRunning.set (wrong); }.Start(); } // Call from time to time and check the UI Private Boolean Client (Check) Return Reporting! = Null & amp; ReportRunning.get (); }    

html - IE8 CSS Text Spacing Issue Text-Justify -


I am running a CSS text and justify the problem in I8 and to resolve this issue, I8 specific rules Need to create, but I am not very familiar with the process.

Page & amp; The text should look like this: (Use a modern browser like Chrome / Safari / Firefox).

The IE8 spacing showing the IMG attached ie8 text spacing problem

How can I fix it? Your help is always appreciated!

CSS

  / * Fancybox gallery divs * / # thumbs {width: 960px; Margin Top: 20px; Margin-left: auto; Margin-right: auto; Text Align: Justify; -M-Text-Support: Distribution-All-Line; Text-Support: Distribution-All-Line; } #thumbs a {vertical-alignment: top; Display: Inline-block; * Display: Inline; Zoom: 1; }. Stretch {width: 100%; Display: Inline-block; Font-size: 0; Line-height: 0} / * description * / # character-wrapper {width: 960px; Padding-top: 5px; Margin-left: auto; Margin-right: auto; Text Align: Justify; -M-Text-Support: Distribution-All-Line; Text-Support: Distribution-All-Line; } .description {float: left; Width: 320px; // Increase the width for the margin between the picture height: 25px; Text align: center; Margin-down: 30px; }. Clear {clear: both; }   

HTML

  & lt ;! / Photo thumb line 1 - & gt; & Lt; Div id = "thumb" & gt; & Lt; An id = "single_image" href = "/ bp / images / roscoes-run.jpg" & gt; & Lt; IMG src = "/ bp / image / rosco-run (thumb) .jpg" alt = "" /> & Lt; / A & gt; & Lt; A id = "single_image" href = "/ bp / images / roscoes-run-2.jpg" & gt; & Lt; IMG src = "/ bp / images / rosco-run-2 (thumbs) .jpg" alt = "" /> & Lt; / A & gt; & Lt; An id = "single_image" href = "/ bp / images / chicken-waffles.jpg" & gt; & Lt; IMG src = "/ bp / images / chicken-waffle (thumbs) .jpg" alt = "" /> & Lt; / A & gt; & Lt; Duration class = "section" & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt ;! - / description - & gt; & Lt; Div id = "desc-wrapper" & gt; & Lt; Div class = "description" & gt; Rosco's Run 2012 & lt; / Div & gt; & Lt; Div class = "description" & gt; Rosco's Run 2012 & lt; / Div & gt; & Lt; Div class = "description" & gt; Rosco's Run 2012 & lt; / Div & gt; & Lt; Div class = "clear" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt ;! - / photo thumb line 2 - & gt; & Lt; Div id = "thumb" & gt; & Lt; An id = "single_image" href = "/ bp / images / mens-retreat-2012.jpg" & gt; & Lt; Img src = "/ bp / images / mens-retreat-2012 (thumbs) .jpg" alt = "" / & gt; & Lt; / A & gt; & Lt; An id = "single_image" href = "/ bp / images / winter-retreat-2012.jpg" & gt; & Lt; IMG src = "/ bp / image / true-retreat-2012 (thumb) .jpg" alt = "" /> & Lt; / A & gt; & Lt; An id = "single_image" href = "/ bp / images / new-years-eve-2012.jpg" & gt; & Lt; Img src = "/ bp / images / new-years-eve-2012 (thumb) .jpg" alt = "" /> & Lt; / A & gt; & Lt; Duration class = "section" & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt ;! - / description - & gt; & Lt; Div id = "desc-wrapper" & gt; & Lt; Div class = "description" & gt; Men's Retreat 2012 & lt; / Div & gt; & Lt; Div class = "description" & gt; Winter Retreat 2012 & lt; / Div & gt; & Lt; Div class = "description" & gt; New Year's Eve 2012 & lt; / Div & gt; & Lt; Div class = "clear" & gt; & Lt; / Div & gt; & Lt; / Div & gt;    

attempt to add text-justify: inter-word Please .description style.

delphi - Shelltreeview getting path from node -


I am using a custom alert with onMouseMove and it is working properly, the problem is that string I am returning the complete path for I, what's the code for me here.

  Process TCermann.corelesstravwommosmov (sender: shift: shift: techftstate; x, y: integer); Var Tree: TsShellTreeView; Hover node: TTRIID; HitTest: Theaters; Start (sender is TsShellTreeView) then tree: = TsShellTreeView (sender) and exit; Haurnode: = tree Gatnodet (X, Y); HitTest: = Tree. GetHitTestInfoAt (X, Y); If (the last hintnode & lt;> hovernode) then the application will start. cancel; If (HitTest & lt; = [htOnItem, htOnIcon, htOnLabel, htOnStateIcon]) then start the last HintNode: = Hover node; FileToolPanel.Caption: = tree.path; //hovernode.Text; Tree Hint: = nodhient (hovernode); End; End; End;   

hovernode.text Returns the display name "temporary" instead of "c: \ temp", how can I recover the full path of the node when the node item is removed And not selected?

Thanks in advance.

You must convert from node to its related shell folder in which you can do this:

  var shellFolder: TShellFolder; Shellfolders: = trees. Folders [hovernode.inx];   

The Shell folder object is stored in the node's data property so that you can do it like this:

  shellFolder: = TShellFolder (hoverNode.Data);   

Once you have the shell folder, you can get full path with

  tree. Hint: = Shellfolder Pathname;    

azure - How to get the user name using a Microsoft user id? -


A Windows Store is working on Javascript application. I have used Microsoft login authentication from the auction as follows.

  client.login ("microsoftaccount") (function (result) {; userId = results.userId; refreshTodoItems (); var message = "You are now logged in as: "+ UserId; var dialogue = new windows.UI.Popups.MessageDialog (message); dialog.showAsync () .done (full);}   

" Microsoft account: c2892313bla. ... "

How do I want to withdraw the related username for that Microsoft account id

When you are logged on, on any server side On the script you can query the user's identity (by the user.getIdentities () function), which will give you an object with an access token, which you can use for authentication providers You can use to talk to. An example of how the user can be received in the post is the name for the MS account (and also to other providers).

How to get $this->getAddToCartUrl($product) in magento -


A PHP page has been created in the template / page / folder in my magenta application.

here One displayed product ... needs to be displayed again

  $ this-> GetAddToCartUrl ($ product)   

but this zero value comes back ... This means that no value has returned ...

I How can I get in my PHP page .......

This is the html code:

  & lt; Input id = "url_ & lt ;? php echo $ _iterator ;? & gt;" Name = "url _ $ _ iterator," type = "text" value = "& gt; php echo $ this-> getAddToCartUrl ($ product)? & Gt;" & Gt;   

Any solutions are ....

Do you try this ....

  & lt ;? Php echo $ this- & gt; Assistant ('Checkout / Cart') - & gt; GetAddUrl ($ _product)? & Gt;   

Instead try this instead of this $ this-> GetAddToCartUrl ($ product)

c# - type or namespace 'Timers' name does not exist in the namespace 'System' -


I'm sure the answer is not difficult anywhere as much as my mind thinks, but I do not think it's a figure for understanding.

I am trying to set a timer to start a game, along with the tutorials to bring the basics down, I am following the following. I have also created a new project with the EXACT code as a tutorial and I get the same error continuously. Despite the code running completely in the tutorial ...

I appreciate any help And if you can tell me why I messed up and why, instead of correcting the code, I am doing this as a learning project, so I want to know how to stop it in the future. thank you in advanced!

Oh, and I do not know that it matters, but I'm using Microsoft Visual C # 2010 Express.

4 Errors, the same message Lines 10, 66, 67 and 72.

  using the system; Using System.Collections.Generic; Namespace rout3reset {public square wicked style (static bool isGameAlive = true; stable player player; static system times timer world; // timer declared public class player // {public char CHR = '@'; // player public vector position Symbol for; // X, Y directive tracker public string name = "public low health = 25; // base health public low mind = 25; // base value public player () // player console Character {condition = new vector (1, 1); // set spawn point} public zeroes update () // get handle control {}} public square AIT public square tree // {} public square vector {public Small X; Public Low Y; Public Vector (Small X, Small Y) // Main Producer {this.X = X; Y.Y = Y;} Overload {this.X = 0;} of public vector (1); It is Y = 0;}} Fixed zero main (string [] args) {start (); do {player.Update ();} while (IsGameAlive);} Fixed zero start () {world = new system. Timer sets timer (50); // timeout point (50 milliseconds) World Finish + New System Timer Espladeevent Handler (Draw); // Start Timer World Start (); Player = new player (); } Remove static zero (Object Sender, System.Timers.ElapsedEventArgs E) // Manage World Timer Tick {Console.Clear (); Console.WriteLine ("############################"); // 40 spaces spaced 20 spaces wide by console. Wrightite ("# ----------------------------------- --- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("# -------------------------------------- #"); Console.WriteLine ("############################"); Console. Light line ("- {0} hp: {1} mp3: {2}", player name, player. Health, player. Value); // STAT bar console. SetCursorPosition (player.position.x, player.position.Y); // Set the appropriate four locations for player symbol console. Wite (player.CHR); // Players pulls} Fixed Zero UpdateWorld () // Update non-player, anti-antagonistic objects (trees, etc.) {}}   

}

MSDN tells us that it is from System.dll.

Namespace: System.Timers

Assembly: System (in system.dll)

It looks like you System.dll are missing the context. Make sure you are referring to:

Enter image details here

c++ - expected ',' or '...' before numeric constant -


I neither lose nor answer me or document. Is it wrong here?

"The file contains from x.cpp: 7: /Users/user/Dropbox/Projects/Arduino/libraries/Range/Range.h27: Error: Before the numeric constant Expected Identifier / User / User / Dropbox / Projects / Arduino / Libraries / Range / Range.h: 27: Error: Expected ',' or '...' numeric constant before "

 Created by x on land and height // // 2013-03-27 based on the  // // Range.h // series. // // #ifndef RANGE_H_ #define RANGE_H_ #include "NewPing.h" #define BOTTOM_RF_PIN 5 #define BOTTOM_RF_ECHO_PIN 10 #define BOTTOM_RF_MAX 200 class range {public: range (); Zero init (); Float togound (); To float (); Float height (); Private: NewPing bottomRF (BOTTOM_RF_PIN, BOTTOM_RF_ECHO_PIN, BOTTOM_RF_MAX); }; #endif / * RANGE_H_ * /    

instead

< Code> NewPing bottomRF (BOTTOM_RF_PIN, BOTTOM_RF_ECHO_PIN, BOTTOM_RF_MAX);

Try

NewPing bottomRF (int, int, int);

Reason: You can not declare the function to take the sentences. The only type is the type int , 5 10 and 200 are literal.

web applications - ClassLoader used by tomcat -


I did not get this class error. The name of the class is com.bandstand.web.StartupListener in a webpage, I click on class WebappClassLoader in Steak Trace (below), which gives me GVT-5.0 \ GPAT-DAVE. Sorry! \ Yaji \ apache \ catalina \ loader \ webplus loader

because it is strange I am not using any living class in this webpad, though I use it in any other artwork I do What

Does Intelligence just map the name of the false class? (WebappClassLoader)

If you are experiencing with Tomcat, can you normally confirm the loading chain? Bootstrap-> Method.invoke-> ... (without gwt, it still loads like this)

thanks heaps

  SEVERE: Error configuring the application listener of the class com.bandstand on .web.StartupListener java.lang.ClassNotFoundException: org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1680) on com.bandstand.web.StartupListener org.apache.catalina.loader.WebappClassLoader. loadClass (WebappClassLoader.java:1526) on org.apache on org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java:4149) org.apache.catalina.core.StandardContext.start (StandardContext.java:4705) .catalina.core.ContainerBase.addChildInternal (ContainerBase.java:799) org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:779) on org.apache.catalina.core.StandardHost.addChild (StandardHost.java : 601) rg.apache.catalina.startup on org.apache.catalina.startup.HostConfig.deployDescriptor (HostConfig.java:675) (HostConfig.java:601) on org.apache.catalina.startup.HostConfig.deployDescriptors o on .HostConfig.deployApps org.apache.catalina.startup.HostConfig.start (HostConfig.java:1317) on org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:502) (HostConfig.java:324) org .apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:142) org.apache.catalina.core.ContainerBase Org.apache.catalina.core.ContainerBase.start (containerbase) at org.apache.catalina.core.StandardEngine.start (standardEngine.java:463) at org.apache.catalina at .start (at ContainerBase.java:1065). Java 1.057) Corner. Standardhost Start (Mankhostkjawa: 840)) on Org.apache.catalina.core.StandardService.start (StandardService.java2525) on org.apache.catalina.core.StandardServer.start (StandardServer.java:754) org.apache.catalina At .startup.Catalina Sun.reflect.NativeMethodAccessorImpl.invoke0 (original method) at sun.reflect.NativeMethodAccessorImpl.invoke start at sun.reflect.DelegatingMethodAccessorImp (Catalina.javaTerm 95) org.apache on org.apache.catalina.startup.bootstrap.start (bootstrap .java: 289) at java.lang.reflect.Method.invoke (Method.java:597) at l.invoke (DelegatingMethodAccessorImpl.java:25). .catalina.startup.bootstrap.main (bootstrap.java:414)    

It is this bug: it should be fixed.

In what format does Excel save CSV file when it prompts(explained in body) -


I have processed a Java program to create a CSV file that has the field:

"123", "Mainland", "Hello, Boy", "I Like" War and Peace ", .....

Now when I try to upload this file in Postgraze Was (9.1) database 'DELIMITER', 'CSV; using the copy table from' filename.csv ' I get an error: Additional data after the last expected column.

I believe that this is due to '' inside the value in the 4th column that I am getting this error.

I also know that just by opening the file excel and saving it again, select Yes for the signal: "filename.csv can have features that are not compatible with CSV Do you want to keep this format "All the necessary changes? Yes, if I work from Java to the same file (formatted by Excel in a new form), then the columns look like this:

123, Mainland, "Hello, boy", " I like "war and peace" "

This new file (after saving) has also been successfully uploaded. I saw it on a small file But my original file has 2.5 million records & Gt; 2.5 GB) and Excel can not just open it. Do you have any idea how Excel can save? So that I can apply the changes manually to my file.

Thanks

Do you see how Excel changed everyone? The single "inside the field" (dubhel) ""? I think the answer is that Excel also excluded "from fields that do not have spaces, commas, or embedded" but I do not think it makes a difference, then try to change everything "not on field borders "See" and see if it works. "

If there is no one, "the sequence embedded inside any area, then all of you" with "" and then all "," with "", but of course Does not work if there are any "", "views" within a field The question is, if a field was embedded inside, how would anyone know if this field was a delimiter or not?

antlr - ANTLR4 - how to specify line does not start with specific character? -


निम्न निश्चित एएनटीएलआर 4 संदर्भ <पूर्व> STUFF: ~ [\ t \ r \ n] +; // टैब, न्यूलाइन

को छोड़कर किसी भी वर्ण का मिलान करें मैं * के साथ शुरू होने वाली एक पंक्ति के लिए वैकल्पिक पथ को परिभाषित करने का प्रयास कर रहा हूं। उदाहरण के लिए:

  पंक्ति: ~ एस्ट्रैक्स कुंजी; एस्ट्रैक्स: '*';   

लेकिन, मैं ASTERIX नहीं है जो सब कुछ से मेल नहीं करना चाहता, मैं चाहता हूँ कि लाइन नियम को निष्पादित करने के लिए जब लाइन ASTERIX के साथ शुरू नहीं होता है और फिर शेष मिलान शुरू करते हैं।

आप ASTERISK नियम को केवल मैच * एक पंक्ति की शुरुआत में प्रदर्शित होता है।

  ASTERISK: '*' {_input.LA (-2) == '\ n'} ?;   

फिर आपका लाइन नियम बस ASTERISK संदर्भ नहीं कर सकता है।

  पंक्ति: कुंजियां;  कुंजी  के रूप में  ASTERISK  को पहले प्रतीक के रूप में नहीं देता है, फिर  लाइन  सकते हैं ' टी एक लाइन से मेल खाता है जहां पहला टोकन है  ASTERISK   

ruby on rails - Devise session controller override -


I override Devise session controller to tweet user login behavior. In my case, I have two types of Users are the main user and sub user all users can log in only if the user can set the main user for the sub-user. Here is my user model

  class user & lt; ActiveRecord :: Base has has_many: child_users ,: class_name = & gt; "User",: foreign_key = & gt; "Parent_id",: dependent => : Destroyed belong_to: parent, class_name = & gt; "User" end   

Here is my session controller

  class session controller & lt; Try to sign in with the Devise :: SessionsController def create logger.info "# {params [: user] [: email]}" @user = User.find_by_email (params [: user] [: email]) if the @user ! = Zero if! @user.is_portal_access? Flash [: notice] = "# {@ user.email} does not have access to the portal." Redirect_to: Controller = & gt; Logger.info "# {current_user.email} sign out" super end end   

when I am logged in with the correct credential - if it is Main user user login successfully - If it is sub-user login with sub-user portal access successfully - If it is the sub user who does not have access to the portal, the user reception page does not have access to the "Page Portal" reenir The Deshit go and ask the user to login.

The problem is that: If I try to log in with credentials which are not present in the database, then I get the missing template user / session / templates, sessions / create, plan / Sessions / create, create / create, application / create with: = locale = & gt; [: En],: formats = & gt; [: Html],: handlers = & gt; [: Erb ,: builder ,: arb,: coffee]}. Search in: * "/ user / nsee / recursive-provisioning-portal / app / view" * "/ users / nce /. Rvm / games / ruby-1.9.3-p3 9 / games / tweeter-bootstrap-rails -2.2 .6 / app / views "*" / Users / NCE /. RVM / Games /ruby-1.9.3-p392/gems/activeadmin-0.5.1/app/views "*" / Users / NCE /. RVM / GMS / RBI-1.9.3-p3 9 / gms / seminari -1.14.1 / app / view "*" / users / nce / .rvm / games / rbi-1.9.3-pd 92 / games / devices -2.2.4 / App / views "

In your routes. Rb, devise_for should be like this:

  devise_for: users, controllers: {Registration: 'user / registration', session: 'user / session'} < / Code>  

Two weeks ago, I had only one problem, but I solved this problem on the other side. I've just added to my jamfile: gem 'ruby-hamal' and deleted gem 'haml' . Then bundle install and my problem was resolved.

And if it can not help you, please add your controller methods super in the beginning it will look like this:

  DIF New Super # ... your code here ... and    

c# - Sign PDF file on last page -


I am using C # and iTextSharp 3.1 to sign PDF files. The signature is working, but I want to sign on the last page of the file. The code I use is like this:

  Reader = new PDF reader (Input PDF); Int number of pages = reader.numberoff pages; PdfStamper st = PdfStamper.CreateSignature (Reader, new filestream (Output PDF, FlameMode.creative, Filex Veerate), '\ 0', blank, true); PDF Interview Display SAP = St. Signature display; Sign in to fit (// logo logo! = Tap) // // scale IIG logo Scaloffit (100, 50); // Set the signature status on the page logo sign. SetsAbsolutePosition (300, 80); Sap.Image = logo Sign; } Sap.SetCrypto (this.myCert.Akp, this.myCert.Chain, blank, PDF SigenatureExplon.exe) ;; If (cigreson.lengai> 0) sap.Reason = SigReason; If (SigContact.Length> 0) sap.Contact = SigContact; If (sig location leng> 0) sap.Location = SigLocation; If (visible) sap.SetVisibleSignature (mySignRect, 1, blank); Try {st.Close (); } Hold (Exception E) {}   

This code signals on the first page of the file. I need an o mark on the last page of the file I also wonder how I can decide to sign in on the previous page, the same code does not work in iTextSharp5.4.2. It returns an error on sap.SetCrypto () and st.Close ()

Any idea how I work it in 5.4.2 Please try the example C # version that comes with the white paper referenced by mkl:

Why is the result of a reduce function fed back into reduce using mongodb mapreduce -


To reduce the work of progressive maps, I'm seeing a troublesome behavior using Mongo.

{_ID :, url: 'Some URL from my voluntary location'}

Here's my simple map function:

East> Maps: function () {emit (this.url, {count: 1, id: this._id}); }

and less (with many debugging prints for the logs shown below):

  lower: function (key, value) {var count = 0; Var lastId = null; Var First = Null; If (type value [0] .id == "undefined") {print ("bad id"); Printjson (key); Printjson (value [0]); Return tap; } And {print ("Good ID"); Printjson (key); Printjson (value [0]); } First = Object ID (value [0] .ad) .getTimestamp (); Values.for each (function (v) {count + = v.count; final = object id (v.id) .getTimestamp (); lastId = v.id;}); Return {count: count, first: first, last: last date, last date: last}}; }   

How do I call Matrred:

  mrparams.out = {decrease: this.output}; Mrparams.limit = 100; Mrparams.query = {'_id': {'$ gt': Mongo IID (last ed. Hexstress ())}}; Mrparams.finalize = Null; Mrdb.mapReduce (this.map, this.reduce, mrparams, function (d) {console.log ("finished mr", d); callback ();});   

This is a cron type manner so that each time interval is run on the limit on the number of the record starting with the record Record after lastId It was

Very basic incremental map reduces the luggage ...

But when I run it, I see the return value of reducing the returning methos Reduce method "{": ID count "1," ": ObjectId (" 5175a065b25f029a1d0927e6 ")}

Good Id ": Here's a snapshot of the log

XXXgood ID" "{" count ": 1," id ": ObjectId (" 5175a065d7f115dd41097df6 ")}

Good ID" "{ "counting" 1, "id": ObjectId ( "5175a0657c9c963654094d25")}

YYYThu Jun 20 11:42:11 [conn19938] query vox.system.indexes query: {ns: "Voxktmp .mr.pi_analytics_spark_trending_inventories_6667_inc "} nreturned: 1 reslen: 131 0ms Thursday June 20 11:42:11 [conn19938] query vox.tmp.mr.pi_analytics_spark_trending_inventories_6667 nreturned: 9 reslen: 1716 0ms

ZZZbad id" " { "count": 2, "first": ISODate ( "2013-04-22T20: 41: 11z"), "last": ObjectId ( "5175a067b25f029a1d092802"), "lastCounted": ObjectId ( "5175a067b25f029a1d092802")}

bad id "" {"count": 7, "first ": ISODate (" 2013-04-22T20: 41: 09Z ")," last ": ObjectId (" 5175a067d7f115dd41097e3c ")," lastCounted ": ObjectId (" 5175a067d7f115dd41097e3c ")}

XXX - emitted from a bunch of records my map function (e count with a pricing and am not familiar with that I Jhedaddblu with ID) Y Y - Mngolojh some kind - produced at former jobs after the event, at Less ...

TLDR, when I reduce the map to reduce, it is getting better until it is low As long as a Mongo process does not run until then, I start passing the returned values ​​of the reducing function to its lesser function.

Any ideas why / how is this possible?

Running 2.0.6

Thanks in advance

I thought out of the situation when the production of a map is already present, in order to reduce the job, the Mongo will pass on both new documents and documents which already have a single key back in the output collection Will reduce.

This works basically if you have a format tailored to the price that you get from the map and the price you lower.

This is not well documented, but now that I have come to know that my frustration is transubstantiated in the sense of smarts. The painful lesson learned good time ahead.

c# - What is the Maximum Number of Records i can insert through InserAllOnSubmit() In Linq to Sql -


I am reading the Excel sheet and applying my business argument and I LINQ to SQL .

In my loop I have & gt; (More than 5000 records) and & lt; Insert (less than) 15,000 records . Public List & lt; TblLog & gt; TblLogList = New list & lt; TblLog & gt; ();

This method is inside looping:

  Public Zero SaveLog () {tblLog tnlog = new tblLog (); Tnlog.id = Guide. Newguide (); Tnlog.comp_id = Comp_id; Tnlog.branch_id = Branch_id; Tnlog.row_id = rowID; Tnlog.his_id = his_id; // Add a record to the list of tblLogList.Add (tnlog);   

Before I tried to submit this code one by one:

  //_trContext.tblLogs.InsertOnSubmit (TblLog); // _ trContext.SubmitChanges ();   

Due to the performance hit, I changed the InsertOnSubmit to InsertAllOnSubmit

  if (tblLogList Count & gt; = 1000) {_trContext.tblLogs.InsertAllOnSubmit (tblLogList); _trContext.SubmitChanges (); TblLogList.Clear (); }}    

Here's my question:

  1. Maximum number of records I can insert through InserAllOnSubmit (In SQL in the link.

  2. Through the code given above I have achieved 1000 records, but I swear when code goes for 10,000 or more records This is some timeout exception because it has been applied to my ** windows service ** .

    I'm really confused, What were the best suggestions for handling the above logic?

    Thanks in advance.

    While others have a right to say that there is a better solution for this task, there is a direct answer to your question so far.

    The answer is That the technically number is limited to the amount of memory, the context swallows all these new items, or the maximum size database transactions Oggs are more likely to be interrupted, but you can stop them from reaching both the boundaries by recording hundreds of thousands or thousands of amounts for each batch and using a new reference (!) You can.

    As you said, there can be a practical limit command time-out (if you do not want to make it infinite) it can also be affected by cuts in batches , And thus, starting a new order for each batch.

    The functional range depends on things such as the process is inaccessible or not the patience), and whether the data is expected to be available within a certain time. If these requirements are tight, then you may have to resort to one of the solutions given in other answers.