Posts

Showing posts from February, 2010

php - Preventing multi-row returns while using INNER JOIN and IN clause: MySQL -

I have several tables that I am joining together to return to the search results page. In the search page, the user can toggle the criteria, and the page is dynamically reloaded based on the query results. In this regard, I am having a challenge with a special condition - I have a table called jobs and there is another table for the job. One job can have one or more contract types. - Select the simple question to join both of them in a.job_id, c.contract_type_name, from the job on an Inner Join Job_SiteC Job_id = c.job_id This query works fine. However, if the user decides to toggle some contract types and chooses multiple contract types, then the query returns multiple rows with the same job ID. The query I am using is in the form of the following: SELECT a.job_id, c.contract_type_name Job from a job JOB_Centract C on an INNER JOB. A.job_id = c.job_id and c.contract_type IN (1,2, 4) So for the above code, if there are multiple contract type associations in a job then...

assembly - Spim Crashing to Mips Reading from File -

I am trying to use a file mips assembly, but every time I run the code, spam crashes is. I got .data str: .asciiz "Welcome: code from many websites which all had the same code and it worked fine for them. \ n "Fin: .asciiz" test.txt "buffer: .space 1024 .text .globl Main main: La $ a0, str li $ v0.4 syscall #open file $ li0, $ 13 file $ Open a0, open # load file name li $ a1, 0 # li $ a2 open to read, 0 simple moves $ s6, $ v0 # load file descriptor li $ v0, 14 # add from file $ a0, $ s6 , $ 0 # Add file descriptor La $ A1, buffer # address of buffer R $$ 2, 1024 # hardcod buffer length Sisal Li $ V0, 16 # Call to close the system file $ a0, add $ s6, file descriptor to close $ 0 # syscall: $ li $ v0,10 Syscall

javascript - Addon SDK. How I can make popup like this? -

Image
Is it possible to popup this way? There is no content in the style and status of popups Interesting for me Under the toolbut, with the arrow from the center of the button. The panel widget was not so, it's just a popup in the middle of the window. How can I pop-up this add-ons SDK? Firefox 30 and above, you can attach to panel one Like toggle button : var panel = ("sdk / panel"). The panel ({... onHide: function () {button .state ('window', {checked: false}}}}}) Var button = requirement ("sdk / ui") Toggleton ({... onClick : Function (state) {if (state.checked) {panel.show ({position: button});}}}); column status Specify to call the column on panel.show ; In this case, we are appending it to Toggleton . More Info:

drag and drop on div work in Chrome but redirect in Internet Explorer -

I'm hearing drop events on a div element (v36.0.1985) Chrome, firefox (v30) Incidents, but do not fire in IE (v10.0.9200). I have created a simple JSFiddle to clarify the problem. Works: 1.) Open YouTube in Chrome 2.) Open in Chrome 3.) Drag a YouTube video thumbnail on "DropZone" and a warning will appear. Fail: Redo the above but redirects this page instead of a warning in IE 10 or 11. Step 3. Note: I've got an example where IE will recognize a drop but it will move to a canvas when I replace a canvas with a diva, then it comes back to the redirect. $ ("# DropZone"). ("Draglevate", Function, I have tried different combinations of prevention, StopPropogation, and false return with success: (Incident ) {Event.preventDefault (); event.stopPropagation (); Return false;}); $ ("#DropZone"). ("Drainter", Function (Event) {event.preventDefault (); event.stopPropagation (); Return false;}); $ ("#Dro...

Java Text Parser with customized open and closing tags? -

I'm looking for a simple Java text parser that parses a piece of text like an XML SAX parser, But the customized open and closed tag instead of "& lt;" I have to deal with "[" What can I use, or do I have to do something? Example text: [hlpLnk key = hlpId] some text and [LNK key = purses] products [/ lnk] and some more text [/ hlpLnk] / P> And the Nano XML parser source looks useful: clean, small, easy to read. With some changes I can use it I think (there is a lot in projects like Xerces / not required)

ios - Zoom UIWebView in iOS7 -

मेरे पास iOS 7 ऐप में एक UIWebView है जो एक वेबपेज लोड करता है self.view.frame = [[UIScreen मुख्य स्क्रीन] applicationFrame के रूप में मैं ज़ूम स्तर 2.0 पर वेबव्यू सेट करना चाहता हूं। ]; Self.webView = [[UIWebView alloc] initWithFrame: CGRectMake (0, 64, SCREEN_WIDTH, SCREEN_HEIGHT-66)]; [Self.view addSubview: self.webView]; Self.webView.scalesPageToFit = हाँ; Self.webView.backgroundColor = [UIColor स्पष्ट कॉलर]; Self.webView.opaque = नहीं; फिर viewDidAppear विधि में, मैं ज़ूम पैमाने को UIScrollView * sv = [[self.webView subviews] objectAtIndex: 0] के रूप में सेट करता हूं; [एसवी सेटजूमस्केले: 2.0 एफ]; लेकिन यह काम करने के लिए नहीं लगता है। कोई मुझे इस को प्राप्त करने में मदद कर सकता है? मैं HTML को संशोधित नहीं कर सकता क्योंकि यह एक बाहरी पृष्ठ है। मुझे विश्वास नहीं है कि आप scalePageToFit = हाँ सेट कर सकते हैं और सेट कर सकते हैं ZoomScale पैमाने के पृष्ठ टिप्पणी के बाहर टिप्पणी करने की कोशिश करें।

mysql - Retrieve the name of each employee who works on all the projects controlled by department number 5 -

यह प्रश्न डाटा फाउंडेंटल्स ऑफ डाटाबेस सिस्टम 6 वें संस्करण (एलमास्त्री, नवाथ) अध्याय 5 क्वेरी 3 बी से लिया गया है। एक तरह से लेखकों ने यह उत्तर दिया है कि अस्तित्विक क्वांटिफ़ायर: SELECT Lname, Fname FROM कर्मचारी जहां मौजूद नहीं है (चयन करें * WORKS_ON B WHERE (बी.पी.एन.ई. में (परियोजना का चयन संख्या, जहां डनम = 5) और मौजूदा नहीं (SELECT * WORKS_ON सी से WHERE C.Essn = एसएसएन और सी.पी.एन. = बी.पी.एन. नो))); लेखकों ने इस समाधान को समझाया है: "प्रत्येक कर्मचारी का चयन करें कि विभाग 5 द्वारा नियंत्रित एक परियोजना मौजूद नहीं है जो कि कर्मचारी पर काम नहीं करता"। मैं समझ नहीं पा रहा हूं कि दूसरा आंतरिक सहसंबद्ध उप-क्वेरी सही परिणाम देने के लिए अन्य असंगठित subquery और बाहरी क्वेरी से संबंधित है। कोई भी मदद की सराहना की जाती है धन्यवाद

php - download pdf file without specifying the whole name -

I've got a button where users can download specific files. Each time I have to process the name of the file and it will be inserted into a variable, before giving it to the user to give the ready function. However, in many cases the file name is quite long and can change over time, so there are chances of errors in the future. So I was wondering if someone can pass something like / filedirectory/*.pdf or just specify only one part of the name and everything else can be done and then send it to readfile to download the PDF Given which is found in the example below? if (isset ($ _ POST ["submit"]) // We will output a PDF header ('content-type: application / pdf'); // it will be downloaded .pdf header ('content-dispute: attachment; filename =' download pdf ''); // whatever the name in pdf is readfile ('./panyedoryory / * .pdf'); # and // file 123 ... readfile ('./panyedoryory / 123 * .pdf');} You can use to list all PDF fi...

How to check if a Generic type is nil in Swift -

I am trying to copy all functions from Ajithan, to check any type of blue objects in a list Closed, but I have a hard time trying to check alternative items For some reason I can send an alternate string (for example string) and although it says that it is not zero it is still a statement Which passes through the function's arm No. Any advice about this or how to deal with it? Thanks! func `all` & lt; T & gt; (Aray: [T]) - & gt; Bull {For the array in the item {if item is in any form? {Println (item) // nil>. & Lt; } Test: T? = Items if tested {println ("broken") // print is broken: (}} returning true} var t: string? All ([t]) It is not absolutely clear what you are trying to test, but it may help you. The function should be the parameter array of options [t?] This can be beneficial to compare these elements directly with zero . Enough to close The filter function can be found. func all (Array: [t?]) -> Child {For element in...

windows phone 8.1 - When App Loses Focus, Do This -

I have a way that I need to run when my app loses focus, in particular, The tile needs to be updated every time the user goes to the start menu. How can I trigger this method whenever the user clicks the back button or the Start menu button? I thought that if I put it in the onspending (Object Sender, Suspending and Accenture E) then method App.xaml.cs will work , But it turns out that this is not the case !! On closure, I've found that the app launches, but it does not really do what I want. This is what you are looking for: when If the user moves an app in the background, the OS waits for a few seconds to see if the user immediately switches back to the app. If the user does not switch back, then the OS has suspended the application. But this event is being raised not Generally (without debugging) it should work fine. Just remember this fact that there is a limited time for your work in this incident, do not forget that you forget it and release it: priv...

java - Sharing src/test classes between modules in a multi-module maven project -

I have a multi-module maven project. For this example, consider two modules: data consumer dependence on module user As the module is data . Module declares a group of core classes. It has been tested under src / test which they use. These tests require some long-rotating object creation, so I have a class with some utility methods to make these objects SampleDataHelper ) src / test hierarchy. I also have some tests in the Consumer I module which needs to be made of some of these long-rotating objects, I can use my consumer source / test I want to use my sampleddetahler class (defined in the data source / test ) in the tree-dwelling tests. Unfortunately, even if the data consumer , dependency of the consumer can not see the classes under the data source / test . To counter it, I thought I could make the Other module ( data-test ), and SampleDataHelper Under src / main . After this I will include the data-test as the dependency of the ...

