Posts

Showing posts from March, 2011

json - Python - global variable is not defined (but it is) -

Then I am working on this file which converts CSV to JSON, however I get this error message I can not but understand that indentation seems right, so why have I lost it to go with it. The code is below: Traceback (the most recent call last): file "/ home / uwp / widgets / contentFreshness / freshmap Py ", line 308, & lt; Module & gt; In the file "/home/uwp/widgets/contentFreshness/freshmap.py", line 247, in the main () file "/home/uwp/widgets/contentFreshness/freshmap.py", line 303, main mySite.writeJSONFile (option) WriteJSONFile outputFile.write ('' + str (dateOfCrawl) + '' ') NameError: global name' dateOfCrawl 'is not defined code class site: dateOfCrawl = 0; Def __init __ (self, csvFilePath): self.pageList = [] # Page id self.pageData list ordered = {} page person dictionaries, = {} unique title of self-indexed on the # page page self.titleDict # dictionary. BuildPageData (csvFilePath) self.homePa...

c# - How to assign concret DbSet to Dbset<Interface> -

मुझे नहीं पता कि कैसे एक कंक्रीट DbSet को DbSet & lt; इंटरफ़ेस & gt; यह मेरी GoogleToken वर्ग है जो IProviderToken लागू करता है: सार्वजनिक वर्ग GoogleToken: IProviderToken {[Key] Public Guid Id {get; सेट; } [आवश्यक] सार्वजनिक गाइड उपयोगकर्ता आईडी {get; सेट; } [मैक्सलेेंथ (500)] सार्वजनिक स्ट्रिंग टोकन {प्राप्त; सेट; }} और ड्रॉपबॉक्सटोकन के लिए भी यही है: सार्वजनिक वर्ग ड्रॉपबॉक्सटोकन: आईपीओवरटोकन {[कुंजी] सार्वजनिक गाइड आईडी {प्राप्त; सेट; } [आवश्यक] सार्वजनिक गाइड उपयोगकर्ता आईडी {get; सेट; } [मैक्सलेेंथ (500)] सार्वजनिक स्ट्रिंग टोकन {प्राप्त; सेट; }} फिर, कैसे DbSet & lt; GoogleToken & gt; या DbSet & lt; DropboxToken & gt; को DbSet & lt; IProviderToken & gt; निम्न कोड में है? सार्वजनिक एएसआईएनसीके टास्क & lt; bool & gt; AddExternalTokenAynync (आईपीओवरट टोकन प्रदाता टॉक करें) {DbSet & lt; IProviderToken & gt; प्रदाताटेकेंस = नल; स्विच (प्रदाता टूक। गेटटाइप ()। ToString ()) {"Google" नाम: provider...

udp - P2P application developement -

I want to develop a P2P gaming application. What is the fastest and effective way to implement NAT traversal and peer discovery I have read about STUN and Turn Server but what are the open source parts available and how can I use them? 1. Do those STUN servers work on 3G networks? 2. Does the UDP Hole Penching work on 3G networks? If you have video games, you probably want a central server, in which all Game data are included and allow users to be a customer. You know, like puzzles and dragons, where you have a username and password and sign in on a server. The implementation of the Google "Stun Client" and "ICE Protocol" open source are plenty STUN fails on mobile network because mobile The symmetrical, massive NAT network of Why mobile broadband can not be bypassed by the Net? To set up a connection for this data, you have to send a packet to the port on which they are and send them a packet in a port which you are doing Are there. If you ...

java - Google Analytics v4 can't see live hits -

I just started using GAV4. I have read and read carefully and I have set up all necessary permissions and have put my GetTracker code inside a class that lives in an application class which serves all my app pieces. The data that needs global access to. Here's the code: public static enum TrackerName {APP_TRACKER, // tracker is used only in this app GLOBAL_TRACKER, // Used by all apps of a company Tracker made Example: Roll-Up Tracking ECOMMERCE_TRACKER, // Tracker used by all ecommerce transactions from a company } Private Static Hashmop & lt; TrackerName, Tracker & gt; MTrackers = new hashmap & lt; TrackerName, Tracker & gt; (); Synchronize Static Public Tracker Milltrecker (App App) {If (! Matracker contentKey (trackername.pptmtr)) {GoogleAnalytics Analytics = GoogleAnalytics.getInstance (thisApp); GoogleAnalytics.getInstance (thisApp) .getLogger () setLogLevel (LogLevel.VERBOSE). Tracker T = analytics.newtracker (thisApp.getResources (). GetString (R....

report - Pentaho designer hide label depending on the page -

I am using report designer 3.8 and there is a need to place a label field and number field on each page page header I will have another field in the page header, I think you can show or hide the entire page header, but how do you make a personalized element? Regarding, I have another element that I want to leave on the last page, where I want to hide something and show others whether there is a page [page] value or an existing one Is there anything to determine the page and maximum page count? Cheers You mistyped the "visible" property to hide an element Can change on If you want it to be dynamic, for example just hide on page 1, you can use your payjammer function and [pageNumber] & gt; 1 >

c# - WPF Windows Navigation -

Image
I am planning to create an image structure of Windows Wpf applications. When I 'class builder 'Select, on the right I want to load the Class Creator.xaml and when I select' text replacer ', I want to load TextReplace.xaml in the right hand. How can I navigate through the above methods? & lt; Grid & gt; & Lt; Dockpanel Last Childfill = "True" & gt; & Lt; List box horizontal alignment = "left" name = "device menu" width = "100" & gt; & Lt; ListBoxItem Content = "Class Creator" /> & Lt; ListBoxItem Material = "Text Ressplaner" /> & Lt; / ListBox & gt; & Lt; Border borderbrush = "silver" border color = "1" name = "border1" /> & Lt; / DockPanel & gt; & Lt; / Grid & gt; To navigate content as the host Use. & lt; Grid & gt; & Lt; Dockpanel Last Childfill = "True" & gt; ...

emails from gmail but response is gmail.readonly -

I get emails using email from https://www.googleapis.com/auth/gmail Am trying .readonly /? Access_token = 'fdrt654vfdgfe6545 But in the feedback I'm getting gmail.readonly but System.HttpResponse [status = OK, StatusCode = 200] is OK. Can someone guide me? I do not remember anything. How I requested I received auth, but in this response I received an access token gt; & lt; / span & gt; & lt; / Span & gt; Top: Forms & gt; Therefore, in my request as my login token I can go directly to get all information related to the logged-in user I am since I am getting all the information about the user, I am trying to get all the emails related to him. Am I correct or am wrong in any place? I am very new in trying to learn the API and web service please Are you actually calling an HTTP GET call on that URL? ..)? Is not it that only the Oathup scope identifier ? one Once you have a valid Oauth2 token, you can set it in the header, you can reques...

c# - wpf not refresh code if not focused -

I have this situation: A class that contains a background worker who does something in a while: Public Sector CControls {Public Representative Zero ControlChangedEventHandler (); Public Event ControlChangedEventHandler ControlChangedEvent; Private readonly background worker; Bull B Close = false; Public CControls (IntPtr hwnd) {worker = new BackgroundWorker (); Worker.DoWork + = worker_DoWork; Worker.RunWorkerCompleted + = worker_RunWorkerCompleted; } Zero worker_recognito full (object sender, runwalker, complete, and E. e) {bclose = true; } Public zero enabled {bEnable & amp;! Worker.IsBusy} {worker.RunWorkerAsync (); } Else {bClose = true; }} Void worker_DoWork (Object Sender, DoWorkEventArgs e) {while (! BClose) {// My job // .......................... .................... // if (ControlChangedEvent! = Zero) {ControlChangedEvent (); }}}} I have my forms that make an example of this class and set the listener of ControlChangedEvent : CControls CT = new CControls ();...

Get Eclipse to select a maven profile when deploying to tomcat -

Can anyone tell me how I can get my profile while running a web project from eclipse My latest attempt, which does not work (file-dev.xml is not parsed). I have a war project that has reliance on jar project. The Jar Project contains Vasant beans. In the jar project's pom.xml: & lt; Profile & gt; & Lt; Profile & gt; & Lt; ID & gt; Dev & lt; / Id & gt; & Lt; Activation & gt; & Lt; ActiveByDefault & gt; True & lt; / ActiveByDefault & gt; & Lt; / Activation & gt; & Lt; Properties & gt; & Lt; Env & gt; Dev & lt; / Env & gt; & Lt; / Properties & gt; & Lt; / Profile & gt; & Lt; Profile & gt; & Lt; ID & gt; UAT & lt; / Id & gt; & Lt; Properties & gt; & Lt; Env & gt; UAT & lt; / Env & gt; & Lt; / Properties & gt; & Lt; / Profile & gt; & Lt; / Profile & gt; In addition, I've added it to the Maven-Jar ...

nosql - Arangodb AQL UPDATE for internal field of object -

Looking at the following example documentation: {"timestamp": 1413543986, Message ":" message "," read ": {" 8 ": zero," 9 ": zero," 22 ": faucet}," type ":" 1014574149174 "} How can I update the value of a specific key in an object with the key "read" key? For example, update value for key "8": ... "8": 10, ... You can use either MERGE or MERGE_RECURSIVE as C: Update db._query ("FOR FILTER IN U._key == @ key" UPDATE "with UPDATE: MERGE_RECURSIVE (u.read, {'8': 10})} IN test ", {key:" 11611344050 "} merge the merge documents, where the latter value will overwrite the first look for details.

python - Django forms - checkbox group with dropdowns -

Image
Can anyone tell me how to write a custom folder / custom field with a drop-down for a checkbox group by typing the Django form Can use? All checkboxes should have the same name (checkbox group) A drop in the form of hair element (as a single dropdown for all check boxes) in each checkbox Custom Widtet / Custom Fields should accept the options [=] To generate the param checkbox group Checkbox group with required verification = Ex : Text box to show dimensions and should be a drop list of aggregate functions in each dimension. I used to be more You used the MultiValueField init To make all the choices in the method and to render all the checkboxes, you can accept any option to use custom logic in multivit and select and compress / decompress like the input to the user for any proper representation, Like the value {checkbox_name: operation}.

How to split a string without losing any char in java -

I am using Eclipse for Java. I want to split the input line from the user without losing, there is an input line for any four example: +2+ sqrt (25) -41 * 3-ABS (-4) -62 / 2 and output should be: + 2, + sqrt (25), - 41, * 3, -bs (-4), -62, / 2 (If I "+" or etc. "+" itself will be removed.) What should I do? My code is something like this: scanner scanner = new scanner (System.in); String str = scanner NXtine (); String [] parts; Parts = str.split ("!!!! !!?"); // I do not know what to put here You can do it regularly Expression in Java assumes that you can not have nested parenthias (this is a strict requirement) list & lt; String & gt; Parts = new arreelist & lt; String & gt; (); String input = "+2 + sqrt (25) -41 * 3-stomach (-4) -62 / 2"; Pattern p = Pattern.compile ("[\\ + \\ - / \\ *] [^ \\ + \\ - \\ * / \\ () + (\\ ([^ \ \ (\\)] * \\)) "); Matcher m = p.matcher (input); While (m.find...

How to recursively search a directory for all files including hidden files in hidden directories, with PowerShell? -

recursively to find a hidden file, I'm using: GCI - Path C: \ -Filter part_of_filename * -Riksha-Force | The output shows me several errors in this way (depending on the path): get -ChildItem: path ' C: Access to 'Documents and Settings' is denied. In C: \ User \ User Name \ Document \ PowerShell \ Searchdesk.ps 1: 10 Characters: 5 + GCI & lt; & Lt; & Lt; & Lt; -Path C: \ -Filter part_of_filename * -Riksha-Force | where {. $ _ Properties match "hidden"} + CategoryInfo: PermissionDenied: (C: \ Documents and Settings: String) [Get-ChildItem], UnauthorizedAccessException + FullyQualifiedErrorId: DirUnauthorizedAccessError, Microsoft.PowerShell.Commands.GetChildItemCommand I find any directory including a PowerShell command that recursively hidden directory and me, need shows all files, including hidden files part_of_filename * (for example) I The command ran using the PowerShell ISE administrator as it seems. Person will not sear...

jquery - How to do a custom transition using Javascript -

That's why I made the general layout psd have been developed from scratch on this site (first time ever) and I made Everything is great, so I am at this point where I want to refine the site with some javascript effects. When I'm on the index page, you have to press a banner, sidebar and content (articles) articles when I articles (obviously), but I 0 such a custom loading page: 22 I want to make: I have to make or find a GIF, I have done this, how do I add this site? Articles are all in one category, though I think I will have to use the ID for each particular article so that the related article. Edit: Pop it into a file and add a reference to each page links on it: function loadXMLDoc (name) {var xmlhttp = new XMLHttpRequest (); Xmlhttp.addEventListener ("load", transfer complete, incorrect); Xmlhttp.open ("GET", name, true); Document.getElementById ("Loading"). Style.display = "block"; Xmlhttp.send (); Function tran...

ruby on rails - undefined local variable or method `user' for #<Class:0x00000007dc99c8> (NameError) -

I am writing a test to check whether the login creates a random account for the user. This is the schema for the database: ActiveRecord :: Schema.define (version: 20141015163624) do # is the extension that should enable this database to enable_extension "plpgsql" create_table " Users ", Force: True | T | T.string "name" t.string "email" t.datetime "created_at" t.datetime "updated_at" t.string "password_digest" t.string "remember_digest" end add_index "users", ["email"], name: Using "Index_users_on_email", Unique: Correct, :: btree end and this is a test file: requires 'rails_helper' RSpec.describe "UserPages",: Type = & gt; : Before "signup" before {signup_path} please describe "valid information", before filling "name", with "example user" fill_in "email": "user@example.com" fill_in ...

ios - Getting AWSAccountID -

Someone with iOS SDK has worked with . I know that the Amazon SDK team, / P> version of AWS Mobile SDK for iOS has reached 2 general availability (GA) and now the developer is not in the preview. Version 1 is disliked by September 29, 2014 and will be available in our AAS-SDK-IOS-V1 repository until December 31, 2014. If you are creating new apps, then we recommend using version 2. Therefore, I am trying to upgrade the application with the new version (2.0) of the ADS IOS SDK. [According to the sample application, for this certification requires the following for credentials, NSString * const AWSAccountID = @ "Your-AccountID"; NSString * const cognitoloid = @ "your-poolID"; NSString * const cognitive oolith = zero; NSString * const Cognito Relayunath = @ "your-RoleUnauth"; I have filled it with some values ​​that are available on the console. But, each time getting the log, 2014-10-17 18: 33: 04.056 S3TransferManagerSample [5343: 70B]...

ios - What does these (response, data, error) in println(NSString(data: data, encoding: NSUTF8StringEncoding)) means in swift? -

After Can anyone tell me what the code means below I am trying to learn faster and I was not considered under the lines. NSURLConnection.sendAsynchronousRequest (request line: Ansopreshn Kyuukmancwu ()) in Println ((feedback, data, error) NSString (data: data encoding: NSUTF8StringEncoding).)} Thank you very much for your time in this asynchronous network request and complete, it is a println NSString represents the data it Received, and This is the main queue ( NSOperationQueue.mainQueue () ). It holds in terms of deciphering, the focus is definition sendAsynchronousRequest function: sendAsynchronousRequest (function class _ request: NSURLRequest, Qatar Qatar: NSOperationQueue!, completionHandler handler: (NSURLResponse!, NSData!, NSError!) - & gt; zero) he closed the third parameter to the syntax "following completion taking advantage of" syntax , Which allows a blocking parameter as a block after the function and thus, The received da...

Sorting two layers array by underscore .sortBy or javascript .sort function -

मुझे JSON सॉर्टिंग में वृद्धि के साथ समस्या है अब यह देखा गया: var array = {"2014/2015": {"gamesplayed": 17, "लक्ष्य": 2, "सहायता": 8, "अंक": 10} , "2013/2014": {"गेम्सप्लेड": 52, "लक्ष्य": 18, "सहायता": 16, "अंक": 34}, "2012/2013": {"गेम्सपेलेड": 39, "लक्ष्य ": 12," सहायता ": 15," अंक ": 27}}; मुझे वर्षानुसार आइटम सॉर्ट करने और 2012-2013 जैसी वस्तुएं प्राप्त करने की आवश्यकता है: {...}, 2013/2014: {...}, 2014/2015: {.. ।} मैं इसे सॉर्ट करने का प्रयास करता हूं: var sorted = array.sort (फ़ंक्शन (a, b) {return a - b;}); लेकिन यह कंसोल में गलत तरीके से दिखाती है। आपका सरणी चर वास्तव में एक ऑब्जेक्ट है, जिसके पास कोई .sort () विधि नहीं है, चूंकि चाबियाँ अनारडेड हैं।

php - WordPress htaccess Admin Panel Prompting For Password on Main -

मेरे पास मेरे / wp-admin फ़ोल्डर में htaccess फ़ाइल में निम्नलिखित हैं: AuthType Basic AuthName "उदाहरण" AuthUserFile "/home/username/.htpasswds/public_html/example.com/wp-admin/passwd" मान्य-उपयोगकर्ता की आवश्यकता होती है जब मैं लोड करता हूँ यह वर्डप्रेस लेख प्रमाणीकरण के लिए संकेत देता है मुख्य पृष्ठ ठीक है, लेकिन व्यक्तिगत लेख एक पासवर्ड के लिए संकेत करते हैं। मुझे मेरी समस्या का समाधान मिला । यह पासवर्ड के लिए संकेत कर रहा था, क्योंकि इसका कारण यह है कि कुछ वर्डप्रेस प्लगइन्स को व्यवस्थापक-एजेक्स.एफ़पी। तक पहुंच की आवश्यकता होती है। यदि आप इसके बाद के उद्धरण के शीर्ष पर निम्नलिखित को जोड़ते हैं तो आप पासवर्ड को पासवर्ड की रक्षा के लिए अनुमति देंगे -एडमिन फ़ोल्डर। # पासवर्ड संरक्षण के आसपास admin-ajax.php के लिए प्लगइन एक्सेस की अनुमति दें

php - Loading a single file for all pages -

I am running an Apache Web server, my goal is a loader (in PHP) that loads from all URLs. For example, if you head to website.com/test/, website.com/page.php or just website.com/ then it will always load website.com/index.php I How can I get this? You can create an .htaccess file that will have to rewrite the URL for anything There is no file or directory on your server and it redirects to the index.php file. Additionally you can have the original URL attached to the query string so that you can work with it in your script. Rewrite code% {REQUEST_FILENAME} on rewriting! -d Recovery code% {REQUEST_FILENAME}! -f rewriting rule ^ (. *) $ Index.php? $ 1 [L, QSA] & lt; / IfModule & gt;

How to call COM Interop DLL from Native C (win32) -

I have a program (WIN32) and call me a 3D party "COM interop" DLL in my program is. I did not find any useful results in Google. (Usually "Com DLL calls from managed code" returns) What are the instructions? Is there an example or tutorial for this? Thanks Murat Both of you help Can:

mod pagespeed - Disable mod_pagespeed for specific IP -

Text after "div class =" itemprop = "text"> As we can not create image based content on this administration sites, do not forget to disable mod_pagespeed for our office, The current version of an image you want to despair is. Does anyone know a way to disable it for a specific IP? Do I know about the URL switch? Although ModepagePid = User Interference Every time besides this, I know that the cache can be cleared on the command line, but the user administration content will not be accessible at this level. Any help would be great. Directory & gt;. : & lt; then "r '89.101.196.98" "& gt; #ModPagespeedDisableFilters combine_css, combine_javascript Modpagespeed off & Lt; / or> You can deactivate the entire module or just specific filters, which is useful to see how much it would be "customizable" with javascript, or due to problems .

how to create/load a custom spring jar in a not spring managed web application -

I would like to create a jars liberalization using the spring and would like to import them into my web application. Since I also use spring later, I have no problem. The point is that I want to use it again in a non-spring management environment. Suppose I want to use Lib in the pure Java web app, then I can not use spring automaker and package scan features. My idea is: Create a simple pure bean and loader conferencing in its constructor: Public Spring Springstallone {Private Client Client; Personal Annotation ConfiFication Applications Context CTX; Public Springstallon () {ctx = New Entatation Conflict Application Concert (); Ctx.getEnvironment () setActiveProfiles ("Test"). Ctx.scan ("my.package.scan"); Ctx.refresh (); Client = (Client) ctx.getBean (Client.class); Ctx.destroy (); } Sending a public null (object o) {client.send (o); }} Is this the correct way to do it? If so, how should I manage an app contact (should I bother about this?)? Thank you ...

ember.js - Add fixtures with ember-cli 0.1.2 -

This is the same question, but it seems that the code generated by ember-cli has changed . This is my current system: »Amber - version version: 0.1.2 node: 0.10.25 npm: 2.1.3 This is my book model Full content of file ( model / book.js ): Import the DS from 'ember-data'; Export Default DS.Model.extend ({'title': DS.attr ('string'), 'author': DS.attr ('string'),}); Answer other questions and tell me to use reopenClass , but there is nothing to open me again with the current format of the model file. I have tried to: imported DS from 'ember-data'; Export Default DS.Model.extend ({'title': DS.attr ('string'), 'author': DS.attr ('string'), fixtures: [{ID: 1, title: "mentor", author : "Larry Nieven"}, {ID: 2, Title: "The Greatest Book Ever", Author: "Juan"}]}); But there is no luck. I should in my model class Let's move on. Store t...

java - Metadata based JMX with automatic conversion to OpenTypes -

मुझे एक जेएमएक्स लाइब्रेरी है जो निम्न आवश्यकताओं का समर्थन करती है: बहिष्कार / शामिल किए जाने केवल एनोटेशन के माध्यम से किया जाता है (मैं एक अतिरिक्त प्रबंधन इंटरफ़ेस नहीं जोड़ना चाहता हूं) प्रकारों को ओपनटाइपों में स्वचालित रूप से कनवर्ट किया जाना चाहिए। क्या ऐसा उपलब्ध है? जेडीके समर्थन या स्प्रिंग जेएमएक्स समर्थन संतोषजनक नहीं हैं जेडीके जेएमएक्स समर्थन मुख्यतः निजी एपीआई है (Com.sun.jmx) और इसे आसानी से इसे का एक हिस्सा फिर से उपयोग करना संभव नहीं है। विशेष रूप से, मुझे उस तंत्र में प्लग करना होगा जो एनएक्सेशन के आधार पर विधियों और ऑब्जेक्ट्स को फ़िल्टर करने के साथ एक एमएक्सबीई इंटरफ़ेस के उपयोग की जगह लेती है जेएमएक्स के लिए स्प्रिंग समर्थन ओपन टाइपों के लिए स्वत: रूपांतरण प्रदान न करें जो कि एमएक्सबीईएएन प्रदान करता है, ताकि आप कोड डुप्लिकेशन्स को समाप्त कर सकें

PHP jQuery code mix -

If someone takes time to read my code then I would be very grateful and I got the variable $ kakka in the script below So that it does not work anymore $ kakka has no value because php code is below sorry, i do not understand anything about jquery, but i need to do this function work. Markup and jQuery & lt; Head & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = utf-8" & gt; & Lt; Script src = "http://code.jquery.com/jquery-latest.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Var refreshId = setInterval (function () {$ ('# puu'). Feid ("slow"). FadeIn ("slow");}, 5000); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; PHP & lt ;? Php $ rs = mysql_query ("Choose * from id = '$ _ session [user_id]'); while ($ line = mysql_fetch_array ($ rs)) {$ starter = $ line ['id']; $ user_name = $ Str...

Rails - creating multiple objects from one form -

I have a form that will update the attributes for one or several "treatment optimization" objects. Every one takes three properties, and a "work" is filled with the form every time the form is saved and used to create them - hidden area (: name), will be: adaptation_details (in the content work object) : Researcher / agency_leader/: Direct_provider will be: Car assigned_to on the other. Ingredients: symbol error: Form: = form_tag update_individual_treatment_adaptations_path ,: I merge an undefined method `method = & gt; "Put" ,: id = & gt; "MyAdaptationsForm" do | F | | - current_agency.treatment_adaptations.order ('ASC created_at') = fields_for "treatment_adaptations []", do treatment_adaptations @for_treatment_adaptations. F | - If treatment_adaptations.not_doing_adaptation! = 'True'% tr% td = f.hidden_field: name ,: value = & gt; Treatment_adaptations.name% td = f.text_area: adaptation_details ,: ...

css3 - CSS transition is under an element with position realative or absolute -

Why when you set an element in a relative or complete position, the elements of the transition are under this element, but When the position of the situation is removed? HTML: & lt; Div class = 'square' & gt; & Lt; / Div & gt; & Lt; Div class = 'text' & gt; Text here & lt; / Div & gt; CSS: .square {width: 100px; Height: 100 pixels; Background color: red; Infection: all 0.5 S. 0.1 linear; Status: Completed; Margin-top: 20px; } .square: hover {margin-top: -50px; } .text {status: relative; } Do not forget to set z-index Property to your style when you decide to declare the status . For example z-index: 10 try your .square box here demo is working - this There is a good tutorial to know how it works -

regex - find and replace line sed older version -

I am trying to find and replace a port number in a server file (because all my partners are of the same server ), So we need different ports ... I was trying to use it: sed -i -e '/ var port./var port = 3000; / 'Server.js to change the port from 5000 to 3000. The acetal line of code i var port = 5000; I am trying to change the file in server.js when I try to do it on our RAL server (which I do not want to get this message sent to sed: -e expression # 1, four 14: Need a new version of sed Am I not using the correct regex? Or is this making the server inconvenient? If you are trying to search and replace, start the command with s Forget it, also, -e is not necessary (but it should not be the cause of any problem). In-place revision of earlier versions of sed , So you should overwrite the file yourself: sed 's / var port. * / Var port = 3000; /' server.js & gt; tmp & amp; ; Mv tmp server.js It may be necessary to make regular expressions...

scala - Pattern matching where failure case return type is Java void -

In my trial, I have code that looks like: val myVar = getVar () Match {matter something (V) => V case no = & gt; More tests on unsuccessful () // TestNG} // myVar ... // testng public static zero fail () {...} The problem is that myVar is assigned the type of any What is the best way to deal with this situation? first matches its environment (ISH) Scala & Gt; Def fail (): unit = new runtime exception ("blah") failed to throw: () unit scale & gt; Now write an adapter that is nothing for the unit > Scala & gt; Def myFail (): nothing = {failed (); ???} myFail: nothing and expected code of use while using the adapter scala> Val myVar = getVar () match {| In case something (V) = & gt; Wei | No case = & gt; MyFile () | } MyVar: String = Hello By the way, it can be written more clearly scala> P> / html>

ibm mobilefirst - not able to connect to work light development server from iOS device(work light 6.2) -

Can someone help me with the following problem: I'm not able to connect from iOS device to server (Work Light 6.2) This works fine in Vertical emulator and Xcode Simulator. Do I need to make any changes to the device settings to connect? Thank you. It would be better if you provided any error in the description view in Xcode console or in the app The application fails to connect to the wallet server. Anyway, a common criminal would be if the device is not connected to the same network of development servers. Make sure both are connected to the same network.

python - Adding JSON like documents to a new collection Pymongo -

So I have just asked for an existing archive for some documents that are all tags: "_t": "blanket". After these documents, I want to include it in a new collection that is designed to keep these types of documents with usernames (like usernames_connection data). So here is my code: #import to import module OS, pymongo, datetime import datetime Conn = None db = none json isConnected = false # try MongoDB connecting to server: Conn = pymongo.MongoClient () db = conn.emmersiv # emmersiv db been connected printer connected to db.collection_names () "MongoDB server" emmersiv db print within archive files #Print isConnected = Except the truth: Print "connection fails ..." in a list and then all the collections #get filters the '' 'for users in ALLUSERS Kinect Data The username '' non-user data ALLUSERS = db.collection_names remove (): coll = pymongo.collection.Collection (db, users.lower ()) print "are currently lookin...

javascript - Calculating control points included in getBBox() of svg paths in safari and chrome -

This is related to this bug: An arc (center, radius, startup, endangered) Looking at, I am able to calculate the points by the side of the path, then their bounding box, however, is a bug in safari and chrome, in which the bounding box contains the control points of the arc. Since the shield fills a shape applied to the bounding box, the result is slightly different in the shield covering the shape, whether the browser has this bug or not. My question is: without using the real API (getBBox) I have a path to adjust for these parameters (center, radius, start angle, andange) given for the safari / chrome bug How can I calculate additional control points? It's not working with Bezier's debt or even oval, just a simple circular arc. Thank you! I wrote a getBBox shim for the webkit browser /

ruby on rails - rspec test for destroy if user doesn't exist -

I am using rspec + FactoryGirl to test my app. I have the next test context "user can not be deleted" (from First of all) Do @User = FactoryGrilled Create User Delete: Delete, {id: 1}, format :: Jessan is expected to "render the error Jesns if not destroy" the user ends, Ughr_propusn = Jesoan (Pratikriyakcom, Prtik_any: true) (User_Decutions [: Errors] [: Messages]). To include "The user can not be destroyed" end it should answer from the end of {422} When I run the test, I get the error ' User not found with id '= 2 . If I change the ID {id: @ user.id} then the exam is not passed and I get further errors. is the expected response to a 422: NilClass and for the undefined method `[] ' , But 204 I test code User.estroy json: {success: {message = & gt;} def user = User.find (params [: id]); "User deleted"}}, Position: 204 Other render Jason: {errors: {: message = & gt; "User can not be deleted...

php - Change PHPmyadmin timezone on shared server -

Image
I am trying to save a query in my database using CURRENT_TIMESTAMP. The problem is that the time zone is not correct and when I talked to the hostgator support from the people, they gave me this answer: After researching this issue, I came to know that You can only change it on the site, to convert it to phpmyadmin, you will need root access, which you do not keep on shared servers. The server has a 2 hour difference from my home country (Chile) Does anyone know what I can do? I am using this code to update the database: & lt ;? Php $ lat = $ _GET ['lat']; $ Lane = $ _GET ['lane']; // Create a MySQL connection $ db_database = "xxx"; $ Db_hostname = "xxx"; $ Db_username = "xxx"; $ Db_password = "xxx"; $ Enlace = mysql_connect ($ db_hostname, $ db_username, $ db_password); If (! $ Enlace) {die ('no powders canisters:'. Mysql_error ()); } Echo "Satisfactory shrinkage" Br> '; // mysql_close ($...

java - Get Hashset Key -

आयात करें java.util.HashMap; आयात करें java.util.HashSet; आयात करें java.util.Map; Import java.util.Set; सार्वजनिक स्थिर शून्य प्रिंट न्यूमेटेड खोज (हैशमैप & lt; स्ट्रिंग, पूर्णांक & gt; vocab, हैशसेट & lt; स्ट्रिंग & gt; शब्दकोश) {हैशमैप & lt; स्ट्रिंग, पूर्णांक & gt; गठबंधन = नया हैशमैप & lt; स्ट्रिंग, पूर्णांक & gt; (); इटरेटर iterVoc = vocab.entrySet ()। Iterator (); सूची के & lt; स्ट्रिंग & gt; डिक = नया अर्रेलिस्ट & lt; स्ट्रिंग & gt; (); Int i = 0; डबल वास्तविक = 0.0; डबल टोकन = 0.0; जबकि (iterVoc.hasNext ()) {map.Entry iterVocE = (मानचित्र.इंटर्री) iterVoc.next (); अगर (शब्दकोश केंन्टेन्ट्स (आईटीआरवीसीई.के.के.के.) (toString ())) {int value = (int) iterVocE.getValue (); वास्तविक + = 1; टोकन + मान =; Combine.put (iterVocE.getKey ()। ToString (), मान); }} के लिए (स्ट्रिंग एस: शब्दकोश। केसेसेट ()) {यदि (कॉम्बिनेशन कैंटेन्स (शब्दकोश.गेट्स) .स्टस्ट्रिंग ())) {System.out.println ("डिक्वॉर्डेड" + शब्दकोश। गेट्स) "(गिनो...

Multiple dropdown search for multiple custom taxonomies on Wordpress -

I'm trying every code that I can find on the Internet, 4.0 I have created custom taxonomies. I am creating an education directory and want to achieve something like this: Country (& lt; - Custom classification) Select country - - USA (& lt; - word) - United Kingdom - .... Select qualification - Choose qualifications - - Bachelor - Master - - .... .... Major - Choose Ability - - Business - Science -. [submit button] For example, if someone searches for "USA" "Bachelor" and "Science" And submits, it will display all the posts that are tagged in the words. If any "USA" searches "Bachelor" and leaves Major blank, then it will display all the posts tagged in "USA" and "Bachelor". I appreciate your help! Thanks!

Troubleshooting PostSharp license issue on build server: Where can I find my license for PostSharp Express? -

I'm having problems with my CI build server in which the PostSharp message is failing with build: The assembly 'yada-yada.dll' uses the non-licensed features (original features). [...] . We are using the current version of PostSharp (3.1.52) and there is no problem with the library in the local development environment where the developers have a registered express license. According to , the build server should not not require a license, however, they acknowledge that the identification of automation may fail: If this probe does not work for any reason, you can use the license key of the user with any license for the build server. This will not be considered a violation of a license. However, it is better to report this problem to our technical support so that we can fix the detection algorithm. The source control has been recommended to include the license key. I am trying to test this theory, but I can not access my real PostShop Express license! PostSharp...

css - Are there contextual link styles for list-group-items? -

बूटस्ट्रैप 3.2.0 में, वहाँ list-group-item s से मेल करने के लिए प्रासंगिक लिंक शैलियों हैं जैसे सूची-समूह-आइटम-खतरे ? अभी मैं सिर्फ लिंक पर text-danger वर्ग का उपयोग कर रहा हूं, लेकिन मुझे यह जानना है कि बेहतर तरीका क्या है।

eclipse - cannot find my resources on a tomcat server -

Image
I am working with a spring project in eclipse and I have configured my resources on local resources. I do not know where my resources will be found, I have tried the following: http: // localhost: 8080 / edutainer2 / 404.html http: // localhost: 8080 /edutainer2/resources/web/404.html http: // localhost : 8080 / 404.html I do not know you want to know That's what you want to go. I also want to know if my request mapping will be on the same root path. If it does any help, then my project is: Fix: My Request Mapping pages appears on the path / site , although I still get unsure about plain HTML / CSS pages Am If you have mapped your dispatcher servlet to "/" then you define custom handler Which will forward all requests for the stable, add the following resource to the default handler of servlet container (tomak in your case) in your MVC servlet reference: & lt; Mvc: resource mapping = "/ resource / **" location = "/ r...

r - Why a self-written Rcpp vectorized mathematical function is faster than its base counterpart? -

OK, I know the answer, but due to this being motivated, I want to know some good advice about the following : Why is RCPP exercise CA down? 15% faster (for long vectors) than the built-in exp () ? We all know that Rcpp is a wrapper for R / C API, so we should expect a little worse performance than the one. Rcpp :: cppFunction ("NumericVector exp2" (NumericVector X) {NumericVector z = RCPP :: Clone (x); Int N = Z SEE (); for (intI = 0; I & lt; n; ++ i) Z [I] = XP (Z [I]); Return Z;} ") Library (" microbenchmark ") X & lt; - rcauchy (1000000) microbenchmark (equation (x), exp2 (x), unit = "relative") ## Unit: relative ## expr min LQ median uq max neval ## exp (x) 1,159893 1,154143 1 , 155856 1,154482 0,926272 100 100 ## exp2 (x) 1,00,000,000 1,00,000,000 1,00,000,000 1,00,000,000 1,00,000,000 100 base r NA is used to check further, we can not do this. Also keep in mind that loop is doing tricks like unrolling (as RCpp did in Chin...

Regex replace Harvard style bibliography references \d{4}:\s\d+ with comma -

The Harvard Bibliography, if you do not use Mendeley on time, then it can be difficult. [Sehler 1999: 122; Trusk 2000: 164] [Benvanist 1935: 170-171, Benvinist 1955, Bohammad, Kern 1994: 56-59] The way I quote authors in my PhD I am wrong. It should contain : instead of , . Like [Sehler 1999, 122; Trusk 2000, 164] \ d {4}: \ s \ d + I can find them, but instead of to change : You need to use letterhead and hide or backtraffery. I will probably have something like this: for example in php preg_replace ("~ (\ d {4}): (\ s \ d +) ~", "$ 1, $ 2 ", $ Str). Here is a post that talks about backriration in JavaScript:

python - compare generator objects within mock.assert_has_calls -

I am writing a unit test for a function which will confirm that the function to be said in it is called with the correct argument . The problem is that one of the arguments is the generator. Is there a way to compare the generator content that is called using the fn ? An example of the behavior I see is 'AssertSequenceEqual.' As is the case, because test_use_fn fails because the generator objects that are comparing are different. import fake Def Fn (entries): Pass Def_fn (entries, Convert = lambda x: x): Convert insertion entries = (entries) Entries = Fan (entries) Entries = FN (Entries) @mock Patch ( "FN") def Test_use_fn (self Mok_fan): mock_fn.return_value = 'Falcon' entries = [ 'Fu', 'bar'] Upyog_fan (entries) Call_l = Mokkcol (entry Log entries) ) Call_2 = Mokkol ('falcon') mock_fn.assert_has_calls ([call_1, Call_2]) You can use call_args_list I think you will check whether each item in the generator is the same o...

javascript - What is wrong with my angular-module? -

I have a simple angular JS module: this module is to work with angle deck game deck, not production, beta =) So ... and I have a problem that I can not decide. The game card by default is a simple SVG image, and again by default the initial modules are loaded automatically by all the cards in the working phase. Some solid card programmers need to be inserted, so it's like: & lt; Card Data-Value = "'2H" "> Simplify further instruction instructions, insert required SVG cards via jquery: $ (Element) .html (''); __deck __ [card] .clone () appendTo (element). But actually SVG is reloading, cloning STVG Instead of __deck [card] __ array. Instead of cloning, try creating a copy with angular.copy (__deck __ [card]) Cod E> I think this is an ideal clone, all the bonds of that element are the same.

c++ - How do I determine if a class indirectly inherits from a base class? -

You can use to check that a class gets from a base class, but how do I know that Any class straight succession from that class (i.e., is processed indirectly from that class)? It is impossible until it is implemented.

c - how to access items in nested struct -

#include & lt; stdio.h & gt; # शामिल करें & lt; math.h & gt; # MAXVALS को 100 टाइप किए गएफ़ संरचना {डबल एक्स, वाई; } Location_t; Typedef struct {location_t loc; डबल एसओएस; } Loc_sos_t; Int main (int argc, char * argv []) {int line_count = 0, i = 0; डबल temp_x, temp_y, temp_watt; Location_t loc_str [MAXVALS]; Loc_sos_t sos_str [MAXVALS]; जबकि (scanf ("% lf% lf% lf", & amp; temp_x, & amp; temp_y, & amp; temp_watt) == 3) {loc_str [i] .x = temp_x; Loc_str [i] .y = temp_y; Sos_str [i] .sos = temp_watt; i + = 1; Line_count + = 1;} (i = 0; i & lt; 5; i ++) {printf ("x =% lf, y =% lf \ n", sos_str [i] .loc.x, sos_str [i] .loc के लिए वाई); } Printf ("रेखा गणना =% d", पंक्ति_मार्ग); वापसी 0; } इनपुट फ़ाइल 30.0 70.0 0.0045 53.0 63.0 0.0006 36.5 27.0 0.0005 70.0 25.0 0.0015 20.0 50.0 0.0008 कॉलम X निर्देशांक हैं, वाई समन्वय, वाट मैं एक इनपुट पाठ फ़ाइल से मूल्यों को पढ़ने की कोशिश कर रहा हूं और उन्हें 2 अलग-अलग स्ट्रेंक्ट्स में ड...

javascript - Cytoscape.js - How to display nodes generated in Java -

I want to display the graph using the data generated on the server side of the Java EE application. So my question is how to insert some data structure (JSN object) in the "Elements" section below the code: $ (function () {// on dom var var = Cytoscape ({container): Document.getElementById ('cy'), style: cytoscape.stylesheet (.) Selector ('node') .css ({'content': 'data (id)'}. Css {'Target-arrow-shape': 'triangle', 'width': 4, 'line-color': '#ddd', 'target-arrow-color': '#ddd'}). Selector ('.' '# 61bffc', 'transition-property': 'background-color': '# 61bffc', 'line-color': '# 61bffc', 'target-arrow-color': 'background-elements : {Nodes: [{data: {id: 'a'}}, {data: {id: color, line color, target-arrow-r} 'Data': 'd'}}, {data: 'd'}}, {data: id: '' transit duration '' ...

ios - How to access local variable in for loop through dictionary or dictionaries when only one dictionary is available? -

I have a loop to go through the dictionaries of dictionaries. It only works fine unless only one dictionary Not total Here is the summary of my method: - (NSArray *) objects FROMJSON: (NSString *) jsonString error: (NSError **) error {NSParameterAssert (jsonString! = Zero); // Create JSON object NSData * jsonData = [jsonString dataUsingEncoding: NSUTF8StringEncoding]; NSError * localError = Nil; Id jsonObject = [NSJSNSRialization JSONObjectWithData: jsonData options: 0 error: & amp; Local error]; NSDictionary * dictionaryOfDictionaries = (id) jsonObject; // If not successfully parsed, then error (dictionaryoffdexin == zero) {if (error! = NULL) {* Error = [NSER Error: Dird Error: Error Domain Code: Locked DataAir User Inc: Zero]; } Return zero; } / / Create objects from other parsed data NSMutableArray * objectsArray = [NSMutableArray array]; (Objectivity [@ "road"] City: Objective [@ "city"] For the state: Object [["" state "]; // If erro...

C# - Get NamedRanges of a particular sheet in Excel using Oledb -

Image
Using OLEDB, is it possible to get all NamedRanges of a particula sheet in Excel? I have the code which gives me NamedRanges the following but I am not able to figure out what the sheet NamedRange refers to Personal String [] GetExcelSheetNames (string excelFilePath) {OleDbConnection objConn = Null System.Data.DataTable.dt = Null; Try {// string connString = "provider = Microsoft.Jet.OLEDB.4.0; data source =" + excel file + "; extended property = excel 12.0;"; String connectionstring = String.Format ("provider = Microsoft.ACE.OLEDB.12.0; data source = {0}; extended property = excel 12.0", excelFilePath); ObjConn = New OleDbConnection (connectionString); ObjConn.Open (); // Get schema guide containg data table Dt = objConn.GetOleDbSchemaTable (OleDbSchemaGuid.Tables_Info, blank); If return (DT == zero) returns; String [] excelSheets = new string [dt.Rows.Count]; Int i = 0; // Add the name of the sheet to the string array. Forex Currency (DatRow lin...

osx - Can't build Qt on Mac -

मैंने अभी Qt Creator 3.2.2 पर OSX 10.9.5 , डाल लाइन QMAKE_MAC_SDK = macosx10.9 में .pro फ़ाइल और लाइन बदल QMAKE_MAC_SDK = macosx10.8 में QMAKE_MAC_SDK = macosx10.9 अंदर device.pri फ़ाइल। अब मैं एक बहुत ही सरल परियोजना को संकलित करने की कोशिश कर रहा हूं। और यह संकलन नहीं करता है। यह मुझे निम्न आउटपुट देता है: 23:11:21: शुरू हो रहा है: "/ usr / bin / make" clean rm -f main.o rm -f * ~ core * .core 23 : 11: 21: प्रक्रिया "/ usr / bin / make" सामान्य रूप से बाहर निकलती है। 23:11:21: कॉन्फ़िगरेशन अपरिवर्तित, क्यूएमके कदम को छोड़कर। 23:11:21: शुरू: "/ usr / bin / make" / अनुप्रयोग / Xcode 6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++-c-pipe -g-isysroot/ अनुप्रयोग / Xcode 6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mFile मौजूद नहीं है, बना देगा: / अनुप्रयोग / Xcode अमान्य तर्क -संस्करण मिनट = 10.6 -Wall -W -fPIE -DQT_CORE_LIB मैं / अनुप्रयोग / क्यूटी / 5.3 / clang_64 / mkspecs ...

laravel - routing forms and related models -

This is an initial question how to set up a route and controller for a simple management system in Laravel 4.2. Let's say I have a 'person' model ('name' and 'email'). I also have a 'book' model which is' person '(' title 'and' author ',' person_id '). To create a new person, the form of the form is as follows: For example As a way to add a new book to a person: example.com/persons/22/books/create Currently my Routes are set as follows: Root :: Resources ('Individuals', 'Person Controller'); Root :: Resources ('Books', 'Books Controller'); The function of my person's model is: public functions books () {return $ this-> Hammamen ('book'); } The functions in my book model are: public function person () {return $ this- & gt; Affiliation ('person'); } Where have I gone wrong? What is it? From: "nest" resource...

C#. UDP unicast -

I try to get six messages from the UDP Unicast client. The recipient looks like this: OpenCloud udpclient = new instance (); Ipdpoint locale = new ipadpoint (ipadress purse (client ip), clientport); Udpclient.Client.Bind (localEp); Udpclient.Client.ReceiveTimeout = 10000; Bool isTimeExpired = false; While (IsTimeExpired) {Byte [Buffer; Try {buffer = udpclient.Receive (ref localEp); } Hold (socket exception) {isTimeExpired = true; to continue; } // Deserialize // ...} udpclient.Close (); The program works, but sometimes I do not receive 6 messages (2 or 3) Sender application: UdpClient Client = New UdpClient (); Ipdpoint rimp = new ipdpoint (ipadres percy (client ip), clientport); // serialize // ... stream.page = 0; Byte [] data = new byte [stream. Length]; Stream Read (Data, 0, Convert.ToMnt32 (stream.Length)); Customer Send (Data, Data, Long, Remote); Stream.Close (); Client.Close (); I run 6 instances of sender application on the same machine (and an example of the r...

android - Why has my R.java vanished, and how can I get it back -

I am creating an Android app in Eclipse, and I want to rename the app's package under "src" Decidedly, right-click the package and choose "Refactor" and then "Rename" I did the same for the package under "Gene" I followed the package name in the Android Manifest.xml. Although now I can not solve "R for one variable" error under "normal" in my package there is no RJAV file, only "BuildConfig.Java". I have tried to clean up and rebuild the project after removing the "normal" folder. I do not have any "Android. R" statement from my class, and Eclipse says there is no error in my xml files All my XML and image files have been named in all lowercase, in which no special characters is not. I have tried to resume the eclipse several times. How can I fix this problem and get R Java back to work on my code again? Thank you. Usually this happens when there is an error in XML files, project-...

How to use JavaScript, Ajax or jQuery to display array data in table -

Right now I'm getting data like this which works fine, but I want to auto show it in a table . I have a button that has been clicked and the result should be displayed in the table or a table should be made and it will be ok to perform in any way. $ result = array (); While ($ line = mysql_fetch_assoc ($ resolution)) {$ result [$ i] [0] = $ line ['fname']; $ Result [$ i] [1] = $ line ['lname']; $ Result [$ i] [2] = $ line ['membership']; } Return result; Any help would be great of a data structure Seeing this: [{fname: "John", lname: "do", membershipid: "1234"}] Data should work for function createTable (data array) {var table = document.createElement ('table'); Top tablerows = dataArray.map (function (DataRow) {var tablerow = document.createElement ('tr'); for (value in DataRow) {var cell = document.createElement ('TD'); cell.innerText = DataRow [Price]; Tablaro Amped Child (cell);}...

security - Router blocking response from external networks -

I am currently working on a company network, and I have come across a problem where my script is not connected to external Can be networked I'm just thinking that any network knows the general behavior in security, which can be the reason for it? Ex I can go to www.example.com on Firefox, but my dragon script will get a timeout error if it tries to connect. import urllib.request f = urllib.request.urlopen ( this script works perfectly well on other networks or if I change the URL to the local network. 'Http: //www.python.org/') print (f.read (300)) Answer : Browser uses a proxy of the network