Posts

Showing posts from August, 2013

closed captions - How to get opacity value of CaptionStyle (Android 19-Kitkat)? -

I am working on an application where I use the API 19 (ketchat) and closed caption feature. At the moment, I can access data about CC settings (example: background color), but there are some values ​​that I can not get, especially: background opacity '. Android gives an object called caption style, but I do not know how to achieve the ambiguity of this object. I have read the document related to this class, but I could not find anything. Thank you in advance Get forward / background colors, and set color Use it for: Caption style. Background Caller / 0xff000000; // Background opacity

perl - A script that can tell how many lines per second -

I do not know how and how to explain it, but I am trying to tell that in per second list How many rows are included. "text"> line-counter.pl #! / Bin / perl my $ last_time = time (); My $ line_count = 0; While ( $ last_time) {$ last_time = time (); Print line_count "\ N"; $ Line_count = 0; } $ Line_count ++; } Usage: tail -f /the/file.log | Perl -w line-counter.pl

java - Storing an array - MYSQL -

Given the profile table with details about the user - what is the best way to store in the database? Is allowed . Each user has a main profile picture - then three optional additional pictures. For possible expansion ability and maintenance, I felt that three alternative images could be stored as an array of some kind (~ and if they do not choose, it can also be a faucet area). Please advise on any best approach. Thank you You should create a separate table to capture the pictures, one Avoid making columns that contain CSV data, because you are used to use CSV every time. Not to mention that updating the column can be a nightmare. Create a table image (image_ id int, picture_fileblob, / * if you use the filename, varchar * / profile_id int / * fk to USER * /) Then in the profile table shows the main profile picture for the picture through the foreign key. Create a table of users (profile_id int, profile_picture_IDit ​​/ * main picture from fk * /)

how to exclude command window changes from redo (dot) in vim? -

I always use the command window instead of a command prompt. I do this through the map nnoremap: q: i The problem is: changes made in the command buffer Again in the Register again (I'm not sure that this is the correct word, then correct me). Example Whenever I : w To save the file, I insert a w in the next dot. Am I somehow rebuilt in the command window, when it stops? I thought it was CMDVenter & amp; CmdwinLeave events (what is the repeated order by "." On the command window, and resetting that value when leaving the command window). Unfortunately, I have not found any way to set the price for the program "The last command will be repeated." " So, in my understanding, there is currently no way to do this.

"Press ENTER or type command to continue" in vim when enabling neocomplete plugin -

जैसे ही मैं अपने .vimrc जी जी: neocomplcache_enable_at_startup = 1 मैं जारी रखता हूं सामान्य> +1 ~ 2 -281> 1:। Vimrc 1:। Vimrc 1: .vimrc जारी रखने के लिए ENTER दबाएं या कमांड टाइप करें हर बार जब मैं एक फ़ाइल खोलता हूं I नेकोम्प्लेट को सक्षम करने के बाद मैं उस "प्रेस एंटर" संदेश से कैसे छुटकारा पा सकता हूं? मुझे लगता है कि आप भ्रमित हैं यह सेटिंग पिछले फजी खोज कार्यक्रम के साथ जिसे neocomplcache कहा जाता है। यदि आप neocomplete और नहीं neocomplcance का उपयोग कर रहे हैं तो इस सेटिंग को आज़माएं: चलो जी: neocomplete # enable_at_startup = 1 सादर

c# - Bing Code Search not working, makes VisualStudio crash -

I have just set up for Visual Studio and C #, when I start Visual Studio, it launches normally Does, but once I start typing to get Intellisense that helps you search snippets, Visual Studio stops working and shows me that the famous Visual Studio has stopped working . Update: Bing code search did not work for me, using a normal Internet connection or proxy What could be the reason for this? And how can I fix it? % LocalAppData% \ Microsoft \ VisualStudio \ 10.0 \ extension Look in each installed extension, you can read the manifest file to check whether this is a Bing snippet search. Delete the specific extension folder Restart IDE If it still does not work, repair the VS 2013 installation.

Phrase match on part of query using solr -

I have the following condition: We have an exact match for query "ABC" and The results were created correctly. But when the query is looking like "ABC" results, then it is wrong because the exact "matching" on the A-B does not appear. Please help me configure Solar to properly configure "ABC" to find the phrase "phrase". P.S. The following questions are being worked out as candidates: AB field: C "AB" C Nigram : Nigerian =>"> Shingle slave "Please split", "Split into", "Nigeria", "Nigeria", "Nigeria" "Split this part", "this sentence", "in sentences", and "in" scars ". Want to match on a partial query, you must include the relevant filter for the query analyzer.

How to convert .shp or .kml file to Google Maps polygon coordinates? -

I have a .shp file and convert it to many devices (shp2kml, ESRI converter, qgis) in one kmili file tried . When I take a closer look inside the kml file, when I point to a location in Google Maps, the coordinates are different from the coordinates of the same area. On the other hand, all the shapes are being presented in the kml file ... However, I can not take them inside Google Maps (I do not want Google Maps to be used by Google Earth). I do not intend to read this Google Maps .kml file because I have to do this. Now, I would like to change .kml (or original .shp file) into Google Maps polygon (each shape is a polygon) How can I get it? The Google Maps will be a big win for me before the right direction for polygons, right from the file. On Google, I did not get the answer. Thank you! I had the same problem! If the feature object is a polygon: if (event.feature.getType () == 'polygon') {var gp = event feature.getGeometry (); // Return Polygon Geometry ...

javascript - Where can I find CSS and JS restrictions with iBooks rendering? -

I better understand what works and what to run and present in iBooks 2 using JS + CSS Want to do is not possible. Does Apple provide relevant documents? Especially I have a pre-written Javascript quiz that runs fine in Safari and as a widget but it does not run in iBooks and it is difficult to guess as to what might be causing it. The apple does not explicitly tell that the iBook in the context of JavaScript Does not support or not? The IBooks Property Guide is your best bet and usually the first port of the call for this type of thing. In the context of this type of document, it only supports iBooks javascript As is similar to Safari. In books, JavaScript allows features such as drag and drop, and touch or mouse events to start audio or animation. You can access iBooksAssetGuide from iTunesConnect, under 'Distribute your content'. I will download a fixed layout EPBP sample (current version 3.1) provided here, which includes iBooks.js, a library that has interac...

datepicker - Android Date selector with only Day and Month -

I'm looking at the date selector to customize only to show day and month (i.e. any year) in Android . I am creating a dialog based on this: dialog dlg = new date picture dialog (context, date picture listener, payment calendar.get (calendar.IEER) , Payment calendar. Gate (calendar. MONTH), DatedCalendar.get (Calendar DAY_OF_MONTH)); Try {field f [] = dlg.getClass (). GetDeclaredFields (); (For field field: f) {string name = field.getName (); If (name.equals ("YEAR")) {field.setAccessible (true); Object day picker = new object (); Day picker = field. Get (DLG); (See day picker). Settension (see gene); }}} Hold (exception e) {// TODO: e.printStackTrace () should not be; } Return DLG; But on (I see) dayPicker) .setVisibility (View.GONE) A Cast exception is coming to an end; java.lang.ClassCastException: Java .lang.String can not be molded into android.view.View Any ideas? After let's go here its APIv11 + but there are other ways on lower API versio...

c# - Slight lag spawning new thread causes race condition -

I have some initial code that runs in a new thread, and takes 4-5 seconds to run: / P> Start Public Virtual Zero () {Adapter. Start (this); New thread (rep () () () (InitLock.WriteLock ()) / / - InitLock is a reader author. = New modeler proxy (this), modeler. Load snapshot (); pars = new pars (); Load templates (); }}) Start (); } I also have several methods that use the objects started in that thread, although they use the same ReaderWriterLockSlim object so that they Can not block if necessary objects have not been started yet: public virtual parser parser {get (using InLock.ReadLock ()) {return parser; }}} Now, if I run this code: context.Initialize (); // Start the call method above // ​​Some other stuff that takes a short time reference. Pars Purse ("blah blah"); Then, everything works, however, if I run this code: context.Initialize () ; // calls start the reference in the initial way. Parser Percy ("blah blah"); // Call the par...

