Posts

Showing posts from April, 2011

java - JPA persisting instead of updating -

I have come across a strange problem, whenever I try to edit a register in my application instead of the unit To update the situation, it remains a new one. Here my update method goes public obituary (object obj) {EntityManagerFactory fac = persistence .createEntityManagerFactory ("crud"); EntityManager em = fac.createEntityManager (); Em.merge (obj); Em.getTransaction () start () .; Committed to em.getTransaction (). Em.close (); Fac.close (); } My guess is that when I submit the edit form and the setters are called Id , somehow is set to 0. Is this possible? The form looks like this: & lt; H: form & gt; & Lt; P: panel grid column = "2" style = "margin: 0 auto;" & Gt; & Lt; F: Aspect Name = "Header" & gt; Edit form & lt; / F: Aspect & gt; Name: & lt; H: inputText id = "nome" value = "# {editUserBean.userToEdit.name}" /> Age: & lt; H: Input Text = "# {editUserBean...

java - Scala and util.Iterator[_] -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब मैं एक जावा के साथ काम कर रहा हूँ स्काला में पुस्तकालय, और मुझे एक इंटरफेस को लागू करने की आवश्यकता है, जो अन्य बातों के साथ-साथ जरूरी है कि मैं जावा के Iterable इंटरफ़ेस को लागू करता हूं। जब मैं इसे कार्यान्वित करने का प्रयास करता हूं या बिना जावा कनवर्ज़न यह मुझे बताता है कि जिस पद्धति मैं ओवरराइड कर रहा हूँ ( iterator (): java.util.Iterator ) गलत प्रकार का है, भले ही विधि प्रकार का है java.util.Iterator । एक साइड नोट के रूप में, क्या यह हो सकता है क्योंकि इंटरफ़ेस की आवश्यकता है कि मैं अनिर्दिष्ट प्रकार के इटरेटर को वापस करूँ? आरईपीएल में निम्नलिखित कार्य: आयात करें java.lang.Iterable आयात java.util.Iterator वर्ग ए अटेररेबल [स्ट्रिंग] को बढ़ाता है {override def iterator (): इटरेटर [स्ट्रिंग] = नल } ध्यान दें कि इटरेटर () को Iterator वापस नहीं करना चाहिए, Iterable नहीं, और वह confusingly, अस्थिर पैकेज में है java.lang जबकि Iterator में java.util है। >

c++ - How can I add a GUI to my homework? -

I am currently taking intro C ++ in my college. It was a very simple homework in which I had to do program using 3 different ways to output "1 2 3 4" Being before my current skill, how can I add visual interfaces to this program that I wrote? I mean, I want to change colors, add buttons or pictures, or whatever is it possible? // Geek Oh // Professor Kahn, Shawabai // 2/9/2014 // HWK 2.17 // (Printing) Write the program that numbers 1 to 4 on the same line , As well as a pair of adjacent numbers separates the BT from each pair. Do this several ways: // a) Use a statement with a stream entry operation // B) Using a statement with four stream entry operators. // c) Use the four statements # Add & lt; Iostream & gt; Int main () {std :: cout & lt; & Lt; "1 2 3 4 \ n"; // ------ & gt; A) std :: cout & lt; & Lt; "1" & lt; "2" & lt; & Lt; "3" & lt; & Lt; "4 \ n"; // ------ & ...

python - Pull files into script from two directories back -

