Posts

Showing posts from January, 2011

java - Graphics.clearRect() won't work for me -

Hi, I have searched the web for a while but the solution to solve me does not work for me, so here is my problem I am creating graphs on my GUI using graphics and drawl (), which works perfectly for me - for the first time when I use my program in the same area I say to keep the graph, so it only spoils things. Public Zero Paint Free (Graphics G) {super.paintComponent (g); Int max = 100; G.clearRect (0, 0, 205, 200); & Lt; - g.drawRect (10, 10, 200, 200); G.drawString ("+ + Max, 0, 10)"; G Drline (5, 110, 10, 110); G.drawString ("0", 0, 275); ... attracting the actual graph here. Now it was the idea that every time I have to draw it that I keep a white surface for the first time, so it removes anything pulled earlier but it does not work. I'm new enough for graphics, please do not hesitate to comment if I am doing it completely wrong. Thanks Advance. / P> -Alex

CSS (or not) animated image it becomes transparent onmouseover and then becomes untransparent again -

heyo féoho gotta question, I have to create a picture which becomes slightly transparent (like opacity 0,4), then size Grows like 2x and then becomes unrestricted (Opacity 1) and the text does not convert that position to its position. img {opacity: 1; Width: 250; } Img: Hover {Opacity: 0.4; Filters: alpha (opacity = 40); Width: 500px; Transit-property: width; Transition period: 4s; } I created only one CSS code for size and transparency, although it is not known how to make it again opacity after my 4sec animation and it does not know How to create a text Very much after the image size increases Hello, I could not understand your problem properly. But here I think that you want something like that. HTML & lt; Img src = "http://t3.gstatic.com/images? Q = TBN: AN9 GCTCRT 41JVA 43 Blaz DOS5TigUCCsCXBS 1U6DBiHIPMGJ-OAR7S8X" AT & GT; CSS @keyframes lI {0% {Opacity: 1; Conversion: Scale (1);} 50% {Opacity: 0.4; Conversion: Scale (1.3);} 100% {...

c++ - Why use new and delete at all? -

I'm new to C ++ and I'm wondering why should I bother to use and delete new ones? It can cause problems (memory leaks) and I do not find that I should start a variable without the new operator only. Can anyone explain this to me? This specific question is difficult for Google. "post-text" itemprop = "text"> For historical and effective reasons, C ++ (and C) is clear and manual. Sometimes, you can allocate (or using S). However, this is not always possible, because The stack size is limited (depending on the platform, some kilobytes or some megabytes). Memory is not always required or it is such that you need to allocate memory, which is very free during the execution (or unnecessary) especially since it results in some functions (And the collar - or its collar - will release the memory). You should definitely read and in some languages ​​(Java, Okel, Haskell, Lisp, ....) or system, a GC is provided, and useless (more accurate Accessible ...

ruby - Diff between two time -

How is the difference between two times in Ruby calculated? For example: I have this time as a string time1 = '08: 00 'time2 =' 12: 00 ' Understand that time is 1 positive and time 2 is negative (seems like working hours, I work 8 hours a day, and 12 hours a day for another day Looks like), I want to do something like this: diff = time.parse (time1) - time.parse (time 2) time. (Difference) .gmtime.strftime ('% H:% M ') # Something like "-04: 00" is expected to be received at # but the result is "20:00" To understand what is wrong with your code, let's execute it one by one: ▶ time.preparation ('08: 00 ') - time. Parse ('12: 00 ') # = & gt; -14400.0 seconds, huh okay. ▶ Time. (Time.only ('08: 00 ') - Time. From (' 12: 00 ')) => 1969-12-31 21:00:00 +0100 Wow, Time.at There is no way of our dreams. Apart from this, I do not know the hours in format in the standard libr...

sql - How can I create TableNameColumnName alias' for SELECT * statement? -

मुझे निम्न आउटपुट होना है: टेबलकॉल्यूम 1 टेबलकॉल्यूम 2 ​​टेबलबीकोलमैन 1 टेबलबिल्ड 2 कुछ वैल्यू कुछ वैल्यू कुछ वैल्यू कुछ वैल्यू निम्नलिखित कथन के लिए: SELECT * AS ... से तालिकाए, टेबलब जहां TableA.Column1 = TableB.Column1 क्या SQL Server 2014 में यह संभव है? क्या मैं हासिल करना चाहता हूं, इसके लिए INFORMATION_SCHEMA.COLUMNS का उपयोग करना संभव है? आप की एक सूची जनरेट कर सकते हैं इस क्वेरी के साथ कॉलम: चुनें STUFF ((SELECT ',' + a.TABLE_NAME + '।' + A.COLUMN_NAME + 'ए' + a.TABLE_NAME + a.COLUMN_NAME सूचना विज्ञान से संपर्क करें I कॉलम के लिए एक WHERE TABLE_NAME = 'पटल (' ',' TYPE ') के लिए' टेबल नाम '। मूल्य ('। ',' VARCHAR (अधिकतम) '), 1, 1,' ')

How to connect to Oracle with datamapper jdbc adapter (in JRuby) and check connection? -

How to check the connection from the Oracle to the JDBC adapter (in jereb) and the connection? I do not understand the documentation: D If you have some examples, please give me Adapter = DataMaper.setup (: default, 'oracle: // user: password @ host /' ORCL ') z = adapter.select (' Select from 1 to double ' )

ios - MKMapViewAnnotation Image from custom image different for many pins -

I'm trying to create several pins from a database of locations, with each custom image. Images base are passed to the server in the 64 format, I am able to create a UIImage to base64 data, but I can not upload images as icons instead of pins for each annotation Are there. Any ideas how can I do this? I tried to help in following these SO terms, but they can only make one preset one, I can not understand how all of these can be edited Any thoughts? Here is my code to pin / annotation, anyone interested: function mapTheseCoordinates (Lat: Double, LNG: Double, username: NSString, full name: NSString) {go home = CLLocationCoordinate2D (Latitude: Latitude, Longitude: LNG) // 2 to period = MKCoordinateSpanMake (0.15, 0.15) to the area = MKCoordinateRegion (in the middle: space, period: period) mapView.setRegion (area , Animated: true) // give 3 annotations = MKPointAnnotation () annotation.setCoordinate (location) annotation.titl e = username nnotation.subtitle = compl...

ubuntu - Unable to Connect to Flask App On Docker From Host -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैंने एक डॉकर सेटअप किया है उबुंटू 14.04 छवि और मैं इसे निम्नलिखित कमांड के साथ चला रहा हूं: डॉकर रन-डी-पी 5000: 5000 एआरआई / पीथॉन -3-फ्लास्क डॉकरफाइल: उबुंटू से: 14.04 आरटीएन-योग्य अपडेट करें & amp; amp; Apt-get install -y python3 python3-pip जोड़ें। / Var / my_app आरयूएन पीपी 3 इंस्टॉल -आर / / आईआर / एमआईएपी / पुनरीक्षण। टीटी एक्सप्ोज़ 5000 सीएमडी ["पायथन 3", "/var/my_app/runserver.py"] हालांकि, अगर मैं पता (स्थानीय होस्ट: 5000) को कर्ल करने की कोशिश करता हूं या किसी ब्राउज़र में उसे देखता हूं, मुझे एक कनेक्शन विफल त्रुटि मिलती है। कंटेनर शो के लिए डॉकर लॉग: http://127.0.0.1.100000 पर चल रहा है पुनः लोड करने वाला क्या मेरे डॉकर सेटअप और / या कॉन्फ़िगरेशन में क्या गलत है या क्या हो सकता है? धन्यवाद। अपने कंटेनर में चल रहे वेब सर्वर लूपबैक नेटवर्क अंतरफलक के पोर्ट 5000 पर कनेक्शन सुन रहा है ( 127.0.0.1 )। जैसे कि यह वेब सर्वर केवल उस कंटेनर से उत्पन्न होने वाले http अनुरोधों का जव...

php - Allow user to withdraw money from their account from my portal -

I am creating a portal when I can pay the user money and purchase product. They can create an account and transfer funds to that account through PayPal for immediate purchase. Now I want to give them permission to withdraw the balance from my account. I have tried to make mass-pay paypal classic API , but it is not allowing me to pay my users in different countries. Is my store default currency Euro Is there a better way to withdraw funds through PayPal? You can try the PayPal Adaptive Payment to send money following Check the link

convert php array of multidimensional arrays to javascript array -

$ array1 = array ("फल" = & Gt; "केले", "सब्जियां" = & gt; "टोमेटो"); $ Array2 = सरणी ("नाम" = & gt; "जैक", "आयु" = & gt; "32"); $ Array3 = सरणी ($ array1, $ array2); गूंज json_encode ($ array3); जावास्क्रिप्ट कोड jquery शामिल हैं: var json_data = $ .ajax ({प्रकार: 'पोस्ट', url: 'स्क्रिप्ट / myfile.php', डेटा: {action: 'myaction'}, डेटा प्रकार: 'जेसन', कैश: गलत, सफलता: कार्य (परिणाम) {console.log (परिणाम);}}); कैसे एक सरणी में json_data को परिवर्तित करें और $ array1 & amp; $ Array2 को javascript arrays! यह json_data सामग्री है: "{" HUM ": [{" label ":" 2014-10-16 17:08 : 55 "," y ":" 58 "}, {" लेबल ":" 2014-10-15 08:16:55 "," y ":" 56 "}, {" लेबल ":" 2014-10- 15 08:16:50 "," y ":" 56 "}, {" label "...

Subtotal and total in jquery when adding inputs with .before -

Edit: This question is asked slightly, here is the link to use the direct answer To do On ('event', 'selector', ceremony); ('Keyboard', 'line input', multi input); I am creating an invoice which allows users to add additional lines, by clicking a button, each line of service payment services is a subset of The problem I am facing is that I can not get subtotal for working for those areas which have been dynamically added to jQuery. & lt; Div class = "control-group" & gt; Here is my invoice form with the button to add another line: & lt; Label class = "control-label" & gt; Service & lt; / Label & gt; & Lt; Div class = "control form-inline" & gt; & Lt; Div class = "line" & gt; & Lt; Input type = "text" class = "span3" id = "serivceName" placeholder = "service name" & gt; & Lt; Input type = "text" c...

cassandra - Supporting logical delete for an existing feed table -

I want to apply logical delete to a news-feed record to support a later version. The system is in production, so any solution should support existing data. Inserting an archive in the feed is idempotent, thus putting the already deleted record (the same primary key) should not be undelete it. To retrieve any solution, the query should support a page of existing or deleted records. Feed table: Press my table with my_feed (tenant_id int, item_id int, created_at timestamp, feed_data text, primary key (tenant_id, created_it, feed_id)) with compression = {'Sstable_compression': 'LZ4 Compressor'} and Clustering Order By (created_at DESC); My thoughts have two approaches, but there are serious disadvantages of these two: 1. Delete deleted records in a different table. The questions are trivial and no migration is necessary, but idempotent is difficult to insert (read only before inserting?). 2. Add Add_deleted column Create a secondary index to support the quer...

java - Create Chat Rooms In openfire via url -

I want to be able to create a chat room through the rest of the webservices of Openfire. To make us user http://example.com:9090/plugins/userService/userservice?type=add&secret=bigsecret&username=kafka&password=drowssap&name=franz&email=franz@ Kafka.com But I can not find any tutorials to guide me, is it possible? Please help. I want this URL because my OpenFire server can be located in a different location than my application webservice. Yes, you can also create chat rooms on HTTP / REST. So you need a MUC Service Plugin. You can find it here: Here is a complete document to create and configure chat rooms: Simple example: Header: Authorization: Basic YWRtaW46MTIzNDU = Header: Content-Type: Application / xml POST Payload Example 1 (required parameter): & lt; Chat rooms & gt; & Lt; NaturalName & gt; Global -1 & lt; / NaturalName & gt; & Lt; RoomName & gt; Global & lt; / RoomName & gt; & Lt...

angularjs - An issue with testing $resource service by $httpBackend -

मुझे लगता है मुझे कुछ याद आती है angular.module ('services') .factory ('UserPreferencesService', [ '$ संसाधन', फ़ंक्शन ($ संसाधन) {रिटर्न $ संसाधन ('/ rest / user-preferences /: id', {}, {getById: {method: "GET", पैराम्स: {आईडी: 'आईडी'} }});}]); परीक्षा: इसे ('आईडी से प्राप्त करना चाहिए', फ़ंक्शन () {// दिया गया वरीयता = {भाषा: "एन"} ; HttpBackend.whenGET ('/ बाकी / उपयोगकर्ता-प्राथमिकताएं / 1')। प्रतिक्रिया (वरीयताएँ); // जब service.getById ({id: 1})। $ वादा। तब (फ़ंक्शन (परिणाम) {console.log ( "Successssssssssssssssssssssssssssssssssssssss"); // फिर उम्मीद है (परिणाम) .toqual (वरीयताएँ);}, फ़ंक्शन () {console.log ("कुछ गलत");})}); यह कभी भी चालू नहीं होता है: "successssssssssssssssssssssssssssssssssssss"। मुझे क्या याद आया? कुछ चीजें गलत थीं और अन्य चीज़ें गायब थीं आपके कोड में मुख्य समस्या यह थी कि आप फ्लश () फ़ंक्शन को कॉल नहीं कर रहे थे जो कि सर्वर स...

c - What's the right way to call xcb_connect_to_display_with_auth_info() given a Xauthority file? -

When I try to install a XCB connection for display stored in a string dpy , I know that I can do this in two different ways to do: just Call xcb_connect (dpy, NULL) , or environment variable display code> dpy and call xcb_connect (zero, zero) . But, my X server requires a Xauthority file, I can only install a XCB connection if I environmental set XAUTHORITY Xauthority file path and then xcb_connect (dpy, zero) is called . I want to install this connection without setting the environment variable XAUTHORITY . I know there is a funcion xcb_connect_to_display_with_auth_info () a xcb_auth_info_t struct in XCB API, but I struct a Xauthority file path for how to make it I do not know at all. How can I do this? A xcb_auth_info_t content struct, XSet Authority Parameters are similar to Unfortunately, this is not well documented. The name is the name of the authorization method (for example "MIT-Magic-Cookie-1"), and data validation data (...

Access Quick Tools Toolbar in Adobe Acrobat XI using applescript -

Image
I've written applescript to automate Acrobat I try to find the UI element inside the Quick Tools toolbar in Adobe Acrobat XI I am here. I have no problem reaching the menu bar: Show menu item menu "Tools" menu bar 1 returns UI elements menu "view" of "device" " But I can not find a way to access the Quick Tool toolbar buttons for some reasons. Please help! Select "UI Element 7" in Group 2 of group "myPDF.pdf" A bit further using Acrobat Javascript. As every button also has an internal menu item, you can use execMenuItem () to execute it. To find the correct name of the problem menu item, you may have to go back to Acrobat 9 or 8, and to run menu menu items from the console, and now, I use Acrobat's user interface (S) Leave a long bouncing about ...

javascript - How to wait until hide effect is ended in jquery -

Here are some solutions, but none of them are similar to my problem: . $ ('.listed-item-table') (not spesificItem). FadeTo ('sharp', 0.2) .hide (1000); I have about 20 items hidden. After this hidden effect I have finished that I will add some object to DOM and show them. While doing the following: $ ('List-Item-Table'). No (SPIIIITIM). Fadeto ('sharp', 0.2) .hide (1000, function) (ad adibilbox (specialize);}); I add the object only after the effect of hiding, but I'm adding it 20 times. How do I wait for all the 20 items to be removed when the effect of hiding and then only DOM ? $ ('.' -Made-table '). (SpesificItem). FadeTo ('fast', 0.2) .promise () .done (function () {// call back code}};

weather - How to get barometric pressure iOS -

Which I know, the new iPhone 6 / Plus is a barometer that will give us the value of air pressure. How do I do this? There are some resources that I can get. This is part of the Core Motion Framework. It highlights two new classes and that you can use barometric pressure Can use to determine. Core Motion offers two new classes (and) that will give you iPhone 6 and iPhone 6 Plus. On both of these devices, you can also use a CMMotionActivity object to determine if the user is on a bicycle. Source:

scala - How can I run tests against jar built by sbt-assembly -

I am running sbt-assembly to create a single jar file that can be deployed elsewhere. I'd like to run your test against this local file against this jar file against. Local. Running against class files is the default with sbt test , but I want to test the jar instead (but without adding a test class file in jar) You need a configuration to create an assembly jar in the exam Import AssemblyKeys._Project.inConfig (TestAssembly) in Base (javascript) (BaseAssemblySettings): = "$ {name.value} -test - $ {version.value} .jar" So now you experiment with uber-test: assembly though I do not know the easy way to run tests with this jar from SBT. I would like to go for a custom command, like test: run-test-assembly which will do something internally scala-classpath uber-jar-test.jar classpath scalatest- & lt; Version & gt; .jar org.scalatest.tools.Runner -p compiled_tests Testing is going on during SBT-assembly assembly phase, but I am pretty sure that i...

mysql - Fetch Table data based on multiple timing referred from other table -

Text after " I have 2 tables in which there is a schedule and other table availability times. The structure is as follows: There may be several rows for the user in tbl_useravailability for tbl_schedules ID int useridit schedulefrom Datetime schedulletill Datetime tbl_useravailability id userid availablefrom availabletill On the same day. This user may be available from 2014: 10: 17 05:00:00 to 2014: 10: 17 12:00:00, 2014: 10: 17-15:00:00 to 2014: 10: 17 18: 00: 00, 2014: 10: 17 19:00:00 2014: 10: 17 23:00:00 The challenge is to schedule the program for other users, available in the table Availability day like where userid & lt; & Gt; 1; After text "itemprop =" text "> How about something like the following (less than the visual sample): as the scheduleid, S.userid, S.schedulefrom, S.scheduletill, UA.id availabilityid, UA.availablefrom, UA.availabletill S.id selection, tbl_schedules, form SUA Include tbl_useravailability in User ID on ...

xaml - How can I prevent this UserControl's text from falling off the left side of the screen? -

Image
Currently when I populate the text block with a lot of text, especially when connecting to site 26 Name is too long , looks like: This is the definition of User Control: & lt; StackPanel Vertical Element = "Center" & gt; & Lt; Progress bar IIiEmentment = "True" /> & Lt; TextBlockName = "txtOverlayText" FontSize = "25" foreground = "white" horizontal align = "center" /> & Lt; / StackPanel & gt; The text is supposed to be centered and if it is too long then it should not fall from the left side of the screen, rather it will appear on the left side and whatever can be 'right' Should not be fit on the sides should be replaced with dots, e.g. Connecting to Site 26 is a name ... Is there a way to do this? Ok, so for some time we are mostly in xaml based accessories Super work drachma Where you can slap on TextTrimming = "WordEllipsis" on some and finally ge...

Powershell console tell host its still alive -

I'm searching with the hole HDD GCI-Rackers and after that I'm working with the result ... me What is to be done, the console tells me still alive? Such as GCI C: \ -Respector Blella .... every 2-minute host "still searching" edit: $ file = get -childItem $ Path -Record -Interaction Siliconalty | Where {$ _. PsIsContainer -q $ incorrect- and $ _ CreationTime -le "$ OldDate"} | Select - Property Name, Full Name | Writing-progress-activism "searching ..." -statas "please wait ..." -the smallest integer ??? There are a lot of files and folders in the $ path, this task will take a few days to complete, how can I calculate percent complete? If I use counting, then will count all the things first?! It can also be fine, if it counting like a file: if ($ countfiles -ge "10000") {Write - Host "is still working, current In $ _ "} and {$ Countfiles = $ countfiles + 1} Will write the status message and write t...

python - Transcendental Equation: can't multiply sequence by non-int of type 'float' -

I'm trying to solve the following in Simply, but I'm not receiving 'type' float 'Error: F = symbol (' F ') S = 7 * 10 ** 9 L = 500 * 10 ** (-9) K = 10.37 * 10 * * (-9 ) E = 1 * 10 ** (-9), 48 * 10 ** (-9), 1c = 25 * 10 ** (-9) solution (F - (S * A) / (1+ ( E * C ** 2) * sec ((2 * L / K) * (SQRT (F * A / E)))))) ------------ ---- -------------------------------------------------- --------- Type error traceback (most recent call final) / & lt; Ipython-input-51-3831e4f1c049 & gt; In & lt; Module & gt; () ---- & gt; 1 solution (Float (F - (S * A) / (1+ (** 2 * L / K) * (SQL * (E * C / 2 **) * (SQL) (S * F * A / E)))) TypeError: Type 'float' can not multiply the sequence by non-int e is a tupal due to a comma. & gt; & Gt; & Gt; E = 1 * 10 ** (-9), 48 * 10 ** (- 9), 1> gt; & Gt; & Gt; E (1e-09, 4.8000000000000006-08, 1) You can increase views like Tuple with only integer, not float, which give...

How to check json for key and if it exists then set the value in java model Object -

I have a model object, which to refresh the content is started with the default value object I Call web service and get feedback and get content from Jason object. I want to check if Jason is an object in response or if this happens then call the Setter and set the data and if it does not leave, do not set it. I have about 300 fields in my object, how can I do it with less code. I am listing my current perspective. My model object is the same public class MyObject {personal string str1 = "initial value 1"; Private string str2 = "initial value 2"; Public Zero Setset 1 (string straight 1) {this.str1 = str1; } Public Zero setStr2 (string str2) {this.str2 = str2; } Public string getStr1 () {return str1; } Public string getStr2 () {return str2; } new value 1 "," val_two ":" New_value2 "} now you need to set me value Jesn feedback at run time MyObject myObject = new MyObject (); if (jsonObject.has ( "val_one")); ...

javascript - where to validate user input on the server side? -

I understand that web development user input should be valid on client and server side. I find it hard to figure out where to validate the input on the server side. For example, after request, it passes through the middleware and goes to the controllers, in the controllers I have other modules that take input and finally reach their destination and then answer. Inputers should be fully inputed so that they are put into other modules, as expected? Or should I check the input in these modules that take input? Or should I check the "upheaval" of the input in the controllers (basic primitive type, etc.) and in the module professional logic check should protect itself (value is positive, negative, etc.)? Example Code: Controller. Js var mashUp = Required ('./mashupService'); Var create = function (req, res) {var user = req.body.user; Var imageName = req.body.imageName; Var description = req.body.description; // More recognition here? If (! User) {return APRIP...

java - synchronize read of variable -

I do not understand how to do this. I have this barrier: A variable can be read in maximum 5 threads, others should wait in until the variable can be read again . public zero method A () {lockI.lock (); Modify {countIreaders == 5} while trying {conditionI.ait (); } CountIreaders ++; } Grip (Interrupted e) e.printStackTrace (); } Finally {if (condition) {countIreaders = 0; LockI.unlock (); ConditionI.notifyAll (); } And {lockI.unlock (); }}} With this code I have made it serial, but it is not what I want to achieve. How do I modify the code? I do not really understand your code, but it seems that you have a search for one. A semaphore is useful for thread synchronization. I can make a new semaphore with a 5 token / permit in this way: semaphore cm = new semaphore (5); // Preliminary // in your data structure ... Public Zero Your Thread Function () [//] ... in the thread of your readers: // Each thread will definitely use the same semaphore / a thread Token from s...

ruby on rails - Whats a succinct way to express 'If an array exists then do' -

क्या निम्नलिखित को व्यक्त करने का एक अधिक संक्षिप्त तरीका है: यदि Model.all array = मॉडल। सभी सरणी.ईच करें | एक | मेरे मामले में Model.all एक सहायक विधि है ( get_all_of_those () )। इस दृश्य में, मैं परिणामों के आधार पर तालिका में डेटा प्रदर्शित कर रहा हूं। a.info हो सकता है "div class = 'row' & gt; # {a.name} & lt; / div & gt; आदर्श.सभी हमेशा सच्चाई है और हमेशा एक है सरणी-जैसे ऑब्जेक्ट (सख्ती से यह ActiveRecord :: रेलिंग में रिलेशंस ऑब्जेक्ट 4; रेल में एक एरे 3) आप बस ऐसा कर सकते हैं: मॉडल.all.each do | a | यदि कोई मॉडल नहीं हैं, तो लूप भी एक बार निष्पादित नहीं किया जाएगा। (हालांकि ध्यान दें, यह कोड कुछ दिलचस्प नहीं करता है मॉडल के साथ, ताकि आपको अपने प्रश्न को इस प्रकार अपडेट करने की आवश्यकता हो: आप अंतिम परिणाम क्या चाहते हैं? एक मौका है कि आप Model.pluck (: info) ) की तलाश में हैं

c++ - How to modify a vector member's value? -

I was trying to use vector svec to store some string values. But when compiling in Dev C ++ 5.6.1, the compiler reported an error of "No match for operator =". Why is this error and how to fix it? Thank you. contains # lt; Vector & gt; # Include & lt; Iostream & gt; #include & lt; string & gt; using namespace std; Int main () {Vector & lt; String & gt; Swek [100]; {Svec [i] = "ABC" for (int i = 0; i & lt; 100; ++ i); } Return 0; } [Error] There is no match for 'operator =' (Operating Type 'std :: vector>' and 'const char [4]') Edit: Problem vector is in svec [100 ]; By changing it vector svec (100); edit2: I'm curious that the compiler is concerned about this low declaration. Is svec still declared as a vector? vector & lt; String & gt; Swek [100]; vector & lt; String & gt; Svec [100]; std :: vector & lt; Std :: string & gt; Creating an array with 100 elemen...

Building install4j project fails with "/bin/sh failed with return code 1" -

I am creating the install4j project in a version mode and at the very end of the creation it will be spellbound Fails (no other errors are shown): 07:08:29 [install4j] write md5sums. 07:08:29 [install4j] write output.txt. 07:08:29 [install4j] writing updates.xml 07:08:29 [install4j] 07:08:29 [install4j] Build completed in 126.5 seconds. 07:08:29 07:08:29 Build Fell 07:08:29 /home/jenkins/workspace/Product-Build/src/build.xml:1736: The following error occurred while implementing this line: 07:08: 29 07:08:29 /home/jenkins/workspace/Product-Build/src/macros.xml: /home/jenkins/workspace/Product-Build/src/build.xml:1745: while executing this line an error : 228: Failed / bin / failed with return code 1 : I found the following exception by looking through the log that the failure was interpreted: 08: 43:55 [install4j] com.aad: path "& lt; pATH & gt; / file" does not exist 08:43:55 [install4j] com.install4j.bbfa (ejt: 241) 08: 43:55 [install4j] on com.install4j....

Android KeyChain.createInstallIntent returning immediately -

In my Android app, I try to install a PKCS 12 file (certificate and private key) retrieved from my server I am doing To do this, I am using KeyChain.createInstallIntent () . I go through the file and name to use as Xtra, then use startActivityForResult to close the activity. This is working on my Galaxy Tab 2 4.1.1 works fine on Jelly Bean However, opening the system dialogue to install the certificate as the candidate, running 4.4.2 KitKat on my Galaxy Tab 3 , The onActivityResult method is immediately called a result code of RESULT_CANCELLED . The app is trying to get the notified of the success / failure of the certificate, then open a browser window and go to the success or failure page accordingly. Secure void importPkcs12 (Byte [] pkcs12, String default name) {Intent Installintent = Ki.Credit InstantIntent (); InstallIntent.putExtra (keys. XTRA_PKCS12, pkcs12); InstallIntent.putExtra (KeyChain.EXTRA_NAME, defaultName); StartActivityForResult (installIntent, INSTA...

javascript - Binding Controller Property containing HTML in AngularJS -

First of all: I'm absolutely new to Angular JS but have worked on MVC projects in other languages. I try to bind the property with HTML. This code is: HTML: & lt; Div ng-controller = "MyController" & gt; & Lt; P & gt; {{About}} & lt; / P & gt; & Lt; / Div & gt; js: .controller ('MyController', ['$ scope', function ($ radius) {$ scope.About = "it is I do not want now HTML is encoded ( & lt; br / & gt; I have tried it on & lt; p ng-bind-html = "about" & gt; & lt; / p & gt; No output came P> You need to allow html in your text Which does not by default by angle. Hard Distinguished escaping (SCE) is a condition in which the enigulers require bindings in some contexts, which is consequently marked as safe to use for that reference. An example of such reference is the user's ng -Bind-HTML-controlled arbitrary HTML is binding. We may get these references ...

Java regex to find whitespaces or upper-case characters -

I have a method that validates the string and ensures that it has any white space or upper- The cases are not: boolean valid (string input) {if (input.matches (". * * \\ S * ([AZ] +)")) {return false; } Back true; } Unfortunately, when I run it, it just does not work. It does not throw any exceptions, it only allows to pass verification to all input strings ("HelloWald", "Hello World", "Hello World", etc.). Any ideas where I am going wrong? you .matches ("[^ explanation Ul Li> > + ensures that your string is at least 1 character or more.

python - Django - Save a new table1.PK and table2.PK and table2.FK -

I created 2 forms based on the Digengo-Crisp forms. Form1 shows Ordrhader Form 2 shows the Orderline in formats When I have an existing order header, So I see the headers and the lines, I can adjust and save open forms, just fine. When I open the form blank, I select a customer in the order header and then add some order lines, but here the orderline can not save any FK value for the orderline. Question: I order it. P.K. Order order How Can I Save When I Submit a Hit? my thoughts def orderline_formset (request, id = none): If ID: OrderID = OrderHeader.objects.get (P = ID) and: OrderID = OrderHeader () OrderLineFormSet = inlineformset_factory (OrderHeader, order line, OrderLineForm, additional = 1, can_delete = true) form = OrderHeaderForm (eg = OrderID) formset = OrderLineFormSet (eg = OrderID) Assistant = OrderLineFormSetHelper () If the request. method == 'POST': OrderLine.orderheader = OrderID formset = OrderLineFormSet (request.POST, eg = Orderid) if ...

ruby on rails - Stub Method error in request spec -

I study the API tutorial with ROR (Ruby -2.2, Rail 4.x). This is a fantastic book to follow, but I have found this issue in the RSPC exam in Chapter 5 (Please mention that Listings 5.9 See.) Failure / Error: Authentication. Stub & lt ;: request & gt; .and_return & lt; Request & gt; # & Lt; Authentication: 0x000000075fe220 & gt; Not authorized: request source code: class authentication includes authenticated end details Authenticable do let (authentication) {Authentication.new} " # Current_user "do @customer = FactoryGirl.create: Customer Request Before the orders ["authorization"] = @ customer.auth_token authentication.stub (: request). And _ Return (Request) Finally "Authorization Header to User" How can I fix this problem? spec / controllers / concerns / authenticable_spec .rb Requires a certified end description in the 'rails_helper' class authentication attributable, type = & gt; : Cont...

javascript - Button click in iFrame on Page Load -

I have an embedded IFrame (a map) and click the search button to click on the page load to display the search result. is required. Action does not change the URL when clicking the search button on the map. Has anyone tried this action before anyone and is it possible? One ID = "search1" in the button and I have tried the script below. First there is a basic document ready and delay in another set (I was hoping that once the map is loading and the script will start searching ). & lt; Script & gt; $ (Document) .ready (function () {document.getElementById ("search1"). Click ();}); & Lt; / Script & gt; & Lt; Script & gt; $ ("Document") ready (function () {setTimeout (function () {$ ("# search1"). Trigger ('click');}, 20);}); & Lt; / Script & gt;

javascript - Constructor functions prototype enumerable? -

After reading some posts and documents, I'm still not clear on the actual definition of a calculable asset, moving forward, Let me tell you where I am confused: I make a constructor function and add a prototype. var myAlphabet = function () {this.c = 5 this.d = 6} myAlphabet.prototype = {E: 7} now I Using a new keyword, I can create a new example of my alphabet. var MyObject = new myAlphabet (); Using the For-in Loop, I want to console.log all the keys in the example of my object (not the key from the prototype). (key in myObj) {console.log (key); } For this log: for 'c' 'd' 'e' According to .in Loop Documentation: for..in statement repeats on the intentions of an object in arbitrary order. For each separate asset, statements can be executed. Reading the document for ownership of properties is determined that the asset belongs to the object and not for its prototype series. So the prototype made earlier is n...

drupal - How to place custom views area handler into views header programatically? -

I had to complete a task by creating a custom view area handler. It all works fine, and I want to send the handler to the header I can keep it in the area. Unfortunately, due to the structure of the deployment on this project, I simply can not update the code related to the scene. To create my module custom area handler, it also requires changing the scene to place the area handler in the header. I have made the scene area handler properly with the following code: / ** * applies hook_views_data (). * * Purpose: Install an idea area handler to display. * / Function custom_shipping_notification_views_data () {// start data array $ data = array (); // Define a handler for the area used to define a vessel, where the free ship is worth $ 'data [' commerce_der '] [' free_shipping_smus'] = array ('title' = & gt; ; T ('Free Shipping Notification'), 'Help' => (T. 'Displays Free Shipping Information on Cart Form'.), 'Field...

How do I get git to stop "lying" to me about being up-to-date with a remote branch? -

By my god machine, I pushed my new comment on the original / test branch Now I need to drag that code into the deployment machine, so I checked the test branch like this: $ git checkout test I had to be on the test branch already, so I got this message: already on 'test' but I also this message Lights, which (on the surface) is very confusing: is up-to-date with your arm root / test '. My branch, in fact, is not updated with version of original / test which is on bitspace. I just pushed new commands, finally! I realize that I am receiving this message because my local copy is up-to-date with test my local copy Basic / Testing , but I do not consider the information which is not useful in this context, and it is very easy to misinterpret this message that my local copy is test today With a copy of Remote to Basic / Test , even if it is not . Is it possible to silence only this message "Your branch up-to-date" message? The...

amazon ec2 - IIS FTP cannot connect, 421 Service not available error -

IISFFF server stopped accepting connections, "421 service not dropped, remote server connections has stopped." The error message was rebooted after the example. The problem does not seem to be a firewall problem. I installed an IIS FTP server on an EC2 example that ran Windows Server 2012 R2. Very basic, my boss just wanted plain FTP I had installed a SFTP server on the same example before, using Sigwin SSDD, which was working just fine. I have established the "default" IIS FTP server, and it was working fine for a few days, as long as it was in the file transfer, it was hanging. According to the AWS Monitor the CPU was estimated at 100%. I could not do RDP in this example, so I had to reboot it since, I could not connect to the IIS FTP server. According to the Task Manager, the status of "FTPSCC" process is going on. I've closed it and have started it several times, the Windows Firewall is off, the AWS firewall port 20, 21, and 50,000-51,000 are...

python - Logging with google acount in Flask -

I'm starting a web project (in flask) where the user needs to authenticate with their Google account so that the data Can save later Using the file in your Google Drive There are some libraries in the flask, which do not have to be used to authenticate, but to read their doctor, they do not support all OAuth2 The following 2 libraries have OAuth2 However, support. My question is, what is the best way to prove Google accounting? Or does Google have some extension to make an easy entry?

javascript - Executing a function before JQuery $destroy -

मेरे पास ऐसा कोड का एक टुकड़ा है $ ('# id') ('$ नष्ट', फ़ंक्शन () {...}}) मुझे यह समारोह नष्ट घटना से ट्रिगर करना चाहते हैं, लेकिन इसे नष्ट करने से पहले इसे निष्पादित करना चाहिए, अभी यह उसके बाद निष्पादित है क्या कोई यह सुझाव दे सकता है कि कैसे इसे प्राप्त करना है? प्रॉक्सी के रूप में $ broadcast का उपयोग करें (घटना, विकल्प) {console.log (स्ट्रिंग ()। कॉन्सैट ("इवेंट:", इवेंट, "पुराने: कॉल करने के लिए $ destroy : ", Options.oldValue," New: ", options.newValue); / * नष्ट करने से पहले सामान निष्पादित करें .... .... * / / * मैन्युअल रूप से कॉल को नष्ट कर दिया जाता है जब / $ दायरा। $ प्रसारण (" $ नष्ट करें ");} / * कॉलबैक * / $ का दायरा जोड़ें। $ (" पहले डेस्टोरय ", पहलेस्टोरॉय) / * ट्रिगर ब्रॉडकास्ट ईवेंट * / $ गुंजाइश। $ प्रसारित करें (" पहले डेस्टराय ", {newValue: $ scope.id ++, oldValue: $ Scope.id}); $ ट्रांस्काइक्टेड फ़ंक्शंस अब अटैचमेंट की गई सामग्री में ईवेंट हैंडलर को नष्ट कर देते ...

ios - HTML text input only allow alpha, numeric, and special characters like the password input does? -

On password input, it does not allow emoji characters and on iOS you need to focus on the password input field Can not even use the keyboard I would like to do my normal text input. I was thinking that you can specify 'accept-charset' on the input but you can not To prevent this, users emoji characters input into a text field. I know that there are JS solutions for this, but I was hoping that instead of an attribute or instead I can use it to control it. In addition to this, I tried to set "UTF-8" and some others 'accept-charset' on the form tag, it did not make any difference. : / I'm looking exactly for the same option, but the exact solution was not found. The workaround is using type = number () I was just trying on iOS and it works, but "ABC" instead of "ABC" alphabet keyboard view "123" numeric - on special keyboard view The keyboard is missed. But it actually removes the emoji keyboard! Edit: So t...

pointers - VBA is my object deleted if I set it to a new one -

while not code_Download = 0 'code_Download = 0 - & gt; If Delay is correct & lt; 30000 then delay = delay + 2000 or else MsgBox "delay too long" CREATEtemp_fileXML = false exit function then set IE = New InternetExplorerMedium ' Then I set a new InternetExplorermedium every pass I passed in the loop. Without that I could not find any error in the recognized interface. I was wondering how can I destroy the previous signals or if it is a "not too bad" practice you thank you This is not so bad in VBA. You can set a after your IE = nothing to IE.Quit if you have completely left any reference that was before the next step Want to eradicate? I do not believe that this will not make much difference in this case because IE.Quit should send the object in anonymity anyway.

python - try url, if error, then try next url. How? -

I am new to Python I have been searched through SO and Google, and I can not understand it. I have a script that attempts to connect to an API. However, when it returns an error, then I want to try the next URL for that API. Even what I have so far: def fun1 (): try: raw = urllib2.urlopen (pubapi1) .read () dictionary = Json.loads (raw) URLError, except error: print error I'm not sure where to go after this. If it fails, then I want to check it out pupapi2, pupapi3, etc. Once it successfully connects to a URL, then I want to continue the program. Is there any advice? . . Update: OK, so I have given you advice, Deepawali, and now I have this: raw = 0 def Func (): Try: #Rotate Public API URL = [pubapi1, pubapi2, pubapi3] URL: via url: Try: Global Raw Raw = urllib2.urlopen (url) .read URLError, except error ( ) Print "Success" Return: Print str (error) + ": Attempt to connect to the next public API" time.sleep (1) Other: Print "Public ...

ruby on rails - ActionController::UnknownFormat respond_with using Backbone.js -

I am trying to get data in my archive, but I get an unknown format error in the rail. I have been following the railcast to know about the spinal cord. I am on the part where we are providing data in a view through the archive, but when I use the example code unknown format error This is my Rail Films Controller ClassroomController class & lt; ApplicationController response_to: response to json dff index_in if movie.all? @user = User.find (session [: user_id]) @ movies = @ user.movies End End This is my Rail Router file, Rails.application.routes.draw 'session / new' root 'movies # index' get 'signup' = & gt; get receive. 'User #' Get New 'Login' = & gt; 'Session # new' post 'login' = & gt; 'Create session' to delete 'logout' = & gt; 'Session # deleted' scope "API" do the resources: movies ,: fault = & gt; {: Format = & gt; "JSON"} End Resource...

selenium - Finding element by ID is not working in protractor -

When I find an element with ID then it is not working in my code. - This is the HTML where 4 tabs are visible. Under each option avi option is available. Each of the 4 tabs has IDs but identifying using those people is not working. HTML: & lt; Nav id = "monitoring-tab" class = "pure-menu pure-menu-open pure-menu horizontal ng-scope" & gt; & Lt; Ul & gt; & Lt; Li id = "now-tab" ui-sref-active = "pure-menu-selected" ng-hide = "hide tab.Now" class = "ng-hide" gt; & Lt; A ui-sref = "app.monitoring.real-time" href = "# / monitoring / real time" & gt; Now & lt; / A & gt; & Lt; / Li & gt; & Lt; Li id = "day-tab" ui-sref-active = "pure-menu-selected" class = "pure-menu-selected" & gt; & Lt; A ui-sref = "app.monitoring.historical.day" href = "# / monitoring / historical / day" & gt; Day & lt; ...

html - Remove far right margin on gallery box -

Can you, please help me remove the right margin from my box? I am trying to use a pseudo-element in CSS after :: but it does not seem to work. () & lt; Div class = "content-wrap" & gt; & Lt; Div class = "content-center-rap" & gt; & Lt; Div class = "index-cats-rap" & gt; & Lt; / Div & gt; & Lt; Div class = "index-cats-rap" & gt; & Lt; / Div & gt; & Lt; Div class = "index-cats-rap" & gt; & Lt; P & gt; Test & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; .content-center-wrap {width: 960px; Height: auto; Minute-height: 400px; Hidden flurry; Background color: #fff; Margin: 0 auto; Padding-top: 40px; Padding-bottom: 40px; } .index-cats-wrap {display: block; Swim left; Width: 298px; Height: 400px; Margin-right: 20px; Range: 1 px solid # 95 a5a6; } .index-cats-wrap :: after {margin-right: 0px; } Thanks. You need a CSS selector. .ind...

c - Why does OPENSSL_cleanse look so complex and thread-unsafe? -

यह OpenSSL 1.0.1i में OPENSSL_cleanse का कार्यान्वयन है अहस्ताक्षरित चार cleanse_ctr = 0 ; शून्य OPENSSL_cleanse शून्य (शून्य * पीटीआर, आकार_टी लेन) {अहस्ताक्षरित चार * p = ptr; Size_t लूप = लेन, सीटीआर = शुद्ध_एक्ट्रर; जबकि (लूप -) {* (पी ++) = (अहस्ताक्षरित चार) सीटीआर; सीटीआर + = (17 + ((आकार_टी) पी & amp 0xF)); } P = memchr (ptr, (अहस्ताक्षरित चार) सीटीआर, लेन); अगर (पी) सीटीआर + = (63 + (आकार_टी) पी); Cleanse_ctr = (अहस्ताक्षरित चार) सीटीआर; } यह जटिल और धागा-असुरक्षित (वैश्विक वैरिएबल cleanse_ctr को पढ़ने और लिखकर) लगता है। क्या कोई इस कार्यान्वयन के बारे में कुछ समझ सकता है? क्या किसी उपयोगकर्ता को इसमें संभावित डेटा दौड़ के बारे में चिंता करने की आवश्यकता है? इसमें डेटा दौड़ है कोड है, लेकिन इससे कोई फर्क नहीं पड़ता क्योंकि चर का बिंदु केवल कचरा डेटा को अलग करना है जिसके साथ स्मृति का एक टुकड़ा भरना है। दूसरे शब्दों में, यह वास्तव में कभी भी कोई फर्क नहीं पड़ता कि किसी भी दिए गए धागा उस वैरिएबल से क्या पढ़ता है। उपयोगकर्ताओं को इसके बारे में चिंतित होने की ...

asp.net - Combining multiple IndexOf -

Is there a way to combine multiple indexes () to make it more compact? String as a slow UserAgent = HttpContext.Current.Request.UserAgent if not (UserAgent.IndexOf ("chrome")> 1) OrElse (UserAgent.IndexOf ("Safari ")> -1) Then, 'this end if you enter instead of can use indexOf and a collection to view: dim browser = {"chrome", "safari"} if not browser . If any (function (b) UserAgent.Contains (b)) then terminate with or query syntax: dim matching browser = browser In the browser, where UserAgent.Contains (Browser) is not MailBurners. If any () then end

javascript - How to update all data in jQuery.dataTables with client-side data? -

I have been unable to get jQuery.dataTables to allow me to update the data in the table using javascript for. I know that this has already been discussed, but I can not do any such solution which I have seen. I have the parameter named data that represents the data to display in the table. It has been passed in a function. I have thought that the way to update the data will be like this: // I have checked that the new data has returned $ Table.data () after $ Table.data (data) in; // Now the data is updated, redraw the table, the data is updated. $ Table.fnDraw (); It does not seem like the above code runs. Update: What am I doing? After doing this more careful research, I came to know that I can get the desired result as follows: $ table.fnClearTable (); $ Table.fnAddData (data); $ Table.fnDraw (); However, the above problem is that the user loses his place in endorsement and has to navigate back to the page on which he was. Well, this issue I had backed ...

multithreading - Ghostscript - speed up PS files with 100's of pages for output to PDF files -

I'm not an end-user programmer, but connected to this project. We have a large number of PS files we need to convert to look at (proofing) before printing the PS files. Each PS file has 800 pages or less. PS files are typically 60-250 meg per each. . In the VM , 10 cores use 40 gigs RAM and 4-disk RAID-0 15,000 rpm drives. If there is help, then there is a lot of unused capacity. The commands I have tried are: gswin32c.exe -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE = pdfwrite | -sOutputFile = ".. \ output.pdf" -f ".. \ IN \ input.ps" and gswin32c.exe -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE = pdfwrite -dNumRenderingThreads = 3 | -sOutputFile = ".. \ output.pdf" -c "30000000 setvmthreshold" -f ".. \ IN \ input.ps" I compared the test compared to some of these The second version with two commands, and threads option, is slow. One of the test files has 90.5 MHz PS data, resulting in 716 pages in the PDF file. ...

Parse command line arguments in a Ruby script -

I want to call the ruby ​​script from the command line, and I want to pass the key / value pairs in the parameter. Command line call: $ ruby ​​my_script.rb --first_name = donald --last_name = knuth my_script .rb: puts argsfirst_name + args.last_name What is the standard Ruby approach to doing this? In other languages, I usually have to use a choice parser. In Ruby I have seen that we have ARGF.read but it seems that the key / value pairs do not work like this example . Looks promising, but I can not tell if it really supports this case. Based on the answer given by @ Martin Cortez, this is a small one which makes the key / A hash of the value pair, where the values ​​should be combined with a = sign it also supports flag arguments without values: args = hash [ ARGV.join ('') .scan (/ -? ([^ = \ S] +) (?: = (\ S +)) / /]] ... Or alternatively ... args = hash [ARGV.flat_map {| s | S.scan (/ =? ([^ = \ S] +) (?: = (\ S +)) /}}] called with- x =...

terminology - What is meant by the term "inplace" -

I have a vague meaning of the meaning of this period, usually in the context of data structures and algorithms which depend on it Swap the shuttle data around the containers at extreme and do not. But I want to hear some rich definitions and nuances for people's knowledge of this period. To take a shot in it myself, I can say that in some place (interesting subdivision, what actions can come before inside? Taking place, moving in place, copying in place?) Elements of container data To move from one memory place to another, for the second copy of the entire container. "O" (1) extra space ".

Error related to decimal format when spring application try make a payment with PayPal -

In my current spring project, I recently added support to PayPal. But right now, the payment has only been exhausted when I have tightened the values ​​of the amount in the source code. The methods that handle the payment process in my service category mount the variable where this value is stored in this way: decimalf df = new substitute ("0.00"); Float value = hero (client); String svalue = df.format (value) .replace (',', '.'); System.out.println ("valor =" + value); System.out.println ("hero (string) =" + tailoring); Description Details = New Description (); Details.setShipping ("0"); Details .Setbottle (Silv); Details.setTax ("0"); Zodiac = new amount (); Amount.setCurrency ("BRL"); Zodiac. Settool (silva); Amount.setDetails (description); Transaction Transactions = New Transactions (); Transaction.setAmount (amount); Transaction.setDescription (select "No Site Loose On Line"); When I r...

ajax - jquery post request + response in Django -

I am trying to request a post with jquery in Django. Unfortunately I have not been successful yet: Actually I see only one post request in Firebug, which is 200 and I get the following results (new to any image posting too): Can anyone help me find out what I In the FYI, I have commented on the CSRF line to overcome that issue. Time Being: "# django.middleware.csrf.CsrfViewMiddleware '," views.py: django import or json presented .shortcuts import django.http import HttpResponse def index (request) to submit returns (request, 'index.html') def ajax_test (request): If request.method == 'POST' and Requestkis_ajax () : Name = request POST ['name'] city = request.POST ['city'] message = name + 'city in return' httpresponse (json.dumps ({'message': message}) Return submission (request, 'Ajax.html ') index.html: & lt; Script src = "http://ajax.googleapis.co M / ajax / libs / jQuery / 1.11.1 /...