Posts

Showing posts from June, 2014

io - Unity C# Recognizing \n when reading in from text file -

I have a text file with several lines of string, for example "commander" and "44105" I'm going to show them on the screen. I need to create new lines at some points, but when I'm using \ n in the text file, the program does not recognize the new line, but \ N displays in the string when displayed in the string. Reader = New Streamer ("Assets / Correct Entrepreneur. Txt", encoding. Default); While (! Reader. AndFirst & amp; Turnoff == Incorrect) {lineReader = Reader.ReadLine (); If (problemIndex == question index) {answer = lineReader; TurnOff = True; } Question Index + = 1; } Everything else works well, it just does not recognize as a specific character. I would appreciate some help in getting this problem fixed. OK, after the clarification, the question here is what can be done for you list & lt; String & gt; Line = new list & lt; String & gt; (); (StreamReader Reader = New Stream Reader ("Assets / Test ....

Getting highlight copy and paste in VIM -

I'm trying to switch to VIM, but there is a feature that I really lack and it's a highlights copy - Pasting. In addition, I have actually lost the "P" and "Y" orders, I may not have to copy or paste anything properly. I have set "clipboard = anonymize" to use the OS clipboard, can you solve some points, or possibly my problems? It would be nice if I can do Ctrl + C / Ctrl + V and be able to copy the highlighted text from my clipboard and paste it from my clipboard. Thanks in advance. By default, the Wim Yang text and store it in the " register After yanking, you can see it by typing : reg command. However, you can control which register you want to yakub or paste For example, insert content from "ay yanks / copy register a , " cp register to c Is / sticks. In Vim you have more than one cloth "You can copy many things into different" clipboards "and paste them right. This is a big advantage of V...

serialization - Opening up two sockets in java from different instances of an application to the same source -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर यह सिर्फ मुझे ही हो सकता है बेवकूफ, लेकिन मैं अपने कंप्यूटर पर दो अलग-अलग एप्लिकेशन खोल रहा हूं जो कंप्यूटर पर चलने वाले सर्वर के एक ही बंदरगाह से कनेक्ट होता है अब, यह एक आवेदन से जुड़ा है, लेकिन एक बार दूसरे को लॉन्च किया जाता है, यह जावा.ओ.स्ट्रीम कॉरप्रेटेड एक्सेप्शन के बारे में अपवादों का एक गुच्छा फेंकने शुरू हो जाता है: अमान्य प्रकार कोड: एसी .. यह इसलिए है क्योंकि मैं 1 सर्वर + एक ही मशीन पर चल रहे 2 ग्राहक? संपादन: कोड: सॉकेट सॉकेट = नया सॉकेट (InetAddress.getByName ("127.0.0.1"), 12352); सॉकेटथ्रेड स्टैड = नया सॉकेटथ्रेड (सॉकेट); ... sthread.start (); गर्तिका धागा के अंदर: this.ois = नया ऑब्जेक्ट इनटस्टस्ट्रीम (socket.getInputStream ()); & Lt; - ois ObjectInputStream के लिए एक चर है ... पैकेट पैकेट = (पैकेट) ois.readObject (); & Lt; - इस रेखा पर त्रुटि दिखाई देती है संपादन # 2: दूसरा - सर्वर कोड: जबकि (सही) {सॉकेट प्लेयर = server.accept (); System.out.println (खिलाड़ी.गेटरेमोटेसकेटआधार...

android - How to play videos from the web like youtube in kivy -

I really want to create a Kiwi app that lets me watch videos from some web links. How can I go about doing this, as if it is a link to the video, run it in Kiwi? I have already read the documentation and I do not get it. help please. Both widgets and widgets are capable of playing streaming video from the web. Here is a simple example of running a video from the web: Import from kivy.app import from kivy.app import (). Load_string ('' Video Player: Source: 'http://www.debone.com/VivVilConGminorRV578.mpg' '' ') Class Testup (App): Def Build (Auto): Return route if __name__ ==' __main__ ': TestApp () Run () This will work for any supported streaming media type. However, note that YouTube does not provide streaming URLs to see the answer to a question that was specifically asking about YouTube.

iphone - Corresponding real iDevice and iOS simulator -

I'm feeling a bit dummy to ask such questions but I'm not sure. Can anyone tell me that the actual device corresponds to exactly one device in the simulator? I have seen that all the tools available in the simulator are the following, but what are they analogous? iPhone Retina (3.5 inch): iPhone 4 and 4S? IPhone Retina (4 inch): iPhone 5? IPhone Retina (4-inch 64-bit): iPhone 5S? IPad iPad Retina: iPad 1, 2 or 3? IPad Retina (64-bit) All iPhone entries are correct with you The 5th General iPod Touch will be under the iPhone Retina 4. " The 4G Gen iPod Touch will be under the iPhone Retina 3.5." The third general and the first iPhone will be under non-retina 3.5. IPad will be: iPad - iPad1, iPad 2, First General Mini iPad Retina - iPad 3, iPad 4, iPad Retina 64-bit - iPad Air, 2G Mini Mini The Wikipedia page is very useful for me.

Beginner PHP XPath Text Display -

Target: Use Exax Checker / Firefox and PHP to display selective text on a webpage. What is the PHP XPATH code needed to display only the name (text) on this page? Using this code: & lt ;? Php $ html = new DOMDocument (); @ $ HTML- & gt; LoadHtmlFile ('http://steamcommunity.com/profiles/76561197967713768'); $ Xpath = new DOMXPath ($ html); $ Nodelist = $ xpath- & gt; Query ("// div [@ class = 'persona_name']"); Foreign currency ($ nodelist $$) {echo $ n- & gt; NodeValue "\ N"; }? & Gt; I get the output of " mopar410 is also played as this user: " I only call it "mopar410" . I "This user is also played as:" part Some information can not be accessed via XML, and when I change it from top to xpath, tester in Firefox (example): & lt; ? Php $ html = newdomdocument (); @ $ HTML- & gt; LoadHtmlFile ('http://steamcommunity.com/profiles/76561197967713768'); $ Xpath = new D...

Open a file with a weird file extension using php -

I have found the file with a strange file extension (.dta). When I try to open it with FOPN (), I get the following error: Failed to open the stream: HTTP request failed! HTTP / 1.1 404 not found This file stays on the server, and I do not want to change its extension. I can copy the file, save the copy as .txt, go into it and delete it, but I was wondering if there is any better way.

c# - Adding an image next to a table in iTextSharp -

I want to add an image next to a table without a new line. I have the following code: iTextSharp.text.Font font = new iTextSharp.text.Font (FontFactory.GetFont ( "Ariel", 8, iTextSharp.text.Font.NORMAL)); ITextSharp.text.font fontbold = new iTextSharp.text.Font (FontFactory.GetFont ( "Ariel", 8, iTextSharp.text.Font.BOLD)); PdfPTable tkunde = new PDFPTable (1); Triples With percentage = 30; Tkunde.HorizontalAlignment = Element ALIGN_LEFT; PDFPLL LANCUNNVAN = new PDFPCL (new phrase (renewal, font-ball)); LabkunNavn.PaddingTop = 2f; LabkunNavn.HorizontalAlignment = Element.ALIGN_LEFT; LabkunNavn.Border = 0; Tkunde.AddCell (labkunNavn); PDFPCLL LANCONEresressS = new PDFPCL (new phrase (address, font)); LabkunAdresse.PaddingTop = 2f; LabkunAdresse.HorizontalAlignment = Element.ALIGN_LEFT; LabkunAdresse.Border = 0; Tkunde.AddCell (labkunAdresse); PdfPCell labkunPost = new Peedifpisiel (new phrase (Posten + "+ Oman, font)); LabkunPost.PaddingTop = 2f; LabkunPo...

javascript checking for function and giving output if it exists -

I need a script which checks that the function is on the page and, if it is, this function calls And if not, it calls a different function This is what I thought: if (example function) diffunction (); And other works (); You have to be careful to check the names not defined in Javascript. Referring to a name that is not defined will cause an error: & gt; If (examplefunction) console.log ('exist'); Else console.log ('???') ReferenceError: Examination Function is not defined Examining a name with typeof , however, is Safe, whether that name is defined or not, to check if a variable is defined for a true value, you should use it: If (example, example! = 'Undefined' and & amp; amp;; example function) diffunction (); Any other work ();

Declaring a variable with a string parameter javascript -

When you declare a variable, I think the syntax will look like this: Var test = "test"; This is a convertible declaration. I am confused about how this announcement actually works in my work: Function Hello (test) {test = "Does this work?" Return test; } Hello what '); I pass string logic to greet. In my eyes I am doing something like this inside the function: "what" = "does it work?" Return "What" In this case the identifier is a string identifier (in this case "what") the type has been changed, how is it ignoring that 'what' string is? Should not it be a syntax error? You have to understand the difference between a variable and a value. When you say hello ('what'), then you are assuming 'what' in the function. This value is assigned to the variable 'test' 'test' is a variable, which is one in memory The place is a reference in which the value is 'wh...

html - After transition is complete, show the div -

Dear StackHowflow readers, Using only CSS3, I will show a Div after the transition. This is the snippet of HTML with which I'm working This is a snippet of CSS3. I'm working with .bigury {width: 100px; Height: 40px; Swim left; Margin: 5 px; Background: # 3399ff; Color: #ffffff; Box-shadow: 2px 2px 10px RGBA (0, 0, 0, 0.5); Status: Relative; Correct: 5%; font-weight: bold; Font-size: 15px; Text align: center; Padding: 10px; Boundary-radius: 5px; Opacity: 0.4; Transition: All 0.5s ease; Webkit-Infection: All 0.5S Easy; -O-Infection: All 0.5 S Easy; -Mozy-infected: all 0.5S easy; }. Bungery: hover {width: 200px; Height: 600px; Margin: 10px 10px 0px -100px; Opacity: 1; Background: # 7C7C7C; } #moreBio {opacity: 0; Transition: Ease of absence of 0.5 S; -Wbkit-Infection: Ease of Absorption 0.5S; -O-Infection: Ease of absence of 0.5 s; -Mozy-infection: Ease of absence of 0.5 S; } #moreBio: Hover {Opacity: 1; } I want to see #moreBio after the transition is completed, h...

java - Text Box not working properly -

I wrote a program for an applet that you want to display different text in the text box when pressing a button Are there. There is no error in my program when I compiled it, but the text box is not displayed correctly I do not know what is wrong with it. Here is my code import java.awt. *; Import java.awt.event. *; Public class color {button button 1; Button Button 2; Button button3; Label label 1; Textfield ogtextfilled 1; Public static zero main (string algos []) {colors c = new colors (); } Public color () {frame F = new frame ("color"); Button Button 1 = New Button ("Blue"); Button1.setBounds (10,305,120,75); Button1.addMouseListener (New MyMouseListener1 ()); Button Button 2 = New Button ("Red"); Button2.setBounds (140,305,120,75); Button2.addMouseListener (New MyMouseListener2 ()); Button Button 3 = New Button ("Yellow"); Button3.setBounds (270,305,120,75); Button 3.addMouseListener (New MyMouseListener3 ()); F.add (Button1); F.add (...

git - What does "*.jpg binary -delta" do in the .gitattributes file? -

रखने का सुझाव दे रहा है *। Jpg binary -delta जीआईटी में repos के लिए .gitattribute फ़ाइल में, लेकिन मुझे यकीन नहीं है कि यह क्या करता है जीआईटी के लिए मुझे 'डील्टा' ध्वज के कोई भी उदाहरण नहीं मिल सकते हैं। इसका उद्देश्य बड़े फाइलों के लिए अपवाद या गति को गति देने का उद्देश्य है। इससे संबंधित हो सकता है: ऑब्जेक्ट पैकिंग डेल्टा डेल्टा संपीड़न का प्रयास झूठी विशेषता डेल्टा के साथ पथ के लिए blobs के लिए नहीं किया जाएगा। मैं "" में डेल्टा संग्रहण का विवरण। यह बाइनरी फाइलों की डिफ़ॉल्ट रूप से सेट नहीं है क्योंकि: हमारा मूल लक्ष्य लक्षित ऑडियंस जो लोग जीआईटी को स्रोत कोड नियंत्रण प्रणाली के रूप में उपयोग करते हैं। : मेरे डेपोटा जेपीजी मेरे एक रिपॉजिटरी में यह उपयोगी है अगर exif मेटाडेटा बदलता है लेकिन छवि डेटा नहीं है। मुझे लगता है कि आप ऐसा अन्य प्रारूपों के साथ भी कर सकते हैं जो संकुचित और असम्पीडित भागों (मैं इसे वीडियो कंटेनर के साथ भी करता हूं)। मुझे नहीं लगता कि यह डेल्टा जीज़िप या बीपीड सामग्री की कोशिश करने के लिए कभी भी समझ ...

differences between C++ and C# -

I know C ++ but I'm new to C # programming, and I have a few questions: I know that in C #, there is no "constipation", so how do you change it? If you call a method f (stack skak) , how do you ensure that f () will not change my stack? Automatic in each class in C ++ operator = , copy ctor and dtor Made by the form, C # also does this? I know that in C #, if we have a method f (stack skaack) , then it's f (stack & Stk) in in C ++, so how do I send the object parameter from the value? In C #, we also create two files: .h for announcements and (thanks!) Any of the arbitrary types The only personal field can be read-only , unchecked variables or type "constants" ( const ) compile-time constants Like, like p. class not for types, because they can not be assigned directly class type always handled through an indicator, the object does not directly manipulate only struct can be manipulated directly,...

java - Regex for function calls like A(x=10,y=20,z=56); -

Can you tell me how to write reg-ex for the following types of function types? one (x = 10, y = 20); B (x = 34); C (x = 20, y = 30, z = 40); There can be any upper case letter instead of a , B or c and / y / z . A and the formula: A (x = 10, y = 20, z = 67) Instead of XYZ, we can use any capital letter. - "([az] \ ([az] = \ d + (?:, [Az] =) \ D +) * \); "+ ([AZ] # one uppercase letter \ (# a literal" ("[az] # a lowercase character = # a literal" = "\ d + # few points (?:, [Az ] = \ D +) * # Optional repeating groups \); # literal character sequence "" + # one or more / x To complete this answer, I started writing it before closing, so now I have removed the answer. There is nothing to see here.

javascript - Backbone.js manually trigger "error" on a collection -

If my server / jsn returns a specific status (for example no results) then i I want to fail Problem: The default error-handler is not called (since the collection successfully receives Jason. So my idea is to use a pars function to see an error code in JSS But how do I trigger the error-method and inform my idea (and stop trying to create the model) / * Global Defined * / Defined (['underscore', 'backbone', 'model / miam '', Use 'strict use'; var SomeCollection = Backbone.collection.extend ({Model: MyModel, value: null, url: function () {Return url: "data / list" .json ";}, initialize: function (model, option) {this.zipcode = options.zipcode;}, pars: function (feedback, xhr) {if (response.status = =" OK ") {Console.info ( "Status:" + response.status; return response. Results;} Else {console.warn ("status:" + response.status + - message: "+ response.message); This.trigger ('failed...

c# - datetime working locally but not on server -

I have a form that includes a date .. Working locally , When I submit it to the form works terribly and saves the date of the server. But when I try to do this with the server, I get an error: string valid date time. System Collections.LivisionInNellal Code: Using the system; Using System.Collections.Generic; Using System.Linq; Using System.Web; Using System.Web.UI; Using System.Web.UI.WebControls; Using System.Globalization; Public Partial Classroom Test: System.Web.UI.Page {Secure Zero dog_add_submit_Click (Object Sender, EventArgs) • Create and Populate Dog / Dog D = New Dog (); Try {d.DogName = dog_add_name.Text; D.IgeErl = SaveSize (); D.Colour = dog_add_colour.Text; D.PlaceFrom = dog_add_placeFrom.Text; D.Breed = dog_add_breed.Text; D.ArrivalDate = DateTime.Parse (txtDate.Text); // If the fields are properly populated then try to insert C # into the database {int numEffected = d.doginsert (); // Response.Write ("Points of Effective Rows" are + numEffect...

Equivalent of SBT's "provided" dependency for fatjar in Gradle? -

Using Scala's SBT, I can indicate that the dependency required for compilation will be "provided" in the runtime environment, such as: val catalina = "org.apache.tomcat"% "tomcat-catalina"% V.tomcat% "provided" Marked as Itemprop = "Text"> At the moment, Gradle does not provide any configuration out-of-the-box. However, there are some plugins linking this functionality: Alternatively, you can also configure this configuration as yourself can do . You will see many examples for this.

amazon web services - pointing domain to AWS Server causes redirect loop -

I have taken these precise steps here: Actually, I first made S3 bucket, The rules were added to the Route 53 and then the Registrar (which I do not have a domain from) the Amazon name server I just started from mmysite.com and then repeated the steps for www.mysite.com and now when I go to the site, So giving me an error saying "This web page is a redirect loop and as a result a lot That redirection are ". When I use www and whenever I do not do well, why not consider any? I followed the exact steps given in the given link. I had a similar problem in my case I had two ec2 servers in two areas. In both the servers I was running Apache. I included the status of IF in my 000-default.conf file. (This file is found in the CD / etc / apache2 / sites-available) I had a redirect statement in this file. I removed it and started working on it.

angularjs - Calling angular services globally -

I have a set of services that represent a backend logic, which is called by different angle controllers. During the development, however, from the browser JavaScript Console, I want to call these services directly to check these services directly in isolation. How can this be done? There app.service ('service1', function () {this.sayHello = function () {return "Hello"};}); Now with Javascript Console, app. CoatingToSet service ('service1'). SayHello () ? You can get the injector for the module and get the service from: (angular insulator) (['ng', 'muep']). ('Service 1'). SayHello ()

css - 2 column layout with column heights that stick to the footer -

I have a basic layout with 2 columns and a footer that behaves according to the height of the column. & lt; Div id = "holder" & gt; & Lt; Nav class = "navbar navbar-default navbar-fixed-top" & gt; & Lt; / Nav> & Lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "left col-md-8" & gt; Increases with content & lt; / Div & gt; & Lt; Div square = "right col-md-4" & gt; Increases with content & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "footer" & gt; Relative behavior occurs when the content of any column is long enough, when there is not enough material, it sticks down. / Div & gt; Full code with CSS : What would be a great solution for creating columns with the same heights, but also the foot Article? In this way: (I used minimum-height on left and r...

c# - How to correctly create a database using entity framework code first approach -

After creating the first database with the first structural code to prepare a database, I still can not believe that the right way What is the only way to create a database is using migration, so after installing those models I need, I use Package Manager and do it: Enable-Migration and then: Add-Migrate Initially: update-database I have seen many tutorials like this one: Talks about installing that model and after running the database, the database appears without any use of the migration, I am quite confused, therefore My questions are: Has the database been used after the statement? So in the above tutorial: using (var db = new bloggingcontext ()) Migration is generally used Is the database used to update only? What's the best way to get your opinion? 1 What database was used after the statement is? So in the above tutorial: using (var db = new bloggingcontext ()) It almost works, but you Additional syntax will be added, due...

android - Separate icon versions for action bar and home screen -

Is it possible to display different versions of app icons on app's action bar and home screen? I android: theme = "@ style / apptheme" in the attribute & lt; Application & gt; Using the element of the manifest xml file. Style for Aaplyam Style or its basic styles. There is currently no optimization in XML files. I've written some Android app (trying to update one of them) and I'm still not very comfortable with some features. Yes, this android: logo & lt in your manifest ; Application & gt; element attribute: & lt; Android application: name = "..." android: label = ". .." android: theme = "..." android: icon = "@ drawable / Aisi_lancr" Android: Logo = "@ drawable / Aisi_akshnbar_ logo" & gt ;

javascript - Apply spin.js spinner to target and NOT its parent -

When you are in the position of spin.js spinner, then you have the option. I think these options say that Keeps the parents in line with the goals I do not want this. But I want the spinner to be in the position inside the goal div and inside the center. Set up the original: var opts = {Lines: 13, // The length of the drawing line: 5, // Length of each line width: 2, // line thickness radius: 5, // radius of the inner circle circle: 1, // rotate the corner rounding (0..1): 58, // rotation offset direction: 1, 1 1: clockwise, - 1: The color of the counterclock: '#fff', // #rgb or #rrggbb or color speed array: 0.9, // mark per second: 100, // shadow shadows: false, // what is the one Shadow hwaccel render is: Addiction, // hardware acceleration class is to use name: 'spinner', // class to assign spinner jendex: 2 e9, // z-index (up to 2000000000000 default) Top: '50% ', // Top position despite parent: '50% '// position relative to left parent}; ...

javascript - Why won't slice work? -

I'm new to JavaScript, and I'm trying to write Chrome extensions. For expansions, if the user input a string, then I want to cut the first two characters. Currently, I have: if (text.charAt (0) == '/') {text.slice (0,2); Chrome.tabs.create ({url: "Private URL" + Text}); } But that does not work, nothing is cut off. I think there is something wrong in some style, because I am still learning Any help is appreciated The slice does not work in "place", but returns the value: var text = "Hello World"; Console.log (text.slice (0,2)); // that console.log (text); // Hello World (unchanged!) You must specify it in the variable like this: text = text.slice (0,2); In addition, from your question, it seems that you are trying to remove the first two letters. This will be var text = "Hello World"; Text = text.slice (2); // "llow world" will be

PHP: Send persistent asynchronous request -

I created this function a long time ago, which appeared right then Public static function sendAsyncHTTPRequest ($ hostName, $ port = 80, $ method, $ url, $ headers = array ()) {$ fp = fsockopen ($ hostName, $ port, $ error, $ errstr, 30); If (! $ Fp) {put new / exception ($ errstr, $ errno); } Other {Effilit ($ FP, "$ method $ Yuri HTTP / 1.1 \ r \ n" "Host:" $ hostName. "\ R \ n" "Connection: Closed \ r \ n" \ r \ n ", $ Header)." \ R \ n \ r \ n "); fclose ($ FP);}} The sole purpose of triggering some scripts from customer request, without slowing down the request, Without expecting a response, however, I tried to use that function today, to start a websocket server and surprisingly it was not asynchronous. Here is a piece of code that should start the server \ MF \ System :: sendAsyncHTTPRequest (SITE_DOMAI N, 80, 'GET', '/ battleWS / startServer /'. $ BattleId); Header ('Location:' .SITE_URL...

select - MySQL Query to list stat for total hits based on individual players & hits? -

OK, I have the following data: ID name target 1 user 1 user2 2 I want to get the 'most hits' and 'most hits' status for a particular player. For example, in the above case, User 3 has been hit the user 1 (2 times total). Then user will be the 'most hit' state for 1: player total_hits user3 2 and 'most hits' will be state for user 3: player total_hits user1 2 From this query I think there is something from this line: SELECT ` '`` `` `` `` `` `` `` `` `` `` `` `` `` ` `` `` `` But the whole query is out of me; Any ideas? greater hits hits from SELECT `target` Group selection by 'Launch` Order Gate (*), by the group, with the name "Hits" named by the name highest hits Question range (*) by desc range 1 The question is almost identical; it is only different from the column in your group

class - How does this use of Python's __metaclass__ work? -

I got a presentation about generator and functional programming. I stumbled on __ metaCLASS__ Why the argument of genuine and float Accounting? Usually there is base , but is it necessary to type in real and float ? What does __bastmethods __ do? I can not find it in the general list of special methods. Does the author enrich his own accounting class by using those two methods of classes, with the ways of other sections, loops? Why does account (getattr (float, meth) (* args, ** kwargs)) The result is not in the infinite loop? Unlike the second edition, what happens here? First of all, it is a fraction that is relevant to my question: class accounting ( Real, float): def __metaclass __ (name, base, body): for the method in real .__ abstractmethods__: If the method is not in the body: body [method] = (Lambda meth: lambda * args, * * quarwiz: method For the method in ('__ne __', '__najiro_',)) (method (float, meth) (* args, ** quar...

wordpress - Woocommerce: Using WC_AJAX class -

I hope you can help. I upgraded Woocommerce to version 2.1.12 and I had a function woocommerce_get_refreshed_fragments () which is now missing It seems that they have moved it to the WC_AJAX class , But when I access it with WC_AJAX :: get_refreshed_fragments (); Following error. & lt; B & gt; Fatal error & lt; / B & gt;: Not using the $ when the object references & lt; B & gt; / Home / lmof / public_html / wp-content / plugins /woocommerce/includes/class-wc-ajax.php</b> On the line & lt; B & gt; 83 & lt; / B & gt; & Lt; Br / & gt;

TinyMCE hook breaks Wordpress media preview in editor -

I am expanding the WP editor with custom buttons when I use this hook then the problem occurs: / P> add_filter ('mce_css', 'mytheme_icon_picker'); This is used to encrypt custom scripts and styles. Even the empty function does not display the media player / is not displayed in the editor. This makes me believe that hooking up to mce_css , WP enqueueing breaks media-player properties. Does anyone know how to use hooks, can custom behaviors be included correctly without breaking custom files? The code you are using is a filter, it must return a value. Your function should be added to the existing list of CSS files. function wpse_icon_picker ($ mce_css) {If (! Empty ($ mce_css)) {$ mce_css. = ','; } $ Mce_css. = 'Enter URL here in CSS'; Return $ mce_css; } Add_filter ('mce_css', 'wpse_icon_picker');

javascript - data-attribute not updating and onclick event still on it -

मुझे इस ऑनक्लिक इवेंट प्रभाव के साथ समस्या है: / * '#generateZip' * / $ ("# Generatezip [data-readyzip = 'start']")। क्लिक करें (फ़ंक्शन (इवेंट) {event.preventDefault (); / * change style / css * / $ ('# generatezip')। AddClass ( "अक्षम"); $ ('# generatezip')। Html ("& lt; i क्लास = \" fa fa-spinner fa-spin \ "& gt; & lt; / i & gt; प्रगति में है!); / * ज़िप को कॉल करें * / JQuery.ajax ({प्रकार: 'पोस्ट', यूआरएल: 'http://www.monde-du-rat.fr/API/zipMC.php', टाइमआउट: 8000, डेटाटाइप: 'पाठ', डेटा: { कॉल: 'हां'}, "सफलता": फ़ंक्शन (जेकएक्सएचआर, टेक्स्टस्टैटस, त्रुटि ट्राउवर) {console.log ("एजेएक्स सफलता :) - स्टेटट" + टेक्स्टस्टैटस); / * परिवर्तन विशेषताएँ / / $ ('# जनरेटजिप')। एट्रर ('डाटा-रेंजजिप', 'हां'); सेटटाइमआउट (तैयारजिप, 3000);}, "एरर": फ़ंक्शन (जेकएक्सएचआर, टेक्स्टस्टैटस, एफ़्रेशन ट्रॉवॉर्न) { Console.log (...

javascript - Events triggered by dynamically generated element are not captured by event handler -

मेरे पास & lt; div & gt; साथ id = "modal" JQuery के साथ गतिशील रूप से जेनरेट किया गया load () विधि: $ ('# modal')। लोड ('हैंडलर / वर्ड। एडिट। Php'); word.edit.php में कुछ इनपुट तत्व होते हैं, जो कि मॉडल & lt; div & gt; में लोड होते हैं। > jQuery के keyup पद्धति का उपयोग करके मैं एक ईवेंट आग के बाद इनपुट मानों को कैप्चर कर सकता हूं, लेकिन जब तत्वों को डायनामिक रूप से मॉडल डिवा में जोड़ दिया जाता है, तो जब कोई उपयोगकर्ता अपना पाठ दर्ज करता है कौन सा jQuery विधि गतिशील रूप से निर्मित तत्वों द्वारा ट्रिगर करने वाली हैंडलिंग इवेंट का समर्थन करती है? नए इनपुट तत्वों को बनाने के लिए कोड है: $ ('# क्लिक करें (कार्य () {$ ('& lt; इनपुट आईडी =' '+ i +' "प्रकार =" टेक्स्ट "नाम =" अनुवाद "+ i + '" / & gt;') .appendTo ('# modal '); उपयोगकर्ता के मूल्यों को कैप्चर करने के लिए कोड है: $ (' input ')। कुंजीप (फ़ंक्शन () {हैंडलर = $ ( यह) .वल...

linux - Error from KGlobal::locale while opening a QFileDialog in C++ -

मुझे यह C ++ कोड मिला है: bool load () {const QString * फ़ाइलनाम = ओपनफ़ाइलडायलॉग (QFileDialog :: AcceptOpen, QFileDialog :: मौजूदाफ़ाइल); अगर (फ़ाइल नाम! = 0) रिटर्न लोड (* filename); दूसरा झूठी वापसी; } Const QString * openFileDialog (QFileDialog :: AcceptMode स्वीकामोड, QFileDialog :: FileMode मोड) {QFileDialog संवाद; dialog.setAcceptMode (acceptMode); dialog.setFileMode (मोड); dialog.show (); QStringList फ़ाइलें = dialog.selectedFiles (); अगर (files.isEmpty ()) 0; नई QString (files.at (1)) लौटें; } अब, मुझे निम्न त्रुटि मिलती है: KGlobal :: locale :: चेतावनी आपके वैश्विक KLocale के बजाय एक वैध मुख्य घटक के साथ निर्मित किया जा रहा है एक नकली घटक, इसका आम तौर पर मतलब है कि आपने अपने मुख्य घटक को बनाए जाने से पहले i18n संबंधित कार्यों को कॉल करने की कोशिश की थी। आपको ऐसा नहीं करना चाहिए क्योंकि यह सबसे अधिक संभावना काम नहीं करेगा फ़ाइल का संवाद कभी नहीं दिखाई देता है। मैं डेबियन विहेजी (जर्मन), KDE 4.8.4 , क्यूटी 4.8.2 और जीसीसी 4.7.2 मैं पार्टी के लिए देर कर रह...

ruby on rails - Generating new model is not possible after creating model in active admin for that in ROR -

When I'm trying to model the model using 'Rail G Model Certificate', but it shows me an error After creating 'Top Essential', use the new model for the active administrator who uses 'Rail G Active_Admin: Resource Certificate' Anyone knows about this error? What should I do first? To create a model in the active admin, should I first create the model and should I create a model for it? Thank you. Yes, you must first generate a model using Then you can add that model to the active admin with Rail G activ_admin: Resource Certificate We can only add existing models to active_admin Here we have the best tutorial about active administrators

r - Plotting a "sequence logo" using ggplot2? -

Image
Is it possible to use (reasonably) ggplot2? There is a package to do this, which is based on the "grid" that is called "", but I was thinking that there might be a ggplot2 version in it. Thank you. It should be what you are looking for. I hope that it can overcome some disappointments I'm sure many of you are when it comes to plotting the sequence logo in R

mongodb - mongo type matching changes when using an index -

I'm trying to write an automated test to make sure that some fields in my archive have a consistent Are the types. For each of these fields, I have a required type I therefore I am querying for those documents that ignore the field with a different type of documents, where the field is missing or zero. When an index exists on the field, it seems that there is no difference between numerical type 1 (double), 16 (32-bit int) and 18 (64-bit int). I'm using Mongo 2.6.1. Here is a session that shows the problem: Insert a document into a new collection, it has a field x that is 32-bit int: & gt; Db.typetest.insert ({x: numberINT (1)} TypeRestalt ({"NINSATIED": 1}) Note that $ type only matches type 16 (32-bit int). , As expected: & gt; Db.typetest.find ({x: $ type: 1}}) & gt; Db.typetest.find ({x: {$ type: 16}}} {"_id": ObjectId ("53d52620eb3748b3f9cde293"), "x": 1} & gt; Db.typetest.find ({x: {$ Type: 17}}) & ...

configuration - Access rights for site-enabled nginx folder -

I would like to split my NGN website configuration into multiplier files and I have a problem. Then I have 3 files / etc / nginx / site-available folders and I have created their symbolic links with these commands in / etc / nginx / site-enabled: ln -s / etc / ngnix / sites-available / site1 / etc / nginx / site-enabled / site1 ln -s / etc / ngnix / sites-available / site2 / etc / nginx / site-enabled / site 2 ln -s / etc / ngnix / sites-available / Site3 / etc / nginx / sites-enabled / site3 I have restarted and reloaded nginx, but this does not work Does. The strange thing is that when I copy with CP, files, its functions. I checked permissions and it looks good (all for rw-r-r--). Maybe I should root these files with a specific user (www-data?) Instead of root: root? root @ lenouvel: / etc / nginx # LS-LA site-available / total 20 Druxix-XR-X2 Route root 4096 July 27 17:36. Drwxr-xr-x 5 Root Route 4096 9 July 9:19. -R-R-R1 root route 1404 27 July 17:50 Default -...

java - Jackson JSON not able to deserialize array of elements with custom root name? -

I have a Jason that looks like this: {"testEntities": [ "id": 1, "float" number: 0.006117165, "float Anmber object": 0.15273619, "Intanmber" -115 586 9 325, "Intunmber object": 431529176, "double number" .41008081149220166, "Dblnmberobjekt" .20771484130971707 "Sortnmber": 9364, "bill", "B", "Boolean value" true "Boolean value object": true, "byte value" -79 "Charvelv": "e", "Charwu object ":" B "," creation date ": 86400000}, {" id ": 2," float number ": 0.9874208, "Float Member Object": 0.45285606, "Intanember": -1154715079, "Entrepreneur Object": 1260042744, "Double Number": 0.9014476240300544, "DublinAmbject": 0.49682259343089075, "Shortenumber": 483, "Shortenumber Object": 18322, Boolean value "...

javascript - How to update my database after using ajax? -

I am using Javascript / AJAX for the first time, so I am trying to find some great ways. Right now, in my opinion, I display a figure and then when calls to an external server call one value (in this case the accounts balance). I update the data format. Now, it is working perfectly, but I am running on an issue. I would like to update my database with the new "balance" also which was found. However, I want to do later that the AJAX call has already been made. Should I do something like this in Ajax Call? (Which seems wrong) or should I include this update in that php file which is being said? Here is the view / ajax call: & lt; Script & gt; Function getBalance () {$ .get ("property / balance.php", "", function (data) {$ ('# left)'. Html (data); // alert (data);}); } GetBalance (); & Lt; / Script & gt; And here is balance.php : I know that the $. Get function is used in this way: $. (URL, data, funct...

How to eliminate duplicate list entries in Python while preserving case-sensitivity? -

I'm looking for a way to delete duplicate entries from a Python list, but with a twist; The upper list should be sensitive in the final list with priority. For example, do not just cup and cup between cup and cup Need to keep>. Unlike other common solutions, which suggest to first use less () , I like to keep the case of the string here and in particular I shorten one with one uppercase letter I like to do Then, I'm trying to turn on this list: [Hello, Hello, World, World, Poland, Poland] In: [Hello, World, Poland] How should I do this? Thanks in advance. This does not preserve the order of the word , but it is "unique "Creates a list of words preference for the capitalist. [34]: [35]: word [= 'hello', 'hello', 'world', 'world', 'Poland', 'Poland',] in [ [36] in the set (word): Item in Item for Item if item.istitle () or item.title (not in words) outside [36]: ['World', 'Po...

javascript - Google API translator. How can I translate only one DIV? -

How can I modify this code to translate only one container on the page with id #illrics? & lt; Div id = "google_translate_element" & gt; & Lt; / Div & gt; & Lt; Script & gt; Function: googleTranslateElementInit () {new language: 'N', includes: 'ru', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, Autodisplay: incorrect, multilingual page: true}, ' Google_translate_element '); } & Lt; / Script & gt; Resolve with this function: function GoogleSectionalElementInit () {New google.translate.SectionalElement ({sectionalNodeClassName: 'lyrics', controlNodeClassName: 'translation-song', background: 'trasparent'}, 'google_sectional_element'); }

postgresql - How to connect PGAdmin3 to Cloud66 hosted Postgres -

I have the Cloud66 hosted web app and postgraduate database (on a dedicated server) 3 is to connect to PostGrace DB but I am unable to configure postgres to accept my connection. I have pg_hba.conf host all 86.161.230.162/32 MD5 I It has been checked that postgresql.conf has the following setting: I have doubts in my mind - am I editing the correct version of these files? They took me a while and now I am wondering if there are no correct versions. These files are located in the directory ./ usr / local / pgsql / data / advice / guidance all appreciated. school boy error Of course. Firewall! Doh

if statement - if word found play macro -

var ret; While (rate = 1) {rate = IIMplay ("macro.IIM"); If (rate == - 9 21) IIMplay ("macro 2.iim"); } It works wonders but sometimes the session ends but I do not know how much the last session is, do you know that if you are in a specific url then enter Is there a way "or something like that? Runtime error: IMG: 100 not found, line 20 (-921), " as you can see that I already have the element specified by WIDTH I'm using -921 to do a macro, but is there a way to do this, if this specific tag is not found? It may be that a new JS file can be created And this is my new "macro 2" with something like this "if the word macro 3 game is found then the old game No 2 "Test for a tag I usually try to extract some part of it and examine the extracted text for" # EANF # ". If the tag is not found, you will get a string and you can get your program Here's an example: var macro, return code; macro = "CODE:...

ios - Fetch All CKRecords of certain type -

Assume that I have a record of type A in a private client database, with a record ID or a query How can I get that kind of all record without specifying a bid? CKQuery requires a non-bottoming meaning at the initiality (), so you have to specify a decision It will be, even if it is always right. Previous: Let's comment = NSPredicate (value: true) query = CQF (record type: "TheRecordType", predicate: predicate) Operation = CKQueryOperation (query: query) operation.queryCompletionBlock = { Cursor, error // has been completed) CK Container.Default Container (). Private Cloud Database. Operation (Operation)

button - How to translate OnMouse events to Touch phases for Android? -

I am stuck for a very simple solution, translated into Unity 3D in Android with my script . I have a game object "cube" and a js script attached to rotation. Also I'm getting a script "ClickButton.js" associated with a GUI.Testxture. Everything o.k. In the Unity Player, but I want to translate to using this script by touching on Android devices. The problem is that I can not do this, although I have read the Unity documentation. Here is the code snippet: // This script is attached to the GUI. Texture Texture2D; Var Hover Piece: Texture 2D; Function Update () {for (var i = 0; i & lt; Input.touchCount; ++ i) {if (Input.GetTouch (i) .phase == TouchPhase.Began) var = input. GetTouch (i); Rotate == doRotate (); }}} Function OnMouseEnter () {guiTexture.texture = hoverTextxture; } Function OnMouseExit () {guiTexture.texture = normalTextxture; } Function onMouseDown () {varRescriptToTate: Game Object [] = GameObject.Find Game ObjectWithTag ("Marker...

python - Inconsistent GUI layouts in Qt designer and .py after pyuic -

Image
मैं Qt designer के साथ एक फ़ॉर्म बनाने का प्रयास करता हूं प्रोटोटाइप है: मैं तीन क्षैतिज लेआउट बना देता हूं में लंबवत लेआउट , और लेआउट का विस्तार का लंबवत लेआउट से 0, 1, 0 , यह मध्य लेआउट बड़ा दिखता है। pyuic4 द्वारा संकलित करने के बाद, मुझे मिला: ऐसा लगता है कि यह पूरी तरह से लेआउट खंड को अनदेखा कर दिया है, भले ही यह उत्पादन अजगर कोड में सही रूप से उत्पन्न हुआ। अंत में मैंने लेआउट से लेआउट स्ट्रेच सेटिंग बंद करने की कोशिश की: और फिर से कंपाइल करने से एक ही आउटपुट उत्पन्न होता है। क्या कोई जानता है कि समस्या क्या है? कृपया कुछ सामग्री को दाएं-मध्य पैनल में जोड़ें स्पेसर को काम करना चाहिए, अगर आपके पास और कुछ नहीं है।

Append an output from program to a file bash script -

I have to implement several types of programs in the shell shell like the following: For $ I {1..10}; Do the time /aout; Each recurrence generates the following output: start the actual 0m1.112s user 0m1.112s sys 0m0.00s I need to add a real part to this output (generated on each iteration), that is, 0m1.112s (extracted from the actual 0m1.112s) in some output files. The final output may look like this: 1.112s, 1.113s, 1.112s, 1.113s, 1.112s I have created a program This and it works perfectly but the problem is that it creates some overhead and produces a little more variety in the time of execution. itemprop = "text"> will do the following: for ((i = 0; i / Dev / null}} 2> And did it 1 Awk '{ORS = ","; Then outputs ($ 1 == "actual") print for $ 2} ' ; & Amp; 1 will send stdout to stdr & gt; / Dev / null will leave the actual output, if any, because you are only interested in the output of ti...

codeigniter - PHP tput: No value for $TERM and no -T specified -

मैं निम्नलिखित त्रुटि का उपयोग कर रहा हूं: स्ट्रिंग (25) " /etc/init.d/mast list-log "array (1) {[0] = & gt; स्ट्रिंग (44) "tput: $ TERM के लिए कोई मान नहीं है और नहीं- T निर्दिष्ट"} tput: $ TERM के लिए कोई मान नहीं है और कोई-टी निर्दिष्ट नहीं मेरी कमांड है / etc /init.d/mast list-log और रिबूट करने से पहले काम कर रहा था। मैं क्या अंतर नहीं देख सकता। स्रोत कोड सार्वजनिक स्थिर समारोह निष्पादित ($ _ = अशक्त, $ डिबग = सच) {$ _ = $ debug? $ _। "2 & gt; और 1": $ _; Exec ("$ _ | अहा - शब्द-रैप --no-header", $ आउटपुट, $ exitCode); वापसी $ आउटपुट; } प्रश्न क्या आपके पास यह कैसे हल करने का सुझाव है? शेल में आप एक वातावरण चर सेट कर सकते हैं जिसमें निम्नलिखित कमांड के जीवन चक्र का अनुसरण किया गया है: TERM = screen-256color ls -l --color = हमेशा जहां TERM = screen-256color पर्यावरण चर और ls -l --color = always कमांड है। समाधान यह मेरा संशोधित कोड है, बस मेरे आदेश में TERM = screen-256color प्रीमांड करें: स...

javascript - Parsing a string that contains xml like syntax -

I am looking to parse a string that contains inline elements that can be picked up by javascript. An example. Looking at the parasymal string given below: "I have a & lt; noun length =" 10 "/> Is there any way to parse this string easily and understand that there is an object in the string named "noun" that has a property with a value of 10? You need to make sure that your string is well-formed XML.In this case, Make sure that the document element is present. How to wrap a value in a element & gt; and then the paras and query example for the attribute value : Function Parsippipit (Snippet, Xpath Expression) {var startDoc = "& lt; Doc & gt; ", endDoc =" & lt; / Doc> ", xml = startDoc + snippet + endok, xmlDoc; if (window. Dompirs) {pars = new dumpparser (); xmlDoc = parser.parseFromString (Xml," text / xml ");} and // Internet Explorer {xmlDoc = New ActiveXObject ("Mic rosoft.X...

sql server - SQL Where clause does not filter out "Zero" values -

Two tables are called recovery and installments recovery ([pk] rid When a loan is given to an employee, then that information will be sent to Recovery is accumulated in the table, then this loan is received in the form of installment from the monthly salary. (Installment of the amount of the installment (amount [zodiac / duration]] ). Once recovering, details about the installment of the installment should be deposited in the installments table. Since a loan can be recovered in many installments, it is possible to recover the installment Relationship ship is 1: m. Now we say that I just want to know all the recovery details which should be deducted from the salary. It is written here i have taken the sum of all the money paid and here Rate deduct it from the amount of the loan if the remaining amount is calculated installment is greater than 0. Expected Result Emp_DI | Installment (Recovery Recovery.Read, Recovery.AMP_ID, Recovery.Mount, Recovery Decrease, Install t...

Creating a tree in Python -

I have a string of lines indented on the tab that looks like this: Node A node B node C node D node E node F and I hope to get a data structure where I can cross the tree with the following: print data [node a] [node b] [node c] = & gt; I give to all children under node C. How can I do this with Python? I do not know what to find for it! Any help would really be appreciated. You should look. This is a great library for graph / tree data structures. And to help you get started tab how to explain the different data in the paste structure test.

system - Coordinate transformations in javafx -

I have to put right-handed cartesian coordinate system in JavaFX, so at the bottom left corner of the window (0,0), X Moving on the right and y is moving towards the top. I can not understand how to do with the conversion. If I apply a Rotation Transform, then the button will be reversed. I want to be able to use this coordinate system instead of default. As (see Chapter Y-Down vs. Wi-up ), Yew Down is used by many 2D graphics libraries, where Java FX has started. To apply and correct the Y, you can put all of your content into rotated parent nodes: // to use Y Rotate the camera camera.setRotationAxis (Rotate.Z_AXIS); Camera.setRotate (180.0); // Rotate the visible content for the right drawing group yUp = new group (); YUp.setRotationAxis (Rotate.Z_AXIS); YUp.setRotate (180.0); Visual View = New View (yUp); Scene.setCamera (camera); Now to add all those nodes to the Wi-Fi environment, add yUp Keep in mind that it is OK in 2D space. is. If you come with additional...

javascript - 05 changes to 5 when i try to .html() using jquery -

मैं jquery का उपयोग कर रहा हूं, मेरा कोड निम्न है: कंसोल में मुझे 05 मिल रहा है, लेकिन div के अंदर html को 5 में बदलता है हालांकि, मुझे अपने div में भी 05 होना है यह क्यों हो रहा है और मैं इसे कैसे jquery का उपयोग कर प्राप्त कर सकता हूं? संपादित करें - मैं कोड को सरलीकृत कर चुका हूं, मेरा सटीक कोड ऊपर है।

regex - Rails set school attribute based on users email address? -

In my rail app I have a regex which ensures that only @YW.ADU or @Burkley.EU email addresses It can be used on the user's registration. What I want to do now, it is automatically set to the school which user visits on the basis of those domains, which is one of their email addresses. So, if, for example, someone signs up with an @burkelly.edu email, then the school specialty will be set to "University of California, Berkeley" in the user model. I have tried to do this, but this is a non-trivial problem. It has been told here that the user looks like regex in the model (I have not added the UW.edu yet, but you Get the idea): berkeley_regex = / \ a [\ w + \ -] + @ Berkeley \ .edu \ z / i valid: email,: appearance = & gt; True ;: Format = & gt; {: With = & gt; Berkeley_regex} I have already added a "school" column to the user model. If someone can show me what I want to do that will be horrible I tried this: DIF match match = user ['em...

haskell - IO/Monadic assign operator causing ghci to explode for infinite list -

Consider the following program. It goes on forever and nothing is useful, but memory consumption in ghci is constant: - NoExplode.hs module main (main) where exam :: [int] -> gt; ; Io (test) lst = Print "Test" RLISISLS RIlist :: [int] - & gt; IO () rList [] = Return () rList (x: xs) = do rList xs main = test [1 ..] Now consider the lower revised version of the above. When this program is run in ghci memory explosion. The only difference is that the print "test" is specified in the x block test . - Explode.hs module main (main) where test :: [int] - & gt; IO () test lst = do x & lt; - Print "test" rList lst rList :: [int] - & gt; IO () rList [] = Return () rList (x: xs) = do rList xs main = test [1 ..] Why the print "test changes" / Code> to x & lt; - Print "test" Due to blowing ghci? ps When I am trying to understand, I have come to this, even then, the problem here (I think) basically...

csv - error of opening a file located in a remote server from python -

I need to read a CSV file located on server in Python 3.2 on Win7. The file name is csv_file = file_loc = '\\ serverName.myCompanyName.com \\ mypath \\ files \\ myfile.csv' open (file_loc, ' R ') # with error as csv_file !!! Csv_reader = csv.freader (csv_file, delimiter = ',') Error: IOError: [errno 2] Such a file or directory : '\\ serverName.myCompanyName.com \\ mypath \\ files \\ myfile.csv' But, I can access the folder and can open the file from win 7. Thanks to launch UNC path Two backslashes are required for, and To avoid this, you are only one of the above codes Try this: file_loc = '\\\\ serverName.myCompanyName.com \\ mypath \\ Files \ \ Myfile.csv ' or this: file_loc = r' \\ serverName.myCompanyName.com \ mypath \ Files \ myfile.csv ' The latter is an raw string in which there is no need to avoid backslash (among the others). The path you can successfully access the file by using exp...

java - Creating a foreign key mapping in hibernate -

I have two tables of department and staff, and one department can have many employees. If I have to model the database ID as a foreign key and use the hibernate to model the employee table, then I have two options. a) I either I can make a list in the department category b) Using @ManyToOne and @JoinColumn on the column name mentioned in the Employee class = 'Department ID'. Which approach is recommended? Or are these two approaches completely used for different problems? There are two organizations presently there and departments. Secondly, we have to understand that the meaning of ManyToOne is here, as you said, many employees can be in the same department. Be the kind of mapping, please note that this is just a snippet: @Entity @Table (name = "EMPLOYEE") public class employee {@Id @ GeneratedValue @column (name = "employee_id") Private longtime employee ID; @column (name = "first name") private string firstname; @column (...