I have a script that pulls files from two directories, so the script remains on: / folder2 / folder1 / folder0 / script.py and the files that will be processed will be in folder 2. I can get a level back "..//" (I'm creating an executable Windows with cx_free), but I'm thinking this is not the best way to do this. I have an input directory and an output directory. I want to keep the paths relative to the location of the script so that the "Folder 2" script can be moved without screwing the functionality of the script or without the force of writing it again. Thank you First you get the directory where your script is located, such as : current_dir = os Path.dirname (os.path.realpath (__ file__)) And then, if you know that you always above Use the given two levels of directory, then use it: target_dir = os.path.join (current_dir, '..', '..') From there you can manipulate files from target_dir as you please Ed...

r - How to do multi-key lookups using data.table? -

I use data.table to do some repeated lookups on a large dataset (45M rows, 4 integer columns) I am here. This is what I want to do. Library (Data Eligible) # Generates some data, you can show in several SDKs and LTs - Datatable (U = (1: 500,2 for each representative) , S = Round (Rooneyf (1000,1,100), 0)) Satky (D1, U, S) #, I want to see all their searches & lt; - D1 [J (U = 1), "s", together = F] # For each of the above data, # I want to seek other u from data.table d1 # of the original # does not work: Other & lt; - D1 [J (S = U), with "U", = F] # this works, but my big dataset actually takes long: other & lt; - Merge (D1, us, = 's') Merge the work for my purpose, but since my 'D1' >>> 'us', this It takes a long time. At first I thought that I am using merge from the base, but based on the docs it looks like the data. Eligible merge is sent (first_arange for class) a data is qualified. P> Can you...

symfony - Symfony2 - Users, Bundles and Controllers -

Hello all I am very new in Symphony and I am still searching for the full potential of this framework. My question is, if it is possible on Symphony 2, then crossing users' permissions between bundles and controllers, i.e. a certain user / group of users has to reach the respective controllers of several bundles and / or bundles. Thanks for the time spent on this :) OK, kind of you can create URL restrictions and It is possible to restrict access to your controllers and URLs based on the installation. The examples below, restrict access to any URL that begins with moderation for the people of the role of the moderator. - {path: ^ / moderation /, roles: ROLE_MODERATOR} See the documentation for details:

c# - Error converting varchar to numeric - Entity Framework -

I am using unit framework to update and insert SQL database. I have written the database in my local development machine and inserted and the update works fine. However, when I go to my production server, I get the message "Change the error varchar numerically" Although I have no numeric fields in the table only float and datetime and four any Even thinking what is happening? Thanks

java - Code coverage tool for netbeans 7 module development -

I'm looking for a code coverage plugin for the NetKeenine, which supports JadeK7, NetBean 7.4 and module development. I The closest one is the TikiOne JaCoCoverage but this module does not support development. Is there a plugin for that combination? How can I find a solution? I'm not sure, but in some sections POM.xml it seems like the plug-in sections This was the way to create a Maven project.

c# - StrongNameSignatureVerificationEx: DllNotFoundException -

When I'm calling this method, I get a DllNotFoundException which is telling me that mscorsn.dll is not found Could go Although there is a library and I do not know what the problem is, does anyone know this problem? Thanks in advance!

url - PHP redirect using get when login is done -

$ redirect = $ _ प्राप्त करें ["r"]; यदि (isset ($ _ GET ["r"])) {हेडर ("स्थान: http: //"। $ Redirect); } और {$ redirect = "mickiewiki.nl/login/profile.php"; शीर्षलेख ("स्थान: http: //"। $ पुनर्निर्देशन); यह कोड काम नहीं करेगा? मुझे यह पसंद होना चाहिए अगर मैं mickiewiki.nl/login/login.php?r=mickiewiki.nl/Doneer.php पर जाना चाहता हूं कि जब मैं लॉगिन करता हूं, तब मैं पृष्ठ पर वापस जाना हूं Doneer.php जब मैं लॉगिन हूं, मुझे हमेशा profile.php पर भेज दिया जा रहा है अगर कोई मुझे अपना आर जोड़ता है या नहीं & lt;? Php // सत्रों को पारित करने की अनुमति दें ताकि हम देख सकें कि उपयोगकर्ता क्या है लॉग इन session_start (); // डेटाबेस से कनेक्ट करें ताकि हम अपने उपयोगकर्ता तालिका $ डाटाबेस = mysql_select_db ('***', $ con) या मरने (mysql_error ()) पर डेटा की जांच, संपादित या सम्मिलित कर सकते हैं; // हमें पहले से "लॉगिन / फ़ंक्शंस। Php" शामिल किए गए रक्षा () फ़ंक्शन को एक्सेस देने के लिए फ़ंक्शन फ़ाइल शामिल करें; $ Sel...

android - How to Use onSaveInstanceState() -

I is the first person Muky_kriyashilta made three activities, said Na_btn the second, and the third called Samany_btn Muky_kriyashilta There are two other activities in which new buttons for button activity (new) and buttons for normal_button activity (normal) are included. New_button activity includes an EditText and a button called done_button Samany_btn activity within a TextView I used the effect to move the written data in EditText of new_button activity TextView in Samany_btn activity with the following code: new_button (activity): package com.tarek.topshine; Import android App Import android.content.Intent; Importroid.os.Bundle; Import android.view.Menu; Import android.view.View; Import android.widget.Button; Import android.widget.EditText; Public class expanded new_button activity (button done_button; String text; @ Override protected void was rescued from the Create (bundled Instensstet) {// Todo Auto-generated method stub super. Conet (saved Instensstet); setContentV...

objective c - Afnetworking post array -

I'm trying to post as a post instead of a dictionary, though I get an error : sending an incompatible index type type NSMutableArray type parameter is NSDictionary here is the code FTPTRAQ Operation Manager * Manager = [FHTPRAACAST Operation Manager Manager]; NSMutableArray * parameter = @ [@ "afu", @ "bar"]; [Manager post: @ "http://example.com/resources.json" parameter parameter: criterion success: ^ (fttpequest operation * operation, id response object) {nslog (@ "jessonon:% @", reaction object); } Failure: ^ (FHTPPKAESTA Operation * Operation, NSERR * error) {NSLog (@ "error:% @", error); }]; How can I post Array's contents only? Update: This code works, but I like the answer given below as handles its cleaner and AF serialization. I guess the body requesting But how can I see what the body is? NSError * error; NSDTA * JSNET Data = [NSJSONSArilization DatavijanOnBiz: Parameter Option: NSJSNDritingRelat...

f# - Subtracting Records from a Set using case-insensitive comparison -

मेरे पास रिकॉर्ड का एक सेट है: टाइप व्यक्ति = {नाम: स्ट्रिंग आयु: int} पुराना लोग दें = सेट [{नाम = "डॉक्टर"; आयु = 1500}; {Name = "Yoda"; ऊपर की हार्डकोड उदाहरण के विपरीत, डेटा का सेट वास्तव में डेटा स्रोत से आता है (जिस पर मेरे पास बहुत कम नियंत्रण है)। अब मुझे किसी अन्य डेटा स्रोत से डेटा का एक समूह घटाना होगा। सामान्य तौर पर, डेटा इस दूसरे स्रोत में से मेल खाता है, लेकिन कभी कभी वहाँ captialization में एक फर्क है: जाने peopleWhoAreConfusedAboutTheirAge = सेट [{नाम = "द चिकित्सक"; उम्र = 1500}] जब मैं पहली बार से दूसरे सेट का घटाना करने का प्रयास करता हूं, तो यह विफल हो जाता है क्योंकि स्ट्रिंग तुलना केस संवेदनशील है: जाने peopleWhoKnowHowOldTheyAre = oldPeople - peopleWhoAreConfusedAboutTheirAge वैल peopleWhoKnowHowOldTheyAre: सेट करें & lt; व्यक्ति & gt; = सेट [{नाम = "डॉक्टर"; आयु = 1500;}; {Name = "Yoda"; नाम क्षेत्र लोग रिकॉर्ड के लिए कोई केस-असंवेदनशील तुलना करने का कोई तरीका है? आयु = 900;}] ...

jsp - <display:column + <html:select -

I am creating an application using struts, where I get a list of people from the list of databases and schools and then I select Html: so that the user can select the school for each element, here's the part of the JSP page where I got stuck. & lt; Display: table id = "list" name = "myForm .list" & gt; & Lt; Display: column title = "id" property = "id" /> & Lt; Display: column heading = "name" property = "name" ordered = "true" /> & Lt; Exhibit: column title = "school" & gt; & Lt; Html: Selection property = "id school" & gt; & Lt; Logic: notEmpty name = "myForm" property = "SchoolCombo" & gt; & Lt; Bean: define id = "SchoolCombo" name = "myForm" property = "SchoolCombo" /> & Lt; Html: option store = "schoolcomp" property = "id" label property = "name" ...

google app engine - pyjade on gae cannot concatenate 'str' and 'long' objects -

Image
The pyjade code below causes an internal server error # {Module.key} is moved out of the href Any ideas what works fine? table // table is not working perfectly but Leo is responsive. However, that module will merge each module, M in the module (m% 5 = = 0) Tr td a (href = '# {module.key}') # {module.name} else td a (href = "# {module.key}") # {module.name} Based on the error that learn about a type of error with each module By doing so, seeing the docs for module in this module with M and Z, it shows that the index that is in the running is a string You Each module, M (int (m)% 5 == 0) in the module / html>

ruby on rails - resque-web: NoMethodError at /failed undefined method `to_yaml' -

Resque-Web is up and running, but when trying to see a failed job I get the following error: In the form of a call to the ' Call error, it seems that resque-web is not required Note: I'm running locally on a Rail 4 app. You can see reasons here: - It gets boiled in a temporary bug that is not fixed yet Has happened, but has not been released yet. I have been fixed by adding 'yaml' at the top of the server .bb file Note that the server The .rb file on my machine was located here: /usr/local/lib/ruby/gems/2.0.0/gems/resque-1.25.1/lib/resque/server.rb Your location is different

email - Using data step to append custom text to ODS stream -

I'm trying to print a table to an email destination and then finally putting some custom comments. I get the message when I try and run the code below: Error: The file is in use, My code is: filename mymail = email content_type = "text / html" = ("myemail@myemail.com") = ("myemail@myemail.com") topic = "my report"; Ods html3 body = mymail style = sasweb; Proc print data = sashelp.class noobs; Run; Data_null_; Mymail file; Put "I want to appear below this email."; Run; Ods off html3; File name mymail explicit; I have tried googling for help, but the search terms are so obscure that it is difficult to narrow it with this specific problem. Thanks for the help. Edit: Just to clarify - I want all the results of the body of the email. I do not want the results to be sent as an attachment. In addition, if you comment only the data phase in the above code, then the email works fine. I was not able to test these two metho...

Font awesome with raphael js -

What do I want to do is create a simple circle with Facebook's 'F' (this will also be used for other similar) Cases) The symbol of 'F' will be produced. I have defined the font family (and have not worked) as a CSS and / or Raphael attribute. The code is as follows: HTML & lt; Div id = 'share-facebook' & gt; & Lt; / Div & gt; CSS # share-facebook {font-family: FontAwesome; } javascript var canvas = Rafael ('share-facebook', 100, 100); Var facebookWrapper = canvas.circle (50,50,50); FacebookWrapper.attr ('Filling', '# 3E3E3'); FacebookWrapper.attr ('stroke', 'any'); Var facebookText = canvas.text (50,50, '& # xf09a'); FacebookText.attr ('font-size', 40); FacebookText.attr ('Filling', '#FFF'); FacebookText.attr ('font-family', 'FontAwesome'); There is also a bela to make your life easier. I have seen the issue that Rapel has p...

node.js - Socket.io Private messaging, with multiple users online at the same time -

So I'm building chat app and need help to know about sending private messages. The code is 'Send Message' User = {} socket.on ('Send Message', Function (Data, Callback) {var msg = data.trim (); console.log ( User); console.log ('Trim after message:' msg); var name = req.params.posteruname; // reciever var msg = msg; if (name in user) {var message = new chat ({msg Msg msg, sender: req User.username, reciever: name}). Save (function (err, savedMessage) {if (err) {Users [name] .emit ('whisper', {msg: "error, some tried to send you a message but something went wrong", nick: socket. Name)}} other {user [name] .emit (' Whisper ', {receiver: name, sender: req.user.username, msg: msg});}});} and {callback ("something went wrong");}}); This code is not working very well when I try to send a message, it still displays to all users. Take a look at this. You should specify the rooms that everyone will have a "room...

python - Determining time complexity for the following coded segment -

How do I set the complexity of time in this coded section? I'm new to Python and really appreciate any help! sum = 0 i = n while (i> = 1): sum = = ii / = 2 i = nj = 2 while (i> = 1): sum + = ii / = Jj * = 2 I thought that the first loop can be (log n + 2) and another might be loop (2log n + 4) but I'm not sure I I'm close to living on the right track ... Here my answer is to be more mathematically-accurate You should probably write inequality instead of the equation as I did, but the overall logic will not change anyway. I know from the comment if it makes sense or you get errors The first loop is to run multiple times as the first loop because it is less than 1. The complexity of its time is O (log_2 (n + 1)) where log_2 based on log2 based on i mean 2. 0 i = N 1 i = n / 2 2 i = n / 2 2 ki = n / 2 ^ k Ask yourself: What is Kashmir n = 2 ^ of ? ? Of course, you are not distracted by var yoga as there is no variable interference by running a...

jquery - Symfony2: How to get the current route in javascript? -

I am using Ajax to change the data in a page. So, I want to know what is the current route to call for different tasks. I get current route in the current URL and get the current route in controller and twig Have read many solutions used to do However, javascript or jQuery ? Any possible way to achieve this in $ [document] .ready (function) is {$ ('# Form_patient') .changes (function () {var id = $ ( This) .val (); // Current route var path = ??; // get & quot; -------- get -------- if you want to get current root (path = == 'Way1') {functionForRoute2 (id, route)} and {functionForRoute2 (id, route);}})}}; ** root 1 ** for function functionForRoute1 (ID, route) {$ .ajax ({type) Function: "Post", URL: routing, generate (route), data: JSON.stringify ({id: id}), data type: "json", success: function (data) {// path 1} Execute specific data, error: work (XMLHttpRequest, textStatus, errorThrown) {warning ('error:' error erro...

Python | Arbitrary arguments -

I have to take the arbitrary arguments of lists in the function this code works fine But when I change the code into voluntary logic and it is not working a = [1,2,3] b = [ 5, 7] DEF adder (* M): o = [] return M + O print adder (A, B) The reason for this can be m is a tupe with two (or more or less) lists. You need to loop through m to get the normal version of your function def connecter (* m): o = [] in item m: O + = item return o You can do it in a liner, but I think it is clear.

r - Changing width of barplot bars with bargraph.CI() -

Image
class = "post-text" itemprop = "text"> Any idea about changing the bar width of the bar with the function bargraph.CI () Soptote from pacakge? I have a very simple barploet with 2 times, and can not understand how to make them thin. I have tried logic, width, with the barcode () function, but without any success Thanks for your help! place = try to adjust the argument. As the width specified by width = is all relative, if you specify only one value, they will never change the shape: Example: Both yield the following result: bargraph.CI (x.factor = dos, feedback = lane, data = toothgraw, width = 1) bargraph.CI (x.factor = dos, reaction = lane, data = toothgroth, width = 1000) adjustment Space = However, Separates the eyes and indirectly affects their width: bargraph.CI (x.factor = dos, reaction = lane, data = toothgraw, location = 1) Code> Bargraph ci (x.factor = dos, reaction = lane, data = toothgraw, location = 5) Alt...

php - Using preg_match_all to extract all image links on a webpage -

I'm having some difficulty with this pattern - "/([az-_0-9/\:.]* Of course, my regex is a little weak within. (Jpg | jpeg | png)) / i "- preg_match_all function, so I suspect there is something wrong with it. What do I have at the moment - preg_match_all ("/ ([az \ -_0- 9 \ / \: \.] *. (Jpg | jpeg | Png) / i ", $ raw, $ match) From this page - There is a bunch of images on the page that is not being dragged , All I am getting is ($ 0) of the matching array - [balance] is repeated) data in a different format. array (8) {[0] => ; String (77) "http://media.topshop.com/wcsstore/TopShop/images/catalog/05K01FBLC_normal.jpg" [1] = & gt; String (143) "/wcsstore/ConsumerDirectStorefrontAssetStore/images/colors/color7/cms/pages/static/static-0000067510/images/tact-wk24-LFWshipping_UK-ROW-EU.jpg" [2] = & gt; String (76) "http://media.topshop.com/wcsstore/TopShop/images/catalog/05K01FBLC_large.jpg" [3] = & gt; St...

octave - How do I solve a function for x in Matlab? -

I have defined this function: % entered in two vectors Enter data, mass and duration mass = 0: 200: 1200; Period = [0.404841 0.444772 0.486921 0.522002 0.558513 0.589238 0.622 9 42]; Calculate a line of best fit for data using% Polyfit () P = polyfit (mass, duration, 1); Fit = @ (X) P (1). * X + p (2); Now I want to solve f (x) = 440086, but there can be no way to do this. I know that I can work it easily with my hand, but I have to know how to do this in the future. If you have a linear equation such as A * x + B = 0 If you want to solve, you can easily solve MATLAB as follows: p = [0.2 0.5]; ConstValue = 0.440086; A = p (1); B = constValue-p (2); Soln = a \ b; If you want to solve a non-linear system of equations, you can use fsolve as the following (here I am showing I use it above the linear equation): myFunSO = @ (x) 0.2 * x + 0.5-0.440086; % Here are the initial estimates that you are solving F (x) -0.440086 = 0x = fsolve (myFunSO, 0.5)% 0.5. Both me...

sql - Oracle how to get most common value in a column for multiple columns? -

Suppose i have the following table, how can i group according to id, and get the most common value in each column I can do. The table is large, and I have to do it for many columns id call 1 call 2 calls3 .... 1a null 1 ax 1b tap 1i 2 cx 2 cv2a 3 3 bez 3 AZ 3 AZ 3 BX 3 BY Expected Result: ID Call 1 Call 2 Call 3 .... 1 An Empty 2 CY3 Beas using the analytic functions and keeping : id, select minimum (col1) (dense_rank first order by cnt_col1 desc) as col1_mode, min (col2) (dnt Place the _rank first order cnt_col2 desc as col2_mode, min (col3) as the col3_mode (dense_rank first) as the col3_mode (selection id, number greater than *), (segment by id, col1) as cnt_col1 , Count (*) over (id, partition by col2) cnt_col2, cnt_col3 to t) greater than count (*), (id by id, col3); The value is often called "mode" in the statistics, and it provides the Oracle one function to calculate. Therefore, an easy way is to select stats_mode () : as ID, stats_mode ...

debugging - Attach Android Studio debugger to desktop JVM application -

is an excellent debugger for Android apps in Android studios. Is there any way to add the same Java debugger to regular Java applications? Can I move on my local machine? Based on AS IntelliJ, which I think is a regular JVM debugger, has it been stripped from Android Studio? Android studio is only for Android Story If you want to debug Java applications, then you have the basic IntelliJ Idea However, you can also write Android apps / debug from IntelIs.

jquery - rails 4.0.1 can't show ruby code in view via javascript ajax -

Once user voted I am trying to update vote count through AJAX Except works fine, which should be very basic, showing the total number of total votes. My JavaScript has the following code: var voteCount = "& lt;% = @ trip.total_up_votes%>"; ... $ .ajax ({... success: work () {console.log ("voted to vote successfully"); $ ('# poll' _p ''). Html (vote);} , ...}); Once the click has been clicked on the link, everything is added to the table, apart from this new vote count as the string of & lt;% = @ trip.total_up_votes%> Shows in The Total_up_wot method simply calculates the number of votes from the Vote table. This work is fine when the page loads for the first time or when it is refreshed. After passing through the internet I have tried escape_javascript and many other suggestions, but I am still stuck. def cast_vote () @vote = Vote. Where ("user_id =? AND trip_id =?", Current_user, param [[id]). First || Vote: ...

javascript - CasperJS: swallows special keys like Enter? -

I am trying to write a test using CasperJS for a scenario where the entry of the page Is the trigger for Casper. Start ('http: // localhost: 3000 / input-demo', function () {this.SendKeys ('# demo-input', 'demo text'); this.sendKeys ('# demo-input', '\ UE007 '); this.test.assertEquals (this .html (' # step '),' input demo ');}); Casper.run (); (We run it as casperjs test-js as test.js ) I have verified that the Receiving text in sendKeys input, but that text never appears in the #stage element, a "vanilla" fonts of Compass Works, the JS implementation is fine, where Webpage. SendEvent ('keypress', '\ uE007') puts on-page event handlers in the fire. Looking at the source of casper.sendKeys , I think that it is handing over the sendEvent to the Fontworks instance of the Casper instance (i.e.). Any thoughts? Any of these keys to work in the CasparJS exam? Call to send {keepFocus...

api - passing http basic auth credentials with backbone.js securely -

I have a test rest API and backbone application and are running. The problem is that I need to send AP login credentials with every API call from backbone. This is not a problem in itself, but this means that I have to store the AP login credentials in the javascript code in my backbone.js. So if someone was curious, they could see the spinal cord / javascript code and could see the API credentials. But at the same time, I follow the rest of the principles, all API calls should include login information, how to address this spinal cord with no call to release any state from last call ? I hope this is not with the sessions on the server, because it will be against the rest. I could not find much information on this subject, so I can stop the path. Why would the session be against the session REST? The first time you connect to the server, you create a session on the server and connect it with a unique token that you send to the customer as a cookie. Therefore, in every ...

ios - How to get an SKView to trigger a method in its parent SKView upon dismissal -

I have an SKVU running the gameplay and when the level is completed (or failed) when the user has an action (Restart, next level, etc.), then I need to dismiss this SQLV ( [self removeFromView] and trigger a suitable method in the gameplay SKVU. ? However the answer to @nickfoc is appropriate You can also consider using NSNotification are. The ViewController would listener, and the method can be triggered by post only applicable notification.

Removing "gen-java" prefix from auto-generated Java files with sbt-thrift in SBT 0.12? -

मैं प्लगइन 0.6 और एसबीटी 0.12 के साथ काम कर रहा हूं। मेरी बचत फ़ाइलों में मैंने नीचे के नामों का उल्लेख किया है। नाम स्थान java abc.xyz // कुछ // थ्रिफ्ट // कोड लेकिन उत्पन्न फ़ाइलें gen-java / abc / xyz ( जीएन-जावा उपसर्ग स्वचालित रूप से जोड़ा जाता है)। मैं इसे abc / xyz ? एक -out एंड लेफ्टिङ; आउटडिर & gt; विकल्प है जो ठीक उसी तरह करता है। अपने मामले में, वर्तमान फ़ोल्डर । को outdir के रूप में निर्दिष्ट करें। ध्यान दें, स्वचालित रूप से जेनरेट किए गए gen - * फ़ोल्डर्स के विपरीत, आउटडीयर निर्देशिका मौजूद होना चाहिए दूसरे शब्दों में, आपको यह सुनिश्चित करना होगा कि थ्रॉफ्ट कंपाइलर को कॉल करने से पहले फ़ोल्डर से पहले बनाया गया है। - help विकल्प सभी के बारे में अधिक जानकारी देता है अन्य स्विचेस। एसबीटी के बारे में, यदि जानकारी पर सत्य है, तो आपको उस सॉफ्टवेयर के लेखक से संपर्क करना चाहिए जिसमें विकल्प thriftJavaOutputDir को याद रखना होगा। बीटीडब्लू, सवाल का एक डुप्लिकेट जैसा दिखता है, तो मैं सुझाता हूं कि एसओ के समान प्रश्नों की दस ह...

android - How to get video pre roll ads through admob? -

Are there pre-roll video ads with the latest Play Services API? I can see it. But, it gives full screen interstitial advertising with the close button. I like video ads in YouTube, it should come without user interaction and should go away. Am I missing it somewhere else?

how to binding such code in robovm? -

This is the third library code, how is it binding with Java? - (zero) setLoginRewardDelegate: (ID) Representative login Reward Chooser: (SEL) Selector Login Reward Profile: (NSString *) Prefix Login RewardsFix: (NSString *) suffix; Any information will be appreciated! Assuming that you have already successfully compelled your representative type: @ Method (selector = "catalogin relegation delegate: login reward selector: login reward profile: login rewardfix:") public resident zero signlist rewards (login reward delegate representative, selector selector, string prefix, string suffix); When using your representative, make sure to maintain a strong reference to it, after you do not need a representative, remove strong references. this.addStrongRef (Representative); // After creating your representative this.removeStrongRef (Representative); // When you no longer need a representative

python - 'int' Object not Callable -

I'm making a simple dragon script to process a table. I am using an array to store cell values. The code is: table = [] hlen = input ("Please enter the amount of the column \ n") vlen = input ("Please enter the amount of rows \ n") curcol = 1 Currow = 1 totcell = hlen * vlen while (totcell & gt; = curcol * currow): str = input ("please input" + str (curcol) + "," + str (currow)) table.append (str) if (Curl and G; = HLAN): Curo = + 1 // Process Table This program runs sweet, first asks cell at 1,1. All is fine, as long as the code is reloading. Heres pythons error output traceback (most recent call final): File "./Evacuation.py", line 13, & lt; Module & gt; Type Str = input ("Please input" + "str (curcol) +", "+ str (currow)" error: 'int' object is not worth the corner Any help Thank you. You are going to hide the str created with your variable name : you ...

c# - EF 6 with System.Data.SQlite SaveChanges() not working? -

So I have just started using System.Data.Sqlite with System Framework 6 (Nuget from the latest System. Data.Sqlite is downloaded, version 1.0.91.0) After some configuration and code, I found out that I can read from the database but no writing is working. Here's my code: using (var reference = new internal dbctext ()) {var demo = context.DemoEntities.Where (d = & gt; DID == 1) .FirstOrDefault (); Demo .name = "teststest"; Context.DemoEntities.Add (new demo {name = "test"}); Context.SaveChanges (); } Actually after the SaveChanges, anything in the DB was not updated. Although I can read from DB, I can read manually with the data on the population via SQLIT Admin Tool. Here is my DB schema: Table name: Demo field: ID - Integer primary key Automatic radiation field: Name - VARCHAR (256) Here are my classes Public category internal DBcintex: DBcinTex {public DBSET & lt; Demo & gt; {Receive; demointees; Set; } Public Internal DBConte...

javascript - Change all href inside a DIV with class -

I am trying to replace all the href links within a curtain DIV which uses the class. So far, I can change all the links in one page using this snippet: function sl () {var l = document.getElementsByTagName ('a'); For {i = 0; i & lt; l.length; i ++} {var cl = l [i] .href; L [i] .href = cl.replace (cl, 'http: // domain, com /' + cl);}} window.onload = Sl; But this is not an ideal solution. I have tried to use this line: var l = getElementsByClassName ('class') .getElementsByTagName ('a'); But that does not work. Note: No Jquery solution, javascript only thanks, I just do not want to load jquery for a small snippet. is a well supported method (even IE8 supports it) , So that all of you one elements: var l = document.querySelectorAll ('Div.class a'); I tried to use this line: var l = getElementsByClassName ('class'). GetElementsByTagName ('a'); but that does not work This is because, like ...

ios - Trying to set property in parent viewcontroller, but it ends up being Null -

I am in a view controller that was pushed onto the stack by a navigation controller. I have this code that runs when the back button is pressed: - (zero) didMoveToParentViewController: (UIViewController *) Parents {if ([[Parents! Axel: self.parentViewController]) {// NSLog (@ "back pressed"); MyCustomViewController * VC = [auto Storyboard InstantentibratorVidetifier: @ "Tabulvc"]; Vc.index = [_itemChooser selected ROYInComponent: 0]; }} I am trying to set the pointer to the same index that I had selected in Picker view. If I do NSLog here, then this is true, but if I value the values ​​in NSLog then in parent it is 0. (This prints as a tap if I am using an NSUntiger instead of something) Pressed it like this: [Self. Navigation controller Push ViewController: Animated pickervc: Yes]; I have resolved my problem by defining a visual controller property in the child class Before pushing it yourself. Then I was able to install / access the property...

printing JSON values in Python -

I have searched articles through Googles and elsewhere, as well as read some related docs at docs.python .org and are still stuck. I get feedback from the API below: {"status": "active", "perms": 1, "data": {"user_values ":" Delta ": - 203," value ": 53.32," command ": 42509}}}} I do not have 'status' or 'data' filtering Problems with the problem though, I can catch all of them that are the name of * user_values ​​*, not the date inside them. It went on for a long time and was hoping someone could tell me in the right direction. New in Python and if I need to change this, how am I doing this because it is bad practices or the results of which I see are an easy way to get them, please tell me. Code: import json import urllib2 url = urllib2.urlopen ('http://URLofAPI.com') json_url = json. Load (url) api_result = json_url api_result for doc ['data'] ['40...

git - How to merge only a single file from a certain commit -

I have 2 files that are created in a fixed branch and I would like to merge only one file with committed changes. How should I do this? Merge the list of paths (paths) that there is no alternative. Instead, you have to do this manually, by instructing git to stop after merge, before reducing it. You can then reset the second file to the HEAD contents and keep those contents on the disk, resulting in only the first merge. For example, if there is a question in the commit 0123abc and the file you want to cancel with the merge is file2.txt : git merge --no-commit - no-ff 0123abc git reset HEAD file2.txt git checkout - file2.txt

ios - AdMob with Cocos2d v3 -

Image
I'm trying to integrate AdMob banner with Cocos 2D v3 project, but no luck: ( all document samples and tutorials for older Cokos version and do not compile. Any samples or successful experience? this is mine. in AppDelegate.h, to define based on the banner of your needs. typingfum_bannerType {kBanner_Portrait_Top, kBanner_Portrait_Bo Type ttom, kBanner_Landscape_Top, kBanner_Landscape_Bottom,} Kokobar; # Benner_ TYPE kBanner_Portrait_Top

c# - How to assign table name for dataset tables -

I'm creating three stored process in MySQL. It's working fine now I read the third process using C # Returns two tables in the table, Table 1 How can I assign the names of each table? When using more than 8 or 10, I actually confuse the names of tables. Make the process start by choosing dbo.GetPeople dbo.Person *; End; Start the selection from dbo.Car as the process creates dbo.GetCars; End; - It gives the same result as before the process dbo.GetSomething exec dbo.GetPeople begin as; Exec dbo.GetCars; End; dataset _ds = new dataset (); Datatale _ DTEMP employee = new datatelle (); _dtEmployee = _dsTables ["Employee"]; or _dtEmployee = ds.Tables [0];

slidingmenu - sliding menu in android stucks while open and close -

I I'm using a good library, but when the menu is open and close, So it was stuck after the first time. It works inappropriate. If any one is the same problem and if you have a solution then please tell me. @ override public boolean on option items select (menu item) {// action Bar Home / Up Action should open Dowler or Stop / ActionBarDrawerToggle will take care of this / * * if (mDrawerToggle.onOptionsItemSelected (MenuItem) item)) {Return * True; } * / // handles action button switch (itemgate ITMID) {Case Android. RIDHOM: If (MDROVER LAYOUT. ISDRRO Open (MDRARIF)) {LDR on MDR. Close drawer (MDRARLIS); } And {mDrawerLayout.openDrawer (mDrawerList); } Back true; break; Default: Right back; } Return Super.Options item selected (item); } / * Click Lynner * for the listener / private class DrawerItemClickListener applies ListView.OnItemClickListener {@Override public void onItemClick (adapterview & lt ;? & gt; parent, view view, integer status, long ID)} If (po...

thejit - Multiple infovis bar charts do not work -

How can I chart a chart 2 times in 2 separate divs? If I try to do this then the chart gets overwritten with the values ​​of the second chart, because the library hardcoddevil looks for the name 'Info', how can it correct any idea? I know this is a bit late, but I want & lt ; Div id = 'InfoVisChart2' & gt; & Lt; / Div & gt; Then, in your JS, where you type in your code, enter two IDs: var bar = chart $ new $ jit.BarChart ({// Visualization Container's IID in intake: 'InfoViscart 1', .... etc. Var Barchart 2 = New $ Jet Barchart ({// Visualization Container ID: Invoice Chart 2, .... Etc. works for me.

excel - VBA code to change text in shape that link from another sheet -

Below is my code which I am using the second code but if the job is not working properly on the shape of text, Just = List! A2 needs to be displayed, the number in the sheet name list is cell A2. I try to amend but now I am doing a good job Thanks in adv for any form working status as sub AFRVIS () Dims as dim as sss size = for each sp for sheet2 Size Sheet 2 Shape. Category ("Round Rectangle 2"). FormulaArray = "= List! B2" Next Closing Sub Sub Novice () is designed as a form of worksheet dispatch sp. Shops Sheet2 for each size Shape. Range (array ("round rectangle 2")). Textframe Character Text = "= List! A2" Next End Sub sheet 2 .sap.ange (array ("round rectangle 2")). Lesson Frame. Reader = _ Sheet 1.Range ("A2") It is now resolved.

android - How to change Tab Indicator color programmatically -

I get the new to Android and get started before programming I've been using several episodes a day, especially tabs with swiped views Tab Indicator / Highlight Color (I have googled and changed for ActionBar Color RED program) but do not know how to change the tab indicator color to red. (Priority programmatically) still looks like my actionbank I change the background color of the actionbar below I am using the given methods, but I have to change the colors of the tab indicator programmatically. actionBar = getActionBar (); ActionBar.setBackgroundDrawable (New ColorDrawable (Color.RED)); I use Jeff Gilfelt, Android Action Bar Style Generator You can use the GUI and at the end you get the source code that you can use, review and modify accordingly. :) Here is a link.

AngularJS Dependency Injection Format -

I'm new to angular, I do not understand why $ scope and $ Http function such as app.controller ('PlayerController', ['$ scope', '$ http', function ($ radius) , $ Http) {var audio = document.createElement ('audio'); $ scope.audio = audio; // ... Why is this? Reading: They are placed so that when you reduce it the code is not broken. You can only function ($ scope, $ http) {// use $ scope} and You will know by the parameter names, which you will have to give the $ scope and $ http service. But when you reduce the code, something like this might be function (a, b) {// use a} where there is a $ field and b is $ Http service. For this reason, AngularJS allows you to specify the string name of the services that you need to inject to modify the javascript minifaming string Does not mean, therefore ['$ scope', '$ http', function ($ radius, $ http) {}] ['$ scope', '$ http', func...

variables - Simpson's rule, declaration of user requested input not accepted? fortran -

I am working on this issue of getting the area under a tense curve using Simpson rules. However, I keep errors that I do not understand - even on various compilers such as Gafarran and Earport. I know that I can make PE a parameter in the main body of the program, but I will only know where any help I am wrong will be greatly appreciated. module consts! A global variable is actual (4), parameter :: pi = 3.1415927 end module program pi declare Simpson use consts any real field ::, j, sumo, sumum intecer (type = 4) :: I, j, K! Loop index, counter, number of real numbers (type = 4) :: red, tantab (0)! Radian variable, result array! K = Write the number of steps (6, *) "Please enter the required numbers (weird numbers)" READ (5, *) k (MOD (K, 2) == 1) then continue again (*, *) "Hey, I said as a strange number" READ (5, *) K.Endif H = (60.0) / (K-1)! Regarding the number of sample points, the size of the stage defines I = 1,61,1! Get a table of ten call Digotra...

user interface - What's the underlying technology behind MySQL Workbench GUI? -

I would like to know which technology is used to display MySQL Workbench GUI. I suspect that Java fx But I am not sure about this. MySQL workspace is an application mostly written in C ++ C # (Windows) and Objective-C (MAC) platform. P> Plugins to C ++, Python or Lua Can be made using. A large part of the admin section in MySQL workspace has been written in Python. Platform specific parts are wrapped with a thin layer called, which is used by the application and can be accessed by plugins (written in Python or Lu). The first version was enhanced for Mac OS X and Linux on Windows and later using Microsoft Visual Studio 2005. Update: 6.1 Beginning support with Lua has been removed. Update 2: From October 2015 the community code is.

html - Stop a session being overwritten -

I have a code that generates random numbers between 1 and 1000. It then stores that session as a session. You will then receive an email from the printed session in a form and submit it, but the problem occurs when you submit a form (two on the page) refreshes this random number and making the session invalid Reset HTML & lt; Form action = "cantaccess.asp" method = "post" & gt; & Lt; P & gt; Email: & lt; Input type = "text" name = "inputtedEmail" value = "" /> & lt; / P & gt; & Lt; Input type = "submit" name = "submitEmail" value = "submit" /> & Lt; / Form & gt; & Lt; Form action = "cantaccess.asp" method = "post" & gt; & Lt; P & gt; Code: & lt; Input type = "text" name = "inputted code" value = "" /> & Lt; / P & gt; & Lt; Input type = "submit" name = "su...

logical AND of images in matlab -

छवि = डबल (रिक्त ('ooutput.jpg')); [एम, एन] = आकार (छवि); नकाबपोश = शून्य (एम, एन); नकाबपोश (1: 100,1: 90) = 255; नकाबपोश (175: 300,1: 90) = 255; imshow (नकाबपोश); नया = यूआईटी 8 (मुखौटा और छवि); imshow (नया); मैंने तार्किक प्रयोग किया और छवि के एक हिस्से को प्राप्त करने के लिए। यहां एक मुखौटा बनाया गया है और तार्किक रूप से और छवि के साथ। मैं भाग लेने में सक्षम नहीं हूं। एक पूर्ण काले पिक्सेल प्राप्त करें। क्या कोई बता सकता है कि उपरोक्त कोड में गलती क्या है? 'नकाबपोश और छवि' या तो 1 है या 0. यूआईटी 8 का उपयोग करना, दोनों काले रंग के करीब है। इसके अलावा, आपकी कोड सभी छवि प्रकारों के लिए विफल हो जाती है, जो कि ग्रेस्केल यूआईटी 8 को छोड़कर। मुखौटा समस्या को ठीक करने के लिए, इसका प्रयोग करें: image = imread ('ooutput.jpg') ; नकाबपोश = false (एम, एन); नकाबपोश (1: 100,1: 90) सच =; नकाबपोश (175: 300,1: 90) सच =; छवि (~ नकाबपोषित) = 0 इम्शो (छवि);

r - How to use COM without admin privileges? -

I am on a work machine without admin privileges, and I created both of COM objects and provided by other objects Would you like to use any way to do this? I have seen the following packages: More related packages, but requires admin privileges . And, but they feel to maintain now and dependencies can not be found or are inconsistent with my R Version (3.0.2) Any other options? OK, yes, if you have "administrator privileges" with HKEY_CLASSES_ROOT or means access to HKEY_LOCAL_MACHINE \ Software \ Classes . However, instead of installing software software, you will need to copy / copy it and not register it in its CLSID, interface, Typellibs and automatically HKEY_CURRENT_USER \ Software \ Classes . You can try around the installer and see how the registry changes are made. Note that this utility runs from the same directory because the installer works correctly, and it only spy on the projected process. If the installer runs subprocesses to registe...

javascript - Find a (substring) inside a string -

I am working on a search function which can show partial results according to your search variables For example, we are searching for a word " abcde " We have a record of stars "echopesaiya" " "abcfeqs" "cdeeqwee" Then the result "Uh * ABC * sdwe" - ewq * abcde * "-" * ABC * feqs "-" * cd * eqwee " Is it possible to use Jquery Is doing Add! Searching for strings in strings is done using regular expressions. RegEx can be used in javascript as well as in other languages. It is universal. RegEx is roughly used for data validation, but substrings Can also be used for search. Internet on this topic And there are plenty of guides. I found one for you. Take a look :)

c++ - what is pointer past the end of an object means? -

In C ++ primer, chapter 2, "variable and basic type", it says: One pointer for an object and at the end of the same object is possible to capture a single address. I am not a native speaker, and I think that is the reason why I am really confused with the "one pointer one at the end of the object" sentence. Will someone tell me what does this mean? This means that int a [] = {1 , 2}; Float b; It is possible that (zero *) & amp; A [2] == (zero *) & amp; Amp; B can be compared as true. and [2] (or equivalent, a + 2 ) is an indicator which is at the end of a Is because the array is only the elements of index 0 and 1. Generally, the out-of-range array index is completely invalid (access to a [2] is not allowed, neither is computing & amp; ; A [3] ), but before the end of an array, there is a special exception to calculate the address, because as it turned out, it is quite useful, for example when an array and you loop An en...

plot - R error in xy.coords -

I am using R package "sdcMicro" and I ? SdcMicro , but conspiracy method can not be used. Work example: install.packages ("sdcMicro", depend = TRUE) Library (SDCMCRO) data (free 1) F & LT; Inductive-indivRisk (f) Class (Ind) [1] "Indivir" Plot (Ind) I Xy. Error in coords (x, y, xlabel, ylabel, log): 'x' is a list, but the component does not have 'x' and 'y': If I try the methods (class = indivRisk) I get: [1] print.indivRisk , classes of "indivirus" should be plot.indivRisk print.indivRisk In the analysis of the plot method dataThe pain. I do not understand why I do not have this method. Can someone help me or guide me for a lecture? I am using RGE (64-bit) on Windows 7. You are right; Ind : Given the structure of str (IND), there is no print.indivRisk method. ## List of ## $ rk: num [1: 4000] 0.00121 0.00421 0.00421 0.00421 0.00169 ... ## $ Method: chr "approx" ...

javascript - Resizing a YUI dial widget as page resizes -

I am using a responsive page and trying to update the size of the screen so that the screen's Size can be changed. Always fits within your container I think that might be able to update the characteristics of the dial object (diameter, width, height, etc.), but the UI can not be found to update Could. Renderer () calling and syncUI () the way does not seem to be anything. In fact, YUI can not be used long ago I am missing something! Despite this question stumbled for someone, I managed to solve it. I was not using the appropriate set () method before calling the syncUI () method on the dial object. Here's the solution: $ (window) .smartresize (function () {var diameter = $ ('# container'). Width (); dial .Set ('diameter', diameter) ; Dial.syncUI ();});

c# - WPF DataGrid set Column width from widthest cell -

I have trouble using the datagroups columns are loaded from the most comprehensive view cell. But if the user scrolls down, and a wider cell appears, then the size of the column changes. Users do not like it, so I search to cancel this behavior. A simple solution is to set the breadth width, with broad width. If you have another solution to solve my problem, then it will also be good. & lt; Window x: class = "win" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx/2006/ Xaml "SizeToContent =" width "& gt; & Lt; Grid & gt; & Lt; Grid.RowDefinitions & gt; & Lt; RowDefinition Height = "Auto" /> & Lt; RowDefinition / & gt; & Lt; /Grid.RowDefinitions> & Lt; Groupbox grid. Row = "0" header = "face" & gt; & Lt; Text box text changed = "text box filter" /> / GroupBox & gt; ...

sublimetext2 - SublimeCodeIntel and Symfony2 autoloading -

I am trying to move from PHPStorm to solid text 3, but I combine with symphony 2 with the submile codein Got stuck on Autocomplete using Vendor / and src / How can I create a sub-code code to scan my project directory? Now whenever I am in the controller, I get I get warning: to evaluate $ response = new response () $ response- & gt; In 'GamesController.php # 27: The first part of the' request 'can not be solved. First, settings-default and settings-user Options under Preferences - & gt; Select. Packages - & gt; SublimeCodeIntel . Copy the full text of the default file and paste it into the user file, which must be empty if you have not customized the plug-in at all. You can now close the default file. Now set in the body of preferences "codeintel_max_recursive_dir_depth": 25, "codeintel_scan_files_in_project": True, Next, scroll down to the codeintel_config array and edit the PHP section following:...

javascript - This code cant find the div with a specific id -

Image
If you try this code here: I try Find out if I do not know if I find a divas with ID "Test" and I can make it. The problem is that if I call this function multiple times, it makes div all the time: var divClasses = $ ('# test'); If (divClasses.length == 0) {divClasses = $ ('& lt; div / & gt;', {id: "test"}). Annex ('body'); Console.log ('unusual!'); } How does it come? Your keyboard must produce different characters than expected, either your ' or # is incorrect. You can see the difference between your '#test' encoduriconant ('# test') -> and a #test is typed into an English keyboard encodeurIComponent ('% E2% 80% AA% 23 test '#test') - & gt; "% 23 test" I think this is the starting bid, maybe.

Use the remote debugging protocol in the Chromium based Opera -

I use the Google Chrome Remote Debugging Protocol to get benchmarking information about the page loading process with Google Chrome . I would like to switch to opera, which should now provide similar functionality, which it runs on Chromium I started Opera with Chrome parameters "--remote-debugging-port = 9222 - Enable-Benchmarking - Enabled-Net-Benchmarking "Like introducing Google Chrome, I came to know that Benchmarking Simmons could not be started in Opera - Chrome. Benchmarking Object is not visible to Javascript. I did not find any documents on the Cli parameters for opera, nor how to work Remote debugging protocols in Opera. Does anybody know how Benchmarking can be enabled and / or does the remote debugging protocol work in Opera? For some reason (maybe it's a design But I did not have the problem of checking), you really can not start two separate examples of Chropera, so you have to get out of the opera (from the menu to save your session). , Get...

python - problems setting up django-toolbar: the bar is not shown -

I am trying to set django-toolbar in my production site, so some special IPs can use it I have followed (install and quick setup), but I can not see the toolbar App is installed: $ yolk -l | Grep toolbar django-debug-toolbar - 0.11.0 - active I've added the required settings: INSTALLED_APPS = ('django.contrib.auth ',' Django.contrib.contenttypes', 'django.contrib.sessions',' django.contrib.sites', 'django.contrib.messages',' django.contrib.staticfiles', 'django.contrib.admin', 'Django.contrib.sitemaps', 'modeltranslation', 'djangocms_text_ckeditor', 'cms', 'mptt', 'menu', 'south', 'sekizai', 'debug_toolbar', # more stuff ...) INTERNAL_IPS = ( --- --- --- --- --- ---., The IP logged from the current server, I'm sure that this is true STATIC_URL = '/ static /' DEBUG = True There is no error message. I also have cases of collecti...