Posts

Showing posts from August, 2010

javascript - Start and Pause Interval onclick -

I'm trying to start an interval on ready, then stop it on click and start over again where I left off Was there. I have everything but 'resume' part can I get some help? This is my Bela: HTML: & lt; A href = "questions_create.asp? Interactive = off" class = "start" & gt; & Lt; Img src = 'icons / control_stop.png' width = '16 'height =' 16 'border =' 0 '/ /> gt; & Lt; / A & gt; & Lt; Span id = "stop" style = "cursor: indicator; display: none;" Class = "posit tutorial loop" value = "stop" & gt; & Lt; Img src = 'http: //examsoftdemo.com/Icons/control_pause.png width =' 16 'height = '16' border = '0' /> & Lt; / Span & gt; & Lt; Span id = "start" style = "cursor: indicator;" Class = "playit tutorialLoop" value = "start" & gt; & Lt; Img src = 'http: /...

R List: How to get the length from a list stored in a key-value list? -

If I store a list or vector in a key-value list, the length of the list returns from length 1 is (). & gt; I & lt; -c (0,1,2,3,4) & gt; Length (i) [1] 5> L & LT; - List (R = 2, I = I) & gt; L ["Eye"] $ i [1] 0 1 2 3 4 & gt; Length (L ["I"]) [1] 1 Why? How to organize a list or vector in a key-value list? length (L $ I) what you want ... & gt; I & lt; -c (0,1,2,3,4) & gt; I & lt; -c (0,1,2,3,4) & gt; L & LT; - List (R = 2, I = I) & gt; L [ii] $ r [1] 2 $ i [1] 0 1 2 3 4 $ & lt; NA & gt; Tap $ & lt; NA & gt; NULL & gt; L $ i [1] 0 1 2 3 4 & gt; Length (L $ i) [1] 5

Uploaded Video not played in browser in php -

I am creating a website. Where I want the user to upload videos there and play whenever they want. I am capable of uploading videos but when I want to play that or any other video (other video) which does not play in the browser, I know where I am going, but the problem I can not find My code here for the upload video: & lt; Form action = "video.php" method = "post" encrypt = "multipart / form-data" & gt; & Lt; Period & gt; Add video here & lt; / Span & gt; & Lt; P & gt; & Lt; Label & gt; Give a caption for the video & lt; / Label & gt; & Lt; Input type = "text" name = "caption" title = "caption" & gt; & Lt; / P & gt; & Lt; Input type = "file" name = "file" id = "files" value = "upload photo" style = "border: 0" & gt; & Lt; Input type = "submit" name = "upload" id = "...

Angularjs-ui-router: How to activate default views on app start up? -

