Posts

Showing posts from March, 2010

black boxes instead of sprites on reload andengine -

My phantom (which has boxes themselves, but different colors) appear as black boxes all the time For the second time my orange activity loads. This is strange because usually this problem is not big enough due to texture atlas, but I tried to double the size of the atlas, and it does not work. So this is the relevant code, any help would be greatly appreciated! So by keeping it out, for the first time when I load my game, everything is fine and correct, but for the second time, sprites are black. I have seen other questions where phantom appears as a black box but for me it loads for the first time, which is not for other questions, and given on other questions. The answers do not work for me (they were, Atlas needs to be the power of two, and Atlas is not big enough). ("Gfx /"); GameTeTureAtS = New BuildBlitMapacticsAtlas (ActivityGettechtManager (), 512, 512, Textureoptions. BINAANAR); Black tile = BitmapacticsAttlicationActionFactorCreditFormAsset (GameTitchesAtl...

osx - Subl will not open in Terminal even with bin folder -

I can not open the full text of my terminal 2, even if I have a bin folder and it says that the file exists is. I have been bashing: subl: command not found ... ~ a »ln -s" / application / sublime text 2.app/Contents/sharedSupport/bin/subl "~ / bin / SublLn: / users / kimbalin / bin / subl: File exists ~~ »~ A» LS applications Cinema Sites desktop music bin document picture code download public dropbox ~ a »subl -bash: subl: command not found ~ one» Subl --help -bash: subl: command not found ~ cd bin ~ / bin a ls subl ~ / bin / If you have subl screw in your ~ / bin folder So IV to try to, you must also ensure that your ~ / bin folder $ PATH. You can easily see it by typing in your terminal. $ PATH echo If there is no ~ / bin, you can add it using this command: (see more) ln -s "/ application / sublime text 2.app/Contents/SharedSupport/bin/subl" / bin / subl

doInBackground error when using Jsoup in Android -

I am trying to learn Android and when I was trying to parse the HTML using JSOU, I get an error and my app stops. I have a button in my layout and when I click it, let me update the textview and write the title of the HTML page. Here is the code (required parts): Click on Public Zero (see Arg 0) {// Todo auto generated method stub new title (). Execute (new string [] {url}); // I have a html address url as a string}} class title async task and string, zero, string & gt; {String pageTitle; Protected string doInBackground (string ... parameter) {try {document doc = jsoup.connect (params [0]). Get (); PageTitle = doc.title (); } Grip (IOException E) {// TODO Auto-Generated Catch Block e.printStackTrace (); } Return page title; } Secure zero (string ... parameter) on PasteXsecret {MainActivity.title.setText (parameter [0]); }} When I click on the button, it says, "Unfortunately, the app is closed." Can anyone tell me what I am doing? do this in doInBackgroun...

Javascript html adding extra lines of text with onclick -

I basically have a main title & lt; H1 & gt; and I have selected this one new additional line from my array so that the line is & lt; P1 & gt; Added at the end of Right now, when I click on the title, then I begin to be able to add a string under my head. But how can I make it so that the string is & lt; P1 & gt; To be added at the end of . & lt; P1 & gt; The first row of the story is considered and every time I & lt; H1 & gt; , then an additional line of the story will be added. & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Style & gt; # Canvas {margin: 5px; Padding 5px; Background: green; Limit: 1px solid black; } & Lt; / Style & gt; & Lt; Script & gt; Var maFonction = function (elem, event, couleur) {elem.style.color = couleur; } Insert insertText = function (text) {var elem = text; Elem.innerHTML + = Text; } Var newtable = new array (); Newtable [0] = "salut"...

qt - Dynamically generated menu items -- figuring out which one was clicked -

I am parsing an XML document that contains a list of menu bar items. In other words, if I have 5 elements in the XML tree then I will create 5 QAction * variable and add them to QMenu . Therefore, the number of objects is dynamic and is not known at the time of compilation. The problem is how to callback because I do not know the number of the QAction * variable, so I can not create a callback for each one: connect (action, signal (clicked), this, slot (item1Clicked ())); Connect (second action, signal (clicked)), this slot (item2licked ()); Connect (yet another action, signal (clicked)), this slot (item 3 (amazed)); I thought about creating a callback: zero menu item (int index) But the problem is that I can not connect the parameters to the menuItemClicked (int) slot. What is another strategy? Update - it has not been found yet class MainWindow {Private slots: void help document (int); then zero main menu: :: helpDocumentation {// some logging} A...

Html parser using Jsoup -

I want to remove a lecture area in the div tag, though I tried to get the lecture room using div ( Lectureinfo room) but it brings me the other stuff in the table. Can somebody help me out? This is the source code. & lt; Tr class = "odd" & gt; & Lt; Th & gt; 9: 00 & lt; / Th & gt; & Lt; TD & gt; & Lt; Div class = slot data-hour = "9" data-day = "0" data-day-month = "9" data-month name = "June" data-month = "6" data-year = "2014" > Gt; & Lt; Span class = target & gt; & Lt; / Span & gt; & Lt; Div rel = tipsy title = "lecture" class = "lecture" data lecture-pk = "21044" & gt; & Lt; Strong> CS-M71 & lt; / Strong> & Lt; Period & gt; From CJW & lt; / Span & gt; & Lt; Div class = "lectureinfo room" & gt; Faraday 205 Robert Records & lt; / Div & gt; & Lt; Div class = ...

javascript - Regular expression syntax difficulties -

I'm trying to learn regular expression testing in javascript but I'm hard to imagine. In my example given below, I am trying to test the user input for the first name to ensure that it does not have: Number More than 1 free space ('Sarah Jane' is OK, but not 'Sarah Jane') This is my job till now, especially any explicit syntax errors, especially reg expression Stand out in this system? Thank you. & lt; Script language = "javascript" type = "text / javascript" & gt; Validate the function name () {var input = document.forms ['myForm'] ['fName']. Values; Var re = / \ d \ s {2,} \ w /; If (input == "") {// Make sure some documents are filled. GetElementById ('fNameError'). Style.color = "red"; Document.getElementById ('fNameError'). InnerHTML = "** You must enter a name"; } And if (re-test) {document.getElementById ('fNameError'). Style.color = "re...

css3 - margin-top and margin-bottom do not work with html a element? -

I was trying to understand the CSS transition property and I understood. But I got another confusing stuff when I was giving the margin: 10px; , And I saw the result on the chrome, there was no padding-top or padding-down, that means padding-left and padding were right. To run this margin, I have tried to change an element with P element, and the margin was good. And here's my code: jsfiddle.net/forbloggerku/L3Mps/ I have tried to find an article about the html element related to this problem, but I did not find it . Please tell me the reasons why the margin-top and margin-less HTML elements do not work with, and please give me the URL of your reasons. Thanks in advance .. Your problem is that the anchor tag "a" is an inline element that blocks elements Do not behave like. Add a display for an element: Inline block in your CSS and which will keep it correctly. Each of the blocks and inline elements has its own rules.

sql server - T-SQL - Value does not match at least one item in list -

I have a MS SQL table with multiple columns, one for each separate employee roles and one for each The column shows that in the present role the employee is activated, on leave, etc., etc. Due to dependence on the external data source, the fields are not actually normalized. I am trying to run a query to return all the rows where is at least one of the 'active' column, equal to 'active' No has many potential values ​​other than active. I know that there will be one of many ways to do this so SELECT * MYBABLE WHERE ISActive1 & lt; & Gt; 'Active' or ISActive 2 & lt; & Gt; 'Active' or iactive 3 & lt; & Gt; 'Active' or iactiv 4 & lt; & Gt; 'Active' or ... etc. Just thinking that there is a small path, possibly more efficient way to do this. I have seen many solutions to find a match in many columns, but not one to look for non-matches I do not know that it is more elegant, but you can do ...

windows - C++ Saving a Bitmap File -

So what am I trying to do that my program takes a screenshot and saves it on the computer? In fact, part of taking screenshots, I will run the program later, and first of all, I am trying to solve the problem of how to save the BMP file on the computer. I have received the following code that can help with that: // szPathName: Specifies the path name / lpBits: Specifies the bitmap bit / / w: image width / h Specifies: Image height ball saving image specifies (four * szPathName, zero * lpBits, int w, int h) {// FILE * pFile = fopen (szPathName, "wb") to create a new file; If (pFile == NULL) {return false; } Bitmapfoamer BMIH; BMIH.biSize = sizeof (BITMAPINFOHEADER); BMIH.biSizeImage = w * h * 3; // Create bitmaps for this OpenGL theme BMIH.biSize = sizeof (BITMAPINFOHEADER); BMIH.biWidth = w; BMIH.biHeight = H; BMIH.biPlanes = 1; BMIH.biBitCount = 24; BMIH.biCompression = BI_RGB; BMIH.biSizeImage = w * h * 3; Bitmapfiler BMFH; Int nBitsOffset = sizeof (BITMAPFILEHEADER)...

html - Internal page link does not W3C validate -

I have a link for the same place, as it is on the same page: & lt; A href = "# info" name = "info" title = "Click to see info" & gt; Click to see info & lt; / A & gt; ... later ... & lt; H3 id = "info" & gt; Here's some info & lt; / H3 & gt; & Lt; P & gt; ... & lt; / P & gt; So it works fine, but when I run it through the W3C validator, it says that the name feature is obsolete. Remove the name attribute. P> id attribute is the replacement From the same (and on the right element!), And you do not want to link the anchor to yourself anyway.

caching - Guava Cache - maximumSize - Eviction (LRU or most often) -

I am planning to use guava cache in my application. Some of these [K, V] which are entered are statistically; Gt; & Gt; Compared to others and should always be available in the cache. According to the sample of If your cache should not exceed a certain size, then only use the cachebuilder. Maximum size (long) The cache will try to expel those entries which have not been used lately or too many times I am trying to understand the often section. Can I suppose - For the cache of maximum size = 100 , if Key_A has reached 10000 and immediately after the post 100 call, Key_A still be present in the cache? The original unit test I did not confirm this fact. Any ideas? Public class cache helper {Private cache & lt; String, string & gt; Cash; Public Cash Helper (cache) = cache. Maximize (10) .comcommercial (1) .bild (); } Public string fetchVal (string key) {string val = cache.getIfPresent (key); Return valve; } Public Zero PutVal (string key, string val...

java - How to get properties without it being delimited? -

I am using commons-configuration v1.10 and I using class propertiesconfiguration I am in the properties of my applications; I have a property that has a comma, but when I read it, it becomes delimited, and I do not understand how to get it. This property is included back and coma respectively, but the reason for this is because I get '[' and ']' around it. Saran structure is a function, setDelimiterParsingDisabled () , which disables the demarcation, but I can not find any class that has it Implemented to read. Private static string readproperty (string property) {try {configuration configuration = new property synthesis (property files); Return configuration.getProperty (property) .toString (); } Grip (Configuration Exception e) {System.out.println ("Reading Point" + Property + "Properties"); E.printStackTrace (); System.exit (1); Return ""; }} Posting your code will help. You want AbstractConfiguration.setListDeli...

event handling - jQuery mobile button on enter or spacebar -

I have a simple button, which must be pressed using the login or spacebar key (due to access to the desktop). I have the following: $ ("#back-home"). On ("tap", function () {window.location.reload ();}); In addition to "tap" I need an event for the login and spacebar. $ ("#back-home"). ("Tap keypress", function (e) {if (e.type == "tap" || E. == "13" || E. == "32") {window.location.reload () ;}});

sql - MySQL - Get Distinct Primary Col Table Row Order By Foreign Key Table -

Image
शीर्षक भ्रमित हो सकता है, यह मेरी स्कीमा है और यहां मेरी क्वेरी का परिणाम है मैं डुप्लिकेट को कैसे निकाल सकता हूं और बस मूल्यों को हाइलाइट कर सकता हूं, मैं संदेश के समय से ऑर्डर करने का प्रयास कर रहा हूं निम्न वाक्यविन्यास SQL ​​सर्वर और MySQL दोनों में काम करेगा: SELECT c.ContactID, c.Name, m.Text, m.MessageTime से संपर्क सी INNER JOIN संदेश एम पर सी। CONCTIDID = m.ContactID जहां मौजूद नहीं है (संदेश 1 से चुनें M2 जहां M2.ContactId = m.ContactId और m2.MessageTime & gt; m.MessageTime) आदेश द्वारा m.MessageTime desc; ध्यान दें कि यदि आपके पास हाल के संदेश के समय का डुप्लिकेट है, तो सभी लौटा दिए जाएंगे।

c++ - OpenGL 3.2 2D rendering issues -

I accept that I am not a graphics programmer first, so please with me Be bare) For some unusual reasons, when I make two phantom batches and attempt to draw only one frame of my screen (or around) halfway in half, "Lost"; This little campfire happens regardless of the position of the Sprite. When rendering wireframe modes are the same results, it does not appear that a large black polygon is being prepared and overloaded under tilemap laying. This is the code used to start OpenGL: GlobalGone Mod (GL_fron_backback, GL_Fill); GlEnableClientState (GL_VERTEX_ARRAY); GlActiveTexture (GL_TEXTURE1); GlActiveTexture (GL_TEXTURE0); Gloditrange (0.0 f, 1.0f); GlEnable (GL_DEPTH_TEST); GlDisable (GL_CULL_FACE); GlEnable (GL_TEXTURE_2D); GlDisable (GL_LIGHTING); GlDepthFunc (GL_LEQUAL); GlDisable (GL_DITHER); GlClearDepth (1.0f); GlEnable (GL_CW); GlEnable (GL_BLEND); Globefenk (GLICCR_ALPHA, GL_ONMINUSISUSRCCLAAPHA); I uploaded the relevant code here: SDL2 is used for ...

dom - PHP - DOMXpath - Get the value -

यह मेरा कोड है: $ doc = new DOMDocument; $ डॉक्टर & gt; loadHTML ($ स्रोत); $ Xpath = नया DOMXPath ($ doc); $ परिणाम = $ xpath- & gt; मूल्यांकन करें ($ xpath); विदेशी मुद्रा ($ नोड के रूप में $ परिणाम) {गूंज $ नोड- & gt; नोड वेला; } // मैं में href विशेषता प्राप्त करने की कोशिश कर रहा हूं: & lt; a href = "http://example.com/login" & gt; लॉग इन & lt; / a & gt; जब मैं इसका मूल्यांकन करता हूं, तो मुझे केवल लॉग इन मिलता है मुझे http://example.com/login प्राप्त करना चाहते हैं, जब मैं पायथन के एलएक्सएमएल का उपयोग करता हूं और उस अभिव्यक्ति का मूल्यांकन करता हूँ, तो यह ठीक काम करता है। / $ P> foreach ($ नोड के रूप में परिणाम) {echo $ node- & gt; getAttribute ('href '); } नोड के पाठ मूल्य प्राप्त करने के लिए nodeValue संपत्ति का उपयोग किया जाता है। getAttribute () विधि एक विशेषता का मान देता है।

iOS Objective C Programming Xcode using if statements -

So I'm trying to use the statements in an app so that someone calculates the body mass index (BMI) Able to I need the user to be able to input metric or imperial units for weight and height and I really want the user to be able to get input metric weight, for example, and get royal height. I thought it would be best to use the I statement and my code is below. At present, I have been given warnings about the statement and it just does not pay attention to them. Thanks a lot for any help. - Calculate (IBAction) process: (ID) sender {float cm = [_cmHeight.text floatValue]; Float foot = [_feetHeight.text float value]; Float inches = [_inchesHeight.text float value]; Float kg = [_kgWeight.text float value]; Float stone = [_stoneWeight.text float value]; Boat pound = [_poundWeight.text float value]; Float height; Float mass; If (cm == 0) {float height = 0.3048 * feet + 0.0254 * inches; } And {float height = cm / 100; } If (kg == 0) {float mass = (6.35029 * stone) + (0.453592 * po...

ios - NSURL unrecognized selector sent to instance -

स्व: यहां कोड cell.imageURL = [NSURL URLWithString की रेखा है। imageURLs [indexPath.row]]; यहां त्रुटि ट्रेस [UITableViewCell setImageURL:]: है न पहचाना गया चयनकर्ता उदाहरण के लिए भेजा 0x906da70 2014-07-24 17: 16: 50.049 MyApp_iOS [ 9443: 60B] *** न आया हुआ अपवाद 'NSInvalidArgumentException', कारण की वजह से एप्लिकेशन समाप्त: - *** सबसे पहले फेंक कॉल स्टैक '[UITableViewCell setImageURL:] गैर मान्यता प्राप्त चयनकर्ता उदाहरण 0x906da70 के लिए भेजा': (0 CoreFoundation 0x01a8c1e4 __exceptionPreprocess 180 1 libobjc.A.dylib 0x016ad8e5 objc_exception_throw + 44 2 CoreFoundation 0x01b29243 - [NSObject (NSObject) doesNotRecognizeSelector:] 275 3 CoreFoundation 0x01a7c50b ___forwarding___ + 1019 4 CoreFoundation 0x01a7c0ee _CF_forwarding_prep_0 + 14 5 MyApp_iOS 0x0007f518 - [BCDDogViewController tableView: cellForRowAtIndexPath:] + 504 6 UIKit 0x0046611 एफ - [UITableView _createPreparedCellForGlobalRow: withIndexPath:] + 412 7 UIKit 0x004661f3 - [UITableView _createPr...

html - How to put an h1 on the same line and in the middle of a nav ul -

Image
I am creating a nav bar for my site I want nav horizontally focused, bar li items, except the item between me is a h1 that is not part of the preference preferably. (To keep it new special items for navigation, not the title of the page Right now my html (I am using btw icon-fonts) looks like this:. class = "new"> h1> page title More My CSS is: ne {background: gray; text-align: center;} nav li: first child {display: inline-block; float: left;} navy li {float: Right} The output looks like this: Whatever I try, I can not find h1 on it, note that I not just insert a P as the second item in the ingredients list. Any help would be great. I think this will help: nav (status) ): Relative; } Nav h1 {status: absolute; Top: 0; Width: 100%; }

xcode - iOS Simulator/Interface Builder off-center -

Image
In the interface builder I have placed a button here: I have Xcode 6 beta 4 I recommend you to use classes of size due to the new iOS screen size But, you can disable the Size Builder's size sections in Image Inspector, as you can see on the image: If you want to use autollection, you can add the next constraints in the view related to it (see the first image) In the second step, Width and height should be used in the second image. You can use all the barriers and a simulator Nsot see overview. Image:

Android emulator looks bad on retina display (pixelated) -

Image
All of my emulations have texted text and images, such as on retina displays. I have tried to adjust several settings without any profit. Does anyone know the solution to get this crystal clear? The settings here I tried: and ... Note that use Host GPU to check for both. Verap, switching from my host GPU to snapshot detected on my own problem fixes it! Hope this helps someone.

.net - Unable to Debug Projects in Solution -

मेरे पास VS.NET 2013 VSTO समाधान में डीबगिंग लाइब्रेरी प्रोजेक्ट्स के साथ कोई समस्या है। दोनों काम करते थे और किसी कारण के लिए जब मैं डीबग सत्र में प्रोजेक्ट चलाता हूं तो मॉड्यूल विंडो दिखाती है कि समस्याग्रस्त (गैर-डीबगैबल) असेंबलियों को एक अलग पथ (डी: \ कार्य \ पथ \ स्रोत \ रेपो से लोड किया जा रहा है )। यह एक वर्ड एडिडिन है, इसलिए अन्य मॉड्यूल को c: \ users \ myname \ appdata \ local \ dir में लोड किया जाता है। समस्या पुस्तकालय वास्तविक निर्देशिका से लोड हो रहे हैं जहां स्रोत डिस्क पर रहता है (डी :)। समाधान में पाँच परियोजनाएं और वर्ड एडिन असेंबली के समान स्थान से सभी लोड और डीबग करने योग्य हैं। कोई भी मदद महान होगी। इस समस्या का पता लगाया ... इन प्रकार के कई प्रश्नों को देखा नेट पर ... सुनिश्चित करें कि यदि आप किसी VSTO addin या समान ऐप को डिबग कर रहे हैं जो मैन्युअल रूप से असेंबलियों को लोड नहीं करता है - यह विनोद डीबगर के लिए मॉड्यूल को स्क्रू करता है और उपग्रह असेंबली गैर-डिबग करने योग्य यहां आपत्तिजनक कोड का एक नमूना है: var assemblyInfo = Assembly.GetExecutingAsse...

objective c - Using applicationDidBecomeActive makes app lag and slow after awakening it -

Note: This only occurs when I use cocos2d and spritebuilder. I only assign one exact code to a single view Attempted to do with the app that used to work fine. When app to send ADLog, using the application DidIBit Active, the application is opened and slows down when opened again. This is a very simple app so it does not have to do with intensive graphics or processes. MainScene.m #import "MainScene.h" @ @ implementation MainScene int score; - (zero) Digbutton {Score ++; ScoreLabel.string = [NSString stringWithFormat: @ "% i", score]; } @end Then this method is in appdelegate. - (zero) application idbackback (UIApplication *) application {NSLog (@ "hi"); } Does not this method work correctly with cocos2d or something else? Be sure to call the super implementation CCAppDelegate methods: - (Zero) applicationDidbackActive: (UIApplication *) application {NSLog (@ "hi"); [Super ApplicationDebackActive: App]; } Without th...

Javascript Can't Call Push On Array Inside Another Function -

इस सवाल का पहले से ही एक उत्तर है: 6 उत्तर मेरे पास एक बहुत सरल जावास्क्रिप्ट है प्रश्न ... मेरे पास एक फ़ंक्शन है, पालतू जानवर , जिसमें तीन चर शामिल हैं: एक पूर्णांक, एक स्ट्रिंग, और एक परिभाषित सरणी निम्नानुसार है: फ़ंक्शन पालतू जानवर () {var index; Var नाम; विविध जानवर = ["बिल्ली", "कुत्ते"]; } इस एक के ठीक नीचे दूसरे फ़ंक्शन में मैं पालतू जानवर प्रकार के एक चर घोषित करता हूं और जानवरों सरणी पर "माउस" को दबाएं। मैं फिर मूल्यों को देखने के लिए एक कंसोल लॉग करता हूं। फ़ंक्शन टेस्ट () {... var pets = new pets (); Pets.index = 1; पालतू जानवर। नाम = "मेरे पालतू जानवर"; pets.animals.push ( "माउस"); console.log (पालतू जानवर); } जो भी कारण से मुझे कंसोल से कोई आउटपुट दिखाई नहीं देता। फिर मैंने जानवरों को फोन करने से पहले और बाद में कुछ और कंसोल लॉगिंग जोड़ दिया। Push: var पालतू जानवर = नया पालतू जानवर (); Pets.index = 1; पालतू जानवर। नाम = "मेरे पालतू जानवर"; Console.log ("पुश से पहले...

ajax - Angularjs custom validation directive Async call real time validation -

After I am using custom verification instructions to validate an area in one form and confirm user information with the verification process To include an AJAX call to the server API, we want to validate this area until the user closes the typing for a certain period. I have two questions: 1. Why is not working below? (With link function in the custom command) the log message was never shown how often I can type in the closed input field (I'm pretty sure that since the log log is enabled other logs Was shown properly) scope. $ Watch (attrs.ngModel, function (change in "$ log.debug" ("+ scope. $ Eval (attrs.ngModel));}); 2. What is the best way to ascertain that the user has stopped typing for the program to execute the verification process? And if the user starts to rewrite it will cancel the verification process before it expires Is it possible to do? attrs.ngModel html in context String in To what you want to do, bind the ngModel value to t...

Grabbing SQL data using PHP then sending Array to Javascript -

I am trying to find out how to parse SQL data in a JavaScript file using PHP I need to store the PHP array in Java because I have a graph that uses a javascript array to populate the data. Now I have a button that refreshes my graph data, and when it is clicked it calls this JavaScript which is included in my main HTML file: button.js $ (function () {$ ('# refreshchurch'). (Function () {Var chart = $ ('# chart'). High Chart () ; Chart. Series [0] .Setetta (Dataera);});}); Java SAR "Datarae" needs to be pulled from the SQL database. I have PHP scripts that pull data from the database. Here is my PHP script: query.php & lt; Php included 'dbcon.php'; $ Query0 = "Select Count (*) from test WHERE ans = 0"; $ Query1 = "test number (*) test WHERE ans = 1"; $ Query2 = "Testing with Selection Count (*) where 2 ans = 2"; $ Query3 = "Test Count from (*) where answer = 3"; $ Query4 = "test n...

Return empty element from Java 8 map operation -

जावा 8 स्ट्रीम का उपयोग करना सबसे अच्छा तरीका को सूची & lt; Integer & gt; जब आपके पास इनपुट पूर्णांक के लिए कोई आउटपुट नहीं है? बस रिक्त वापसी करें? लेकिन अब मेरी आउटपुट सूची का आकार मेरे इनपुट आकार से छोटा होगा ... सूची & lt; Integer & gt; Input = arrays.asList (0,1,2,3); सूची के & lt; पूर्णांक & gt; आउटपुट = इनपुट.स्ट्रीम () .मैप (आई - & gt; {पूर्णांक बाहर = पागल फंक्शन (i); अगर (बाहर == रिक्त; आउट.एफ़ल (0)) रिटर्न रिक्त; वापसी वैकल्पिक। (आउट);} ) .collect (कलेक्टरों। सूची ()); मैं आपको (और सभी जवाब) इसे क्यों प्राप्त नहीं करता बहुत कठिन। आपके पास मैपिंग ऑपरेशन और फ़िल्टरिंग ऑपरेशन है। तो सबसे आसान तरीका है कि इन ऑपरेशन को एक के बाद एक ही लागू करना है। और जब तक आपकी विधि पहले से एक वैकल्पिक देता है, वैकल्पिक से निपटने की कोई आवश्यकता नहीं है। input.stream ()। Map ( मैं - & gt; पागल फंक्शन (i))। फ़िलटर (आउट - & gt; आउट! = नल & amp;! आउट.एफ़ल (0)) .collect (कलेक्टरों। सूची ()); यह input.stream () के लिए सरलीकृत हो ...

c# - WPF Uri error format in MUI -

मुझे यह कॉन्फ़िगरेशनउपसरकॉन्टरॉल मिला & lt; UserControl x: Class = "NeoClinic.MAS कॉन्फ़िगरेशन सूची "xmlns =" ​​http://schemas.microsoft.com/winfx/2006/xaml/presentation "xmlns: x =" http://schemas.microsoft.com/winfx/2006/xaml "xmlns: mc =" http : //schemas.openxmlformats.org/markup-compatibility/2006 "xmlns: डी =" http://schemas.microsoft.com/expression/blend/2008 "xmlns: mui =" http://firstfloorsoftware.com/ModernUI "एमसी: इग्नारियल =" डी "& gt; & Lt; ग्रिड शैली = "{स्टेटैटिक रिसोर्स कंटेंटआरूट}" & gt; & Lt;! - TODO: सेट @SelectedSource - & gt; & Lt; mui: आधुनिकटैब एक्स: नाम = "मोडटैब" लेआउट = "सूची" पूर्वावलोकनमॉइस लेफ्टबूटन्यूप = "मोडटैब_प्रेव्यूउपमाउसेउल्टबूटोनअप" & gt; & Lt; mui: आधुनिकटैब.लिंक्स & gt; & Lt;! - TODO: सेट @ सोर्स - & gt; & Lt; mui: लिंक x: नाम = "ब्रैडलिंक" DisplayName = "नस्लों...

xml - C#/XNA Culture Issue -

My application does not properly load levels on computers with different cultures. If I can thread the thread again on my computer I think this XML has failed to read the information, some of the properties are coincidentally filled It does not seem to break the culture. P> I am using a StreamReader, XmlDocument and XmlNode, I have tried to format InVirean culture, but there is no use. I do not get any error messages, it seems that this game is loading and starts playing properly but many tiles are missing. Has anyone come to the same issue and has solved a solution? This is a very similar problem, although I can not find any exception because I am not using fonts; Bag yourself, in this case being Swedish on all computers Was forced to. Thread.Curr EntThread.CurrentCulture = CultureInfo.GetCultureInfo ("SV-SE");

ios7 - Post smiley with text usingAFnetworking -

I am using AFNetworking 2.0 in my iOS application. It is working fine at each level. I was stuck in a problem how to update the situation using Afnetworking to post the smiley with the text. Please help me if nobody does this. "\ ud83d \ ude04" Sequence for JSON Unicode Escape U + D 83 DU + D004 , Which is a "surrogate pair" for Unicode U + 1F 604 (face smiling with mouth and smile). But NSJSANASialisation decodes it properly, as can be seen in the following example: const char * jsonString = "{\" emoji \ ": "\\ ud83d \\ ude04 \"}; NSLog (@ "JSON:% s", jsonString); NSDTA * JSNDTTA = [NSDATA DATAVITABITS: JasonString Length: Stellen (JasonString)]; NSError * error; NSDictionary * jsonDict = [NSJSNRialization JSONObjectWithData: jsonData Option: 0 Error: & amp; Error]; Self.myLabel.text = [jsonDict objectForca: @ "emoji"]; NSLog (@ "emoji:% @", self. Mileage text); Output: JSON: {"emoji...

c++ - How to automatically close my GUI application from within? -

Image
Let me explain your question with an example. In my app, I have to provide a way to stop myself from within "myself". (An example of such a task is when my app's installer / updater needs to close it before installing an update. Another example is that when my app performs the schedule and after completing it automatically I think that this window will be completed in the simplest position to post your message to WM_CLOSE , but there are some such cases which That its L will not work: My app can display an arbitrary number of child dialog window. My app may be displaying a normal control window, such as open file dialog: Or this one, but there may be others: And at the end if no close button is available What can you do: exit () method or TerminateProcess from outside.) But I'm curious, if Beautiful is the way to close my GUI app (from within)? There is no answer, it depends on the architecture of your app and what it is doin...

java - set bits 1-3 in an int given an int with only bits 1-3 set as desired -

अहस्ताक्षरित int x = 0xdeadbeef; अहस्ताक्षरित int y = 0x00000006; अहस्ताक्षरित int z = 0xdeadbee7; x और y में मानों से z मान की गणना कैसे करें बिट्स 1-3 का y है 011 और मुझे बिट्स से प्रतिस्थापित किया जाना चाहिए x में मान के 1-3 बिट्स चाहिए 1-3 से y अन्य बिट्स को छोड़कर के रूप में वे हैं। यह जैसे आप चाहिए: मास्क ऑफ बिट्स 1-3 ताकि वे नहीं सेट या बिट्स के परिणाम 1- 3 y ऐसा: // 0xe == 8 + 4 + 2 (यानी बिट्स 1-3) z = (x & amp; 0xe) | (वाई एंड 0xe); ध्यान दें कि ~ बिटवर्ड उलटा ऑपरेटर है, इसलिए 3 बिट्स को साफ़ करने के लिए आप उन बिट सेटों के उलटा लेते हैं, और उपयोग करते हैं वर्तमान मान के साथ उस व्युत्क्रम के बिटवर्ड और। आप केवल | Y के बजाय | (Y & amp; 0xe) यदि आप जानते हैं कि केवल बीट्स 1-3 को y में सेट किया जाएगा। (ध्यान दें कि मैंने मान लिया है कि "बिट्स 1-3 "का अर्थ है बिट्स 0, 0 से शुरू करने के सामान्य बिट-गिनती तंत्र का उपयोग करते हुए, मान 8, 4 और 2 के साथ बिट्स। यदि आप" नीचे तीन बिट्स "का मतलब है, जो आमतौ...

.net - Not able to deploy C# SQL CLR database project from Visual Studio 2010 to SQL Server 2014 -

I have Visual Studio 2010 Professional and SQL Server 2014. I have created a very simple SQL CLR database application which is not an error when I create an application after just one in one inclusion in the table, but whenever I try to apply it I get an error: SqlClrDeploy: Setting up the assembly server to testCLR.dll - WIN-GECJT \ SQLEXPRESS: checkbox The following error may appear, when you Sql The CLR project is deployed which was built for a version of the .NET Framework that is incompatible with the target instance of SQL Server: "Apply the SQL01268 error: Create assembly for assembly failed because assembly failed verification" This problem To resolve, open the property for the project, and change the .NET Framework version. C: \ ProgramFiles \ MSBuild \ Microsoft \ VisualStudiov10.0 \ TeamDataMicrosoft.Data.Schema.SqlClr.targets (96,5): Apply SQL01234 error: The database version is not supported. Create FAILED. I also get the same error every time on ...

java - How to get the values from outside the braces using regex -

कृपया नीचे की आवश्यकता देखें। स्ट्रिंग s1 = "|||| (; ) || (;;) || (;) "; उपरोक्त स्ट्रिंग से आउटपुट होना चाहिए: ||||| स्ट्रिंग s2 = "; (| |) "; उपरोक्त स्ट्रिंग से आउटपुट होना चाहिए: ;; स्ट्रिंग s3 = ";;"; उपरोक्त स्ट्रिंग से आउटपुट होना चाहिए: ;; मैं नीचे उदाहरण की कोशिश कर रहा था, लेकिन आउटपुट s1 के लिए है ; पैटर्न p = pattern.compile ("\\ (^ (। *?) \\)"); मैचर एम = पी। मेटचर (फ़िल्टर); जबकि (m.find ()) {System.out.println (m.group (1)); } चूंकि आप केवल सब कुछ ब्रेसिज़ में हटा रहे हैं, आप इसका उपयोग कर सकते हैं: str.replaceAll ("\ ([^ \)] * \)", "");

Matplotlib export text as line elements in Python -

I have to build some basic CAD tools in Python, which is based on matplotlib . After all the parts are put together, the entire layout will be exported as line elements (basically the tuples of start / end coordinates of bus lines, such as [x1, y1, x2, y2]) and bus points. So far, I have all the original mimosetic stuff, but I can not understand how to implement the text correctly. To use different fonts, etc. I want to use the text capabilities of matplotlib, but I can not find any way to export text properly from matplotlib. Is there any way to get a vector output now? Or an array of at least plotted text? After a few days of conflict, I found a way to get the outline of text: a more accurate example If you have a vector If you want to get the outline as the array, then you can remove everything after line 78 and do this: path = path (VERTS, CODES) outline = path.to_polygons () This will give you an array of polygons, and each polygon again an array of points (x, ...

java - Installing cassandra without openjdk dependency -

I'm trying to install cassandra from datastax. I have installed Oracle jdk7. The first brick wall hit me: Install yum jna It attacks openjdk dependency. java-1.7.0-openjdk java-1.7.0-openjdk-headless Again, when I install cassandra: yum install dsc20 I found the issue of dependency: java-1.7.0-openjdk java-1.7.0-openjdk - headless javapackages-tools How do I install datasheets cache without installing openjdk? I've spent a lot of time trying to understand the issue and very similar And at the end of one day it seems that there are 2 options that make sense: (recommended) just install as OpenJDK dependency And then pointing to the appropriate JAVA_HOME Oracle's Java. Download and modify / modify existing RPMs with varying dependencies in your manifest. Then deploy it somewhere (own yum repo?) And install it as a regular yum package. Since option 1 is just a redundant package (that you JAVA_HOME ), it's okay for me.

sql server - Apache 2.4.7 on Ubuntu 14.04 will not connect to MSSQL through PHP 5.5 -

I am trying to connect to remote MSSQL servers using the platforms listed in the title. I have free TDS and all relevant ODBC packages. Here's my FRIEDIDES. Configuration: $ $ Id: freetds.conf, v 1.12 2007/12/25 06:02:36 jklowden exp $ # # This file is set by Free TDS, if not by the same name The file is found in the installation directory. # # For information about the layout of this file and its settings, see #freetds.conf Manpage "man freetds.conf". # Global Settings are overridden by those in a Database # Server-specific section [Global] # TDS Protocol version; TDS version = 4.2 # Write a TDSMMMP file for diagnostic purposes # (This setting / TMP is unsafe on multi-user systems); Dump file = /tmp/freetds.log; Debug Flags = 0xffff # Order and Connection Timeout; Timeout = 10; Connect timeout = 10 # If you exit the memory errors, this may mean that your client is trying to allocate a huge buffer for the # text field. # 'The more appropriate range text size se...

android - Adding two colors as background without using gradient -

Image
I was trying to apply the shadow effect to my thoughts and figured out that I shield it to I can use I created an XML file & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Size xmlns: android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Gradient android: endColor = "@ android: color / transparent" Android: centerColor = "@ android: color / transparent" Android: startColor = "@Android: Color / Black" Android: angle = "135" /> & Lt; / Size & gt; It works fine, but I needed to make it more like shade, what do I need to remove the effect of infection in the gradient because I only have one color in one color Need to see, which has been implemented natively. How to do this If you want something like the background of your thoughts, you can only type B / W .jpeg or .png Use your Doubles inside and when using it to specify your dimensions and a...

JavaScript Regex - How to check comma separated values are more than three -

I'm not good with JavaScript regex, so I need help in verifying your string for verification. i These image names are being divided by commas: Chrysanthemum.jpg, Desert.png, Hydrangeas.gif, Jellyfish.jpg, Now I want to check with this regex: What is valid: crisanthimem.jpg, dessert page, hydrangease Gif, Jellyfish. JPGG, Koala.JPGG, Lighthouse page, is not valid: 1 crisendammum JPGG, Desert Page, Hydrangea Gif, 2. Christmas. JPGG, Desert Page, 3. Crisatham JPG, Authentication should be successful only if the value of the value separated by commas is greater than 3. The regex file name below will be valid for name extensions, except for the last one, And the comma-separated value is more than 3, ^ [az] [az] + \. (?: Jpg | png | gif), (?: [Az] [az] + \. (?: Jpg | png | gif),) {3,} $ If the values ​​are no different from the comma and the space then your regex will be, ^ [az] [az] + \. (?: Jpg | png | gif), (?: [Az] [az] + \. (?: Jpg | png | g...

python - Most pythonic way to get output from a shell command -

इस सवाल का पहले से ही एक उत्तर है: 13 उत्तर मैं अपनी पहली लिख रहा हूँ अजगर कार्यक्रम और मैं एक शेल कमांड चलाने और आउटपुट प्राप्त करना चाहता हूं। मैं इसे सबसे शुद्ध संभव / सबसे अजगर तरीके से करना चाहता हूं। यह मुझे एटीएम मिल गया है नोट: मैं शेल कमांड के निष्पादन के साथ worng कुछ चला गया था, जब भी एक अपवाद बढ़ाना चाहते हैं। def lsCommand (): प्रक्रिया = subprocess.Popen (['ls', '-a '], stdout = subprocess.PIPE, stderr = subprocess.PIPE) बाहर, अरे = process.communicate () returnc = process.returncode अगर returnc = 0: अपवाद (गलती बढ़ा) और: बाहर लौट मैंने जो खोज की है, वह यह है कि जब मैं लाइन को बाहर निकालना, err = process.communicate () , और इसे समय के साथ बदलें.Sleep (4) (& lt; = ls कमांड पूरा होने में 4 सेकंड नहीं लेते हैं), रिटर्नकोड कोई नहीं है, जिसका अर्थ है कि यह सबप्रोसेक्शन अभी तक फंस नहीं हुआ है। यह कैसे संभव है? बाहर, err = process.communicate () एक पूर्ण प्रतीक्षा करते हैं () मेथोड कॉल? def lsCommand (): प्रक्रिया = subprocess.Popen ...

debugging - XCode: Debug => "Simulate Location" menu item not available (greyed out) -

Image
I can not add a simulated place for the simulator because it is completely in the menu, as in the figures Shown: debugging While doing the place works well with the actual equipment. Any thoughts? The iOS Simulator should run before that menu your app will be enabled. It appears to me immediately after a successful creation. If it is proving inconvenient to choose between that menu and the launch of your app, then I can not use Product - & gt; Plan - & gt; Edit the plan and then after checking the "Allow location simulation" box, you can choose your preferred default in the Run / Options panel.

c++ - Segmentation Fault while comparing strings -

In my program, there is a part where I need to sort an array of structure, everything is fine until I It seems to be good till the end, everything is fine for some entries and works up to some entries at the end of the array. There it throws a division fault and why I do not know. struct overview_table {string o_timestamp; String n_timestamp; String dbid; }; Type (overview.begin (), overview.end (), compareStrings); Compare static hair strings (counter overview_table & amp; a_timestamp, const overview_table & amp; amp; amp; b_timestamp) {cout & lt; & Lt; "744" & lt; & Lt; Endl; If (a_timestamp.n_timestamp.compare (b_timestamp.n_timestamp) & lt; = 0) {cout & lt; & Lt; "746" & lt; & Lt; Endl; Back true; } And {cout & lt; & Lt; "74 9" & lt; & Lt; Endl; return false; }} For information: The output was just to check whether departmental faults have been thrown. And it's between 744 and 74...

javascript - uglified files are not rewritten in html file using gulp-usemin -

मुझे gulp-usemin प्लगइन के साथ समस्या का सामना करना पड़ रहा है। जब usemin कार्य चल रहा है यह concate और uglifying css और js फ़ाइलें है, लेकिन uglified जेएस फाइलें html फ़ाइल में फिर से नहीं लिखी जाती हैं, हालांकि यह है उत्पन्न। मैं अपने gulpfile.js और index.html कोड साझा कर रहा हूँ। index.html रूपांतरण से पहले & lt; html & gt; & Lt; शीर्ष & gt; & Lt;! - बिल्ड: सीएसएस बिल्ड / सीएसएस - & gt; & Lt; link rel = "स्टाइलशीट" href = "css / blue.css" & gt; & Lt; link rel = "स्टाइलशीट" href = "css / green.css" & gt; & Lt; link rel = "स्टाइलशीट" href = "css / orange.css" & gt; & Lt;! - endbuild - & gt; & Lt;! - बिल्ड: जेएस बिल्ड / जेएस 1 - & gt; & Lt; script src = "js / add.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; script src = "js / sub.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; script src = "js ...

java - Formatting and validating a date in JSF -

So I want to format my dateinputfield as "dd-MM-yyyy" and then confirm that the date is tomorrow Is not before. This is the relevant code in my view: & lt; H: Input Text id = "Payable date" required = "true" value = "# {submitRepairBean.dueDate}" & gt; & Lt; F: convert datatype pattern = "dd-MM-yyyy" /> & Lt; F: Validator ID = "be.kdg.repaircafe.validators.DueDateValidator" /> & Lt; / H: inputText> This is my custom verifier: @FacesValidator ("be.kdg.repaircafe.validators.DueDateValidator") public class DueDateValidator implementer validator { @Override throws public valid valid (FacesContext reference, UIComponent component, object value) Validator expansion {System.out.println (value.toString ()); // For some reason this Mercury July 23 02:00 pm while inputting CET 2014 23-07-2014 date time date = new date time (value.toString ()); Detimilis long = date gates (); A demili...

regex - Unescape unicode in character string -

To parse the Jason string with the Unicode escape sequence, it looks like there is a long standing in RJSONIO The bug is like the need to be fixed in the bug libjson which can not be done any time soon, so I have a solution in R which is the first scenes feeding \ uxxxx Some references are being made to create unescapes: Jason data is always unicode, by default using utf-8 , etc. No need to avoid is not. But for historical reasons, JSN supports UNICODE, therefore JSN data {"x": "zürich"} and {"x": "Z \ u00FCrich"} is equivalent and results in exactly the same output when parsed. But for any reason, later does not work in RJSONIO . The extra is due to the fact that it supports the reserved Unicode itself. So when we type "Z \ u00FCrich" in the R console, it automatically gets converted to "Zürich" . In order to get the actual Jason String in hand, we need to avoid backslash which is the first letter...

css - Style parent if child contains X -

इस सवाल का पहले से ही एक उत्तर है: 25 उत्तरों मैं सोच रहा था कि क्या मेरे वर्तमान स्थिति में, मेरे पास ul बहुत सारे के साथ मिल गया है इसमें li है उनमें से कोई भी एक अलग पहचान वर्ग नहीं है, लेकिन उनमें से केवल एक को आईफ्रेम (यूट्यूब वीडियो) मिला है। यह li आइटम, मैं शैली चाहता हूँ। सीएसएस कुछ हद तक हो जाएगा ul li: बच्चे [iframe] {/ / स्टाइलिंग} क्या यह संभव है? आज नहीं। सीएसएस, सीएसएस 4 की अगली घटना में, विस्मयादिबोधक चिह्न का उपयोग कर: ul! Li iframe {// स्टाइल ली तत्व पर लागू होता है} लेकिन कोई शुद्ध सीएसएस समाधान आज नहीं है।

github - Does the git branch renaming affect branch hierarchy? -

I am working on a multi-branch project managed by GIT. Our workflow is currently one: Master | - & gt; V1 / Master | - & gt; V1 / dev Note: Each developer realizes the work of "fork" for v1 / dev. Probably we have a number of branches v1 / dev and current v1 / dev branch v1 To debug / debug. We target this new workflow: master | - & gt; V1 / Master | - & gt; V1 / debug | - & gt; V1 / dev Note: To make everyone feel the unit work, continue to make "fork" v1 / dev. I have the solution to add an intermediate branch v1 / debug. After some research, I will use the rename branch command (git). Does this command preserve the branch hierarchy? Can I change the name v1 / dev to v1 / debug and after that the existing v1 / dev branch can create new v1 / dev branch whitout to cause problems in the current development branch results ? Are the developers able to merge the unit branch result of v1 / debug in the named V1 / ...

javascript - Styling Table in SAP UI5 -

I need to give the background of the column in UI 5 by javascript and css and change the font style of the table. I have to know that CSS has to apply for it, so how can I get a special element? Add the way you want the class to your table or column> oTable.addStyleClass ("classname"); Use CSS as usual .classname {color: red} and this CSS file In the index .html Based on your comment: Use this to add an ID to the table header column like this var oColumn = new sap Ui.table.Column ("TC", {label: new sap.ui.commons.Label ({text: "Last Name"}), Template: new sap.ui.commons.TextView (). BindProperty ("text" , "Lastname"), sort property: "last name", filter property: "last name", width: "200px"}); Here the code has been added to id = tc . You need to write css #tc {color: red}

c++ - Error in findnonzero() while storing the coordinates of non zero elements in vector -

I was trying to store the non-zero element index of a matte img1 in vector vp1 but it is a cv shows: Exception on memory space error occurs when there is no non-zero element in the mat. Example code is below where non-zero element indicies for IMG is successful and storage in VP is successful, but the foundation of non-zero elements for IMG1 to VP1 shows storage error. Any help will be appreciated to solve it. I want coordinates in the vector of the point because my other algorithm is running on its basis. #include & lt; Iostream & gt; #include & lt; Opencv2 / core / core.hpp & gt; #include & lt; Opencv2 / highgui / highgui.hpp & gt; Using namespace cv; Int main () {Mat img (10, 10, CV_8U, Scaler :: All (0)); Img.at & lt; Uchar & gt; (0,2) = 1; Of vector & lt; Point & gt; Vice President; Search Nanjiro (IMG, VP); Mat IMG1 (10, 10, cv_8u, scalar :: all (0)); Of vector & lt; Point & gt; VP1; Search Nanjiro (IMG1, VP1); Return 0; } ...

Add as many as payment gateways in Codeigniter -

I am working on a CI website and I have already integrated Paypal and BitPay of 2 payment gateways But my client is saying that he wants to add as many payment gateways as he wants like a WordPress plugins. She just wants to keep the files somewhere and the CI desire is that this and the setup detects things active. Is it possible in CI? As each payment gateway has different structure it's integrated. Did you try with CI_Merchant? CI-Merchant is a driver-based payment processing library. The following doors are currently supported: - 2Checkout - Authorize.Net AIM - Authorize.Net SIM - DPS PaymentExpress PxPay - DPS PaymentExpress PxPost - Dummy - Eway Direct - Eway Shared - GoCardless - Ideal - Manual - Payflow Pro - PayPal Express Checkout - PayPal Website Payment Pro - SagePay Direct - SagePay Server - Stripe - WorldPay Follow