Posts

Showing posts from January, 2013

python - 'NoneType' object is not callable using 'find_all' in BeautifulSoup -

Here's my code using find_all, but this is my code. Works great with: (): To get beautiful suits R = requests from beautiful soup imports to import. (URL_DEFINED) Print Rustusodod Soup = Beautiful Soup (Rtext) Print soup.fund_all ('ul') What I found: Tracebacks (Most recent call end): File "scraper.py", line 1 9, & lt; Module & gt; Print soup.find_all ('ul') TypeError: The 'NoneType' object is not worth the corner It seems that you are using Sundersup version 3, in which a slightly different naming convention is used, such as: .findAll , while SunderSupo 4 standardized naming, like more PEP8, Such as: .find_all (but retains the old naming for previous compatibility) Note that soup ('ul') is equal to both search for all . To download and install, install pipes PrettySpeed ​​4 . Then to change your import: import from bs4 BeautifulSoup Then you are good go.

persistence - How can I implement persistent/fault-tolerant replication using PouchDB? -

PouchDB of repeat () functions fault are not tolerant and if you open your Internet Replication Will have to face connection or some network barriers, whenever you have an internet connection, you need your app to replicate the data. Of course, you can apply your own retry algorithm, but this requires a basic number of work. Is there a plugin that we can use? I've just been released, continued a plugin for replication with this plugin, you just var db = new PouchDB ('todos'); // instead db.replicate () var persist = db.persist ({url: 'http: // localhost: 5984 / todos'}); You can also listen for connect and disconnected events.

asp.net mvc 4 - RedirectPermanent working on local server but giving Error 500.19 on remote -

We are trying to implement a new ASP.NET webapplication. To ensure compatibility with older customers, who use the webservice on a URL which is no longer valid, the following solutions: context.MapRoute ("WebSwies_LlGlassi-Compatibility", "Oldname / Webservices / getVersion ", new {controller =" redirection ", action =" index "}); This method is in Redirect Controller: Public ActionResult Index (String Name) {Redirect Permanent ("/ webservices / update / getlatestversionLegacy? Name =" + Name); } Everything now works on the local Visual Studio Development Server, but once I work on remote IIS 7.5, I get a HTTP error 500.19 - Internal Server Error telling me, \ Web.config file \ path will not be found here \ old \ web.config Note: access to / webservices / update / GetLatestVersionLegacy is working directly on remote! I found a solution by contacting the server administrator, another application pool was handed ove...

How to create student mark sheet like Turm in SQL Server -

I want to show a student mark sheet like this: ----- -------------------------------------------------- - First tour. Second Touram | -------------------------------------------------- ------- S_ID | SUB_NAME | Outf. Points | Outf. Mark ------------------------------------------------- -------- 101 English 100 90 100 90 101 History 100 80 100 80 101 Mathematics 140 80 140 80 101 Sanskrit 100 75 100 75 102 English 100 80 100 80 102 History 100 80 100 80 102 Mathematics 140 80 140 80 102 Sanskrit 100 80 100 80 I use the pivot keyword for this I get this output table #t (S_ID integer, create SUB_NAME varchar ( 10), integer, mark integer, term integer) in the #t (S_ID, SUB_NAME, term, outof, marks) value (101, & amp; # 39; Mathematics & amp; # 39 ;, 1,140,80 ) Insert in #t (S_ID, SUB_NA ME, Terms, Outof, Marks) VALUES (101, & amp; # 39; English & amp; # 39; 1,100,90) #t (S_ID, SUB_NAME, Term, Outof, Marks) Value (101, & # 39; SANSKRIT & amp; # 39; 1,100...

c++ - negatives in a stack while looping through it -

I am trying to write a function that tells the user the number of negative numbers in the stack. I stuck with the following and I am not able to get the right answer yet. I tested it with several test stacks. I think the problem is that how loops are kept. Any help will be appreciated! int negcount = 0; For (int i = 0; i What will work for you here: int negcount = 0; While (mystack.size ()> 0) {if (mystack.top () & lt; 0) {negcount ++; Mystack.pop (); } And {mystack.pop (); }} Revenge crooks;

java - is rollback possible in hibernate if one transaction fails among multiple transaction to different tables? -

मेरे पास एक विधि है: // तरीके निजी शून्य रूपांतरण (ट्रांसफार्मलिस्ट कनवर्ज़न सूची) { टेबल ए टीए = ट्रांसफार्मलाइस्ट.गेटटेबलए (); टेबलब टीबी = ट्रांसफॉर्मलिस्ट.गेटटेबलबी (); टेबलसी टीसी = ट्रांसफॉर्मलिस्ट.गेटटेबलसी (); daoObj.saveA (टीए); daoObj.saveB (टीबी); daoObj.saveC (टीसी); } अब, // save ए मेहोटोड सार्वजनिक शून्य सेव (तालिका ए टीए) {सत्र सत्र = संदर्भ.गेटहाइबरनेट सत्र (); कोशिश {if (सत्र! = शून्य) {लेनदेन टीएक्स = session.beginTransaction (); tx.begin (); session.merge (टीए); tx.commit (); }} पकड़ (अपवाद ई) {tx.rollback (); कुछ कुछ एक्सक्साशन फेंकें (ई। मेसेसेज ()); } अंत में {यदि (सत्र! = नल) {session.clear (); इसी तरह, // saveB मेहोटोड सार्वजनिक शून्य बचाना (TableB टीबी) {सत्र सत्र = संदर्भ। टैग: हेबरनेटसेशन (); कोशिश {if (सत्र! = शून्य) {लेनदेन टीएक्स = session.beginTransaction (); tx.begin (); session.merge (टीबी); tx.commit (); }} पकड़ (अपवाद ई) {tx.rollback (); कुछ कुछ एक्सक्साशन फेंकें (ई। मेसेसेज ()); } अंत में {यदि (सत्र! = नल) {session.clear (); }}} और...

regex - the use of "+" in sed regular expression -

गूंज "lfj" | sed -e "s / ^ \ s + // g" lfj मुझे याद है + इंगित करता है एक या एक से अधिक , इसलिए के सामने दो सफेद रिक्त स्थान हैं, ऐसा क्यों नहीं पट्टी कर सकते हैं आपको + से बचने की आवश्यकता है। प्री> $ echo "lfj" | sed -e "s / ^ \ s \ + // g" lfj बेसिक एसएआर (बेसिक रिज्यूलर एक्सप्रेशंस) का उपयोग करता है। बीआरई में पिछले एक या अधिक बार दोहराए जाने के लिए + बनाने के लिए, आपको इसे बचाना होगा। विस्तारित रीगेक्सप विकल्प -r को सक्षम करें Sed को बीआर के बजाय ईआर का उपयोग करने के लिए sed। $ गूंज "lfj" | sed -r "s / ^ \ s + // g" lfj

accessing Java HTTP Request Object with php -

I am working in a PHP environment and want to get the Java HTTP Request object. It will be on the host website from an external source. The object will be in this format: POST / fail? Install = XXXXXX and msgType = authResult HTTP / 1.0 content-type: application / x-www-form-url; Charset = UTF-8 Host: www.worldpay.com Content-Length: 973 User-Agent: WJHRO / 1.0 (Java on the World HTTP Configurable Object) Area = New + Format + Area & amp; AuthAmountString =% 26% 23163% 3B10.00 & amp; _SP.charEnc = UTF8 & amp; Desc = & amp; Telephone = & amp; Address 1 = new + format + address 1) I understand that Java can use the Java Request object like this; Protected Zero DoGet (HTTPPrelevate Request Request, HTTP Server Response Response) Servlet Upption, IOException {String param1 = request.getParameter ("Ultimate 1") throws; String param2 = request.getParameter ("Ultimate 2"); } The issue for me is that I work in PHP and need to convert strin...

