Posts

Showing posts from September, 2014

android - Can a paid app be tested in alpha/beta for free -

I have thought a lot of questions about this, and all of them start saying that if the app is a Paid app, alpha And beta testers also have to pay to test it. However, I hope that I have read 99% of the answers I have read since 2013 when alpha / beta testing came out for the first time, probably Google listened to people and Since then it changed it. If not, what are my options? I see them as follows I think I can return people to my wallets, but this means that Google will keep 30%, so I have 30% for each of mine App Cost Tester I can email them all the APK, but in this way I will have to update it everywhere, instead the play store is for me. Besides, if I have too many testers Can be disturbed by sending many emails (unless I do a big BCC course) Can I somehow set two versions of the app in the store, which paid a free and one Goes free only Allow testers Nskrn, and then press to remove the app, and the final payment to Apike add. I think 3. is the best option, but mo...

Using .htaccess to pass multiple parameters -

I am using my .htaccess to cross both ID and one mode. Currently passing an id of it and looks like this:! RewriteBase / RewriteCond% {RewriteEngine on current REQUEST_FILENAME} -f RewriteCond% {REQUEST_FILENAME} -d RewriteCond% {REQUEST_URI} * / ([0-9] +) /? $ Rewrite rules * /listing.php?id=%1 [L, QSA] The link looks like this: http: //www.drlistings Com / villas / stunning_180_degree_ocean_view / 4074 / I want to add a mode like: http://www.drlistings.com/villas/ Stunning_180_degree_ocean_view / 4074 / inline to pass listing.php id =% 1 & amp ;? Mode =% 2 I have examined other posted queries but compared to what I'm doing compared to what I'm doing. The second parameter does not have to be numeric, even if it is numerical to make it easier, then I am fine with that, it may be before or after the ID parameter, I'm flexible, like: http://www.drlistings.com/villas/stunning_180_degree_ocean_view/inline/4074/ Or if it was numeric then it ...

java - How does Karel run without "main" method? -

I was thinking like a run in the program because it does not use the main () method instead of it () method Used: Import Stanford. Karel Karel; Public Class Collect Notes Kerala Kerala (Public zeroless) (move ()); }} How does this work? The actual main method is elsewhere, for example, when Java program executes, The runner is actually executing the main method in class. Your run method is called that runner code.

javascript - Add Item to Table - HTML/CSS/JS -

Suppose i have a dropdown (or congbox) and there is a list of things once i get one thing from the list , Then it will automatically add to the table. How would I do that? Is it possible only HTML / JS? Dropdown: & lt; Select class = "Cambodia form-control" style = "display: none;" & Gt; & Lt; Option value = "" selected = "selected" & gt; Point guard & lt; / Option & gt; & Lt; Option value = "cp3" & gt; Chris Paul (93) & lt; / Options & gt; & Lt; / Select & gt; Table: & lt; Table class = "table" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Status & lt; / Th & gt; & Lt; Th & gt; First name & lt; / Th & gt; & Lt; Th & gt; Last name & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; TD & gt; 1 & lt; / TD...

android - Root vs system signature -

What is the difference between personal and root access versus system signatures in the private sector? Trouble uninstalling a system app with system signature, and I have read that it can be done through a root. Can anyone be clearly understood that what is the difference? Finally, I want to know how to uninstall the program, a system app.

SAS SQL to aggregate rows -

I'm new to SAS and I create a column with data from each group of IDs with a large dataset I am working. ID Name 1 AAA 1 AAA 1 BBB 2 CCC 2 CCC 2 AAA 3 DDD 3 BBB 3 AAA 4 BBB 4: A simplified version of my dataset looks like this And the result I am looking for is: ID name NEW_ID 1 AAA AAA, BBB1 AAA AAA, BBB 1 BBB AAA, BBB 2 CCC CCC, AAA 2 CCC CCC, AAA 2 AAA CCC, AAA 3 DDD DDD, BBB, AAA 3 BBB DDD, BBB AAA 3 AAA DDD, BBB, AAA 4 BBB BBB Many of your help Remember Hanna is that ID can not always come in the form of a number. Thank you. I can not think in a way to do this in the same data phase. But 2 is very easy to collect values ​​first and then add them back to the main data set. Data first; Is set; By ID; Format $ COL $ 2000; Maintaining Cal; If ^ last.id then col = col || Patti (name) || ""; Do more; Col = Patti (Colonel) || Strip (name); Output; End; Run; Want data; Merge is the first; By ID; Run;

javascript - How to prevent CSS3 transform from make elements unclickable -

Please refer to my live code: CSS3 translation : Rotates () makes the elements invisible until rotations == 0 I am using accelorameter to move elements on an axis Unfortunately, these elements are not untouched when their rotation (0,0,0) does not occur. How can I fix this, so that all the elements are clickable all the time? & lt; Div ng-app = "morningharwoodApp" ng-controller = "MainCtrl" & gt; & Lt; Div class = "wrap" & gt; & Lt; Div class = "cube" & gt; & Lt; Div class = "icon-wrapper" & gt; In sections & lt; Div class = "symbol" ng-repeat = "(key, val)" ng-style = "perspective" ng-click = "toggle.menu ()" & gt; & Lt; P & gt; X: {{acceleration.x}} & lt; / P & gt; & Lt; P & gt; Y: {{acceleration.y}} & lt; / P & gt; & Lt; P & gt; Z: {{acceleration.z}} & lt; / P & gt; & Lt; / Div & g...

