Monday, 15 July 2013

sql - How to relate not consecutive data in a sorted list? -


I have a table and data in the table below, the 'time' column shows the time when data is inserted Gaya. NODE_ENTER it indicates that the node starts or ends when it has begun node that means is equal to 1 and start time Ap_det and Ap_taim when NODE_ENTER 0, then finish means that node and Now, ap_date and ap_time show the end time.

For this table, I want to get the total time on each node (for start node, area_ode, elsewhere, and sub-boundary node). But how can I get it right?

  id time REFID node NODE_ENTER APP_DATE APP_TIME 12345 0 10150 starting 1 20,130,605 94601 23456 3,7093E + 11 10150 start 0 20,130,611 90,115 56789 3,7093E + 11 10150 area 1 20,130,611 90,116 67,891 3,72167E +11 10150 sub-region 1 20130625 162,419 23,432 3,72171E + 11 10150 sub-region 0 20,130,625 173,226 87,656 3,72171E + 11 10150 area 0 20,130,625 173,227 34,599 3,72171E + 11 10150 than 1 20130625 173,227 87,654 3,72237E + 11 10150 anywhere 0 20,130,626 120,121 66,789 3,72237E + 11 10150 area 1 20,130,626 120,122 99891 3,72167E + 11 10150 sub-region 1 20,130,627 104,537 21132 3,72346E + 11 10150 sub-region 0 20,130,627 181,136 82,356 3,79515E + 11 10150 area 0 20130628 162656 < / Code> 

I like the LAG function below Defense used, but I could do it consistently and do not get the time difference between the designated lines. For example, area nodes are not persistent because the sub region should be between two field nodes. Now I can get time difference between two start nodes or two sub-region nodes, but how can I get time difference between two field nodes? When I try to use the lag function in the node name, it does not work again because I can have the same node name. Area nodes can start somewhere after the node and finish again

  lag (P.NODE, 1, '-'). PREV_NODE, (as ordered by P.REFID, p.time) more than P.APP_DATE, 1, '-') (START_DATE, lag (P.APP_TIME, 1 as ordered by P.REFID, p) More than) .time ("P.REFID, p.time order"), more than (Duration of time), '000000'). 

I think you partition on apiid and noDE while command the APP_DATE and APP_TIME :

  REF_ID, node, node_enter, app_date, app_time, last_node_enter, last_app_date, the last_app_time ( P.ref_id, p.node, p.node_enter, p.app_date, p.app_time, lag (p.node_enter) A.) than (P.IT_id, p.node ORDER BY p.app_date, p.app_time) AS Antim_anod_antr, Elaji (Pi.api_det) over (Piarfaidi, Pi.ankokdi.adiiar, Pi.api_det, P Participation by AP_time) AS Last_app_date, Lag (p.app_time) Over (Partition by nod_enter = 1 and last_node_enter = 0; node ORDER BY p.app_date, p.app_time) my_table_time;  

Let me give you my date and time as DATE s or TIMESTAMP as opposed to number I recommend S or VARCHAR2 s.


python - Issue with downloading a file using requests library -


<पूर्व> आयात आयात अनुरोध से bs4 BeautifulSoup useragent = "मोज़िला / 5.0 (Macintosh; Intel Mac OS X 10_10_1)" \ "एप्पल वेबकिट / 537.36 (केएचटीएमएल, जिएको जैसे) क्रोम / 40.0.2214.115" \ "सफारी / 537.36" रेफरी = "https://czdap.icann.org/en" org = "https://czdap.icann.org" स्रोत = खुला ('./ tldlocations.txt') url = 'https://czdap.icann.org/en' pload1 = "नाम = उपयोगकर्ता नाम और पास = पास & amp; form_build_id =" pload2 = "& amp; form_id = user_login_block & amp; S = request.ession () आर = s.get (url) सूप = खूबसूरत सूप (r.content) # हमें सूप में इनपुट के लिए हमारे पोस्ट अनुरोध में form_build_id को शामिल करना होगा। Find_all ("इनपुट" ): यदि इनपुट ["नाम"] == "form_build_id": form_build_id = input ["value"] pload = pload1 + 'form_build_id' + pload2 # कुछ शीर्षलेखों के s.headers.update ({'Accept-encoding' : '', 'रेफेरर': रेफरी, 'उत्पत्ति': संगठन, 'उपयोगकर्ता-एजेंट': यूज़रएगेंट, 'कंटेंट-टाइप': 'एप्लिकेशन / एक्स-www-फॉर्म-यूआरएलएक्सोड'}) आर = एस पोस्ट (यूआरएल, डेटा = प्लेड) r = s.get ('https://czdap.icann.org/en/download-zone-data/1885') प्रिंट आर कंटेंट

मैं आईसीएएनएन वेबसाइट से फाइलों के समूह को डाउनलोड करने के लिए इस कोड के कोड का उपयोग करने की कोशिश कर रहा हूं, लेकिन मुझे इसे काम करने में परेशानी हो रही है मुझे जो आउटपुट प्राप्त होता है वह यूनिकोड का एक हिस्सा होता है जो .txt.gz फ़ाइल की सामग्री को दिखता है जिसे मैं डाउनलोड करने का प्रयास कर रहा हूं।

आप कोड में हैं, आप बस अनुरोध कर रहे हैं और वास्तव में किसी भी डेटा को नहीं सहेज रहे हैं इसे आज़माएं, यह अनचाहे है, लेकिन इसे डाउनलोड करना होगा, और फ़ाइल को dlfile

  r = s.get ('https: //czdap.icann) नाम से फाइल में सहेज कर रखनी चाहिए। आर के साथ: r.iter_content (chunk_size = 1024) में चंक के लिए ओपन ('dlfile', 'wb') के साथ ओआरजी / एन / डाउनलोड-ज़ोन-डेटा / 1885 ', स्ट्रीम = ट्रू): अगर चक: # फिल्टर से बाहर रखें -नाली नई खंड एफ.लिटेट (चक) एफ.फ़्लुश ()  

अधिक जानकारी यहां पाई जा सकती है


javascript - Split using two delimiters -


How divided by using two delimiters is my code below where I am using string (). How to divide both by using () and {(in the string below).

  var str = 'abc xyz () ab {(}) pp' var res = Str.split ("()"); Console.log (res); // ['abc xyz', 'ab {(}) pp']  

I have tried to do something that is not properly divided

 res = str.split (/ [\}) \ () /] /  

I expect something below

  [' Abc xyz ',' ab ','}) pp ']  