I currently have 2 states in my app. Each app has multiple views. I want the state to activate the app when it starts Ho. Right now, when the app starts, I only get the link. Then I have to click any link to activate any state. How can I rule by default opened? conflicts of states var app = angular Modules ('dategenie', ['ui .router', 'ui.bootstrap', 'geographic location', 'ngidale', 'infinite scroll']); App.config (['$ stateProvider', '$ urlRouterProvider', function ($ stateProvider, $ urlRouterProvider) {// for any mismatched url, redirect on / urlRouterProvider profile. Otherwise ('/'); // now set Up states $ stateProvider.state ('profile', {views: {mainModule: {url: '/ profile', templateUrl: 'partials / profile.html', Controller: 'ProfileCtrl'}, rightPane module: {templateUrl: Partials / location.html ', Controller:' LocationCtrl '}}}) .state (' profile...

javascript - EnyoJS TopBottom Arranger -

I am working on an enyo application where on one page I have a top bottle arranger, which is swipe on the next panel Should be changed on . The problem is facing, the panels are not taking full screen height and when I am on a particular panel, I can see some segments of the previous panel. I'm getting rid of it and a panel capturing the entire screen. Here is a BELD example. (make sure to type "top bottom arrangeer" in the dropdown on the top left corner) The code is like this Enyo.kind ({name: "enyo.sample.MyGridArranger", kind: "GridArranger", colHeight: "150", colWidth: "150"}); Enyo.kind ({name: "enyo.sample.PanelsSample", kind: "FittableRows", classes: "enyo-fit", component: [{kind: "fittable columns", any breed: true, classes: " Oyeix-toolbar oynex toggle-inline ", component: [{type:" scroller ", thumb: wrong, fit: right, touch: right, vertical:" ...

bash - opening a shell and interact with using Java -

I had already asked the question, but with no replies, but this problem is similar and again with something Other questions have been found No proper answer Can anyone help me with this I am trying to open a shell from Java and interact with it (read the command and write the output of the shell) Changing the commands directory , A C program etc. Shcit not be provided by the user or compile. I also tried and use the / bin / bash -c method and have the following as well. process p = new process builder ("extram"). Start (); Process P = New process builder ("/ bin / bash") Start (); Thank you and I hope the problem is clear. itemprop = "text"> The example of a practical solution will be almost like the bottom process ; RT = Runtime.GetRight (); Try {Process = rt.exec (new string [] {"bash", "-c", "ls -al / home /"}}; log.Warn ("message to display"); BufferedReader input = New BufferedReader (ne...

How to get dynamic values from html page with LoadRunner? -

I'm using web_reg_save_param to get dynamic values, such as & gt; Lt; Input type = "hidden" name = "lieutenant" value = "afu" /> then I can use it: web_reg_save_param ("HiddenValue1", "LB / IC = & lt; input type = \" hidden \ "name = \" lieutenant \ "Value = \", "rb / ic = \" /> "," ORD = 1 "," search = body ", last); However, if the Input & gt; is like this: & lt; Input type = "hidden" name = "lt" read-only / & gt; Value is set dynamically by Ajax script How can I get the price? & lt; Input & gt; . There is no "value" property for correlation to server values. As your value is generated by native JavaScript, you should either recreate the algorithm in the language of your script, use the loader's features to generate value, or execute the Javascript function, which you can Returns the ...

javascript - java applet requestFocus() method error when called in js -

मुझे कॉल करने में त्रुटि है requestFocus () JS में विधि। अनकॉट टाइप एरर: ऑब्जेक्ट # & lt; HTMLAppletElement & gt; & lt; head & gt; टैग "> फ़ंक्शन ऑनलोड () {var विशेषता = {'id': 'क्लाइंट', 'संग्रह': 'client.jar', 'code': 'org.kuzy.client.ui.Applet.class', 'चौड़ाई': '100%', 'ऊंचाई': '100%'}; Var पैरामीटर = {'scriptable': 'true'}; परिनियोजन जाव.रनआपलेल्ट (गुण, पैरामीटर); Window.onfocus = फ़ंक्शन () {document.getElementById ("क्लाइंट")। RequestFocus (); }; } एक अजीब विशेषता है, जब मैं क्रोम में डीबग में कोड चलाता हूं, तो सबकुछ ठीक काम करता है मैं आपकी सलाह के लिए आशा करता हूं। मुझे यकीन नहीं है, लेकिन संभवतः जब आप विधि अनुरोध फोकस ) एप्लेट पहले से लोड नहीं है शायद जब आप डीबग करना चाहते हैं तो आप जेएस निष्पादन रोक रहे हैं और आप एप्लेट को लोड करने के लिए पर्याप्त समय दे रहे हैं। तो शायद आपको कॉलबैक या कुछ तंत्र की जरूरत है ताकि यह पता चले क...

JSON parsing in python gives error -

I am trying to parse a JSON file that looks something like the following: {"result": [{"id": "63768E9b-1D 66-486A-BCDD-D391EFBE 94", "DT": "2013-08-03 T 13 : 01: 26.901J "," DT_U ":" 2013-08-03T 13: 01: 26.901Z "," Oz ":" NPPHI 7S "}, {" ID ":" 63768E9B-1D 66-486A-BCDD-D391EAFBE94 "," DT ":" 2013-08-03T16: 17: 33.280S "," DT_U ":" 2013-08-03T16: 17: 33.280 J "," Oz ":" 79J5J6U2R "}, {" id ":" F8B1B 9FB-7BCD -47 DF-89BD-241440BB 6270 "," DT ":" 2013-08- 06T00: 23: 43.562Z "," obj ":" Xf75BFtx4O "," Gender ": 2," Language ":" N " }]} There are too many entries in this file Now when I try to load this file in Python by using JSON parser, / P> returns a traceback (most recent call): the file "e: \ test Py", ...

java - Missing return statement making triangle program -

सार्वजनिक स्ट्रिंग डिस्प्लेप्रकार (इंट साइड 1, इंट साइड 2, इंट साइड 3) {if ((side1 + side2 & gt; side3 )) अगर ((साइड 1 == साइड 2) & amp; (साइड 2 == साइड 3)) / बताओ कि इक्वललटेल {रिटर्न ("इक्वलरल त्रिकोण।"); } और अगर ((साइड 1 == साइड 2) & amp; (साइड 2! = साइड 3) || (साइड 1 == साइड 3) & amp; (साइड 3! = साइड 1)) बताता है कि समद्विबाहु {वापसी ("समद्विबाहु त्रिभुज।"); } और अगर ((साइड 1! = साइड 2) & amp; (साइड 2! = साइड 3)) बताता है कि क्या स्केलेन {वापसी ("स्कैलीन त्रिभुज।"); }} // अनुपलब्ध रिटर्न स्टेटमेंट त्रुटि मैं एक प्रोग्राम बना रहा हूँ जो त्रिकोण को निर्धारित करता है यह वह जगह है जहां मुझे मेरी त्रुटि मिलती है जब मैं इसे संकलित करता हूं। यह अंत में गायब रिटर्न स्टेटमेंट देता है यह कैसे ठीक होगा? इसका कारण यह है कि, आपकी सभी परिस्थितियां निष्पादित करने में विफल रही हैं ?? संभावित समाधान: आपको वहां एक और ब्लॉक प्रदान करना होगा। जब आप एक और ब्लॉक प्रदान करते हैं, तो यह निश्चित है कि हमेशा एक मौका है अगर में या else ...

javascript - Why does my jquery script not work? -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैंने एक स्क्रिप्ट लिखा, जो एक विधि से डेटा (जेसन प्रकार में) प्राप्त करें और इसे एक बंद बटन के साथ डिवि टैग में दिखाएं, जब मैं क्लोज बटन पर क्लिक करता हूं यह काम नहीं है! मेरी स्क्रिप्ट है: $ (document) .ready (function () {$ ("# go") क्लिक करें (फ़ंक्शन () {setInterval (function () {$ .ajax ({ प्रकार: "पोस्ट", url: "WebForm2.aspx / GetMyBooks", डेटा: '{}', contentType: "application / json; charset = utf-8", डेटा प्रकार: "json", सफलता: फ़ंक्शन (प्रतिक्रिया) { (Var i = 0; i & lt; response.d.length; i ++) {$ ("# पेजीग्रीड")। ऐप ("& lt; div class = 'modal' & gt; & lt; div style = 'float: left; '& Gt; & lt; span class =' ​​close '& gt; एक्स & lt; / span & gt; & lt; / div & gt; "+ response.d [i] .OOOO_NAME +" & lt; br / & gt; "+ प्रतिसाद डी [i] BOOK_DESC + "& lt...

expect - how to discard the buffer if expected string is not found -

I need to generate a script which generates many outputs which also slows the regex output of the output The buffer fills up quickly when I use the large match_max value. I want to see the output for a particular string. If the string is not present, then I would still like to leave the output. I tried to use default matches, globes, and negative regags to capture unwanted strings, but this could not work. / P> How can this be done with hope? 'seems' more testing is required to do this work):

php - form action =%s .What it mean? %s=server? -

When I'm going through a code, I see the code & Lt; Form name = "register form" = "% s" method = "post" & gt; .... & lt; / Form & gt; What is% s? I do not know your reference, but to assign a string to % s Example: $ myString = 'foo'; $ Output = sprintoff ('my string is% s!', $ MyString); $ Output echo; // My string is Fu! In your case, it is possible that this is just some template and form action URL assigned to PHP.

iphone - Java HashMap to iOS -

I'm a clean Java / C # developer but now after the creation of my original Android app, I will be working with IOS (Objectivegka) I am trying to expand my knowledge. Now I am on the point that there is little difference between iOS and Android. I'm trying to change my Java Hashim to one in iOS, but I found out there is no equivalent for the iOS version. My Java Hashim for my Android app looks like this: Maps & lt; String, string & gt; Now I want this for my iOS app. But I can not see the solution I have done some research and found that there is something like NSDition or NSMutableDictionary that can help me. After a little more effort, I came to know that an NSDictionary is irreversible, but with the help of the NSMutableDictionary data structure, you can dynamically add entries and delete as needed, so I think I will use the NSMUtable AccessEdder for my Hashmap Can be used to dynamically add / remove content in the use of. After more research on the In...

javascript - Address of the page depending on the value -

I have a serious problem. I want to add two fields to this form "male" and "female" and give them different addresses I want to assign, for example "woman" for http: //female.com and for men "htp: //male.com" So if you choose "Category 1" and check the field "feminine" you will be redirected to the "htp: //female.com/Category1" page and if you check the "Male" and "Category 1" field You will be redirected to the page "htp: //male.com/Category1" function open () {var url = document.redirect.selection.value document.location.href = Url} & lt; Form name = "redirect" & gt; & Lt; Select Name = "Selection" & gt; & Lt; Option value = "/ category1" & gt; Category 1 & lt; / Options & gt; & Lt; Option value = "/ category2" & gt; Category 2 & lt; / Options & gt; & Lt; / Select & gt; & Lt; Inpu...

php - Get the visible URL -

I'm wondering how can I get the URL (visible in the bar) I have tried to google it and a lot of answers have to be written: $ url = "http: //". $ _ Server ['HTTP_HOST']. $ _ Server ['REQUEST_URI']; But it will get the path to the file in which you are coming. I would like to get the visible URL just like: www.something.com/index.php? Page = teams and then only get the URL you can see, and no included URL. When I do this, then something similar happens: www.something.com/search.php Because the IM is included in the file search URL printing .php. I hope that you understand my question, even if it is a little worse, I find it very difficult to explain my problem. For URL: $ _ SERVER ['REQUEST_URI'] After? In Url: $ _ server ['QUERY_STRING']

scala - Testing MultipartForm with multiple file inputs. -

I am using Playframework 2.1 with Scala. I want to test my function, I have input files in the part of the view. I Image and Music I am completely able to test only the music file, but when it comes to testing both of them, please java.lang.IndexOutOfBoundsException Getting: 1. I think the problem is defining multipartformfilesdata. I tried to make a list of filesystems Val data = new multipartform data (map ("checkbox" -> gt; cec ("test-1"), "track mark" -> Seek "test-1"), " ("Test-1"), "Track Artist" - & gt; Sik ("Test-1"), "Trebbital" -> Seek ("Test-1"), "TrackLabel" -> Seac ("Test-1"), "Relieastist" - & gt; Seak ("Test-1"), "ReleaseGener" -> Seac ("Test-1"), "RelationsShack" - " Seq ("test-1"), "releaseelabel" - & gt; cec ("test-1"), "selection"...

android - outgoing call answered in PhoneStateListener -

I'm tracking an outgoing call in Android, but I should know when the phone call was answered. I have a android.intent.action.NEW_OUTGOING_CALL receiver that gives me a user-dialed phone number. I also use call code PhoneStateListener , so I have the code mentioned above, code CALL_STATE_RINGRING , CALL_STATE_OFFHOOK and CALL_STATE_IDLE To identify an incoming call: Get the first I CALL_STATE_RINGING only if the call was answered - I found CALL_STATE_OFFHOOK CALL_STATE_IDLE . But outgoing calls always get me CALL_STATE_OFFHOOK , then CALL_STATE_IDLE - no matter if the call has been answered or not ... So how can I know that / when the outgoing call was answered? Thanks OK, I did something sort of solution: When I get CALL_STATE_IDLE - I repeatedly schedule a timer for 500 ms, and Android. the provider. Check out the call. Calls. CONTENT_URI I previous call is done with outgoing phone number, and once I found it - I can get the time. It norm...

c++ - How can I install Qt onto another computer but in different directories? -

I have used the QT's online download to install it on my desktop but now I want it on my laptop too. I am unsure and how can I do without downloading again. My internet connection is nonsense and I do not even know that the laptop will allow me to consider that it has been issued by my school and not all downloads work. Please help! I tried copying all the files on the laptop but now all the settings are weird because the computer I am using is not in the C drive (or allows access). I have seen how to store the paths of an established version of QT. It looks like you need to change the following: Qt5.2.1 / 5.2.1 / [compiler] / mkspecs / modules / Qt_lib_ [module] .pri Change the files from each of these, the line beginning with QT. [Module]. Rpath .

ios - UIView transitionFromView change view heigh -

I am using this code to change between 2 UIView : UIViewAnimationOptions animation type = UIViewAnimationOptionTransitionFlipFromLeft; [UIView transitionFromView: self.playlistTableView toView: self.playerView Duration: 0.5 Option: Animation Type Complete: ^ (BOOL Finish) {[self.containerViewSubviewToBack: self.upperView]; [Self.containerViewSubviewToBack: self.playerView]; Self.isPlaylistVisible =! Self.isplaylayVisible; IsControlsHidden = NO; }]; And I saw a strange behavior when I lost the flap self.playerView 20px and after a second it raised back in normal frame size. I try to change animation type to UIViewAnimationOptionLayoutSubviews and now when I make changes in the middle of the scene, this behavior does not occur is. Any ideas what can happen? Please try this code. [self.upperView setHidden: yes]; [Self. Plain view sethead: no]; [UIView startup permissions: zero reference: NULL]; [UIView Set Animation Duration: 1.0]; [UIView Set AnimationConclusio...

database - how do i download (.sqlite) file from the url and save it in isolated storage in windows phone 8 apps -

I have recently tried to make database related Windows Phone 8 applications because I want dynamically update content and when I also update it, even in my application., so that I decided to keep all my data in the DB (.sqlite) file and uploaded it to the server Note that I have not created a database in local and I have a SQL file I will try to download from the server. From that Sklit file I will get the database table. I need it 1) How to download (.sqlt) server via server URL (www.example.com/folder/sample.sqlite) 2) How to save that sqlite file in local or separate storage I have searched and have received some sampling from online, but it will create the database all in local . So please give me some solution how to download .cqlite file directly from URL local., OK now I understand the problem is that the file does not include the link, you must first use GetResponse () and then retrieve the response. You have to expand your to work WebClient (again)...

php - I'm trying session expire when compter goes aftersleep mode -

I am trying to end the session when the computer goes to sleep mode after 1min. How do I implement it? & lt ;? Include php ('config.php'); Session_start (); $ Myusername = $ _ session ['myusername']; $ Ses_sql = mysql_query ( "Select nocname from nocusers where nocname = '$ myusername' '); $ row = mysql_fetch_array ($ ses_sql); $ Login_session = $ row [' nocname ']; if (! Isset ($ login_session)) { header ( "location: login.php");}? & Gt; the first you'll need your address change Taimtaim 1 min = 60 such seconds ini_set ( 'session.gc_maxlifetime', 60); While loading, you can now see the session value each time. If the activity is not within 1 minute session, then it will end and you will Logout to the & lt ;? Php include ( 'config.php'); session_start (for); if (isset ($ _ SESSION [ 'myusername'])) {$ myusername = $ _ sESSION [ 'myusername']; $ Ses_sql = mysql_quer...

jquery - How to hide the content inside body in html5? -

In my page I have very long content, besides my menu header, it is transparent with text. Therefore, if I scroll the page, then the entire contents should be hidden behind the menu headers. The content should not be seen from this header. My menu header should be transparent. How to do it? // code. Navbar-fixed-top {background-color: yellow; Height: 60px; Text-align: center; Font-size: 40px; Opacity: 0.7; }. Content {margin-top: 65px; } What do you want to do The content is to make the container fixed when it is fixed, the element can not be scrolled (because it is fixed on the window). You can then define offset using CSS top and below attributes CSS will become something like this: .content {/ ** full offset from top * / head: 65px; / ** ensures that the content element can not be self-scrolling (thus it can not be behind the header) * / status: fixed; / ** offset * / bottom from the bottom of the screen: 0; / ** Show a scrollbar when there is too much con...

c++ - QML view wont update when adding a new item to a QAbstractListModel based model -

I have learned how to tie a model from a QML view to QAbstractListModel. But the next thing I'm tired is not working. If a new item is added to the model, the QML view will not be updated. Why is it like this? DataObject.h class data objects {public: data object (Consteststrst and first name, constaste string and last name): first (first Name), last (last name) {} firstestustustring; Final Caststring; }; Simple listload H class SimpleListModel: public QAbstractListModel {Q_OBJECT enum / * class * / roles {FIRST_NAME = Qt:: UserRole, LAST_NAME}; Public: SimpleListDodel (QObject * Parent = 0); QVariant data (const QModelIndex and index, int role) const; Q_INVOKABLE int rowCount (const QModelIndex and parent = QModelIndex ()) const; QHash & lt; Int, QByteArray & gt; Role name () cons; Zero addName (QString firstName, QString lastName); Private: Q_DISABLE_COPY (Simple LISTODODEL); QList & LT; DataObject * & gt; M_items; }; SimpleListModeel.cpp Si...

jquery - fancybox - custom button -

I am trying to add a custom button to the button assistant of FancyBox 2. The new button looks okay, but I can not find anyone with click behavior ... on binding click does nothing but what is the secret to add your own button with this? To click here, I'm just trying to see if it works or not. Nothing happens. Include // screenshot $ (". Fancybox-screenshots"). Fancybox (function: 'none', next effect: 'none', helper: {title: {type: 'inside'}, button: {}}, after display: function () {$ ('# fancybox- Button '). ("Click", "#btnTest", function (event) {event.preventDefault (); warning (' test ');})}} // afterShow}); The output of this button assistant is: & lt; Div id = "fancybox-buttons" class = "top" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; One class = "BTN Pratt" href = "javascript:;" Title = "Previous" & gt; & L...

How to check if I run JavaScript code in a browser or not in a browser? -

How to check if I run this code in a browser or not in the browser? I have something like this var x = 5; If (/ * inside a browser * /) document.write (x); Else / * without browser * / console.log (x); = 'Undefined') (/ => unchangeable) / I I am inside the environment; And {// am elsewhere (server?)}

How can I restore vim's classic behavior whereupon it saves the last edit mark? -

I `. I'm too accustomed to type when I open a file to start editing where I left the last left. The default was on Win 7.3 which came with my new OS X 10.9 MacBook, this behavior does not work ... It says that E20: Icon is not set . Any ideas how capable is it? When I type: : set viminfo? I think viminfo is set up properly: viminfo = '100, & lt; [Update: My Windows file was changed to owned by root for some reason. Use Chmod to change the owner back to solve the problem himself.] I Ubuntu Machine set viminfo? The original output of was exactly like you. viminfo = '100, & lt; 50, s10, h By entering the following line in my .vimrc , I `. Using the set will be able to go to the pre-cursor location Viminfo = '10, \ "100 ,: 20,%, n ~ / .viminfo Update : OP has already resolved its problem, Which was related to permission on .imimfo , but I am leaving this reply, if it helps those future people who have no special issue. ...

c++ - QNetworkAccessManager `get` method crashes on restart -

I am currently adding a functionality to my app which will allow it to be restarted. This is the main look int main (int argc, char * argv []) {const int RESTART_CODE = 1000; Int return_from_event_loop_code; QPointer & LT; QApplication & gt; Application; QPointer & LT; Foo & gt; main window; Delete the {if (main_window) main_window; Delete the app; App = new QApplication (argc, argv); Main_window = new foo (); Main_window-> Show (); App- & gt; SetActiveWindow (main_window); Return_from_event_loop_code = app- & gt; Exec (); } While (return_from_event_loop_code == RESTART_CODE); Return return_from_event_loop_code; } is now running fine for the first time, but when the application has been restarted using the RestartApp method below QNetworkAccessManager Get the method to return a lock error. This is my code that looks like void foo :: MethodA () {.... .... KUR URL ("some url"); QNetworkRequest request; Request.setUrl (url); NetworkM...

sql - Custom aggregate functions -

How does one collect a custom in SQL Server 2012? I am trying to get an average total. Something like this: ; With CT (select the top 50 percent of the tablet by the Vel Dell) select the top 1 CT you should just use the built-in function, percentile_cont () or percentil_disc () (see), how you define the median for any number of records Depends on what it does. I think the following is what you want: Choose percentile_cont (0.5) within the group (sorted by the wall) in the form of TBL in the middle; This is very easy to define your own function.

jquery - ajax request not working in django? -

यहां मेरा जेएस है जो Jquery blockUI प्लग-इन का उपयोग करता है: $ (दस्तावेज़) .ajaxStop ($ unblockUI।); $ ('# Submit-id-submit') क्लिक करें (फ़ंक्शन () {$ .blockUI ({संदेश: '& lt; h1 & gt; & lt; img src = "{% static' css / spinner.gif '%}" / & Gt; बस एक क्षण ... & lt; / h1 & gt; '}); $। एजेक्स ({url: "/ खोज / परीक्षण /", कैश:' गलत ', डेटा प्रकार:' टेक्स्ट ', प्रकार: "GET" सफलता: फ़ंक्शन (डेटा) {चेतावनी (डेटा);}, त्रुटि: फ़ंक्शन (डेटा) {चेतावनी ('त्रुटि;' + ईवल (त्रुटि));}});}); मेरे विचार: def test_ajax (अनुरोध): time.sleep (20) प्रिंट "test_ajax" रिटर्न HttpResponse ("नरक दुनिया") यूआरएल (आर "खोज / परीक्षा / $", test_ajax, name = "dummy"), सबसे पहले, मुझे पता है कि अजाक्स कॉल लौटा रही त्रुटि है (क्योंकि मुझे त्रुटि से चेतावनी मिली है, लेकिन यह त्रुटि संदेश नहीं दिखाता है) दूसरे, मेरा दृश्य test_ajax नहीं कहा जाता है, क्योंकि मुझे...

php - How to add a class alias in Laravel -

I added it to the compiler with Larvell 4 and I am able to use this API: $ MailChimp = new \ Drewm \ MailChimp (); How can I create an example of MailChimp () without such a route: $ MailChimp = new MailChimp (); You manually config / app.php : 'aliases' = & gt; Array (// Other Larval nickname 'Melchipper' => Druym's Mailpap); You can now use MailChimp anywhere in the lहेरwail app.

python - How do I only parse the timestamp from a string -

I am trying to parse only the timestamp from a specific row into a log file via a python. The line from this file is: March 29 06:12:42 10.11.100.22 [info.events] [Warning] 10.11.100.22: Event, 1234 How do I get a timestamp from this only? I'm using this code on the minute, which is the word 'warning' in it's line from the file, and then gets the timestamp. def is_Warning (self, line): if line.find ("warning") & gt; = 0: ts = time.strptime (line, "% b% d% h:% M:% S") print "========= ===========% s "% S When I run this I have a 'ValueError: unchanged data: 10.11.100.22 [info.events] [warning] 10.11.100.22: event, 1234' itemprop = "text"> use regex import again ... def is_warning (auto, line): line.find ("warning") & gt; = 0:. Date = re.match (r "[azza-z] {3} \ d {1,2} \ d {2}: \ d {2}: \ d {2}", line) .group () Ts = time.strptime (date, "% b% d% h:% m:% s...

javascript - Locally Store Variables js -

When I write a code, I do this for my own entertainment I am not uploading to a server Or I do not have my own website. I have just written a code that is quite a long time (average) and was just thinking that in any way I used cookies or other methods to store information on a server locally Can store one or two variables without useFor example: // On the first run, declare variable var rise = 0; // Do something with it when the page opens open set ('increase ++;', 10); // And then when I close the browser browser, then store the value in any way. OnClose (locally store ('keyname', increase)); So when I refresh the page or come back on any other day, the old value will be plugged back and it will continue from where I left off. .. Thnx! If you are working under Windows, then you html file . These are basically web pages that run with access to the application level and can do some amazing things. How do I read it and local files?

c# - Extension method to check if an object is sub class of T -

I am trying to write an extension method which is a sub class of an object t. This has not been accepted by Visual Studio, but it has not been accepted. Public Static Bull eSilff & Lt; T & G; (This object is OBJ) {Return (type (oBJ). ISBNs (typef (t)); } [Test ()] Public Zero IschildOfTest () {var dog = new dog (); Var isnimal = dog.IsChildOf & lt; Animals & gt; (); Assert.That (isAnimal); } Any ideas how can I write it? You can just use but note That is, is as it is like IsSubclassOf . See Jep's fantastic comment for details and I also have an example. On the one side note, I do not think Java allows equivalent instanceof in such a general case for some reason, but it's OK in C # .: Public Static Bull Eshilpf & Lt; T & gt; (This object obg) {return is oz t; } Then it makes this so insignificant that readers are more confused to use an extension method than is if you used it directly Your test then appears: [test ()]...

opengl - LWJGL - Texture Only Shows Solid Color -

किसी कारण से, जब मैं एलडब्ल्यूजेजीएल का इस्तेमाल करते हुए बनावट को प्रस्तुत करने की कोशिश करता हूं, तो बनावट केवल एक ठोस रंग के रूप में प्रस्तुत करता है। मुझे नहीं लगता है कि यह टेक्सचर लोडिंग (मैं स्लिम यूटिल लाइब्रेरी का उपयोग कर रहा हूँ) के साथ एक समस्या है क्योंकि उस रंग का रंग छवि में प्रमुख रंग लगता है। मॉडल वर्ग: सार्वजनिक वर्ग मॉडल {निजी फ्लोटबफर के कोने, यूवीवल्यूज; निजी इंट वर्टेक्सिड, यूवीआईडी; निजी इंट वर्टेक्स आट्रीब, यूवेट्रिब; निजी बनावट टेक्स; निजी बाइटबफर टेक्सडाटा; निजी इंडस्ट्रीज़ textureID; निजी इंडस्ट्रीज़ बनावट स्थान; निजी मैट्रिक्स 4 एफ मॉडल मैट्रिक्स; निजी फ्लोटबफर मॉडल बफर; निजी इंट मॉडल मैट्रिक्स लोकेशन; सार्वजनिक मॉडल (फ्लोट [] वर्ट्स, फ्लोट [] यूवी, इंट मॉडल स्थान, स्ट्रिंग टेक्सपाथ, इंट टेक्स लोकेशन) {कोने = बनायें बफर (वर्ट्स); शीर्ष एट्रिब = 0; वर्टेक्सिड = बनानेवाइबो (कोर्टेस, वर्टेक्सऍट्रिब, 3); Tex = textureUtils.loadTexturePNG (texPath); TexData = createBuffer (tex); टेक्सचरआईडी = बाइंडटैक्टक्शंसडेटा (टेक्क्स, टेक्सडाटा); TextureLocation = te...

Python Implementations of Packing Algorithm -

I am working for an application, I need something like the packing algorithm applied in Python. The basic idea is that I have objects of different sizes that I need to fit in the n cans, where the number of cans is limited and both the objects and the bins Size is definitely fixed. Items / cans can be either 1D or 2D, interested in seeing both. (I think 3D objects probably need more than I need.) I know that there is a variety of this problem algorithm, decreasing the fit in such a Yekaterinburg And the first fit is to subtract, but I was hoping there might be an implementation in Python (or PHP / C ++ / Java, actually I'm not that pickup). any idea? "" "Split a list in sublists whose amount is one Using the first reduction subtraction algorithm is not more than a maximum. For a simple explanation of the method see http://www.ams.org/new-in-math/cover/bins1.html. "" "Category Bin ( Item): "container" for items that have a runn...

python - With pyparsing, how do you parse a quoted string that ends with a backslash -

I am trying to use the following conditions to parse the string cited: The quoted string can contain an internal quote. I want to use backslash to avoid internal quotes. The quoted string may end with a backslash. I am struggling to define a successful parser. Also, I wonder if the regular expressions used by pipersing for this type of quoted strings are correct (see my alternate regular expression below). Am I using the wrong (most likely) piping or there is a bug in peppersing? Here is a script that shows the problem ( Note: do not ignore this script; please focus instead of the update below. ): Importing as PP Import Importing PP # as a single-quoted string: # - Internal quote bid # - A backslash as the last character before the final quote. Txt = r "'ab' \ cd \ '" Parsing with pipercing # does not work as expected: only takes the first 3 characters Parser = pp.QuotedString (quoteChar = "'", escChar = '\\', EscQuote = ...

javascript - how to add this class using .append() -

मेरे पास निम्न HTML कोड है: & lt; nav id = "मुख्य नेविगेशन "& gt; & Lt; ul class = "cf" & gt; & Lt; li वर्ग = "सक्रिय-लिंक" & gt; & Lt; a href = "/" & gt; होम & lt; / a & gt; & Lt; / li & gt; & Lt; / ul & gt; & Lt; / नव & gt; & lt; / ul & gt; टैग: & lt; li class = "" "& gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" src = "https://app.ecwid.com/script.js?4549118" & gt; & lt; / स्क्रिप्ट & gt; & Lt; स्क्रिप्ट टाइप = "टेक्स्ट / जावास्क्रिप्ट" & gt; xMinicart ("शैली =", "लेआउट = मिनी"); & Lt; / स्क्रिप्ट & gt; & Lt; / li & gt; हालांकि, ऐसा करने के लिए, मुझे jquery के ऐप () का उपयोग करना होगा लेकिन मुझे स्क्रिप्ट टाइप = "टेक्स्ट / जावास्क्रिप्ट" , src = "https://app.ecwid.com/script.js?4549118" को जोड़ने का सही तरीका नहीं...

linear algebra - Solve multivariate symbolic equation (equation for hyperplane) in MATLAB and then sym2poly? -

So I'm working on a 5-D problem, from which I try to solve this on a hyperplane equation I am in Space I have tried to do this by: sys g g1 g2 x1 x2 x3 x4 x5 g_1 = -log (det (sig1_new) ^ (1/2)) - (1 / 2) * ([x1; x2; x3; x4; x5] -u1 ')' * inv (sig1_new) * ([x1; x2; x3; x4; x5] -u1 ') + log (p1); G_2 = -log (det (sig2_new) ^ (1/2) - (1/2) * ([x1; x2; x3; x4; x5] -u2 ')' * inv (sig2_new) * ([x1; X2, x3, x4, x5] -u2 ') + log (p2); G = g_1-g_2 plane = solution (g_1-g_2, x5) This fixes the system, but I'm not sure how to do anything relevant with the result because I changed Can not do back in a polynomial, because there is more than one symbolic variable I'm not sure, maybe I am doing my problem wrong? This is not what you want, but you can change the matlabFunction Can use 4 input, x1 , x2 , x3 , x4 with an anonymous function : planeFunc = matlabFunction (plane)

javascript - Html table row not appending to specified table -

I am trying to add json string to an HTML table. I object data is correct but this table is not attached to me GetSongs (id) {$ .ajax ({type: "go", url: "@ Url.Action (" GetSongs ",). "Play"), "data: {playlistId: id}, success: work (data) for {json = data; obj = JSON.parse (json); (var i = 0; i & lt; data.length; I ++) {$ ('# song-table'). Endend ('& lt; tr & gt;' + htmlEncode (obj [i]. Song URL) '' ')}} }}); } HTML table: & lt; Div id = "player-playlist" & gt; & Lt; Table id = "song-table" style = "width: 420px" & gt; & Lt; TR & gt; & Lt; Th & gt; Song & lt; / Th & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Http: //www.youtube.com/v/CFF0mV24WCY< / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Div & gt; delete htmlEncode () because it is not defin...

python - Django querying for objects with ManyToManyFields -

यहाँ स्थिति है: वर्ग पार्टी: # मेजबान मेजबान मेजबान = ManyToManyField ( "उपयोगकर्ता") मेरे पास एक उपयोगकर्ता u है। मैं उन सभी दलों के लिए एक क्वेरी बनाना चाहता हूं, जो वे होस्ट कर रहे हैं मैं ऐसा कैसे करूँ? पार्टी.बॉग्ज। फ़िलटर (मेजबान_इन = [यू]) पार्टी.ओबैजेस। फ़िलटर (होस्ट__ कंटीन्स = यू) न तो कैसे इस बारे में u.party_set सभी ()

c# - Unity autowiring: to use or not to use? -

It seems that the new unity version has added support for autowiring. How many of you are familiar with it and I recommend using it or not? I think that its use limits my control over the DI, especially in relation to unit tests, am I thinking wrong? "post-text" itemprop = "lesson"> I'm assuming that this question is about auto-registration , because Unity has self-wiring for years There is a system. As I wrote my article a couple of years ago, I have become a little more radical in my attitude towards Di Containers only. The order of my choice is now: In that article, I describe the benefits of using Di Containers and the trade-off. Manually write (poor man's DI) code may look like a lot of trouble, but gives you, as well as easier to understand than DI container. Use auto registration (AK Connection on Configuration) When you lose compile-time feedback, the mechanism can actually drag your code to more of the stability, because when As...

excel vba - compile error called subscript out of Range -

I have many columns, please provide me a range, please help me, I am adding columns to my database aWidth = WorksheetFunction.CountA (Range ("A1: FA1")) 'Finds the width of the table - If you have more columns than that, then simply expand the category AHeight = WorksheetFunction.CountA (range ("A1: A65536") - 1 'height of the table, reduces area names - If you have more lines than it, then just limit Expand = 0 'will be used in the entire macro as counter count_2 = 0' will be used during the macro as a counter count_3 = 0 'will be used in the entire macro as a counter ---- --------------------------------------------------- ----------------------- - 'Table row to population' -------------------- --------------------------------------------------- -------- Redeem array_field (avid) 'This value will come in values ​​that will go to the total upload for count = avid Count = set count + 1 "in the count to be used in the array...

clojure - Why do Haskell inferred types in return type polymorphism lead to runtime errors? -

Because of this I want to use Haskell because this gives me more information about my program at compiled time , By which I believe that this is the sound. In addition, it will appear that Haskell is the optimum language in which to reach, (unlike the closure protocol - which can only be transmitted on the first argument). When I find a Haskell polymorphic return value function such as read : Read :: (read one) => String - & gt; A with the following program: addFive :: int - & gt; Int addFive x = x + 5 Main :: IO () Main = Print (Adfive (read "11") putStrLn (read "11") I'm getting: Runtime error ... program: prelog. Read: no parse So I get a runtime error in a language with a better type of system. (add-five [x] (+ 5 x) defln (println (add-five (read string), with the equivalent code in the closure "11"))) (printline (reading-string "11")) gives: 16 11 My question Why do the change in type of...

c - Segmentation fault while doing malloc for a struct pointer -

I am trying to write the original linked list code. I have two functions to add data to the beginning of the list and the end of the list. The process of adding data at the beginning is all the time. I am always experiencing a segmentation fault in the insert_end function, after malloc after the structure has to reach temp1 pointers I am getting an error while trying out. But this is the exact thing that I am also doing in the insert_first function, but works every time. I tried googling it and tried it in the forums, no answer. Please help. This link is my exact problem .. but I do not understand the solution completely I have an error on this block specifically P> structure node * temp1, * trav; Templ = (straight node *) Molok (Akarf (node) ();) Trav = (structure node *) Molok (Saikof (structure node)); Data = input, the line ********** temp1- & gt if (! Temp1 = null) {// ****************** division mistake ; } #include & lt; Stdio.h & gt; #to ...

python - Pandas: Replacing column values in dataframe -

I am trying to change values ​​in a column of dataframe column ('female') only in 'female' and I have tried the following: w ['female'] ['female'] = '1' [woman]] [ 'Male'] = '' 0 '' but get exact copies of the previous results. I would ideally like to get some output which looks like the lower loop element. / P> if w ['female'] == 'female': w ['female'] = '1'; Else: w ['female'] = '0'; I have seen through the gotchas documentation () but it is not able to understand why nothing happens. Any help would be appreciated. If I think right, then you want something like this: w ['female'] = w ['female']. Map ({'feminine': 1, 'male': 0}) (Here I change numbers in numbers instead of stars. You can convert "1 " and " 0 " , if you really want, but I'm not sure why you want to do this.) Your code...

css - Static header and footer with full length menu navigation -

I've really tried everything that I can think I've tried dozens of coding samples of stack and tutorial sites . I can not do any work to do this work, which I do, and I am trying to understand it. I do not get along with CSS. Here's what I'm trying to do: Static header (always on screen.) Footer that is always the bottom of the page (With content scrolling, but if there is not enough content then it will appear at the bottom of the screen. Left menu with background, which goes all the way down the footer. I am having trouble going out of the background. This is 100% guardian, relative It is a common problem for me to be able to get the perfection and this code is now working with the exception of the background. + I honestly just want to make an image of the background and repeat it. Here is the code: / P> & lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 transitional // n" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- Transitiona...