R - joining/merging rows in one dataset -

I would like to know how to use R to merge rows into one data data. Currently my data looks like this: Lesson 1 Lesson 2 Lesson 3 Lesson 4 Bob Aaba Ab ABC Robert Aba ABC ABC Fred Abd Abe Abf Martin AG Abhi Abi If text two and lesson 3 are the same for both of the two rows (in lines 1 and 2) I would like to create it in one line with more columns for other data text 1 text 1a text2 text3 text4 text4a bob robert abba abbey C ABC abd Fred na abd abe abf nah mart na ag now now NA I did something similar to merge into joining and joining two separate sets of data join = join (Data1, Data2, by = c ('Text2'), type = "full", match = "all") Within a group I can not do this how to duplicate it. I think it may be possible to use gross but I have not used it before, my attempt was: MyDataAgg = Total (MyData, = list By (MyData $ Text1), C) But when I try, I am getting an output that looks like this on the summary: 1 -none-numeric 1 -one ...

python - Linking Django and Postgresql with Docker -

I have two dock containers. First of all, there is a postgrescle container, which I run using the following command. sudo docker run -v / home / mpmsp / project / ezdict / postgresql / data: / var / lib / postgresql / data-p 127.0.0.1:5432:5432 -name my postgrads- D postgres Based on this and it is working perfectly, I can connect from host to postgrescale. The second container is a container with my demo application. The image is created using the following dockfile (on the basis): from Python: 3-atom exposure 8000 5432 CMD ["/ bin / bash"] and I run the following command to this container sudo docker run --link my-postgres: My-postgres -v / home / mpmsp / project / ezdict / ezbkend: / usr / src / app -name my-app -i -t my-app address from PS output by dock Runs that contain container links NAMES my-app / my However, when I'm local I go to: 8000, I see an error page from Django, OperationalError at / api-auth / login / server could not conne...

java - An array of BufferedImage is showing null for the values set -

In class getPathGiveIcon, giving an array of strings for the getPaths () method is an array of this GetPaths () image Icon Hope to go back In this process, I am trying to create a file by name of each path in the array of strings, but there is an error on this line I Img [i] = ImageIO.read (fa); // Error in this line Please guide me to come to this error ... Here is the full code of getPaths () method. Public class GetPathGiveIcon {ImageIcon [iic; File f = new file (""); Int i = 0; Public Image Icon [] getPaths (string [] s) {BufferedImage [] img = null; For (string stat: s) {System.out.println (st); } (String stat: s) {{file file = new file (cents); IMG [I] = ImageOo Reed (FA); Try blocking the value of System.out.println ("every string =" + cents); }} Hold (exception e) {e.printStackTrace (); } System.out.println ("Price Before Scaling" + i); I = 0; For (Beaufred Image BI: IMG) {IICC [I] = New Image Icon (BI); Image scale = iic [i] .getImage ()....

javascript - Image does not render with KineticJS -

I'm just trying to render an image with Kinetic, but nothing appears, nor I get an error. Bella can be found. Source code: $ (function () {var stage = new kinetic.Stage ({container: 'container', width: 400, height: 800}) ; Var layer = new kinetic layer; var yoda = new kinetic image ({x: 0, y: 0, width: 200, height: 400}); var imageObj = new image (); imageObj.src = 'Http://farm6.staticflickr.com/5448/9408019718_88934b087e_b.jpg'; imageObj.onload = function () {yoda.setImage (imageObj); layer.draw ();}; Layer.add (yoda); stage. Add (layer);}); You can call & lt; for Kinetic JSs Div & gt; Container should use Stage: & lt; Div id = "container" & gt; & Lt; / Div & gt;

CSS : Parent won't clearing child with absolute position -

इसलिए मेरे पास 3 बॉक्स है: बॉक्स 1 = लाल बॉक्स 2 = नीला बॉक्स 3 = पीले बॉक्स 1 बॉक्स में बॉक्स 2 बॉक्स 2 में बॉक्स 3 बॉक्स 3 शामिल हैं, डिविज़्स को जारी किया गया है और अतिरिक्त डिव स्टाइल का उपयोग करके साफ़ किया गया है = "स्पष्ट: दोनों" मुझे बॉक्स 2 को एक पूर्ण इस तरह से बॉक्स 1 की स्थिति: मैंने इस तरह की कोशिश की है, लेकिन काम नहीं करेगा: एचटीएमएल: & lt; div class = " box1 "& gt; & Lt; div वर्ग = "बॉक्स 2" & gt; & Lt; div वर्ग = "बॉक्स 3" & gt; बॉक्स -3 & lt; / div & gt; & Lt; div वर्ग = "बॉक्स 3" & gt; बॉक्स -3 & lt; / div & gt; & Lt; div वर्ग = "बॉक्स 3" & gt; बॉक्स -3 & lt; / div & gt; & Lt; div वर्ग = "बॉक्स 3" & gt; बॉक्स -3 & lt; / div & gt; & Lt; div वर्ग = "बॉक्स 3" & gt; बॉक्स -3 & lt; / div & gt; & Lt; div शैली = "स्पष्ट: दोनों;" & gt; & lt; / div & gt; & ...

