Posts

Showing posts from January, 2012

php - Zend Framework view script, functions and variable scope -

I'm new to Zend Framework and am trying to understand it. In my visual script (index.phtml), I have this code that says: "; Print_r (this $); Echo "& lt; / pre & gt;"; $ String = ''; = "'. $ Element." ($ Empty-$ -> [$ element]) {$ string = $ string. & Lt; label class = "error"! '; Foreign currency ($- >-> ; Error [$ element] as $ error) {$ string = $ string. $ Error;} $ String = $ string. '& Lt; / label & gt;';} $ string return;} echo "& lt ; Pre & gt; "; print_r (this $); echo" & lt; / Pre> "getErrorString (" blah "); die (); It gives me: Fatal error: $ x When using the object X. on the index context in the object context, it seems that when you create a function within a scene, you lose $ $ this variable. I was searching around, and no one else could see me trying to get what I am doing (not very likely, maybe I'm looking for it...

Questions abt PHP Magic Methods & Delegating -

I wanted to wrap an object in another - supporting the structure on heritage but I'm not sure I am there, there is no error. I have created a square wrapped thats wrapped by the wrapper . I have made it so that when a method / property is called on the $ cover , if it is present in the square, cover , it will be returned, it will return $ wrapped object I think differently from the fact that the law / property exists or not, what have I done? Can some explain the code to __ callstatic () ? wrapped square {protected $ overlapsprop 1 = 'wrapped: property 1'; Protected $ wrappedProp2 = 'Wrapped: Property 2'; Function method 1 ($ arg1, $ arg2) {echo with the following lines "Called: method 1 ()": $ arg1, $ arg2 "}; static function sMethod2 () {echo 'echo' called a static method ' ;} Function __get ($ name) {return $ this- & gt; $ name;} function __set ($ name, $ val) {$ this-> $ name = $ val;}} square cover {protected $ ...

Are there any memory restrictions on Linux Kernel Modules? -

Is there any restriction on the use of Linux kernel modules i.e. code segment size or global memory or any amount of memory? In 2.6.35, load_module () bails out if the module length exceeds / p> 64 MB: Vmalloc () is used to allocate space for the module - it fails if you try to allocate more pages than is available in your physical memory (Which in turn may only be a problem for embedded low RAM thing) In addition to this, kzalloc () (and in return, kmilok ()) Is used on the basis of allocation used (SLB, SOBB, SLUB), restrictions may also be there. SLAAB defines a KMALLOC_MAX_SIZE which defines the maximum number of bytes that you can allocate in a single call with a single call.

Iphone configurable button menu -

I'm just thinking that anybody knows the best way to make configurable button menus. Im trying to make like a standard iPhone Button interface where I'll give 4 buttons and 4 buttons below. And as on the iPhone button menu, when you press and hold it, users are allowed to move the buttons around the configuration they want. Also like facebook ip app menu Any thoughts? Thanks Your best bet is probably there are a lot of common tasks in it, But in particular you will use TTLAnchartview, which comes from the Facebook application. Library is an example included in the source, which can be downloaded.

iphone - How to getDistance from userLocation every 4-5 seconds -

I'm not using it for driving directions or similar. I have some annotations and want to trigger one when the user is around any one of them, so I can alert the user. It seems that updatolocation is only called once per the startupdating location call? At least when I do NSLog within that system, I only get a line in the console, but I'm not roaming with the iPhone. So: What is the correct way to establish constant monitoring of user space and receive "callback" (either when 3-4 seconds have passed or 10 meters when the user has moved) ? As you probably know, this is the code to get started and start the location manager: locationManager = [[CLLocationManager alloc] init]; LocationManager.delegate = self; LocationManager.distanceFilter = kCLDistanceFilterNone; LocationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; [LocationManager startUpdatingLocation]; Implement and didUpdateToLocation as follows: - (zero) Location Manager: Man...

C# ambiguity error when properties are used -

I have recently started learning C #. I just learned about the properties and decided to make them a simple program to understand them more. This is the code I wrote: class dog {personal full weight; Private string color; Public string color {get; Set; } Public dog (int theWight, String the Clauer) {weight = theWight; Color = colorful; }} And I get an ambiguity error as far as I understand, it should not be so. You have area and property with the same name color this is the reason The compiler produces an error

java - Limit string length in FreeMarker -

I am trying to get a substrings from string in FreeMarker. Although there are 2 lemons to consider: The string may be blank The string may be less, the length of the maximum string I do the following: & lt; #list Landing Page 1.popular; As a line & gt; & Lt; Li & gt; & Lt; Span class = "minititle" & gt; & Lt; #assign minititle = (row.title! "") & Gt; & Lt; #if Minute Length & amp; Lt; 27 & gt; $ {Minutes} & lt; # Else & gt; $ {Minititle? Substring (0,26)} ... and lieutenant; # / If & gt; & Lt; / Span & gt; & Lt; / Li & gt; & Lt; / # List & gt; I get a freemarker error: Failed to load template: Expected " ; Line 65 on Line 144, Landing Page 1. One in the Fort was expected: & gt; ATTEMPT & gt; ... & lt; IF & gt; ... & lt; LIST & gt; ... & lt; FOREACH & gt; ... & lt; SWITCH & gt; ... & lt; ASSIGN & gt; ... & lt; ...

How can I programmatically generate keyDown events in Silverlight? -

I have 2 textboxes that are not visible first. When the first key throws the key down event on the text box, I want to shoot the same text on the second text box, so it will respond in the same manner as the user was typing into another text box. How can I do this? EDIT: I know that you can do this in Windows. Forums and I was hoping that it can be done here too. My goal is to have 2 text boxes with different text, but when the user types something in 1 text box then the same text should appear in the second text box. Example: Text in the first text box: & lt; Home & gt; & Lt; Number & gt; 75 & lt; / Number & gt; & Lt; Customers & gt; John & lt; / Customer & gt; & Lt; / Home & gt; Text in the second text box & lt; Home & gt; & Lt; Number id = "123" & gt; 75 & lt; / Number & gt; & Lt; Client ID = "345" & gt; John & lt; / Client & gt; & Lt; / Home & gt...

forms - symfony : how to make a validator for unique key? -

I want to know how I can create a videak for a key that should be unique. sfValidatorDoctrineUnique or sfValidatorPropelUnique is probably what you want even if you did not describe it in too much detail Is: sfValidator DoctrineUnique : sfValidatorPropelUnique :

drupal 6 and nodequeue_nodes -

I am migrating a Drupse web portal to a new release (6.17) from the old release (5.22). I have some problem with the nodequeue module: the d6 version of this module is not the nodequeue_nodes function ... how can i change this function? Thanks in advance. Regards, Michelle .... I've replaced nodequeue_nodes with nodequeue_view_nodes and it works !

php - array replace function not working for me -

Is any array replaced by a function in php The php manual has a function called array_replace Output array ([0] => orange [1] => made [2] => [3] = & gt; Raspberry) Array ([0] => Grapes [1] = & gt; Bananas [2] => Apple [3] => Raspberry [4] = & Gt; Cherry) The question is that is not working at all for you

MySQL LIKE clause with comma -

What is the meaning of commas in the following SQL statement (using MySQL)? [...] Preferences '%, cat233,%' are not just a part of the string to match the comma? Such as "Fred, Bill, Cat 233, Jo, Harry" will match.

silverlight - Silver/WPF remove mouse events, but allow touch events -

Anyone knows how to remove the mouse event, but only allow touch events. In short, I 2 monitors are 1 primary display, second is the touch screen. I do not want to move the mouse cursor to the other display. For the display, it will accept only the touch event, so it is expected that when the second screen touches, the mouse should move the primary screen w / o. How to consider any? Not with Windows, because all mouse inputs like device meet for a virtual device. So if your touchscreen is registered and works like a regular mouse, then I have no idea how to get the input from where the input came from. The only solution here will be the input data at the driver level. (See many results for this.) This will cause the mouse cursor to always "click" (shortly) the touchscreen. Mouse cursor must be stopped to enter the mouse screen, as it is also at the Windows level. I give an alternative suggestion, though it depends on your touchscreen: Typically, before touch...

c, c++ most basic double quotes -

char * a = "hello world"; यदि 'एच' का पता 0x01 है तो printf% s के साथ डी को प्रिंट करता है लेकिन अगर उसी कोड को मैन्युअल प्रिंटिंग रूटीन के साथ लिखा जाता है (* A! = NULL) {printf ("% c", n [a]); n ++;} यह कुछ और अक्षर प्रिंट करता है .. लेकिन printf ("% s", a); इसे पूरी तरह प्रिंट करता है। जबकि (* a ++) printf ("% c" , * (ए -1)); या (; * a ++;) printf के लिए ("% c", * (a-1)); हालांकि काम है लेकिन मैं समाधान नहीं चाहता, लेकिन प्रक्रिया तंत्र .. तो मेरे दिमाग में आने वाला सवाल है कि क्या printf हो जाता है कुछ रजिस्टर (या किसी भी मेमोरी इकाई) से स्ट्रिंग की लंबाई या यह चरित्र की जांच करता है .. फिर प्रिंट करता है ... जिस तरह से आप चरित्र स्ट्रिंग में अनुक्रमणित कर रहे हैं अजीब है। यह स्ट्रिंग के लिए काम करता है, लेकिन बंद नहीं होगा क्योंकि आप कभी भी * a का मान नहीं बदलते आपका प्रोग्राम क्या करता है a ऑफसेट n प्राप्त करने की कोशिश करता है, इसलिए पहले 11 पदों के लिए वे एक समान हैं, लेकिन लूप समाप...

biztalk - Return a Message from a Called Orchestration -

We have parent orchestres where we call child orchestration. However, after the completion of the child orchestation, we want to return a message original orientation. What is the best / most standard way to do this? A) Just publish the message from child orchestra to the message box and get it in parent Can correlate with B in this regard. Do we use this message as a C #tyle ref / out parameter when it passes it to parents Other? Thanks Stuart you Any way you can go ... B. The easiest way is to use the return parameter with the "call figure". In this way, two main Oppositions are that you will be processing sychronously, so if these two orchestrations are not related or are in different business processes then you will have many orchestrations. Secondly, you have parents and children If you are coupling then you are creating dependency between your parents and your child, you have to stop the parents, you have to stop the child. If Then cooked the ...