apache - Is mod_perl dead? -

It has been for a long time since it has actually been updated and it seems that its development was stopped in Apache 2.2 Are there. I am waiting for it to be available for Apache 2.4 for a very long time, but so far it has not happened. I am trying to find an answer to an update (for 2014) its current state but I think there are very old posts in forums and mailing lists. Mod_perl has actually been rock solid for me and my applications and I have complained that I can not go to Apache 2.4. Continues to work with Pearl 5.20, which is the most recent Pearl version at this moment. Therefore, I hope someone reads this question on an informed or even stack overflow here: Is mod_paral development dead? By July 26, 2014, I believe 'mod_perl is dead Mod_perl The source code can be found at: The source code shows the modification log associated with Apache 2.4. In addition, the archives of the Mod_perl user mailing list can be found here: The activity ...

csh - Is there a way to use an alias as a part of a command? -

i.e। मेरे पास .cshrc फ़ाइल alias foo = / users / name / documents में एक उपनाम है और मुझे ऐसा कुछ करना है mv foobar.txt foo लेकिन यह सिर्फ foobar.txt को foo के नाम से बदलता है। यह भी कोशिश की एमवी footbar.txt $ foo कोई फायदा नहीं हुआ। मुझे लगता है कि मैं स्क्रिप्ट के बजाय एक पथ और फ़ाइल नाम और उपनाम लेने के लिए एक स्क्रिप्ट बना सकता हूं, लेकिन क्या ऐसा करने का एक और तरीका है?

netrw - vim: switch to unlisted buffer dir -

In netrw version 134, I can use the following pattern of work: open dir X Select A: b # back to dir x Select file b: b # back to dir x Select file c ... etc ... but in netw version 14 9 Does not work. buffer? Thank you! Steve You see a lot like a bug (Netroll There are many) or at least one inspection. The correct way to get back to the Natal window is: : Rex

html - Header: Logo to the left, nav to the right. (Vertical aligned to the center) -

Image
I'm having trouble aligning my navigation to the right of the header. While searching on the web, I think the problem is because I am aligning objects vertically in the center and the float option is not working with it. Any clues? See: HTML: & lt; Header & gt; & Lt; Div class = "logowrapper" style = "padding-left: 1em;" & Gt; & Lt; Div class = "logo" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Nav> & Lt; A href = "#" & gt; Some links & lt; / A & gt; & Lt; / Neo & gt; & Lt; / Header & gt; CSS: header {background color: #EEAAA; Height: 80px; Margins: 10px; } .logowrapper {display: table-cell; Height: 80px; Vertical-row: middle; Text align: center; } .logo {display: inline-block; Background-image: url ("http://placehold.it/250x40"); Width: 250px; Height: 40px; } NAV {true: 0 px; Exhibit: Table-Cell; Vertical-row: middle; } NAV A {colo...

scala - One-off object pooling with Actor provider -