update column of a table in PostgreSQL -

I have a problem regarding the updated columns in the table in PostgreSQL My PostgreSQL version 9.3 is the example: Below the example is the Jeffilersource table and the name of the column is the data generated schema bytea_import is the task to retrieve the contents of a file Update JfilesResetset Data (Select Public. Select Bio_Emport ('D: /BOB_XML/BOB.xml') WHERE ID = 2235; Error getting this way: You are opening two fields and only Only one is shutting down. Update gifsource source data (Make the public. Select bytea_import ('D: /BOB_XML/BOB.xml')) - here One ")" where id = 2235 was missing;

javascript - bootstrap accordion icon change in click -

I am using Bootstrap accordion in my code, when I click on each list, I will display the data and icon. & lt; I class = "fa fa-plus-square" & gt; & Lt; / I & gt; & lt; I square = "fa fa-minus-square"> gt; & Lt; / I & gt; Will change in My code: - & lt; Div class = "priority-lists" & gt; & Lt; Div class = "panel-group" id = "accordion" & gt; & Lt; Div class = "panel-panel-default" & gt; & Lt; Div class = "panel-title" data-toggle = "fall" data-parent = "# accordion" data-target = "# waterMindDistrictMeteres" & gt; & Lt; H2 square = "panel-title-order-toggle" & gt; & Lt; I class = "fa-minus-square" & gt; & Lt; / I & gt; Jalmanjind district meters & lt; / H2 & gt; & Lt; / Div & gt; & Lt; Div id = "waterMindDistrictMeteres" class = "...

r - check number of times consecutive value appear based on a certain criteria -

I have to find out that numbers from 2/3/4/5/6 to any number are in more than one number Appears vector For example, for the following vector x = c (1,1,3,4,9,1,9,1,5,4,5,2,1,1,4 , 6) There are two consecutive numbers & gt; 3 (49) & amp; (4,6) = 2 consecutive number three & gt; The following code only gives me how many times a value becomes constant (3, such as 5, 4, 5) = 1 and so on for 4,5,6 consecutive numbers Pre> runs & lt; - with rle (x) (run, table (value, length)) I really appreciate any help. Thanks Try: F1 & lt; - (VCC, VAL, N) {RL & LT; - RL (VCACT) Val (RL $ length [RL $ value] == n)} F1 (x, 3, 2) # [1] 2F1 (x, 3, 3) # [1] 1 or to do this at once sapply (2: 6, function (y) {rl> lt; - rl (x> y ); Yoga (RL $ length [RL $ value] == 2)}) # [1] 1 2 0 0 supplementary (2: 6, function (y) {rl & lt; - rle (x> y); zodiac (Rl $ length [rl $ value] == 3)} # [1] 2 1 0 sapply (2: 6, function (y) {rl & lt; -rl...

Sql Server - Is there any way to `Concat` nvarchar column in Select Such as `Agregate functions` -

Hello, I have a table, which is called a tag, I have 2 columns in the tag table (question id cover, tag navigator (100)) QuestionID tag -------------- 1 Math 1 Integral 2 physics question I ---- ---------------- 1 2 * 2 What is it? 2 What is the Quantum Role? QuestionID Q & A Tag ---------- ----------- ------- 1 2 * 2 What is it? What are mathematics, integral 2 quantum roles? Physics Do any scalar value function There are two ways to answer this: You can use a query like the other answer, but this is only useful for a table Create clr Total Function for code below (in my code for C #). This solution for all tables is simple to use and use, only: from table Use the system; Using System.Data; Using System.Data.SqlClient; Using System.Data.SqlTypes; Using Microsoft.SqlServer.Server; Using System.Text; [Serializable] [Microsoft.SqlServer.Server.SqlUserDefinedAggregate (Format. User defined, IsInvariantToDuplicates = false, IsInvariantToNulls = true, IsInva...

c# - Disposing the result of a LINQ query -

In a code that is used to check the existence of an object based on a condition, How do I calculate the query store after being counted? var in query = someContext where p (p.Name == name and p.Status == true) select p; If (query.Count ()> gt;) true truth back; Second false return; This is a simple scenario, but there can be a situation where there may be a large collection of queries, so my question is in those cases where the requirement is only to check the existence of the object How can this query be written so that the result is not stored in the archive, after which the count is checked. Regards. What is the LINQ extension method .ount () actually uses In the case of the unit framework (assuming what you are using), a SQL query will be generated which will return the record count, not record itself. Thus, you do not have to worry about disposal of a large collection. Example code: class program {static void main (string [] args) {using (var db = New Te...

angularjs - How to investigate scope in directive? -

मुझे मेरी समस्या दिखाने के लिए यह प्लंकर है: angular.module ('docsTransclusionExample' , [])। नियंत्रक ('नियंत्रक', ['$ scope', फ़ंक्शन ($ गुंजाइश) {$ scope.arr = [1,2,3,4];}])। डायरेक्टिव ('myDialog', फ़ंक्शन ) {वापसी {प्रतिबंधित: 'ई', क्षेत्र: {arr: '='}, templateUrl: 'my-dialog.html', लिंक: फ़ंक्शन (स्कोप) {var lengthOfArray = scope.arr.length; scope.test = 'सरणी लंबाई' + लंबाईओफ़एरेरे;}};}) है; plunker में, सब कुछ मैं काम करता है के रूप में काम करता है: मैं scope.arr सरणी सेट, और इस लिंक में जांच इससे मुझे संभावनाओं (परीक्षण) में और चीजें जोड़ने की संभावना है, और इसे प्रिंट करें। इस तरह से टेम्पलेट का उपयोग करना: {{arr}} - {{test}} .. मुझे यह परिणाम मिलता है: [1,2,3,4] - सरणी लंबाई 4 है SO: इस उदाहरण में, सरणी सीधे ऊपर नियंत्रक पर सेट है लेकिन इस के मेरे वास्तविक कार्यान्वयन में, सरणी एक जेसन ऑब्जेक्ट है, जिसे किसी सर्वर से प्राप्त किया गया है। नतीजा यह है कि मैं परिणाम के रूप में 'अपरिभाषित...

python - Swap interface on button press -

I'm new to the tanker and I want to create a button, which is pressed when another interface is displayed. The following program is written: To import the Tkinter root = Tkinter.Tk () root.title ("My First Game") for R in Root (3): Category in C ( 3): Tkinter.Label (root, text = '3', borderwidth = 20). Grid (line = 1, column = 1) Tkinter.Label (root, text = '6', borderwidth = 20) .grid (line = 1, column = 2) Tkinter.Label (root, text = '4', limit = 20). Grid ( Nkti = 1, Column = 3) Tkinter.Label (root, text = "2", Simaviram = 20). Grid (Row = 2, Column = 2) Tkinter.Label (Route, Text = '', Limit = 1) Grid (Row = 2, Column = 1) Tkinter.Label (Root, Text = '7', Limit = 20) 20). Grid (line = 2, column = 3) Tkinter.Label (root, text = '5', limit = 20). Grid (line = 3, column = 1) Tkinter.Label (root, text = '1 For range: range (3): range for C. (3): Tkinter.Label (root, text = '3', borderwidth = grid...

php - Mysql Select from table where a date is max for each unique location_id AND product -

I have a table - record - which looks like this id | Place_id | Products | Stock | Date === | =================================== 1 | Bakery 1 | Cake | 21 | 2 2 | Bakery 1 | Bread 23 2 3 | Bakery 2 | Cake | 21 | 2 4 | Bakery 2 | Bread 21 | 2 5 | Bakery 1 | Cake | 21 | 3 6 | Bakery 1 | Bread 23 3 7 | Bakery 2 | Cake | 21 | 3 8 Bakery 2 | Bread 21 | 39 Bakery 1 | Cake | 21 | 4 10. Bakery 1 | Bread 23 4 11 | Bakery 2 | Bread 23 4 For each location and for each product, I want to select the line whose highest date value is what will look like ths ID | Place_id | Products | Stock | Date === | ============= | ======================================== Bakery 2 | Cake | 21 | 39 Bakery 1 | Cake | 21 | 4 10. Bakery 1 | Bread 23 4 11 | Bakery 2 | Bread 23 4 How do I execute it with a query? I can loop through all the places and all the products and build questions, but its time consuming more memory? Record r1 on "post-text" itemprop = "text"> location cod...

datetime - Timestamp with a millisecond precision: How to save them in MySQL -

I have to develop an application using MySQL and I have to save values ​​like "1412792828893" which represent a timestamp But this is the exact millisecond, after 1.1.1970, declare the quantity of milliseconds as the line timestamp but unfortunately it does not work. All values ​​are set to 0000-00-00 00:00:00 if not, then 'probability' (`id` int (11) Not zero is AUTO_INCREMENT, `Segment_id` et (11) not a null;` probability 'is not float,' measured_a 'timestamp nose, `provider_id' ent (11) null, primary key (` id`)); How should the announcement be made to be able to save timestamp values ​​with this precision? You declare columns with partial-time datatype in MySQL version 5.6.4 or later is required. Not sure if you have the right version? Try SELECT NOW (3) . If you get an error, you do not have the correct version. For example, DATETIME (3) will give you millisecond resolution in your timestamp, and TIMESTAMP (6) will give yo...

php - Joomla obtain SEF Frontend URL from a model in backend -

I am creating a custom component in Joomla which requires the user to send mail. I use the model to send mail from Backend Admin. The model uses this code: $ btn_link = JURI :: root (). Substr (JRoute :: _ ("index.php? Option = com_mymailer and views = message & email = {$ MyMsg- & gt; email} & amp; tid = {$ myMsg- & gt; ticket_id}"); Then I use the above link as an anchor on an email button and send JMAIL. However, the link that comes in is a non-CEF (as on backend SEF is not applicable). I get this link: http://testsite.com/index Php? Option = com_mymailer & view = message & amp; email = mytestmail @ Gmail.com & amp; tid = 27 While I think the result (in one Is present, named as mail): http://testsite.com/mails/messages/index.php?email=mytestmail@gmail.com&tid=27 Any body has an idea how to get the SEF frontend url from backend code. Thanks in advance. I know that this is quite old but this is the first (relevant) r...

ruby on rails - Not loading into variable from database in the index section of the controller -

जब मैं रेल पर जाता हूं तो सांत्वना और टाइप करें: irb (मुख्य): 018: 0 & gt; search_filter = Search.order ( "created_at") पिछले मैं वापस मिल:।। से "खोज" के द्वारा created_at DESC सीमा 1 = & gt आदेश खोजें लोड (1.4ms) "खोज" का चयन करें *; # & LT; खोजें आईडी: 9, user_id: 2, postnumer_id: "170", matssvaedi_id: "", ist120_id: "", gotuheiti: "", dagsetning_from: शून्य, dagsetning_to: शून्य, byggingarar_from: शून्य, byggingarar_to: शून्य, fjoldiherbergja_from : शून्य, fjoldiherbergja_to: शून्य, flatarmal_from: शून्य, flatarmal_to: शून्य, created_at: "2014-10-10 11:56:55", updated_at: "2014-10-10 11:56:55" & gt; मुझे यह उम्मीद है, सृजन दिनांक के आधार पर खोज तालिका में अंतिम रिकॉर्ड। लेकिन अगर मैं डाल search_filter = Search.order ( "created_at")। मेरी SearchesController के सूचकांक अनुभाग में पहली पंक्ति और अगली पंक्ति के रूप में पिछले search_filter मैं रेल सर्वर कंस...

javascript - How to convert a regular Google AdSense Ad in a responsive ad automatically using preg_match? -

वर्डप्रेस थीम विकल्प पैनल। एक टेडटेरा फ़ील्ड जहां उपयोगकर्ता अपनी गैर-उत्तरदायी ऐडसेंस कोड। मुझे ज़रूरत है कि यदि कोई उपयोगकर्ता गैर-उत्तरदायी ऐडसेंस कोड दर्ज करता है, तो उस कोड को उत्तरदायी कोड में रूप में परिवर्तित किया जायेगा: गैर-उत्तरदायी कोड : & lt; स्क्रिप्ट async src = "// pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> & Lt;! - गैर उत्तरदायी विज्ञापन - & gt; & LT; इन्स वर्ग = "adsbygoogle" शैली = "प्रदर्शन: इनलाइन-ब्लॉक; चौड़ाई: 728px; ऊँचाई: गुणित 90px" डेटा-विज्ञापन-ग्राहक = "ca-pub-12345" डेटा-विज्ञापन-स्लॉट = "xxxxxxxxxxxxxx" & gt; & lt ; / इन्स & gt; & LT; स्क्रिप्ट & gt; (Adsbygoogle = window.adsbygoogle || [])। पुश ({}); & Lt; / स्क्रिप्ट & gt; ऊपर कोड की जरूरत में परिवर्तित किया जा के लिए: & lt; स्क्रिप्ट async src = "// pagead2.googlesyndication.com/pagead/js/adsbygoogle .js "& gt; & lt; / स्क्रिप्ट & g...

jquery - What is the best way to toggle the visibilty of an image without "pushing" other elements over? -

I have a web page that has an image inside a cell cell that I only want to show when you have a cell . The problem I have is that when the image is shown, the second text "push" on the left (because the default position is visible: none). I'm looking for a solution that in a table cell, I have an image that is using the code at the top right: & Lt; Td class = "tableCell" & gt; & Lt; This course is based on the following criteria:> Pre> Here is the CSS that creates the cell menu image at the top right. .cellMenu {display: none; float: right; cursor: indicator;} and I'm just trying to show this tool when you hover over the cell. $ ('tableCell'). Live ('hover', function ( } {$ (This) .toggleClass ("hover"). (".leamenu"). Toggle ();}); This works but when the images are "a bunch "Other text which is shown in all the center combinations" And walks. What is the right w...

ios - Delay With Scroll Using UIScrollView & Multiple UIButtons -

I have is that there is a line of UIButtons a UIScrollView including UIView I've noticed lately that when the user Uaiskrolwu If you touch the left and right, then there is an immediate delay and on occasions UIButton detects a swipe and activates the button. - (zero) setup screen {cgkk screencart = [[USScreen main screen] border]; CGFloat screenwidth = screenRect.size.width; CGflot Screenshite = ScreenEct [Self.view Setframe: CGRactMake (0, 0, Screenwidth, Screenshite)]; [Self.view addSubview: self.scrollViewControls]; [Selfkskrollviavcontrols Setframe: Kgrektmke (0, Selfkwukfremksaijkhait - Selfkskrollviavcontrolskfremksaijkhait, Selfkwukfremksaijkvidth, Selfkskrollviavcontrolskfremksaijkhait) ]; [Self.scrollViewControls addSubview: self.viewControls]; [Selfkskrollviavcontrols Setkantentsize: Kgsizemake (Selfkviavcontrolskfremksaijkvidth, Selfkviavcontrolskfremksaijkhait)]; [Self.scrollViewControls setBackgroundColor: [Self-coloring: Exstring: @ "333a44"]; Self.s...

css3 - CSS Transform Perspective bad pixelation in Firefox -

Image
I'm trying to create tabs like tabs tab I use: conversion: perspective (4px) rotateX (-1deg); Webkit-Conversion: Perspective (4px) rotateX (-1deg); -mose-transforms: perspective (4px) rotateX (-1deg); It looks good in Chrome and IE, but the left border in pix is ​​pixelized; Firefox Chrome / IE How can I fix this? The problem was resolved Settings: 1px solid transparent;

php - Jquery check multiple Selects have value set -

I have a form with a number of selected areas, so you can select several entries per selection. Each selection has been named id1 [] , id2 [] , id3 [] etc. While trying to submit with Jquery, can I check the form whether there is no selection in any selection? I have tried to do this, but the form is still present. $ ("$ submit" (. ($ (This) .val () == ""). Click (function () {$ ("[name = = 'id' ]: Select "visible"). Each (function (index, element) {if ($ (this) description is false;});}); I do not need to know There is no option to select which specific 'id', but if it did I would have been good .. thanks You can use the function to return all the selections, which are any values Not selected var withNoValue = $ ("select [name = = 'id']: visible"). Filter (function () {return! This.value.length;} ); Then you can check to see if you have no value - and you have access to those elements...

linux - File list by ls are misaligned -

I catted a binary file and press Ctrl-Z to stop it. Now LS results have been misguided incorrectly. What happened and how could I properly list them? type reset to reset your terminal, and Enter . Then press Ctrl + L to clear the screen. You should be back to normal Oh, and by the way, you used to run in that binary cat, when you suspended it, Ctrl-Z , it's still going on. Run jobs to see the list of jobs, and if so, kill job number 2, do 2% (or whatever job number).

function - Is lda{MASS} the only fuction in R to fit LDA? -

I think the title has to say to me. Is there any alternative to lda {MASS}? Yes, there are alternatives to those people I can quickly compile DiscriMiner Could get within sda The latter shrinkage is for discriminating analysis, but you can definitely specify zero shrinkage.

interop - C# Excel Chart can't set serie scale -

I'm trying to attract a threshold (1 row from left to right) To do this, let me give the threshold value Adding the bar and for xValues, the scale of 0 from 0 and 1 is set to 0 to 1. Public static Zero AddThreshold (chart xlChart, double value, string name, int color, bull secondary) {Series Series = XL Chart Series Collection (). Newshares (); Chain. Name = name; Series.XValues ​​= New list & lt; Int & gt; () {0, 1}. ToArray (); Chain. Value = new list & lt; Double & gt; () {Value, value} .oir (); Axis XXis, Yaxis; If (secondary) {series.AxisGroup = XlAxisGroup.xlSecondary; Xxis = (axis) xlChart.Axes (XlAxisType.xlCategory, XlAxisGroup.xlSecondary); YAxis = (axis) xlChart.Axes (XlAxisType.xlValue, XlAxisGroup.xlSecondary); } Other {xAxis = (axis) xlChart.Axes (XLXType.xlcategory, XlAxisGroup.xlPrimary); YAxis = (axis) xlChart.Axes (XlAxisType.xlValue, XlAxisGroup.xlPrimary); } XAxis.MinimumScale = 0; // COM error is getting here xAxis.MaximumScale = 1; YAxis...

c# - How do I map a model with nested properties to a flat Dto? -

I am trying to make mapping from my unit model to a DTO, but every time I am trying to create it I am Mapping I have two domain classes. It is a simplification of our model (for example, devices are many properties that represent a group of different things) : class device {public entity name}; Set;}} Class DeviceAccessToken {public device device {get; Set;} public string key {get; Set;} public string secret {get; Set}}} Then I want to map DeviceAccessToken to this DeviceDto (also simple, most of the fields in it) Exists in the original device model): class DeviceDto {public int name {get; Set;} public string key {get; Set;} public string secret {get; Set;}} Is there a way to make this mapping in mapping without specifying all areas of the device domain model? This is effectively represented by automaker profiles: Category DeviceMappingProfile: Profile {Secure Override Zero Configure () {this.CreateMap & lt; DeviceAccessToken, DeviceDto & gt; ()...

ruby on rails 4 - Rolify has_role? returning true after remove_role -

मैं निम्नलिखित करना चाहूंगा User1 = User.find (1) User2 = User.find (2) उपयोगकर्ताओं के लिए एक भूमिका जोड़ें User1.add_role: शिक्षक User2.add_role: शिक्षक User1.has_role? : शिक्षक & gt; & gt; सच User2.has_role? : शिक्षक & gt; & gt; सच किसी विशिष्ट उपयोगकर्ता की भूमिका को हटाना User1.remove_role: शिक्षक User1.has_role? : शिक्षक & gt; & gt; गलत User2.has_role? : शिक्षक & gt; & gt; सच है मुझे एक समस्या है क्योंकि वर्तमान में User1.has_role? : शिक्षक एक हटाने के बाद भी TRUE लौट रहा है हालांकि जब मैं User1.roles करता हूँ तो यह अपेक्षित और has_any_roles के रूप में रिक्त सरणी देता है? उम्मीद के मुताबिक झूठी वापसी करता है भूमिका हट जाने के बाद भी यह सच क्यों लौटा रहा है? आपको जांचने से पहले उपयोगकर्ता को पुनः लोड करने की आवश्यकता है इसकी एक भूमिका फिर से है User1.remove_role: शिक्षक User1.has_role? : शिक्षक - & gt; सच User1.reload User1.has_role? : शिक्षक - & gt; झूठी

Haskell function patterns 'otherwise' -

Is there any way that I can create a function with different definitions for different methods, including the Code> Or if this is not possible, how can it be obtained? Thanks in advance! Best, Skyfather You can use the wildcard match _ : is just :: probably one - & gt; Bull - Here we do not care what is inside just `Just '(bus _) = true - here we do not care what this is, this is not right, so' returned 'is wrong _ = wrong For clarification, the pattern is tried in the order defined by you, so the above mentioned task is not isJust _ = Is false (only _) = true because the _ pattern is the first match. What the compiler is actually doing is turning it internally into a case statement, so the first task would be required x = x = x's case x - & gt; True _ - & gt; False And as we know from every other programming language, which is in existence, case statement is tried.

NUnit v3 alpha in command line: Assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) -

I'm trying to run NUnit v3 alpha from the command line here I have the command line: [...] \ NUnit3 \ nunit-console NUnitAlpha3Experimental.exe /framework:net-4.5 First of all, I found this error: Errors and failures file or assembly 'nunit.framework, Version = 3.0.5378.31152, culture = neutral, public kiton = 2638cd05610744eb 'or one of its dependencies could not be loaded from the current time-runtime runtime Designed by new and can not be loaded. Then I've edited the ennet-console.exe.config to comment .net 2.0 - & gt; & Lt; Supported serial version = "v4.0.30319" /> & Lt; / Startup & gt; I tried this command line (with 4.0 and 4.5) [...] \ NUnit3 \ nunit-console NUnitAlpha3Experimental.exe /framework:net-4.0 [...] \ NUnit3 \ N Anti-Console NUnitAlpha3Experimental.exe /framework:net-4.5 Here is the error message: Errors and failures file or assembly will not be loaded A clear definition of assembly located in 'nun...

vb.net - Using FileSystemObject to Export VBScript Code to Text File -

I export the part of the code below to replace the MsgBox oXMLHttp.responseText code I am checked out the result of a text file and found the following code: set objFSO = CreateObject ("Scripting.FileSystemObject") 'file how to write? Set file = "c: \ test \ Autorun.inf" objFile = objFSO.CreateTextFile (outfile, true) obz file. Type "test string" & amp; VbCrLf objFile.Close However, I do not know how to implement it actually. Is the location and name of the outfile file to be made? I believe this is it. But then what is the purpose of objFile.Write "test string"? VbCrLf ? My main question is that I am telling FileSystemObject to process the code based on the code given below? dim request, oXMLHttp, url url = "http: //ws.cdyne com / phoneverify / phoneverify.asmx" request = " "& Amp; _" & lt; String & gt; 2 & lt; / String> "& Amp; _" & lt; String & gt; 3 ...

performance - Unity3D display Google Admob slow -

मैं एंड्रॉइड के लिए एकता Google Admob प्लगइन को एकीकृत करता हूं लेकिन मेरा गेम पूर्ण स्क्रीन विज्ञापन प्रदर्शित करने और बंद करने के लिए लगभग 3 सेकंड लेता है। यह मेरे खेल को बदसूरत बना देता है मुझे लगता है कि यूनिटी को स्थानीय एपीआई कॉल करने में कुछ समय लगता है, मुझे यकीन नहीं है। मैं Google टीम से प्लगइन का उपयोग कर रहा हूं। क्या आपके पास मेरे साथ एक ही चीज़ है! मध्यस्थों को बंद करने के लिए कुछ सेकंड लेना एक ज्ञात मुद्दा है (एंड्रॉइड पर) मैंने हालांकि एकता पर प्रदर्शन को दोषी ठहराया है; मैंने एक खाली गतिविधि को खोलने और बंद करने की कोशिश की, विज्ञापन से संबंधित नहीं, और एंड्रॉइड पर बंद करने के लिए समान समय ले लिया।

C socket - consecutive read/write, what happens? -

In a server / client, in C, in TCP, what if I continually read in my program? Is it possible, or do I always want to follow the "Customer Writing-> Server Read-> Server Writing-> Client Read" structure? Is it possible to do something like this? Or is it possible that the third writing data in the server is obtained from 2 reads in the client, and such other bad things? write (1) read (2) read (3) (4) server.c read (1) write (2) write (3) write (4) Yes, it is possible to read (by default) the block until the data will not be available to read on the socket. There is nothing to read before reading () call return, by then your program reads in a particular order and there is no need to arrange writing. The result of your code will be: reads the server block () in the Client (Read) client blocks () receives the server data, reads () Returns Write the server (three times) the customer receives the data, read (1) returns the customer's r...

python - PyQt: QProgressDialog shows but is empty (displays background content) -

I have a piece of code that I've used elsewhere (where is it exactly what I want), But in this case does not. Actually my function body calculates a count of things, the results bring in a penus dataframe and a platus plot into a matplot canvas. I placed the code below at the top of my function body, hoping that this display function is a dialog box for the duration of the call. However, whatever happens, the dialog box appears, which contains the box contents that appear on the screen, which is immediately behind the screen. The function is made on the screen for the duration of the call and then it stops at the end. What is wrong with anybody? If this is useful, then the parent ( self) is a QWidget . Oh, and one more thing, if I remove progress.cancel () after performing the main part of the function, then QProgressDialog actually Paint yourself with progress bar and label text ('updating ...'). Thanks a lot for your help! Progress = QProgressDialog (p...

ASP.NET Web API in Azure: Customize authentication filter to prevent brute force? -

I have found a website from the VS2013 SPA template (Web API 2.2) that is ASP.NET ID 2.1, and all Some really work well my controller methods look like this: [authorized] Public API. Model Get the widget (int widget ID) {var requestingUserId = Int32.Parse (Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (user.account)); ...} It works as expected: Unauthorized users are not granted access An authorized user After, I can get my User ID but I now want to modify the application to stop the excessive API requests. I am planning to see if the particular user id has made certain requests within the stipulated time or not. I am looking for suggestions for the best place to do this. I do not want to repeat this argument in every controller, and it seems that the action filter can be the best place to place. But as this user need to read and I'm not sure the order of the filter is guaranteed, it is possible, if possible, to get the filter which is already being a...

Lists inside list in C# -

This is working with my first time collection and I'm stuck here, I tested it for a test project I have made a problem and I do not know how to work around First of all, I want to do lists with particular lists (cant use anything), there is a large list with the inside list, like this: list & lt; List & lt; Int & gt; & Gt; Allnums = new list & lt; List & lt; Int & gt; & Gt; (); The number I want to add to the previous list is collected here: list & lt; Int & gt; Nums = new list & lt; Int & gt; (); So far, very good. I have to add indexes indefinitely to my main list (Allnums), so I have nums1, nums2, Num3 ... etc OK, let's have a random Try num to add numbers: (only 1 number for now) random rnd = new random (); Private Zero Button 1_Click (Object Sender, EventArgs e) {nums.Add (rnd.Next (10)); } Now, let's save the number that has been generated and clear the nums list to store the new number next t...

What is the best way, to traverse and update all elements in an Erlang ETS table? -

Can you help me out of a "best practice" approach, only once all the elements in the ETS table : When updating each element? My table is a private set, and I was going to cross through with my input code using ets: update_element with ets: foldl , but I'm not sure It is, if it is a safe way, because by updating the elements can give me the same element at the same time - according to the documentation. I am not about to insert new keys, only update prices, please, tell me if this approach is safe, or showing me an alternative way to achieve updates efficiently! Thank you! You first / 1 and next / 2 You can use. Check out Next / 2 here: I think your concern has already been answered in the asset documentation: No other support is available within the ETS which will guarantee stability between the objects. However, the safe / stable / 2 function can be used to guarantee that the sequence of first / 1 and next / 2 calls will go into the table witho...

java - What is the difference between YUVFormat.YUV_420 and ColorSpace.YUV420? -

Image
I've searched and read a ton of source, but I can not find the answer. I thought these "types" were identical, but when I decode the H264 in bytes using jcodec, I assumed the data output was YUV 4: 2: O Planner (YUV420P); This is the input type required for my VPX encoder. VPX encoded image looks like this: then believe me YUVFormat.YUV_420 is most likely YUV420P, some other version of ColorSpace.YUV420 YUV420 does anyone know what kind of it is, so that I get a conversion routine? The format is interlaced and v data for a full scan line. Others write whole u and then write whole V data. These are after the whole Y image. Yuv420 and yuv420p which specifies the layout. The UV420 writes all U, so all v data, the Yv420p scan line interfaces the scan scan line U and V. This image can be a little confusing because the size of the data is small, which is not showing large blocks of U and V pixels. I believe yuv420p U1U2U3 will interrupt V1V2V3 U4U5U6 V4V5V6

java - Remove transparent JPanel from JPanel -

I want to change one panel from the other (all of them have a transparent section) the code is as follows: import java.awt.Color; Import java.awt.EventQueue; Import java.awt.Graphics; Import java.awt.GridLayout; Import java.awt.Image; Import java.util.Timer; Import java.util.TimerTask; Import javax.swing.ImageIcon; Import javax.swing.JFrame; Import javax.swing.JLabel; Import javax.swing.JPanel; Public category photoframe extension of GeFrame {public class} PhotosDisplayPanel JPanel {Personal Static Final Long Serial VERSIONUID = 1L; Private string [] imgsLink = null; Private long delays = 1000; Private long period = 1000; Private In CurIdx = 0; Private PhotoDisplayPanel currentPhoto = null; Public photospace (string [] image link) {super (); This.imgsLink = imgsLink; SetBackground (new color (0, 0, 0, 0)); Setout (new grid layout (1, 1)); CurrentPhoto = New PhotoDisplayPlanel (IMGS Links [Curds]); Adding (currentPhoto); } Public Zero Starter () {if (imgsLink == zero) {Return; } ...

mysql - how to Collect data from two tables using joins -

मेरे पास 2 टेबल हैं - तालिका 1 संरचना: [लॉग] यूजर आईडी || क्लिक || तिथि || XXX || XXX ||| तालिका 2 संरचना: [उपयोगकर्ता] उपयोगकर्ता नाम || ईमेल || तिथि || XXX || XXX ||| मैं इस तरह से डेटा प्रदर्शित करना चाहता हूं उपयोगकर्ता नाम, COUNT (क्लिक) मैं नीचे क्वेरी का उपयोग कर रहा हूं। का चयन करें `user.username`,` userid`, COUNT `` अंदरूनी शामिल हों पर logs.userid = user.userid आदेश उपयोगकर्ता द्वारा कुल DESC सीमा 5 logs` से total` के रूप में ( `userid`) कृपया quide पहला जबाब के बाद, मैं क्वेरी modifed और यह aplied, इस तरह $ sqlptcwall = mysql_query ( "उपयोगकर्ता को चुनें। उपयोगकर्ता नाम, COUNT (ptcwalllogs.userid) लॉग इन से कुल INNER उपयोगकर्ता पर उपयोगकर्ता को शामिल करें। User.userid = ptcwalllogs.userid GROUP user.username ORDER BY COUNT (ptcwalllogs.userid) DESC LIMIT 5 "); & Lt;? Php गूंज "& lt; / tr & gt;"; जबकि ($ पंक्ति = mysql_fetch_array ($ sqlptcwall)) {गूंज "& lt; tr & gt;"; गूंज "& lt; td & g...

jquery - PHP Array building with foreach loop -

I am trying to create an array that I can output using JSON. For any reason, it will only add one element to the array, even if many email addresses return with an object. I know this because the loop implements the correct amount of time. Although new values ​​are not added to the array. I tried array_push, but it creates a head array and implements jQuery's habitual process correctly. $ load_model = $ this-> LoadModel ("LoadModel"); $ X = $ load_model- & gt; Updateload ($ load rate, $ carride, $ comment, $ temporary, $ loadstats, $ contact ID, $ load_id); If ($ x == true) {$ arr = array (); Foreach ($ load_model-> loadEmailAddresses ($ load_id) as $ val) {$ arr ['email'] = $ val- & gt; E-mail; $ Arr ['ContactId'] = $ val- & gt; Contact id; Echo json_encode ($ arr); } Any thoughts anyone? You are setting the same loop as the maximum element every time it is loop, it Will set $ arr ['email'] and $ arr ['Cont...

rest - Documenting /Designing ASP.NET Web API with Swagger -

I have a functional web API project Is it just like the available API for the web API Is native swiger? I recommend you "" for the ASP.NET Web API. This implementation simplifies the addition of swagger to any web API project by following simple steps. In fact, you only need to install some simple instructions and follow them. Tasier Joude has written a post about how to configure it. Another popular implementation, but the previous changes were made 2 years ago, so it seems to have been closed.

C# WebRequest GET/POST -

So I thought it's time for me to learn C #, to be easy with me, I am very new to this. / P> I'm trying to create a very simple application (I'm using the Windows Forms app). My goal is: Use the "GET" method, get a web page Read the text field (this value is every time the user is reaching the page Using the "POST" method, send some values ​​accordingly This is my code yet: Private zero button 2_Click (Object Sender, EventArgs e) {string URI = "http: //localhost/post.php"; string myParameters = "field = value1 and field2 = value2"; (WebClient wc = new WebClient ()) Tax {string getpage = wc.DownloadString ("http: //localhost/post.php"); MessageBox.Show (getpage); Wc.Headers [HttpRequestHeader.ContentType] = "application / x-www-form-urlencoded"; String HtmlResult = wc.UploadString (URI, so far is pretty good, it is working but it is not entirely that I Here's what I want to achieve. I am able...

What should be SQL query for Oracle? -

Text after " This is an exact copy of the question: 2 replies I do not have much experience Is with SQL I would like to table, DEST_NAME DEST_ID tag India General -1 XDHKGHDJD USA SPA XLSDFASFG India spouse -1 XMAWOVMNF India General -1 XKILDKVMF India General -1 XPAWOVPOF USA SPA VJSJGHSKL I, DEST_NAME DEST_ID tag India General -1 XDHKGHDJD India General -1 XKILDKVMF India General -1 XPAWOVPOF United States US SPA XLSDFASFG United States SPA VJSJGHSKL India spouse -1 XMAWOVMNF Actually, I priced by themselves in accordance with DEST_NAME and DEST_ID You want to record. I try to use on the basis of the group, but that I need to do an overall job in the selection statement for how can I do this? Try instead of group select DEST_NAME, DEST_ID, DEST_NAME, tag your_table ordered by DEST_ID but the sequence is understood me you show up is not an I would expect: DEST_NAME DEST_ID tag India General -1 XDHKGHDJD India General -1 XKILDKVMF Ind...

javascript - Dropdown menu in ... a dropdown menu with Bootstrap -

Image
I have to put a dropdown menu ... in a dropdown menu in Bootstrap 3. What I try to do: Unfortunately, when I I click on the second dropdown, it does not appear. How can I show the second dropdown when I click on it? How then (with js or jquery) can i handle changes in the situation of this 2 dropdown? HTML: & lt; Div class = "navbar navbar-default navbar-fixed-top" role = "navigation" & gt; & Lt; Div class = "container" & gt; & Lt; Div & gt; & Lt; Ul class = "nav navbar-nav" & gt; & Lt; Li class = "dropdown" & gt; & Lt; A href = "#" class = "dropdown-toggle" data-toggle = "dropdown" & gt; Settings & lt; Span class = "caret" & gt; & Lt; / Span & gt; & Lt; / A & gt; & Lt; Ul class = "dropdown-menu" role = "menu" & gt; & Lt; Li & gt; & Lt; A href = "#" & g...