android - Can I have layer-list inside selector -

मेरे पास निम्न drawables है & lt;! - button_shape.xml - & gt ; & Lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & Lt; चयनकर्ता xmlns: एंड्रॉइड = "http://schemas.android.com/apk/res/android" & gt; & Lt; आइटम एंड्रॉइड: state_pressed = "false" & gt; & Lt; आकार एंड्रॉइड: आकृति = "आयत" & gt; & Lt; कोनों एंड्रॉइड: त्रिज्या = "3dp" / & gt; & Lt; ठोस एंड्रॉइड: रंग = "# 006600" / & gt; & Lt; / आकार & gt; & Lt; / मद & gt; & Lt; आइटम एंड्रॉइड: state_pressed = "true" & gt; & Lt; आकार एंड्रॉइड: आकृति = "आयत" & gt; & Lt; कोनों एंड्रॉइड: त्रिज्या = "3dp" / & gt; & Lt; ठोस एंड्रॉइड: रंग = "# 003300" / & gt; & Lt; / आकार & gt; & Lt; / मद & gt; & Lt; / चयनकर्ता & gt; और & lt;! - button_shape_shadowed.xml - & gt; & Lt;? Xml संस्करण = ...

struts2 - MySQL server: throwing exception regarding syntax of query -

I am creating a project on the Strat Framework, I get an exception from the server when I insert data in the table using SQL And I'm unable to find solutions. The error is as follows: javax.servlet .ServletException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: There is an error in your SQL syntax; Check the manual related to your MySQL server version for the correct syntax to use ' near', ',', ',' 'yes', 'yes', 'admin') . Pre> is my code which cause an error as follows: - SQL = "field_visit_details (visit_date, block, village, flw_category, flw_name, flw_contact_no, aware_zinc, aware_ors Take, past_zinc, past_ors, qty_avail_zinc_ten, qty_avail_zinc_twe, qty_avail_zinc_syr, qty_avail_ors, qty_disp_zinc_ten, qty_disp_zinc_twe, qty_disp_zinc_syr, qty_disp_ors, stockout_zinc, stockout_ors, diar_cases_seen, diar_cases_reff, diar_deaths_less_than_five, added_by) values ​​( '' + field_visit_date ...

javascript - Jquery .animate() method doesnt seem to work with css top property -