Multidot extension for SaveFileDialog in C#? -

Actually I'm trying to set the filter of SaveFileDialog as if we say ... "XML document ( .sdf .xml) | .asdf.xml ". When selecting a file it filters the file correctly, but when it actually saves the file, it only saves it as ".xml" is it also supported? I too can not think of a suitable solution because for most of the work, the user needs to manually change the file name without knowing about it. Help Multidimated Extensions = True;

MySQL MATCH AGAINST query with long WHERE AND OR syntax? -

The following question is the way I am hoping: Select DISTINCT * mytable ('Elm') and color = 'red' or color = 'white' or color = 'blue' In contrast, where Milan (Stranum, Stranum, Stripam , Taunnam, Zip) I hope that returns more results than this - it is not limiting my results on 'Elm'. If I remove the last line (and color ...), then I can see that my match is working only fine and actually is limited only to 'Elm'. Do I need to do a subquarium or something to draw color content? The right syntax will really be helpful, thanks! can be written as SELECT DISTINCT * My field from WHERE MATCH (STRANUM, STRANUM, STREET TYPE, TANNAM, ZIP) EX> Hope this helps.

uiview - Scrolling RSS reader iPhone View -

I am planning to add a small subview to the bottom of my current app so that it is the RSS feed headlines one One time to show on What would be the best type of view to use for this? UITextView , UIWebView ? Maybe a custom UITableViewCell ? If I use UITextView and it taps it, it displays the keyboard, but if I set the setUserInteractionEnabled to NO then I Do not be able to launch a different look with the article ... Will the original animation be used by scrolling each block of text? Thank you. Use a UILB. And yes, you'll use the core animation to animate. There is a basic UIView animation block which will move a UILabel from the top right of the screen to the left. set label label set center: CGPointMake (screenwidth + [feed label bound] size, fourth / 2, [feed label frame]. .y)]; // Then animate it in the scene later and then exit from the left [UIView startup permissions: zero reference: NULL]; // give it 10 seconds to fill it all the way [UIView Set An...

Quote ticker in C# -

I want to create a quote ticker control in C # in which live data should come from the stock exchange. > Thanks Read on web services, this is probably the best way to get information about the date And then you can use the results to update your control on your C # form. Try to do some work and post specific questions.

ios - Hide the top bar in UITabBarController -

Html> How do I hide the top bar in the UITabBarController using the OBJ-C code (without using the interface builder) ? Please see the image in the link given below to better understand your requirement. I already have a toolbar as you can see and I do not want this. I am not using XIB / NIB files and I am not creating all objects using plain OBJ-C code. Cheers Jagge Topbar is not part of the UINavigationController, not UITabBarController, Can be hidden in your view by the WillAppear method: self.navigationController.navigationBarHidden = YES; But I'm pretty sure that the navigation bar is always on top, so I think the strip you want to hide is actually your toolbar. self .myToolBar.hidden = Yes;

Is it possible to create Windows PowerShell Cmdlets with F#? -

Reading Microsoft documents to create PowerShell Cmdlets, I noticed that there is no example code for F #; Instead, there is a message in which "this language is not supported or no code example is available." Is not F # CMDlate supported, or is there no example in F #? Take a look at this: This is not the perfect example of doing this but it is definitely F # It is possible to write CMDlet in EDIT: There is a more comprehensive example but the relevant information is a little late. Actually relevant information is a bit old on both links, but the first link is more recent.

php - Zend Decorators - Remove Id Field for DT Wrapper -