I have an object with a heavy initial cost and memory footprint. I the initial time is human-worthable but the production frequency is low is. HeavyClass {heavyInit ()} My solution is to create a provider actor, an object created prematurely and provide immediate request. After that the providers will run with creating further objects. class HeavyClassProvider extends the actor {var hc: option [HeavyClass] = some (new heavy class ()) override DRF = {case "request" = & gt; Sender ! {HC getOrElse new HeavyClass ()} self! "RESPAWN" HC = Any case "RESPAWN" if (HC == none) => HC = Some (new HeavyClass ())}} and a consumer: Intangible class Heavy classcoreman extends actor {import context.dispatcher Import akka.pattern .cack import scale Concentrations _ Import unit built-in value timeout = timeout (5, sec) var Provider: Actor RHCH: Option [HeavyClass] = No override DRF Received = {Case "Start" = & gt; (The provider asks ...

ios - Serious error when trying to draw a circle on screen -

इस सवाल का पहले से ही एक उत्तर है: 1 जवाब मैं आकर्षित करने की कोशिश कर रहा हूँ एक चक्र है, इसलिए मुझे निम्नलिखित विधि मिलती है: - (शून्य) ड्रॉरेक्ट: (सीजीआरटीएक्ट) रीक्स्ट {सीजीआरएक्ट प्रमुखक्रिकल = सीजीआरएक्टइसेट (रीक्ट, 2, 2) ;; UIBezierPath * aPath = [UIBezierPath bezierPathWithOvalInRect: अग्रणीक्रैक]; CGContextRef aRef = UIGraphicsGetCurrentContext (); CGContextTranslateCTM (एआरएफएफ, 20, 20); CGContextSetRGBFillColor (एआरएफएफ़, 0.1, 0.05, 0.9, 1); CGContextSetRGBStrokeColor (aRef, 0, 0, 0, 1); CGContextRestoreGState (आरिफ); } फिर मैं इसे viewDidLoad से कहता हूं: सीआरजीआरएआर myRect = CGRectMake (0, 0, 60, 60); [आत्म drawRect: myRect]; लेकिन कुछ भी नहीं खींचा गया है और कंसोल में निम्न संदेश दिखाता है: CGContextSetRGBFillColor: अमान्य संदर्भ 0x0। यह एक गंभीर त्रुटि है यह एप्लिकेशन, या एक लाइब्रेरी जो इसका उपयोग करता है, एक अमान्य संदर्भ का उपयोग कर रहा है और जिससे सिस्टम स्थिरता और विश्वसनीयता के समग्र स्तर में गिरावट है। यह नोटिस एक शिष्टाचार है: कृपया इ...

how do I create an infinite loop in JavaScript -

इस सवाल का पहले से ही एक उत्तर है: 9 जवाब मैं एक अनंत बनाना चाहता हूँ जावास्क्रिप्ट में लूप इसे प्राप्त करने के कुछ तरीके क्या हैं: जैसे के लिए (var i = 0; i & lt; इन्फ़िनिटी; i ++) {} सिर के सभी भागों को छोड़कर, पाश भी अनंत बन सकता है: के लिए (;;) {}

Regex pattern for a number within a number -

Can someone think of a better way of writing it? It works, but it's a bit ugly. The input data looks like this: 125100001 The first two numbers are years, the numbers are the next two weeks, and the last 5 are serials. I want to make sure that the number of weeks is not more than 52 for one option. Originally to take advantage of just $ error area :) Here it is: ^ \ d \ d (0 [0-9] | 1 [0] -9]] | 2 [0-9] | 3 [0-9] | 4 [0-9] | 5 [0-2]) {1} \ d {5} $ For only part of the week: [0-4] \ d | 5 [0- 2] then the entire regex will be:

php - When I added google anayltics to my site, it now won't load images -

Here is the code for images I am using Joomla and Zoomi - I have problems Are already defining items previously, and wondering what is there to do with it? & lt ;? Includes php ("settings.php"); Mysql_connect ($ loginURL, $ username, $ password); @ Mascil_sact_db ($ database) or die ("- 9"); $ CardUUID = $ _GET ['id']; $ Sql ​​= "Choose * Uaid = '{$ cardUUID}'; $ result = mysql_query (" $ sql ") by card; if (! $ Result) {echo 'Result query can not be run:' Mysql_error ($; sql; out; second;} $ line = mysql_fetch_assoc ($ result); header ("content-type: image / jpg"); if (base64_decode ($ line ['cardis']) == incorrect ) $ Line ['cardimage']; Else bezo 64_decond echo ($ line ['cardimage']);? & Gt; And here is the GA code I added & lt; script & gt; (function (I, S, O, G, R, A, A ) {I ['GoogleAnalyticsObject'] = R; I [R] = I [R] | function () {(I [R]. C = I [r]...

animation - How to bring animated effects in background in Android app? -

I'm trying to add animation when loading with my app (not sure it would be a proper word) The first screen. I am developing a holiday app and have already set up an image (a static image of sand) in the form of a background. I hope sand image background and the impact of the waves that hit the coast. How to go about achieving this? I want wave in this picture in motion -> Place each frame in a different image After the drawing folder, use an XML to define the frames (e.g., animated.exml) Android: ADI = "@ + id / selected" Android: oneshot = "false "& Gt; & Lt; Item android: drawable = "@ drawable / 0" Android: period = "50" /> & Lt; Item android: drawable = "@ drawable / 1" Android: period = "50" /> & Lt; Item android: drawable = "@ drawable / 2" Android: duration = "50" /> & Lt; Item android: drawable = "@ drawable / 3" android: duration = "50...

java - Printing BigIntegers to text files -

I'm calculating a very large factorial in Java. However, it takes a lot of time when I try to write them in text files. I am using this method to print numbers. PrintWriter author = new print publisher (index + "! .txt", "UTF-8"); Writer.println (number); Writer.close (); 10,000 prints! The text file is 194 ms, the file size is 35.7 kb. 100,000 Printing! 24,314 ms in a text file, the file size is 456.6 kb. I think the speed of this file size is very slow. How can I print BigIntegers in a few seconds with millions of digits? Are there fast methods or any way I can customize it? When you see BigInteger is caused by ToString (), the file is not written in writing. Conversion of Leving Bigentege in the sequence of decimal (or any other basis) is a cumbersome process, including the Luong division of Luong-ing [] by base and resulting string in a circumstantial way, Even using stringbirders. (I have just checked: 1.8 has used a better algorithm, b...

javascript - How can I filter data returned from jQuery? -

jQuery कोड: $ (दस्तावेज़) .ready (Function () {$ ('# s-results')। लोड ('get_report1.php')। शो (); $ ('# search-btn')। क्लिक करें (फ़ंक्शन () {showValues ​​();}) ; $ (फ़ंक्शन () {$ ('प्रपत्र')। बाइंड ('सबमिट', फ़ंक्शन) () दिखावाएं (); वापसी लौटा;});}); फ़ंक्शन शोवाल () {$ .post ('get_report1.php ', {Name: form.name.value}, फ़ंक्शन (परिणाम) {$ (' # s- परिणाम ')। Html (परिणाम)। दिखाएं ();});}}); HTML: & lt; फ़ॉर्म का नाम = "फ़ॉर्म" & gt; & Lt; div & gt; नाम दर्ज करें & lt; / div & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" नाम = "नाम" id = "fn" / & gt; & Lt; इनपुट प्रकार = "सबमिट करें" मान = "खोज" आईडी = "खोज-बीटीएन" / & gt; & Lt; div & gt; & Lt; input type = "text" id = "se2" नाम = "खोज 22" & gt; & Lt; / div & gt; & Lt; / प्रपत्र & gt; & Lt; div id = ...

why does JavaScript mess up 0.1 + 0.2 when C++ doesn't? -

इस सवाल का पहले से ही एक उत्तर है: 30 उत्तरों मैं समझता हूं कि आईईईई डबल के लिए प्रतिनिधित्व (या कोई भी बाइनरी प्रस्तुति) कोई बीमित की सीमा के साथ 0.1 का प्रतिनिधित्व नहीं कर सकता। मेरे पास इसके दो प्रश्न हैं मन: जब सी ++ भी डबल के लिए समान मानक का उपयोग करता है तो यह गड़बड़ क्यों नहीं करता 0.1 + 0.2 जैसा जावास्क्रिप्ट करता है? जावास्क्रिप्ट को console.log (0.1) सही ढंग से प्रिंट करता है, जब उसे सही ढंग से स्मृति में नहीं रखा जा सकता है? अस्थायी बिंदु सुन्न के रूपांतरण के लिए कम से कम तीन उचित विकल्प हैं तार करने के लिए: सटीक मान प्रिंट करें। यह एक स्पष्ट पसंद की तरह लगता है, लेकिन downsides है परिमित फ़्लोटिंग बिंदु संख्या का सही दशमलव मान हमेशा मौजूद है, लेकिन सैकड़ों महत्वपूर्ण अंक हो सकते हैं, जिनमें से अधिकांश का कोई व्यावहारिक उपयोग नहीं है। Java.util.BigDecimal के toString ऐसा करता है। फ़्लोटिंग प्वाइंट नंबर को विशिष्ट रूप से पहचानने के लिए पर्याप्त अंक प्रिंट करें। उदाहरण के लिए, जावा में डबल या फ्लोट के डिफ़ॉल्ट रूपांतरण के लिए बनाया ...

java - How can i resolve UnsupportedClassVersionError? -

I have installed both jdk 7 and jdk8 in my system. But my Java program is compiling version in 1.8 and executes in 1.7. So it is responding to UnsupportedClassVersionError. How can I overcome this problem ... Run your code with jdk8 or jdk1 Compile with .7.

c# - Find the index in a single array of a Cartesian coordinate -

I'm trying to remove something that should still be very simple, for some reason I could not find the answer . I have been trying sources for the past few hours. Take a 10 to 10 cartridge coordinate system with 10 grams of 10 grid. In each coordinate a float is given (setting the height) and it has been read in the float [] row from the first line (0,0) (10,0) second row (0,1) (10, 1). Now I want to write a certain method, to bring the height of a certain Cartesian coordinate: (10, 0). This float float will be on index 9 in [1] and will be located on (0, 1) 10 index. I have tried many endeavors, but every time (0, 0) is a stubborn mule, here are some sources. Z = (Y * 10 + X) works for 0, 0 but not really for 10, because it index 9 z = ((Y * 10 + x) - 1) Works for 10, 0, but not good for 0, 0 I tried something more complicated, but now I do not remember them since my notepad Can I write them without having stopped saving? I would be happy if someone could keep me in the r...

maven - 406 Not Acceptable Spring Rest WS -

I am writing a spring balance to get feedback as XML. Below are my classes and palm file. I I get an HTTP 406 error in execution as a service: http: // localhost: 8080 / SpringRestExample / However, I am returning the JSON response when executing http: // localhost: 8080 / SpringRestExample / Rest / emp / dummy.json please give advice pom.xml & lt; Dependency & gt; & Lt; Group & gt; Org.codehaus.jackson & lt; / Group & gt; & Lt; ArtifactId & gt; Jackson-Map Maker-ASL ​​& lt; / ArtifactId> & Lt; Version & gt; $ {Jackson.version} & lt; / Edition & gt; & Lt; / Dependencies & gt; Employee Controller: @RequestMapping (value = "/ rest / AMP / dummy", method = RequestMethod.GET, produces = {" App / XML "}) Public @ResponseBody Employee Received Dummy EmpireXML () {logger.info (" GetDummyEmployee Start "); Employee employee = new employee (); Emp.setId (9999); Emp.setName (...

Libraries for high performance, low footprint graph queries? -

I am very close to implementing myself, but before I still want to know that this wheel is already Has been invented only: What do I need is a library that allows me to represent a DAG (guided graphic graphic graphic) and which is allowed to interrogate directly or indirectly connected nodes with very high performance Will give I have compared two approaches so far. This graph will be around 10-20 million edges of millions of nodes in size. Most nodes will have only one or two edges but some thousand nodes can have 10000 edges or more. There will be a case of use: Actually no matter what the attempt to create a graph, and once it has been created, it does not need to be updated, or the update does not happen fast However, it should be very fast to find specific indirect connections of direct connection or length 2 (an intermediate node), and be able to be able to have labels (eg weight, calculation etc.) on the edges. Hia. In addition, the memory footprint should be small and t...

premake c++ "hello world" error -

I am trying to work on a premake4 helloworld c ++, but after making the filefile with the release config Error generates config = release for creating calling (using clag on OSX 10.9.4) with Premake: ld: Internal Error: Atom was not found in the symbol (indicator ... If I add the "symbol" flag to the release flag, then everything is ok But debug symbols are definitely created. premake4.lua: {"dpb_hillow_world" configuration {"debug", "release"} project "cpp_hello_world.out" Type "console" language "c ++" files {"** .cpp"} buildup option {"-std = c" debug define {"DEBUG"} flag {{"symbol"} configuration "release" defined {"NDEBUG "} Optimize Flags" {/ code> Main.cpp: #include int main () {std: : Cout & lt; "hello world" & lt; Std :: endl; Return 0;} Any idea why it does not work in standard example? Complete ...

javascript - how to Load contact form on top of a google map? -

I want to create a contact page in mysite (joomla) So I got the map embedded code and it was added to the page as a module. Now I want to add the contact form above the map. As a background map and contact form on that background. As map load iframe I can not control this problem Can someone help me solve this problem? This is my module php page structure. & lt; Div class = "row" style = "padding: 10px;" & gt; & Lt; Div class = "row map" & gt; & Lt; Iframe scrolling = "no" .... width = "100%" height = "450" ​​frameborker = "0" style = "border: 0" & gt; & Lt; / Iframe & gt; & Lt; Div class = "col-md-6 contact form" & gt; // Contact Form should go here // This is another module; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; Did you try the form's status in this way: HTML: & lt; Div class = "line" st...

android - two dividers in navigation drawer -

My app has an Android navigation drawer. Everything works fine, but when my drawer looks, there are two split lines between them. Items are not there. My two drawer files custom_drawer_item.xml / P> & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: orientation = "horizontal" & gt; & Lt; Android: layout_height = "wrap_content" android: layout_alignParentLeft = "true" Android: orientation = "vertical" Android: layout_marginTop = "0dp" Android: background: LinearLayout Android: id = "@ + id / itemlayout" Android: layout_width = = "Android: Att / Active Backband Indicator" & gt; & Lt; LinearLayout Android: layout_width = "match_parent" android: lay...

javascript - Multiplying two variables (JS) displaying on input -

I have an exercise where I need to display objects, prices, quantity, value etc. ... multiply me Having difficulty doing the Quantity value is my code with input and options given below which I am displaying, and the script function below will be greatly appreciated! & lt; Body & gt; & Lt; Label & gt; Select item & lt; / Labels & gt; & Lt; Select onChange = "GetPrice (this)" & gt; & Lt; Options & gt; & Lt; / Options & gt; & Lt; Options & gt; Tomatoes & lt; / Options & gt; & Lt; Options & gt; Lettuce & lt; / Options & gt; & Lt; Options & gt; Potatoes & lt; / Options & gt; & Lt; Options & gt; Carrot & lt; / Options & gt; & Lt; Options & gt; Elephant & lt; / Options & gt; & Lt; / Select & gt; & Lt; Br / & gt; & Lt; Label & gt; Price & lt; / Labels & gt; & Lt; Input type = "text" id = "value"...

Seeing console progress messages in Shake -

I am using Shake, Calling wget to download the file if I I see a one-line progress bar on the command line, but when called by shake I get several lines as an example: shake shakeups $ action ( CMD "wget ​​http://hackage.haskell.org/packages/index.tar.gz" :: Action ()) I want to show the one-line progress bar Wanting . is the solution: shake shakeopopations {shellline buffering = fail} $ Action (CMD "wget ​​http://hackage.haskell.org/packages/index.tar.gz --progress = bar: force" :: action ()) Here are two things: 1) wget detects that it is not sending direct to the console (since the cmd of pipes Captures the output by using it), and closes the progress bar with wget , you get that code from - progress = bar: force Lu can. 2) Once I have done this, the progress bar is not actually displayed, because Shake starts the line buffering by default (this helps in executing commands in the least displayed output in the command ) And a progre...

python - Problam with views and template in Django - show data in template -

I have a problam in Django. I am a beautiful Django developer. I can not show my "category" data in the template here The code is: models.py Import TaggableManager category category (models.Model) from Django DB import module with taggit.members: Title = models.CharField (max_length = 40) def __unicode __ (self): return self. Title class post (Model. Model): Title = Model. Kharifild (max_length = 150) body = models.TextField () date = Model DataTimeField () Tags = TagGalemanager () Cats = Model. Myatomyfield (category) def __unicode__ (auto): Return to SevTital views.py urls.py . Models post, category urlpatterns = pattern ('blog.views', url (r '^ $', ListView.as_view (queryset = Post.objects.as). By Order ("- Date") []:], Template_name = "index.html"), url (r) '^ (? P & lt; pk & gt; \ d +) $', detailView.as_view (model = post, template_name = "post.html")), a part of url (r ^ template "po...

scala - How to overwrite NaN or Infinity result when performing arithmetic on Double? -

I am running a calculation on a group of numbers and returns some result of the results of the result NaN After checking or infinity , I came to know that the root cause is due to the arithmetic division below: object doublefin {println ("in scalable worksheet Welcome ") // // Welcome to Scala Worksheet Val D1 = 0.0 /> & gt; D1: Double = 0.0Wall D2 = 0.0 / // & gt; D2: double = 0.0 wal d = d1 / d2 // & gt; D: Double = Nine Vel I1 = 1.0 // & gt; I1: Double = 1.0 Wall i2 = 0.0 // & gt; I2: double = 0.0 wal i = i1 / i2 // & gt; I: double = infinity wall o1 = 0 // & gt; O1: Int = 0 Well O2 = 0 // & gt; O2: int = 0 well o = o1 / o2 / // & gt; Java.lang.ArithmeticException: / by zero} I think why NaN and infinity are coming back in these cases There is a math question but it is interesting that 0/0 returns a arithmetic exception while the 0.0 / 0.0 does not? I 'Using the result of these calculations to descend like...

javascript - Custom spinners input type number without js -

Image
I need to create input type = "number" with custom spinners. It should be How can I do without JS? Or need JS? You must use javascript / jquery for spinner you can use the jQuery user interface plug-in . . In the case of the plugin you need to customize it as needed, the arrows can be changed and can be moved by CSS styling. Or you can just try this: HTML: & lt; An id = "bottom" href = "#" onclick = "updated spinner (this);" & Gt; - & lt; / A & gt; & Lt; Input id = "content" value = "0" type = "text" style = "width: 30px" /> & lt; An id = "top" href = "#" onclick = "updateSpinner (this);" & Gt; + & Lt; / A & gt; CSS: A {text-decoration: none; Javascript: function updatespinner (obj) {var contentObj = document.getElementById ("content"); Var value = parseInt (contentObj.value); If (obj.id == ...

Setting android datepicker min date to specific date -

I want the user to be able to choose the start date and end date. The end date must be equal to the minimum start date For example, the user chooses August 1, 2014 as the start date. When they click on the return date field, these values ​​are passed in the form of intent extra to date-wiker_activity. In Date_picker_activity I check for these additions and currently it only sets the selected date as the date shown: if (getIntent (.) GetExtras ()! = Null) {Int year = getIntent () .getExtras () getInt ("SELECTED_YEAR") .; Int month = getIntent () GetExtras () GetInt ("SELECTED_MONTH"); Int day = getIntent () GetExtras () GetInt ("SELECTED_DAY"); Date_picker.updateDate (year, month, day); } But the user is still able to take dates before the selected start date. I tried to do something like this, if the statement: time from time = new time (); Time.set (day, month, year); Date_picker.setMinDate (time.toMillis (true) -1000); But that does not...

javascript - Creating expandable list to show rest of content -

My site has a sidebar that shows categories in this format. Category2 Category 3 Category 4 Category 5 Although I have about 50 which I need to display. Rather than pulling my sidebar away from the place rather than moving out of place, I wanted to display the top 10 and then provides a button that lets the sidebar expand to show the rest, so it shows 10 on the default, But if the button is clicked it will expand and I will be able to see all 50. I'm almost certain that this will use some jQuery, but I do not know where to start it. Here is the function that gets categories from the database. function load_categories () {global $ db; $ Query = $ db- & gt; write_query ( 'SELECT c. *, to calculate AS' TABLE_PREFIX as COUNT (n.id). 'Newscategories c LEFT JOIN'. TABLE_PREFIX. 'Anaiaitiaiaidiaiansiti (Seediaidi news, n. CID) Sisiaidi ordered by Group Count by DESC '); ($ Cat = $ db- & gt; fetch_array ($ query)) {$ categories [$ cat ['ci...

java - javafx printing a table -

Image
I am trying to print a table with the following code: public Zero print (Final node node) {printer printer = printer .get default printer (); Printjobjob job = printerzob.co.uk contact (); If (job! = Null) {Boolean success = job Print page (node); If (success) {job.endJob (); }}} and print (table); And I get: The problem now is that the output is cut into all the columns after the 4th column (the table has 8 columns but it only shows 4 columns). I want to know how can I correct this problem Thank you.

json - How to show AJAX response message in alert? -

I am sending the user name and password as a request parameter to the server in AJAX and am trying to show the response message . But are not able to show response messages. This feedback message is showing in intelligence, but when the browser is not displaying it on the screen. Please help me with any help that I need to change where I am wrong or change anything. I wrote this way - $ (document) .ready (function () {$ ("# btnCity"). Click (function () {$ .ajax ({type: " POST ", url:" http://test.xyz.com/login ", CrossDamain: True, Content Type:" Application / Jason; Characterization = UTF-8 ", Data: {User Name:" ABC ", Password: "1234"}, Data Types: "JSONP", JasonPaybackback: 'Jason Callback', Async: Incorrect, Success: Function Warning (err.message);}});})}} {Warning (res.);} } {Warning (resdata);}, error: work (result, status, mistake) {warning (result.responseText);; TL; DR: I think the pro...

c# - AreaRegistration MapRoutes for Help Docs -

I have an API that is using Web API2 and I am trying to create help docs in a region So that's like the incoming request. ..api / people.help will be the way for the controller of the people and people will see and serve HTML. After refactoring the code, I am struggling with field mapping for root mapping. Previously, I had a route like this: Public Override Blank Register Array (AreaRegistration Contact Reference) {context.MapRoute (name: "help", url: "{action} .help" Default: new {domain = "help", controller = "default"}); All methods were in the default controller and it used to be working Now, I need a separate controller for each resource (such as people, schedules etc.), but the routes to work can not be found. I appreciate the help, I'm very new to this How do I get each help request to map the controller with the same action name? No, this is something similar to: public override register Arraya (Area Registry Co...

ms access - Sum with group in report footer -

I have an MS Access 2003 report that shows all the transactions not grouped by currency. At the end of the report (in the report footer section), I want to show total of all the transactions in the report, but from the currency they are in. In SQL, I will use this query: SELECT [Currency], SUM ([zodiac]) myTable GROUP BY [currency] and I show a label for each record in the returned data. There is no way to accomplish this in MS Access. Of course, the result of any other report is above the query (not about the alias for the sum field Remember) and include it in your report footer as a sub-report (see the Design menu, the same where you take text boxes, labels, etc.).

php - Break out of foreach loop, echo, then continue the foreach? -

I have a little script which runs only one query, gets all the categories in the database, and then a Lists the top of the second. if ($ all_categories) {foreach ($ c_c = & gt; $ all $= as all_categories) {$ Sidebar. = '& Lt; A href = "index.php? Action = sort and seed = '. $ Cid.' "& Gt; '. $ Arr ['name'] '('. $ Arr ['count']. ') & Lt; / A & gt; & Lt; Br / & gt; '; }}} And {$ sidebar = 'There are no categories yet'; } Actually, I need this code to loop through the first 10 results, then echo some HTML div and then back up in the loop. I'm new though and not sure how I would have to do this. I was thinking of adding a counter but I was not sure it would be the right way. if ($ all_categories) {$ count = 1; ($ Cid = & gt; $ arr) as foreach ($ all_categories) {$ Sidebar. = '& Lt; A href = "index.php? Action = sort and cid = '. $ Cid." "& Gt; ...

node.js - Migrating from SQL Server DB to MongoDB: questions about whether to embed or to reference -

I am working on my first non-SCL design and I need some help so that the standard Ho. I had a simple relational database: User (id, username, password, email, name, facebook id, dated) Question (id, user id, Question, dated) Answer (id, question, answer, date dated) I want to convert it to the Mongos schema. I'm not sure how much I have to embed and how much references I have to give. Here are some of my thoughts: There is only one collection user, and embed everything in it: mongoose.model ('user', {userName: string , Password: string, e-mail: string, name: string, facebook id: string date credit: date question: [{question: string, date: date, answer: [{answer: string, given user: {type: Schema.Type object ID, ref: 'user'}}}}}}} There are two collections (max 10 I can limit the maximum number of numbers) mongoose.model ('user', {userName: string, password: string, email: string, name: string, facebookId: string date Credit: Date}); Mo...

android - Sprite Effect Challenge, Shadow Distortion [libgdx] -

Image
मेरे पास एक प्रेत है जो एक छाया का प्रतिनिधित्व करता है। मेरा खेल एक शीर्ष नीचे दृश्य का उपयोग करता है मुद्दा यह है कि कुछ पलों के बेड़े में खिलाड़ी और अन्य ऑब्जेक्ट्स (sprites) पर गुजरता है और मुझे छाया की जरूरत है क्योंकि यह ऊर्ध्वाधर दीवारों से गुजरती है। उदाहरण के लिए: मैंने इसे पूरा करने के लिए कई रणनीतियों पर विचार किया है, लेकिन कोई मुझे बिल्कुल नहीं समझाता है। उदाहरण के लिए: छाया को दीवार के नीचे खींचना (1) और एक" जादुई "एल्गोरिथ्म एक दूसरे से ऊपर दिखाई देता है (2)। लेकिन ललाट और पार्श्व विकृति बहुत अलग हैं: / कोई भी योगदान या विचार मेरी मदद करेंगे, धन्यवाद। (मेरी अंग्रेजी के लिए खेद है)

ubuntu - how i Get usb number port from connected device via python -

I know that the witch device wants to connect the USB port in Ubuntu with a kiss ... for example when I use Bluetooth dongle I wnat know that Bluetooth connected to witch usb port ... when I tail -f / var / log / messages The USB port number can be viewed as: 27 July 20:51:58 Smart-installer kernel: [711.363300] USB 1-1.2: new USB device miss Smartphone installer kernel: [711.363331] USB 1-1.2: new USB device strings: MFR = 0, product = 0, serial number = 0 i lsusb -t I'm getting the port but I also want the device number and -t that USB 1-1.2 Programming via Python Get me some data You can either use PyusB (application T-USB package in Ubuntu and Debian), or go through the / sys / bus / usb / devices themselves, all the information in plain text.

javascript - Target only one element with jQuery -

I have a small problem with my code, and though I can stack overflow people know how to To solve. Here's the scenario: I have to add strong inside p to another element that will have post captions. I am able to solve it, but I am having problems. Photo caption duplicates in other similarly named elements, which I do not want to do. So the post caption can be in the post, but not always, but it still has to work. HTML & lt; Div class = "post" & gt; & Lt; P & gt; Advertising for advertising did not matter either at any time; Information about Donak Penders at Morris Laurem & Lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = "post" & gt; & Lt; P & gt; Advertising for advertising did not matter either at any time; Information about Donak Penders at Morris Laurem & Lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = "post" & gt; & Lt; P & gt; Advertising for adver...

php - Server name on virtual host not working -

Please help me if I am working on Zend Framework 2 project, name of project in the Wamp / www folder Pizza I tried to work with the host host on host file, httpd.conf and httpd-vhosts.conf with this project URL: pizza.local / Instead: localhost: 8080 / pizza / Public / But some do not have ght with my configuration Note that I use Localhost Su-Am: 8080 local host. Please help me find out what I did wrong. Here are my files: httpd.conf: Include # virtual host conf / extra / httpd-vhosts.conf Httpd -vhosts.conf: & lt; VirtualHost *: 8080 & gt; ServerAdmin webmaster@localhost.com DocumentRoot "c: / wamp / www" ServerName Localhost ServerAllus www.localhost Error log "log / localhost-error.log" custom log "log / localhost-access .log" normal Host file: # For example: ## 102.54.94.97 rhino.acme.com # Source Server # 38.25.63.10 x.acme Com # x Client Host # Local Host Name resolution is handled only within DNS. # 127.0.0.1 loca...

java loop break with if statement? -

While trying to do some practice to learn Java, I used to calculate work hours and pay a decent Program written. package horulycalc; Import java.util.Arrays; Import java.util.Scanner; Public class HorulyCalc {public static zero main (string [] args) {scanner param = new scanner (System.in); String [] titles = {"developer", "designer", "data entry", "manager", "CEO"}; System.out.println ("Hello and welcome to job counters"); System.out.println ("Please enter the title of your job"); String title = param.nextLine (); While (Arrays.asList (title) .included (title)) {System.out.println ("Please enter a valid work title"); Title = param.nextLine (); If (Arrays.asList (title) is included (title)) {System.out.println ("Please enter your hours for this week:"); String count = param.nextLine (); System.out.printf ("Your salary is: $% f", hour math (hourly (title), integer. From (calculatio...

c# - Search Feature in windows phone 8 -

Good day I am developing an application that has many pages in it, rather than user To go through the stress of navigating on the required page, I would like to add a search feature in which the user types in the required page keyword without taking the user to the tension I mean the user will be given that particular page The topic of that page in the keywords of Or to exclude the title, when the user clicks on the page's title or theme, the user will now take the entire page to the full page, for example a title "win Christ" when the user will see this keyword / title / topic Searches and clicks on search, then it will bring a special page of that title How can I apply it to a Windows Phone 8 app As soon as you can Associate As soon as the user tries to search, You check whether the word searched is available in the archive or not. If so, then you just go to the appropriate page.

Object reference not set to instance of an object Unity3D c# -

यह प्लेयर स्क्रिप्ट है: सार्वजनिक वर्ग खिलाड़ी {सार्वजनिक प्रक्षेपण समर्थक; प्रो = GetComponent & lt; प्रक्षेप्य & gt; (); शून्य अपडेट () {गेम ऑब्जेक्ट जाओ = गेम ऑब्जेक्ट.फिंड ("दुश्मन"); ट्रांसफ़ॉर्म खिलाड़ी ट्रांससंसफ़ॉर्म = गो। ट्रान्सफॉर्म; वेक्टर 3 पॉसी = प्लेयर ट्रान्सफोर्म। Pro.Target = posi; // यहां त्रुटि मिलती है Instantiate (bulletprefab, स्थिति, Quaternion.identity); }} यह प्रक्षेप्य स्क्रिप्ट है: आवश्यकता: प्रक्षेप्य में लक्ष्य की अपडेटेड स्थिति प्राप्त करें, लेकिन प्रोजेक्टिबल मोशन () विधि से प्रारंभ () से कॉल किया जा रहा है और मैं उस बिंदु पर लक्ष्य वर्तमान की स्थिति चाहता हूँ जब Instantiate को प्लेयर में कहा जाता है ताकि प्रोजेक्लियर क्लास में Target_Distance की गणना की जा सके , लेकिन वेक्टर 3 से _pro.Target के असाइनमेंट की तरह लग रहा है जो एक सदिश 3 की अनुमति नहीं है। हो मैं इसे ठीक कर सकता हूं? सार्वजनिक वर्ग फेंकने वाला: मोनोबेहाविक {सार्वजनिक वेक्टर 3 लक्ष्य; सार्वजनिक गेमऑब्जेक्ट बुलेटप्रूफैब; सार्वजनिक फ्लोट फायरिंगएंगल = 4...

java - HttpURLConnection Bad Gateway: 502 error -

I have a server to get the media JPG format and MP4 format. Delivery is through the HttpURL connection as far as I understand - this is the best solution for working with http and https file transfer. This code is trying to work through http: FileInputStream fileInputStream = new FileInputStream (new file (sourceFileUri)); URL url = new URL (upload URL); Connection = (HttpURL connection) url.openConnection (); Connection.setDoInput (true); Connection.setDoOutput (true); Connection.setUseCaches (wrong); Connection.setRequestMethod ("post"); Connection.setRequestProperty ("Connection", "Keep-Elive"); Connection.setRequestProperty ("content-type", "multipart / form-data; limit =" + limit); Outputstream = new dataoutputstream (connection.getOutputStream ()); OutputStreamLitebites (Two Hippens + Boundary + Lineand); Outputstream.writebytes ("content-disposition: form-data; name = \" uploaded file \ "; filename = \"...