Tuesday 15 March 2011

python - Starting a browser in selenium -


I want to run a test with selenium. IE gives "modular error" after bringing IE 8 with this lesson "This is the initial start page for web server server":

  selenium import webdriver import time browser = webdriver.Ie () # Get the local session of IE browser.get ("http://www.google.com") # Load page time Sleep (5) browser.close ()   

So I tried Chrome. Selenium import web device browser = webdriver.Chrome () browser.get ("http://www.google.com") time.sleep (5) browser.close ()

and not the correct path for the chrome.exe application, Selenium errors Chrome has been installed as expected ... C: \ Users \ USERNAME% AppData \ Local \ Google \ Chrome Application \ chrome.exe

Here a little help would be appreciated.

Did you download?

To set up, first download the appropriate prebilt server, make sure that the server can be located on your path or the webdriver.chrome.driver system can specify its location through the property.

Then when you run

  selenium import web device browser = webdriver.Chrome () browser.get ("http://www.google.com") from time to time. Sleep (5) browser.close ()   

It should work.

visual c++ - "The value of ESP was not properly saved across a function call." even with LEAVE -


After

Trying to call a method that is defined in the assembly, I error "ESP Receiving the value of a function was not properly saved throughout the call. ", considering using Visual Studio 2012 other questions, a common factor is not to mention that the assembly could not The exit was going to be out of each label.

I am getting this error, but leave the code with the following code, which is not including .

  section .bss vs: resb 13; 12-byte vendor string + null four NS: Ridge 49; 48-byte proc global _meta_vendor global _meta_procname _meta_vendor Ktext name + minus four sections: Push EBP mov EBP, esp mov eax, 0h Seepiuaidi mov [v], EBX mov [vs 4], EDX mov [vs. + 8], ECX mov byte [vs. + 12], 0 hours mov eax, versus retired _meta_procname: push EBP mov EBP, esp mov eax, 80000002h Seepiuaidi mov [ns], eax mov [ns 4], EBX mov [ns + 8], ECX mov [Ns + 12], adx silent eX, 80000003 ccid mov [ns +16], ex mov [ns + 20], ebx mu [ns + 24], xx mu [ns + 28], adx Moaks AX, 80000004 H Seepiuaidi Moje [ns + 32], EX mov [ns + 36], Ibiaks MOU [ns +40] XX MOU [ns +44], ADX Mobi byte [ns + 48], 0 H Miaks AX , Ns replay write   

The function prototype for those labels is in a header file, which only contains:

  #include & lt; Cstdint> Extern "c" {char * meta_vendor (); Char * meta_procname (); }   

Any information Why am I receiving this error?

Note, if I click "Continue" on the popup that appears, then the expected value is displayed.

The problem was resolved by adding

push ebayx and pop EBX as shown below:

  _meta_vendor: push ebp mov ebp, esp push ebx; Code ... pop ebx leave leave    

jenkins - Get email with the diff changes from the last 'git pull' -


I have to get an email that will display the final change done by GIT. It should be well formatted like gitub (+ green, - red).

This is what I've done so far:

  1. Configure Junkins to check every 5 minutes, change the changes, and send an email.
  2. The 'Jenkins Email Extension Plugin' was installed, it was configured to work with a custom 'jelly' template, which also sends console output to email.
  3. I added a script to run 'Limit Show'.

    In this way, I get the output of 'Git Show' on the email every 5 minutes, if the code changes within this time.

    Whatever is missing is as follows:

    1. If two drawbacks come within 5 minutes, then it is only the last one. I think what the GIT show does, I need all the changes from the existing code, not all changes from the previous commitments.
    2. This is not well formatted. It's just a plain text

      I appreciate any help here. Thank you.

      git diff --color @ {tomorrow} (or whenever the last Bridges / differences were of interest) works well for me ...

wpf - ObjectContext in ViewModel (EF + MVVM) -


I am currently writing my first MVVM application which uses EntityFramework for data access. This application relies heavily on the underlying database and in many cases DB has to add new data.

However, I have uncertainty about whether this is a good idea that the object Konteks should see the modal. Like Public Class Somewhile Model: See Modellabase {Public INMereble & lt; Users & gt; AllUsers {Get; Private set; } Private Zero Certain Methods () {var __entities = New Databases (); AllUsers = __entities.Users.Where (...). ToList (); }

}

I have seen such solutions, but there are some questions to come up with. For example, how long the object syntactic remains, or if a single, global accessible object might like to present.

Or should call those who are not part of VM at the first place? At present, I can also imagine that implementing the same as Static Helper for each DB table and using methods like GetAllUsers ().

An application about MVVM in Josh Smith's sample that he injects into every VM constructor.

  Public AllCustomersViewModel (CustomerRepository customerRepository)   

Despite the fact that this should be a general problem, I have not received any satisfactory answer on this How has the issue been delivered to the small application (best practice)?

In this description of DBCText class on MSDN, so it should act as its repository layer , Although it is not, and it has to be used for "unit of work" which is not suitable for the entire app for a global use. Apart from keeping around for each one, there can be problems with cached data and other undesirable things (memory usage, etc ...).

Hope this will be helpful.

iphone - Voice Effects Ios SDK -


Tell me, is there any library Ios SDK, with which you can add effects to sound. This is necessary for the speaker's voice. This is something that has been said in the microphone, the effect of the headphone (speaker) is horned and transmitted.

Look at DSP, (Digital Signal Processing). It will not be easy because it is not complicated (have you ever heard about Fourier transformation?) Start by trying to give some feedback on the audio because you will learn what you want to do.

tl; Dr: There is no magic to do this without putting some time in it. Learning it

php - Updating multiple fields in table -


My question is what should I do instead of doing it

I am developing many online questionnaires with many questions and so many answers in each Q & A.

People can return to question by a certain date so that one can be added and many updates are necessary.

Does one normally check to see that the answer has changed since the data was read from the table or only the changes have been updated or all of the table shown on the questioner Change the data. For example, if a person selects radio button 1 instead of 2, then I must update all the fields

Justin

No, you can update a column at a time, for example, using a PDF statement, using

  $ Dbh = new PDO ("mysql: host = $ dbhost; dbname = $ dbname", $ dbuser, $ dbpass); $ Sql ​​= "Update survey 222 SET Question_43 = WHERE user_id =?"; $ Stmt = $ dbh- & gt; Ready ($ sql); $ Stmt- & gt; Execute ($ new_answer, $ user_id));    

javascript - Create the title sliding when hover mouse using Jquery -

This summary is not available. Please click here to view the post.

ios - Measuring tilt angle with CMMotionManager -


Suppose that the iPhone / iPad standing in front of you in front of the screen, in Portrait Orientation. You tilt the device aside, put the screen in front of you. How do you measure the stationary inclination angle using CMMotionManager? This is a simple question that should be a simple answer, yet I can not find any method that does not disappear in quadrangle and rotation matrix.

Can someone give me an indication of working for an example?

see gravity :

  self .deviceQueue = [[NSOperationQueue alloc] init]; Self.motionManager = [[CMMotionManager alloc] init]; Self.motionManager.deviceMotionUpdateInterval = 5.0 / 60.0; // uideware * device = [uidwise current device]; [Self. Motion Manager StartDevice MotionApp Upping Refrymem: CMTTTRAFRAMXrbitroxVertical To Quote: SophieDeviceWithHandler: ^ (CMDVicomotion * Motion, NSERR * Error) {[NSOperation QE Main Q} Adoption With Block: ^ {CGFlot X = Gwolta Gravity.x; CGFloat y = motion.gravity.y; CGFloat z = motion.gravity.z; }]; }];   

With this reference frame ( CMAttitudeReferenceFrameXArbitraryZVertical ), if z is near zero, then you land it with a plane straightened up (As if you were holding it against the wall) and as you rotate on that plane, change the x and y values ​​are vertical where x is near zero and y is close to -1.


Looking at this, I think that if you want to change this vector in angles, you can use the following algorithm.

If you want to calculate how many degrees from the vertical, then the device has been rotated (where the positive is the clockwise, the negative answer is), you can calculate it as:

  // This zoom rotates around the axis CGFloat angle = atan2 (y, x) + M_PI_2; CGFLOT ANGELGREGGE = angle * 180.0F / MPI in // radian; How often do the footage through   
         You can use it to find out alternately:  self.view.layer.transform = catersform 3 rotate (serration transform 3-dendenti, -roth radian, 0, 0, 1);   

(Personally, I update rotation angle in the startDeviceMotionUpdates method, and conversion in CADisplayLink , which decodes the screen updates with the angle update.)

You can see how you tilted it backward / forward:

  // This tilted forward and backward CGFloat R = sqrtf (x * x + y * y + z * z); CGFloat tiltForwardBackward = acosf (z / r) * 180.0f / M_PI - 90.0f;    

How to render json and at the same time refresh a partial using AJAX (Rails) -


I have a controller action (this is called some_controller_action) to get some JSN (to take Javascript) and at the same time Partial refresh / re-render using some_controller_action.js.erb

My code suggestion is something like this:

  def some_controller_action # # Too many codes here # response_to do | Format | Render: Jason = & gt; {: Some = & gt; Some},: position = & gt; : Ok format.html {redirect_to from somewhere} format.js End End   

Client side Ajax / JavaScript triggers this action and receives Jason as a response. It looks like:

  some CoffeescripAction = - & gt; $ .jax type: "post" datatype: "jason" data: some_data_name: some_data_content url: "some_url / some_controller_action" success: (data, status, xhr) - & gt; Do_something_with_the_response (data) error: (xhr, textStatus, errorThrown) - & gt;   

Of course this does not work, because I do not have permission to present it twice in one action. But then what to do?

What does your JavaScript look like? Do you receive the Administrator's action by AJAX? If so, all you have to do is wait till the AJAX call, and then trigger your partial re-order, either by simply using the received JSN data or by calling any other AJAX function.

ios - NSArray coming as null while object has value -