I get two and they called because they share some ID two input fields 'Title'. Zend generates a good output like this: & lt; Dl class = "zend-form" & gt; & Lt; Dt id = "title-label" & gt; & Lt; Label = "form1-title" class = "required" & gt; Details & lt; / Label & gt; & Lt; / Dt & gt; & Lt; Dd id = "title-element" & gt; & Lt; Input name = "form 1 [title]" id = "form1-title" value = "..." type = "text" & gt; & Lt; / Dd> & Lt; / DL & gt; The problem now is that DT and DD elements have been misnamed (should be form-1-title because it is a sub form). I also tried to change element decorators: $ this-> Adelements (...); $ This- & gt; SetElementDecorators (array ( 'ViewHelper', 'Errors', array (array ( 'data' = & gt; 'HtmlTag'), array ( 'tags' = & gt; ...

exchangewebservices - How do I discover all mailboxes for an Exchange Server using Exchange Web Services? -

I am using Exchange Web Services Managed API 1.0 to access Exchange Server (2007) in my organization. I need to iterate over all mailboxes on a given server. I have not seen any way to get the list of scheduled mailboxes for a given exchange server. I am able to use the Autodisquire service to find the address of the hub server for a specific mailbox, but I am interested in getting a list of all the mailboxes. Does anyone tell me in the right direction? If your problem has not yet been resolved then I would recommend you to use Exchange Web Services Instead of just the pure LDAP query, the information you need is saved in the homeMDB , msExchHomeServerName and possibly homeMTA Active Directory attributes. You can modify the LDAP query or you can get the information it needs.

.net - Weird behavior with C++/CLI and friend assemblies -

I am writing two C ++ / CLI assemblies, in a assembly there is a base class with some internal virtual methods When I try to override the internal virtual method, the compiler is forcing me to change the visibility level to the public. What's going on? Why do I have to do this? Code: // Assembly 1 "friend mixer" namespace Friends Component Test {Public Reef Class Base Class {Internal: Base Class () {} Virtual Zero DoSomething () {}}; } // Allow "FriendAsseblyDerived" [Assembly to look internally: :: System :: Runtime :: CompilerServices :: InternalsVisibleToAttribute ( "FriendAssemblyDerived, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100a95fe809ecc53c3a826aa32e3ab1309f2ecae4b91dc649457d704e150f3a4007a151ffe28852f947803dd1a1586c5c0ae2c9688bd76299857ee65ff7efb14905e03b33664a42e2fa1074080c3bad971623514ab6dd9fc4e4343ba7fb98884ecce45f96b71e5f1b55de88e36483274aa71c740fdfb14aacaada6ca22cb39bf9a2")]; // -------------...

php - Jquery: Running AJAX locally without a webserver -

मेरे पास index.html में .js फ़ाइल में निम्नलिखित फ़ंक्शन है function getValues () {$। एएक्सएक्स ({प्रकार: 'पोस्ट', यूआरएल: "http: //localhost/getData/getdata.php", सफलता: फ़ंक्शन (डेटा) {var डेटा वैल्यू; var एंडेंड; डेटा वैल्यू = स्ट्रिंग (डेटा। एनएसई ); एपेंड = "ए"; अपडेट वैल्यू (डेटा वैल्यू, एन्ंडेंड); डेटा वैल्यू = स्ट्रिंग (डेटा.बीएसई); एपेंड = "बी"; अपडेट वैल्यू (डेटा वैल्यू, एपेंड);}, डेटा टाइप: "जेसन"}); } यह काम करता है जब मैं इसे वेबमास्टर में चलाता हूँ जैसे wamp। लेकिन मैं स्थानीय रूप से index.html को स्थानीय रूप से चलाने के लिए चाहता हूं, बिना किसी वेबसर्वर के, उपयोगकर्ता बस index.html को क्लिक करता है और इसे चलाना चाहिए लेकिन यह नहीं चलाना चाहिए। डेटा हमेशा रिक्त है क्या समस्या हो सकती है? क्षमा करें मैं एक सुपर JQuery Noob हूँ। getdata.php फ़ाइल में कोड & lt ;? गूंज json_encode (सरणी ("एनएसई" = & gt; रैंड (5000, 20000), "बीएसई" = & gt; रैंड (5000, 20000))); ? & Gt; जब आ...

how to scroll window onload with jquery -

I have a form in the middle of the table. I want to keep this form vertically and horizontally in the middle of the window. , Even when the size of the window is smaller than the table. I'm thinking of using the jQuery scrollTo function and it calls onload and resize, but I'm a speculator and I do not know how to do it. I appreciate any help or examples with the call in the header and script function. Thanks a lot. If you want a floater box: insert your form into a div, this position is absolute Make this center: Add this JQuery plugin: $ (document) .ready (function () {$ ('# div_id'). CSS ('position' , 'Absolute'); $ ('# div_id') .center ();}); $ (Window). Reset (function () {$ ('# div_id'). Center ();}); If you want to scroll: $ (document) .ready (function () {window.scrollTo (0, $ ("# FORM_ID") .offet (). Top);} ); $ (Window). Reset (function () {window.scrollTo (0, $ ("# FORM_ID") offset (). Top);...

php - Best way to go about storing/accessing PDF Files -

Just a quick question (probably not) I want to add my website in a way After logging in to the customer and once logged in, they are able to select their invoice which I will upload to my server. My question is, what is the best way to go about collecting and accessing files, I have made some tablets and can not find much in the way of pointing me in the right direction Are there. Thank you in advance Get them out of an unreadable directory (www root or htaccess Protected by) and provide them with PHP This can be done so: $ file = '/path/to/yourpdf.pdf'; Header ('content-type: application / pdf'); Header ('content-length:'. File size ($ file)); Readfile ($ file); Use PHP and SQL to determine whether the $ file and whether the user is allowed to view the file.

How to know if a music is currently playing on Windows Phone 7? -

I am currently creating an application for Windows Phone 7 which has music playing with the media player. How can I get this information? However, I would like to know that the phone is already playing some music, to ask the user to run his app too. Thank you. media player.cue Active Song should do the trick. Media Player Dock for your reference.

java - How to group results by intervals? -

I have a table with an event with "speed" properties. Distribution of this property to see the statistical, I want to group the result by interval, we say: [0-49.99 km / h] 3 items [50-100 km / h] 13 objects [100 -150 km / h] 50 objects etc. This will allow me to see that most objects are in a fixed interval. Obviously it can be done with many questions in the appropriate position, such as: Count from GaEvent where speed => MIN and speed But this is extremely inefficient. Cheers! In order to deal with this in more than one SQL alone, the question is against the one derived table in the table in which the minimum of your histogram For example: Select t.min, t.max, count (*) (Choose as minimum 0, 14.9 max. Choose Association 15, 29.9 Union Choose 30, 44.9 Union ...) t.min and t.max group between c.speed at t.min by t.min by t.max Except the exterior cars with the order left C is left. Max | Count ----------------- 0 | 14.9 | 1 15 | 29.9 | 1 30. 44.9 ...

having to run multiple instances of a web service for ruby/python seems like a hack to me -

Is it just me or is it scaling a hack to run multiple instances of a web server? Am I wrong in this? Explanation How do I read the server to run several instances of a web service server . I am not talking about the clusters of the servers. In fact, people were running multiple front end in a cluster, multicore CPUs became extensive before the servers So to support the session in many front end on many machines, it's been a while before actually going to be really beneficial to run a bunch of threads on a machine all the infrastructure. Actually using the asynchronous style frontends gets better performance from a multiathrade standpoint on the same hardware, so I would say that there are many examples running in favor of a multi-layered monster

c# - Proper way to pass username/password to SmtpClient (.NET) -

The questions are very simple, but still appreciate the short answer. I have to get a username / password from the smtpClient to the App.config file with the MSDN / schema I think the proper file should look like: & lt; System.net & gt; & Lt; MailSettings & gt; & Lt; Smtp from = "foo@bar.com" & gt; & Lt; Network host = "mail.bar.com" port = "25" username = "foosur" password = "barpassword" /> & Lt; / Smtp & gt; & Lt; / MailSettings & gt; & Lt; /system.net> I am trying to find the appropriate API to call when the state is started, so that mail and password are well received from XML. Could: var Client = New SmtpClient (...); // How to get the server name Client.Credentials = New network credentials (..., ...); // How to get a user / pass client Send (message); Is there a reasonable / dedicated way to bring servername , user , password Code> ConfigurationMana...

python: what does array([...]) mean? -

I am working with lists, and there is a function that is returning something that looks like this: / P> array ([0, 5, 3, 3, 0, 1, 2]) I assign those values ​​to a list What does array mean? array most likely numpy.array = myarray = array ([0, 5, 3, 3, 0, 1, 2] refers to) Mylist = List (Myrtar)

opencv - Mat::convertTo used with inplace matrix cause buffer overflow -

itemprop = "text"> I have problem with convert: Convert: The reason for the buffer overflow is different because the destination and source data type is different. Please, anybody having this problem too? Can i fix What version of OpenCV are you using? This problem has been fixed long ago, in the amendment 2307. Try updating your lab and see if it works.

c - Trouble spotting memory leak cStringUsingEncoding -

Hey, I'm trying to convert NSString into a C string using cStringUsingEncoding but I have a memory leak. My understanding is that cStringUsingEncoding returns an indicator for a character array that is only guaranteed to exist for the duration of the NSString object. Like you should copy its content to another string. Here's my problem ... I have a function that accepts an NSString and converts it into a C-string copy. Just for testing, I ran into 1,000 iterations of the following method (to ensure no leaks). - (zero) test {NSString * test = [[NSString alloc] initWithString: @ "Hello world!"]; For (int i = 0; i Very straight forward code ... The problem is that it leaks like madness. Now before you jump to my return conclusion, the COPIEDCString function works just fine. I tested it to eliminate the possibility of declaring a Si String and making it a copy to make a copy. Inside the function I am using the following code to change it - return () * returnCop...

delphi - How do I put color on a virtual string tree node? -

Is it possible to see this for the virtual string tree? I really need help on this because I'm new to Delphi. You can put something in the OnBeforeCellPaint event example: Process TForm1.VirtualStringTree1BeforeCellPaint (From: TBaseVirtualTree; TargetCanvas : TCanvas; Node: PVirtualNode; Column: TC Columnindex; Selpentamode: TV TCEP PaintMode; Cellrect: Tract; var Content Retract: TRCT;); Start CellRect.Left: = CellRect.Lift + 20; TargetCanvas.Brush.Color: Cloilom; TargetCanvas.RoundRect (cellrext, 5, 5); InflateRect (ContentRect, -1, -1); End; You must give a rough approximation of what's in the picture ... N @

Filling drop down list from database values in jsp using javascript(No ajax, no jquery) -

I have an application where the user can refer to the transaction. The transaction should be mapped to some securities (company name) that the user has already created. I want the users to see the names of their securities and as soon as they are typing, only the relevant security should be shown. Example If the user types, then all securities starting with one should be visible. What is the way to do this? It seems that I can not format block code in a comment, so give me another answer Was required: You have to type the array into the document. I do not know Java, but it will be something similar: out.write ("& lt; scripts> var JSSecurities = ["]; (Int safety = 0; Security; JavaSecurities.length (); Security ++) {out.write ("&" + + Java Securities [Security] + "','); } Out.write ("]"); Perhaps most suitable for each one, but I do not know syntax.

sql - Error with mysql procedures ERROR 1304 & ERROR 1305 -

I'm new to using processes and I do not seem to be working for my use of MySQL v5.1.36 I am using and using my code on a WAMPP server using MySQL Console. If I'm making the (again) process I get error # 1304 (42000). mysql> DELIMITER // mysql & gt; Mysql & gt; Create method modx.getCRID (X XARAR (255), outside and INT) - & gt; BEGIN - & gt; DECLARE y INT; - & gt; Select in Y - & gt; From `Modx`.coverage_region - & gt; Where `coverage_region` name = x; - & gt; END // Error 1304 (42000): The action getCRID already exists in mysql & gt; Mysql & gt; DELIMITER; However, if I try to use the process, I get error # 1305 (42000). mysql> Use the modax; MySQL and gt; SET @crID = modx.getCRID ("southeast"); Error 1305 (42000): function modx.getCRID does not exist If the process exists for one, then how can it not exist for another? I believe that there are problems The first error occurs because you have an e...

timing - How can I measure the build time for each component of a scons build? -

I have a large C ++ project that is built using a scan. Its building is slow and I want to make some changes to make it faster, now I want to focus my time on accelerating parts of the building which is slow. How can I work, which files are going to compile for the longest time? I know that this question is outdated, and has already been accepted, but recent In the same way it has been referred to with the second question. I think a more elegant solution would be to use the SCON - debug = time command line option, as outlined in it.

java - Looking up an EJB dynamically -

I am developing an application on Glassfish 3. I have an EJB that looks like this: @LocalBean @Stateless Public Class MyBean {public void doSomething () {}} My client Code (running inside the same application) looks like this: MayBean InitialContext.doLookup (MyBean.class.getName ()); According to some sources, this should be a valid lookup method, but it throws a NameNotFoundException What am I doing? What sources according to? I personally will use the portable JNDI names specified in EJB 3.1. See the EJB FAQ for Glassfish / Li> BTW logs portable JNDI names at the time of deployment of glassfish.

c# - will declaring variables inside sub-blocks improve performance? -

सी # में, निम्न तीन विकल्पों की तुलना करते समय प्रदर्शन में कोई अंतर होगा? एक शून्य से एक (int x) {if (x == 10) {int y = 20; Int z = 30; // अन्य सामान} अन्य {// अन्य सामान}} दो शून्य से दो (int x) {Int y; Int z; यदि (x == 10) {y = 20; Z = 30; // अन्य सामान} और {// अन्य सामान}} तीन तीन शून्य (int x) {Int y = 20; Int z = 30; यदि (x == 10) {// अन्य सामान} अन्य {// अन्य सामान}} सब कुछ बराबर ( और वे आम तौर पर नहीं हैं, यही वजह है कि आपको सामान्यतः इसका परीक्षण करना है ), ONE () और दो () उसी आईएल निर्देश जनरेट करना चाहिए, क्योंकि स्थानीय चर को पूरी पद्धति में स्कॉच किया गया है। तीन () धीमा हो जाएगा x == 10 क्योंकि दो अन्य स्थानीय चर में मूल्यों को स्टोर करने के लिए परेशान नहीं करेंगे। सभी तीन ही स्मृति की मात्रा लेते हैं- सभी चर के लिए स्मृति उन्हें आवंटित की जाती है, भले ही उनके पास कुछ भी नहीं जमा हो। JIT कंपाइलर यहां एक अनुकूलन का प्रदर्शन कर सकता है, यद्यपि, अगर यह कभी अप्रयुक्त वैरिएबल के लिए देखता है।

dictionary - python dict remove duplicate values by key's value? -

एक शब्द dic = {1: 'a', 2: 'a' , 3: 'बी', 4: 'ए', 5: 'सी', 6: 'डी', 7: 'डी', 8: 'ए', 9: 'ए' मैं डुप्लिकेट मानों को निकालना चाहता हूं, केवल एक के / वी युगल को रखना, उन डुप्लिकेट मानों के "कुंजी" चयन के बारे में, यह अधिकतम या न्यूनतम या यादृच्छिक रूप से उन डुप्लिकेटेड आइटम की कुंजी में से एक का चयन कर सकता है। मैं ak / v स्वैप का उपयोग नहीं करना चाहता क्योंकि इससे कुंजी चयन को नियंत्रित नहीं किया जा सकता है। उदाहरण के लिए "a" मान लें 1: 'a ', 2:' ए ', 4:' ए ', 8:' ए ', 9:' ए ' अधिकतम कुंजी होगी {9:' ए '} और मिनट {1: 'a'} होगा, और यादृच्छिक यह किसी भी एक को चुनना होगा। और, यदि कुंजी अन्य प्रकार के हैशणीय मान है, उदाहरण के लिए, स्ट्रिंग, तो ऐसे चयन कैसे करें क्या कोई मुझे साझा कर सकता है एक विचार? धन्यवाद! आयात करें itertools के रूप में newdic = {} के लिए v, ग्रैपी में it.groupby (सॉर्ट किया हुआ (v, k) के लिए k,...

Zend Framework: What is the right way of setting default decorators for Zend_Form elements -

मैं वर्तमान में अपने Zend_Form से Zend_Form ... वर्ग Application_Form_Abstract ज़ेंड_फॉर्म विस्तारित करता है {... function loadDefaultDecorators () {if ($ this-> loadDefaultDecoratorsIsDisabled ()) {$ $ this; } // ... तत्वों $ decorators = $ this- & gt; _elementDecorators के लिए; यदि (खाली ($ सजावटी)) {$ this- & gt; setElementDecorators (सरणी ('ViewHelper', 'Errors', सरणी ('विवरण', सरणी ('टैग' = & gt; 'p', 'escape' = & gt; गलत)), 'लेबल', सरणी ('HtmlTag', सरणी ('टैग' = & gt; 'p')))); लेकिन मुझे जल्द ही यह पता चल जाएगा कि मैं विशिष्ट तत्व सज्जाकारों को परिभाषित नहीं कर सकता जैसे $ this-> addElement ('textarea', 'bio' सरणी ('सज्जाकार' = & gt; सरणी ('ViewHelper', 'Errors', ऐरे ('विवरण', सरणी ('टैग' = & gt; 'पी', 'बच' = & gt; गलत)), 'लेबल' , सरणी ('HtmlTag', सरणी ('टै...

r - Tab Delimited to Square Matrix -

I have a tab delimited file like AB 0.5 AC 0.75 BD 0.2 and I want to convert it into a square matrix, such as ABCDA 0 0.5 0.75 0 B 0 0.2 cD How can I go about this in R? Thank you, If you have the following column name of data in the data frame: var1 var2 value xtabs (value ~ Var1 + var2, data = df)

algorithm - converting floating point to 32-bit fixed point in Java -

I have to change a floating point at a 32-bit fixed point in Java. Understand what the 32-bit fixed point is? Can anyone help with algorithms? For a fixed point number integer part, by using a certain number of bits of one type, the actual number , And partial part of the remaining bits. The number of bits representing each part is fixed (hence the name, fixed point) An integer type is usually used to store fixed-point values. Fixed-point numbers are commonly used in systems, which are not floating point support, or require more speed than floating point. Fixed point count can be done using the integer instructions of the CPU. A 32-bit fixed-point number will be stored in 32-bit types like int . Generally, each bit (unsigned in this case) integer type will represent the integer value 2 ^ n as follows: 1 0 0 0 0 0 = 2 ^ 7 + 2 ^ 5 + 2 ^ 4 + 2 ^ 1 = 178 2 ^ 7 2 ^ 6 2 ^ 5 2 ^ 4 2 ^ 3 2 ^ 2 2 ^ 1 2 ^ 0 But if type is used to store fixed point values, bits are inter...

jsf - RichFaces Vs PrimeFaces (for performance) -

I am using JSF 2.0 and I am looking for a Component library with minimal load in terms of performance . Which is better to use my choice between Richfase and Primefaces? What are the advantages and disadvantages of both? Currently the primaryface is only one component that I know (for now) in which a complete JSF2 implementation There are bugs and problems, and some components have to be rewritten, but development is fast, communication is excellent (I do not remember a single post on my support forum, which has not been answered by Kegate himself), and This is moving in the right direction (the new theming system is one of the imho Ahrn) I think it would be a mature JSF2 component liberalization by the end of Praimfases year. There are some other such as I have played for a short time, but they are progressing slowly and as I said, none of these actually have JSF2 yet It is that Mojarra, the Sun reference implementation is quite small, and there are some serious bugs that d...

Print Palindrome in Java -

I have the following code and I want to print palindrome on the console. Please tell me what to do if the condition is to be done, it can print all Pandithrom between 0 and 10000. This palindrome is 161, 1221, 4554 etc. .... JAVA CODE: ET palindrome []; Palindrome = New Int [10000]; For (integer number = 0; calculation & lt; palindrome.length; count ++) {palindrome [count] = 0; If () {System.out.println (count); }} something that can work Public Boolean isPalindrome (last integer number) {end string s = integer. Stosting (num); Return s.equals (new stringbuffer (s) .reverse (). ToString ()); }

xml - XPath expression - help needed -

मेरे पास इस तरह से नमूना XML है: & lt; users & gt; & Lt; उपयोगकर्ता नाम = "उपयोगकर्ता 1" & gt; & Lt; भूमिकाएं विभाजक = "," & gt; एडीएम, USER & lt; / roles & gt; & Lt; / उपयोगकर्ता & gt; & Lt; उपयोगकर्ता नाम = "user2" & gt; & Lt; भूमिकाएं विभाजक = "," & gt; एडीएम, गेस्ट & lt; / भूमिकाएं & gt; & Lt; / उपयोगकर्ता & gt; & Lt; उपयोगकर्ता नाम = "उपयोगकर्ता 3" & gt; & Lt; भूमिकाएं विभाजक = "," & gt; रीडर, गेस्ट & lt; / roles & gt; & Lt; / उपयोगकर्ता & gt; & Lt; / उपयोगकर्ताओं & gt; XPath अभिव्यक्ति का उपयोग करके GUEST उपयोगकर्ता प्रयोक्ता प्राप्त करने का कोई तरीका क्या है? यदि आप XSLT 2.0 का उपयोग करने में सक्षम हैं तो मैं आपको भूमिकाओं की स्ट्रिंग को टंकन करने के लिए सुझाव देगा। इसमें () का उपयोग करना ठीक है जब तक कि आपको "EXTERNALGUEST" जैसे रोल नामों की शुरुआत नहीं होनी चाहिए या इससे समान ...

java - How to dynamically compute a list of colors? -

To represent a list of objects with different colors in the GWT-widget, we dynamically create a list of colors There is a need to obtain as the size of the list can be different, with so many different colors in the form of objects, so we should be able to calculate such a list of colors. Another version of my solution with category: list & Lt; Int & gt; GetUniqueColors (int amount) {last full less limit = 0x10; Last full upper limit = 0xE0; Last int color phase = (upper limit - lower limit) / Matho Po (amount, 1f / 3); Last list & lt; Int & gt; Color = new ArrayList & lt; Int & gt; (Quantity); For (Int b = lower limit, B & lt; to the upper limit, B + = color phase) (if Int + R = lower limit, R & lt; upper limit; R = Rngstep) (Int g = lower limit, G & lt; upper limit G + (Colors.size () & gt; = amount) {// calculate step is not very accurate, so it is securable return color;} other {Int color = ( R & lt; & lt; 16) + (G & l...

Entity framework performing an Insert, when it should be doing an Update -

I am having a real problem with EF v1. 50 units have probably been mapped to me, but this one unit is creating sorrow for me. This unit has mapping with other organizations, which are reference tables, but for some reason it is trying to add one or update it. Here is a piece of my code: using (var context = new someEntities ()) {var studentCourseJoin = context StudentCourseJoinSet.Where (o = & gt; ; O.Code == scjCode). first (); StudentCourseJoin.EntryStatus = New Entrepreneur {code = viewsModel. Student details. Interstitials code}; StudentCourseJoin.ParentalInHigherEducation = New ParentalInHigherEducation {Code = View Model Student Details ParentalInHigherEducationCode}; StudentCourseJoin.School = New School {Code = View Model Student Details School code}; StudentCourseJoin.Institution = New Institute {Code = View Model Student details. Institution code}; StudentCourseJoin.LastSchoolEndYear = ViewModel. Last Education Method; StudentCourseJoin.LastInstitutionEndYear =...

maven 2 - Deployed war in JBoss via cargo-maven2-plugin not accessible via JBoss AS Admin console -

I am deploying war in a remote JBoss 5.1.0 using the following POM config & lt; Plugin & gt; & Lt; Group & gt; Org.codehaus.cargo & lt; / Group & gt; & Lt; ArtifactId & gt; Goods maven2-plugin & lt; / ArtifactId> & Lt; Version & gt; 1.0.2 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Container & gt; & Lt; ContainerId> Jboss51x & lt; / ContainerId> & Lt; Type & gt; Remote & lt; / Type & gt; & Lt; / Container & gt; & Lt; Configuration & gt; & Lt; Type & gt; Sequence & lt; / Type & gt; & Lt; Properties & gt; & Lt; Cargo.hostname & gt; Local hosts & lt; /cargo.hostname> & Lt; Cargo.remote.username & gt; **** & LT; /cargo.remote.username> & Lt; Cargo.remote.password & gt; **** & LT; /cargo.remote.password> & Lt; / Properties & gt; & Lt; / Configuration & gt; & Lt; Deployer ...

Download SDK for Windows 7 and Visual Studio 2008 -

I have to run a program in VC ++ and Windows 7 platform. I use Visual Studio 2008. Can I download Windows SDKs for Visual Studio 2008 and Windows 7? Can anyone provide a link to download it? Windows 7 SDK

python - Execute raw SQL after connect to database -

How can I execute raw SQL after connecting to the database? I need to run a script once I connect to DB. UPD: The question is not how to run raw SQL. Just go to the docs. I think the second match on Google edit view comments If you see that MySQLdb (built-in layer) also Accepts an init_command option immediately after a connection is established. This is a feature of MySQLdb, and not so much of Django.

dynamics crm - MS CRM 4.0 Certain fields appear only if a certain answer is selected? -

I would like to know whether it is possible to make some areas invisible, unless the questions associated with them are selected in the Yes to be done. Then pop up other areas to go in more detail. I'm not sure that CRM can do this, but if I want to know how. The following is entered on your on-load function CrmForm.all.field.style.display = 'none'; CrmForm.all.field_c.style.display = 'none'; Then it has been put to show this field on the on-change event of the field that you are monitoring: crmForm.all .field.style.display = 'in line'; CrmForm.all.field_c.style.display = 'inline';

flex - Significance of : xmlns:mx="http://www.adobe.com/2006/mxml" -

I want to know a bit more about 'xmlns: mx = "http://www.adobe.com/2006/ Am MXML " Normally the name space works as a pointers in place of the component, but I have always directed resources within the local directory structure. When used with 'xmln: mx =' http://www.adobe.com/2006/mxml '', is the new connection set up with Adobe Servers or is it just a conference? If a real connection is set then the application should not be compiled without internet connection but in fact we can run our application without compilation and internet connection !! Kindly thank you in advance. Ashyn Ashyn This is just an identifier with the use of the flex-config.xml file (you can call it your $ SDK_HOME / frameworks folder) indicates in the Mxml-manifest.xml file that contains definitions of classes that you can use by "importing" specific namespaces.

cocoa touch - Access iPhone Home Screen Background -

I was wondering how I can use the iPhone's home screen image so that I can do it for my application Can be used in the form. In essence, use NSImage which represents the wallpaper of the home screen. Thank you. First of all, on an iDevice, this is a UIImage . Secondly, do not use at least public APIs in answer to your question.

compiler optimization - C++ inline methods with same if statements -

I am writing handler for OpenGL texture and I'm thinking about security and performance. Which level of adaptation should be marked? struct Texture2D {GLuint ID; Inline texture 2D (): ID (0) {}; Inline Clear Texture 2D (GluIt ID): ID (id) {}; ~ Texture2D (); Zero genotypes (bull regeneration = falls); Zero removal (); Zero commitment (); Zero Parameter (GLNM PNN, GL Floyd Ultimate); Zero parameter (GLenum pname, GLint param); Zero glTexParameterfv (GLenum target, GLANM PNA, const GLflot * parameter); Zero GlTexParameteriv (GLenum Goal, GLANM Pinnam, Const GLIT * Parameters); Constant texture 2D dam; }; Inline Zero Texture2D :: Genature (Bull Regedon) {if (ID) {if (regen) DeleteTtexture (); Other Returns; } Glendatur (1, and ID); } Inline Zero Texture2D :: DeleteTexture () {glDeleteTextures (1, and ID); Id = 0; } Inline Zero Texture Texture 2D :: Bindectations () {glBindTexture (GL_TEXTURE_2D, ID); Binded.ID = ID; } Inline Zero Texture2D :: parameter (GLenum pname, GLfloat pa...

C# Coding Style - Fields -

First of all, I do not want to start a coding style war, so please answer only if you are answering the question . I had to face some people who put their fields on top of the class. Can someone do something that explains the logic behind it? Many thanks An argument (at least auto-property can come into being Before, on the top of the square, the information of all the states was to be grouped, because it sets a long way towards summarizing what kind of methods will be accomplished.

Rich makers for Google Maps V3 -

Is there an implementation of markers that allows a combination of those functions: Html content like gmaps-v3-label-marker () work with clusters () Any thoughts? Thank you in advance! Something like this?

CSS3/jQuery selector to style group of 2 rows via the :nt-child() selector -

मेरे पास & lt; table & gt; है कि डेटा प्रति 2 & lt; इसलिए मैं पंक्तियों (प्रत्येक 2 पंक्तियाँ) को ज़ेबरा छिपाने के लिए शैली करना चाहता हूं, लेकिन 2 का प्रत्येक सेट स्टाइल होना चाहिए। मैं कोशिश कर रहा हूं कुछ ऐसा: tr: nth-child (3n + 1), tr: nth-child (4n + 1) {पृष्ठभूमि: # f7f7f7;} मुझे एक CSS3 समाधान पसंद है, लेकिन यदि केवल jQuery ही कर सकता है, तो यह ठीक हो जाएगा। कृपया (jsFiddle के माध्यम से संपादन) देखें: मैंने चारों ओर खेलने की कोशिश की सीएसएस-ट्रिक्स, लेकिन मैं इसे नहीं कर सका। सवाल है कि मैं कैसे ज़ेबरा स्टाइल को प्रत्येक सेट (2) टीआर (पंक्तियों) एक कांटा है जहां पंक्तियों की हर जोड़ी स्टाइल होती है। मुझे कुछ भी देखने के लिए रंग संपादित करना पड़ा। आपको (4 एन + 1) और (4 एन + 2) का उपयोग करने की आवश्यकता है।

How to pass parameters to a proc when calling it by a method? (ruby) -

proc = Proc.new do | name | डालता है "धन्यवाद # {नाम}"! अंत डीईएफ़ उपज समाप्त proc.call # आउटपुट कुछ नहीं, बस ठीक proc.call ('भगवान') # = & gt; भगवान को धन्यवाद! धन्यवाद और proc # आउटपुट कुछ भी नहीं, भी ठीक; धन्यवाद और proc ('भगवान') # त्रुटि! धन्यवाद और प्रोकॉल ('ईश्वर') # त्रुटि! धन्यवाद कॉक। ('ईश्वर') # त्रुटि! # तो, अगर मुझे 'ईश्वर' को प्रो में भेजना होगा और एक ही समय में 'धन्यवाद' पद्धति का उपयोग करना होगा तो मुझे क्या करना चाहिए? धन्यवाद:) मुझे लगता है कि सबसे अच्छा तरीका है: def नेविगेशन नाम का नाम दें अगर ब्लॉक_ ग्वित हो? अंत

tsql - t-sql NOT IN with multiple columns -

I have a Microsoft SQL database, where I am trying to insert some data. I have a unique key on 4 columns and I want to insert data from several tables in this table, checking for data, to make sure it does not violate the key specification. If I was doing it on a column, I would not do it like this .. INSERT TABLE_A (FLD_1) SELECT FLD_1 to TBL_B Inner TBL_C at TBL_B.FLD_1 = TBL_C. FLD_1 Where TBL_B.FLD_1 (Select TBL_A.FLD_1 from TBL_A) Any ideas? Instead of dealing with many columns, use it instead of instead. Edit: Edit: Untested, but roughly this would be: TBL_B Select from interiors FLD_1 Join TBL_B.FLD_1 = TBL_C.FLD_1 at TBL_C (TBL_A from within TBL_A.FLD_1 selection but TBL_B.FLD1 = TBL_A.FLD1 TBL_B) for a multi-purpose It will be broadly examined by checking the column: FLD_1, FLD_2, FLD_3, FLD_4) Select TBL_B from within TBL_C at TBL_B.FLD_1 = TBL_C.FLD_1 where it does not exist (Select TBL_A.FLD_1, TBL_A.FLD_2, TBL_A.FLD_3, TBL_A.FLD_4 TBL_A INB at TBL_...

multithreading - C# Background Worker UI Update -

To get a large amount of data from the database without stopping the main thread, I try to use a background worker I am here. It works well, except that when it comes to updating the UI, the update will freeze the screen. The related code is as follows: Private Zero contains bw_RunWorker (Object Sender, RunWorkerCompletedEventArgs e) {lvwTest.BegginUpdate (); LvwTest.Items.Clear (); // UI foreach to population (test data in test data) {ListViewItem lvi = lvwTest.Items.Add (ti.Value1); Lvi.SubItems.Add (ti.Value2); } LvwTest.EndUpdate (); } The update takes approximately 2 to 3 seconds, for which the screen is locked. I know that only the main thread can update the screen, but is it possible to load this data in memory somehow (any other example in the background thread or any other list) and then display it? What I want to do is to program the program to refresh the data while not taking time in the main thread. "post-text" itemprop = "text"> I want ...

f# - How practical is it to embed the core of a language with an effectful function space (like ML) into Haskell? -

20 years ago, the effective function of languages ​​like MAL as the proposed mogi was in space - & gt; Standard total function space = & gt; Plus can be decomposed into capturing a strong mound T effect. A -> B to a => (TB) Now, Haskell supports MONADs, including an Io Monad, which is visible enough for the effects in MOL, and has a function space in which => (but partial functions in it also includes) . Therefore, we should be able to translate MAL fragments into Haskell through this decomposition. In theory I think that it works. My question is whether an embedding can be practical in this way: Is it possible to design the Haskell library, which allows programming in Haskell too far away from HSKL? And if so, what would be the performance? My criteria for "practical" is that with the widespread use of the effect, existing ML codes can be easily embedded in Haskell, in which the high-order function. To make this concrete, my own effort...

Using a Regex Back-reference In a Repetition Construct ({N}) -

I need to match that string which is the prefix with the length acceptable to that string. For example, {3} ABC will match, because ABC part 3 characters is long. {3} ABCD will fail because abcd is not 3 character long. Use I ^ \ {(\ d +) \}. {\ 1} $ (Capture a number N inside curly braces, then any character N bar) but it appears that the duplication The value of the construction should be a number (or at least, it will not accept a back break). For example, this is true in javascript: / ^ \ {(\ d +) \}. {3} $ / Test ("{3} ABC") While it returns false: / ^ \ {(\ d +) \}. {\ 1} $ / / Exam ("{3} ABC") Is it possible to do a single regex, or I have to split it into two steps: / ^ \ {(\ d +) \} / Testing ("{3} ABC") & amp; Amp; RegExp ("^ \\ {" + RegExp. $ 1 + "\\}. {" + RegExp. $ 1 + "} $"). Exam ("{3} ABC") Regular expression can not be calculated So, you can not ...

regex - Powershell -like expression from a SQL LIKE expression -

I have a table in my database that contains some columns that are used for expression of choice in SQL . I'm using those expressions to exclude certain SQL objects from processing. Now I am putting the same code in PowerShell, but I want to keep the column continuously. I need to do something on the lines of this: Where {$ someVariable-like $ myColumnData} There is no way to change a power Expression of an SQL in an expression like? I can write my own, but it seems that it seems difficult and error, so if a person has already worked, it would be good. For example, I would like to be able to convert like the following: % some string% - & gt; * Some strings * [0-9] Blah% - & gt; & Lt; I do not know what will happen here & gt; Blah% As a side-question, are any standard regex expressions allowed like PowerShell or is it limited? And * wildcard? Thank you! This is the same as a look at the wildcard characters for a parcel here:

YUI 2: Storage Utility - Why aren't key/vals persisted from page to page -

YUI 2 is trying to use the storage utility and followed the example that worked (on the same page) ); But when I make another page (say page 2.html) and try to use the key, then I come back for the price. So I call on Page 1: LocalStorageEngine.setItem ('TestText', 'This is a Victory (Local Storage Engine)'); And if I use getItem on the same page, I see it, but if I say page 2.html: Warning (localStorageEngine.getItem ('testText')); I was nullified back I thought that this was the point I included in addition to jQuery 1.4.2 in the following src = "http: //yui.yahooapis.com/combo?2.8.1/build/yahoo-dom-environment/johoo-dome-video.js & 2.8.1 / build / cookie / cookie- min.js & 2.8 1 / build / element / element-min.js & 2.8.1 / build / swf / swf min. Js & amp; 2.8.1 / build / swiftstore / swiftstore-min.js & amp; 2.8.1 / build / Storage / storage-min.js " Here my javascript code is big Part: //YAHOO.util.Even...

django - csrf_token cookie deleted by another site? -

I have a site that runs on 1.2.1, and once my users lose a lot of work because csrf_token Cookie does not exist and page errors come out with a 403 error on post. I've narrowed it down to another site (which is my users often) Cookie is removing me This site does with the ActiveX ClearAuthenticationCache command remove CSRF protection Area than any other problem? Thank you, Pete You can use the fact that cookies The required value is still present on the page, and use javascript to recreate the cookie before submitting. Hook on the submit button and add something like document.cookie = 'csrfmiddletoken =' + $ ("input [name = 'csrfmiddletoken']"). Val ()

mvvm - How to fire a Command when a window is loaded in wpf -

It is possible to fire the command to notify the window. Apart from this, I am not using any MVVM framework (framework, caliberon, onxi, MVVM toolkit etc. in the sense). To avoid code behind your view, use Interactive Library (System.Windows Interactivity DLL which you can download from Microsoft for free - also come with Expression Blend). Then you create a behavior that executes a command, in this way the catalyst says that he calls the command. & lt; Ia: interaction Trigger & gt; & Lt; Ia: Event Trigger Event Name = "Load" & gt; & Lt; Custombaviers: CommandAction command = "{Baid Showmess}" parameter = "I'm loaded" /> & Lt; / IA: EventTrigger & gt; & Lt; / IA: Interaction.Triggers & gt; The command-action (System.indows. interactivity is also used) can look like: Public Class Command Actions: Trigger Action & lt; UIElement & gt; {Public static dependency form commandproduct = dependency...

PHP - Set session within a function -

found (I think ...) a very simple problem: I set a session Simple position within the Function Function: I have received a login form After reducing the form, I call a function "login" which checks whether the user has been authenticated or No. If so, then a session should be set. Here are some very simple code: session_start (); Function Login () {$ session ['login'] = true; } If (isset ($ _ request ['dologin'])) {login (); // session has been set here, it works ...} if ($ session ['login'] === correct) 'you are logged' echo; But why does not it work? Thank you so much! You are using $ session , code> $ _ session

Need a ROT47 JavaScript Implementation -

I have received the following code to decode a ROT13 string and it has been inserted into a webpage with javascript: & lt; Script type = "text / javascript" & gt; document.write ( "string" .replace (/ [a-zA-Z] / g, function (c) {String.fromCharCode ((c & lt return; = "Z" 90: 122) & gt; = ( C = c .charCodeAt (0) +13) c: C6);})); & Lt; / Script & gt; I need a similar JavaScript code to decode rotate. I get some functions, but I do not know how to get it in the same script, so it Can anyone please help? Thanks a lot! / div> Just copy the necessary actions into your javascript. At the appropriate place, & lt; Script type = "text / javascript" & gt; Document.write (ROT47 ("string")); & Lt; / Script & gt; Required functions: // // ROTn.js - ROT13 and ROT47 to apply JavaScript code to ROT13 and ROT4. Useful for // Email address and telephone numbers from curious site craw...

checking the state of a window service through Java -

I am looking for a way to see the service conditions of windows through Java. With some basic searches through Google and it seems that there is no API to find Windows services in Java. Windows is running at the command prompt: sc \ some_host_name query "serviceName" I want to be able to run information in Java program and now I want to be able to parse the output I am Does anyone know a way to run Windows commands via Java? Looks like you need Java 5+. A quick example (based on the above documentation) To start a process: process p = new process builder ("Sc", "\\ some_host_name", "query", "serviceName"). Start (); The class provides ways to get the stream (and error) from the process - it's standard stream handling from there. Pre-Java 5 The way to do this is runtime .exec (). I did not really use ProcessorBuilder on Windows, if you have problems, leave comments?

Why does my .NET ActiveX control fail to register in Internet Explorer? -

I'm writing an ActiveX control to run in Internet Explorer. I am using C # and System.Runtime.InteropServices namespace. When I register the control manually on my development machine using regasm , the control works and I can apply its methods to javascript Using new ActiveXObject (..) functionality. However, for the purpose of producing, I will see the & lt; Object & gt; tag, and this is where I'm having trouble. ActiveX has failed to register DLL, and when I observe the ActiveX registration error message (using the code download error log viewer), I see the following: OSX registration: A DllRegisterServer entry point (path of my control.dll). Skipping registrations. Can anyone take me under this? Do my C # code need to do the DllRegisterServer action? Can the use of ActiveX controls developed in NSET like this be done in this way? Many thanks. If "production" means you public internet, and you want your page to be automatically c...