Posts

Showing posts from July, 2014

ios - Can't show one view controller on top of another -

Image
I am trying to show a view controller above the UITableView on the other. When the user clicks on a button, so I would like to appear on the scene controller to a view controller, where the user when the button press then say that the user feed view when they click on a button, a view controller a blur With the feed the view will slide on the controller. So basically the old visual controller will act as a blurred background for one. I TabBarController that I am trying to get some kind of Tumblr Here's my code AppDelegate: - (bool) :. (UITabBarController *) TabBarController shouldSelectViewController: (UIViewController *) ViewController {if ([viewController.title isEqualToString: @ "create"] createOptionViewController * createOptionViewController =) {[createOptionViewController alloc] init]; [ViewController addChildViewController: createOptionViewController]; CreateOptionViewController.view.frame = viewController.view.bounds; [ViewController.view addSubview: crea...

java - how to get JVM INSTR tableswitch into the code? -

A syntax error is being "goto", and another error (_L can not be solved by any variable is). I want to "geto", but how to correct the code? Code: Public Fixed ArrayList getTemplateList (Reference Reference) {XArraySharedObject xarraysharedobject = getArraySharedObject (reference); If (xarraysharedobject.size ()! = 0) {goto _L2; } And {goto _l 1} _ l 1: int i = 0; _L5: If (i & lt; DEFAULT_TEMPLATES.length) goto_l3; Other Goto _L2 _L2: return xarraysharedobject.getArrayList (); _L3: Xyear shoebab.ed (DEFAULT_TEMPLATES [i]); I ++; If (right) goto _l5; GOTO object is the arc of oriented development and there is no space in it. In Java code, you should instead create ways to make calls in each case or switch (object to check) {case 1: // do action 1 break; Case 2: // do verb 2 break; } You should spend some time learning tutorials and / or learning the language if you are new to it -

Abort jQuery ajax request without calling error function -

In my app, if a user goes to a page that triggers an AJAX request to load the data So if they quickly navigate to another page, I no longer care about that request, but if I cancel it, then it triggers the error function, which displays an error alert. I know that you can check inside the error function if it is "abortion", but I will not need to do this for every request. Ideally you can configure it with $ .ajaxSetup (), or there can be an argument that you can pass through the abort () function, there is no error to say, this request is no longer relevant and This does not mean to run my success, error or full work. According to all the documents, the fault function through the canceled call and its verification should be done only in the verification status. Can be:

javascript - 4x4 matrix multiplication order -

I am using the following library: However, the question I take the same steps in different ways: // example 1m = tdl.math.matrix4.identity (); Tdl.math.matrix4. RotateX (m, 90 * (Math.PI / 180)); Tdl.math.matrix4.translate (m, [10,20,30]); Console.log (m); // output below 1/2 example 2 I = tdl.math.matrix4.identity (); R = tdl.math.matrix4.rotationX (90 * (Math.PI / 180)); T = tdl.math.matrix4.translation ([10,20,30]); M = tdl.math.matrix4.mul (i, r); M = tdl.math.matrix4.mul (m, t); Console.log (m); translate it by 10x, 20y P> However, the output is not the same, the output is 1: [1, 0, 0, 0, 0, 6.123233995736766e-17, 1, 0, 0, -1, 6.123233995736766 -17, 0, 10, -30, 20.0000 00000000004, 1] Here the output is 2 [1, 0, 0, 0, 0 , 6.123233995736766e-17, 1, 0, 0, -1, 6.123233995736766e-17, 0, 10, 20, 30, 1] As a result, I am taking the same steps , Then why is the result different? Because the matrix product is different because the matrix is ​​on the...

python - Pandas: Select based on number of items in a set -

I have such a dataframe (simplified): year id value 2000 A 0 1 2001A2 2000A233 2000B3 4 2001B4000 2000C5 6001C770D D7 8 1990E81991E910 1993E10 11 1993E1112 1994 E12 I am only interested in those IDs that exist for 3 or more years. For the ID (set (DF ['id']) in the list, I can deftly test and test through each AD if: lane (list (set (set ( DF [DF ['id'] == ID] ['year'])))> = 3: df2 = df2.append (df [df ['id'] == id]) year ID value 8 1990 e8 9 99 1E 910 1993E10 11 1993E11 12 1994E12 But it seems that there should be a simple way. Use: (df.groupby (['id']). Filter Mbda x: x ['year']. New York ()> Year ID value 8 1990 E8 9 1 9 E 9 10 1993 E10 11 1993 E 11 12 1994 E 12 [ 5 rows x 3 column]

python - serial ctrl+a escape sequence -

I am using pyserial to create serial applications. I'm looking for ASCII or ANSI escape sequence for CTRL + A and CTRL + E (respectively, initially and finally, respectively). I can not find the escape code anywhere, does anyone locate a resource that lists the code? CTRL + A and CTRL + E seem to be at the beginning of the line and cursor at the end of very universal cursor line control keys. I believe that an escape sequence exists. Any suggestions would be appreciated! Neither the ASCII character and the ANSI control code actually define a thing called "CTRL + A" Are there. However, ASCII control characters 0-31 (formally US names through NUL) are traditionally printed as mapped as a "control version" of 64-95 characters , ^ 0 ^ ^, ^ 1 ^, 2 ^ ^ b, etc. Wikipedia gives further information on the page. So, ^ 1 is, and ^ E5 is In the meantime: CTRL + A and CTRL + E line appears to be very universal cursor to start the line and cursor by the c...

ASP.NET Web Api 2 Documentation splitting? -

In a large system, where there is an API for many resources, I want to divide in some configurable manner. As they were different apis. So in the main page of the web API I have a list of 'resources'. We say: Contact management [Here I want to manage 'contact' resources, 'address' resources, etc. Managing directives [product resources, order processing, delivery resources, remaining resources, etc.] Management of products [product resources, category processing, etc] So for API users to understand this on easy work Which methods should be kept in mind. Apart from this, as you can see, different segments use the same resources, that means if I change anything on product resources, both documentation (ideally) automatic Must be updated in the form, which includes version information, etc. Edit: Public Action Index () {ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider (); See Return (Configuration Services. Gate API ...

AngularJS object is null when passed to REST web service -

Angular newbie and I have no luck under this part. I try to send an update call to my rental web service I am passing and int and an object when debugging back to the web service, the int gets cured, though always the incoming object is in the form of a tap, debugging before the call shows that the object's The value is. Why am I getting newbies for my object in web service? I have tried to call from a factory as well as save the function. When the web service is called, then both are null app.js Tournament Director App.factory ('tournamentFactory', function () {return { AddUserToTournament: Function (id, tournament, user, tournament) {tourney.Users.push (user) var response = tournament.update ({id: id}, {tournament: tournaments}) return trip;}};}); $ Scope.save = function {var updated tournaments = tournamentfitter.ADUSRTO tournaments (ID, selectedTourney, $ scope. Selected user, tournament); Tournament.update ({id: id}, {tournament: update tournaments}, fun...

php - Alternative to file_get_contents or curl for remote file -

I am trying to include a specific line html text in my site's page. I have 20 sites which I want to use so that I am trying to specify Site 1 1 line and site 2 line 2, etc. This code is not currently working to include any row. Can anyone help me to do this work? The end result is that with 20 different sites, 20 different lines of text are shown to draw data from a remote file. The file gets content or it is included on my server so I need to work around. ( And I have to put this code where I want the data. & lt ;? Php $ data = url_get_contents ("http: // mydomain com / mytextfile.txt"); If ($ data) {$ lines = explosion ("\ n", $ data); Resonate lines [0]; }? & Gt; Edit: I got the solution The above code works now and calls from a distance and sets the line in resonance.

MongoDB Java Client Automatic Failover Failing -

मेरे पास स्थानीयहोस्ट पर 3 नोड प्रतिकृति सेट सेटअप है: mongod --port 27017 - डीबीपीथ सी: / डेटा / रिपसेट / आरएसडीबी0 - आरप्लेसेट आरएस0 मोंगोड --पोर्ट 27018 - डीबीपीथ सी: / डेटा / रिपसेट / आरएसडीबी 1 - आरप्लेसेट आरएस0 मोंगोड --पोर्ट 2701 9 - डीबीपीथ सी: / डेटा / रिपसेट / Rsdb2 --replSet rs0 मेरे जावा क्लाइंट में मैं प्रतिकृति सेट से कनेक्ट हूं: सूची & lt; serverAddress & gt; Addrs = नया अर्रे लिस्ट & lt; & gt; (); Addrs.add (नया सर्वर अदरक ("HOST", 27017)); Addrs.add (नया सर्वर अदरक ("HOST", 27018)); Addrs.add (नया सर्वर अदरक ("HOST", 2701 9)); मोंगोक्लेन्ट मंगो = नए मोंगो क्लाइन्ट (एडर्स); Println (mongo.getReplicaSetStatus ()); जब तक मैं तीसरे माध्यमिक मोंगोडब उदाहरण (बंदरगाह 27019 पर एक) नीचे लेना बंद कर देता हूँ, तब तक सभी काम ठीक हो जाते हैं। यह एक सर्वर विफलता अनुकरण करना है। फिर जब मैं ऊपर जावा कोड चलाऊँगा तो मुझे मिलेगा: फरवरी 17, 2014 10:51:18 अपराह्न com.mongodb। ConnectionStatus $ UpdatableNode update चेतावनी:...

Performance graphs on Jenkins causing "Could not initialize class org.jfree.chart.JFreeChart" exceptions -

When Jenkins the display trend tries to generate graphs the original Always the exception with the reason: " java.lang.NoClassDefFoundError: class org.jfree.chart.JFreeChart could not start " This same Junkkins is employed, with v1.532.2 ( stable ) and v1.539-SNAPSHOT Just make my JDK (Oracle's JDK1 .7.0_51), MAVEN (3.1.1) and GIT (1.8.1.2) Enable these plugins: V1.9.3 FindBugs v4.51 Warnings V4.39 PMD v3.38 Display V.1.10 Jenkins Git Client V1.6.2 Jenkins Git 2.0.1 Then I have created a project that plugin jmeter-maven-plugin v1.9.0 By successfully using a jmt ray from your java webpage Ports file , but the display trend graph is not being visible on the project page, Jenkins actually collects the results because it shows me the response time, but I can not show the graph there the root cause always opens many exceptions: " java.lang.NoClassDefFoundError: class org.jfree.chart.JFreeChart c...

date - SQL Query to get time periods contained in another one in the same table -

मेरे पास निम्न तालिका है (person_program): program_id person_id start_date end_date 1 1558849 9 01 -01-2014 02-16-2014 2 1558849 9 02-17-2014 03-01-2014 3 1558849 9 02-15-2014 02-21-2014 मुझे program_id प्राप्त करने की आवश्यकता है जो एक ही समय में दूसरी अवधि (इस मामले में, program_id = 3) में निहित हैं। धन्यवाद हाँ, आप एक ही तालिका का संदर्भ दे सकते हैं और ओवरलैपिंग अवधि प्राप्त कर सकते हैं: चुनें t1.program_id यह एक, टी 2.प्रोग्राम_आईड ओवरलैपस्वास्थ्य_प्रोग्राम t1 से आंतरिक रूप से शामिल व्यक्ति_प्रोग्राम t2 टी 1 पर। प्रोग्राम_आईडी & lt; T2.program_id और t1.person_id = t2.person_id और t2.start_date & gt; T1.end_date

django - How to generate high resolution thumbnails for only some aliases? -

I am working on a photography website in the DJENGO. Because the site is "responsive", we pre-generate several sizes of each image using the aliases set. In particular, 7 images with a width starting at 960 pixels width of 3,840 pixels in 480 pix increments. These photos will be used when a photo is shown full-screen (as is not in the list view). This site is also created for Hydipi / Retina Display / Devices. Therefore, we want to use the setting: To make the THUMBNAIL_HIGH_RESOLUTION automatically prepare @ 2x versions of some aliases , but most notably, to make The category of 7 images used for the full-screen images above are not used for the aliases used. This project is meant to show the work of the photographer, we are using high quality settings, so each image is roughly 3840x2160 pixels size and, through our pre-generation almost 50 mb of jpg, unfortunately, about 50% is pure waste because we use @ 2x version on an image when we show the collection of ...

php - convert array to string (split 3 words ) -

We have dynamic posts and we should split 3 words of string for use in the url $ this-> Post_message = "This sample is for testing STRING"; If (stroll ($ this- & gt; post_says)> 5) {$ key = '& lt; & Gt; "; $ ~! # $% ^ & Amp;; * _ + = - '; $ bodypost1 = trim ($ this- & gt; post_session, $ key); $ bodypost2 = explosion (' ', $ Bodypost1,3); $ Bodypost = array_shift (',', $ bodypost2);} and {$ bodypost2 = explosion ('', $ this - & amp; post_message, 3); $ bodypost = array_shift (',', $ Bodypost2);} and this is the URL parameter $ this-> permalink = $ C-> SITE_URL.'view / '. ($ Type == 'private'? 'Private': 'post'). ':'. $ This- & gt; post_id. '/'. $ Bodypost. 'Html'; Back to my URL: sitename.com/123/THIS.html should be sitename.com/123/THIS SAMPLHOL try it $ message = "This is sample for testing" "$...

java - How do I sign my Applet correctly to access the computer's COM Port? -

I am signing the applet on my own which reads the data of a COM port device that uses the library JSSC Although this is not enough to access the resource applet and when I try to make COM ports available, I am testing it on my https url. At first I could find "running this application can be a security risk," So it asks me if I want to block insecure content (mixed security), I click not, but still the JSSC library will not work. I do not know what else to try, any advice is very much appreciated. What do you mean by that? What is the Java version using? Do you use a jnlp file (like a)? The newest Java update 7u51 (1.7.0_51) defaults to self-signed applet now and more. So what can you do? Use an official certificate Secure the level of security in your system properties \ Java \ security or Exceptional site listing your page Add Here's an overview of what's in the latest Java version. Specially important permissions for you are the manifes...

apache - htaccess adding WWW and changing filename in subdirectory -

I know that such questions have come up, though often. I'm hoping for better luck! I have an .htaccess file that adds everything to "www" in my original directory: RewriteCond% {SERVER_NAME} ^ RewriteEngine ^ Mysite.org RivetRail ^ (. *) $ Http://www.mysite.org/$1 [R = permanent, L] This generally works fine. I have a subfolder (/ myquiz /) in which the old index.html file has been replaced with index.php. I know that there are external links to /myquiz/index.html, so I have to make sure they are redirects. By leaving index.html in place and attempting to redirect from it gave birth to some strange behavior, but adding .htaccess to that directory works for it: RewriteEngine On RewriteBase / REERRR ^ ^ Index. Html = $ /myquiz/index.php [NC, R] Index.php is trying to load the index as expected, and if WWW is needed Is added but requests of mysite.org/myquiz/index.php directly not connects to the WWW I tried to add "RewriteEngine Heir", but ...

c++ - Guaranteeing standard library containers are freed -

मान लें कि मेरे पास std :: vector & lt; std :: vector & lt; std :: string & gt; & gt; मैं वर्तमान में जो कर रहा हूं वह यह है: std :: vector & lt; std :: vector & lt; std :: string & gt; & gt; obj; के लिए (ऑटो i: obj) {for (ऑटो j: i) j। ~ Basic_string (); i.clear (); } लेकिन बेशक यह केवल ऑब्जेक्ट को साफ़ करता है और जो मेमोरी रखता है उसे रिलीज़ नहीं करता। क्या std :: vector कोई भी उपयोग करता है खुद के आधार उदाहरण के लिए स्मृति? और मैं यह कैसे गारंटी दे सकता हूं कि यह स्मृति जारी की गई है ताकि इसे किसी और चीज़ के लिए इस्तेमाल किया जा सके, या यह स्वतः हो जाएगा? आपका कोड टूट गया है। आप ऑब्जेक्ट्स को नष्ट कर रहे हैं, जबकि अभी भी कंटेनर के स्वामित्व में हैं यह स्पष्ट नहीं है कि आपको क्या करना है, आपको ऐसा करना चाहिए, लेकिन आपको कुछ भी करने की ज़रूरत नहीं होनी चाहिए। इन कंटेनरों में वे वस्तुओं की मालिक हैं, और जब कंटेनर नष्ट हो जाता है, तो इसमें सब कुछ है।

asp.net - Issue on Stop/Prevent Tab Changing on Javascript -

I am using javascript on an asp.net web application and I have a button that displays an image on the page What is working on the click, but it also changes from tab element tab 2 to tab 0 index too! Here is the JavaScript and asp code that I have: & lt; Script type = "text / javascript" & gt; Var baseUrl = document.URL.split ("webform /") [0]; Function openImageDoc (filePath, titleName) {var newUrl = baseUrl + filePath; Window.open (newUrl, header name, 'width = 900, height = 800, scrollbar = 1'); } & Lt; / Script & gt; & Lt; ASP: Button ID = "RiskMapDisplay" runat = "server" style = "margin-left: 734px" OnClientClick = "openImageDoc ('Images / Riskmap.Jpg', 'RiskMap')" Text = "Risk Matrix" Reason validity = " False "tabinedx =" 3 "/> Can you please tell me how can I stop it or because of this what could be it? Thanks Use the followi...

javascript - Compensate for browser zoom in Three.js CSSRenderer -

I am working on a project in three.js using the CSSRenderer and I am told to make it Required to display properly when the browser's zoom should not be 100%. Which I can tell: There is no way to force the browser to return to 100% there is no way to zoom the browser's zoom ( I thought that if I can locate the zoom, then I can zoom the CSS in the other direction, the way it was suggested in the post of victory. : Looking at it, it seems impossible that three. JS view can be displayed properly on non-100% zoom, and I can not even show the user the warning that the app will not work properly with the Zoom scale scale. Can anyone prove me wrong on this? Does anyone know that anything has been done to solve this issue? three. Js implements the changes using Matrix 3D () function. One with Chrome is that the 3D changes using Matrix 3D do not grow properly under browser zoom. You can see an example of a bug if you change the zoom level, then you will notice the bound...

javascript - Load resources without displaying the "loading" spinner -

I am loading a large javascript file asynchronously as a long time. The script is used only at the end of the form. However, when I open the form, my browser (Chrome and Firefox) displays a "loading" spinner when the script is loaded, even if it is not necessary yet. Is it possible to stop the browser from displaying a spinner while loading the resource? (Not a script) If any solution is available, then I know that it will be different for each browser. I only care about the latest version of Chrome, FF and IE. Loading spinner is not the default behavior when something is loading asynchronously; The script used to load the resource is probably wrong here if you can edit your post to include it, so we can help you easily Are

datetime - Convert Unix Timestamp in Android with a static timezone that observes DST -

I have a problem finding out how to change a Unix timestamp for the normal date time of my Android app. In the case of my use, all reports of events are presented in the US Mountaineering Time. The server handles time and stores the correct unicetime. However, when my app receives the report time from the server, it will be sent to the U.S. The Unix timestamp is required to display in Mountain Timezone, where the user is located in the world. Apart from this, it is necessary to handle changes in GMT offset due to daylight saving. Below I have tried, but I keep errors, it says that it can not solve the setTimeZone method and it expects "," in that function. // todo: readable time string event reaget; String Eventagetime; EventUnixTime = eventData.getEventUnixtimeTime (); // Exits events in few seconds EventUnixTimeMilli = EventUnixTime * 1000; // Convert to Millisecond string timezone = "US / Mountain"; Calendar .SetetimeJohn (Timezone Timezone); Date EventD...

Rails Datatables with Ajax not working with Turbolink -

Then I have a new Rail 4 app using the foundation and today I started integrating the DataTable and set it After doing a little shock. Page by using AJAX calls When I click on a link from a page (home at this instance), which sends me to a page that includes data, tables without entries or searches Points on the box or page. However, if I refresh my browser, the page will be fully refreshed and Ajax is called and the table populates properly. After looking at the network traffic, I see that the reaction is 304 after clicking on the link: not modified. None of the other requests for JS and CSS and etc., I'm assuming that JS does not reload and does not have the appropriate ('# operation)'. Call DataTable ({...}) Also, one thing is that the table is located within a partial 'tasks_index.html .haml'. One thing I was missing was that I was still using the TurboLines gem. I tried to disable it to see if my problem would be fixed and surprisingly enough. So ...

java - compound interest after 1, 3 and 5 years -

I have this code which calculates compound interest, but I should do it after 1, 3, and 5 years . Tried and cant seem to get it to work. Can anyone help me? import java.util.Scanner; Public class CompoundInterest {public static zero main (string [] args) {scanner input = new scanner (System.in); Double principal = 0; Double rate = 0; Double time = 0; Double x = 0; System.out.print ("Enter the amount invested:"); Principal = input. NXD double (); System.out.print ("Enter Interest Rates:"); Rate = input.nextDouble (); System.out.print ("Enter the time of the loan:"); Time = input.nextDouble (); X = Prime * Math ((+ 1 + rate / 12), time); X = Math. Pow (5,3); Println (""); System.out.println ("Compound interest after 1 year:" + x); }} You x to principal * ((1 + r / 12), time) , then set x = math.pow (5,3) ? x is now set to math.pow (5,3) and nothing has to do with your principal, rate and time information. In additi...

cocoa touch - Why is -init an instance method and +initialize a class method? -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर कोको में, NSObject s, दोनों को init और आरंभ करने के लिए होना नहीं चाहिए class methods? + initialize ओवरराइड किया जा सकता है (यह वैकल्पिक है) वर्ग-चौड़ा प्रारंभ करने के लिए -init एक वर्ग के एक उदाहरण की प्रारंभिकता को पूरा करता है, हालांकि इसे अक्सर NSObject (उदा: UIView's initWithFrame: विधि) से प्राप्त कक्षाओं में तर्क जोड़कर परिष्कृत किया जाता है। एचटीएमएल>

java - Reflections returning 0 even though class clearly exists -

I have a problem with reflection. I have a class that extends another class called Classmodel: package net.gd.globalwars.commands; CommandModel {} in public class command and as you can see that this package is in "net.gd.globalwars.commands" I am now using a new reflection object Which extends all sections, print commandmodel and count, but the count is 0. Reflection command = new reflections ("net.gd.globalwars.commands"); System.err.println (commands.getSubTypesOf (CommandModel.class) .size ()); Thanks advance! Using this maven dependency, the code works and returns 1 : & lt; Dependency & gt; & Lt; Group & gt; Org.reflections & lt; / Group & gt; & Lt; ArtifactId & gt; Reflections & lt; / ArtifactId> & Lt; Version & gt; 0.9.9-RC1 & lt; / Edition & gt; & Lt; / Dependencies & gt; Assume that It makes a difference

c# - Displaying a default images when the images is null in gridview using templatefield -

I am trying to display an alternative image when the images are meaningless on my gridview, which I displayed to the images To do was use the template field. But I can only type an optional text. There is no way to insert alternative default images. Can you help me & lt; Asp: TemplateField & gt; & Lt; HeaderTemplate & gt; Question Image & lt; / HeaderTemplate & gt; & Lt; ItemTemplate & gt; & Lt; Img src = 'data: image / jpg; Base64, & lt;% # Eval ("Question Image")! = System.Dibil. Value? Convert.ToBase64String ((byte []) Eval ("QuestionImage"): string.Empty% & gt; 'Alt = "no image" height = "100" width = "200" /> & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; An option line can be in the database event, you can see that cell Go Columns) and provide the image source. If it is zero, then change it to the default image. For example: Event: R...

java - Continuous Fractions -

My understanding of continuous fragments was that it would represent a decimal in fraction. I thought the constant fraction would always return less than or equal to the decimal number. Unfortunately my code sometimes gives a greater partial value than the decimal input Is the understanding of my constant fractions right? If you can do this, please tell us where the error will be in your code. Public stable rational contfrac (double a, int i, int n) {if (i & lt; n) {boolean neg = false; If (a & lt; 0) {neg = true; // this dual recesi = monastery Bass (1 / a); // A subsidiary method is required to have mutual double values ​​of a given decimal value = receipt% 1; // Reciprocal double intprt = decimal part of the race; remainder; Reciprocal rational difference = new 'rational' (long) intprt; 'integer' part; // Creates a new rational number using 'integer'; Part of reciprocal if (stay! = 0) {inter = inter.add (contFrac (stay, I + 1, n)); } Return (recipro...

php - include file(s) from another directory -

Currently I'm trying to include one PHP file from another file. public_html / a / class / test.php & lt; - From this file I can see public_html / b / common.php & lt; I want to include a file from - I want to include this file Make sure what I should do because I dirname (__ FILE__) and it is public_html / dirname (__ file __). '/ .. / b / common.php' / code> but it does not help me in getting my file. You can proceed to the directory tree until you have an ordinary ancestor: / P> is required dirname (dirname (__DIR__)). '/b/common.php'; The magic was introduced in continuous __dir __ equal to dirname (__file __) , and 5.3. Each use of dirname () goes back to a directory, i.e.: dirname ('public_html / a / class'); // public_html / one dime ('public_html / a'); // public_html BTW, Emptors, such as PHPStorm also understand this use of relative path.

multithreading - Python daemon thread does not exit when parent thread exits -

I have some python code which creates a monster thread parent's thread ends almost immediately, but Damon Thread The print keeps sleeping. Import threading import time_date (): _ (1, 600) for category: time.sleep (1) print ("sleep") def main (): thread = threading . Thread (target = int_sleep) thread.daemon = True thread.start () time.sleep (2) print ("main thread end ...") thread = threading. Thread (target = main) thread Start () sys.version: '3.3.3 (v3.3.3: c3896275c0f6, November 18, 2013, 21:19:30) [ MSc v.1600 64bit (AMD64)] ' Prints: The main thread of gold end .. = "text"> If you want to thread.daemon = True , the program will only close when the daemon is left only. The commands sent to Stdout are lost. main.py import At the time of importing, def int_sleep (): Add it to a file named (Category: 1, 600): time.sleep ( 1) Print ("sleep") def main (): thread = threading. Thread (target = int_sle...

algorithm - Can deformable part based model used for image classification? -

Information about DPM can be found, it is used more for the purpose of object detection with the code provided by the site. If so, can it be used in combination with object detection and classification? For example, it can be used to locate birds on pictures and also what kind of bird it is. It depends on your "classification" to consider, for example, Can be classified as a dog, a car or a car Determining the specific breed of cat / dog may be very difficult for that algorithm.

sending data to javascript from android (droid/native) in phonegap -

I'm new to phone-difference I just say a string "hello" to send some data, javascript And show it there. And after displaying the string, Javascript should return a string called "Hello again for Android", and it will come from Android toast. I searched a lot of threads here in 'StackWarflow', but not able to find answers. I understand that you need to apply a custom plugin to interact with the Android code. Look at what you want,

maven - Updated pom.xml file not adding new libraries to project -

I have created a Maven project and added some dependencies. I later included it in & lt; Dependency & gt; & Lt; Group & gt; Com.sun.jersey & lt; / Group & gt; & Lt; ArtifactId & gt; Jersey-server & lt; / ArtifactId> & Lt; Version & gt; 1.18 & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Com.sun.jersey & lt; / Group & gt; & Lt; ArtifactId & gt; Jersey-customer & lt; / ArtifactId> & Lt; Version & gt; 1.18 & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Com.sun.jersey & lt; / Group & gt; & Lt; ArtifactId & gt; Jersey-json & lt; / ArtifactId> & Lt; Version & gt; 1.18 & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Com.sun.jersey & lt; / Group & gt; ...

c++ - spoj http://www.spoj.com/problems/JULKA/ -

Explain below for the // loop which is actually being done in this loop / for (i = K-1, j = a = f = 0; i> = 0; i--) {b = (one * 10 + floating [i] - '0') / 2; // explain = (one * 10 + floating [i] - '0')% 2; // Explain if (B) F = 1; // clarification if (f) claudia [j ++] = b + 0 '; // clarification} if (! J) j ++; // Claudea [J] = 0; Explain for I (, i =, len1-1, j = len2-1, k = c = 0; i & gt; = 0; i -, j--, k ++) {a = total [i] - '0'; // explain b = j & gt; = 0? Diff [j] - '0': 0; // Explain that (a & lt; b + c) {temp [k] = (10 + abc) + '0'; // explain c = 1; // Definition} Else {temp [k] = abc + '0'; // clarification c = 0; // explain}} temp [k] = 0; // explain Explain what is happening in the loop from above to both that why we are divided by 2 and modulating by 2. The first loop expresses the decimal number as a string in the temporary [2] 2/2 is to literally divide one digit by 2, and 2% to apply the re...

php - PHPMailer No Reply -

I upgraded my mailing method to phpmailer with my form, and the first question is: Do I need all this code? (It looks like working) Not sure if I should use SMTP or not. need_once ('PHPMailer-master / class.phpmailer.php'); $ Mail = new PHPMailer (); // PHP "mail ()" to use the default $ body = $ display; // $ mail- & gt; Euphrli Toe ("name@yourdomain.com, First Fast"); $ Mail- & gt; Senam = 'UMVA membership form'; $ Mail- & gt; Host = 'www.umvaonline.org'; $ Mail- & gt; AddAddress (Matthu_Stacy @ Yale.com, 'Matt Stacey'); $ Mail- & gt; AddAddress ('jskippy@roadrunner.com', 'Jacqueline Bennett'); If ($ fname2! = "") {$ Mail- & gt; Subject = "UMVA membership update" $ Fname "and". $ Fname2 "" $ Lname;} and {$ Mail- & gt; Subject = "UMVA subscription updates" $ Fname "" $ Lname;} $ mail- & gt; AltBody = "To see the m...

php - Get YouTube video id from embed iframe code -

I want to get the YouTube video ID from YouTube embed code using preg_match or regex. For example & lt; Iframe width = "560" height = "315" src = "// www.youtube.com/embed/0gugBiEkLwU?rel=0" frameborder = "0" allowfullscreen & gt; & Lt; / Iframe & gt; Can I move the ID 0gugBiEkLwU Can someone tell me how to do this? In fact your help is suitable. Using this method with a capturing group, you should give the string you want: / P > d \ / (\ w +) \? Rel = \ d + " example:

android - implement Tab host Using ImageViews -

I have three images. When I change the image that I want to change the image. ( clickable image, non-click enabled image. ). When I go to the second image, I want to set the image on the clickable image. And the image I pressed should come in a non-clickable image. ( is just like tabhost-im to see image developing tab image ) There is no way to do this. Here I have found the code snippet, please see below. loginbtn .setOnTouchListener (New On-TouchListener) {@ Override Public Boolean On Touch (see We, Motion Avenger RG1) {Switch (arg1.getAction ()) {Case MotionEvent.ACTION_DOWN : {(ImageView) v .setImageResource (R.drawable.login_click); NewFragment = New Login (); Piece Transaction Transaction = getFragmentManager (). BeginTransaction (); Transactions.Rayle (RIDM Institution , Newfragment); transaction.ad tubaux stack (empty); transaction.setTransition (FragmentTransaction.TRANSIT_FRAGMENT_OPEN); transaction.commit ();} back true;}}); you can int click = 0; images....

cocos2d iphone - ios simulator crashes, real thing doesn't -

I thought it would ask in advance, but most people start to reverse - the simulator works, but not the iPhone My problem is that where all simulators are crashing immediately (not to mention retinal simulators, large animals may fit on my screen), but do great work on the phone. Any suggestions? I'm using cocos2d v3 btw if it helps. Certain things: You're good on your screen Can fit the Retina IOS simulators to fit the way. Open with the iOS simulator: On the top came the O window in the toolbar -> Window -> Scale This will scale down the simulator to fit your screen Open with IOS simulator: IOS Simulator -> Reset Content and Settings ... will reset that simulator and also remove all its user data.

Merge sort code in Python using recursion -

Below is a merge sort written in Python, it is throwing error "runtime error: exceeded maximum recurring depth" error is. Please tell me if I remember the reasoning to end recursive. List for ([1] lane (list1) + lane (list2) list = [] list1 = [] list2 = [] def merge (list, list1, list2) ): I = 1 Jammu = 1 if list1 [i]> gt; [2]: List [k] = list2 [j] j = + 1 k = + 1 other: list [k] = list2 [i] i = + 1 k = + 1 def partition (list, list 1, list 2 ): If the lane (list) list1 = list [: lane (list) / list (list, list1, list2) list = [15, 8, 59, 69, 45, 23] sort (list) Try this program: def sort (AList): aList = _mergesort (aList, 0, len (aList) - 1) aList def _mergesort (alist, first, last)): middle = (first + last) / 2 if first & lt; Last: _mergesort (aList, first, middle) _mergesort (aList, middle + 1, last) a, f, l = 0, first, middle + 1 tmp = [none] * (last - first + 1) Lt; = Middle & L & lt; = Final: If ALIIS [F] & lt; ALIIT [L]: TMP [A] = AL...

Onclick on view pager in android does not work in my code -

I have implemented to see pager in my code and I have clicked on the view pager but listened to my On-click listener is not working I will post my code viewpager.setOnClickListener (New OnListListener) {@Override Public Zero (click V) {Log.i (" *** "," ** * "); Toast. GetActivity ()," XXXX ", Toast .LENGTH_SHORT) Show ();}}); ViewPager clicklistener . This is not working because the child of View-Pager is blocking the parent's event (i.e. ViewPager). If you are adding images to the viewpace using a pagerapetter, then click on ImageView to simplify it.

python - How to check all the kwargs that could be passed on to a function -

Assume that I have the following functions (in this case the constructor), __ Init __ (self, url, ** kwargs) How can I check all possible keyword arguments that can pass this function? Thank you, Y If you want to do this, check it out Whether the supplied keywords are from a valid set of keywords, like you can use: valid_keywords = set (['keyword1', 'keyword2']) are_keywords_ok = No (set (kwargs) - valid_keywords)

unity3d - How to pick up an object using a GUITexture -

How do I apply GUITExture to select an object? The problem is that I have a GetButtonUp input, how can I convert it to a GUI button? Usage is a layer type of my tag type. Here's the code: #pragma strict var primary: item; // Your Primary Item Holder Virus Secondary: Items; // Your secondary item holder var myLayerMask: LayerMask; Private War Hitime: GameAbject; / / Remember to create a new input named "Use" named raycast hit function update () {if (Input.GetButtonUp ("Use") :) {var hit: RaycastHit; Var direction = change Transform Direct (Vector 3. Forgeword); Debug Drerey (Transet Status, Direction * 2.5, Color. Blue); // If you press "Use" then Ryanka shows (Physics. Reset status, Direction, Hit, 2.5, MyLayer Mask) (if (hit.transform.tag == "item") / tag " Item "{HitItem = hit.transform.gameObject; // HitEight gets hits.gameObject Var item SCR: item script = hottime.GetCompNent (" MEDuscript "); if (item SCR...

php - CodeIgniter get last username without primary id -

I have a problem getting the latest user name in my database. I do not have the database not auto_increment ID field Below is my code: public function _username_check ($ user_name) {$ this- & gt; Db- & gt; Select ('user_name'); $ This- & gt; Db- & gt; Like ('user_name', $ user_name); $ This- & gt; Db- & gt; Order_by ('USER_DATE'); $ Query = $ this- & gt; Db- & gt; Receive ('user'); If ($ query-> num_rows ()> 0) {$ row = $ query- & gt; Line (); $ Db_username = $ row- & gt; User name; Echo $ db_username; } Echo "if the function did not come"; } I am currently using community proof files for my projects, there is no auto increment ID field, so I check the final entry I'm using user_date. By no means does this function go, am I doing something wrong here? If the user wants to enter a user name, I will need to be able to return the user name and if the user wants to enter the user, ...

solr - Nested facet search -

I have the following documents in Solr: (1) {date: "2013-> 01-01", person: "John", activity: "swimming "} & Lt; - Date of the date / year (2) {date: "2014-01-02", person: "John", activity: "cycling"} (3) {date: "2014-01-03", person: "John Activity: "swimming"} (5) {date: "2014-01-02", person: "jogging", (4) {date: "2014-01-01", person: "Paul", activity: "Paul", activity: "cycling"} (6) {date: "2014-01-03", person: "Paul" activity ":" swimming "} (8) {date:" 2014-01-02 ", Person: "jogging"} (7) {date: "2014-01-01", person: "ringo", activity: "ringo", activity: "cycling"} (9) {date: "2014-01-03 ", Person:" Ringo ", Motav Method: "Ascent"} // Assume all areas as indexed and stored . Now I want to find p...

java - Finish work on EJB3 even after timeout -

I am designing webservices for the order system. When I got an order, then it has to add nearly 10,000 institutions to the table. It may be more, but as I understand that this work will not end in the time of transaction and time will be completed and all the work Roll back. But I want the transaction time to end this work even after the past. How can I get this? We are using EJB3 in Weblogic 11G with JDK 1.6.25. You can end the transaction time: Services -> JTA, timeout seconds set the ultimate value By default this value is 30 seconds. If your transaction can be too long you can change your app architecture. You can insert rows without a transaction (but you can lose your data stability) or use book updates with a portion of the transaction. You can use the @transquaction to insert rows without a transaction.

how to read array of numbers from text file in python -

मैंने कोड लिखा है: सरणी = [[1.630217208498539], [0.019929319226538452] Fo = open ("file.txt", "w") fo.write (str (array)) fo.close () यह सरणी को .txt फ़ाइल में सहेजा जाएगा, .txt फ़ाइल की सामग्री 2d सरणी में है: [[1.630217208498539], [0.019929319226538452]] और मुझे यह सरणी चाहिए एक अन्य प्रोग्राम पर वापस आ गया है ताकि मैं आगे की गणना के लिए इस सरणी का उपयोग कर सकूं (पढ़ा गया सरणी स्ट्रिंग नहीं होनी चाहिए) आयात करें अचार संख्या = [[1.630217208498539], [0.019929319226538452]] outfile = open (" log.txt "," wb ") pickle.dump (numlist, outfile) outfile.close () infile = खुले ("लॉग। टी। टी।", "आरबी") pickle.load (infile) [[1.630217208498539], [0.019929319226538452]]

contiki - What is the effect of UIP_CONF_BUFFER_SIZE in contiki_conf.h file -

I've been working on contiki for a while, and lately I had to face a strange problem where I It is seen that the coil fails to attain the thicker, more than 57 bits in any data packet, the range is close to 96- 97 bytes (in the coin simulator) for Zone 1 and in the actual hardware (MB xxx target) I have seen that The limit is 92 bytes. Anyone had to face a similar situation, is this platform something specific with specific configuration, and how can I change it? I looked in the contiki_conf.h file and found the UIIP_ CONF_BUFFER_SIZE parameter. If this parameter has been changed then what is the effect? I thought it and it is the maximum IP payload controlled by UOOP stack. Thus, it tells the 40-byte IP header + 8 byte UDP header + UDP payload size. This will be the same for TCP connections. So for example if UIP_CONF_BUFFER_SIZE is set to 140, and if we ping the obese with more than 140 effective IP packet size, then they will fail to give a bold answer!

c++ - DirectX9 Lighting weird stripes (Point-Light) -

Image
I have a problem when enabling point-light in my application (DirectX 9). I get some very weird straps on the net, the stripes will look like this: pointlight Initialise: dxObject.g_pd3dDevice-> Centrarrettate (D3DRS_NORMALIZENORMALS, true); D3DXVECTOR3 vecDir; D3DLIGHT9 light; Zoramory (& amp; light, size (D3DLIGHT9)); Light.Type = D3DLIGHT_POINT; Light.Position = D3DXVECTOR3 (0.0f, 5.0f, 0.0f); Light.Diffuse.r = 5.0f; Light.Diffuse.g = 5.0f; Light.Diffuse.b = 5.0f; Light. Attenuation 0 = 0.0F; Light. Attention 1 = 0.125f; Light. Attenution 2 = 0.0f; Light.Range = 100.0f; DxObject.g_pd3dDevice-> Setlight (0, and light); DxObject.g_pd3dDevice-> Lightly capable (0, true); DxObject.g_pd3dDevice-> SetterState (D3DRS_AMBIENT, 0x00202020); . renderstate light is active Loading mesh here: HRESULT hours = D3DXLoadMeshFromX (path.c_str), D3DXMESH_MANAGED, G_pd3dDevice, Null, and MaterialBuffer, Faucet, amp; num_Materials, and Mesh); If (FAILED (HR)) {message...

Apache Redirect Performance - .htaccess vs Apache configuration file ? -

I wonder if there are several redirect rules inside a .haccess file (say 10000+) can be a display problem is. (This file is parsed every access to the site) Archiving them in the Apache configuration file will not be a better option (at the display point)? Apache configuration is a better option in this case, because you do not have to .htaccess file on every access Read; Configure is read once, then stored in memory. Please note, however, you will not be able to change your redirects on the fly. You must restart the server to make them effective. Also, when you are concerned about performance at that level, then the apache will search your directories, so completely. (From that directory, which is served) / for the .htaccess file. Allow anyone at & lt; Directory / & gt; should work, and then do not enable it anywhere.

ruby - Silencing Chrome driver console outputs when I run my tests -

I am using the latest version of Chrome (32.0.1700.107) and chrome driver (v 2.8). But when I run my sample test in Ruby with the following code: 'Selenium-WebDriver' is required 'WAIT = Selenium :: WebDriver :: Wait.New (timeout: 100) $ Driver = Selenium:: WebDriver.for: Chrome $ driver.manage.window.maximize $ driver.navigate.to 'https://www.google.co.in' def apachets_over ele_hover = $ driver.find_element (: xpath, "." [@ Id = 'gbiva'] / div [1] / a ") $ driver.action.move_to (ele_hover). Perform Sleep 5 puts" pass "end apps_hover $ driver.quit () Let me down at the beginning of the console output from the chrome driver Received as written: [5032: 4816: 0218/130016: Error: chrome_views_delegate.cc (176)] Not applicable [5032: 4816: 0218 / 130016:ERROR:desktop_root_window_host_win.cc(746) ] Not applicable [5032: 4816: 0218/130016: Error: desktop_root_window_host_win. CC (746)] is not applicable. Is there any way to si...

how to press keyboard with Jquery/ Javascript -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब 4 जवाब मैं विकास के लिए नया हूँ, मैं जानना चाहता हूं कि किसी भी फ्रंटएंड प्रोग्राम का उपयोग करके कुंजी घटना को कॉल करने / ट्रिगर करने का तरीका है। आप सीधे नीचे दिए गए कोड का उपयोग करके ब्राउज़र को पूर्ण स्क्रीन कर सकते हैं var docElement, अनुरोध; DocElement = document.documentElement; अनुरोध = docElement.requestFullScreen || DocElement.webkitRequestFullScreen || DocElement.mozRequestFullScreen || docElement.msRequestFullScreen; यदि (प्रकार का अनुरोध! = "अपरिभाषित" और अनुरोध) {request.call (docElement); }

javascript - Integrate requirejs text plugin into requirejs core -

I'm using the requiredjs with different libraries such as backbone and jquery in my files to use suffocation in my plan To load all my lips together and to load it once in my index.html file, because all the lbs are required anyway, I want to save some code. Therefore, instead of loading jquery and spinal cord every time instead of viewing a new backbone or coded model, simply use backbone and jquery because it loads in the global scope. The only stuff I'm loading is my thoughts, models and collections. But the text plugin gives me some headache. It needs to be separated from my concatenated lib files since all the time I load an HTML file with "text! Blabla.html", so it first tries to load the plugin text before loading the HTML file . So I can stop the text plugin with requirejs without any other libs, which preloaded on page load. Is there any possibility of uniting readers in needjs, so it is "known" in the core of the defaults. Otherwise I have ...

regex - MongoDB Get distinct formats from a field -

मेरे पास फ़ोन नंबर के विभिन्न प्रकार के फोन नंबर हैं + 9 0 224- XXXXXXX +90 223-XXXXXXX +90 228-XXXXXXX (0221) XXX XXXX (0224) XXX XXXX (0222) XXX XXXX क्या सभी विशिष्ट फोन प्रारूप प्राप्त करने में mongodb सहायता कर सकता है? अपेक्षित आउटपुट है: 2 अच्छी तरह से आप इसके लिए उपयोग कर सकते हैं, यद्यपि एक अद्भुत नक्शे में रीडूस जिस तरह से: db.collection.mapReduce (// मैपर - सभी अंकों को "एक्स" फ़ंक्शन के साथ बदलें (emit ("pattern", this.number.replace (new RegExp ("[ 0-9] "," जी ")," एक्स ")}, // रेड्यूसर फ़ंक्शन (कुंजी, मान) {var परिणाम = {आइटम: []}; मूल्य .for (समारोह (मूल्य) {// केवल जोड़ें * नहीं मिला * परिणाम के लिए आइटम (result.items.indexOf (मान) == -1) {result.items.push (मान);}}); वापसी परिणाम;}, // आउटपुट {बाहर: {इनलाइन: 1}}); ऐसा कुछ दे देंगे: {"परिणाम": [{"" _id ":" पैटर्न "," मूल्य ": {" आइटम " : ["+ XX XXX-XXXXXXX", "(XXXX) XXX XXXX...

oracle - Compare data of table from two different Database -

I have two different databases in two different servers. These two databases have the same table. I have the data contained in the same tables To use a database from other databases I wanted to create a DBLink Have you tried to find anything in Google? There are millions of posts for this topic. Use this to know about the dbms_comparison package .

php - sort results of array count values into a new array -

I want to sort the result in a new array but without the most non-US $ (or the most duplicate) Number will be the first). & lt ;? Php $ a = array (1,1,2,2,2,3,3,3,4,4,4, 4,4,5); Forex currency (array_count_values ​​($ a) $ Key as the key = & gt; $ value) {echo $ key '-'. $ Value. ' & Lt; Br> '; } // I'm hoping to get the most duplicate numbers FIRST (without the $ key) // so in that position: // $ newarray = array (4,3,2,1,5); ? & Gt; $ a = array (1,1,2,2,2) , 2), 3,3,3,3,4,4,4,4,5); $ Totals = array_count_values ​​($ a); Arsport ($ yoga); Echo "& lt; east & gt;"; Print_r ($ sum); output array ([4] => 5 [3] => 4 [2] => 3 [1] ] = & Gt; 2 [5] = & gt; 1)

c# - Application crashes in windows 8.1 -

[.net 3.5] में मेरी एक विंडो अनुप्रयोग विंडोज़ 8.1 में स्थापित है, अपलोड करने के लिए छवियाँ। मैं आवेदन खोलता हूं, और मैं स्थानीय डिस्क में मौजूद छवियों को चुनने और अपलोड करने के लिए एक डीएलएल का उपयोग कर रहा हूं। एक बार छवि के चयन को ब्राउज़ करने के बाद अगर मैं अपने सिस्टम में एक "नया फ़ोल्डर" बनाने के लिए, अनुप्रयोग क्रैश - यह मेरे अपवाद के रूप में देता है: एक समस्या के कारण प्रोग्राम को रोकने के लिए सही ढंग से काम करना खिड़कियां प्रोग्राम बंद कर देगी और सूचित करेगी ... मैं इवेंट लॉग को पार कर चुका हूं, और यहां एक समान लॉग जोड़ा गया है: Faulting अनुप्रयोग का नाम: DesktopPhotoUploader.exe, संस्करण: 1.0.0.0, समय स्टाम्प: 0x529f6471 Faulting मॉड्यूल का नाम: ntdll.dll, संस्करण: 6.3.9600.16408, समय स्टाम्प: 0x523d5305 अपवाद कोड: 0xc0000374 दोष ऑफ़सेट: 0x00000000000f387c दोषयुक्त प्रक्रिया आईडी : 0x8d0 अनुप्रयोग प्रारंभ समय फॉल्टिंग: 0x01cf2c7f30046a99 फॉल्टिंग एप्लिकेशन पथ: C: \ Users \ AppData \ Local \ Apps \ 2.0 \ 7HWTE4KV.OXA \ 9K6HG17J.XZB \ desk..tion...

java - Explaination code written in rsf -

The RSF producer can explain the following line in the class Actually I look for the next control flow I am doing UICommand.make (form, "settings", UIMessage.make ("administrationate.save.settings.button"), tap); Thanks in advance. copied from Javadoc: creates a command control that accepts a bound string (e.g. * UIMessage for text labels. You can also find additional information here: It looks like a very old framework, which was last updated in 2008, you Why would you want to use it?

objective c - How to specify in itunes connect that we want to launch application after it is approved? -

I think there is a choice I see after uploading that app, Where can I change I did not find any I rejected the uploaded app and tried to upload again to see that option. This option is not visible anymore. This is an option after uploading to upload.

matlab - Where is my mistake and how can i correct it? -

I'm using this code for parameter estimation, it gives me an error in the row below how It is possible. thank you in advanced. while dcnorm & gt; 1E-6 & amp; Etter & lt; 10f = A * (B. ^ (C. ^ T)) - Y; Ji1 = b ^ (c ^ t.) Ji2 a * = * (b ^ (c ^ (t -1)). (C ^ t.); % Error Line G3 = A * (B ^ (c. ^ T)) * LN (B) * T * (c. ((T -1) ^); J = [Ji1 Ji2 G3]; DC = -J \ f; Tahmin = tahmin + dc; Dcnorm = ideal (DC); ITER + 1 ITER =; A = tahmin (1); B = tahmin (2); C = tahmin (3); D = [IARC ABC Model (F) Model (DC)] ( Clearly use element-wise actions during the expression): g2 = one * (B. ^ (C. ^ (T-1)). * (C. ^ T); My guess is that you will also need to modify the next line.

video - Finding frame sizes in an encoded bit stream -

Image
I am using the HM12.1 reference code. I have to find frame size in bytes or KB from an encoded h.265 bit stream. I'm very new to video processing and I'm stuck in it. Pls help! If you use the latest version, then it's as simple: pkt_size Example: Code for the rows starting with ffprobe -show_frames file.hevc View> $ ~ / Src / ffmpeg / ffprobe -show_frames BQMall_832x480_60_QP22.hevc | Grep pkt_size pkt_size = 67941 pkt_size = 12235 pkt_size = 13026 pkt_size = 12534 pkt_size = 13778 pkt_size = 13589 pkt_size = 13039 pkt_size = 12035 pkt_size = 12582 pkt_size = 13186 pkt_size = 15519 pkt_size = 15 930 pkt_size = 15616 pkt_size = 15311 pkt_size = 15430 Pkt_size = 14608 pkt_size = 14444 pkt_size = 18246 ffprobe is great and simultaneously with gnuplot you can produce good plots of frame size, e.g. Something like this: Currently This does not work for HVVC because Ffprope fails to detect the correct sled types, but hope will be done in the futu...

android - Add anotations to a pdf -

I want to add an annotation to a PDF file, such as marking a line of text with yellow in PDF . To know if it is possible in Android or not. If yes, no code sample or any link will be useful It is not possible through Android's API, and even there is a free third-party Java library that you can use. The only possibilities are: WebView and Use commercial your own Open the file in the second app that has the necessary capabilities (such as the ADB reader)

how to customize and display the frame window at center of my screen in java swing? -

Hi, I'm developing a desktop application using swings when I'm executing that frame window On my left side is displayed on the screen, can I customize it and display it in the middle of the screen? "yes i am using GUI builder" Just setLocationRelativeTo (null) after initComponents () , in the manufacturer. extends myframe JFrame to the public class {public MyFrame () {initComponents (); SetLocationRelativeTo (zero); }} JFrame as the subclass of window get the window methods it occurs. The API can be seen The above method is listed as follows - Sets the window's position relative to the specified component according to the following circumstances. If the component is tap, or the graphics configuration associated with this component is empty, the window is placed at the center of the screen.

vbscript - Cant connect COM object. -

I have written a CD library on C ++ This library has only 1 function. STDMETHODIMP TMyCodeBitmapGenerateImpl :: GenerateMyFile (BSTR ATextToEncode, BSTR APathToSaveFile) The library name is MyCode_COM_Library DataArchiving = "Data 123" file name = "D: \ img.bmp" is trying CreateObject ("MyCode_COM_Library.TMyCodeBitmapGenerateImpl") .GenerateMyFile (DataString, file name) I'm getting the error Item Required is trying again dim ws wd set ws = CreateObject ("MyCode_COM_Library.TMyCodeBitmapGenerateImpl") wd set = ws.GenerateMyFile (datastring, file name) dim The same. Error I added this library to VB in the context = dmd wd dim or MyCodeBitmapGenerate datastring =" data123 " Wd = Wa.GenerateMyFile (datastring, FileName) function returns int followed by compi Connect to VB and my COM library. Thanks. If I add the library to the reference and all the OK personal sub command1_Cl...

Remote Access to MySQL database of a website using VB.NET 2010 -

I am trying to add a vb.net2010 project to a database of a website. I have already added% as the host in the remote messaging access to the CPU, and my firewall is closed. Here is the code I used: MySQLconn MySQLconn as new MySqlConnection = New MySqlConnection ("server = www.mysite.net; user id = myusername ; Pwd = mypassword; database = mydatabase; port = 3306; ") Try MySQLconn.Open ()" Message "(" Sausage ", vbOKOnly) MySQLconn.Close An error has been caught Says "Unable to connect to any specified MySQL host" I hope I can get help or suggestions. Thank you. Please verify that MySQL SQL Server listens on external interfaces. In most Nix environments this is the default for the localhost, it means that you can not connect to a remote machine, even if you disable the firewall. This is either Tie-address xxxx Where xxxx is the IP address of www.mysite.net and restart your MySQL server. Update As you ...

java - What is the C++ equivalence for a server side that uses Servlets & JSP? -

When I am using Java in the server side, I use JSP and servicelet. What is the C ++ equivalence for the server side (when JSP and servicelets use Java)? Thanks Already discussed The enterprise application is a failure for C ++, I would say. Still, answering your question. There are frameworks such as Visual C ++

jquery - Set datepicker default date -

I'm new to jQuery, I'm trying to set the default dates of two text boxes so that they will open on the page When the page opens I want to do the search start at the end of the current year 01/01 / today's default. This is my code and it does not work: (& lt; any & gt; $ ('# searchStart')) datepicker ({dateFormat: 'dd / mm / yy', DefaultDate: '01 / 01 / '+ Fullwire ()}); (& Lt; any & gt; $ ('# searchEnd')) DateTime ({dateFormat: 'dd / mm / yy' defaultDate: new date ()}); For the current date, you can do var theDate = $ .datepicker .formatDate ('dd / mm / yy', new date ()); and input your .val (theDate) . For another: var theYear = $ .datepicker.formatDate ('yy', new date ()); $ ('Input'). Val ('01 / 01 / '+ year); $ ('Input'). Date picture ({dateFormat: 'dd / mm / yy', defaultDate: '01 / 01 / '+ year));

json - Golang decode map[string]float where float is encoded as string -

Then I am working with an API which provides a Jason object that maps a float to a string Does, however, they encode float as a string. I know that when a personal float is encoded in the form of a string, you want to say that the strips can be used in the tag: item float64 `json:, string" ` I against a interface {} as the value in the map I'm not thinking of using it, but it only kills me that there is a way to do this. Example of Playground: How about using json.Number? Example: No idea, though its best method though ...

Python error fetch email from Gmail -

I have a python script like this to get an email from my Gmail. In some emails I can get a CSV file , But an email has encountered an error. This is my script: import import import import import OS detach_dir = '.' #Directory where the attachment is to be saved (Default: Current) Category GMTST (object): def __init __ (self): Self-submitter = "/ TMP" def test_save_attach (self): auto.connection = poplib.pop3_ssl (' .com ', 995) self.connection.set_debuglevel (1) self.connection.user ("email.google") self.connection.pass_ ("password") email, total_bytes = self.connection.stat () print (" Email in {0} Inbox, total of {1} bytes. "Format (email, total_bytes)) Return format: (feedback, ['Message_Num Oak TTS ', ...], octet) msg_list = self.connection.list () print (msg_list) # Border for processing in message (email): # return in format: (feedback, [' line ', ... ], Octetate response = self.connection.retr (i + ...

javascript event onkeypress event won't run -

I am trying to warn the user whenever he presses. I decided to use javascript for this. I have the following HTML: & lt; Div id = "all" & gt; & Lt; H1 & gt; Welcome to the awesome chat system & Lt; / H1> & Lt; Input type = "text" id = "name" & gt; & Lt; Br / & gt; & Lt; Textarea rows = '30 'id = "chatarria" disabled =' true '& gt; & Lt; / Text field & gt; & Lt; Textarea id = "written typing" onkeypress = "keyfunction (e)" & gt; & Lt; / Textarea & gt; & Lt; Button ID = "Send" & gt; Send & lt; / Button & gt; & Lt; / Div & gt; Here is Javascript: & lt; Script & gt; Function keyfunction (E) {if (e.keyCode == 13) {Warning ("talking to ..."); }} & Lt; / Script & gt; However, the problem I am facing is that although I enter the texture, my browser does not alert me. I am su...

ios - Transparent UINavigationBar -

IOA is a newbie and I found this solution to be made in UINAVNBR transparent. Where can I place this code in my project file? [Self.navigationbar SetBackgroundImage: [UIImage new] forBarMetrics: UIBarMetricsDefault]; Self.navigationBar.shadowImage = [UIImage new]; Self.navigationBar.translucent = Yes; So it has been implemented in my entire project where the navigation controller is being used. put in your viewDidLoad your rootViewController function of this code: Objective-C: [self.navigationController. Navbarbar setback background image: [UIImage new] forBarMetrics: UIBarMetricsDefault]; Self.navigationController.navigationBar.shadowImage = [UIImage new]; Self.navigationController.navigationBar.translucent = Yes; Self.navigationController.view.backgroundColor = [UIColor clear collar]; Swift 2.x: NavigationBar if = navigationController .navigationbar {navigationBar.setBackgroundImage (UIImage (), forBarMetrics: .DEFAULT)? NavigationBar ShadowImage = UIImage ()...

css3 - CSS Z-index for Background Images -

I have two background images- A and B. Automatically in front of ABC. Can I change it using the Z-index? You can set multiple background images ... but the stacking order is determined by the order listed in your CSS is. Background: url (number.png) 600px 10px no-repeat, * * at the top, like- z-index: 4; * / Url (thingy.png) 10px 10px no-repeat, / * z-index like middle: 3; * / Url (Paper-4PNG); / * Below, such as z-index: 1; * /