निम्न कोड मुझे पागल हो रहा है:

  - (शून्य) fetchEventDetails {NSData * JsonData = [एनएसडीटा डेटाविथ कंटेंटऑफURL: [एनएसड URL यूआरएल स्ट्र्रेडिंग: @ "http://domain.com/ios/read.php"]]; NSDictionary * dict = [एनएसजेएसओएनएसियालायजेशन JSONObjectWithData: jsonData विकल्प: NSJSONReadingMutableContainers त्रुटि: शून्य]; (आईडी ऑब्जेक्ट इन डिक्ट) {// एनएसएलॉग (@ "शहर:% @", वस्तु [@ "शहर"]); // NSLog (@ "शीर्षक:% @", वस्तु [@ "शीर्षक"]); // NSLog (@ "विवरण:% @", ऑब्जेक्ट [@ "विवरण"]); [_eventsTitles addObject: वस्तु [@ "शीर्षक"]]; [_eventsCity addObject: वस्तु [@ "शहर"]]; } NSLog (@ "अर्रे:% @", _eventsCity); }   

इसलिए यदि मैं लूप की पहली पंक्ति को कम कर देता हूं, तो यह सभी शहरों को प्रिंट करता है अगर मैं NSArray को प्रिंट करता हूँ, तो यह नल दिखाता है। दोनों ही .h फाइल में परिभाषित हैं, यानी इवेंटटिटल्स और इवेंट्सिटी। क्या हो सकता है?

मदद के लिए धन्यवाद

क्या आप _eventsTitles और _eventsCity कहीं और?

इसे आज़माएं:

  - (शून्य) fetchEventDetails {NSData * jsonData = [NSData dataWithContentsOfURL : [एनएसURL यूआरएल विथ स्ट्रिंग: @ "http://domain.com/ios/read.php"]]; NSDictionary * dict = [एनएसजेएसओएनएसियालायजेशन JSONObjectWithData: jsonData विकल्प: NSJSONReadingMutableContainers त्रुटि: शून्य]; _eventsTitles = [[NSMutableArray alloc] init]; _eventsCity = [[NSMutableArray alloc] init]; (आईडी ऑब्जेक्ट इन डिक्ट) {// एनएसएलॉग (@ "शहर:% @", वस्तु [@ "शहर"]); // NSLog (@ "शीर्षक:% @", वस्तु [@ "शीर्षक"]); // NSLog (@ "विवरण:% @", ऑब्जेक्ट [@ "विवरण"]); [_eventsTitles addObject: वस्तु [@ "शीर्षक"]]; [_eventsCity addObject: वस्तु [@ "शहर"]]; } NSLog (@ "अर्रे:% @", _eventsCity); }    

iphone - CGLayerCreateWithContext CGContext leak -


Why is this leak happening?

I do not like this idea very much to ask a question which is very specific and there is the possibility of helping many other people, but for a few hours of scratching my head Afterwards, I have not left any option.

The leaking tool reports that the following code leak occurs: / P>

  - (zero) such as abscondualoffholes {UIGraphicsBeginImageContextWithOptions (CGSizeMake (50.0f, 50.0f), Yes, 0.0 F); CGContextRef Reference = UIGraphicsGetCurrentContext (); CGLayerRef * Size Layer = Malloc (3 * size (* Size Layer)); (Int i = 0; I   

Specifically, it reports that the CGLayerCreateWithContext function is a problem but this object is leaking and not the objects, which it gives:

Leaks  leak

I doubt that my problem is due to the fundamental lack of understanding of memory management / dynamic allocation and anyone should know me 'this' finger because I There is no leak in the following code Is:

  - (void) No Lex {UIGraphicsBeginImageContextWithOptions (CGSizeMake (50.0f, 50.0f), yes, 0.0f); CGContextRef Reference = UIGraphicsGetCurrentContext (); CGLayerRef Shape Layer = CGLayerCreateWithContext (Reference, CGSizeMake (5.0f, 5.0f), NULL); CGLayerRelease (shapeLayer); UIGraphicsEndImageContext (); }   

Please note that this is clearly a problem in its simple copy-deferable state. I am using dynamic memory allocation because the size of the array in my actual code is not known at compile time.

I can not tell you why the Instruments reports that CGContext Objects are leaking, and not CGLayer , but

  •   shape layer [i] = CGLear crat vethacontax (reference, CGS immec (5.0 F, 5.0F) ), Nouel);   

    Definitely should be issued with

      CGLARLIZ (size layer [ii]);   

    and not

      free (shape layer [i]);   

    is not CGLayerCreateWithContext malloc , so calling for that code free can cause memory corruption .

  • Injecting a dependency via a maven plugin -


    I have a system that accepts plugins for users to add functionality to a management system plugin basically a There is just a zip file in the definitive format (i.e. the x file in this directory, y in that director). Currently I use the Maven-Assembly-Plugin plugin to create zip.

    The problem is that keeping all my plugins in sync and making others plug-ins are unnecessary because they require the right assembly Xml

    So I create a custom packaging type I'm trying to help developers build a plugin like this:

      & lt; GroupId> Com.example & lt; / GroupId> & Lt; ArtifactId & gt; Example & lt; / ArtifactId> & Lt; Version & gt; 1.0-snapshots & lt; / Edition & gt; & Lt; Packaging & gt; Plugin & lt; / Packaging & gt; // A standard type   

    This is mostly working but the ugly thing is that each plugin always relies on some APIs in the core system. So they are all basically the same dependencies.

    Is it possible to inject a dependency on the mozo user? It seems that it can not be:

    Comments were replied to:

    I have a very clear and simple solution. I am creating a "palm" project in which there are dependencies, and ask that the pod has been included as a dependency in the developer, it well resolves my problem because I centralize dependence in one place. And each "plugin" can cross the core API dependencies if they want to be very easy. a???? Mlathe March 27 '13 h 22:12

    value undefined while decoding json with jquery -


    I know there are already many questions related to this subject, but I have tried many of them but I am still Also unable to get the value

    I am using Reebok and I am getting the right response: -

      [{"id": 4, "comments": 1, "likes" : 5, "books": 3, "name": "steve"}]   

    but I'm not able to display them on the page. When I try to alert (data. Id) then I get undefined in the warning box. Here's my code: -

      $ Ajax ({type: "GET", url: "getdata.php", data: datestring, datatype: "Jason", success: function (data) {warning (data.id);}});   

    I tried

      $ Each (data, function (key, element) {warning (key); alert (element);});   

    This key shows as 0, but in the warning box as the object [object object]

    That's because your feedback is an array.

    Either

      success: function (data) {warning (data [0] .id); }   

    or only one object return

      {"id": 4, "comments": 1, "likes": 5, "books": 3, "name": "steve"}   

    or if you want to use an each array like

      $ Each (data, function (key, element) {warning (key); alert (element.id); alerts (element.comments); alerts (element.likes); ...});    

    git merge - Merging two repositories with the github API -


    is a method of merge into Okoku.

    Is this method (or some other)

    I tried:

      client.merge ('user1 / repo', 'master' 'User2: master')  

    / code>

    and

      client.merge ('user1 / repo', 'master', 'user2 / Master ')   

    But does this seem to work ??

    You can merge only the branches, the stock is not from the other, or if another is a thorn You can do this:

      repo = client.repository ('user2 / repo') system "git clone # {repo ['git_url']}" # this could be wrong, I Never has the directory system "GIT checkout # {branch}" system "GIT push git@github.com: user1 / repo # {branch}" client.merge ('user1 / repo', 'master', 'alt_branch')    

    SIGAR API: when to use gather() -


    I'm looking at using the SIGAR package to get some system statistics (calling it from Java) looking for different sections In sometimes, I see the 'gathered' routine. I can understand that this date should be asked to get information, and possibly things like calculation of throughput rates should be calculated. I do not understand who is going to be gathered? Programmer, or package itself? There is never a comment on Javadocs when collected () should be used.

    Can someone give me some general indication that I have to call it, and if so, when? Occasionally this cigar takes an object, not a second time.

    Comes to be a package - I have never had to gather every time I like the API CPU or Net interface data), the information will be updated in it.

    c++ - Multithreaded filestream -


    I am creating a client application that connects to a server, and in addition to other features, chat the server in a file Logs that rule violation can be penalized later.
    Unfortunately, in the application (at least) two formulas became necessary: ​​the receiver loop and the sender loop - timeliness is required by the server. This means, I need a securely secure solution for data logging in a file.
    This can happen, if threads send log information (at most) at the same time:

      Logfile.txt: Chat: Hello My name is Duke chat: Hell [Warning]: Hacker has my name John   

    You can inject one sentence to another. I do not want to do this like my std :: cout is similar to the output, but this is not so important.

    Question:

    1. How do I Std :: ofstream to log a data at a time?
    2. How do I check if the file was closed by another thread (or error)

      Bonus Questions: Can you solve the same problem for std :: cout ?

      There is no thread safety guarantee in standard currents

      Easiest solution is a mute X is to wrap any statement involving the stream.

        {std :: lock_guard & lt; Std :: mutex & gt; Stopped (gCoutMutex); Std :: cout & lt; & Lt; "This is a message" & lt; & Lt; Std :: endl; }   

      For a more accurate approach, especially a logger, the message should be a logging thread with the queue. When another thread wants to log, it only posts a message in the queue, and the logging thread will go through the queue and write everything on the disk.

    Matching or Sorting array rows in matlab -


    मेरे पास Matlab में अनुक्रम सरणी है:

      -60528084 -60780607 -60497166 -60750204 -60466187 -60719738 -60435147 -60689209 -60404046 -60658618 -60372884 -60627965 -60341661 -60597249 -60310378 -60566472 -60279035 -60535633 -60247632 -60504732 -60216170 -60473770 -60184647 -60442747 -60153066 -60411663 -60121425 -60380518   

    इस तरह से इस सरणी को सॉर्ट करने के लिए मुझे कोड / फंक्शन की आवश्यकता है:

      -60780607 -60750204 -60719738 -60689209 -60658618 -60627965 -60597249 - 60566472 -60528084 -60535633 -60497166 -60504732 -60466187 -60473770 -60435147 -60442747 -60404046 -60411663 -60372884 -60380518 -60341661 -60310378 -60279035 -60247632 -60216170 -60184647 -60153066 -60121425   < P> यह सॉर्ट क्या करता है उन पंक्तियों के मूल्यों से मेल खाने के लिए जो बहुत समान हैं। मान समान नहीं हैं, लेकिन लगभग समान हैं   

    आप उपयोग कर सकते हैं:

      [ms, ix] = sort (एम (:))   

    पूरी तरह से सूचीबद्ध सूची और मैट्रिक्स मी के रैखिक इंडेक्स दोनों को प्राप्त करने के लिए तो आप सॉर्ट किए गए इंडेक्स के संबंधित स्तंभ प्राप्त करने के लिए ind2sub का उपयोग कर सकते हैं:

      [r c] = ind2sub (आकार (एम), ix);   

    फिर उस सॉर्ट किए गए वेक्टर का अंतर और निकटता थ्रेशोल्ड सेट (10000 कहते हैं),

      proximity_threshold = 1e4; की आवश्यकता के रूप में% # परिवर्तन ind = (diff (ms) & lt; proximity_threshold)   

    फिर थ्रेशोल्ड की स्थिति का उपयोग करके अपना उत्तर फिर से बनाएं:

      n = 0; nn = 0; जबकि n & lt; numel (ix) n = n + 1; nn = nn + 1; कोशिश करें अगर इंड (एन) & amp; सी (एन) ~ = सी (एन + 1) ए (एनएन, सी (एन)) = एमएस (एन); एक (nn, ग (n + 1)) = एमएस (n + 1); एन = n + 1; अन्य एक (एनएन, सी (एन)) = एमएस (एन); एंड एंड एंड ए = 0-60780607 0 -60750204 0 -60719738 0 -60689209 0 -60658618 0 -60627965 0 -60597249 0 -60566472 -60528084 -60535633 -60497166 -60504732 -60466187 -60473770 -60435147 -60442747 -60404046 -60411663 - 60372884 -60380518 -60341661 0 -60310378 0 -60279035 0 -60247632 0 -60216170 0 -60184647 0 -60153066 0    

    ruby - Iterating through Dates in Rails -


    I am writing a method that uses the date according to a start and end date, and I Date is required. Something like this:

      start_date = 2013/03/12 end_date = 2013/11/20 # start_date to end_date. F | Can anybody please help me with this?  

    I have read this question, but they did not indicate how the date has been fixed. Repetition is in progress.

    What are you looking for? Use range operator .

      start_date = Date.parse ('2013-03-12') end_date = Date.parse ('2013-11-20 ') (Start_date..end_date) .each Do. Day | | End of the day    

    access list by index in django template -


    I am dynamically trying to use an index state in the list.

    {{allAppsList {{App.id}}. Link}}

    This is not working.

    {{allAppsList.0.link}}

    worked.

    This should be some grammar issue. I'm online Google, but nothing found useful.

    BTW: I want to do this when used in Java.

    int index = app.id;

    string link = app list [index] .getLink ();

    You can not do anything like this in a DJ ango template, but it is also not impossible .

    If you are really in this, you can make one. Implementation will be easy, just pass the list and index with your custom filter and do it properly that you will do with java .

    Start

    javascript - Imacros Eval function Small Help Required -


    Please help me with this

    This is the middle snippet of the whole script (number and starring) For reference only)

      1) Downloadable fodder = C: \ MyFile \ FILE = captcha.jpg WAIT = Yes 2) Tag Position = 1 Type = IMG ATTR = ****** * 3) ***** 4) **** 5) *** 6) SET! VAR1 {{EXTRACT}} 7) Tag status = 1 type = input: text form = name: CAPTCHABOX ATTR = ID: TokenText content = {{EXTRACT}} 8 TAG POS = 1 type = button ATTR = ID: Continue   

    then I want to check this element

      tag POS = 1 type = H1 = ATTR = TFT: Check   

    if it exists then the next line of code (step 9, 10 etc.) Other if it does not exist or does not give any error, then it should be between 1 to 8 F I want to repeat the lines and check again, if the element is absent then repeat 1-8 and move on to step 9 further.

    I think it can be used in the EVAL function Is it possible to provide the right code? I tried many times but failed.

    Ps - I'm probably pipping the entire script from .vbs. If possible, please provide the code which only IIM

    please answer

    Thank you very much

    Edit - this is mine. Vbs code is

      option blurry iim1, i, s, shell dim iret dim myname, mepath dim pause iman iamacros example set iim1 = CreateObject ("iMacros") 'i = iim1.iim Open ("-fx", incorrect) 'available IFI = iim1.iimOpen ("-fx", true))' Always open new installation status = 2 while status & lt; 5 iret = iim1.iimSet ("loopVar", Cstr (pos)) iret = iim1.iimPlay ("ecc2.iim") set shell = createobject ("wscript.shell") shell.Run "% comspec% / c: \ Users \ SDFL \ Desktop \ dc1.bat "pos = pos + 1 loop   

    Please tell me how can I do this without disturbing the main loop and the bat file?

    You can not do it in a pure IIM script because it does not have the capability to loop code inside the code. . You have to manage looping and verification in Javascript or the main VBS code, but not with eial inside the IIM code

    Google Calendar: freeBusy giving error "notFound" with one account but not another -


    To stop I am using a Google Apps for Business account and I have 2 accounts test1@mycompany Com and test2 @ Mycompany.com

    After this I have an API email that is registered at test1@mycompany.com in the API console, which I will call on ##### @ developer.gserviceaccount.com

    The query is a simple one, I just have time & amp; Time Max & amp; With ID, I send it 2 items using the Java Client API

    The first query with GoogleAuthorizationCodeFlow and using test1@mycompany.com

      {" Kind ":" calendar # freeBusy "," Timemin ":" 2013-03-26 T 22: 50: 16.501 Z "," Time Max ":" 2013-03-26 T 22: 50: 22.501Z "," Calendar ": {" Test1@mycompany.com ": {" busy ": []}," test2@mycompany.com ": {" busy ": []}}}   

    I'm about to use another authorization method (Receiving error "notFound")

      GoogleCredential.builder () .setServiceAccountId ("##### developer.gserviceaccou Nt.com ") .setServiceAccountPrivateKeyFromP12File (" key.p12 ") and (). ATC () {"Type": "Calendar # Freebusy", "Timemin": "2013-03-26 T 22: 19: 14770 Jade", "Time Max": "2013-03-26 T 22: 19 : "", "Calendar": {"test1@mycompany.com": {"busy": []}, "test2@mycompany.com": {"Errors": [{"domain": "global", "Reason": "NotFound"}], "Busy": []}}}   

    While access to test1@mycompany.com test2@mycompany.com ##### @ deve Loper.gserviceaccount.com can not get it, why is it not that these two actually share the same account? #####@developer.gserviceaccount.com is associated with test1@mycompany.com. Test2@mycompany.com The calendar is set to share (the first query is clear) and I do not know why the developer account does not have access to that business.

    I hope to have a similar result like you, but an error while using service_account credentials Meets. The solution for me was to go to the calendar sharing page and to explicitly share my calendar with the email address #####@developer.gserviceaccount.com.

    objective c - NSFetchedResultsController Freezing UI -


    I'm having trouble using NSFetchedResultsController, where I can not stop it from freezing the UI. It is initially quick but when I stop any mistake, then the table gets accumulated when scrolling the view. I am using only 8 elements for testing and using StackMab for my back end.

    Here is where I declare NSFetchedResultsController

      - (NSFetchedResultsController *) fetchedResultsController {if (_Fadeed Results Controller! = Void) {Return _ Fetch Result Controller; } NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription * entity = [NSEntityDescription EntityForName: @ Managed object contact in "post": _managedObjectContext]; [FetchRequest Set Entity: Entity]; NSSortDescriptor * sort = [[NSSortDescriptor alloc] initWithKey: @ "created" ascending: no]; [Set FetchRequest SourceScripter: [NSArray arrayWithObject: sort]]; NSFetchedResultsController * theFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest: fetchRequest Managed ObjectCorrect: _managedObjectContext sectionNameKeyPath: zero cachename: zero]; _Feleted Results Controller = The Fractal Result Controller; Return _fetted result controller; }   

    And here is my view deedload:

      - (zero) viewDidoadload {[Super Viewedload]; UIColor * backgroundImage = [[UIColor alloc] initWithPatternImage: [UIImage imageNamed: BACKGROUND_IMAGE_TAN]]; [[View Yourself] setBackgroundColor: backgroundImage]; [[Self tableview] Setshipper style: UITTualWeekal SeparatorTestylonon]; _managedObjectContext = [[self.appDelegate coreDataStore] contextForCurrentThread]; NSError * error; If (! [Display the self-brought results controller]: & amp; Error] {// Update NSLog (@ "Anisolal Error% @,% @", Error [Error to handle error correctly] User Info]); Abortion (); // Fail}}   

    And here's my cellphone write index:

      - (UITableViewCell *) TableView: (UITableView *) Table View CellForouaitindPath: (NSIndexPath *) IndexPath {static NSString * CellIdentifier = @ "CCCell"; CCEL * cell = (cccl *) [tableview decomputer reusable cell with identifier: cell identifier]; If (cell == blue) {NSArray * topLevelObjects = [[NSBundle main bundle] loadNibNamed: @ "CCCell" owner: zero option: zero]; Cell = [top level object objectatting index: 0]; [Cell Settleatet: Self]; [Cell setSecurityist Style: UITTWewsSellsStylean]; } Post * Post = (Post *) [_ fetchedResultsController objectAtIndexPath: indexPath]; // // If I UNCOMMENT this line unlocks this UI // / NSLog (@ "% @", [Post Value Forex: @ "value"]); Return cell; }   

    Where I am applying the specified line it scrolls very slowly

    I have tried to circumvent the call with calls like this

      sending_field_tcardettrad = dispatch_qu_credit ("com.YourApp.YourThreadName", DISPATCH_QUEUE_SERIAL); Dispatch_Associate (CoreDatthread, ^ {Post * Post = (Post *) [_ fetchedResultsController ObjectAttendAxpath: IndexPath]; NSLog (@ "% @", [Post ValueForcowi: @ "Price"]););   

    But then it takes a long time 20 seconds or so

    < P> Set a fetchBatchSize on your fetched request, the number of the onscreen in your table will be equal to it will save the entire dataset to load cacheName on See also NSFetchedResultsController documentation.

    Your [[self.appDelegate coreDataStore] contextForCurrentThread] looks suspicious, by the way. This UI code will be executed on all major threads, so asking for another object is not nearly necessary to build counter-thread MOC.

    Your GCD code is incorrect because now you are talking to the main UI thread and your GCD coreDataThread same NSFetchedResultsController , thus two threads one He is talking to MOC.

    If you were never surprised by core data performance.

      -com.apple.CoreData.SQLDebug 1   

    As a command-line argument enabled through a schematic editor.

    encryption - Standard format for digital signature -


    I want to create a JavaScript library to sign messages. I look forward to having something like format ...

      --- BEGIN signed message --- this is a plain old message, it's on and on ... --- BEGIN RSA OF SHA1 --- Base64Stringassfd86asdf870n8 09as8d76fn098 == --- END Signed Message ---   

    But I do not know the correct format. I can repeat the PGP format (I'm sure it is not hard to find information on it), but I like to use a standard method if someone is there.

    Is there a standard format for this type of signature?

    (aka PKACS # 7) is a commonly used format for signed data This payload content It also supports encryption and authentication, so it is a bit of a uber-format. The downside is the complexity of implementation - you can be tired to trawl with you and you have to work comfortably with ASN.1.

    and the human eye is more likely to be more readable (there is no ASN.1 to be seen) This can be the best bet for simplicity, then you will have to have an encryption However, if you want to do so, the specification can be equally worthwhile to work - I had ever encountered an RFC ... before imprecise.

    java - Passing a vector of integers to two separate functions but altered data gets passed to the other functions -


    * Update: The solution was a deep copy, thanks for the help

    I used a vector I am going to simulate some sorting algorithm integer, when I insert the numbers to the vector vector and rotate the order and pass it to a sorting function, if I give the zero vectoring vector the same vector, If the vector is sorted in the function then this The first new sorted vector is passed on to the function after it because it has already been sorted. I can not show the sorting process, for example in my lower code

      @SuppressWarnings ( "Uncheck") // int_vec Public ATV vs. CreateVec (int array_len) {vector & lt; Integer & gt; Int_vec = new vector (array_len); Int temp_int = 1; Int low_bound = 0; Int high_bound = array_len - 1; {Int_vec.addElement (temp_int) for (Int i = 0; i & lt; array_len; i ++); // Create a vec in relation to array LAN temp_int ++; } collection. Shuffle (int_vec); System.out.println ("oz vec:" + int_vec); // Original vector (random order) BubbleBurart (int_vec, array_len); // send int_vec to Bubble Sort InsertionSort (int_vec, array_len); / /   

    , my question is as follows, I have given my test vector (int_vec) randomly ordered elements How can I continue to send along, sorted vectors for other algorithms, note that I have implemented these algorithms correctly, if I comment on the function call of other algorithm function, then this Works.

    int_vec with new vector & lt; Integer & gt; Copy (int_vec) and pass in the copy for your sorting methods. In this way, only the copy will be resolved, and int_vec will still be ordered randomly, and will be ready to copy again for the next sorting method.

    And yes, this is a shallow copy, but does not require a deep copy.

    laravel - Inserting one to many relationship -


    मेरे पास तीन टेबल हैं: ब्लॉग, पोस्ट, ब्लॉग_पस्ट यहां मेरा कोड है।

      $ post = new post (); $ Post- & gt; title = HTML :: निकाय (इनपुट :: प्राप्त करें ('शीर्षक')); $ Post- & gt; सामग्री = इनपुट :: मिल ('सामग्री'); $ Post- & gt; स्थिति = जारी ($ _ POST ['save'])? 2: 1; $ पोस्ट & gt; बचाने (); $ ब्लॉग = ब्लॉग :: जहां ('user_id', '=', एथ :: उपयोगकर्ता () - & gt; आईडी) - & gt; पहला (); $ पोस्ट = $ ब्लॉग- & gt; पोस्ट () - & gt; डालें ($ पोस्ट);   

    और मुझे मिल रहा है:

    SQLSTATE [23000]: इंटिग्रिटी बाधा का उल्लंघन: 1062 कुंजी 'प्राथमिक' के लिए '47' डुप्लिकेट प्रविष्टि < / ब्लॉकक्वाइट>

    मेरे पास कई संबंध जहाजों में से एक है एक पोस्ट कई ब्लॉगों से संबंधित हो सकता है।

    पर 13 जवाब सही है

    आपकी टिप्पणी के अनुसार आपको ये होना चाहिए:

      $ पोस्ट & gt; has_many_and_belongs_to ( 'ब्लॉग'); $ ब्लॉग & gt; has_many_and_belongs_to ( 'पोस्ट');   

    इसके साथ कई रिश्ते बनाने के लिए, आपको संलग्न करना चाहिए () । उदाहरण के लिए:

      $ post = new post; $ Post- & gt; title = "Foo Bar"; // ... $ post- & gt; सहेजें (); $ User = Auth :: user (); $ ब्लॉग = $ उपयोगकर्ता- & gt; ब्लॉग () - & gt; पहले (); $ ब्लॉग & gt; पदों () - & gt; ($ पोस्ट) देते हैं;   

    निरीक्षण: मैं एक से अधिक ब्लॉग से संबंधित पद की अवधारणा को काफी समझ नहीं पाया।

    backbone.js - Marionette view's Handlebars template compiled once before use -


    I am using Toggle Handlebar with Marianette. The composite view template is defined as:

      template: function (serialized data) {var templFn = Handlebars.compile (myTemplateDef); This return.templFn (serialized data); }   

    In Traditional Backbone with Handlebar, it is suggested that each time we present the scene, it is suggested not to compile the template, but the compiled template is given Instead of storing it in the form it is compiled only once. Reservations on resources:

      templFn: Handlebars.compile (myTemplateDef), render: function () {var serializedData = this.model.toJSON (); ... this. $ El.append (this.templFn (serializedData);}   

    But the context of the template in the merriet case is window and I do not control how / When the template is called.

    So the question is: Given that we do not want to create a global conflict window.templFn in the case of a marinenet, One way to separate from using?

    Merriet is a handler plugin:

    It completely Not at all, but you should at least be able to see how they are controlling the collection of templates.

    In general, the Merient is a Mirianet Renderer And Merineet template cache allows the object to be compiled once, and only once, and that cached template is sung again with compilation.

    javascript - jQuery Flot: change line color at threshold / coordinate -


    I am thinking that it is possible to change the color of a line in Flot when it is above / below a threshold A smooth transition / gradient gets better, but if it is sudden, then I think I can live with it.

    Here's a quick example of how I want to see a graph:

    Enter image details here

    You can not get smooth transitions, but you Suddenly people can get it.

    .net - "variable".Bounds.IntersectsWith -


    How can I do my while looping my code while z is a variable?

      function (by zilla as an object) z.Location = zloc z.Hide () zloc = new point (random number (placepace width), random number (placepace.hite)) Zloc.Y & gt; 595 then zloc = new point (random number (placepace width), random number (placepace.heat)) if z.location = zloc while z.bounds.intersectswith (PictureBox1.Bounds, PictureBox2.Bounds, PictureBox3.Bounds) zloc = New Point (Random Number (Placepace Width), Random Number (Placepace.Hite)) z.location = zloc Loop z Location = zloc z.Show () Return (Z) and Function   

    The problem is that I can not use ".bounds.intersectswith" on a variable.

    Your problem really comes from the fact that to z to Object has been declared as the . Object does not have any properties (okay, only really basic). This is definitely not a border property or method, so you can not use it.

    What you have to do is declare it to be z in the actual type (whatever is in your code) and you will be able to use your properties. Otherwise, if you really need to use the object as a logic in your method, then you enter z in the right way in the method, CType (Z, TypeOfZ)) .

    With my code, I agree that there is a bounding box of some sort of z ? Anyway, you should declare it as a method, such as

      create a function (bivol jade bounding box) ... if z.Bounds.IntersetcsWith (...) then. . End ... and Function    

    actionscript - YouTube Video Player Rendering Problems In 2011 Samsung SmartTV Devices -


    My team and I am preparing a video-based app for Samsung Connected-TV and Blu-ray players, and We were thinking that if any one has gone into similar graphic rendering problems which we are doing with the YouTube player, that is, if we try to create an instructional support popup panel on the player window while playing a video game, then Popup a bizarre user Under the experience, the video will be scattered in the form of render. Similarly, sometimes the YouTube video player does not render the progress bar completely, but instead appears as a hole in the left part, then partially presents video plays and markers with the progress bar The progress is on the right. [Please note: these issues are not compatible with Samsung, nor are they only in the 2011-2012 TV and Blu-ray players in any 2012 Samsung device.]

    These devices In terms of self and their runtime support, we are investigating this:

    Samsung Smart TV and BluRay (2010 and 2011): Flash 8.0 / Flashlight 3.1 / Action Script-2.0 < P> Samsung Smart TV and BluR (2012 and 2013): Flash 10.1 / Action Kript 3.0

    Thanks a lot for any insights or suggestions for the attack on these issues.

    I have also seen this problem. This is just another bug and Samsung probably will not cure it as AFAIK, they only provide this type of support for the current (2013) and previous (2012) year devices.

    The last hope can be an alternative solution. Try to create a code filled with a transparent rectangle on the affected area, and then force it to fill the color again. Other such hexes may also be helpful.

    PS: The fact is that Flash is not the most popular way to build your application, even in future, the firmware update also makes the chance to get around 0.

    css3 - CSS Resizing based on key variables -


    I have created a dynamic size grid layout that can be resolved with resolution of any size (phone, tablet, desktop) and Being able to handle resizing, being all pixel-lower (sorry, I'm an OCD - and I say "pass" because my math is still broken and you have two equal sizes inside a strange size container without padding Can not fit the elements of 1px on one side)

    Anyway, there is a link to the bottom I have hacked together with Javascript. This is an example that I am trying to pull

    There is some ugly manual javascript that has been placed in the corner, but still is ugly javascript which can be used in all genres Counts.

    So my question ... can I link it with CSS? Or too much CSS and much less javascript? And this means that there are dynamic shaped cells based on the width of the screen?

    Here are the business rules:

    • Maximum cell width: 320px
    • Minimum # cells per line: 2 < Ul>
    • This can be impossible with CSS, so I'll be fine with the minimum cell for Chrome on the width of the minimum cell: 178
    • Cell range: 5px with 2px framework
    • Visible margin between cells: 3px (margin is actually 5px but outline bleeds out)

      This example , I'm highlighting cells every time resizing, but my angular version, I believe that is updated only styles. He said, maybe I can re-create a table on the shape, but I have to calculate only the cell width based on the width of the document, and well ... I would not be thrilled to use a table = [

      - wide rant

      Media queries

      You can get close to a CSS-only solution.

      The main concept here is using different layout grids based on browser width, which can vary the number of columns.

      Media queries are the natural CSS method of changing layout based on browser width. And they do not need javascript. If you use a set of media queries - each one targets different browser widths - to control which layout grid is used, then all grids should be responsive - in each column Content width to fill percentage width, and column width.

      Responsive design

      The question is: Is it possible to automatically spread each piece of content to fill the column, using CSS alone Tax? It depends on the type of content, how it spreads when the behavior occurs, and if there is a place to compromise with graphic design.

      Typically, the graphic design for a responsive website should suit the boundaries of responsive design (which is possible with graphic designers and which is not a big idea). But ... which can not be done automatically, can be done using Javascript.

      The relevant search terms: Responsive design , adaptive content , P> Note: In this case "column" can mean the percentage width used for initial containers for each piece of material in general. It does not mean "physical" columns in the traditional sense.

    java - How do i get a Report from jasperserver? -


    Please help me fix it, I really do not know! Please

    / * - To change this template, select the tool. Template - and open the template in the editor. * / - Package PDF Print;

      Import com.jaspersoft.ireport.jasperserver.JServer; Import com.jaspersoft.ireport.jasperserver.ws.WSClient; Import java.util.HashMap; Import java.util. *; Import net.sf.jasperreports.engine.JasperPrint; Import net sf.jasperreports.engine.jasperreport; Import net sf.jasperreports.engine.export.JRPrintServiceExporter; Import net.sf.jasperreports.engine.export.JRPrintServiceExporterParameter; Import net.sf.jasperreports.view.jasperViewer; Public class PDFPrint {/ ** * @ Ultimate Command Line Argument * / Public Static Zero Main (string [] ARG) {// TODO code application logic here {JServer Server = New JServer (try); Server.setUrl ("http: // localhost: 8080 / jasperserver / services / store"); Server.setUsername ("jasperadmin"); Server.setPassword ("jasperadmin"); Resource Descriptor rd = New Resource Descriptor (); Rd.setUriString ("/ solucisv3_testing / jr_testing_print"); WSClient Client = New WSClient (Server); List list = client.list (RD); Map Parameters = new Hashmap (); Params.put ("Plb_Company", "Company"); Params.put ("Plb_Address", "Address"); Params.put ("Plb_Title", "title"); Params.put ("PCondition", "SELECT * v_doc_ticketing from WHERE f_doc_no = 'MYCSB0000096'"); JasperPrint printer = client.runReport (RD, Parameters); JasperViewer.viewReport (printer, wrong, locale.jerman); JRPrintServiceExporter Exporter; Exporter = New JRPrintServiceExporter (); //exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp); Exporter.setParameter (JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean FALSE); Exporter.setParameter (JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean. TRUE); exporter.setParameter (JRPdfExporterParameter.PDF_JAVASCRIPT, "this.print ({Bui: false, bSilent: True, bShrinkToFit: true});"); Exporter.exportReport (); } Hold (Exception Pre) {}}}   
    • I have some error in this list list list = client.list (rd);

    • Error code = apply any appropriate method (pdfprint.ResourceDescriptor) method WSClientklist (string) list (actual argument pdfprint.ResourceDescriptor method to convert string invocation conversion it can not be done) method WSClient .list (com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor) apply (real argument pdfprint.ResourceDescriptor com.jaspersoft.jasperserver.api.metadata.xml. Domain.impl can not be changed.

    • and JasperPrint printer = client.runReport (RD, Paramet , List);

    • There is only one error

    • Error code = no appropriate method runReport (pdfprint.ResourceDescriptor, map list) method got WSClient.runReport (com.jaspersoft.jasperserver.api.metadata. Xml.domain.impl.ResourceDescriptor, map, list) is not the applicant able method WSClient.runReport (com.jaspersoft.jasperserver.api .metadata.xml (real argument pdfprint.ResourceDescriptor method can not be changed in com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor by invocation conversion). Domain.impl.ResourceDescriptor, map) is not applicable (actual and formal logic variations vary in length)

      If you are passing a pdfprint.ResourceDescriptor instead of com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor .

      In your IDE, you have accidentally created a ResourceDescriptor class in your current package instead of importing an existing code. If so, remove the class from your package only and Add an import statement for the correct, make sure it is on the classpath for your project.

    r - Error with ggplot2 mapping variable to y and using stat="bin" -


    I am using ggplot2 to create a histogram:

      geom_histogram (AES X = ..), y = "..ncount ../ sum (..ncount ..)")   

    and I get an error:

     < Maping a variable for code> Y and using stat = "bin" With stat = "bin", it will try to set the value of y to count the cases in each group. This can lead to unexpected behavior and will not be allowed in future versions of ggplot2. If you want to represent Y counting of cases, use stat = "bin" and do not map a variable for y. If you want to display values ​​in Y data, use stat = "identity" for example? View Geom_bar? (Dissolved; last used in Version 0.9.2)   

    What is the common reason for this? I'm confused about this error because I'm not doing a variable mapping for y , just histogram-ing x and the height of the histogram strip is the normalized fraction Would like to represent the data (such as collecting all the time heights are 100% of the data part.)

    Edit : If I make a plot of density I want geom_histogram E>, do I use ..ncount ../ sum (..ncount ..) or .. scaled .. ? ? I am not clear about the .. scaled .. .

    Confusion is a long time ) That all begin with stat_bin .

    But users generally do not know that their illusion revolves around Stat_bin , since they usually have geom_bar or When facing problems using geom_histogram . Note the documents for each: They use both stat = "bin" by default .

    But we back it up geom _ * controls the actual rendering of data in any type of geometric form stat_ * just your data It changes. In practice, it is a bit misleading, because by adding a layer of stat_bin , by default, call geom_bar and therefore it may seem indistinguishable from geom_bar .

    In any case, consider the land like "bar", histogram and bar chart. Both are clearly going to include some binning of data somewhere along the line, but our data can either be pre-summarized or not, for example, once we can take the plot from here: < Pre> xaaabbb

    or equivalent

      xya 3b3   

    not done yet The second pre-bidin is the default behavior for both geom_bar and geom_histogram assumes that you have not your day Security has been pre-Bain so they will default to stat_bin try to call your x values.

    According to the warning, it will then attempt to map to y for the resulting numbers for you, if you also to y Try to change the map to any other variable, so you have a dragons area here. For the functions of the variable returned by stat_bin ( .. count .. .. , etc.), the mapping y should be corrected and that warning Do not throw (this does not use the example of ME for me).

    The move here is that if you pre-calculated the heights of the bars for geom_bar , then always stat = "identity" Remember to use geom_histogram is not very likely that you will pre-compute the box, so in most cases you y to y to <> stat_bin .

    geom_dotplot uses its own Binny State, stat_bindot , and this discussion also applies here, I believe. This type of thing is generally not a problem with cases of 2d Binings ( geom_bin2d and geom_hex ), because there is not much flexibility available in the form of analogy Show the Z variable in the 1D case y in the variable. If future updates allow for more fancy joints of 2D Binning cases, then I think that you have to see something there.

    Save, Delete, & Manage the Google Hangout Video Calls by using API? -


    I would like to know, whether we save, delete, and. Manage Google+ Hangout video calls using the API? If so, I know which API is?

    It really depends on "save, delete, and manage", but in general The answer will not be there.

    It is used only for apps running in their own hangout. You can manipulate some of the video streams, but there is no way to access the video directly.

    If you are running it as a Hangout On Air, you may be able to use it as you want the recording you want.

    c# - How can I read the mp3 into bytes array -


    I want to use NAudio with MP3FileReader object to read the bytes array in MP3, then I Spectrum analyzer will attempt to fft, but I can not find any document about its method. Do you have any suggestions or any examples?

    A file will be read in byte array:

      var bytes = File.ReadAllBytes (file name);    

    java - Need help on deleting a binary search tree node -


    This is a grade 12 assignment. One of the questions asks us to write a method in the BTRE class which takes a BNDD or integer, and removes the node from the tree.

    Here's what I have tried:

      Public zero deletion (betode B) {if (b == null) {return; } If (B.Left () () == Null & amp; B.Brite () == Faucet) {B = Null; } Else {//System.out.println("boiboi "); BNode tmp = b; B = Null; Add (tmp.getLeft ()); Add (tmp.getRight ()); Tmp = null; }} Public Zero Deletion (Int v) {//System.out.println("gord "); Delete (think (v)); }   

    Find here and find the method that I think is right:

      Public BNode (int v) {return find (v, root); } Public BNode Search (int v, BNode branch) {if (branch == null} branch.getVal () == v) {Return Branch; } If (v & lt; branch.getVal ()) {return search (v, branch.getLeft ()); } Else {// else if (v> branch.getVal ()) return search (v, branch.getRight ()); }} Add Public Zero (Int V) {if (root == null) {root = new BNode (v); } And {add (v, root); }} Add Public Zero (Int v, Beanode branch) {if (v == branch.getVal ()) {return; } If (v & lt; branch.getVal ()) {if (branch.getLeft () == faucet) {branch.setLeft (new BNode (v)); } Else {add (v, branch.getLeft ()); }} Else {if (branch.getRight () == faucet) {branch.setRight (new BNode (v)); } Else {add (v, branch.getRight ()); }}} Add Public Zero (Bnode N) {if (n == null) {return; } Add (n.getVal ()); }   

    Here is my test class:

      BTree bTree = new BTree (); BTree.add (50); BTree.add (60); BTree.add (40); BTree.add (35); BTree.add (55); BTree.add (45); BTree.add (51); BTree.delete (60); BTree.display ();   

    The output is still everything I have added: 35 40 45 50 51 55 60 Even if I tried to remove 51 which is the easiest case, still Any help or suggestions of the same output will be appreciated, thanks.

    In three cases you should take care

    1. If this is a leaf, then go ahead and delete.

    2. If a node is just 1 child, just connect your child to your parents [you will need some helpful methods to get it clearly]

    3. If a node has 2 children, then find the smallest element in the right subtree. And place its node in the current node and delete that node.

      More info here.

    haskell - Fake key presses using XHB -


    I am trying to emulate key presses using XHB and XTest using it as a reference, unfortunately From, whatever I did, as a result the program has no effect. No exceptions, no warning, no warning.

    Any thoughts?

    I am using XHB 0.5.2012.11.23, GHC 7.4.1 at Ubuntu 12.04.

    What has got so far:

      import control. Import import. Import import graphics. Xhb import graphics XHB.Gen.Test Main = Just C & LT; - to connect keycode = 38 - forever fake INPUT C $ MKFakeInput (toBit 'EventMaskKeyPress) keyCode 0 (fromXid xidNone) 0 0 thread $ 1 * 1000 fakeInput c $ MkFakeInput (toBit' EventMaskKeyRelease) keycode 0 (fromXid xidNone ) 0 0 Thread $ $ 1 * 1000 tobit ':: (Bitumen A, Integral B) = & gt; A - & gt; The point here is a little subtle if you see that the 'point' it does not require you  FAKE_EVENT   EVENT_MASK , but instead a  FAKE_EVENT_TYPE  is expected  key and press  to  FAKE_EVENT_TYPE   2  while  KeyRelease  is  3 . These values ​​required things work as  EventMaskKeyPress  and  EventMaskKeyRelease  Location (Also, you dirty  toBit  rape Not necessarily, which was the smell that used to point me towards this wrong).   

    google cloud storage download for IOS/Android App -


    To download a single large file in the form of a single thread and to download all of the Google Cloud Storage downloads together The way.

    Yes when downloading an object from Google Cloud Storage, you can specify a byte range that you can want to recive. Using the XML API, it will be handled through the "Range:" header. This is useful for resuming interrupted downloads, but it can also be used to download files with multiple threads.

    Here are some documents for formatting the parameters of this category:

    and documentation for the object call received here, range header: < / Html>

    ruby on rails 3 - Better logging from Capybara/RSpec? -


    I have a really hard time checking the cause of the test failure I am a very experienced programmer and the general debugging I am well aware of the techniques, but I am new to Capepara and RSPEC, so I am hoping that there is such a facility which I am unaware of that can help me.

    In short , I have such a test:

      expectation {clicks ('.fake_button'); Sleep 1}. To change {Click.count} .by (1)   

    When a simulated button is clicked, it creates an AJAX call to the rail app, except for other things A click record for the database. I can think of dozens of things that can fail this test and only get limited success in getting information out of logs. The tests are not unsuccessful in development and it only fails in a tiny manner in the test. One of the difference in the test environment is that in our server the tests against a server in the cloud are run on our servers, so there may be a network delay with other possible issues.

    It's too much to diagnose It is difficult because very little information is coming from the unsuccessful test and certainly all database information is removed from time to time about the failure of the information. I know that the clicks.count has not changed in the test and I can assume that click ('.fake_button') succeeded, but server time sync The reason I can do 'is also not to ensure that the click was done on the right button or the AJAX call was removed.

    There are a few tools to help me follow the case of this test in the web server logs (for example using automatic URL parameters), what Capra has done, and about it Detailed logging web page, such as when failure occurred, with cookie values. Can I get any of these? anything like that?

    CAPEBARA limits human activities. What exactly is the test code necessary to expect it to be some real user needed. I do not think you should complain about the code.

    I think it is okay to increase the wait time, say 1 to 2 because of your network delay, but it should not be more than the fair value otherwise the app does not work as a relatively real user.

    To debug the capepara code, I have summarized three ways:

    1. Add the "save_and_open_page" to the place you want to see results Then a saved HTML page will appear during the trial. (I forget that the "lawns" gem should be added)

    2. Set this test to be set as a JS to see this test temporarily.

        Scenario "A mock exam", JS: True # code ends here   

      By doing this, a real browser will pop up and capebara How will you show you how this code plays?

    3. Just run $ tail log / test.log to show what happened.

    javascript - How to avoid automatic refresh of page in jsp after it is submitted -


    I have a button in the JSP page, after clicking on the button, the page is submitted and then some are recognized And finally a pop up is displayed.
    However, when the button is clicked, the page gets refreshed.

    How can I avoid this?

    My code:

    jsp file:

      & lt; S: a href = "#" Accesskey = "w" onclick = "Upload ('Check Withdrawal')" & gt; & Lt; Img src = "../../ KY / images / normal / button / scheme_specialists" alt = "return scheme button" style = "border: none;" / & Gt; & Lt; / S: One & gt; & Lt; S: If test = "# request .allowwithdrawPlan! = Null" & gt; & Lt; S: Include value = "ConformationPopup.jsp" />   

    JS code:

      function upload (verb) {document.PlanSummaryForm.action = action; Document.PlanSummaryForm.submit (); Validation = true; } I think that jquery AJAX call is your solution which will refresh you page. Can apply without  

    For Orders: For AJAX:

    java - why BroadcastReceiver don't catch the Action? -


    Hi There are two ways to define BroadCastReciver I'm working on BroadCastReciver. The first is using a Java code and the second Android manifest. My code is not working properly in another. Please tell where I am wrong.

      Public category hotel receivers extend broadcasts receivers {@ but relevant references (reference references, intention intent) / TODO auto generated method stub string dActionName = intent.getAction (); Log.i ("my receiver", intent .getAction ()); If (DAPNAGAZELS (Intent.ACTION_SCREEN_ON)) {TOST.MATET TEXT (REFERENT, "SCREEN ON", TOST., LNNGHIHORT). Show (); } Else if (dActionName.equals (Intent.ACTION_SCREEN_OFF)) {}}}   

    AndroidManifest.xml

      & lt; Manifest xmlns: android = "http: //schemas.android.com/apk/res/android" package = "com.example.hotelsecurity" android: versionCode = "1" Android: versionName = "1.0" & gt; & Lt; Use-sdk android: minSdkVersion = "10" Android: targetSdkVersion = "10" Android: maxSdkVersion = "15" /> & Lt; Usage-permission Android: name = "android.permission.PREVENT_POWER_KEY" / & gt; Android: Android: Android: Android: Android: Theme = "@ Style / Aaptim" & gt; & Lt; Activity Android: Name = "main activity" Android: label = "@ string / title_activity_man" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; Receiver Android: name = ". HotelReceiver" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.SCREEN_ON" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; & Lt; / Application & gt; & Lt; / Reveal & gt;    

    I think your receiver should be read

      & Lt; Receiver Android: name = "HotelReceiver" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.SCREEN_ON" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt;   

    not dot "."

    magento - Fatal error:Call to a member function getSource()on a non-object in\app\cose\core\Mage\Catalog\Model\Product.php on line1389 -


    I get an error on the list.phtml page on the local example of a site under development ---> Fatal error: Call to getSource () on an object in the call: \ wamp \ www \ magento \ app \ code \ core \ Mage \ Catalog \ Model \ Product. Php line 1389

      Fatal error: on a member function getSource () Call 1389   

    I am getting this error because some of the features were not created in the admin panel. $ _ Products-> GetAttributeText ('Favorites') Values ​​were being added to the list. Phf file

    When I made these features and solved the problem of setting them to the default attribute.

    Permutations of power set in Prolog -


    I should write a program in prol, when a list is given, returns the ordering of its power saver. One thing I forgot to forget: I already have a definition that turns a list upside down: deep _relev (list, modified list). For example: ? - sublist_perm ([a, b, c], x). will come back: (Duplicates are allowed)

      X = []; X = [C]; X = [b]; X = [B, C]; X = [C, B]; X = [A]; X = [A, C]; X = [C, A]; X = [A, B]; X = [B, A]; X = [A, B, C]; X = [B, A, C]; X = [B, C, A]; X = [A, C, B]; X = [C, A, B]; X = [C, B, A]    

    How to get all the subbalists and how to organize the list:

      sublist_perm (in, out): - sublist (in, temporary), permutation (temporary, out) Sublist ([], []) Sublist ([_ | XS], YS): - Novelist (Xs, YS) Sublist ([x | x], [x | ys]): - Sublist (xs, ys) axle X, sublist_perm ([a, b, c], x), xs), xs [[[] [/ p]    

    [A], [A, C] , [B, A], [B, A, C], [B], [B, C], [C, B] A, B, C] C, A], [A, C, B], [C, A, B], [C, B, A]].

    regex - Using variable in regular expression in Python -


    I have looked at several posts and other forums to get the answers related to my question, but nothing what I want should I As a head, I am new to programming and I do not have the original foundation which will be mostly.

    I know that Bash is good with a little dragon and RE.

    I am trying to create Python scripts using RE to parse data and give me an output I want.

    My output will have 4 values, all will be generated from one line. With any defined delimiter, the reading line is thrown together (hence the reason for my program)

    To find one of the 4 values, I have to say that search for 123 - and then give me everything but wait here df5 . 123 - is not static, but defined by a regular expression that works, the same goes for df5 I specified both in a variable of RE Have done How can I use those variables, what do I want between the two ... please let me know what it does understand.

      import then start = '123' 'stop =' df5 'regex = re.compile ('{}}. (*?) {1} format (re-space), Re.escape (stop)))   

    Note that for these example strings < Call> re.escape () calls are not required, but it is important if your delimiters ever use regex (. , * , + < / Code>, ? etc.).

    oracle - SQL - Is using 2 Dates in my WHERE clause redundant? -


    I have a query (which I run on an Oracle DB) that looks like this: < Pre> SELECT Column1, Column2, Column3 from MyDatabase.MyTableNameWhere (DELETED = 0) AND (DATESEEN> TO_DATE ('20 / 03/2013 12:00:00 ',' DD / MM / YYYY H.224: MI: SS ')) and (DATERECORDED> = TO_DATE ('20 / 06/2013 06:00:00', 'DD / MM / YYYYHH 24: MI: SS')) and (Detrocted & lt; TO_DATE ('20 / 06/2013 12:00:00, 'DD / MM / YYYYHH 24: MI: SS'))

    query dynamic Form Dynamic values ​​are as follows:

    Where DATESEEN is the second row of 90 days ago.
    The third line of the line where the query last ran (Usually 12 hours ago)
    Where is the time in the last line of this time.

    There is no index here, but on date I can not put any index on DATERECORDED for reasons beyond my control.

    Is my "Date" line in my WHERE section completely empty? Since Dates is always going to date prior to DATRCRDAD, will it be disregarded? The execution plan shows very little: execution plan

    Thank you in advance!

    You do not have an index on daycard code . To satisfy the section, the Oracle must scan a full table, read all the records.

    An index can stop a full table scan - either an index on an index deleted or date system (because you have The index has been rejected on the date .).

    There is no index on these two areas, then the segment is redundant. If so, it can significantly reduce I / O queries. There is not much of an index on Detecorded, but it can be too much - especially if you have 10 or 20 years of data.

    However, Oracle is free to use such an index based on collected data about the decision table.

    Another idea will be divided. If the table is divided by the date SIN , then it is allowed to select the correct partition (s) to complete the query in the section of the section. It will not be possible to use it.

    javascript - Converting date string from dashes to forward slashes -


    I am trying to use the following function from my dashdate 2013-12-11 to 12/12/11 :

      function convertdate (stringdate) {// Internet Explorer does not like dashes in the date when converting, // hence daimrags for year, month and day = / [^ -] * ) - ([^ -] *) - ([^ -] *) /; Var Detroxensonsult = String Date. Match (Detroegs); Var Detroitlecht; Var Stringdate Result = ""; // Try both Firefox and Internet Explorer to create a new date in {dateResult = new date (Detroitze Results [2] + "+" + Detroit Result [3] + "/" + Detrox Result [1]) ; } // If there is an error, hold and try setting a date result using a simple conversion catcher (error) {DateResult = new date (stringdate); } // format to see the string descriptor correctly = date = (DateResult.getMonth () + 1) + "/" + (DateResult.getDate (+ 1) + "/" + (DateResult.getFullYear ()) ; Console.log (StringDateResult); Return Stringent Result; }   

    As a test, I pass var myDate = '2013-12-11' and log out before and after the function but The format remains the same? Anyone can say that why am I being wrong with this?

    Here is a test jsFiddle :

    The function is working, as expected by returning date / value to the expected keyword date (mind).

    Your problem looks like your logging

      var myDate = '2013-12-11'; Console.log ('first', myDate); // 2013-12-11 Convert Date (Modet); Console.log ('later', myDate); // 2013-12-11   

    If your function returns a value, then the conversion date is returning only and nothing is done and only after logging on your console Returning back on the same date back already.

    If you change your console log

      console.log ('after', convertDate (myDate)); // 2013-12-11   

    You will get the expected results, or set a new value to myDate

      myDate = convertDate (myDate); Console.log ('later', myDate); // 2013-12-11    

    android - Finding xml of a google play list -


    Is there a way to get xml with this list?

    Something like an app, I think Google is not, but there is no way?

    Thank you in advance and

    There is no official Google Play API through which You can retrieve the data in this way.

    An unauthorized API, but it is very limited.

    bash - Different results when running in python interpreter vs. script file -


    I am trying to use bash functions inside my Pyro script so that I can locate a specific directory and Then send a given file inside the directory. The catch is that I have only a part of the directory name, so I need to get the rest of the directory name to use the discovery of the remaining function (names are unique and only one folder will return)

    Code I have so far as follows:

      def get_tag (part_of_foldername): import subprocessing import OS p1 = subprocess. Popin (["Find", "/ path / copy / directory", "-maxappa", "1", "-name", "% s. *"% Part_of_foldname, "-type", "d"], stdout = Subprocess.PIPE) directory = p1.communicate () [0] .strip ('\ N') os.chdir (directory) p2 = subprocess.Popen (["grep", "STUFF_", ".hgtags"], Stdout = subprocess.PIPE) tag = p2.comminucate () [0] strip ('\ n') return tag   

    What's really strange here is this code works when you Enter in the line interactive, but when it is run through a script when you enter the script file interti In the import and call function, but it will also work when called by the main function. The traceback I get from running the script directly:

      traceback (most recent call final): file "./integration.py", line 64,   

    and it has been called in such a main function:

      block_ dict [block] [0] == '0': Tag = get_tag (folder)   

    with the "Folder" as already defined as string.

    Please note that we use Python 2.6, so I can not use it unfortunately module check_output unfortunately.

    Have you tried to conflict with finding the module?

      import glob glob.glob ("/ path / to / directory / * / SomeDir / path / *")   

    You can see ** using:

      glob.glob ("/ path / ** / somedir / path / *")   

    and / Path / from / your / something / path / file

    run-as Package 'a.b.c' is unknown - Galaxy S4 Jellybean or Android 4.3 -


    I can not run run-of (or NDK-GDB) for Jellybean 4.2.2 running Galaxy S4. $ adb shell shell @ android: / $ run-ABC ls run-es: package 'aBC' is unknown

    There are many answers pre- For this issue for ICS devices, but they have been set up in the ICS.

    Update - August 2013: After appearing on the Galaxy S4 with Jellybean 4.2.2 initially, the run-issue is now on all 4.3 devices. See it.

    See approved Android issues.

    Update - November 2013: Google posted fix fixes according to Android 4.4.

    Success has been added by adding this activity:

      Private Zero Start Trygadbers () {{try new processbilder (). Order (getFilesDir () GetParent () + "/ lib / gdbserver", "Tcp: 5039", "--attach", "" + android.os.Process.myPid ()) .REDirectErrorStream (true) .start ( ); } Hold (IOException e) {log. A (Tag, "IOException failed to launch gdbserver"); }}   

    Then I wrapped startGdbServer in the Android service and updated the ndk-gdb script to launch the server instead of run-as command.

    Extra Extra Here:

      & lt; Service Android: Enabled = "True" Android: name = "com.apportable.activity.GdbServerService" Android: label = "@ string / app_name" Android: icon = "@drawable / icon" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "apportable.FoundationTests.GdbServerService" /> & Lt; / Intent-Filter & gt; & Lt; / Services & gt; Here are the relevant NDC-GDB changes (in Python):  
      Remote_GoodSaver = '/ data / data /' + env ['APPLICATION_IDENTIFIER'] + "/user" option in the "/ lib / gdbserver" print "pin" + pid #Android 4.2 requires if the "--user" result: user_option = "--user 0" Other: user_option = "first" It can not be the result in the versions = env.Execute ([env ['ADB'], 'shell', 'am']) "adb.AsyncShell (env, 'am startService' + user_option + '-a' + env ['APPLICATION_IDENTIFIER'] '.GdbServerService --es gdbserver_name' + remote_gdbserver + '--ei gdbserver_port' + str (env ['ANDROID_REMOTE_DEBUG_PORT'])) # Hack: Magic No. Ensure gdb server is actually running up and running time.sleep (2) # 1 is usually enough, but not always, after reboot or heavy system load adb.forward (env, env ['ANDROID_LOCAL_DEBUG_PORT'], env ['ANDROID_REMOTE_DEBUG_PORT as well']) adb.Pull (env, process_path, '/ system / bin / app_process') setup_path = '' '+ setup_path +' '' if env ['CGDB'] is none: cmd = [Env ['CGDB'], '-D', NV ['GDB'], '-', '-x', setup_path] and: CMD = [NV ['GDB'], '-x', setup_path ] Env.RunCommand (cmd)   

    from full .apportable / SDK / site_scons / Android / Apportable SDK Downloadable sources available in sdk.py

    asp.net - Jquery Ajax help point in right direction -


    Hi I am using a third party plugin if I pass the URL manually, it returns the expected value That is, when I use AJAX in JQA, it does not do anything, I do not know how to debug it or how to try to sort it, any help is very commendable.

    URL that works

      http://192.168.0.34:81/tenHsServer/tenHsServer.aspx?t=ab&f=DeviceStatus&d=C5   

    Jquery code not

      $ .ajax ({type: go ', url:' http://192.168.0.34:81/tenHsServer/tenHsServer Aspx ', data: {T:' AB ', F:' DeviceStatus', D: 'C5'}, Success: Function (Data) {Warning (Data);}, Error: Function (Request, Status, Error) {Alert (Request.responseText);}}}    

    You need something JsonRequestBehavior.AllowGet

      Returns Jason (Dataset, JasonRquwe Justify Behavior Alove Gate; // (C # MVC)   

    ... // Your ASPX page is not in a different way.

    iteration - How efficient is Python's 'in' or 'not in' operators? -


    I have a list of more than 100000 values ​​and I am iterating over these values ​​and checking that each other The list is included or not random values ​​(of the same size).

    I am doing this by using if the item [x] in the random list How efficient is it? Does the python have some type of hashing for every container or internally I am searching directly to other containers to find that element?

    In addition, if it does the search in a linear form, then what does it make a dictionary of random lists and lookup with it?

    in is implemented by The magic method that applies to it, so the efficiency depends on it. For example, there will be set , dict and frozenset hash based lookups, while the list will require linear search However, xrange (or category in Python 3.x) contains a __ method that does not require linear search, but its Instead of using the start / stop / step information to determine the validation value. (Example: 7 in xrange (4, 1000000) is not linearly done).

    Custom sections are free to implement __ contains __ however they look fit, but ideally should provide some information about how this happens in the document if " not clear".

    java - Constructor Dependency Injection in Spring MVC 3 -


    I'm trying to injection a dependency in my controller, instead using setters methods, but it didnot work .

    What do I want to do ?. Just bind domain model with my form using springframework 3.1, in a controller class

    My domain class:

      public class person {name of private string; @ Owned public person (name of string) {this.name = name; } Public string getName () {this.name; }}   

    My JSP (person-received):

      & lt; Form action = "test-person" method = "post" & gt; & Lt; Table cellpadding = "0" cellspacing = "0" align = "center" & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; P & gt; Name: & lt; / B & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Input type = "text" id = "name" name = "name" & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Form & gt;   

    My Controller:

      @controller public class person coordinator {@RequestMapping (value = "test-person", method = RequestMethod.GET) public string LoadVisible () {return "person-received"; } @RequestMapping (value = "test-person", method = RequestMethod.POST) Public string doPost (person, model model) {model.addAttribute ("person", person); Return "person-post"; }}   

    and the name entered by the user (person-post) is shown as the previous jsp:

       & Lt; / TR & gt; & Lt; / Table & gt;   

    Throwed exception:

      java.lang.NoSuchMethodException:. Models.Person & LT; Init & gt; () Org.springframework.web.method.annotation java.lang.Class.getConstructor0 (Unknown Source) java.lang.Class.getDeclaredConstructor (Unknown Source) org.springframework.beans.BeanUtils.instantiateClass (BeanUtils.java:104). Modelatrybutemethodaprosessorkkreatittri Butte (Modelatrybutemethodaprosessorkjawa:l32) Orgkspringfrmevorkkvebksserwletkmvkkmethdkantsnksserwletmodelatrybutemethodapr. Okessorkkreateattribute (Sserwletmodelatrybutemethodaprosessorkjawa:8l) Orgkspringfrmevorkkvebkmethdkannoteshnkmodelatrybutemethodaprosessorkresolveargu assessment (Modelatrybutemethodaprosessorkjawa:l03) Orgkspringfrmevork. Web.method.support.HandlerMethodArgumentResolverComposite.resol veArgument (HandlerMethodArgumentResolverComposite.java:75) org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValu es (InvocableHandlerMethod.java:156) org.springframework.web.method.s Upport.InvocableHandlerMethod .invokeForRequest (Invo cableHandlerMethod.java117) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod. Invokeawrhndl (Srwletanuvrniyhandlr Vidhikjawa: 96) org.springframework.web.servlet.mvc.method.annotation .RequestMappingHandlerAdapter. Invokehndlermethoda (Rekvestmappingndleradpterkjawa:6l7) Orgkspringfrmevorkkvebksserwletkmvkkmethdkannoteshnkrekvestmappingndleradpter. HandleInternal (RequestMappingHandlerAdapter.javaEND_BOLD78) org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle (Abst ractHandlerMethodAdapter.java:80) org.springframework.web.servlet.DispatcherServlet.doDispatch (DispatcherServlet.java: 923) Organization .springframework .web.servlet.DispatcherServlet.doService (DispatcherServlet.java: 852) org.springframework.web.servlet.FrameworkServlet.processRequest (Fremvrksrwletkja VA: 882) org.springframework.web.servlet.FrameworkServlet.doPost (framework server. Java 789) Jvksksserwlet.actiteepikhttpsserwletksrvis (Httpsserwletkjawa:64l) Jvksksserwlet.actiteepikhttpsserwletksrvis (Httpsserwletkjawa:722) Brkgovkspkmkokakfiltroskfiltrodoneksaokdofiltr (Filtrodoneksao .java.3)   

    I think spring is a default constructor whitout parameter Why is hapenning is looking for s that?

    Thank you! The

    After the

    The manufacturer injections need to have bean a spring in your spring-reference with your bean or an annotation form.

    However, I doubt that it will pass a parameter as a manufacturer to be used as Farmetr. The parameters should be set with the spring setters. Use the standard manufacturer and add a setter.

    Parsing JSON POST request C# -


    कुछ सर्भर निम्न जानकारी के साथ पोस्ट अनुरोध भेजता है:

      {पेलोड: {यूआईडी:             

    P>

    जैसा कि SLaks ने नोट किया, यह मान्य JSON नहीं है लेकिन सामान्य तौर पर, .NET में serializing / deserializing JSON के लिए एक अच्छा समाधान JSON.NET लाइब्रेरी है:। वहाँ बहुत सारे दस्तावेज हैं जो आपको प्रारंभ करना चाहिए।

    संपादित करें: अनुरोध निकाय को पढ़ने के लिए,

      स्ट्रिंग पोस्टडेटा = नया सिस्टम। आईओ .स्ट्रीम रीडर (संदर्भ। अनुरोध। इनस्टस्ट्रीम) की तरह कुछ प्रयास करें।    

    android - BOOT_COMPLETED intent not received on all devices -


    I have created an application that receives BOOT_COMPLETED within the receiver using the following filters:

      & lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.BOOT_COMPLETED" />   

    I get it on one device, but I have another device that does not get it despite using the same APK. Can device-specific problems prevent a particular device from getting this intent? Is there any way to test and make measures for this?

    Be sure that you < real complete reboot.

    Some HTC devices, for example, are the "fast boot" mode that does not trigger BOOT_COMPLETED , rather than a Android.intent.action.QUICKBOOT_POWERON < / Code> Broadcast As I understand, "Fast boot" mode basically does a hibernate rather than a true power, and so they do not send result as BOOT_COMPLETED .

    (Why intent is not an action com.htc.action.QUICKBOOT_POWERON is a complete issue of nut ...) < / Div>

    php - Using CodeIgniter for small/medium-size project -


    Working on a new small / medium sized project (in the coding side) does not require much work and the code And focusing on efficiency and speed, though I was wondering whether it is wise to use framework like codeigner, or would it be better to create my own, small MVC based template-system.

    I do not need to use complicated tasks on the website I'm working on, mostly regular database interaction and some file modifications, though it could be using quite a few resources when many users have the same It is used in time (because it provides them a way to make their website in a simple, efficient manner, although using some server resources For the sector).

    So, can someone advise me that for the efficiency and speed of my website, will it be an intelligent thing to use the codeigner?

    The use of Codeigniter versus other framework is almost incompatible.

    Use what you are comfortable with

    If you are really concerned about performance then take a look.

    Just know that everyone is being biased.

    sql server - Selecting a value from XML data type -


    How to write a SQL Server query that selects from an XML data type and selects the attribute in an element Which corresponds on the basis of other attributes.

    Imagine the following example:

      Create table debuts. Configuration (Configuration xml not blank); Insert in the DOO. Configuration (configuration) value (convert (XML, ''  Threshold automation announcements NoofRequests = "25" />   & lt; ; / DoSRequestAnalysis & gt; & lt; / Configuration & gt; ')); Config.value ('(/ / configuration / DoSRequestAnalysis / Windows / window [@ name = "shortest"] / duration) [0]', 'Small' Select from dbo.configuration; - I value the characteristic period I want to select, that is 15, but this return empty   

    how to write a question, so does it choose the duration attribute?

    Many thanks

    You are close, just change [0] to [1]

      Select configuration.value ('(/ / configuration / DoSRequestAnalyst / windows / window [@ name = "smallest"] / duration) [1]', 'smallint')    

    version control - hg mq (nested|sub|child) queues -


    I know that this is not an HG feature, but maybe someone has something similar to meet. Hopefully my description comes into being:

    I find it useful to keep my main line (i.e. the default branch) in the patch queue for a few weeks so that they can "systematize" them. However, I would like to be able to create topic branches through new queues. These two ideas are unique to each other, because you can not create a new line starting with an applied patch. The only way to do this is to finalize the patch of my main line, and start the lines of the branch from the qparent committment, and finally by importing the patch back to MQ, any other ideas? Is GIT better at such a workflow?

    I have not tried this answer and I do not know that it will work, Or if you want to know what it is. "

    When you make an MQ for your repository, it creates this as an existing mercurial repo, so your internal structure is something like this:

      .hg \ cache \ patches \ .hg \ .hgignore patch1 patch2 chain status store \ hgrc ...   

    You can work directly on the patches repository Can do ( In fact if you are something like me then you have to install some scripts to work easily on that repo - I have a mq command for me).

    Since MQs have a repository in their possession, it can be committed, drawn, pushed, etc. In theory these branches may be involved.

    Be a potential workflow, every time you think that you are happy with the patch, you take it in a patch repo:

      hg qnew patch -3 - M "Something" ... hg qref mq commit -m "happy with patch3"   

    Note that this is not creating patches for your main repository, it only patch history If at some point you decide that you want to create a branch, then you can do it like this:

      mq branch some branches hg qnew patc H4 -m "something else" ... hg qref mq commit -m "committed to new patches branch" mq update default   

    patch 4 patch now closed , And does not even appear in your patch range, even the unchanged list.

    This is a possible solution that could work, but a test repository would need to be fully investigated, and if you are not careful, it can also be a terrible mistake.

    Transform encoded XML element using XSLT -


    एक्सएमएल फाइल

      & lt; लेख & gt; & LT; पैरा & gt; स्टैक अतिप्रवाह एक प्रश्न और उत्तर साइट है & amp; amp; lt; b & gt; व्यावसायिक & amp; lt; / b & gt; और उत्साही प्रोग्रामर & Lt; / पैरा & gt; & Lt; / लेख & gt;  

    HTML आउटपुट

    स्टैक अतिप्रवाह पेशेवर और उत्साही प्रोग्रामर्स के लिए प्रश्न और उत्तर साइट है। P>

    प्रश्न:

    मैं HTML तत्व & lt; b & gt पर & amp; lt; b & amp; gt; को बदलना चाहता हूं ; XSLT का उपयोग करना कृपया किसी भी एक्सएसएलटी कोड का सुझाव दें।

    इस तरह एक अन्य दस्तावेज़ में लेकिन यह हर समय होता है यदि बच गए टैग एचटीएमएल हैं और आप उन्हें आउटपुट के लिए सीधा कॉपी करना चाहते हैं, तो अक्षम आउटपुट-एस्केपिंग कभी-कभी चाल करेंगे - लेकिन हमेशा नहीं, क्योंकि यह केवल तब काम करता है जब आप क्रमबद्ध होते हैं यदि आप मोज़िला में एक XSLT रूपांतरण चलाते हैं तो आउटपुट HTML को कभी भी क्रमबद्ध किए बिना प्रदान किया जाता है, इसलिए अक्षम-आउटपुट-बचने का कोई प्रभाव नहीं है। इसलिए XSLT के फायदे इसके उपयोग को हतोत्साहित करते हैं।

    बेहतर तरीका यह है कि पटकथा वाले टैगों को पुनः प्रकाशित करना XSLT 3.0 (जो कि एक पार्स-एक्सएमएल () फ़ंक्शन है) तक ऐसा करने का कोई मानक तरीका नहीं है, लेकिन आप अक्सर एक्स्टेंशन फ़ंक्शन का उपयोग करके इसे कर सकते हैं।