If str =' abc xyz () ab {(}) pp bb yy {(KK Lowe ' , I want the output to be ['abc xyz', 'ab', '}') PP bb yy {(kk llop '] . The partition should only be on the first instance.

  var str = 'abc xyz () ab {(}) pp 'Var result = str.split (/ (?: \ (\) | \ {\ () /); Warning (JSON.stringify (result));  

Something like this:

  str.split (/ (?: \ (\) | \ {\ () /)  

You can use either | to match either () or {(. ?: It does non-capturing.


ios - Contradicting frameworks on -ObjC -


Then in my project I have FacebookSDK, ParseSDK and FirebaseSDK. Both Facebook and Pars needed Bolt, so I applied it. Although it will not be compiled until I remove the objection flag. The problem is that if I remove this tag, the code will be compiled, but this would be a runtime error because the reason for trying to start fireworks - I am in a mess I am only a part of the specific structure Can I set the flag for? Thanks for any help.

(I think it should be a comment, but I do not have enough yet, hopefully That it helps in solving this.)

I am having the exact same problem (with the sponsor SDK instead of Firebase SDK), Facebook SDK & amp; Required by the sponsor to work -ObjC flag, unless I press does not need to pay Spansr have long worked fine together.

By removing bolts. No framework solution, because it leads to some linking errors:

  "_ BFTaskMultipleExceptionsException", refer to: ___ 53 + [PFObject (private) deleteAllAsync: withSessionToken:] _ block_invoke214 parsing (PFObject Ko) ___ 65+ [PFObject (private) _deepSaveAsync: withCurrentUser: sessionToken:] _ in block_invoke311 parse (PFObject.o) LD: Architecture of symbol not found (s) x86_64 Clag: error: linker command with failure code 1 Unsuccessful (for use -V inviting invitations)  

Add me to the exact FacebookSDK package bolts. The same error using the framework .

But, bolt. Framework using , parsing library is I got a different error:

  ld: 91 duplicate symbols for architecture x86_64  

All the frameworks and libraries are U Pdated.

When:

Kokopod have solved the problem for me!


how to take diffrence between cell array and simple integer array in matlab? -


I have removed 23 sentences from a text file that are split and are displayed in separate row. The number is given {1,2,3, ...}, the code I used for is as follows:

  Sentence = regexp (f, '\ s. *? [\. \! \?], 'Match') Four (sentences)  

Now I did some processing and the filtered answer shows the subsets of the sentence given below:

  Par G = 1 4 5 9 11 14 16 17  

The code I used for the result is as follows:

  result = unique ([occasions:]] ); Performance (results)  

Now what I want to do is to show sentences, which are not present in the result variable, for example I need the result:

  result2 = 2 3 6 7 8 10 12 13 15 18 19 20 21 22 23  

Remember the sentence is [1 * N] cell resulting in simple array saving integer

The function you are looking for is:

 % // Create an array of indices of all sentences AllSentences = 1:23; Results of the% // index of sentences = [1 4 5 9 11 14 16 17]% // and currently does not exist Current = SetDF (all centes, result) Notificen = column 1 to 13 2 3 6 7 8 10 12 13 15 18 19 20 21 Columns 14 to 15 22 23  

I do not understand what the cell array is and what's not, but for cell array, you can call them the cell2 mat and apply the same method.

Example:

  AllSentences = {1:23}; Neuter = setdiff (cell2 matte (alestents), result)  

excel - Return one cell value based on month in another cell -


  मेरे पास 3 कोशिकाओं A1 = 5 A2 = 7 A3 = 15/01/2015 C1 = खाली सेल   

मुझे खाली कक्ष (सी 1) में दिखाने की क्या आवश्यकता है: यदि महीने में ए 3 जन है ... तो ए 1 मान (5) लौटाओ, लेकिन यदि महीने A3 में फरवरी है ..

यह करना चाहिए:

  सी 1 = यदि (माह 3 (ए 3) = 1, ए 1, ए 2)  

c# - In App Purchase issue after purchase -


I got a strange behavior with the IP OS on IP, when the purchase is done from the IAP work, the request does not run at all, It's somehow to leave it, I've caught a try, but there are no exceptions at all. If you put a glance at it, then I appreciate that I know that you need more information.

  Waiting for private async zero Button_Click_1 (Object Sender, RoutedEventArgs E) {var list2 = CurrentApp.LoadListingInformationAsync (); Var noads = listing2.ProductListings.FirstOrDefault (p = & gt; P. Value.ProductId == "RemoveAds" & amp; P. Value.ProductType == ProductType.Durable); Try {Waiting for CurrentApp.RequestProductPurchaseAsync (noads.Value.ProductId, False); // There is nothing here MessageBox.Show ("Done"); } Hold (Exception pre) {Message Box. Show (ex.InnerException.Message); }}  


git - R Studio - Cloning local repository -


I want to create a master repository on our server, so that I can clone a local version on my computer.

I am using R Studio v0.98.994.

So far, I have tried to do this:

Create a folder to stay inside the master repository. I ask this in the studio using the 'new project', and make it a GIT repository.

Then I can open another new project on my C drive, and use R Studio for clone, to open an existing project and set the URL as the location of the master project Is saying for.

However, when I make changes and I commit to my local repository (which works fine), then I get an error in the master repository, as described in this question:

So it seems that R Studio makes non-berry repository?

Now I thought, okay, I'll use GIT bash to start the repository and then connect it to R within the studio.

I do this, but c Anot then searches for a way to use that repository in R studio.

I am very new to Git, so it is entirely possible that they read one of those 'instructions' questions, in which case I am very sorry - and do somebody please me Can you point to some guidance for this situation? I have spent a good half day of one day around this error and have not managed to pull the pieces together so far :( I also apologize, it does not feel like a very repetitive question It seems that you are using Windows GIT, the local Windows machine (C: drive).

P>

Shared Reserves

If you intend to share more than one person with the same stock , You want to start an share repository. See the --shared option for more information. Note that I am not sure that having your repository on Windows machine affects the sharing option. Your repository Keep the person in two places, which makes things very easy.

Bread repositories

There is talk of separate repositories different from the discussion of sharing. If you do not intend to ever Working with files in the server (i.e. this is just going to be a place to push the changes so that they are stored safely), you can start an bare regressory in a small store Git has a database structure, but Stvik files in the directory.

A standard Git repository is designated with a written folder .git . This .git folder contains all the different data structures that one uses to track the change of gates, an unmatched repository essentially containing only the content of .git Is the folder.

The good thing about a bare regression is that no one can work in the repository (because a working directory, just the database) it means that no one can log in in S Has: Edit yourself and the repository. Instead, they have to clone the repository, then put their changes back into the original. There is a good article on why this is ideal.

Note that shared repo and rogue repo are not dependent or mutually exclusive. As a general practice, if you have a "server repo" from which you pull and on which you push, you should tell it, whether the project is shared.

A non-shared workflow

As it is not clear whether you are sharing or not sharing, and you are on a Windows environment, from a shared perspective Do not know, I want to give you a simple example. Using GIT-bash, where you can place the directory on the S: you have your repositories. Then, use git init with bare options, as it is described by initializing the link above to initialize a bare registrar, navigate to where you want your repository to remain on C, And then git clone to get a working copy.

Add a README file or something so that you commit to your initial commitment, and then commit to push your changes into S: repository and git push master master once All this is done, then the RSTUDO GIT project is started. RStudio should be converted to its current configuration and things should work


linux - Developing iOS Meteor app on DigitalOcean -


I need to develop an app mentioned in the reverse with iOS, I'll put my project in a digitaloass droplet if IOS If I need support, how can I run an iOS-supported app from a Linux-based digital audio droplet?

You will create the first meteor app and it will be mounted on the digital ocean. I would recommend MUP for the deployment process. It is super straight forward and easy.

Then you will create a meteor app for iOS

  Meteor add -Platform IOS  

For more information about the creation of iOS, follow this MDG wiki page ...

Actually, if you run in a simulator If you want to, you can use the following command:

Meteor Runs iOS --MobileServer http: //

If you want to create an iOS distribution, you can use the following command:

  create a meteorite  

laravel - How to set multiple boolean mutators -


I am using Laravel 4 and I have a model with Boolean attributes.

I'm setting the setter for each of them

  set the public function ISRmot attribute ($ value) {$ this- & gt; Attributes ['isRemote'] =! ! $ Value; }  

And such a singer

  public function getIsRemoteAttribute ($ value) {Return !! $ This- & gt; ['IsRemote'] explains responsible; }  

Is there an abstract way that I am not personally setting 12+ mutators?

I think you can override like the setAttribute method:

  Public function setActivate ($ key, $ value) {if (in_array ($ key, 'abstract_keys')) {$ this- & gt; Features [$ of] = $ $ $ value; } Other {Parents :: Set properties ($ key, $ value); }}  

same getAttribute .


javascript - Google analytics goals with reveal.js -


I'm revealing. Js (), which generates a URL with a hash and slide id, for example: www.my-domain.com/## slide1> www.my-domain.com / # / slide2.

I want to set up goals in Google Analytics for some slides, so I know that the user can have a certain point, how can I do this?

I tried to use the full URL as a target, but it does not seem to work in any idea?

I do not know. Js. But it comes to conversation with the audience with the slides in the event. An example is for slide change events, where you can add event tracking code:

  Reveal. AddEventListener ('slidechanged', function (event) {// event.previousSlide, event.currentSlide, Event.indexh, event.indexv ga ('Send', 'Event', 'Slide', 'Click', event.currentSlide );});  

Event is an object that gives you some information about the interaction through the object properties. Do not be confused with the fact that both the "Event" in the GA tracking code and uncover.js code; The latter is a javascript event, pre-analytics has only one naming convention (the bordly speaking event is used to track the stuff that does not trigger the page load).


jquery - Why does JSLint say "anonymous function does not always return a value" for an event handler? -


जब मैं यह कोड:

  $ (document) .keydown (function (e) {If ($ ("$ chaptersfunctionality")। लंबाई! == 0) {if (e.keycode == '13') वापसी झूठी; यदि ($ ("# kelvin")। Val () === "" एट्रि ("शीर्षक") === "सभी चरण दिखाएं") {स्विच (ई.एच.आई.आई.) (केस) 39: यदि ((पर्सिएन्ट (चालू एन्कर) +1) & lt; ParseInt (मैक्सी)) विस्तारित मी (++ वर्तमान एन्कर); तोड़; मामले 37: यदि (वर्तमान एन्कर्र> 0) विस्तारित मी (वर्तमान एन्कर -1); ब्रेक;}}}});  

... मुझे काफी चेतावनियां मिलती हैं, जिनमें से अधिकांश मैं छाँटता हूं, लेकिन इसने मुझे स्टम्प्ड किया है: " अनाम फ़ंक्शन हमेशा एक मान वापस नहीं करता "

ऐसा क्यों कहते हैं? एक ईवेंट हैंडलर एक अनाम फ़ंक्शन नहीं है, है ना? और यह वैसे भी कोई मूल्य नहीं लौट रहा है, है ना? तो इसका क्या मतलब है, और क्या होगा [मॉल, पीएसी] इनेटर लि linter?

जेएसएलint आपको चेतावनी देता है किसी भी समय किसी फ़ंक्शंस में कुछ शाखाएं होती हैं जो एक वापसी और अन्य शाखाएं जो return का सामना किए बिना समाप्त होती हैं। JSLint सोचता है कि किसी फ़ंक्शन को हमेशा स्पष्ट रूप से एक मान वापस करना चाहिए या कभी स्पष्ट रूप से कोई मान वापस नहीं करना चाहिए एक ऐसा समारोह जो कभी-कभी स्पष्ट रूप से एक मान देता है, वह स्वयं को चेतावनी प्राप्त करता है आपका कोड एक मामले में वापस लौटा करता है और अन्यथा वापसी का उपयोग कभी नहीं करता है।

यदि आप JSLint को शांत करना चाहते हैं, तो आप एक रिटर्न

अब, मेरी राय के लिए:

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

क्योंकि किसी मान को वापस नहीं करने का अभ्यास एक घटना श्रोता पूरी तरह से सामान्य है, यह आपके कोड की पठनीयता को नुकसान नहीं पहुंचाता है। मुझे लगता है कि आप इस मामले में JSLint को सुरक्षित रूप से अनदेखा कर सकते हैं।


android studio - Why do we set Gradle classpath reference in both project's and module's build.gradle? -


When we create an empty Android Gradle project using Android Studio 1.1.0 (and all earlier versions of Android studio) , The two references to the Gradle plugin are in the build.gradle of a reference project and the other reference is in the build.gradle module. And both look the same.

  buildscript {repositories {mavenCentral ()} dependency {classpath 'com.android.tools.build:gradle:1.xx'}}  < / Pre> 

As I have experienced, the version of the grudge is more important than the project file because I can set it to the latest griddle (v 1.1.3 for Android Studio 1.1.0), while I can leave The version of the griddle (!) In old modules build.gradle The project will compile without any error

So why is the module reference at first place?

We say that the reason for this is that we can use other grade versions in some modules. Does this mean that I can remove these lines from the module's build.gradle if I plan to use the same grade version through this project? In this way I have to update the same line in all the modules.

We do not have to do this! It seems that this habit was present in earlier versions of Android Studios (probably before the official release)

There is only one reference in Android Studio v1.1.0 - the project's build.gradle in

Note: This project was built on the old version of Android Studio (which is not fixed) and its code is inherited.


fill image with color except transparent part in php -


I want to fill a transparent image.
I just have to fill the scene part, not transparent, but my code is acting opposite.

Please help me

My code is for filling out my transparent image

  $ im = imagecreatefrompng ("ff6600 .png"); $ Width = imagesx ($ im); $ Height = images ($ IM); $ Img = imagecreatetruecolor ($ width, $ height); $ Blue = imagecolorallocate ($ im, 25, 25, 112); Imagefill ($ im, 0,0, blue $); Imescalefa ($ im, true); Header ("content-type: image / PNG"); Imagepng ($ im); Imagedestroy ($ im);  


c# - Are the .NET framework libraries considered to be user-defined? -


The C # documentation makes a fair use of the word "user-defined" for example:

can not be executed as operator ... the user defined conversion ...

Although I have not received formally definition, I believe that C # In the language specification not is user-defined

that said, I initially thought that the user defined Anything made from language (as opposed to being a part of language), but it can not keep the water, because it is possible to implement the C # compiler.

It looks like int and double are not user-defined; This is less obvious, however, with string and date time .

Anything that is part of the framework libraries but not part of C #? Yuval's answer indicates that framework libraries are not user-defined, while Patrick's answer indicates that they are.

is:

Note that as an operator only Context conversion, faucet conversion and boxing adaptation occur. Other transformations can not be made in the form of operators, such as user-defined conversion, which should be done using a cast expression.

In this case, the user-defined conversion is a conversion that is not handled by the language. For example, language handles conversions between numerical types. Those conversions are made in the compiler, and they are very complex, because they do not reflect the 'normal' behavior of the language (from now on they have created it).

In those cases, the compiler, you need to make yourself an artist as explained, you can use a conversion operator for it.

And to answer a straightforward question: Yes .NET Framework libraries are considered user-defined.


unity3d - How to construct a dodecahedron and texture its sides -


I want to create a 3-dimensional model of a planet based on dodectron and represent each side a major texture The landscape and other material in that area (alternatively the split split in 12 pentagon would be better, but this is probably even more complicated.)

This is a game project that I want to do in Unity 3D I am but any way (in screenplay or free The 3D graphics tools) would be helpful.

I have already taken note of the geometry of the platic body and have tried to understand how to attract the Pentagon and then be considered an appropriate angle, or get a solution ready for it. , But so far I have not found any way.

After being somewhat negligible, I got an answer:

Step 1: Create a Pentagon in Blender

It is really very simple to create a cycle and reduce the upper part to 5. I actually went with a cylinder with the dimension X = 1, Y = 1, Z = 0.1, but the overall solution is similar to a flat Pentagon.

Step 2: Get it into Unity 3D

Unity 3D Import. Blonde files naturally, so I saved the .blend file to Pentagon and imported it as an asset in Unity 3D.

Step 3: Put the pentagon on a stick.

Later to rotate the pentagon around the center of Dodectron, I made a cylinder with dimension X in Unity 3D = 0.1, Y = 2, Z = 0.1 and I Putting the Pentagon as a thing object - exactly at the same end (Transform Y = 9, 75, 10 for my 3D-Pentagon if using that rebound and X = 9 to rotate the x cylinder) I have opposite ends Even for this, the pentagon's Cha Issues left side (transform = 9, 75 and X = 90, Z = 180 conversion) both at the same time half.

Step 3: Run around with rotation and scaling

Now I have duplicate and solider (attached pentagon) x = 63.435 (the edges of Dodden Between the angle between) and Y = 180 (facing so much edge each other) to get it right in the post. Now I have to find the correct scaling of the Pentagon to close the gap, which is very close to 15.275. Repeat with respective angles five times (multiplier of y = 180 +/- 72, angle between the two sides of the pentagon).

Done.


javascript - Can't reach function inside controler from view -


I can not access the function inside a controller from my view. It seems I'm missing something but I do not know if I can access it using the non-convergent path, but this does not allow me to get compatible code in future. It may be that some people understand this error and understand why this is going wrong.

Thanks for watching my code.

  Ext.define ('imp.view.Test', {extension: 'extension.panel', surname: "widget test.", Xtype: 'test', controller: 'imp. Controller: {title: 'test', scrollable: empty, item: [{xtype: 'button:' .com.util.Utility ',' imp.util.Utility ',' imp. ', ItemId:' postButton ', UI:' action ', padding:' 10px ', text:' post '}]}});  

Controller:

  Ext.define ('imp.controller.Test', {extension: 'Ext.app.Controller', config: {refs : {TestView: 'test'}, Control: {'test #postbutton': {tap: 'onPostCommand'}}}, toppostname: function () {console.log ('klik');}});  

I think there are many ways to do this: I always have my controllers in such a way Write:

  Ext.define ('imp.controller.login', {extension: 'ext.app.Controller', init: function () {this.control ({'Button [ Action = test_command] ': {click: this.test_cmd},});}, test_cmd: function () {console.log ("pressed the test command!");}});  

With this strategy, your button will require action

 : "test_command"  

and you You can delete the button and the listener's declaration ID. I'm not sure what the onTestButtonTap function should do at the bottom of your scene file. Did you mean to do two different things?


c# - Can I render XAML or HTML inside a panel in Silverlight? Using RichTextBox? -


Actually, I want to display a string of HTML inside my Silverlight application. I have not found any solutions that work, I have read that such a control can be done, but it only works when the SL application is out of the browser, which is not an option for me, I thought I was using XAM in HTML I can change here using Microsoft's Examples Classes:

And after that there is a rich textbox control, which is the XAM property I will set the xml string on. However, it throws an argument expression with the "value" (not very useful) text. It seems that when you set this XML property, it will be eligible as an acceptable XML. My HTML is not fancy too, it has several tables (tr and td elements). Here is an example of XAML which works to set up Rich Textbox's XAML property:

   
   gt; & Lt; Table & gt; & Lt; / Table & gt; & Lt; / Flow document & gt; I tried to change the "flow document" with "stream", and that too could not work either. It does not like the "table" element in XAMML. 

Do I want to complete? Thanks


Are Android / iOS an operating system or a software stack? -


I have read that Android is not an OS, but a software stack built on the Linux kernel: what iOS, is that the Mac OS Is there a software stack built on X? If iOS is an OS, then why is it?

OS X is Unix and iOS is a variation of OS X, 10.5 by the Open Group as Unix Has been certified in: See: Changes were made to get that status many years ago for more information and links.

In addition to this there are frameworks like KocoaOut, Foundation etc. which are part of development kit. The iOS app can be developed in many languages, including the purpose.


c++ - catch type dispatching time -


There was a question that was discussing with colleagues - time to type hold Is compiled or tun time? In other words - when the system decides that to capture the special code should be applied when an exception of that particular type is thrown. I think it should be run-time, but I'm not sure.

Any help would be appreciated!

Description of the many techniques used by the document Compiler to deal with exception handling.

The latest compilers make up a table that maps to the exception type in the call handler location (during the compile phase). When the compiled program runs and throw , a pre-computed table is made to look at what is used to find the handler location.


haskell - How should I use maximumBy and compare to implement my function? -


I have to do a LZW compression in Haskell and I'm having some difficulty with the old prefix search because I use it Is a combination of maximum to and comparison functions

The function signature should be the following:

  longest :: [(int, string)] - & gt; (Int, string)  

Here are some tests that describe the requirements:

  test_longest = [longest ([30, "A") , (20, "ABC"), == (20, "ABC"), longest ([30, "A"], (20, "ABC"), (15) , "ABC")] == (15, "ABC")]  

Any help would be appreciated

the longest (x: xs ) = Maximum (compare (length) x) xs code>

But something is definitely off.

This is what it will:

  import data. Compare list :: :: (int, [variable]) - & gt; (IT, [four]) - & gt; Sequence comparison entry (i1, s1) (i2, s2). Len1 & gt; Len2 = GT - Compare the length of the first wire. Len1 & lt; Len2 = LT | I1 & lt; I2 = GT - If they are equal, then compare the index. I2 & gt; I1 = LT - (note the opposite order, because you want the lowest index). Otherwise = EQ where len1 = length s1 len2 = length s2 is the longest = compare to maximum central  

It can be written in a less but less readable way.


android - How to implement Endless scrolling using StaggeredLayoutManager -


I have already tried to implement endless scrolling for LinearLayoutManager and it is successful and implement LinearLayoutManager to StaggeredGridLayoutManager I have tried it but it is not working

I just want to get the first twenty item. LinearLayoutManager in

:

  int firstVisibleItem = linearLayoutManager.findFirstVisibleItemPosition (int);  

but in StaggeredGridLayoutManager:

  int firstVisibleItem = staggeredGridLayoutManager.findFirstVisibleItemPositions (int [])  

How to

Is there a good way / implementation about this?

Thank you in advance

I am doing this:

You can use one of two ways: StaggeredGridLayoutManager:

  • Pass an empty interval array that starts with the posts You will go and use whatever you understand.

      private bullion loading = true; Private intimate widgets, visual itemcount, total ITEMCOUNT; MRecyclerView.setOnScrollListener (New RecyclerView.OnScrollListener ({@ScrerollViewRescrolledViewRescrollView, int dx, int DY) {visibleItemCount = mLayoutManager.getChildCount (); totalItemCount = mLayoutManager.getItemCount (); int [] FirstValiditimes = Faucet; First Wise = () (Loaded {{(Visible itemcount + previous discretion item) & gt; = total iTamecab} {Loading = false; log D. ("tag", "load forward object");}}}})  

    tsql - 'With namespace' keyword is not working on mysql -


    I have tried to use the following script which are working fine in MSSQL but not in mysql

     ; With XMLNAMESPACES (select 'http://www.ctor.com/retail' as retail), cast as XML (cast (copy (copy ([XML], 'encoding = "UTF-8"', ('Max')) as enactorem.customerattributes  
    ('Data' / Retail: Consumer Properties / Retail: Price / Retail: Worker (200)). Div>

    as Desct) [1]

    awk - bash - how to delete every nth line of a file -


    मेरे पास यह है

      line1 line2 line3 line4 line5 line6 line7 line8 line9 line10 लाइन 11 लाइन 12 लाइन 13  

    मेरा उद्देश्य है

      line1 line3 line4 line6 line7 line9 line10 line12 line13 line15  

    मैं नीचे दिए गए कोड की कोशिश की, लेकिन यह जो मैं चाहता हूँ वह नहीं कर रहा है। मुझे यकीन नहीं है कि मैं क्या कर रहा हूं।

      awk 'NR == 1 || एनआर% 3! = 0 'फाइल  

    क्यों कोई सुराग?

    आपको % 3 का उपयोग करने का सही विचार था - बस जब से आप 3 की बजाय 2 पंक्ति से शुरू करना चाहते हैं। NR == 1 के लिए परीक्षण अनावश्यक है , मॉड्यूलस टेस्ट के भीतर गिरने, लेकिन यह किसी भी परेशानी पैदा नहीं कर रहा है:

      $ awk '(एनआर + 1)% 3' फ़ाइल लाइन 1 लाइन 3 लाइन 4 लाइन 6 लाइन 7 लाइन 9 लाइन 10 लाइन 12 रेखा 13 पंक्ति 15  

    windows - MSMQ enabling error -


    मुझे MSMQ सक्षम करने में समस्या हो रही है।

    मेरी विशिष्ट त्रुटि

    संदेश कतारबद्ध सेवा ... डोमेन में शामिल नहीं होगी। एक MSMQ कॉन्फ़िगरेशन (एमएसएमसी) ऑब्जेक्ट सर्विस आईडी से भिन्न आईडी के साथ नए डोमेन में मौजूद है कृपया नए डोमेन में MSMQ कॉन्फ़िगरेशन ऑब्जेक्ट को हटाएं, संदेश इन्यूइंग सेवा को पुनरारंभ करें, और फिर से लॉग ऑन करें।

    क्या इस समस्या से पहले किसी को भी सामना करना पड़ा? मैंने कई समाधान लागू करने की कोशिश की, लेकिन यह समझ नहीं सका कि यह वास्तव में क्या कारण है।

    इस समाधान को लागू करने की कोशिश की लेकिन काम नहीं किया

    मैंने इस खुले रजिस्ट्री संपादक की कोशिश की रजिस्ट्री संपादक को खोलने के लिए, प्रारंभ क्लिक करें खोज बॉक्स प्रकार regedit में, और उसके बाद ENTER दबाएँ रजिस्ट्री संपादक में, HKEY_LOCAL_MACHINE विस्तृत करें, सॉफ़्टवेयर का विस्तार करें, Microsoft विस्तृत करें, MSMQ का विस्तार करें, और उसके बाद सेटअपक्लिक करें। कंसोल ट्री में, डबल-क्लिक करें msmq_ad एकीकृत। पुष्टि करें कि मान डेटा 1 पर सेट है। MSMQ के अंतर्गत, पैरामीटर का विस्तार करें विवरण फलक में, कार्यसमूह पर डबल क्लिक करें सत्यापित करें कि मान डेटा 1 पर सेट नहीं है।

    मुझे अंत में पता चला

    समस्या यह है, मैंने आईआईएस की डिफ़ॉल्ट वेबसाइट को हटा दिया, मैं इसे वापस लाया, तब मैं MSMQ को सक्षम कर सकता


    javascript - dojo get parent of present node in foreach -


    In jQuery, I used the parent () function for the immediate parent of any element,

    $ (this). Parent ();

    The same I want in the dojo is my loop this way. / Var / url = dojo.attr (node, "href"); // I want to get the node's parent, which will be completely different for each iteration)};

    Someone gave me a hint, I tried to use the parent. I am trying to add the parent to the node like this

      dojo.place ("& lt; span style = 'color: green' & gt; url & lt; / Span & gt; ", query (node) .parent ()," last ");  

    I'm getting this error in firebug

    type error: _365.appendChild function is not

    Regards

    Adam

    Here are some problems:

    1. dojo.place () or dojo / dom-build :: location () dojo / nodeList for use by API dojo / Query . In place of such use modules such as dojo / nodeList-manipulate or dojo / nodeList-dom . Since you are a jQuery user, I recommend using the dojo / nodeList-manipulate as it does a mix of jQuery APIs.
    2. To retrieve the origin of a DOM node, you actually have the parent () method, but that part of the API is available only when you Dojo / nodeList-traverse .

    An example using this feedback:

      is required (["dojo / query "Dojo / Nodist-Trowers", "Dojo / Node List-Heripple", "Dojo / domReady!"], Function (query) {query (". EntryURL"). ForEach (function (node, index, ARM) { Query (node) .parent ("& lt; span style = 'color: green' & gt; url & lt; / span & gt;);});});  

    JSFiddle:


    c++ - Getting out of range error, while the requested item should be in bound -


    I am working on a protocol to use future projects on microcontrollers. I am using a library which will give me standard C ++ attributes, such as vector s

    to use. When requesting an item, the vector is giving error outside the boundary thing is that the object should be in range because the size of the vector is larger than the requested element.

    The problem occurs in the following code:

      // These two variables are defined (as a method parameter) // Some values ​​of the dummy value string Are s = "this_is_some_string"; // This is a string that should be divided into four splitChar = '_'; // This is the delimiter character // Define a vector to store string parts in the vector & lt; String & gt; STR; // split string int start = 0, end = 0; While ((end = s.find (splitChar, start))! = String :: npos {strs.push_back (s.sstr (start, end-start)); Start = end + 1; } Strs.push_back (s.substr (start)); // Print the vector size for the displaying serial. Print ("vector shape:"); Serial.println (strs.size ()); // Loop through vector (int i = 0; i  

    This is a code part by some method that divides a string into several substrings by a delimiter character. The first two variables are defined using two method parameters, but I put them there for example work. serial.println (""); I am using Arduino libraries to print debug messages using which is running on my computer.

    When the error occurs, the following output is given in the console:

      The size of the vector: 1 [0] Invalid subscript  
    < P> Then the program ends with invalid subscript string comes from vector :: at (int i); The method that returns "invalid subscription" string when there is a request that the request is out of bound () is odd, that the requested element should not be bound. In fact, the size of the vector is 1, whereas the requested element is at position 0 (this should be the only element which can be requested in this case). In addition, string :: c_str (); The method is used to create four arrays to print in the console, because arduino serial.println (""); Method

    Itemprop = "text">

    Such It seems that :: does not work with the Arduino IDE, try to use strlen () - 1 instead of

      while ((end = s.find (splitChar, start)) = Strlen (s) -1) {strs.push_back (s.sstr (start, end-start)); Start = end + 1; }  

    instead of

      while ((end = s.find (splitChar, start)) = String :: npos {strs.push_back ( ) S.substr (start, end-start)); Start = end + 1; }  

    Crash when detect wifi state at android.net.wifi.STATE_CHANGE -


    I want to get the wifi state , when there is a change in the wifi status:

    Clear:

      & lt; Intent-Filter & gt; & Lt; Action Android: name = "android.net.wifi.STATE_CHANGE" /> & Lt; / Intent-Filter & gt;  

    Service:

      Wifi manager chief wifia obz; Override public zero at @Receive (reference reference, intent to intent) {WifiInfo wifiInfo = mainWifiObj.getConnectionInfo (); String WifiState = ""; If (mainWifiObj.isWifiEnabled ()) {WifiState = "WiFi On"; } And {wifiastat = "wifi off"; }}  

    but it crashes on WifiInfo wifiInfo = mainWifiObj.getConnectionInfo (); What's wrong?

    You have not initiated the WifiManager object on this method obtained in this way

    Main WiFiobject = (Wifi Manager) Reference. Gate System System (Reference. WIFI_SERVICE);

    .htaccess - htaccess rewrite query string for all pages -


    I have this and what it does, this query string changes as you will see in the example below: < / P>

      & lt; IfModule mod_rewrite.c & gt; # Option Allow all directories index index.php RewriteEngine On RewriteBase / folder / RewriteRule ^ Page /([^/.]+)/?$ otherpage.php? Id = $ 1 [L] & lt; / IfModule & gt;  

    So if I have the link:

    This will allow htaccess to use that link:

    < /

    P>

    and mypage2.php, andpage3.php, etc.

    Try adding this rule:

      ([^ /.] +) / Page / ([0- 9] +) $ / $ 1.php? Id = $ 2 [L]  

    php - Update PDO bind key and values -


    So I've recently switched to using PEDO instead of mysqli I now have to attach important values ​​with mysqli There is a question about doing so I escaped the keys and values ​​opened through it and used them in my questions, now I want to do the same thing in the pedo but it is not working and I do not know if it Why is my code:

      foreach ($ Key $> $ userdata as $ value) {$ sql = $ this- & gt; Db- & gt; Prepare ("UPDATE` users` SET: key =: value WHERE` id` =: userid "); $ Sql- & gt; Execution (array ('key' = & gt; $ key; 'value' = & gt; $ value, 'user id' = & gt; $ userid)); }  

    There is more code to see that it requires updating and other types of input which requires more recognition but this is the main query that I used but without compulsion . Is it possible with PWO and binding parameters and prices? This is an error I get:

      SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; Check the manual related to your MySQL server version for the correct syntax to use the nearby 'username' = 'sjerdus' WHERE`Id` = '2' 
    < P>

    You have this error because you have tried to update the dynamically named field SET: key = ... can not work because when the parameter is replaced with its value, it will be saved by PDO (and the quote L).

    If you want to keep a variable field name that will be updated, you will need to manually insert the name of the field, but you have to check for yourself security.

    Try doing something like this:

    <$ Sql ​​= $ this-> Db- & gt; Prepare ("Set Up User" SET "$ field." = "Value WHERE id id =: User ID"); $ Sql- & gt; Execution (array ('value' = & gt; $ value, 'user id' = & gt; $ userid));

    Harmon.ie error when upload file -


    After completing Harmo.ie for Outlook 2010, I tried to upload a file to a custom document library. . For information, the document library uses the custom content type and has the item receiver attached (item-added and item updates). For some time, harmon.ie displays an error, which states "File can not be uploaded to the selected library."

    After debugging, there was an error before the item receiver. Does anyone know about this issue? I like this in our ULS logs and I bug but no luck !!

    Here try to isolate the stack trace of harmo.ie:

    Access Com. Mainsoft.sharepoint.sidebar.SideBarViewPart 4 0 0 0 3/16 14: 42: 25.892 Message Impossible De télécharger ... 'versa la Bibliothèque sélectionnée. Le telechargement do feature ... 'N'A near Pu etre Termini. ! Stack 0 com.mainsoft.sharepoint.sidebar.services.UploadOperationFailedException: Le Téléchargement du fichier '...' N'a verse Pu Sentence Termine. On com.mainsoft.sharepoint.sidebar.services.UpdateMetadata.onAfterUpload com.mainsoft.sharepoint.sidebar.services.FilesUploader.uploadNextDocument (FilesUploader.java:169) (UpdateMetadata.java:74) on com.mainsoft.sharepoint.sidebar .services.FilesUploader.upload (FilesUploader.java:126) com.mainsoft.sharepoint.sidebar.services.FilesUploader.upload (FilesUploader.java:107) on com.mainsoft.sharepoint.sidebar.operations.BaseFilesUploadOperation.run (BaseFilesUploadOperation java: 157) in com.mainsoft.common.Job on com.mainsoft.common.OperationBase.run (OperationBase.java:94) com.mainsoft.common.OperationBase $ 1.run (OperationBase.java:33) $ SecondJob the .run org.eclipse.core.internal.jobs.Worker.run (Job.java:191) (Worker.java:55) on java.lang.Thread.threadProc (Thread.java:2297) on java.lang. utionContext on cli.System.Threading.ThreadHelper.ThreadStart_Context (Unknown Source) $ 1.Invoke (Thread.java:797) Thread cli.System.Threading.ThreadHelper.ThreadStart (Unknown Source) at cli.System.Threading.Exec. Run (unknown source)

    Run Fiddler sent harmon.ie for SharePoint request To find out - you can give some details of the details. Also try the same operation against a library, which does not have any event handler.


    java - Everything I do is either over-complicated or wrong -


    <पूर्व> // ****************************************************** ******************** दूरी // जावा दूरी दूरी की गणना करता है जावा में दो बिंदुओं के बीच: // **************************************************************** *************************** आयात java.util.Scanner; आयात करें java.lang.Math; सार्वजनिक श्रेणी दूरी {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {डबल एक्स 1, y1, x2, y2; दो बिंदुओं के दो दिशाओं के निर्देशांक; // अंक के बीच दूरी // फॉर्मूला - डी = √ (x2-x1) ^ 2 + (y2-y1) ^ 2 स्कैनर स्कैन = नया स्कैनर (सिस्टम।); // दो बिंदुओं में पढ़ें system.out.print ("पहले बिंदु के निर्देशांक दर्ज करें" + "(उनके बीच एक स्थान डालें):"); X1 = स्कैन। एनएक्सडी डबल (); Y1 = scan.nextDouble (); System.out.print ("दूसरे बिंदु के निर्देशांक दर्ज करें:"); X2 = स्कैन। एनएक्सडी डबल (); Y2 = स्कैन। एनएक्सडी डबल (); // दूरी की गणना दोहरे गणित = x1-x2 * y1-y2; // उत्तर system.out.print प्रिंट करें ("(+ + 1 +", "+ x2 +") और ("+ y1 +", "+ y2 +") के बीच की दूरी "); }}

    मैं त्रुटियों में चल रहा हूं और मैं हमेशा उन कोडों के साथ जाता हूं जो कि तेज़ और कम किए जा सकते हैं मुझे जो कुछ करना है वह निर्देशांक के लिए उपयोगकर्ता इनपुट को पढ़ता है, उन दोनों के बीच की दूरी को खोजता है, और उत्तर मुद्रित करता है।

    पहले आप अपना अंक क्लास बनाते हैं। याद रखें यह जावा और ओओपी

      वर्ग बिंदु {निजी डबल एक्स; निजी डबल y; निजी स्ट्रिंग का नाम; सार्वजनिक बिंदु (स्ट्रिंग एन, डबल एक्सएक्स, डबल या) {this.name = n; This.x = xx; यह। Y = yy; } सार्वजनिक डबल getX () {return.x; } सार्वजनिक डबल getY () {यह return.y; } सार्वजनिक स्ट्रिंग getName () {this.name; }}  

    दूसरा, आप दूरी की गणना विधि के साथ अपने दूरस्थ कक्षा बनाते हैं

      सार्वजनिक डबल getEuclideanDistance (प्वाइंट पी, प्वाइंट क्यू) {double ed = Math Sqrt ((q.getX () - p.getX ()) * (q.getX () - p.getX ()) + (q.getY () - p.getY ()) * (q.getY () - पी.जी.ए.टी.इ. ())); लौटा हुआ; }  

    अंत में आप नीचे मुख्य विधि को संशोधित कर सकते हैं

      सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {डबल एक्सपी; डबल वाईपी; डबल एक्सक; डबल Yq; स्कैनर रीडर = नया स्कैनर (System.in); System.out.print ("पी का एक्स-कॉर्डिनेट प्रविष्ट करें:"); एक्सपी = रीडर। एनएक्सडी डबल (); System.out.print ("पी की y- कोर्निनेट प्रविष्ट करें:"); वाईपी = रीडर। एनएक्सडी डबल (); System.out.print ("क्यू का एक्स-कॉर्डिनेट प्रविष्ट करें:"); एक्सक = रीडर। एनएक्सडी डबल (); System.out.print ("क्यू के वाई-कॉर्डिनेट प्रविष्ट करें:"); Yq = रीडर। एनएक्सडी डबल (); बिंदु q = नया बिंदु ("Q", Xq, Yq); बिंदु पी = नया बिंदु ("पी", एक्सपी, वाईपी); System.out.println ("बिंदु" + p.getName () + "'के निर्देशांक हैं:" + "P (" + p.getX () + "," + p.getY () + ")"); System.out.println ("बिंदु" + q.getName () + "के निर्देशांक हैं:" + "क्यू (" + q.getX () + "," + q.getY () + ")"); System.out.println ("ईक्लिडियन दूरी पी से q है:" + ईसीक्लिडियन डिस्टेंस (पी, क्यू)); }  

    c# 4.0 - Site scraping: why am I getting DNS issues after multiple hits? -


    I am scraping a site for every 50-90 seconds of data, which is the C # console application. Running on NT 4.5 There are some values ​​in it that I am posting on the site and stop some other process based on the returned value. The problem is after saying about a thousand hits or so I look like a DNS error. I am trying to decide what is the source of the problem first, before trying to fix it. Below are some of the errors that I see in my logs:

    1. Remote name could not be resolved
    2. Unable to connect to remote server
    3. Faced unexpected character while parsing the value & lt;. Path '', line 0, position 0
    4. An existing connection unable to read data from the transport connection was forcibly closed by the remote host.
    5. Connection unable to read data from the transport An established connection was rejected by the software in your host machine.

    About 60% of the time I got the first error. The remaining 40% is divided between the errors listed above. Are they the problems arising from websites that I am scanning at intervals or some other DNS? For all practical purposes, I can fix the scrapping website properly until I keep the interval between automatic hits above 45 seconds which I am doing. The data I am downloading is on average 30kb per hit, please help me understand what is going wrong and what I can try to do.

    D says that you are running against an automated system that protects the site against DDOS attack Is designed to be.

    It is seeing that your single IP address is repeatedly killing in a short time and is just blocking your resolution of the last server


    python - search inside one string and eliminate the found positions in an accompanying list -


    I have a string with text and a list together, in which the first list contains information about each character. For example:

      text = "this, and this test is AMS" text INFO = [1, 4, 6, 7, 8, 3, 6, 2, 4, ... 7, 0]  

    Where every position in the list refers to a character is the text, i.e. lane (text) == lane (text info) where the text is INFO [i] in ith The character information is in the text.

    I want to end the examples of "this" in the text, and I want to eliminate those letters (i.e. 4 terms referenced in the list)

      tmpText = Text tmpTextInfo = textInfoM = re  

    Search ("this", tmpText) while m: tmpText = tmpText [0: m.start ()] + tmpText [m.end ():] tmpTextInfo = tmpTextInfo [0: m.start ()] + tmpTextInfo [m. End ():] m = re.search ("this", tmptext) text = tmptext textInfo = tmpTextInfo

    It works and receives what I hope for example: If the input is

      text = "this test is it" textInfo = [0,1,2,3,4,5,6,7,8,9,10, 11,12, 13,14,15,16]  

    Then the resulting text and text will be infra string

      text = "test is" textInfo = [4, 5 , 6, 7, 8, 9, 14, 15, 16]  

    But this does not sound like a dragon at all, and I Sector sure there is more compact and efficient way to do it, what is it?

    OK, I do not think that if you actually have a regular expression You can simply put the list of stars in the store and connect with them at the end but it will not improve the readability.

    If the problem is about removing the tokens different from the space or punctuation marks, then you generate the generator for a pair of tokens with the related textInfo After that you can filter by token (or attached information if you want) and you can add both lists again. But I'm not sure that it will actually bring anything.


    c - Robot framework cant load .dll file created by cygwin into python script -


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

    क्या सिगविन निर्मित डीएलएल फ़ाइल आरटीएफ द्वारा समर्थित नहीं है? < / P>

    क्या कोई उस के लिए कोई अन्य तरीका सुझा सकता है?

    टिप्पणियों में हमारी चर्चा को देखते हुए । आप इस तरह से मिश्रण और मेल नहीं कर सकते। प्रारूप कि साइगविन एक DLL बनाता है, यह अलग है कि प्रारूप में विंडोज को एक DLL की उम्मीद है। आपको एक वातावरण में सभी को बनाने और चलाने की आवश्यकता है।


    java - Populate spinner with custom object -


    I want to populate my Android spinner with data from a SQLite table. I already have a database controller, and these are returning custom objects.

    Now what I have to do is to pop the spinner with this object so that the string field can not be found, but the id field for example: field ID and my table with day:

    ID - Day 1 - Sunday

    2 - Monday

    3 - Tuesday ...

    And in the day of the object, two properties (id and Name)

    I want the spinner to be shown "Monday", but internally, store the id field '2' in an int variable. , Again to ask the database again with the selected values.

    I think I have to do it with the adapter, but I do not know what I can do with this controller.

    Thank you

    SetAdapter . To populate your spinner through the ArrayAdapter & lt; T & gt; .

      Private list & lt; MyData & gt; Information; ... mySpinner.setAdapter & lt; MyData & gt; (New array adapter (getContext (), resId, data)); ... public class MyData {Private Int _id; Public MyData (int id) {this._id = id; } @ Override public string to string () {switch (this._id) {....}}}  

    angularjs - JSON API Error - You need to login with a user that has 'edit_posts' capacity -


    I am creating an app on angular and eonic, using my wordpress and trying to create new posts I am here.

    1. I have generated auth cookie using the JSON API user plugin ()
    2. I have got a valid blockade to make the post.
    3. I 'am using all the correct parameters to create a new post:

      $ http.post (domain +' / post / create_post? Nonstatus = '+ Non.nc + '& title =' + title + 'and content =' + content + 'and status =' + status + 'and author =' + author)

    But when I try to insert a new post, I get this massage: "Error: You need to login with the user with 'edit_posts'"

    I have That Uje add cookie parameter in the header request, but I do not understand how.

    This is about the user's role, not auth cookie certified cookie Users are logged in, but their roles and capabilities are stored in the database. There are several ways to change the user's role, with the administrator going to admin dashboard, clicking the user, selecting the user name, and selecting "editor" [or whatever is appropriate] in the drop down menu.


    php - GAE Task Queues and Error 302 "App Error" -


    I am trying to use the work on GAE for some async processes.

    I can get into the job in the queue, but I am getting the error 302 "App Error" in the log and they are just constantly trying again.

    I am doing this in CodeIgniter, so I am thinking that the URL parameter is wrong?

    code:

      $ task = new pushtask ('/ path / to / endpoint', ['id' = & gt; $ id]); $ Task_Name = $ Task- & gt; Add ();  

    The path to the end point is relative to the domain, but I think that may be the problem. Using Site_url () or base_url () does not work!

    My end point controller is set to use POST data:

      $ id = $ this- & gt; Input-> Post ('id');  

    app.yaml:

    Applications: & lt; Project-name & gt; Version: 1 runtime: php API_version: 1 thread: true handlers: - url: /.* script: index.fp

    I had the same problem when an exiting program was migrating. There were several files in the work, and one of them had an additional "header (url) return", 302 and repeated attempts were made. Perhaps something similar is the reason for your problem.

    I have also come to know that any error in the code generates a header response outside the 200-299 range, due to retrying the job. As my job is an email that is sent in the error, I have to give dozens of clients of the same email against extra security against task_retry_limit: 0 with a Qi. Yll file is added.


    android - app crashes after exiting? -


    I am creating an application that has multiple horizontal visibility, overall the app runs well, but when the user is out If the exit boom app crashes, logs I think that there are several markers in onPostExecute:

      rootview = inflater.inflate (R.Layout.three_framement, container, incorrect); L1 = (linear timer) rootview.findvibid (rid. Leaner layout 1); L3 = (TextView) rootView.findViewById (R.id.CheckTest); Contract = (progress bar) rootview.findvibid (RID progressive); BooksList = New Arrestist & lt; Books & gt; (); New JSONAsyncTask () Execute ("http://192.168.30.3/actors/book_tab2.php"); CenterLockHorizontalScrollview = (CentreLockHorizontalScrollView) rootView.findViewById (R.id.HMscrollView); Adapter = new cardhome adapter (getActivity), R. timber out.ro_home_card, book list); CenterLockHorizontalScrollview.SsetAdapter (TabThreeFragment.this, adapter); RootView.setLayoutParams (New Frame Layout. LayoutParams (Frame Layout. LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT)); }}  

    onPostExecute:

      protected void onPostExecute (Boolean result) {adapter.notifyDataSetChanged (); If (result == incorrect) toast. MakeActivity (), "unable to get data from server", Toast.LNGTH_LONG). Show (); If (list of books! = Null) {adapter = new cardhome adapter (getActivity). GetApplicationContext (), R.Liloot.ro_heemcard, Book List); CenterLockHorizontalScrollview.SsetAdapter (TabThreeFragment.this, adapter); }  

    Error:

      03-07 11: 49: 21.478: E / Android time (9703): fatal exception: main 03-07 11:49 : 21.478: e / AndroidRuntime (9703): java.lang.NullPointerException 03-07 11: 49: 21.478: e / AndroidRuntime (9703): $ JSONAsyncTask.onPostExecute on br.liveo.fragments.TabThreeFragment (TabThreeFragment.java:344) 03-07 11: 49: 21.478: e / AndroidRuntime (9703): br.liveo.fragments.TabThreeFragment 03-07 11 to $ JSONAsyncTask.onPostExecute (TabThreeFragment.java:1): 49: 21.478: e / AndroidRuntime (9703) : 03-07 on android.os.AsyncTask.finish (AsyncTask.java:631) 11: 49: 21.478: e / AndroidRuntime (9703): on android.os.AsyncTask.access $ 600 (AsyncTask.java:177) 03 - 07 11: 49: 21.478: e / AndroidRuntime (9703): 49 :: 21.478: e / AndroidRuntime (9703): on Android android.os.AsyncTask $ InternalHandler.handleMessage (AsyncTask.java:644) 03-07 At 11 OSHANDLER DISVEPECH MESSAGE (Handler. Java: 99) 03-07 11: 49: 21.478: E / Android Random (9 703): Android.OS Lopper. On Loop (Looper.java:137) 03-07 11: 49: 21.478: E / AndroidRuntime (9703): android.app.ActivityThread.main (ActivityThread.java:4961) on 03-07 11: 49: 21.478: E / AndroidRuntime (9703): java.lang.reflect.Method.invokeNative at (native methode) 03-07 11: 49: 21.478: E / Android Retentmann (9 703): at java.lang.reflect.Method.invoke (method Kjawatr 11) 03-07 11: 49: 21.478: e / AndroidRuntime (9703): on com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:1004) 03-07 11: 49: 21.478: e / AndroidRuntime (9703): com.android.internal.os.ZygoteInit.main (ZygoteInit.java:771) 03-07 11: 49: 21.478: e / Androidrentaim (9703): on Dalvik.system.NativeStart.main (Basic method)  

    When you exit the application They are, and are still executed to execute the post, then attempts to open the activity to display a toast or to create a new adapter, but because your application has been killed, the functionality is no longer present. , So you get a null pointer exception. If you want to show a toast or a new adapter, or after hitting your work in the ondstory function of your activity, check if (getActivity ()! = Null)

      PostExecute (Boolean result) on protected void {if (getActivity ()! = Null) {adapter.notifyDataSetChanged (); If (result == incorrect) toast. MakeActivity (), "unable to get data from server", Toast.LNGTH_LONG). Show (); If (list of books! = Null) {adapter = new cardhome adapter (getActivity). GetApplicationContext (), R.Liloot.ro_heemcard, Book List); CenterLockHorizontalScrollview.SsetAdapter (TabThreeFragment.this, adapter); }}  

    android - view pager with fragment -


    I want to use it in a different class in Android, to get the status of it.

    class method is declared

      the public class adaptador extends to BaseAdapter { 

    and the method

     < Code> @Override public view getView (* int position *, see Converter V, view group guardian) {Final View View; Final View Holder Holder; If (tap == convertive Vive) {view = mLayoutInflater.inflate (mResourceId, parent, wrong); Holder = new viewholder (); Look steady! = Null; Holder.image = (ImageView) view.findViewById (R.id.image); Holder.title = (TextView) view.findViewById (R.id.title); View.setTag (holder); } Else {view = convertirView; Holder = (seeholder) view.getTag (); } Tie footage (holder, position); Return view; }  

    I want to get the status of this method.

    post
      viewpager.setOnPageChangedListener (New OnPageChangedListener) {@Override Public Zero onPageScrolled (integer status, Name positionOffset int positionOffsetPixels) {} @Override Public Zero onPageSelected (integer position) {// state is your current status} @Override page; Public Zero on SkyStolt ChangeZ (Int State) {}});  

    database - How to change directory dumpfile in impdp? -


    I am using impdp to import a backup but I use the default directory dumpfile Want to change

      $ impdp system / password @ $ ORACLE_SID schema = USER_SCHEMA dump file = mydumpfile.dmp logfile = impdpmydumpfile.log Import: Release 11.2.0.3.0 - Mon output on 16 Mar 09:32:05 2015 Copyright (c) 1982, 2011, Oracle and / or its affiliates all rights reserved. Oracle Database 11G Release 11.2.0.3.0 - 64 bit Production ORA-39001: Invalid logic value ORA-39000: bad dump file specification ORA-31640: Unable to open dump file "/ u01 / app / oracle / admin / mydatabase / Dpdump / mydumpfile.dmp "ORA-27037: Unable to obtain file status Linux-x86_64 error: 2: No such file or directory Additional information: 3  

    with:

      impdp system / password @ $ ORACLE_SID schema = USER_SCHEMA directory = MY_DIR \ dumpfile = m Ydumpfile.dmp logfile = Impdpmydumpfile.log  

    This is DATA_PUMP_DIR , which is possibly / u01 / app / oracle / admin / mydatabase / dpdump Is set to your system.

    To use a different directory, you must (or your DBA) in the database, which indicates the Oracle-visible operating system directory in which you put the file, and grant the user privileges. Do import


    c++ - What's the reason of int* conversion not permitted to int error? -



    c++ - What's the reason of int* conversion not permitted to int error? -

    #include <iostream> #include <algorithm> #include <string> using namespace std; int minimu ( int a, int b, int c ); int main (void) { int t,i,j; cin>>t; while ( t != 0 ) { string a; string b; cin>>a>>b; int k; int len1 = a.length(); int len2 = b.length(); int dp[len1][len2]; dp[0][0] = 0; ( = 0; < len1; i++ ) { dp[i][0] = i; } ( j = 0; j < len2; j++ ) { dp[0][j] = j; } ( = 1; < len1; i++ ) ( j = 1; j < len2; j++ ) { if ( a[i] == b[j] ) k = 2; else k = 0; dp[i][j] = minimu(dp[i-1,j]+1,dp[i,j-1]+1,dp[i-1][j-1]+k); } cout<<dp[len1-1][len2-1]<<"\n"; t--; } homecoming 0; } int minimu ( int a, int b, int c ) { int foo = min(a,min(b,c)); homecoming foo; }

    this programme calculating minimum number of operations while converting 1 string string. allowed operations converting are:

    1. deleting character 2. inserting character 3. substituting character

    now, when compile program, shows error that:

    invalid conversion int* int[-fpermissive]

    in line update 2-d array dp[i,j]. why happening?

    because of declaration:

    int dp[len1][len2];

    dp[i-1,j] array, not element of matrix. (here comma operator can confusing, @bartoszkp has explained.)

    perhaps

    minimu(dp[i-1,j]+1,dp[i,j-1]+1,dp[i-1][j-1]+k);

    should be

    minimu(dp[i-1][j]+1,dp[i][j-1]+1,dp[i-1][j-1]+k); // ^ ^

    p.s. please note int dp[len1][len2]; non-const sizes not valid according c++ standard, @cheers , hth said.

    c++

    mysql - PHP prepared statement loop JOIN query not working -



    mysql - PHP prepared statement loop JOIN query not working -

    i trying gather variables query output them using $stmt->bind_result() not getting rows returned in search.

    i not sure going wrong here?

    $tag = trim($_get['tag']); $stmt = $mysqli->prepare('select trips.trip_id trips bring together tags on trips.post_id = tags.post_id tag = ?'); $stmt->bind_param('s', $tag); $stmt->execute(); $stmt->bind_result($id); while ($stmt->fetch()) { echo $id; }

    php mysql sql join

    multithreading - Can my javascript function be interrupted by an animation frame -



    multithreading - Can my javascript function be interrupted by an animation frame -

    i have learned requestanimationframe , how can used schedule animation code in sync browser's internal draw loop. still bit unclear how browser handles type of scheduling. interrupt scripts if necessary perform animations?

    consider next bit of javascript code:

    function dostuff() { var animated = false; var animation = function() { // perform animation animated = true; } requestanimationframe(animation); // perform more operations here // q: animated guaranteed false here?? }

    i know javascript single-threaded gut feeling under no circumstances should animation() have been called when reach lastly line of dostuff(). here can give more informed answer.

    you're correct, callback won't called until @ to the lowest degree phone call dostuff has completed.

    the nascent specification animation stuff refers html5 spec's concept of queuing task window's event loop. same concept used settimeout , setinterval, when time has expired, , means while callback queued @ moment in time, browser waits until main javascript ui thread next available before executing next task in queue. same thing happens events; event can happen @ time, including while javascript code running, phone call handler queue until main ui thread free handle it.

    i know javascript single-threaded...

    javascript, language, silent on concept of threading. in browsers, there's 1 main thread can interact dom, , 0 or more web worker threads can't (they can other things, , exchange messages main ui thread, arrive event callbacks, are...queued above :-) ).

    javascript multithreading animation requestanimationframe

    SQL Server cannot show apostrophe (') when database is restored -



    SQL Server cannot show apostrophe (') when database is restored -

    i restore database , select rows. apostrophe (') cannot show correctly. info type of column varchar.

    the actual text

    cm's approval - payment of legal

    but shown this:

    https://drive.google.com/file/d/0b5_hciy4bujmwfrftkr0bm5qofe/view?usp=sharing

    any suggestion please.

    sql-server

    php - how to get table fields in yii? -



    php - how to get table fields in yii? -

    i working on new controller user role.

    when called $user = new user(); user table form fields value display

    <?php public function actioncreate() { $request = yii::app()->request; $notify = yii::app()->notify; $user = new user(); if ($request->ispostrequest && ($attributes = (array)$request->getpost($user->modelname, array()))) { $user->attributes = $attributes; if (!$user->save()) { $notify->adderror(yii::t('app', 'your form has few errors, please prepare them , seek again!')); } else { $notify->addsuccess(yii::t('app', 'your form has been saved!')); } yii::app()->hooks->doaction('controller_action_save_data', $collection = new cattributecollection(array( 'controller' => $this, 'success' => $notify->hassuccess, 'user' => $user, ))); if ($collection->success) { $this->redirect(array('users/index')); } } $this->setdata(array( 'pagemetatitle' => $this->data->pagemetatitle . ' | '. yii::t('users', 'create new user'), 'pageheading' => yii::t('users', 'create new user'), 'pagebreadcrumbs' => array( yii::t('users', 'users') => $this->createurl('users/index'), yii::t('app', 'create new'), ) )); $this->render('form', compact('user')); } ?>

    display form

    <?php echo $form->labelex($user , 'first_name');?> <?php echo $form->textfield($user , 'first_name', $role->gethtmloptions('first_name')); ?> <?php echo $form->error($user , 'first_name');?>

    but when $role = new role(); user role table getting error

    <?php public function actioncreate() { $request = yii::app()->request; $notify = yii::app()->notify; $role = new role(); if ($request->ispostrequest && ($attributes = (array)$request->getpost($role->modelname, array()))) { $role->attributes = $attributes; if (!$role->save()) { $notify->adderror(yii::t('app', 'your form has few errors, please prepare them , seek again!')); } else { $notify->addsuccess(yii::t('app', 'your form has been saved!')); } yii::app()->hooks->doaction('controller_action_save_data', $collection = new cattributecollection(array( 'controller' => $this, 'success' => $notify->hassuccess, 'user' => $user, ))); if ($collection->success) { $this->redirect(array('users_role/index')); } } $this->setdata(array( 'pagemetatitle' => $this->data->pagemetatitle . ' | '. yii::t('roles', 'create new role'), 'pageheading' => yii::t('roles', 'create new role'), 'pagebreadcrumbs' => array( yii::t('roles', 'roles') => $this->createurl('users_role/index'), yii::t('app', 'create new role'), ) )); $this->render('form', compact('role')); } ?>

    not display form

    <?php echo $form->labelex($role, 'role_name');?> <?php echo $form->textfield($role, 'role_name', $role->gethtmloptions('role_name')); ?> <?php echo $form->error($role, 'role_name');?>

    plz help me..

    php yii

    ios - nsuserdefault not saving array - Swift -



    ios - nsuserdefault not saving array - Swift -

    i can single string save nsuserdefaults not sure why won't save array using below code. sure little utilize pointer.

    // // viewcontroller.swift // demouserdefaults // // created chris cantley on 10/7/14. // copyright (c) 2014 chris cantley. rights reserved. // import uikit class viewcontroller: uiviewcontroller { var storenames:[string] = [] override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. storenames.append("billy") storenames.append("chris") // shows strings in array. println(storenames) // puts mutable immutable object allow holdnames = storenames // "should" store object userdefaults... not. nsuserdefaults.standarduserdefaults().setobject(holdnames, forkey: "storenames") nsuserdefaults.standarduserdefaults().synchronize() // displays info in userdefaults... array missing. println(nsuserdefaults.standarduserdefaults().dictionaryrepresentation()) } }

    the result...

    [billy, chris] [nslanguages: ( en ), appleitunesstoreitemkinds: ( audiobook, "tv-episode", booklet, software, "software-update", "itunes-u", ringtone, "tv-season", movie, mix, newsstand, song, wemix, tone, artist, "podcast-episode", podcast, document, ebook, album, "music-video" ), applekeyboardsexpanded: 1, nsinterfacestyle: macintosh, applekeyboards: ( "en_us@hw=us;sw=qwerty", "emoji@sw=emoji", "en_us@hw=us;sw=qwerty" ), applelanguages: ( en ), names: rob]

    note : "names:rob" previous single string save.

    figures... post question have spend hours looking reply on own, , minutes later find solution.

    anyways, seem nsuserdefaults doesn't "string" changing "nsstring" works.

    so alter is...

    var storenames:[string] = []

    to

    var storenames:[nsstring] = []

    ios arrays swift nsuserdefaults

    cursor - game coding in python using pygame -



    cursor - game coding in python using pygame -

    how write code such image controlled mouse motion in python using pygame?

    i appreciate if help writing of code because have absolutely no thought how it.

    i have tried this:

    #!/usr/bin/env python # -*- coding: utf-8 -*- import pygame import random pygame.init() size=[800,600] screen=pygame.display.set_mode(size) pygame.display.set_caption("sub dice") background_position=[0,0] background_image=pygame.image.load('c:\users\shivangi\desktop\shivangi project\program\star.png').convert() card=pygame.image.load('c:\users\shivangi\desktop\shivangi project\program\lappy.png').convert_alpha() card=pygame.transform.smoothscale(card,(130,182)) closedeckshirt=pygame.image.load('c:\users\shivangi\desktop\shivangi project\program\star.png').convert_alpha() setfps=30 zx=0 zy=0 done=false clock=pygame.time.clock() while done==false: clock.tick(setfps) event in pygame.event.get(): if event.type == pygame.quit: done=true if event.type == pygame.mousebuttondown: print('a') screen.blit(background_image, background_position) screen.blit(card,[zx,zy]) zx=zx+2 zy=zy+2 pygame.display.flip() pygame.quit ()

    however, motion restricted 1 direction irrespective of move mouse. want image move forwards , have sideways motion controlled motion of mouse.

    also, aim create game wings on water available @ orisinal.

    you're close making work. i've made few little edits.

    so, programme has 2 problems. first programme moving image on every pygame.event regardless of event -- you'll see hitting key, clicking mouse etc. sec problem you're moving image in fixed direction.

    the thing changed while loop:

    while done==false: clock.tick(setfps) event in pygame.event.get(): if event.type == pygame.quit: done=true if event.type == pygame.mousebuttondown: print('a') if event.type == pygame.mousemotion: # want move image when mouse moved. mouse_position = pygame.mouse.get_pos() # mouse at? screen.blit(background_image, background_position) screen.blit(card,[zx,zy]) zx=mouse_position[0] # mouse_position in form [x,y], want x part zy=mouse_position[1] pygame.display.flip()

    as can see, pygame has mouse.get_pos() function gets location of mouse on screen. (x,y) coordinate.

    python cursor pygame mouse movement

    c# - Dynamically generated lambda giving different result than regular lambda -



    c# - Dynamically generated lambda giving different result than regular lambda -

    i have problem dynamically generated compared regular lambda look in code. below code utilize generate dynamic lambda.

    dynamic lambda c

    var parameterexp = expression.parameter(typeof(t), "x"); var propertyexp = expression.property(parameterexp, propertyname); methodinfo method = typeof(string).getmethod("contains", new[] { typeof(string) }); var somevalue = expression.constant(propertyvalue, typeof(string)); var containsmethodexp = expression.call(propertyexp, method, somevalue); homecoming expression.lambda<func<t, bool>>(containsmethodexp, parameterexp);

    lambda debug view

    {x => x.name.contains("username")}

    but when lambda in code this

    x => x.name.contains("username");

    i result. formattedtext variable used regular lambda.

    {x => x.name.contains(value(test.businesslogiclayer.classbll+<>x__displayclass8).formattedtext)}

    i utilize lambda on clause on iqueryable object. dynamic lambda generates sql in iqueryable no sql parameters. regular lambda causes sql have parameters. need generate parameters. looping through parameters alter contains can utilize total text search in sql server.

    my questions is, there way dynamically generate lambda have exact same output regular lambda? or there improve way utilize total text search in entity framework 6?

    since declaring value constant (expression.constant) guess ef generates sql without parameters, since knows constant can't change.

    perhaps improve off generating lambda explicitly takes parameter it's input ?

    var parameterexp = expression.parameter(typeof(t), "x"); var containsparameter = expression.parameter(typeof(string), "p"); var propertyexp = expression.property(parameterexp, propertyname); methodinfo method = typeof(string).getmethod("contains", new[] { typeof(string) }); var containsmethodexp = expression.call(propertyexp, method, containsparameter);

    which generate

    (x, p) => x.name.contains(p)

    c# linq lambda entity-framework-6

    authentication - Google Directory API(PHP-client) - error 401 Login Required -



    authentication - Google Directory API(PHP-client) - error 401 Login Required -

    i trying add together user using service business relationship , '401 login required' error. set p12-key on server , add together permission service account/scope in admin console. had done implementation usual authentication got same problem.

    <?php session_start(); set_include_path($_server['document_root'].'/src/php/'); require_once ('google/client.php'); $scope = 'https://www.googleapis.com/auth/admin.directory.user'; $client_id = 'xxxxx.apps.googleusercontent.com'; //client id $service_account_name = 'xxxxx@developer.gserviceaccount.com'; //email address $key_file_location = 'key.p12'; //key.p12 $client = new google_client(); $client->setapplicationname("test product"); if (isset($_session['service_token'])) { $client->setaccesstoken($_session['service_token']); } $key = file_get_contents($key_file_location); $cred = new google_auth_assertioncredentials ( $service_account_name, array($scope), $key ); $client->setassertioncredentials($cred); if($client->getauth()->isaccesstokenexpired()) { $client->getauth()->refreshtokenwithassertion($cred); } $_session['service_token'] = $client->getaccesstoken(); if($client->getaccesstoken()) { $requesturl = 'https://www.googleapis.com/admin/directory/v1/users'; $requestmethod = 'post'; $requestheader = array('content-type' => 'application/json', 'content-length' => 'content_length'); $postbody ='{ "primaryemail": "newuser@testpurpose.esy.es", "name": { "givenname": "user_name", "familyname": "user_familyname" }, "suspended": false, "password": "passpass", "ims": [ { "type": "work", "protocol": "gtalk", "im": "user_im@talk.example.com", "primary": true } ] }'; $request = new google_http_request($requesturl , $requestmethod, $requestheader, $postbody); $result = $client->execute($request); print_r($result); } ?>

    error

    uncaught exception 'google_service_exception' message 'error calling post https://www.googleapis.com/admin/directory/v1/users: (401) login required' in /home/u538421519/public_html/src/php/google/http/rest.php:79 stack trace: #0 /home/u538421519/public_html/src/php/google/http/rest.php(44): google_http_rest::decodehttpresponse(object(google_http_request)) #1 /home/u538421519/public_html/src/php/google/client.php(556): google_http_rest::execute(object(google_client), object(google_http_request)) #2 /home/u538421519/public_html/index.php(58): google_client->execute(object(google_http_request)) #3 {main} thrown in /home/u538421519/public_html/src/php/google/http/rest.php on line 79

    request sent without token:

    $request = new google_http_request($requesturl , $requestmethod, $requestheader, $postbody); $result = $client->execute($request);

    request sent token:

    $request = new google_http_request($requesturl , $requestmethod, $requestheader, $postbody); $result = $client->getauth()->authenticatedrequest($request);

    php authentication google-apps google-api-php-client google-directory-api

    python 3.x - I want when the user input is 'y' for yes, a text file will be made, and when the input is 'n', no text file to be made -



    python 3.x - I want when the user input is 'y' for yes, a text file will be made, and when the input is 'n', no text file to be made -

    essentially, want when user answers 'y' question, script output text file, , when user answers 'n', no go on on, not making text file. example:

    print('do python? (y/n)') logask = input() if 'logask' == 'y': file = open("testlog.txt", "w") file.write("thanks feedback!") file.close() else: print('oh, that\'s bad...')

    but when run this, outputs 'else' response if reply 'y'.

    you comparing 2 strings. should

    print('do python? (y/n)') logask = input() if logask == 'y': file = open("testlog.txt", "w") file.write("thanks feedback!") file.close() else: print('oh, that\'s bad...')

    also, may want append instead of overwriting file = open("testlog.txt","a") . if create file ahead of time, you'll know how many times answered.

    python-3.x text input output

    jquery selectors - DOM elements not accessible after onsen pageinit in ons.ready -



    jquery selectors - DOM elements not accessible after onsen pageinit in ons.ready -

    i using onsen framework jquery , jquery mobile, appears there no way grab event fires 1 time new page loaded.

    my current code, executes in index.html file (the master page)

    <script src="scripts/jquery.js"></script> <script src="scripts/jquery.mobile.custom.min.js"></script> <script src="scripts/app.js"></script> <script> ons.bootstrap(); ons.ready(function() { $(document.body).on('pageinit', '#recentpage', function() { initrecentpage(); }); });

    in app.js next code

    function initrecentpage() { $("#yourreports").on("tap", ".showreport", recentshowreport); var content = document.getelementbyid("yourreports"); ons.compile(content); }

    and html:

    <ons-page id="recentpage"> <ons-toolbar id="mytoolbar"> <div id="toolbartitle" class="center">recent checks</div> <div class="right"> <ons-toolbar-button ng-click="myslidingmenu.togglemenu()"> <ons-icon icon="bars"></ons-icon> </ons-toolbar-button> </div> </ons-toolbar> <ons-scroller> <h3 class="headingtitle"> checks</h3> <div id="free" class="tabarea"> <ons-list id="yourreports"> </ons-list> <ons-button id="clearfreerecentbutton"> <span id="clearrecenttext" class="bold">clear recent checks</span> </ons-button> </div> </ons-scroller> </ons-page>

    in instance variable 'content' null. i've debuged significantly, , element trying not nowadays when event fires. loaded later.

    so, question is, how ensure of content nowadays before using selector. feels onsen specific issue.

    in end find 1 reliable way of making work. had wait, using settimeout 300 milliseconds dom elements ready. feels hack, there no other reliable way of making behave. app in app store , works well, though seems hack, works:

    $(document).on('pageinit', '#homepage', function() { inithomepage(); }); function inithomepage() { settimeout(function() { setuphomepage(); }, 300); }

    jquery-selectors onsen-ui

    icons - Changing the green check when dragging in jstree -



    icons - Changing the green check when dragging in jstree -

    i curious if there way programmatically alter greenish check icon appears when drag jstree node. haven't seen regarding in jstrees api.

    what have 2 jstrees. want greenish check , reddish x used when drag , drop internally. when node dragged across trees want different icon appear instead of greenish check.

    thanks, ll

    icons jstree

    JavaScript - Notification API in webbrowser -



    JavaScript - Notification API in webbrowser -

    i made notifications web service. code looks (two first lines mental shortcut):

    check_how_many_alerts(); loop count(check_how_many_alerts){ var n = new notification("alert!",{ icon: "alert.png", body: variable }); alert_name = variable; n.onshow = function () { settimeout(n.close.bind(n), 10000);} n.onclick = function() { $.ajax({ url: 'notif_accept.php', type: 'get', data: 'id=' + alert_name, success: function(output) { alert('success, server says '+output); }, error: function() { alert('something went wrong'); } }); } }

    the problem when have 2 or more alerts, of them have same url in .onclick function. should have urls different "alert_names"?

    if want dynamically specify you're url: 'notif_accept.php' ajax call, add together method notification's prototype:

    notification.prototype.bind_click = function (url) { this.onclick = function() { $.ajax({ url: url, type: 'get', data: 'id=' + alert_name, success: function(output) { alert('success, server says '+output); }, error: function() { alert('something went wrong'); } }); } } n = new notification("alert!",{ icon: "alert.png", body: variable }); n.bind_click('notif_accept.php');

    javascript api google-chrome firefox notifications

    plot - how to define graphical bounds of abline linear regression in R -



    plot - how to define graphical bounds of abline linear regression in R -

    i trying truncate ends of abline, linear regression of data.

    fit1=lm(logy~logx) > fit1 call: lm(formula = logy ~ logx) coefficients: (intercept) logx -5.339 -2.115

    where logx log10(x[1:365] transformed. logy follows same code. when plot abline(fit1,col="red"), line wanted, line extends past bounds have set [1:365]. have tried par=xpd , doesn't cut down line limits want. i've played around segments() no avail. maybe line() argument?

    edit here new solution:

    #the next vectors x , y store our info want plot x<-(1:10) y<-(10:1) plot(x,y,type="l",log="xy") #we want linear regression on our log10 transformed info , add together line plot logy=log10(y[3:8]) logx=log10(x[3:8]) fit1=lm(logy~logx) #finally, want regression line seem applies on range 3 8 clip(3,8,8,3) abline(fit1,col="red")

    what yields plot line (now, not) extends past 3 8 on our x-axis. want regression line display x=3 x=8, next same slope.

    you can clip drawing area. can not utilize info illustration not reproducible, here illustration:

    > plot(1,1,type='n',xlim=c(0,400), ylim=c(0,10)) > clip(1,365,0,10) > abline(h=5,col='red')

    results in line bounded within box of coordinates x0=1,x1=365,y0=0,y1=10:

    r plot linear-regression

    node.js - How can i transform Jade files into html? -



    node.js - How can i transform Jade files into html? -

    i starting node.js application, wanted take help existing solutions in views jade files , how can transform them html easily?

    you can utilize ejs templating other jade provide additional features of html. can configure template on app.js of express

    html node.js jade

    java - Spring 3.2 MVC - Cannot match URL with Controller -



    java - Spring 3.2 MVC - Cannot match URL with Controller -

    i'm trying start new application scratch spring 3.2, , got 404 error when seek access controller. here configuration:

    web-inf web.xml web-context.xml

    web.xml:

    <!doctype web-app public "-//sun microsystems, inc.//dtd web application 2.3//en" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>archetype created web application</display-name> <context-param> <param-name>contextconfiglocation</param-name> <param-value> /web-inf/application-context.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.contextloaderlistener</listener-class> </listener> <servlet> <servlet-name>appservlet</servlet-name> <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class> <init-param> <param-name>contextconfiglocation</param-name> <param-value>/web-inf/web-context.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>appservlet</servlet-name> <url-pattern>/deblan/*</url-pattern> </servlet-mapping> </web-app>

    web-context.xml:

    <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <context:component-scan base-package="com.deboralandini.web.controllers"/> <mvc:annotation-driven/> <beans> <bean class="org.springframework.web.servlet.view.internalresourceviewresolver"> <property name="prefix" value="/web-inf/views/"/> <property name="suffix" value=".jsp"/> </bean> </beans> </beans>

    my controller:

    bundle com.deboralandini.web.controllers; import ...; @controller @requestmapping("cuenta") public class cuentacontroller { @autowired private cuentaservice cuentaservice; ... @requestmapping(value = "/ccuenta") public string ccuenta(model model){ homecoming "crearcuenta"; } ... }

    my index.jsp:

    <%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %> <html> <body> <h2>blabla</h2> <br/> <a href="cuenta/ccuenta">crear cuenta</a> </body> </html>

    unfortunately, when click link, get:

    status http 404 - /deblan/cuenta/ccuenta

    the browser tries create http://localhost:8080/deblan/cuenta/ccuenta, cannot in controller. debugged controller , in fact not entering there, so: whats newbie error?

    thanks in advance marcos

    edit: output:

    "c:\...\app\tomcat8\bin\catalina.bat" run [2014-10-21 08:57:21,069] artifact deblan:war: server not connected. deploy not available. using catalina_base: ... connected target vm, address: '127.0.0.1:64352', transport: 'socket' 21-oct-2014 20:57:21.743 info [main] org.apache.catalina.startup.versionloggerlistener.log server version: apache tomcat/8.0.14 21-oct-2014 20:57:21.745 info [main] org.apache.catalina.startup.versionloggerlistener.log server built: sep 24 2014 09:01:51 21-oct-2014 20:57:21.745 info [main] org.apache.catalina.startup.versionloggerlistener.log server number: 8.0.14.0 21-oct-2014 20:57:21.745 info [main] org.apache.catalina.startup.versionloggerlistener.log os name: windows 8.1 21-oct-2014 20:57:21.745 info [main] org.apache.catalina.startup.versionloggerlistener.log os version: 6.3 21-oct-2014 20:57:21.745 info [main] org.apache.catalina.startup.versionloggerlistener.log architecture: amd64 21-oct-2014 20:57:21.745 info [main] org.apache.catalina.startup.versionloggerlistener.log jvm version: 1.7.0_55-b13 21-oct-2014 20:57:21.745 info [main] org.apache.catalina.startup.versionloggerlistener.log jvm vendor: oracle corporation 21-oct-2014 20:57:21.924 info [main] org.apache.catalina.core.aprlifecyclelistener.init cargada la biblioteca nativa apr de apache tomcat 1.1.31 con la versión apr 1.4.8. 21-oct-2014 20:57:21.924 info [main] org.apache.catalina.core.aprlifecyclelistener.init capacidades apr: ipv6 [true], enviar fichero [true], aceptar filtros [false], aleatorio [true]. 21-oct-2014 20:57:22.551 info [main] org.apache.catalina.core.aprlifecyclelistener.initializessl openssl inicializado correctamente (openssl 1.0.1h 5 jun 2014) 21-oct-2014 20:57:22.649 info [main] org.apache.coyote.abstractprotocol.init initializing protocolhandler ["http-apr-8080"] 21-oct-2014 20:57:22.662 info [main] org.apache.coyote.abstractprotocol.init initializing protocolhandler ["ajp-apr-8009"] 21-oct-2014 20:57:22.664 info [main] org.apache.catalina.startup.catalina.load initialization processed in 992 ms 21-oct-2014 20:57:22.695 info [main] org.apache.catalina.core.standardservice.startinternal arrancando servicio catalina 21-oct-2014 20:57:22.695 info [main] org.apache.catalina.core.standardengine.startinternal starting servlet engine: apache tomcat/8.0.14 21-oct-2014 20:57:22.708 info [main] org.apache.coyote.abstractprotocol.start starting protocolhandler ["http-apr-8080"] 21-oct-2014 20:57:22.719 info [main] org.apache.coyote.abstractprotocol.start starting protocolhandler ["ajp-apr-8009"] 21-oct-2014 20:57:22.722 info [main] org.apache.catalina.startup.catalina.start server startup in 57 ms connected server [2014-10-21 08:57:23,165] artifact deblan:war: artifact beingness deployed, please wait... slf4j: failed load class "org.slf4j.impl.staticloggerbinder". slf4j: defaulting no-operation (nop) logger implementation slf4j: see http://www.slf4j.org/codes.html#staticloggerbinder farther details. log4j:warn no appenders found logger (org.jboss.logging). log4j:warn please initialize log4j scheme properly. log4j:warn see http://logging.apache.org/log4j/1.2/faq.html#noconfig more info. [2014-10-21 08:57:32,003] artifact deblan:war: artifact deployed [2014-10-21 08:57:32,003] artifact deblan:war: deploy took 8,838 milliseconds 21-oct-2014 20:57:32.712 info [localhost-startstop-1] org.apache.catalina.startup.hostconfig.deploydirectory despliegue del directorio c:...\app\tomcat8\webapps\manager de la aplicación web 21-oct-2014 20:57:32.762 info [localhost-startstop-1] org.apache.catalina.startup.hostconfig.deploydirectory deployment of web application directory c:...\app\tomcat8\webapps\manager has finished in 50 ms

    if deblan context root don't set in servlet mapping. you've got url:

    http://localhost:8080/deblan/cuenta/ccuenta

    if you've deployed app deblan context root then:

    http://localhost:8080/deblan

    takes app

    /cuenta/ccuenta

    now maps controller, try:

    <servlet-mapping> <servlet-name>appservlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>

    which means http://localhost:8080/deblan + whatever comes after.

    java spring spring-mvc controller