java - NPE when referrencing a toString -

इस सवाल का पहले से ही एक उत्तर है: 12 जवाब त्रुटि: अपवाद डेकड्राइवर.मैन (डेकड्राइवर.जावा 25) में डेक.स्टोस्टिंग (डेक.जावाः 83) पर धागा "मुख्य" में जावा। लंग। नलपॉइंटरएक्सप्शन में मैं पूरी तरह से खो गया हूं मुझे यह त्रुटि संदेश क्यों मिल रहा है d.toString को डेक डी का वर्णन करने वाली 52 लाइन कोड प्रदर्शित करना माना जाता है। डेक वर्ग import java.util.Random; सार्वजनिक वर्ग डेक {निजी कार्ड [] डेक; निजी इंक अगले कार्ड; चेहरा; सूट सूट; / ** * डिफ़ॉल्ट कन्स्ट्रक्टर * * & lt; hr & gt; * तिथि बनाई गई: फरवरी 17, 2014 * * * / सार्वजनिक डेक () {nextCard = 0; डेक = नया कार्ड [52]; Int iCount; के लिए (iCount = 0; iCount & lt; 52; iCount ++) {कार्ड सी = नया कार्ड (iCount); }} / ** * कॉपी कन्स्ट्रक्टर * * & lt; hr & gt; * तिथि बनाया: 17 फरवरी, 2014 * * * @ परम विद्यमान डेक * / सार्वजनिक डेक (डेक मौजूदा डेक) {int i; के लिए (i = 0; i & lt; 52; i ++) {this.deck [i] = मौजूदा डेक। डेक [आई]; }} / ** * toString * * & lt; घंटा & gt; * दिनांक ...

java - Method called when WebPage is closed in Wicket? -

I am trying to understand what happens when a page stops in the wicket, I am able to check it Want to be a user running a long batch load so that they can not open another instance of application to run another batch job. I was going to set up a boolean in the session, and after that the page is closed by the user then it has to be changed. I was hunting something and nothing went out. Only the methods I thought to override: onDetach () and onRemove () but none of them seemed to work. Secure on Zero () {System.out.println (called "Datach () inside"); Super.onDetach (); } seems to work, except for this method the page is called twice on the render All the components, requestcakes, all the different () methods are used every time that the wicket decides to fix / finish the wicket. In most cases it means that the rendering is finished and the response is ready to be sent back to the browser. The main idea of ​​dissection is to separate anything that does not n...

google app engine - How to load module with same name as other module in Python? -

Let me explain the problem - we have such a project: model / __ init__ How to load in the .py model /abstract.py function / __ init__.pywork / model.py work / model.py model. Abstract What is the syntax for this? # work / model_ype model # this model does not load model / model.py. Abstract Import Test # There is no test exception. #model / abstract.py test = 1 How to import such? More information requested. Google App Engine Application: - The main is main.py Directory structure: └───src │ app.yaml │ index Yaml │ main.html │ main │ task_master_api.py │ ├─── circle │ model.py │ __init__.py │model │ abstract.py │ xxx.py │ __init__.py │Tatsk │ model py │ __init__.py │ ├─── ├─── │ model model │ __init__.py exception (see work is not rooted in model model): from .. import model logging. Critical (model (model), Model .__ name__) Model. Abstract Import AbstractNamed, AbstractForgetable CRITICAL 2014-02- Model 212: 23: 36,828 Model. Py: 8] (& lt; ...

xml - Xsd Element SimpleType plus attributes -

I am not able to express the following with Xsd: a simple type restriction (calculation of values) and on this element A feature is required. For example: & lt; MyElement some_id_value = "1" & gt; Sepels & lt; / MyElement & gt; Where the simplest type is defined: & lt; X: Simple Type Name = "Simple Type_Fruv" & gt; & Lt; Xs: restriction base = "xs: string" & gt; & Lt; Xs: calculation value = "apple" /> & Lt; Xs: calculation value = "banana" /> & Lt; Xs: calculation value = "orange" /> & Lt; / XS: Ban & gt; & Lt; / XS: simpltype & gt; My element is defined as now: & lt; Xs: element name = "myElement" type = "simpleType_Fruit" /> A similar question is asked here, and it can be answered, but I'm not sure (the answer is more than just one) You can use element declaration as your "simple type-firm...

c# - Does using DateTime.Now.Hour Make a linq query local? -

I realized that my code was very slow, because I was performing local queries. But now I am trying to not make all my Linux queries locally. My suspicious code is: currentLogs = (cDataContext.DownloadLogs from DLL, where dll.DTS.Hour == DateTime.Now.Hour selection dll); This is a set of questions that hurt me (yes, I know that I can add them, but they are currently different so I can debug easy); var storeLeft = (x from cDataContext.CategoryCountryCategoryTypeMappingsConclusionCodeContext.Categories at x.CategoryID y.CategoryID where (y.StorefrontID == 73) selection X); Int storesLieftCount = (Where to buy from SEL! (Choose not downloaded IDID from NDID ndID.CategoryCountryCategoryTypeMappingID). Include (sl.CategoryCountryCategoryTypeMappingID) SL) .Count (); Edit: I should not have even added notDownloadedIds = (x to cDataContext.CategoryCountryCategoryTypeMappings where !! Choose y from the current logs .CategoryCountryCategoryTypeMappingID) includes (x.CategoryCount...

java - Jackson -- Recursively replace matched fields -

See the following (sorted into a POJO) and I need to encrypt each encrypted with a list of areas regardless of its depth I , depending on the field name (s). For example, I want to encrypt some parts of the document (specify password and quantity) for storage. I have a piece of encryption, but a good approach to crossing Jasononode is to find every incident in the matching field and encrypt / change it. Hidden (via @Jason Ignor, for example, will not solve the problem because I need to store the data). This is for some system data offline, file backup. Note that the fields I want to match (Passward and volume Ordrd), they are of different types and password appeared several times at different levels "" "" "" Name ": "foo", "id": "123456", "password", "time", "communities": [{ "name": "Administrator", "location": "xyz", "password": ...

javascript - Check two id's on button press -

यह मेरा वर्तमान कोड है: & lt; script & gt; $ ('# रजिस्टर') क्लिक करें (फ़ंक्शन (ई) {if ($ ('$ company_f')। Val ()। लंबाई == 0) {$ ('# company_f')। सीएसएस ("सीमा", " ठोस 1px लाल "); वापसी झूठी; // या e.preventdefault ();}}}; & Lt; / स्क्रिप्ट & gt; मैं आईडी code_f और telephone_f की जांच के लिए इस कोड को कैसे बदल सकता हूँ? यह वही है जो मैंने कोशिश की है: यदि ($ ('# company_f')। Val ()। लंबाई == 0 या ($ ('# telephone_f')। Val () लंबाई == 0) { या ऑपरेटर में जावास्क्रिप्ट दो पाइप है: || । किसी भी तरह से, यदि आप दोनों स्थितियों को देखना चाहते हैं तो आपको एक AND ऑपरेटर की आवश्यकता है: & amp; if ($ ('# company_f')। Val ()। लंबाई == 0 & amp; $ ('# telephone_f')। Val ()। लंबाई == 0) {

javascript - Why this Variable does not pass correctly in JQuery -

I have a simple joke statement ... and my question is why none of them fails in the world ? > color is $ (thisCLass) .css ("color", '#' + hex); // written $ (thisCLass). CSS (color attribute, '#' + hex) is written; // works with variable $ (thisCLass) .css ({"color": '#' + hex}); // Written $ (thisCLass) works on .css ({colorAttribute: '#' + hex}); // does not work with variables Any idea why a failed one? That's because you do not use a variable to specify a word of the word Can. In an intent, an identifier can be written with or without the word quotation marks, so it will not be interpreted as a variable in any case. The object will end with the identifier you specify: {"colorAttribute": '#' + hex} You can specify a variable You can use the property in an object, but then you must first create the object and use the bracket syntax: var obj = {}; Obj [colorAttribute] = '#' +...

python - How to efficiently apply an operator to the cartesian product of two arrays? -

मेरे पास a = array है ([1, 2, 3, 4, 5]) और b = सरणी ([10, 20, 30, 40, 50]) । मुझे चाहिए: सरणी ([[-9, -19, -29, -39, -49], [-8, -18, -28, -38, -48], [-7, -17, -27, -37, -47], [-6, -16, -26, -36, -46], [-5, -15, -25, -35, -45] ]) ऐसा करने का सबसे प्रभावी तरीका क्या है? मैं np.transpose ([a]) - np.tile (b, (लेन), 1)) हालांकि मुझे आश्चर्य है अगर इससे कोई और अधिक कुशल तरीका है, यदि a बहुत बड़ा है, जो b को कॉपी करने की आवश्यकता नहीं होगी (या इसके विपरीत)। np.subtract , np.add , जैसे np.add , कोड> एनपी.एमटीपीली , np.divide , np.logical_and , np.bitwise_and , आदि में "बाहरी" विधि जो "गुणा तालिकाओं" के बराबर बनाने के लिए इस्तेमाल की जा सकती है: में [76]: np.subtract.outer (a, b) बाहर [76]: सरणी ([[- 9, -19, -29, -39, -49], [-8, -18, -28, -38, -48], [-7, -17, -27, -37, -47], [ -6, -16, -26, -36, -46], [-5, -15, -25, -35, -45]]) या, प्रसारण का उपयोग कर: [96]: एक [:, कोई नहीं] - बी आउट [96]: सरणी ([[-9, -19, -29, -39, -49], [- 8, -18, -...

dom - Updating attribute of jQuery object has no effect -

I am writing a function that repeats through a DOM and adds the location at the beginning of the nodes here it looks like : $ = required 'jquery' addSpaces = (node, no space = true) - & gt; ($ Node) means a text node with .prop ('childNodes') node system for # 3 if child.nodeType is 3 if child.textContent child.textContent = child.textContent.trim () if child. TextContent [0] is not in [',', '.', ':', ';', '' '']], If there is no space Space = wrong other console.log "To add a location, The text is not in '# child.textContent} "Child.textContent =' '+ child.textContent console.log" Added a location, now the text is # # child.textContent' '#node type1 Meaning is a DOM element, if the child is the node type 1 adspace child, no space inp K = "& lt; Foo & gt; & Lt; Bar & gt; I & lt; Baz & gt; Required gt; & Lt; Qux & gt; Some & lt; / Qux ...

angularjs - Hierarchical data structure in firebase with geospatial/geohash searching; am I doing this right? -

आशय: हवाई फोटोग्राफी की एक सूची बनाएं अंगुलर जेएस रूपों द्वारा बनाए जाने वाले रिकॉर्ड्स, लेकिन लीफलेट जैसे नक्शे व्यूअर द्वारा प्राप्त की गई। लक्ष्य: जानकारी को कई तरीकों से प्राप्त करें: फ्लाइट, संग्रह, आईडी द्वारा छवि , और भूगोल द्वारा छवि डेटा संरचना: संग्रह: {मेटा: '', उड़ानें: {मेटा: '', एरियल: {मेटा: '', जियोपॉइंट: [अक्षांश, लोन], भू-राजनीति: [[x1, y1], [x2, y2], [x3, y3], [x4, y4]]}}} / संग्रह / सीआईडी ​​ / संग्रह / फील्ड्स फायरबसे (denormalizing पर प्रयास) संरचना: / सीआईडी ​​ / संग्रह / छवियाँ / सीआईडी ​​ / उड़ान / एफआईडी / छवियाँ / आईआईडी ( मैं संदर्भित हूं) प्रश्न: अगर 1 मिलियन छवियाँ हैं Denormalization पर्याप्त देखो? (प्रत्येक उड़ान के बारे में 80 छवियों होगा, प्रत्येक संग्रह 100 उड़ानों औसत होगा ... अगर यह मामलों) क्या मुझे भू-हॅश का उपयोग करना चाहिए ?, अगर ऐसा होता है तो जियोहैश फ़ायरबसे संदर्भ / छवियों के लिए "छवि आईडी (आईआईडी)" बन जाता है / यूआईडी? (या फिर मुझे एक अन्य सं...

angularjs - How can I bind deep child property of directive's scope? -

My dear friend, We can tie up the scope of the scope of instructions for the value of the DOM attribute. This works: Module Directive 'Directive Directive', - & gt; Scope: Directive: '=' ... & lt; Div class = 'midedirective' directive-ver = 'parentware' & gt; & Lt; / Div & gt; In the above example, we can tie the director's directive property to parentware parent parent's property. This is a bi-directional binding, so if directivvar changes parent virus is automatically updated, and vice versa. My question is this: Is there any way that I can tie the property of a deep child within the scope of my direction? Instead of scope.directiveVar scope.lv1.directiveVar or scope.lv1.lv2.lv3.directiveVar as What do I want to achieve I have an object in the directory area called lv1 I have my property area: lv1: directiveVar: '=' Pre> And it does not work: scope: ...

javascript - Making child element have same width and border as parent -

For example, I have a "li" tag that has an "A" tag inside it, Bottom: 1 px solid # ccc; & lt; Li class = sub "> & lt; / A & gt; & lt; / li & gt; Currently I have Duration {width: 90%; Border-bottom: 1 Px solid # ccc; font-size: 12px;} li {width: 100%;} But it seems that underline text only, I would like to "take" that one Underlines the entire line, but the "Span" tag on "Li" did not write down, so basically my "Span" "Le" is not sure what I am missing on my CSS. You should understand that span is an inline element , and there is no such thing as width to do that span is for passing the width, you need to make sure that you set display to a block in the K element , Your matters In, try inline-block . Live example:

Pass information out of html to python -

From this server, I can run a location.py file which is the geographic location of users Displays. I want to take this place and write it in a text file on my PC but I do not know how to do it. Currently my location.py is actually an html5 page loaded by python but I do not know how to remove the necessary information from this page PS is the inspiration for that on my iPhone and my laptop Sharing the same WiFi network (adhoc portable hotspot) and then using my iPhone's more accurate GPS for my laptop is on Google Earth. I finally want to write it in a km list file which constantly updates my current latitude and long time, probably there are easy ways to do this but I thought learning a little dragon would be a good idea. My location.py file #! / Python print "Content Type: Text / HTML \ n \ n") Print ("" "\"> Head> P. ID = "Demo"> Test: & Lt; / p & gt; & lt; script & gt; var x = document.getElement...

c# - Compiler Error Message: CS0246: when I renamed my project -

I have changed my project and will be compiled before, but when I made some changes, for some reason is error Compiler Error Message: CS0246: Type or Name Location Name 'Lab4' not found (whether you use the command or an assembly reference Is unavailable?) I have created a new project from the Lab4 template and it is here It has been turned into lab 5 I found the source file Line 28: Use 4 Use; Line 29: Line 30: Source file: c: \ Users \ Albert \ AppData \ Local \ Temp \ Temporary asp.NET files \ root \ 4b806faf \ de1f1e7 \ App_Web_index.cshtml.a8d08dba.c_hu0onk.0.cs Line: 28 But when I try to use Lab 4 to change lab5 and compile it again, the same error happens and the file is removed and a new Lab 4 problem Together becomes a new one. Does anyone know the answer? When VS When you create your project, it automatically adds its original namespace to \ view \ web.config : & Lt; / Namespace & gt; & Lt; / Pages & gt; & Lt; /sys...

html - How to make tables stack, right over left, in responsive email? -

So this is my second responsive design email, so I'm stuck. I have 2 tables when I look at the mobile so I am trying to stack. How to show 2 tables in desktop mode: | 1 | 2 | When viewed on mobile, I want to reveal tables like this: | 2 | | 1 | I have tried floating tables and using the position: Sure! Important But any help or guidance I can not get the desired effect will be greatly appreciated. I used to do this in a way how do you stack the column You can use dir = "rtl" to control. Here's an example: & lt; Table class = "deviceview" dir = "rtl" width = "100%" cellpadding = "0" cellpaction = "0" limit = "0" style = "border-fall: collapse; MSO-table-lapse: 0pt; MSO -Table-RSPS: 0pt; " & Gt; & Lt; TR & gt; & Lt; Td width = "50%" dir = "ltr" align = "right" square = "full" & gt; & Lt; P style = ...

javascript - Directed edges in sigma.js - a minimal example -

question What is required to create guided edges? I am looking for a minimum example which is currently based on the minimum example on them. Attempts I tried to accept the example of the minimum graph in the following manner sigma.parsers.json ('data.json', {Container: 'Container', Settings: {defaultNodeColor: '# ec5148', + defaultEdgeArrow: 'source' // Add this line should add arrow?}}); Unfortunately, it does not produce different results. I also tried to modify the edges in the graph "edges": [{"Id": "e0", "source": "n0", "Target": "n1", + "arrow": "source"}, ...,] But then it had no effect. More Complex Example Side Arrow Rendering was added to it. For some examples, this link and I am struggling with this issue myself. It seems that in the last few months Sigma JS had a major redesign and the code of the examples is from the ol...

c - How to write generic commands in makefile? -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब यह मेरा वर्तमान संस्करण है जैसा दिखता है: सीसी = जीसीसी सीएफएलएजीएस = 'एसडीएल-कॉन्फ़िग - सीएफएलएजी` LIBS =' एसडीएल-कॉन्फ़िग - एलबीएस` -एलएसडीएल_टीटी प्रोग्राम: विद्रोह विद्रोहः मुख्य.ओ इनिट। ओ डिस्प्ले .o move.o global.o control.o battle.o $ (सीसी) main.o init.o display.o move.o global.o control.o battle.o -o विद्रोह $ (CFLAGS) $ (LIBS) Global.o: global.c $ (सीसी) -सी ग्लोबलकॉ-ओ ग्लोबल.ओ $ (सीएफएलएजी) युद्ध। यो: युद्ध। सीएसी (सीसी) -सी युद्ध सी -ओ युद्ध.ओ $ (सीएफएलजीएस) मुख्य.ओ: मुख्य सी $ (सीसी) -सी मुख्य सी-ओ मुख्य.ओ $ (सीएफएलएजीएस) init.o: init.c $ (सीसी) -सी init.c -o init.o $ (सीएफएलएजीएस) Display.o: display.c $ (सीसी) -c display.c -o display.o $ (सीएफएल एजीएस) लेफ्ट.ओ: ले जाएं c $ (सीसी) -सी चाल करें- c.o. move.o $ (सीएफएलएजी) नियंत्रण। ओ: कंट्रोल सी $ (सीसी) -सी कंट्रोल सी- ओ कंट्रोल.ओ $ ( सीएफएलएजी) साफ: आरएम-एफ * ~ * # उग्रवाद init.o main.o display.o move.o global.o control.o आप देख सकते हैं, प्रत्येक मॉड्यू...

javascript - Cannot read property 'users' of undefined -

I am new to mongodbi and I have database of users. I am trying to make a user click on the buttons of their favorite shoes and update this database. My schema is as follows: var mongoose = is required ('magos'); Var bcrypt = requirement ('bipet-nodes'); // Define the schema for our user model var userSchema = mongoose.Schema ({local: {email: string, password: string,},}); // methods ====================== A hash userSchema.methods.generateHash = function (password) {generated bcrypt.hashSync (password, bcrypt.GenSaltSync ( 8), tap); }; // Check if the password is valid userSchema.methods.validPassword = function (password) {return bcrypt.compareSync (password, this.local.password); }; // Create a model for users and expose it to our app module. Exports = Mongosse Model ('user', user schema); DB function posting: exports.addToFavs = function (req, res) {var size_result = req.query.size; Var brandToFind = req.query.brandToFind; Req.db.users.update ({e...

vba - excel macro deleting extra rows -

I have a macro that removes the rows that I do not want in Excel. It extends the lines before 9:30 and after 4:00 pm. For some reason, it also removes the rows that are from 10:00 to 10:00 am, from 11:00 a.m. to 11:00 p.m., from 12:00 a.m. to 1:00 p.m. 1:00 am, 2:00 pm to 2 pm, 3 pm to 3 pm Please help me so that it does not delete those lines. My code: Removed deleted lines () Keep ActiveSheet 'Find the last line of your dataset LastRow =. Range ("A: A"). Search ("*", search direction: = xl pre-paid). 'Formatting your time column on a readable time. Columns ("B"). Number format = "[$ -F400] H: mm: SS AM / PM" loop through rows, start from bottom. Cell = date 2 for a final row - 1 piece piece together DT = Mid (Cell, 1), 5, 2) & amp; "/" & Amp; _mid (.sec (cell, 1), 7, 2) & amp; "/" & Amp; Left (Cell, 1), 4) If the date is Saturn or Sun, then delete the line if day of day (DT) = 1 or day of t...

c# - multi-threading based RabbitMQ consumer -

We have a window service that listens to the same rabbit MQ queue and processes the message. We would like to extend the same window services so that it can listen to many quotes of RabbitMQ and process the message. Using multi-threading, it can not be ensured that each thread has to be queued (blocking). As I am very new to multi-threading, I need high level guidelines at the bottom point, which will help me start building prototype. Is it possible to hear many queues in a single application using threading? How to handle such a situation where a single thread was sown (due to exception etc.), how to get the entire window back without restart services. Any such design pattern or open source implementation which can help me handle such a situation. I like how you wrote your question - it started very broad and special I have successfully implemented something very equally, and currently working on an open-source project so that my lessons can be learned and able to...

Android LRU cache not caching on gingerbread -

I have used the LRU cache for caching bitmap images. I used them to implement them, and this ice cream Works fine on sandwiches. However, the caching process does not work on gingerbread. Here is my code: import android.support.v4.util.LruCache; (...) Public square thumbnaildownloader & lt; Token & gt; HandlerThread Extended {(...) Private Static Last String TAG = "ThumbnailDownloader"; Private Lucrash & lt; String, bitmap & gt; MMemoryCache; (...) Public Zero AddBitmapToMemoryCache (String Key, Bitmap Bitmap) {If (GetBitmapFromMemCache == Faucet) {Log.i (Tag, "(First) Cache Size:" + ((Integer) mMemoryCache.size ( )).Wire()); Mememorycache.put (key, bitmap); Log.i (tag, "(after) cache size:" + ((integer) mMemoryCache.size ()). ToString ()); Bitmap cached = ammo cache.gate (key); If (cached == empty) {Log.i (TAG, "Cache to fail!"); } Else {Log.i (tag, "cached item:" + (string) cached.toString ()); This code wor...

java - Input validation (do-while loop) malfunctioning -

===== CS302 उपकरण बॉक्स ===== T & gt; कॉइन टॉस सिमुलेटर G & gt; ग्रेड इस्टिमेटर C & gt; रंग चुनौती Q & gt; अपनी पसंद के लिए लिखें कोड पत्र लिखें: एच अमान्य चयन कृपया प्रयास करें: टी अमान्य चयन कृपया कोशिश करें: टी ^ जब मैं प्रोग्राम चलाता हूं और इसे गलत अनुमान लगाता हूं तो मुझे मिल रहा है। उपयोगकर्ता इनपुट को मान्य करने के लिए लूप बनाया गया था, इसलिए यह पूरी तरह से असफल रहा है। मैंने गलत क्या किया है पर कोई विचार? आपके समय के लिए धन्यवाद! } System.out.println ("===== CS302 टूल बॉक्स ====="); System.out.println ("T & gt; सीओआईएन टॉस सिमुलेटर"); System.out.println ("G & gt; ग्रेड इस्टिमेटर"); System.out.println ("सी & gt; रंग चुनौती"); System.out.println ("Q & gt; QUIT"); System.out.print ("अपनी पसंद के लिए लिखें कोड पत्र:"); बूलीयन code_letter; स्ट्रिंग code_choice = scanner.next (); ({Code_choice.toUpperCase ()} बराबर ("क्यू") || (code_choice.toUpperCase ()) बराबर ("सी...

ios - How do I work in the frame of the UIImageView when using an asynchronous loading library like SDWebImage or UIImageView+AFNetworking? -

एक UIImageView image को सेट करने की क्षमता की तरह पुस्तकालय > ऐसे यूआरएल पर आधारित जो असिंक्रोनस लोड हो जाता है, इस प्रकार छवि को लोड करते समय उपयोगकर्ता इंतजार नहीं करता। मेरे उपयोग के लिए, मैं एक गैलरी Photos.app के समान बना रहा हूं लेकिन छवियों को यूआरएल से लोड किया जाता है। अगर गैलरी कहती है, तो 50 उच्च संकल्प छवियाँ मैं नहीं चाहता कि उपयोगकर्ता को हर एक को लोड करने के लिए इंतजार करना पड़े, इससे पहले कि वे पहले भी देख सकें, इसलिए ये लाइब्रेरी मेरे उपयोग के मामले के लिए परिपूर्ण हैं (मैं लोड करूँगा पहली छवि तब मांग पर लोड होती है)। हालांकि, मैं इस रूप में उलझन में हूं कि चित्र को कैसे दिखाना है जब उनके फ़्रेम अभी तक ज्ञात नहीं है क्योंकि छवि अभी तक डाउनलोड नहीं हुई है। यह एक गैर-मुद्दा होगा यदि प्रत्येक व्यक्ति की एक ही सीमा होती है (उदाहरण के लिए, वे अवतार थे), लेकिन यह ऐसा नहीं है। मेरे मामले में, मैं UIImageViews का उपयोग निम्नानुसार करता हूं: // छवि दृश्य बनाएं self.imageView = [[UIImageView alloc] initWithImage: image]; Self.imageView.userInteractionEnabled =...

logstash - What happend if I configure a queue size limit in rabbitmq? -

I want to find a way to limit the amount of messages in a queue using rabbitmq. I read this article where it says the following: Configuring the "x-max-length" parameter will delete the message or enter the room in front of the queue Dead - for new messages after reaching the limit. My question is what happens with the dropped messages? We have a log-session as publishers but we do not want to lose some data. I have been explained clearly. Regards. Mizole. As says: messages will be deleted Or dead- Then you can select dead-letter messages and implement them in some way or you can not use the maximum length on the queue.

ruby - Object memory allocation -

Image
I'm wondering how memory allocation works in Ruby. In Ruby, we can open the definition of a square and add more example variables / methods In this case, new objects will require more memory than existing objects. For example, we have a definition of the following category: class MyClass def myMethod @ a = 5 end-end code> we MyClass : M = MyClass.new m.mymethod At this point, m Some memory will be allocated Now, we open the definition of class and add another example variable b . Preclass MyClass def mySecondMethod @b = 5 End End This new method is mySecondMethod and the example variable b are also available in current version m of Myclass . mySecondMethod m.mySecondMethod b and get started > P> How does Ruby internal manage memory? Does this frequency allocate memory chak for m , or do new types of signals appear in new allocated memory? "Itemprop =" text "> The answer depends on the actual implementation he...

serialization - How to fix Unmarshalling unknown type code XXX at offset YYY in Android? -

The app is crashing when I start again due to an exception exception. I have checked that all serialization has no parameters and all the serials have also been checked to save the object (to load the file from file). parcel android.os.Parcel@42209460 :: How can I understand the exception of the actual class types that offset the parcelable for unknown type code on Unmarshalling 2131165303 at 3748 android.app.ActivityThread.performLaunchActivity Offset (ActivityThread.java:2080) on android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2105) on android.app.ActivityThread.access $ 600 (android.app.ActivityThread ActivityThread.java:136) at $ H.handleMessage (ActivityThread.Java: 1201) android.os.Handler.dispatchMessage (Handler.java:99) android.os.Looper.loop (Looper.java:137) at android.app.ActivityThread.main (ActivityThread.java:4876 At) java.lang.reflect.Method.invokeNative (Native Method) com.android.internal.os.Zy GoteInit $ MethodAndArgsCaller.run at java.lan...

linux - Will running a shell script from a c++ program automatically display the output of the shell script to the console? -

I am taking a Linux class and I have never done C ++. My shell script mainly involves everything , But I need to use it from the c ++ program when I run from the command line, my shell script wants to return the results to the console. When I run it from the C ++ program, my program compiles and runs, but I do not get any output. Is this because I have some error in my C ++ program, or should it be because C ++ and shell scripts interact? I have seen some questions about grabbing the output from the shell script and using it in the C ++ program, but I do not want to do this. Truly all my C ++ programs run shell scripts. I just need the output of my shell script to show on the console. Can you help If I am using the code I am using, I can post. C ++: #include & lt; Iostream & gt; #include & lt; String & gt; # Include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; using namespace std; Int main (int argc, char * argv []) {string arg; Arg = ...

javascript - Anchoring a google map to right side of its container -

I have seen that the Google Maps API (and Google Maps in general) always maps anchor to the left hand side Their containers, like (resize window) I have an anchorage where I would like the map to anchor to the right hand side. I am not getting anything in the API docs while mentioning this. Is this possible? On resizing, an event suggests to re-map the map with the listener, but this is not good because I am looking for the effect of a sidebar panel and the 'Top' map rather the side Push it for it and then later in the map again than in the center itself. How about adding event listeners to the event? google.maps.event.addListener (map, 'resize', function (event) {map.setCenter (myLocation); //}); This map will focus on changing the shape of the div with smoothly Note: You may have to create a shape 'Map' is a map type object from the Google API 'MyLocation' is a moving object var MyLocation = new google.maps.LatLng (-33...

x11 - fork()/exec() in XWindow application -

How to execute xterm from the XWindow program, insert it into my window, but both execute the execution Keep Xterm active and after closing it? In my XWindows (XLib over XCB) application, I type xterm -Into & lt; Handle & gt; I want to execute . Because there is a xterm window in my window unfortunately something is going wrong. Pseudo-code: if (fork () == 0) {pipe = popan ('extram-in' handle); Whereas (pipe) becomes (pipe); Exit (0); } I'm tired as system () and execvp () as well. Everything is fine till I exit bash which runs in xterm , my program goes out, I think the connection to the X server has been lost. Because it is shared between parent and child. Update: The program is shown on the terminal after exit (or crash instead). "IO Error 11 (experimental temporarily unavailable)" on the X server: After 59 requests (59 processed known) 1 with event balance. [Xcb] Processing queue Unknown sequence number [xcb] Maybe it is a ...

java - JCR basic concepts -

I am working with Magnolia CMS recently, which is to use JCR. The problem I have is JCR Data Corruption and I came to know that I had very little knowledge of troubleshooting this situation. My understanding of JCR is as follows: JCR is a specification, there are several implementations JackBabit is a JCR implementation Now my questions are How can a JCR be stored? Back up and restore? Is there any special device that can be tried to check and correct the integrity of a given JCR? I'm playing a bit with Tomeiro. Is there any special source of information / tutorials that I should read to get the full and appropriate understanding of ZCR technology? Update: I have some other questions: If a given JCR implementation stores content on a database , Then I can hope for all the content Currently we have a JCR repo which is accessed by three different webserver accessed, I understand that JCR speck is in this situation And this is an inconsistency on con...

api - it is possible to download GitHub repository to my local computer -

Hello guys, I'm just starting to use Hitachi and I want to know that it is possible to download Gitub repository through my local computer. Using Geethub API or API libraries (i.e. for Python library "Pythab 3" Gitub API) import github3 import subprocess g = github3.login ('username', 'password') repo in For g.iter_repos (type = 'all'): sub process. Call (['git', 'clone', repo.clone_url]) If you want to clone an arbitrary stock You can do this: Import github3 import Upproses r = github3.repository ( 'master', 'Ripojitri_nam') Upproses. Call (['git', 'clone', repo.clone_url]) pygithub3 has not been actively developed in a year. I would advise not to use it because it is useless and since then Gitihb has added a large number to its API.

c++ - error C2375: : redefinition; different linkage -

I am compiling a solution written for vs. 2012, I am using vs 233 and redefined errors Receiving such: 21> C: \ Program Files (x86) \ Microsoft Visual Studio 12.0 \ VC \ include \ math.h (494): Error C2375: 'fmax': redefinition; Various linkage It has been found that many announcements were added for mathematics and in Word3013 other headers which are trying to compile in Libs, Is there an easy way to change them throughout the code?

c# - Embeddeding the vsix file in Visual Studio -

Recently, I am downloading the codesnippets file. This extension has the name of the .vsix file so that I can see the Visual Studio 2012 The Visual Studio installation will register the handler for the VSIX extension. This allows you to simply click on the file and it will run the installer. If this association is broken, you can run the installer manually. It is located at C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ Common7 \ IDE \ VSIXInstaller.exe

android - phonegap app installed but not visible in the apps menu -

I use PhoneGap 3.3.1 CLI to create an app and install it on my Android device (Samsung S3) I am doing Add Android platform Run the Android app on the emulator and device. Step 1 and 2 succeed, but 3 are partially successful app installs on emulator and appear in your app menu (list of installed apps). But the same app installed on the device in the app menu is not visible. I checked my existence with the command - ADB Shell Evening List Package This command is a list of packages and my new app package is showing there. App does not appear in the menu Help please help find out what is wrong. Update: This only works on emulators, not on any other device (Nexus 4 and my own device is checked on S3 Update 2: App Works on a mobile device. I'm putting it on Google Glass device, it gives a new error, says logcat below - * 02-18 14: 49: 12.266 : D / Cordova Activity (2639): Cordova activity .onCreate () 02-18 14: 49: 12.282: I / dalvikvm (2639): method org.apache.cord...

iis 6 - IIS V6 autoblocking ip -

Linux-Boy has a question about IIS v6. This is the case, I have a site running, when I do some specific work on this site (like removing a particular item, three times in a row) the site will break, and A blank blank page will appear. While examining the response headings I saw that the server "403 is forbidden: the client's IP address has been rejected." Through a proxy, I can just connect properly. By examining site-options in IIS Manager, I find that my IP is not blocked globally, it's something similar. Where can I look for it? It happens automatically and the block ends at about 8-12 minutes all the time? Best regards UNAS Do you have access to IIS? Site ID (inside ASP code), not in IIS. Please check the IIS console, and make sure there is no blocked IP if it is true, then you should get the database / table or some config files, where all the blocked IPs are stored. After that, you should be able to get the ASP code, which is responsible f...

objective c - Scrolling a NSScrollView not working -

I am trying to scroll an NSScrollView below the view using this code: NSPoint newScrollOrigin; If ([[self.chatScreen documentView is duplicated) {newScrollOrigin = NSMakePoint (0.0, NSMaxY ([[self.chatScreen documentView] frame) - NSHite ([[self.chatScreen contentView] border)); } And {newScrollOrigin = NSMakePoint (0.0.0.0); } Self.chatScreen.backgroundColor = [NSColor redColor]; [[Self. Chat screen document view] scrollpoint: nucoologreen]; which came from here: When I run my program, it partially scrolls down under the scene, where the screen shows above the scene (Default starting position) But when I try to scroll, it jumps to the bottom of the page, where I can scroll normally. If I scroll around any part of the scene, the next time it updates (which triggers it to jump back down) it seems that nothing happened, until Do not try to scroll, which again causes the jump back to the bottom of the page. Thanks in advance. / P> You need to scroll clip view and no...

jquery - How to align center search popup in jqgrid -

I have trouble aligning jqgrid in the center search popup . When I click on the search button in jqgrid, the search popup is displayed at the beginning of the grid. $ (document) .ready (function () {// jqGrid $ ("# usersList") .jqGrid ({url: '& lt;% = request.getContextPath ()% & Gt; / getUsersList ', Datatype: "Jason", colNames: [' Edit ',' Primary email ',' Active ',' First name '' Middle name ',' Lastname ',' Mobile number '], CallModel: {Name: 'user id', search: incorrect, index: 'user id', width: 30, sorted: wrong}, {name: 'email', index: 'user.primaryEmail', width: 150}, {name : 'IsActive', index: 'user.isActive', width: 80}, {name: 'firstname', index: 'firstname', width: 100}, {Name: 'middleName', index: 'middleName', width : 100}, {name: 'lastname}, index:' lastname ', width: 1 00}, {nam...

ios - Remove core data file on copy and paste to other project Xcode 5 -

Image
I am working on Xcode 5.0 and with core data. I spend 2 to 3 hours to build relationships with tables and these are 2 dozen tables. Now what happened I also need those relationships for other projects, I paste it for copy and other project, both projects " Xcdatamodeld "file and show in red color in the compilation resource. I do not know why this happens. Please guide me if a person has already encountered such a problem and if there is no chance of recovery then I also know how to guide me. I also searched my Mac, but the file was not found. I am looking for your feedback thanks in advance. All you need to do is copy the original file of the destination file properly and it will always be Add as file as..It is. Do not forget to keep the checkbox while adding the file:

android - Null Pointer Exception Handling Button from XML in Library Project -

I am trying to create a custom dialog in my library project via XML I Here is the XML file: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: background = "@drawable / tanlaxics" & gt; & Lt; LinearLayout Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_algir parentbottom = "true" android: layout_marginLeft = "25dp" & gt; & Lt; Button Android: id = "@ + id / likeitb" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: background = "@dictrum / / likeitd" /> gt; & Lt; Android: id = "@ + id / dontlikeitb" Android: layout_width = "wrap_content...

c# - Searching in databound comboBox? -

Image
Friends I have a combo box that is configured to work as a dropdown list. It is being populated through the database, it is working without losslessness. Now what I want to do is this: For example, I have a combo box that is receiving the "Name" column from the database table "tblPersons" and displaying it. If, for example, database table of 4 entries "tblPersons" are in Ali Khan Ahmed Khan Bilal Khan Bilal Farooqi when I write "Ahmd Faruki" combo box (must be editable combo box and press once I "Ahmad") and enter her database The table should be searched in "TBPerson" - if "Ahmed Farooqui" is found - it should be selected, if "Ahmed Farooqui" is not found - then They do what I want to create a new entry in the database table to ask me "TblPersons", if I click on "Yes" should open another form to add a new person and if I click on "No" , Then he should not do ...

haskell - ScopeTypeVariables is Failing To Help Inference -

I have a utility function to forward calls to type class method through a type of type. I problem That I have to pass the barrier clearly using the proxy. I would just like to use ScopedTypeVariables. Here is the code {- # LANGUAGE type operator} - # {- # LANGUAGE Flexible difference # -} {- # language negligence qualifications # -} {- # LANGUAGE LambdaCase # -} {- # LANGUAGE Rankings # -} {- # LANGUAGE Obligations # -} {- # LANGUAGE scrapptive variables # -} {- # LANGUAGE DEVOVER GENERIC # -} {- # LANGUAGE analogy # -} {- # LANGUAGE MultiParamTypeClasses # -} Mitsuba.Generic module where imported GHC.Generics import data. Proxy Class GFold fcb Where genericFold :: PC - & gt; (Foral ECE => E -> B) - & gt; F.A - & gt; B example GFold a c d => Gfold (M1xYA) CD, where genericfold pf (m1x) = genericfold pf x instance (gold acd, g fold bcd) = & gt; Gifold (A: +: B) CD where generic fold pf = \ case L1 x - & gt; GenericFold (Proxy :: Proxy C) FX R1X - ...