O people, I'm trying to create a menu that slides from the top of the page after scrolling to a certain point And for some reason the jquery animation function is not working perfectly, but if I decide to justify a alert ("hello") of animate function, ) , then it works fine. Here is my function code: function header () {var main = document.getElementById ("main"); Var rect = main.getBoundingClientRect (); Var menu = document.getElementById ("menu unavailable"); Var y = rect.top; If (y & lt; = 5) {$ ("# menuappear") Animate ({top: "0px"}, 500); } And {$ ("# menu unavailable"). Animate ({Head: "- 93px"}, 500); }} My HRM is: & lt; Body onscroll = "header ()" & gt; ... & lt; Div id = "menuappear" & gt; & Lt; A href = "index.html" & gt; & Lt; Img class = "logo" src = "picture / logo .png" /> & Lt; / A & gt; ...

css - build simple template html - divs -

I am new to DIV and I want to make a simple template for my website. I need header and 100%, left panel for main 100% divas and bottom menu 200px, right panel Panel I need that if the left panel does not show that the main will be 100% now if it shows that the "main" device under the left panel is 10X & lt; Div id = "top_menu" & gt; & Lt; / Div & gt; & Lt; Div id = "left_menu" & gt; & Lt; / Div & gt; & Lt; Div id = "main" & gt; & Lt; / Div & gt; & Lt; Div id = "down" & gt; & Lt; / Div & gt; #top_menu {height: 40px; Background color: # 343B43; Width: 100%; Status: fixed; Z-index: 20; } #left_manu {margin-top: 40px; Swim left; Width: 200px; Background: # F4F4F4; Status: fixed; Z-index: 10; } #main {margin-top: 40px; float right; Background: Red; Padding: 30px; Width: 90%; } #bot {height: 30px; Status: fixed; Width: 100%; } Update your HTML and CSS below. ...

c# - Using ALAssetsLibraryChangedNotification in background with Xamarin iOS -

I'm writing an app that targets iOS7 in Xamarin.iOS, which will soon send photos of users an online storage service Wants to upload it as if it takes them away. To do this, I established an Alasset Library Converted Notification Supervisor, such as: NSNotificationCenter.DefaultCenter.AddObserver (ALAssetsLibrary.ChangedNotification, Callback); and then define a callback like this: zero callback (nestation information) {console. WrightLine ("Library Notification Received: {0}", Notification); // launch picture upload here} This works well, but only open with the app. Is my app a way to get notification (and uploading process) when it is turned into background? I use the iOS 7 background for file transfers and long-running tasks in other points of my app, but I do not know how to implement the supervisor. Additional questions, I would also like to be able to filter the notifications received by this function so that I can only upload my upload when the opera...

SQL query with 2 joins and count -

I have spent the last 8 hours trying to work this SQL query and I can not do it. I am not very experienced, but I am trying to improve it. I have 2 tables: table cheaper column: id | User ID Made Off | Winner | Cancel 1 | 7962290564 | 2014-07-26 20:32:22 | 2014-07-26 20:32:22 | 7962290566 | Zero 2 7962290565 | 2014-07-26 20:32:22 | 2014-07-26 20:32:22 | 7962290567 | Zero 3 7962290566 | 2014-07-26 20:32:22 | 2014-07-26 20:32:22 | 7962290567 | Faucet 4 7962290566 | 2014-07-26 20:32:22 | 0000-00-00 00:00:00 | Faucet Faucet table user column: id | Steamid | Joined Role | Name 1 7962290564 | 2014-07-26 20:32:22 | 1 | User A 2 | 7962290565 | 2014-07-26 20:32:22 | 4 | User B3 | 7962290566 | 2014-07-26 20:32:22 | 4 | User C4 7962290567 | 2014-07-26 20:32:22 | 4 | User D5 | 7962290568 | 2014-07-26 20:32:22 | 4 | User E6 | 7962290569 | 2014-07-26 20:32:22 | 5 | User F What I am doing after the same result, how many times someone has an IDE in his purview. The user and the number of t...

pyrocms - Analytics and traffic analysis of user created programs -

I have a website in PyroCMS, in which registered users can create programs. I want to provide a traffic analysis tool to monitor clicks on these programs so that users can sign in and check analytic. How can I do this? Is there any module available to them? Or any suggestions for the approach? Thanks, Knowledge

for loop - Laravel 4 - Enumerating @foreach -

I want to enter some material into @foreach I want something like this: 1 - First Data 2 - Second Data ... I've used @forchha using an email, but I need to calculate this with the combination of @forac Have tried with @, but he has not worked for me ... does anyone know this? Thank you in advance! & lt ;? Php $ i = 1; ? & Gt; @foreach (collection as $ item) & lt; P & gt; {{$ I}} - {{$ item- & gt; Property}} & lt; / P & gt; & Lt ;? Php $ i ++; ? & Gt; @ Xraynecha

dependency injection - Dagger - Is it possible to select a Provider based on inheritance? -

I currently have a base class that contains a member I want to inject . However, I depend on the concrete type of this member to be immediately on subclass . Which side I am targeting, there is something with these lines: public interface stringinfo {public string getString (); } Public class HelloStringConcrete StringInterface applied {public string getString () {return "hello"; }} Public square applies World String Concrete string enforfference {receives public string () {return "world"; }} Public Essentials Support {@Inject StringInterface Member; Access Public Base () {// Object Graph MyObjectGraph.get (). (Inject this); } Public Zero Print Some () {System.out.println (member.getString ()); }} Public Square SubclassHello Base {} Expands Public Category SubclassWorld Base {} Expand Module {injects = {SubclassHello.class}} Public Square HelloModule {@Provides StringInterface Provide StringInterface () {New HelloStringConcrete Returns}; }} @module (Inject...

ios - i need __NSCFArray convert to an array. is it possible? -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मुझे इससे मूल्य प्राप्त करने की आवश्यकता है "रीडर" एक सरणी के लिए, जहां पाठक: @ "पाठकों": [NSString stringWithFormat: @ "% @", [पाठकों इयोड घटक JoinedByString: @ ","]], जहां पाठक आईडी एक NSArray है। NSArray * test = [[e.response objectForKey: @ "acls"] objectAtIndex: 0] objectForKey: @ "पाठकों" ]; असल में मुझे पाठक मूल्यों को एक और एनएसएआरआर में वापस लाने की ज़रूरत है, जब मैं कोशिश करता हूं NSString * test = [[[e.response objectForKey: @ " एसीएल "] ऑब्जेक्टअटइंडएक्स: 0] ऑब्जेक्टफोरकी: @" रीडर "]; यह __NSCFArray दिखाता है क्या ऐरे के रूप में वापस पाने का कोई तरीका है? आपको परिवर्तित करने के लिए कुछ भी करने की ज़रूरत नहीं है __ एनएससीएफआरआरए में NSArray । बस मान लें कि यह सादा है NSArray और इसे नियमित रूप से उपयोग करें दरअसल, मेरा मानना ​​है कि यह इस तरह के दृश्यों के पीछे लागू किया गया है।

java - error with launching minecraft from cmd -

सरल: मैं इसे डालता हूं: @echo off cd \ set MCDIR =% APPDATA%। Minecraft सीडी% एमसीडीआईआर% जावा- Xmx1024M -Djava.library.path = "% एमसीडीआईआर% संस्करण \ 1.7.10-लाइटलोडर 1.7.10 \ 1.7.10-लाइटलोडर 1.7.10-निवासी" -सीपी "% एमसीडीआईआर% \ पुस्तकालयों \ ऑर्ग \ अपाचे \ प्रवेश \ \ 2.0 beta9 \ log4j-api-2.0-beta9.jar log4j \ log4j-api;% MCDIR% \ पुस्तकालयों \ ऑर्ग \ अपाचे \ प्रवेश \ \ log4j \ log4j कोर 2.0 beta9 \ log4j कोर-2.0-beta9.jar;% MCDIR% \ पुस्तकालयों \ कॉम \ आईबीएम \ आईसीयू \ icu4j कोर-Mojang \ 51.2 \ icu4j कोर-Mojang-51.2.jar;% MCDIR% \ पुस्तकालयों \ कॉम \ Mojang \ authlib \ 1.3 \ authlib-1.3.jar;% MCDIR% \ पुस्तकालयों \ कब \ netty \ netty-सभी \ 4.0.10.Final \ netty सभी-4.0.10.Final.jar;% MCDIR% \ पुस्तकालयों \ java3d \ vecmath \ 1.3.1 \ vecmath-1.3.1.jar;% MCDIR% \ पुस्तकालयों \ शुद्ध \ sf \ trove4j \ trove4j \ 3.0.3 \ trove4j-3.0.3.jar;% MCDIR% \ पुस्तकालयों \ शुद्ध \ sf \ jopt-सरल \ jopt-सरल \ 4.5 \ jopt-सरल-4.5.jar;% MCDIR% \ पुस्तकालयों \ कॉम \ paulscode \ cod...

c# - How do i add lines/strings to richTextBox1? -

सूचिए एक्सट्रैक्शन.टेक्स्ट 1 में 49 आइटम होते हैं लेकिन अंत में richTextbox1 है खाली। मैं ListsExtractions.text1 से richTextBox1 ? सिस्टम से स्ट्रिंग / लाइन कैसे जोड़ सकता हूं; System.Collections.Generic का उपयोग कर; System.ComponentModel का उपयोग कर; System.Data का उपयोग कर; System.Drawing का उपयोग कर; System.Linq का उपयोग कर; System.Text का उपयोग कर; सिस्टम का उपयोग। थ्रेडिंग। टास्क; System.Windows.Forms का उपयोग कर; नामस्थान ScrollLabelTest {सार्वजनिक आंशिक श्रेणी DisplayLockedThreads: फ़ॉर्म {सार्वजनिक DisplayLockedThreads () {InitializeComponent (); के लिए (इंट आई = 0; आई & lt; लिस्ट एक्सट्रैक्शन.टेक्स्ट 1.काउंट; आई ++) {richTextBox1.Text = सूची एक्सटेक्टेशंस.टेक्स्ट 1 [आई]; }} निजी शून्य DisplayLockedThreads_Load (ऑब्जेक्ट प्रेषक, EventArgs ई) {}}} ListsExtractions.text1 में 49 आइटम होते हैं लेकिन अंत में richTextbox1 खाली है। इसे बदलें के लिए (int i = 0; i & lt; लिस्ट एक्सट्रैक्शन.टेक्स्ट .1.काउंट; i ++) {richTextBox1.Text = सूची एक्स्ट्राक्श...

php - Find images with certain extensions recursively -

I am currently trying to create a script that has * .jpg / * .png extension in directories and subdirectories I will find the picture. If any image is found with any of these extensions, then save it in an array with path, name, size, height and width. So far I have this piece of code, which will be available to all files, but I do not know how to get only JPG / PGG images. class image check {public static function getDirectory ($ path = '.', $ Level = 0) {$ ignore = array ('cgi-bin', '.', '.. '); // Directories: Do not pay attention when indexing $ Dh = @opendir ($ path); // Open the directory at $ d headlined (wrong! == ($ file = readdir ($ dh)) // // Loop through directory (! In_array ($ file, $ ignore)) // // Check That this file is ignored $ spaces = str_repeat ('& amp; nbsp;', ($ level * 4)); // Just to add a spacing to the list, show the better // directory tree. If there is a directory of it (is_dir ("$ path / $ file...

ios - Way to detect character that takes up more than one index spot in an NSString? -

I'm thinking, is there a character that takes more than 1 index spot in an NSSTing? (Like an emoji). I am trying to implement a custom text view and when the user is removed, I have to know that I should only delete the last index spot or more. Actually use NSString to use UTF-16 . Therefore it is very difficult to work with those letters which are two UTF-16 chatter (uniter) or more . But what you can do to get the range and delete with rangeOfComposedCharacterSequenceAtIndex . Find the last character index from the first string NSUnitor's last chic index = [String length] - 1; More than the limit of the previous character NSCNA Last Funeral = [REC limit: Sensitive SuratAntx: Last Customer Index]; Delete the character with the range (if it deletes UTF-16, then two UTF-16 is) deleted LstCharString = [Str substringToIndex: lastCharRange. Location]; You can use this method with any type of character , which will deny any number

gruntjs - gulp with object files key as dest and array as source -

मुझे यह json फ़ाइल मिली है {"विक्रेता": {"css" : {"Public / build / css / vendor.min.css": ["public / bower_components / bootstrap / dist / css / bootstrap.min.css"]}, "जे एस": {"सार्वजनिक / बिल्ड / जेएस / विक्रेता .in.js ":" public / bower_components / lodash / dist / lodash.min.js "," public / bower_components / jquery / dist / jquery.min.js "," public / bower_components / bootstrap / dist / js / Bootstrap.min.js "," public / bower_components / angular / angular.min.js "," public / bower_components / angular-ui-router / release / angular-ui-router.min.js "," public / bower_components / ("Public / build / css / scripts.min.css": ["public / * / assets / css / * *] [" सार्वजनिक / बिल्ड / सीएसएस / स्क्रिप्ट। सीएसएस "]}," जेएस ": { "सार्वजनिक / बिल्ड / जेएस / स्क्रिप्ट। मी। जेएस": ["सार्वजनिक / इनिट। जेएस", "स...

c++ - Indicate angle in QTableView - possible approaches -

I enter an QTableView column as an arrow indicator (0-35 9 Degree) and I wonder what would be the best way: Should I use the QPixmap and rotate the image accordingly? Would I use the image as SVG and then display it as QPixmap Can I call that column directly to QPainter ()? Anything completely different? The approach has become increasingly reasonable, because table view can have 1-250 rows, and then I must draw as many angle marks as 1 degree hardly Distinguishable I was thinking of making 120 symbols (according to 3 degrees) in memory and then bring the closest to me.

c# - Json String doesn't deserialize -

मेरे पास निम्न JSON है: {"सफलता": 1, "वापसी" : "" "": "" "," बीएससी ": 0," एलटीसी ": 0," एलटीसी ": 0}," अधिकार ": {" जानकारी ": 1," व्यापार ": 0," पीछे हटाना ": 0}, "Transaction_count": 1, "ओपन_रेन्डर्स": 0, "सर्वर_टाइम": 1406470221}} मैं इसके साथ deserialize करने की कोशिश कर रहा हूं: JsonConvert .DeserializeObject & LT; UserInfo & gt; (jsonString); क्लासेस इस प्रकार हैं: सार्वजनिक वर्ग UserInfo {[जेसनप्रॉपर्टी ("transaction_count")] सार्वजनिक इंट लेनदेन की गणना {get; सेट; } [जेसनप्रॉपर्टी ("ओपन_रेन्डर्स")] सार्वजनिक इंक ओपनऑर्डर्स {प्राप्त करें; सेट; } [जेसनप्रॉपर्टी ("सर्वर_टाइम")] सार्वजनिक पूर्ण सर्वरटाइम {प्राप्त; सेट; } [जेसनप्रॉपर्टी ("निधि")] सार्वजनिक फंड्स फंड {get; सेट; } [जेसनप्रॉपर्टी ("अधिकार")] जन अधिकार अधिकार {प्राप्त; सेट; }} सार्वजनिक वर्ग...

javascript - How can I declare a datatype for an array of objects in Typescript? -

मेरे पास डेटा है जो इस तरह दिखता है: var abc = [{"id" : 1, "नाम": "x"}, {"id": 2, "name": "x"}] क्या कोई मुझे बता सकता है कि मैं किस प्रकार डेटाैट की घोषणा कर सकता हूं यह टाइपस्क्रिप्ट में है? क्या मैं यह घोषणा कर सकता हूं कि वस्तुओं में "id" और "name" फ़ील्ड है? हम स्पष्ट रूप से परिभाषित इंटरफेस का उपयोग कर सकते हैं या हम इनलाइन प्रकार की परिभाषा का उपयोग कर सकते हैं // इनलाइन प्रकार var abc: {id: number; name: string} [] = [{"id": 1, "नाम": "x"}, {"id": 2, "नाम": "x"}] // गलत // var abc: {id: number; name: string} [] = [{x : 1}] // स्पष्ट इंटरफ़ेस इंटरफ़ेस आईडीएटी {आईडी: नंबर; नाम: स्ट्रिंग; } Var def: IData [] = [{"id": 1, "नाम": "x"}, {"id": 2, "नाम": "x"}] // गलत // var def: IData [] = [{X: 1}] दोनों जांचें

Customising django-allauth's socialaccount signup form -

I am successfully using my custom form class with standard account registration, although I can not seem to have a social account sign Up to the custom form class (the default signup form is always loaded). As suggested in the question, I have set the SOCIALACCOUNT_AUTO_SIGNUP = False . And as I have suggested, I am using the following setting: SOCIALACCOUNT_FORMS = {'signup': 'someapp.forms.SocialSignupForm'} The code for a custom form class looks something like this (lots of suggestions have been given): class SocialSignupForm (forms.Form): foo = forms.CharField (max_length = 255) (Self, request, user): user.foo = self.cleaned_data ['foo'] user, label = 'Foo', widget = forms.TextInput ({placeholder: 'bar'}) Save () answer my own question To answer, the problem was that the setting SOCIALACCOUNT_FORMS (and therefore optimize the signup form) is only available from Déjengo-Allay 0.17.1. My installed version is 0.17.0 (In...

sql - How would you design a table to keep track of users' likes and dislikes in mysql -

I want to get my thoughts about preparing a table to store user's likes and dislikes so that people One user can check like / dislike history Suppose I have a list of thousands of products, each of them can be liked or disliked. I have a user ID, product in every line user_like preference and dislike user_id product_id Tom Toys May Toys Peter Toed Tom Toys Peter Toys user_dislike Table user_id product_id Tom ToysB Tom Toyoine May Toyov Paul Paula Paul Paula Is this a suitable approach? Or I should use the conset to add it to a table like user_like_dislike as a record end, for example: user_like_dislike user_id Tom likes to like toy, toy toyab, toy mayy toy toynow paul toy, toy peter puppy, toy I have only one table, user_likes, with columns such as: user_likes (user_id, product_id, like_type) Use a primary key on user_id and product_id (a user should not be able to like and dislike the product)

android - Disable Proximity Sensor during call -

I left my phone and looks like my proximity sensor that does not work so far. The problem is that it stops pass all the time, that the display stops during the call and I am not able to use the number pad to enter the PIN or to insert another call or Then I can disconnect the call. I got the Power button disconnect option in Accessibility settings and now uses it. I tried to make an app that tries to get a full walklock when the call is expected to retain the display. The service receives a full wakelock and releases it, then a broadcast receiver has been created, which invokes a service when the phone varies in OFFHOOK Only when the phone state IDE is But still, the proximity sensor stops displaying. I've ensured that the lock has been taken, used to do the hahold () method. I used the method () on the screen of the Power Manager and it came true even when the screen was closed during the call. I tried to get walklogs in the loop every two seconds for the test, b...

ios - How to detect when user changes keyboards? -

Is there a way to find out that when the user changes the keyboard type, especially in this case the Emoji keyboard for? After the text "itemprop =" text "> UITextInputMode you can use currentInputMode The UITextInputMode class example shows current text-input mode. You can use this object to determine the primary language currently used for text input. You can check the Emoji keyboard: NSString * language = [[UITextInputMode current Inputmod] primary language]; BOOL isEmoji = [language acquisition: @ "emoji"]; If (isEmoji) {// do something} If you change via UITextInputCurrentInputModeDidChangeNotification can be informed about the input mode. It will post in the current input mode after the change. This is a simple app that prints NSLog whenever any changes occur: - (zero) see { Viewedload]; [[NSNotificationCenter defaultCenter] addObserver: Self selector: @selector (changeInputMode) Name: UITextInputCurrentInputModeDidCh...

java - PrintWriter to append data if file exist -

I have a savegame file called mysave.sav and I want to add data to this file I want if the file already exists if the file does not exist, then I would like to create a file and then add data. Adding data works fine but inserted data overwrites existing data. I followed the instructions of exx here () string service = "miesaw." File F = new file (waiter); PrintWriter out = new PrintWriter (savestr); If (f.exists () & amp;! F.is directory ()) {out = new print witter (new FileOutputStream (new file (Severstars, true)); Out.append (mapstring); Out.close (); } Other {out.println (mappestring); Out.close (); } Where there is a mapstrings string that I want to add Can you help me Thanks Once you call PrintWriter = new PrintWriter (savestr) ;! If the file does not exist, then the file is created, first start it after checking the file existence. As mentioned in this, as it says: If the file exists, it will be reduced to zero size; Otherwise, a new fil...

css3 - how to create connected buttons for form controls with bootstrap 3? -

I am trying to get a button on these form controls: To look like control in this example: Actually I try to recreate the bootsnipp example by using Bootstrap3 [Bootstrap 3.1.1] form controls I am here. Here's HTML: & lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "control" & gt; & Lt; Div class = "entry form-group call-sm-4" & gt; & Lt; Div class = "input-group" & gt; & Lt; Input class = "form-control" name = "field []" type = "text" placeholder = "some type" & gt; & Lt; Button class = "BTN BTN-Success BTN-Aid" type = "button" & gt; & Lt; Span class = "glyphicon glyphicon-plus" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "entry form-group call-sm-4" ...

mysqli - Trying to understand 'mysqli_fetch_array' I fail to run an example -

The following code is the easiest, I can understand how to work with 'mysqli_fetch_array'. & lt ;? Php is required ('mysqli_connect.php'); $ Sql ​​= "SELECT 'fname', 'email', 'pass' FROM 'list'"; $ Line = mysqli_fetch_array ($ result, MYSQLI_NUM); While ($ line! == faucet) {echo $ row [0] ' '$ Line [1]' '. $ Line [2]; Echo & lt; Br / & gt; '; } Mysqli_close ($ dbcon); ? & Gt; This code produces the following error message: Warning: mysqli_fetch_array () parameter 1 is expected to be mysqli_result, given in Boolean C : \ Xampp \ htdocs \ Test \ mysqli_connect_test.php on line 5 Can someone advise me how this code works? What does "MYSQLI_NUM" mean? Thank you Observe that your code is very wrong: Requires 'mysqli_connect.php'; $ Sql ​​= "select fname`,` email`, `pass` `` to list ''; // # 1 $ result = $ dbcon-> Query ($ sql); // # 2 while ...

sql - Howto get freq of count's data in month 1 - 12 in specific year -

How do I get a frequency of counting statistics, such as results below, I need a similar result for creating a dashboard ## Data in the year 2014 Table 1 month_name | Calculation_food month 1 0 months 2 12 months 3 15 months 4 5 months 5 6 months 6 12 months 7 9 months 50 months 0 0 month 0 months 11 months 12 0 My DB structure Like cust_name Doc_date C001 13.02.2014 C098 17.06.2014 C099 05.06.2014 I want to count it group by month. Try it: Try it: Select XMO, Select '01' as the MO from * (*) to Free (from RDB $ DATABASE union, select '02' RDB $ DATABASE union from 'RDB $ DATABASE union' from 'RDB $ DATABASE union' from '03' RDB $ Databas Union Select all '04' Select all '06' from RDB $ DATABASE Union Select all '06' from RDB $ DATABASE Union Select all '06' from RDB $ DATABASE union '07' All Selection RDB '$ 08' RDB from Union of Defense All the selections from the $ Database Asso...

backbone.js - Famous (aka Famo.us) with Backbone router? -

Nobody knows how to use Famou.us with router, i.e. backbone? They have a clever Twitter clone, but it does not update the URL in the web browser. Looking for a decent router option for the famous, see the Twitter Clone here: It significantly changes the visual component, and the remaining spinal cord still works. Actually, this makes the meat of the merin too irrelevant. (Although I like modules and event content in it) This document I have found is how they integrate:

dpi - Android: Background image resolution? -

I am developing an Android application that displays an image in the background. I have read the documentation and it says that MDPI should be the base line and all other DPIs should be related to it. But I am not able to decide what the image of the background image should be in pixels for all the DPI? Any remedy? The best approach depends, but to save space and to maintain resolution on all density, only one Includes a single image When your activities are loaded in your app, use a scale load based on the device's DisplayMetrics. If you are not worried about the resolution, then scaling from MPDI is fine (but I'm pretty sure you are asking because the resolution on high density is a concern, and based on your background image). For the advice of "beginning" with MDPI, it is necessary to make numerical scaling and be able to conceptualize it. In other words, when you start with MDPI how "scanning" is the easiest, how scaling works on Android, y...

java - NumberFormatException - how to get the result and suppress the exception? -

I want to use the result of the conversion Can I do this? int num1 = integer.paint (a.getText ()); Int number 2 = integer. Percent (b.gettext ()); C.setText (String.valueOf (number1 + NUM2)); 1 Try block all code: Try {int num1 = integer.paint (a.getText ()); Int number 2 = integer. Percent (b.gettext ()); C.setText (String.valueOf (num1 + num2)); } Hold (NumberFormatException ex) {// Ignore? // the handle? Ex.printStackTrace (); } - hold - hold - Int num1; {Num1 = integer. Try endpoint (a.getText ()); } Hold (NumberFormatException ex) {// Ignore? // the handle? A.setText (0); Num1 = 0; } 3write string before parsing: int num1 = a.getText (). Matches ("-? \\ d +")? Integer.center (a.gettext ()): 0 / * arbitrary default value * /; Any of these options may work; Specifically, this option should depend on what you are actually trying to achieve.

anylogic - Hand response from one calling java program to another -

I have questions related to the communication of two Java programs, embeds each other. Embedded is a CPLX Linear Program (Java SE + CPLEX Libs) which calculates resources and is the other basic application simulation software (AOLG). Now the idea is that Simulation should use the resources calculated in the linear program. Now I want to call the simulation linear program, which then calculates the resources and brings them back as an array or object, the simulation continues. Simulation (AnyLogic) ----> Linear Program (CPLEX) & lt; -------- (VALUES?) -------- | My problem is "on the hand", return value (alg) is not enough, how can I do this? At this time I use a text file that stores values. I've read about RMIs and chairs, but do not know that this is a good idea. Any help is appreciated! Thank you. One way to do this is to launch your CPLEX program using the Java process . How to get feedback from the launched process and how to launch i...

html - How do I align an item to the right inside a flex container? -

I'm starting to use a flex box, but I'm not sure how to put an element inside a flake container Setting, which is to be located on the right side? I have tried to apply the code to align-self: flex-end and justify-content: flex-end without any success, so I hope someone can help me Could? CSS .ctn {background: lightblue; Height: 100 pixels; Padding: 10px; Exhibit: Flex; Alignment-item: center; } .btn {framework: none; Border: None; color navy; Background: light; Height: 50px; Line-height: 50px; Width: 200px; Text-transform: uppercase; } Codeplee: Alignment is self-alignment-similar to the property of objects: it only changes the alignment on the cross axis (it is standing when you are using the line direction). No, what you want here. You can use the property of equitable material if you have more than 2 items, then they equally equally with the first item on the left and the last item all the way to the right Will be separated: .ctn {background: li...

html - JavaScript selecting image to an img tag -

I have a fake profile system for a class project, a profile picture is required for it, and changing it locally Requires an option (from your hard drive) I have a work img tag which places the placeholder image as the default, and when you click on the change image , an open file dialog opens. There is a need to work now that they are setting an image link for the img tag with the selected image, this is what I have done so far. & lt; Div id = "userphoto" & gt; & Lt; A & gt; & Lt; Div class = "gravatar-wrapper-128" & gt; & Lt; Img id = "image" src = "http://blog.ramboll.com/fehmarnbelt/wp-content/themes/ramboll2/images/profile-img.jpg" alt = "" class = "logo" width = "120 "Height =" 120 "& gt; & Lt; / Div & gt; & Lt; / A & gt; & Lt; Div class = "change-picture-slide" style = "top: 30px;" & Gt; & Lt; Accept input = ...

javascript - array of deferred ajax requests never entering in when.apply().done() -

I have the following code to handle many AJAX requests, and wait for them to process and their results Insert when. Application : var requestsArere = []; Var url = "http: // ..."; Console.log ("url:" + url); Var req1 = $ Ajax ({type: "gET", url: url, datatype: "xml"}); Req1.done (function (resp1) {$ (resp1). Search ('interest'). (Function () {var interest_id = $ (this). Find ('id'). Text (); var interest_name = $ (This) .find ('name'). Text (); var request = $ .ajax ({type: "gET", url: "http://en.wikipedia.org/w/api.php?action= Pars & amp; format = json & amp; page = "+ interest_name +" and redirects and promotion = text ", datatype:" jsonp "}) Requested password (;)); $ when. , Request more) .done (function () {console.log (arguments); //; recomputations in the same order from `arguments` var responses = arguments;})}} ; Why does not it ever enter $. When.apply ,...

Kendo UI Editor appears empty -

I have a codeo UI editor using the code, but this problem also appears when I have a demo section Copy and paste from simplicity. The only difference I have. Incorrect () added The problem is that the text does not appear in the field, nor can I edit the field when the page loads. I have come to know that when inspecting the color of text is displayed: no one , I do not believe that this is a problem or not. @ (HTML.Kendo (.) EditorFor (model => model body) .name ("body"). Html property (new {style = "width: 740px; Height: 440px "}) .value (@ttt; text> gt; html html5 (" encoded (wrong). Incorrect ()) how to debug or decide Any thoughts in this? / P> This problem is used by the Condo function Trying to not be available in earlier versions of jQuery. At least this problem Or to resolve to upgrade your project.

javascript - js Model Animation Using three.js r68 -

As stated in the title, I can not find the animation to work. I am pretty sure that I Something is missing because it works, but not. I will create an animation object in the player. With character JS this.init = function () (in this var k.mesh.material.materials) {this.mesh.material.materials [k]. Skinning = true;} this.animation = new three.Animation (this.mesh, this.mesh.geometry.animations [0] .name); This.animation.play (); } I use this in the update function: this.animation.update (0.017); And when I see the console logs: Unkit type error: the 'length' property of the undefined can not be read So it seems that in three. AnimationHandler, the datashearr is undefined, so I think if I can define it somehow, then the problem will be solved. Except I do not know how, or even why, has not been defined. Any help? You are only passing the name of the animation, not the entire data object Use it instead: this.animation = new three.Animation (this....

ios - cellForRowAtIndexPath not being called - using tag to identify TableView -

I have seen many people who talk about the same thing but their answers to their questions are not my answers. 1) I have created a visual footage with an empty view controller. In that, I pulled a new table view (style plane) with a single-style solo prototype cell. 2) I am trying to learn about changing the behavior of tableviews dynamically, so I have an unstable array called section row, which will be the number of lines per section. At the moment, a single section with multiple rows will be an achievement :) 3) In my visual controller. I have set up delegates @interface ViewController: UIViewController & lt; UITableViewDataSource, UITableViewDelegate & gt; @end I have control in the view-controller yellow board from the tableview, it has been pulled - and the data source and representative outlet has been set. 4) In my view controller. , I have defined some global variables @interface ViewController () {NSMutableArray * sectionRows; UITableView * myTabl...

python - String manipulation (replace and reverse) using a function -

All! Newbie here! I was trying to create a function that would allow me to change the four letters (ATCG). To be more concise, I wanted to replace 'A' with 'G' and 'C' with 'G', and vice versa. I still have the code, but I am getting an error (expected translation of at least 1 argument, got 0). #! / Usr / bin / python from sys import argv os.path import from import () is: str.replace ("at"); Str.replace ("C", "G"); Str.replace ("G", "C"); Str.replace ("T", "A"); Script, from_file, to_file = argv print "copy from% s to% s"% (from_file, to_file) in_file = open (from_file) indata = in_file.read () newdata = indata.translate () out_file = open (to_file, W ') out_file.write (newdata [:: - 1]) out_file.close () in_file.close () I tried to argue the translation function ( def Translation (Str) ) and call it with str ( newdata = indata.translate (str) ), but they...

ios - Get all nearby places using MapKit -

I'm searching nearby places using Apple's map kit. The request category is a string though, and in my case @ "restaurant" comments show that there is no return. How can I display all locations without filtering the category? In other words all the places are available thanks in advance. MKLocalSearchRequest * Requests = [[MKLocalSearchRequest alloc] init]; Request.naturalLanguageQuery = @ "Restaurant";

javascript - php header does not work with ajax. Issue with reloading with js -

Then I'm using an AGI request to post in the php script. At some point, PHP script redirects. It should be at least well, but it does all kinds of weird stuff header ('location: index.php'); It receives all the contents in index.php and puts it in the callback area. So I decided to reload the page using javascript. And this is what I got $ Post ('booking.php', {firstname: $ ('# firstname'). Val () .trum (), last name: $ ('#lastname') .val (). Trim ()}, function (data ) {Window.location = 'index.php'; $ ('Notification-Booking'). Html (Data);}); The problem is giving some feedback. I reload the page when the feedback is displayed for a moment. Which burden can be burdened if the user has not finished reading the lesson so I would like to do the following. Reload the page, Display the response Eat donuts and be happy. I do not have the exact order at that number 3 under the control, help on number 1 Y...

Installing Jenkins on a webserver -

I searched the entire internet for this. I have a website that is run by a hosting company to install Jenkins For all the tutorials, I believe that I am running my own Linux machine and can follow different commands. Is there a way that I can install Jenkins on this website only using FTP? Thank you. Perhaps if your hosting company offers tomakat (or other servlet container / J2SE server as a jabos So you can install Jenkins as a webapp inside the tomcom, usually it involves involving jenkins.war files in just $ TOMCAT_BASE / webapps. If your hosting company does not provide Tomcat and does not allow you to run Java from a shell, AFAIK you can not run Jenkins.

javascript - when to stop scrolling -

Look at the demo below. Scroll it by clicking on next but I want to hide the next edge when reaching the end. How do I know when to scroll JS $ ("span") click (function () {$ ('span '' ($ '' Div.demo ") [0] .scrollWidth + '-' + $ (" div.demo ") .scrollLeft () + '-' + $ ("Div.demo p") [0] .scrollWidth); $ ("div.demo"). Value ({scrollLeft: $ ("div.demo") .scrollLeft () + 800});}); ps: 800 demo is easily After completion, a function $ ('selector'). Animate ({true: "100px",}, 500, function () {$ ('selector'). / It will run after the animation is completed});

java - How can I pause a loop until I get a users input? -

I am starting in Java and I am making a fun project for myself to learn more about Java, I I am planning to randomize the video from a predetermined list and display it to the user. I am having trouble stopping the loop once you write in the type of video that you want to see to hide the program automatically, but I want you to ask You want to see a second video before it starts again. Even I have so far: import java.util.Scanner; Import java.util.Random; Public class youtube generator {public static zero main (string [] args) {int randomstring = 0; For (;;) {System.out.println ("\ n --------- Youtube Video Generator 0.001 Beta ------------------ \ n "); System.out.println ("\ n ********* Disclaimer: Warning - This program can direct you to violent, harassing content, and / or obscene language, and only for a mature person It is. *** ****** \ n \ n "); Scanner scan = new scanner (System.in); System.out.println ("What kind of video do you want to see fr...

haskell - Loading a text file of values into a list of lists -

I have a text file (data.txt) that looks like this: - This is an MAP where (-) I can go places, (#) is a wall, and (@) ---------------------- -------------------------------------------------- -------------------------------------------------- --------------------------------------------- My goal is I I want to load a list in the list so that I can index it through (line, call) and then cross it (unless there is no better way Land, I'm new here). Using Readfile but it gives me all in one shot, trying to use it. There are lines to break it but it still will not work ... I was hoping to do something like this: myMap = [[, - , #, -, -], [-, #, -, @], [-, -, -, -, -]] till I make a mistake By that time, I will have to work like my mama !! 0 !! To get 0 [-] which is the CRAC on the cell (0,0) on my map (and further). Then with it I can pass it in a function and determine what I can do (clearly do not go to any wall) and as long as I have my (@), etc. Try to find a way...

php - Will this approach protect my database from being modified? -

All I care about is not being changed in my database I do not have any login or stuff, so let me Keeping the matter in mind, I do not care about bypass, I do not want people to send commands like DROP through this simple HTML form. Is this correct? After reading this another related topic, I have come here. $ stmt = $ dbh- & gt; Prepare ("INSERT Requested Request (IP, Messaging, Names, Oraas, Paintree, Song) VALUES (: IP ,: Message:: Name,: oras,: pentru ,: song)"); $ Stmt- & gt; Beyond Parm (': IP', $ IP); $ Stmt- & gt; Beyond Parm (': Messe', $ message); $ Stmt- & gt; Beyond Parm (': name', $ name); $ Stmt- & gt; Bundhparam (': Yara', $ yara); $ Stmt- & gt; Beyond Parm (': Paintru', $ Painter); $ Stmt- & gt; Beyond Parm (': Song', $ Melody); $ Stmt- & gt; Executed (); Will it fix any potential exploitation? Can any white hat confirm that it is safe? You may be asking if you are ...