Friday, 15 May 2015

visual c++ - Armadillo in Win64 (LAPACK and BLAS) - VC++ 2010 -


To calculate some matrix with Armadillo

I am using VC ++ 2010 I think Armadillo has some matrix Use the LAPACK and BLAS to work in reverse, its examples here. (Now, I want to use a Win64 platform, but I do not know how to link the backups and BLAS files to Armando or find .


I have the same files (lapack_win32_MT.lib and Blas_win32_MT .lib) in an x64 platform, but I've got many missing ( error LNK2019: unsolved external symbol ... ).


How can I use Armandlo Use the LAPACK and BLAS in the X64 VC ++ 2010 Platform?

You use 64 bit versions LAPACK and BLAS, or libraries that provide LAPACK and BLAS functions. For example, you can use 64 bit versions of Intel MkL or AMD ACML :

  • Mkeel:
  • Simel:

    Mkeel and Simel really high-performance version of LAPACK and BLAS in.

    The 64-bit version of the original LAPACK (reference implementation) is also here:



python - Need help in understanding how the solution to rotate N*N matrice by 90 degree in place works -


I am trying to understand the solution to rotate the N * N array at the place of 90 degrees. This question was asked before, but now it is closed - [Link] The best answer given is beautiful, but I am not able to understand it, someone can interpret these steps

It is not necessary in Ajhen, because you can swap all four elements once in the same expression: [y], one [N-1-y] [x], one [y] [n-1-x], a [n-1- X] [n-1-y] = (a [y] [n-1-x], [n-1-y] [x], a [n-1- X] [y],

n × n matrix, n = 3:

  1 2 3 4 5 6 7 8 9   

N / 2 = 1 , (N + 1) / 2 = 2 .

x = [0, 2] (0 or 1), y = [0, 1] (0).

Corner:

  1 2 | 3 _____ | 4 5 6 7 8 9   

swap : 1 ounce ???? 3 a 7 a 9 (1 ??? 1) ; 2 o "6 one 8 one 4 (â ???? 2) < / Code>

5 × 5 matrix:

  abcdefghijklmnopqrstu Vwxy   < P>  N / 2 = 2 ,  (N + 1) / 2 = 3 .  

X = [0, 3] (0 or 1 or 2), y = [0, 2] (0 or 1).

Corner:

  ABC | DEFG H | I j ______ | K LMNOP QRSTUVWYY   

SWAP:

  AA ???? E y ??? Uf one ???? D â ???? T V b â ???? Jm x pg a ???? I have a ???? S â ???? QA AO ??? Ya ???? K H ??? N â ???? RL    

javascript - Show ajax tooltip from an SVG onclick event -


I have a SVG with this code for some shapes (a map of it)

 < Code> onclick = "top.traeDatos (evt.target.id);"   

I have an html file:

  function tray.ditos (field) {warning (area); }   

So, I click on an area, I have the alert window with the field name and the variable in the HTML file. Now I want to click on the map to display a popup with more information, I am using AJAX from one of several files, for example "getdetails.php".

I am new to JS and AJAX, I know how to make a standard call in AJX, it has been given an ID (or name of this name), I know the value of the text field How to change I look for AJAX calls ... but I can not call AJAX and show a tooltip in that Javascript code in SVG or how to understand HTML.

I'm not sure what tolltip to use, but a problem at the time;)

Can you highlight me a bit.

Thank you!

Here's the beginning:

  function tray ditos (region) {Var domn = document.domain; Document.domain = domn; Var detURL = "http: //" + domn + "/getDetails.php"; $ Ajax ({url: detURL, type: 'POST', data: {field: area}, cache: incorrect, success: function (jsn) {var data = jQuery.parseJSON (json); // PHP using json_encode () You can return an item in an array / / in the example 'array' $ ('# insert_place') in the example below. Val (data.info);}}); }   

Let me know that you have a problem with it.

objective c - GCovr does not generate a valid report -


I want to set up my Jenkins with Cobertura to track code coverage. Unfortunately I can not generate a valid XML

I am using.

  • Pre-release gcovr 2.5 (r2774)
  • Xcode 4.6.1 build version 4h 512

    My project code coverage files Is correctly prepared, but the report created with GCOVR is not useful

    The order I use to generate the report:

      gcovr -r / Users / Share / Jenkins / Home / Jobs / CodeCoverage / Workbench --object-directory / Users / Shared / Jenkins / Home / Library / Developer / Xcode / DerivedData / MyProject-aooceqwwovrizceerghqvhfl Cfty // creation / intermediate / myProject.build / development / myProject.build '* developer .. * '/ Objects Normal / x86_64 --exclude --exclude' * Test *.' --xml   

    This will generate this output to me:

        

    If I delete --object-directory and -r and then I execute the command from the derived data directory, a valid report is generated from this report from Cobertura Can be read but can not show any detailed information about source files.

    While working with XCode, I have found that $ WORKSPACE / build Construction Directory helps with this problem keeps this derived data directory out of it, and also keeps my object files neatly in the build object. It also prevents two builds from interfering with each other.

    If using the Xcode build tool, set the SYMROOT to the $ WORKSPACE / build configuration tool in the creation of the device. If you are building from the command line, then set it manually on the command line or in the environment.

    Then a gcovr script such as:

      / your / path / to / gcovr -r - object-directory build / your app.bild / coverage - ifoisimulator / yourApp .build / Object-Normal / i386 --xml & gt; Build / coverage.xml   

    (Your path may vary slightly depending on your build style, call, etc.)

    And finally in Cobertura config, The point build / coverage.xml , and when you use the tool within Jenkins, you should get the annotated source.

    I should be working in the small field of Mac Mini, really happy with that configuration.

php - pyroCMS and codeigniter add-ons -


Greetings I'll just ask a very simple question. I am very new to PyroCMS and I was wondering if it is possible to use the same modules, add-ons, widgets and plugins created in Codeigniter for PyroCMS? Originally yes, but some changes should be made in your class, for example you << div>

code> public_controller Take a look at the pyroos docs in the pyros module:

Unable to get ruby running on Mac OSX 10.8.3 -


I'm trying to run Ruby on my Mac for a few days and whatever I do does not seem to be successful . I have installed MacPorts and have followed the post here:

I run the following command:

  sudo port selfupdate sudo port install apple-gcc42   

they have successfully completed, then I run the line given below:

Enter the code here Macpops Base is already the latest version DEBUG: Root To set up ownership of MacPorts sources, ports tree has been updated To upgrade your installed ports, you must run port upgrades on port i7-86-apple-darwin12-gcc-apple-4.2.1: any input File missing files required: autoconf, automake, libtool, pkgconfig, libiconv, libyaml, readline, libxml2, libxslt, libksba, openssl, curl-ca-bundle, sqlite3, zlib, ncurses, gdbm. Please refuse to continue cowardice, please read 'RVM Autolibes'. There were package installation errors, be sure to read the log.

Do I need to install the wrong packages that reference it? If so, how do I do this? I am not very familiar with the MacPorts and appreciate the help to do this work.

Since I originally went to install RVM, so I followed the first command for RVM with Ruby:

  $ \ curl - #l Https://get.rvm.io | Bash -s fixed - autolibs = 3 --ruby   

When I ran this command, it was downloaded and compiled, when it went to install rubygems- 2.0.3 ruby- 2.0.0- P0 gave the following error message:

error in running 'env GEM_PATH = / usr / local / rvm / gems / ruby-2.0.0-p0: / usr / local / Rvm / gemstone / ruby-2.0.0-p0 @ global: /usr/local/rvm/gems/ruby-2.0.0-p0: /usr/local/rvm/gems/ruby-2.0.0-p0@global GEM_HOME = / Usr / local / RVM / Gem / Ruby-2.0.0-P / URR / local / RVM / RBI / RBI-2.0.0-P / BN / RUB-D / USR / LOC / RVM / SRS / RUBG-2.0.3 Setup.rb --verbose ', please read /usr/local/rvm/log/ruby-2.0.0-p0/rubygems.install.log

Please read So I went to open the log file and below it says

error: while executing the gem ... (NoMethodError) unchanged method # & lt; Gem :: Essentials for Orders :: SetupCommand: 0x007fa09b05d7a8 & gt; Installing ruby ​​installs to install gem

Any ideas that I can do next?

Thank you in advance

Let me run the OS X 10.8.3 and XCode 4.6.1 There were similar problems with. After some googling, I tried to set up with a similar RVM command, in addition to using the XCode version of clay (which is the symlinks for / usr / bin / cc). Try it out:

  \ curl - #l https://get.rvm.io | Bash -s fixed # get rvm source ~ / .rvm / scripts / rvm get rvm # updated on top # rvm cc = / usr / bin / cc rvm ruby ​​  

be it Should Rubygems-2.0.3 install the same failure, but only rubygems should be restored:

  CC = / usr / bin / cc rvm install rubygems latest # option "2.0.3 "If you want to" latest ".   

It seems that this is the one which is set for fixing in 2.0.4.

Hope that helps!

graph algorithm - Does a Given Network has a Unique Min-Cut? -


Let G = (V, E) be a network with S and being a source and having a sync The maximum flow should be in f. Find an algorithm that determines whether a unique minimum reduction exists in G.

I have managed to get a similar question on this site:

A summary of the answer given here:

Find all the verticals arriving from S in the remaining graph and we got a minimum cut (S, T) in G.

Look at the same residual graph, starting with T

This group is also a minimum cut.

If this deduction is similar to your original cut, then there is only one, otherwise, you have just got 2 cuts, so the original one can not possibly be unique.

I do not understand if the deduction is similar to the original deduction, the deduction is unique, who can promise us that there is no other minimum deduction?

In advance, I do not consider that solution a lot. But in the original question, the second answer provided by Devin is absolutely correct.

I copy and paste it

  With minimal ST reduction, (U, V) cut-edges e ', we make a simple observation: if it If the minimum deduction is not unique, then there are some other minimum deductible with the set of cut-outs E, such as E '!! = 'If yes, then we can repeat on each side of E, add to our capacity, re-calculate the maximum flow, and check whether it has increased. As a result of the above observation, an increase in E appears' When the increase, the maximum flow does not increase, if the original deduction is not unique.   

Some of your own explanations :

Why do you really need to prove

  There is an edge in E 'that there is no increase in the maximum flow when it increases & lt; = & Gt; The original deduction is not unique   

=> You can increase the edge of e by 1, calculate the new maximum flow and it remains The same, which means that the e is not in the new low cut (if in e , then the minimum cut, according to the capability of F (E) = E, Since e is not in the new minute deduction, it is also a small cut of the original graph, which we know is the same volume with deduction is. Therefore, the original deduction is not unique.

& lt; =:
The original deduction is not unique (let's call them E and E '), which means that you have the side e e is but there is no E in it. Then by increasing the capacity of only e 1. While calculating the minimum cut of the new graph, E ' already exists. Since e ' does not have an edge e , the maximum flow remains without any doubt.

Hope you understand :)

mule custom transformer works in studio, but not deployed to standalone server -


I have flows with a custom transformer. This flow works when I run it under Rick Studios, but Mile fails when run by standalone server error message "There is no class for element custom transformer (name = update table)"

   & Lt; Collective-splitting doctor: name = "collection splitter" /> & Lt; Custom-transformer class = "com.domain.UpdateTable" doc: name = "update table" & gt; & Lt; Spring: Property Name = "Table" Riff = "Table" /> & Lt; / Custom transformer & gt; & Lt; / Flow & gt;   

I also found, but there was no answer;

This error was caused by java.lang.NoClassDefFoundError, which catches the malfunction and "not of the element Class "message here is a error in my case due to the exception from a static initial.

php - Filemtime error? -


I am having problems with some of the scripts inherited when I become a webmaster of a site: This is an error we received:

  WARNING: File time () [function.filemtime]: State failed for / home / public_html / site / modules / chat / cache / locations / 2_0   

I have this file on line 101:

   

'Code' $ tch = filemtime (path.module 's' chat 's' cache 'S.' place 's. $ Meet [' location '].' _ '. $ Get_ [' area '].' .tch ');

Now it's chmod'd for .tch file 777, I've even tried it at 755. No dice 'S' is a directory separator, FYI

Any help is appreciated. I searched and searched ... no luck finding any answer.

Now it

< P> What is the permission on the directory?

powershell - Invoke-WebRequest GetSystemWebProxy() -


Under PowerShell 2.0,

itemprop = "text">

I know that you can set a proxy, which you can do without precise proxy settings in any way The following are:

  $ proxy = [System.Net.WebRequest] :: GetSystemWebproxy () $ proxy.Credentials = [System.Net.CredentialCache] :: Default Credentials   

Now, my question is that I do not know the proxy settings that I can use above and can combine it with PowerShell 3.0 Invoke-WebRequest I was hoping to be able to:

  $ proxy = [System.Net.WebRequest] :: GetSystemWebproxy () $ proxy.Credentials = [System.Net.CredentialCache] :: Default credentials $ WS.Proxy = $ proxy $ login = Invoke-WebRequest https://website.com/login_form.html- Session Variables WS   

However, when I do this I try to make an error, (apparently with my company proxy) indicating that my credentials can not be verified, I hope this will eventually work, but Maybe I'm just making a simple mistake.

Maybe it can help, I keep it in my profile. This new web is using the new $ PSDefaultParameterValues ​​ preference variable to set the default proxy value for the new web CMDlet This code detects whether I am in my office environment and set the settings accordingly I am doing This prevents me from specifying settings every time I use those commands.

  if (test-connection myCorpProxy -Count 1 -Quiet) {$ global: PSDefaultParameterValues ​​= @ {'Invoke-RestMethod: Proxy' = 'Http: // myCorpProxy: 8080' ' Invoke-WebRequest: Proxy '=' http: // myCorpProxy: 8080 '' *: ProxyUseDefaultCredentials' = $ true}}    

ruby on rails - Create a Diagram from Database Information -


I am trying to look at many libraries, but none can help me, I already saw Diagrams and gojs and many canvas libraries that you want to draw your diagram with the browser.

Developing an application that creates a cause and effect diagram with user type information, this information is saved on the database and I need to make the data such as something from the database < / P>

Any good library that you know can help me?

What's wrong with either of these two?

It is doing this with GoJS and it is very good - Unfortunately the cost of that library is high, though.

How to make a personal facebook app -


I'm trying to create a Facebook application that will have to do something on my timeline. I can not understand why I am not sure how things work, so I am hoping that some things can explain here. I do not want anyone to be installing that app or somehow to reprimand him for posting on my timeline in my name. If possible, what steps should I take to stop these things?

Besides, what you have learned so far, you use php-sdk to authenticate And then check the User ID for visitors.
"I will edit the code as we find out what you are trying to do, according to the action."

php sdk example.
  // init php sdk here // Check that we have the User // Call API to get information about that usage $ user_profile = $ facebook- & gt; API ('/ m'); // If we have a user, then we can use that User ID as a cover to filter the content. If ($ user_profile [id] === '000000000') {// 000000000 This is your Facebook ID for example. // I'm logged in, and only I can see it. // Get some information, post something, add photos and more; here. }   

curl example

When you curl 'me', it ensures that this current session is user, then when you get it from its real user id If you compare, you can use the gate "to talk so much" which only you can see and use me hard to make the connection is only necessary to make the gate, you call all your other curl You can know when you Are doing this.

  http://anotherfeed.com/curl.api.php? Objid = me   

Here's an example, when I curl me, it looks for the user to log in, if there is an access token for this example I will exclude , it will return an array with my ID along with my "my" information

hard coded I use $ me = $ curlresults [id] Which will bring my user ID back to the session call.

/ P>

  $ me = $ curlresults [id] if ($ me === 'myfacebookuserid') {// do my other curl calls here, I know that I can only see this. }   

Full curl example.
  1. Obtain your user token for your app from the token tool provided below, archive it from anywhere so that you can pass it through the URL ultimate or ultimate session ....
  2. Add your Facebook user id where it says myfacebookuserid
  3. To secure it, you must have access to a post, receive or token with the session.
  4. For this example we will use the method.

    yourpage.php? User_token = youruseraccesstoken How it is passed in this example.


      $ access_token = $ _GET ['user_token']; $ Build = 'https://graph.facebook.com/me?'.$access_token.' '; Function GetCH ($ url) {$ ch = null; If (! $ CH) {$ ch = curl_init (); } Curl_setopt ($ ch, CURLOPT_URL, "". $ Url. ""); Curl_setopt ($ CH, CURLOPT_HEADER, 0); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, true); Curl_setopt ($ ch, CURLOPT_FORBID_REUSE, true); Curl_setopt ($ CH, CURLOPT_FRESH_CONNECT, true); Curl_setopt ($ CH, CURLOPT_CONNECTTIMEOUT, 10); Curl_setopt ($ ch, CURLOPT_TIMEOUT, 20); Curl_setopt ($ CH, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); Curl_setopt ($ CH, CURLOPT_HTTPAUTH, CURLAUTH_ANY); Curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, incorrect); $ Return = curl_exec ($ ch); If (! Curl_errno ($ ch)) {return $ return; } And {$ fb_fail = curl_error ($ ch); Refund $ fb_fail; } Curl_close ($ ch); Not set ($ ch); }; $ Returned = getch ($ build); $ Locs = json_decode ($ back, true); $ Meid = $ locs [id]; If ($ meid === 'myfacebookuserid') {// do my other curl calls here, I know that I can only see it}    

excel VBA End method on Range object -- application-defined or object-defined error -


I'm experiencing an error using the range object's ending method.

The code below is a fraction of my program, and when I go to the last line, I get the following error: "App Defined or Object Defined Error"

 < Code> sub data group (testcell, j, k) slow storage range set data seals = worksheets ("data"). Set Range ("B2") Datacelsbie = Worksheets ("Data"). Set the range ("I2") I = 0 to 30 currentLine = testCell.Offset (i, 0) set = worksheets ("archive"). Range ("B4"). End (x1Down)   

However, in a later part of my program I seem to have the same implementation, but I have not found any error with this part.

  Set DataCellsA = Worksheet ("Data"). Set Range ("C2") DataCellsB = Worksheet ("Data"). Dim the Range ("J2") Set the last CALAL = DatacellesA.and (XLDown) as the last Cielab Rage set in the form of the last CLLA Range set. CALL = Datacels B End (XL DOWN)   

What is the difference between two? I am making sure to declare my variable as categories, and I have to be careful to use the "set" prefix to ensure that it is an object, and no value.

Middle mouse button on java not working properly -


When I use mouse LESTONER and I check for a middle mouse button, it does not respond properly I do not know why, but it seems as if I need to scroll through walking to get an event to be part of my code, if it is

  public zero With mouse mouse (mouse everne e) {if (new rectangle (0,0,1274, 30) is included (Screen. MSE)) {top menu.click (); } And if (new rectangle (0,31,1100,549) is included (screen. Mse)) {Map.cliked (e.getButton (), 0); Println ("mouse:" + e.getButton ()); } And if (new rectangle is included (1100,30,174,550) (screen.m se)) {// cliked modeMenu} and if (new rectangle (0,580,1100,164) is included (screen .mse)) // Cliked ToolsMenu} Else {// cliked mode change} switch (E. Megadometrie ()) {case InputEvent.BUTTON1_MASK: {System.out.println ("This is the left button"); break; } Case InputEvent.BUTTON2_MASK: {System.out.println ("This is a middle button"); break; } Case InputEvent.BUTTON3_MASK: {System.out.println ("This is the right button"); break; If you see javadox for MouseEvent, you can see BUTTON1. , BUTTON2 and BUTTON3 are not called left, middle and right mouse buttons. It depends on the mouse whether the buttons are 1,2 and 3, so that BUTTON2 does not mention the middle button. To see if the button between your mouse has been detected correctly, try the following:  
  with a public Zero mouse mouse (mouseover-e) {System.out.println (e. GetButton ()); }   

Now press your middle mouse button. If there is no output in the console, then your mouse has no middle button (or it has not been recognized properly). If there is an output, then it matches the button (1 = BUTTON1,2 = BUTTON2,3 = BUTTON3). If the output is 0, then the button is mouse event. Noboton, which is unlikely to happen.

One more thing: try using SwingUtilities.isMiddleButton (MouseEvent E). This can fix some problems with your mouse. If you do this, keep your mouseclient () method on

  public zero mouseclutter (if it is (swinguals.littmosbutton ( E)) {System.out.println ("this is the left button");} and if (swing utes. Isimlomz button (e)) {System.out.println ("this is middle button");} and if (SwingUtilities .isRightMouseButton (e)) {System.out.println ("This is the right button")}}   

(Exactly with all the other code written above the original code )

change datetime from mysql to string format on php -


I need help to change my datetime format for string format on my php page

For example if I have this date format: 2013-03-26 20:18:55

I have to display it on my page: March 26,2013 20:18:55.

This is my query that becomes value from mysql

  while ($ row = mysqli_fetch_assoc ($ result)) {echo 'date:' $ line ['postdate ']' & Lt; / Br & gt; Posted by: '. $ Line ['first name'] '& lt; / Br & gt; Posts: '$ line [' post ']. '& Lt; Br / & gt; & Lt; P & gt; ';} Mysqli_close ($ db);   

Note that my date type of my 'postcard' is datetime

Retro Date ('FD, YH: I: S', Stromatium ($ line ['Postcard']));

File works in Java 1.5 but not in Java 7 (java.io.FileNotFoundException Permission Denied) -


I have a file I am attempting to access. When I moved it to Java 1.5, it's OK Was there. Since then, I've upgraded to Java 7 and now I'm getting a java.io.phileNotFoundException permission denied error. Java.io.FileOutputStream at java.io.FileOutputStream.open (the original method)

  java.io.FileNotFoundException: /folder/test.xml (permission denied). & Lt; Init & gt; (  

This is actually trying to write, but trying to write it on. File using XMLEncoder

  XMLEncoder encoder = New XMLEncoder (New BufferedOutputStream (New FileOutputStream (filename)); encoder.writeObject (encoder.close);    

If you are under Unix / Linux, then try the following commands because of the user.Java $ touch /folder/test.xml

If your file Sitting in other places (for example /home/AAA/folder/test.xm L), change the above path.

The idea is that your current user can write file

c# - Why does CloudBlobClient.BaseUri add a trailing slash (sometimes)? -


I think this is a bug, but I'm not sure I'm starting. Here's my situation.

Setup information

I have a website that allows uploads for Azure Storage Blob, and webpages. In Base Web Configuration

  & lt; BlobEndpoint value = "http://127.0.0.1:10000/devstoreaccount1" />   

and in the test server web configuration

  & lt; BlobEndpoint value = "https://myazureaccount.blob.core.windows.net" xdt: transform = "change" />   

I have a custom configuration handler so that the value can be obtained from web config.

  [ConfigurationProperty ( "blobEndpoint", IsRequired = true)] public string configuration Element Bboindpoint {return (String Configusn Element) base [ "Blobandpoint"]; } Set {base ["blobEndpoint"] = value; }}   

I get a reference to the storage account

  StorageCredentialsAccountAndKey credentials = new StorageCredentialsAccountAndKey (CloudStorageAccount.CloudStorageAccountName, CloudStorageAccount.CloudStorageAccountKey); This.cloudStorageAccount = New CloudStorageAccount (Credentials, CloudStorageAccount.BlobEndpoint, CloudStorageAccount.QueueEndpoint, CloudStorageAccount.TableEndpoint);   

Then get the Cloud Blob client this way

  this.cloudBlobClient = this.cloudStorageAccount.CreateCloudBlobClient ();   

Problem in hand

This is where I start getting different results.

If I use the storage emulator endpoint ( http://127.0.0.1:10000/devstoreaccount1 ) and call it

  This.cloudBlobClient.BaseUri   

Return value http://127.0.0.1:10000/devstoreaccount1

However, if I make my actual Account endpoint (use https: // myazureaccount) Blob.core.windows.net ) and make a single call, return value is https: //myazureaccount.blob.core .windows.net / .

Finally, follow the trailing slash. Why using a storage emulator when using not or real

update

present when using a < Strong> is why it exists? Web configuration settings and this was the output of each case

  {https://myazureaccount.blob.core.windows.net/} AbsolutePath: "/" AbsoluteUri: "https: // myazureaccount. blob.core.windows.net / "Authority" Myazureaccountkblobkcorekwindowsknet "DnsSafeHost:" Myazureaccountkblobkcorekwindowsknet "piece:" "host:" myazureaccount.blob.core.windows. net "HostNameType: DNS IsAbsoluteUri: true IsDefaultPort: true IsFile: false IsLoopback: false IsUnc: false LocalPath:" / "OriginalString:" https://myazureaccount.blob.core.windows.net "PathAndQuery:" / "Port: 443 question: "" plan: "https" segment: {string [1]} UserEscaped: false UserInfo: "" {} http://127.0.0.1:10000/devstoreaccount1 AbsolutePath: "/ devstoreaccount1" AbsoluteUri: "http: / / 127.0.0.1: 10000 / devstoreaccount1 "Authority" L27k0k0kl:l0000 "Dianssifihost:" 127.0.0.1 "piece:" "Host:" 127.0.0.1 "HostNameType: Aipivi 4 IsAbsoluteUri: true IsDefaultPort: false IsFile: false IsLoopback: true IsUnc: False LocalPath: "/ devstoreaccount1" OriginalString: "http://127.0.0.1:10000/devstoreaccount1" PathAndQuery: "/ devstoreaccount1" Port: 10000 Query: "Plan": "http" Segment: {string [2]} UserEcaped: Wrong UserInfo: ""   

And it appears that it is not really related to URI class and CloudBlobClient . I've updated the tag appropriately.

Looks like the same thing that could be

  Path and Other: "/"   

Remove that thing and work properly. If you need to test the URI class then I have written to you very soon that you can use it, in the future you will be able to return the correct host URI class for a lot of time to test And will save the headache. var uriList = new list & lt; String & gt; () {"Https://myazureaccount.blob.core.windows.net", "https://myazureaccount1.blob.core.windows. Net", "https://myazureaccount2.blob.core.windows.net" }; Var Holdlist = Yuri List Select (uriname => New Yuri (uranium)). Select (Yuri => Yuri.Host) .Olist ();

scala - Using Akka in separate library -


Maybe this is a stupid question, but if I develop a library that uses the uncomfortable features, then I Should my system be created in the library or user, pass it through the parameter? What is the best practice?

I recommend going into it as a built-in parameter, this way the library user can < / P>

He may choose to share a common actor system with another component of the application, for example.

If you are creating a complete framework you can provide a default which can be easily imported (like Play!).

php - Joomla check for empty string with JInput -


After clearing my inputs, I'm wondering if an empty string is covered with this?

  $ jinput = JFactory :: getApplication () - & gt; Input; $ This- & gt; Name = $ jinput- & gt; Get ('name', '', 'STRING');   

Normally without joomla I will also check an empty string. If there is something like this:

  Get the method looking at JInput (! ($ _ POST ['name']))   

It checks to find the isset :

  public function ($ name, $ default = null, $ filter = 'cmd') {if (isset ($ this) -> Data [$ name]) {$ this- & gt; Filter-> Clear ($ - $ [$ name], $ filter); } $ Default return; }   

That's not the case, because isset will only check for the null, though this is the default value for using the received method. So if I specify an empty string for the second parameter, then have I covered it here?

  $ this-> Name = $ jinput- & gt; Get ('name', '', 'STRING'); To decide on Joomla is not dependent on whether your empty string is a valid value or not. They have to use  isset () , because if they use  empty ()  and you return the code to '0'  , Which you consider to be normal, Joomla will return the default value instead of that  '0' .  

So it is completely normal to use only isset () to check whether the variable is set, and it depends on you Accept the values.

If the value is not set, and you set the second parameter to the empty string as '' , then return an empty string.

In your example a blank string will be returned, which is expected behavior.

php - Nested foreach loop issue -


I'm trying to get this nested foreach loop to work, but I have no luck have been found . This is my code.

  $ q = 0; $ ArrayCountTwo = Counting ($ _ POST ['Quantity']); $ I = 0; $ ArrayCountThree = Counting ($ _ POST ['item']); Foreign currency ($ _POST ['items'] as $ item) {$ sql = ''; Foreign Currency ($ _POST ['Quantity'] as the $ quantity) {$ q ++; If ($ q> $ arrayCountTwo) {break; } And {$ sql. = "INSERT_trade_show_restrated` (product ID, dated, date-protected, quantified protected) value (''. $ Item. '', ''. $ StartDate. '', ''. $ EndDate." ',' '. $ Quantity. ')';} Var_dump ($ sql);}}   

This gives me the first value in the $ items array on each recurring

Here are the arrays to be requested by you.

Objects and quantity order order.

  array (3) {[0] = & gt; String (2) "11" [1] => String (1) "6" [2] = & gt; String (1) "2"} array (3) {[0] => string (1) "1" [1] => string (1) "2" [2] = & gt; string 1) "1"}   

should do this every time.

  INSERT in `ts_table` (productivity, dated, date-protected, quantity, safe values ('11', '2013-4-11', '2013-4-25', '1') INSERT `ts_table` (productivity, date, reserve, date reserved, quantity, protected) value ('6', ' 2013 - 4-11 ',' 2013-4-25 ',' 2 ')    

< P> This should do you:
  foreach ($ _POST ['items'] as $ key = & g T; $ Item) {$ sql = "INSERT IN_trade_show_reserved_ (Product ID, Dated, Values ​​(Reserved), Quantity (Reserved) Value (''. $ Items. '', ''. $ StartDate. '', '. $ EndDate.' ',' ". $ _ POST ['Quantity]] [$ of].") "; $ Sql ​​per second" & lt; br & gt;';}    < / Html>

mapreduce - How to scheduling hadoop map tasks in different node cluster -


I have the only map program in which there are more than 10 maps in my cluster 5 nodes, my question is Can I schedule nodes to run the functions of which map? For example, let's run in node 1 in node 1, the node 3 running in node 3 and map 9 of node 5 is going on. If I can do this, then what changes are needed in my code and configuration file? By the way, I use HDFS. Thanks!

Affinity can not be set in Hadoop for node mapping for map work. The scheduler automatically decides on a fixed workbench / slot position where a map is to be run.

java - How to add sencha gxt palletes to eclipse juno? -


I have installed Eclipse Juno EE and added Google Web Toolkit plugins to all related gates. it works for me. Now I want to add extgwt to eclipse I downloaded the GSTT of Sancha last year. I have completed all the steps with this instruction, but when I open my modules in design mode, then I do not see the proper GCC straps with this same set. where am I?

What should you do to get sencha gxt control palletes in Design View in your project? Select your GWM Module file and right-click to select Google Web Toolkit & gt; Configure Ext GWT (GXT) command to use. This will add your classpath and module files and various GXT files to GiftZar in your war folder.

Once Extended GWT (GMT) has been added to your project, many new extension GWT Palette categories will appear:

However keep in mind, this version 2 For .x I'm not sure that works with the latest GST 3.x designer now.

View

java - servlet filter to rewrite URL -


मैं एक यूआरएल को फिर से लिखना चाहता हूं:

  • localhost: 8080 / Sendmail / newEmail.pdf? Request_id = 23456 और ईमेल पता =

    प्रति:

    • लोकलहोस्ट: 8080 / sendEmail / newEmail Pdf? Request_id = 23456

      फ़िल्टर कोड और मैपिंग नीचे है मैं यह कार्य कैसे पूरा कर सकता हूं? (एक उदाहरण के साथ एक उत्तर अत्यधिक सराहा जाएगा)।

      फ़िल्टर मानचित्रण:

        & lt; फिल्टर & gt; & LT; फिल्टर-नाम & gt; RequestFilter & lt; / फिल्टर-नाम & gt; & LT; फिल्टर श्रेणी & gt; com.abc.ms.email.filter.RequestFilter & lt; / फिल्टर श्रेणी & gt; & Lt; / फ़िल्टर & gt; & LT; फिल्टर-मैपिंग & gt; & LT; फिल्टर-नाम & gt; RequestFilter & lt; / फिल्टर-नाम & gt; & LT; यूआरएल पैटर्न & gt; / * & lt; / यूआरएल पैटर्न & gt; & LT; डिस्पैचर & gt; अनुरोध & lt; / डिस्पैचर & gt; & LT; डिस्पैचर & gt; आगे & lt; / डिस्पैचर & gt; & Lt; / फिल्टर-मैपिंग & gt;   

      फ़िल्टर कोड:

        सार्वजनिक वर्ग अनुरोधफिल्टर फ़िल्टर लागू करता है {निजी स्थिर अंतिम पैटर्न REWRITE_PATTERN = Pattern.compile ("(^ [1-9] \\ d *) $ "); सार्वजनिक शून्य doFilter (ServletRequest अनुरोध, ServletResponse रेस, FilterChain एफसी) IOException, ServletException {HttpServletRequestWrapper आवरण = नए HttpServletRequestWrapper ((HttpServletRequest) अनुरोध) फेंकता है; स्ट्रिंग url = wrapper.getRequestURL ()। ToString (); स्ट्रिंग संख्या = url.substring (url.lastIndexOf ("/")। प्रतिस्थापित करें ("/", ""); Matcher एम = REWRITE_PATTERN.matcher (संख्या); अगर (m.find ()) {RequestDispatcher dispatcher = wrapper.getRequestDispatcher ("request? Id =" + m.group (1)); डिस्पैचर। फोर्वर्ड (रीक, रिज़); } Else {fc.doFilter (wrapper, res); }}}}    

      मैं एक मौजूदा कार्यान्वयन का उपयोग करने की सिफारिश करता हूं । खुद

      हो रहा है एक जावा यूआरएल पुनर्लेखन कार्यान्वयन, जो Tuckey के URLrewriteFilter है

      देखें:।

      यह चाहिए

      वैकल्पिक रूप से, यदि आप अपने वेब कंटेनर के सामने अपाचे का उपयोग करते हैं, तो आप mod_rewrite पर विचार करना चाहें, जो उसी पर करता है अपाचे।



visual studio - VS Immediate Window for C++ Declarations -


Recently I have found that debugging is possible. This feature is really useful because if I want to experiment with code in that context, then I can create new variables in the new window without modifying the actual code, and then I can explore them in the clock window.

It works great for the C # project, I'm debugging, but now I'm trying to do the same thing for a basic C ++ announcement in a separate project. I break my breakpoint, and I type the following in the following window:

  int myVariable;   

returns this error:

  CXX0013: error: missing operator   

is there a step that I need To work with a C ++ project? You can complete the same functionality by adding new variables to your code window (instead of the instant window)

Make sure you have device-> option-> debugging-> gt; Edit and Continue - & gt; Enable native editing and continue checked.

  int myVariable = 444;   

Then add your code, debug-> Apply code changes , and it works. Alternatively set the next statement to move the execution point to a different line.

C# sql if query -


I try to

  var sql = string.format ("if ( {0} & gt; (Select from yCell to sStrength, where cell_ID = '{1}')) ycell SET sStrength = {0} WHERE cell_id = '{1}' end ", Maxstrength, update to InSalead); SqlCeCommand myCommand = New SqlCeCommand (SQL, Connection); MyCommand.ExecuteNonQuery ();   

There is an error: Token Line Number = 1, Token Line offset = 1, error in error = if but it runs fine in SQL Studio.

Can not say why it is unsuccessful, but I can suggest that you might have a command Try updating in:

Update YCell SET sStrength {=} WHERE cell_id = '{1}' and {0}> Estrinth

wolfram mathematica - using python to solve a nonlinear equation -


I have not used a python but the mathematical equation is not able to solve which I am trying to solve I am I am trying to solve the variables "a" of the following equations where s, c, mu, and delta t parameters are known.

Enter image details here

I used to write NSolve in mathematics, Solve, etc., but it is running for an hour with no luck. Since I'm not familiar with Python, is there any way I can use Python to solve this equation? "post-text" itemprop = "text">

You are not looking for an analytical solution for these equations because they are transcendental, in which a A .

I think the problem is with numerical solutions, that the limit of acceptable values ​​for a is interrupted by arcsin since Arcsin is defined for arguments between only -1 and 1 (believe that you should be a ), alpha for your code Code> and beta require a & gt; S / 2 and A & gt; (Sc) / 2 .

In Python, you can get a zero of your third equation (form f (a) = 0 ) brentq function: import as sipy.optimize np from copy as import. Brent = 10014.6 c = 6339.06 mu = 398600.0 dt = 780.0 def f (a): alpha = 2 * np.arcsin (np. Sqrt (s / (2 * a)) beta = 2 * np.arcsin (np.sqrt ((sc) / (2 * a)) alpha-beta - (np sin (alpha) -npsin (beta) ) - NP SCRT (MU / A ** 3) * DT A = Maximum (S / 2, (SC) / 2) A = Brentac (F, A, 10 * A0)

Edit:

The way brentq (f, a, b) is to clarify the tasks that it searches for f zero at one interval [A, b] . Here, we know that a is less than maximum (S / 2, (S-C) / 2) . I guessed that it was a high upper limit 10 times, and it worked for the given parameters. More generally, you need to make sure that the change in f happens between a and b and you can read more about this How that works in the function.

objective c - Trying to set UIControl objects' frames through a function -


I am trying to create a function to resize something like UILBull or UI buttons without typing the three rows I'm out every time this is what I have.

  - (zero) setObject: (UIControl *) Object size width: (NSInteger) Width height: (NSInteger) height {CGRect labelFrame = object.frame; LabelFrame.size = CGSizeMake (width, height); Object.frame = labelFrame; }   

However, when I do a UILabel (UIControl *) object, then this "incompatible indicator type" says how can I fix it for working for anything Which I can put on UIView?

Labels are not a subclass of UIControl You can use UIView instead of UIControl. Here is the hierarchy for UILabel UILabel: UIView: UIResponder: NSObject - (zero) setObject: (UIView *) Object SizeWidth: (NSInteger) Width Height: (NSInteger) Height {CGRect labelFrame = Object.frame; LabelFrame.size = CGSizeMake (width, height); Object.frame = labelFrame; }

There is a suggestion for you, the name of the method sounds strange to me. You can write a simple category to update the size of UIView. You can simply call with the following category

  [myLabel setWidth: 20 and Height: 20];   

On UIView + MyCategory.h

  #import & lt; UIKit / UIKit.h & gt; @ Interface UIView (MyCategory) - (zero) setweath: (NSiEteger) Avid and High: (NSINtegaeer) AHEIT; UiviView + Micration.M  
  #import "UIView + MyCategory.h" @ Permission UIView (MyCategory) - (zero) SetWed: @end   

( NSiEtegaGr) Avidth and Height: (NSINTEGAR) AHEIT; {CGTTF frameOutoUpdate = self.frame; FrameToUpdate.size = CGSizeMake (aWidth, aHeight); Self.frame = frameToUpdate; } @end

Rails app can't find my Gem's javascript -


I wrote and installed it in my Rail app, including the inside of the app. The problem is that the Rails application has not got the Javascript file of Gemstone, and Spockkat gives me errors such as "Spocex :: FileNotFound". Any clues as to what am I doing wrong here?

Your gem should have an engine class that handles rail :: engine for spock to include it in your scan path.

c# - How to override print in Forms.WebBrowser -


System.Windows.Forms में WebBrowser वर्ग DrawtoBitmap पद्धति सही तरीके से नहीं संभालता है जैसा कि कहा गया है MSDN।

मैं ओनप्रिंट विधि ओवरराइड करना चाहता हूं और अपना स्वयं का ड्राइंग कोड निष्पादित करना चाहता हूं।

मैंने WebBrowser वर्ग में OnPrint (PrintEventArgs ई) पद्धति को ओवरराइड करने का प्रयास किया है और कोड को कहा जाता है, लेकिन प्रिंटिंग नहीं बदलेगी।

मेरे पास है ने भी WM_PRINT विधि (0x317) को कैप्चर करने की कोशिश की और उसके बाद संदेश हैंडल से अपना खुद का ग्राफिक्स बनाना मैंने मूलभूत विधियों जैसे कि BeginPaint , SelectObject और EndPaint का उपयोग करने की कोशिश की है। कोड को बुलाया जाता है लेकिन प्रिंटिंग नहीं बदली जाती है।

WndProc (रेफ़ संदेश) को ओवरराइड करें M) विधि।

  अगर (m.msg == 0x317 || m.sg == 0x318) // WM_PRINT, WM_PRINTCLIENT {का उपयोग कर (ग्राफिक्स जी = ग्राफिक्स.फ्रम एचडीसी ( M.WParam)) {// यहां ड्रा करें}}    

How to update this PHP regex to not allow more than 10 digits in a phone number? -


I'm using the following regex to make sure a valid phone number has been entered. If there are more than 10 digits in the present, then it does not show a flag.

How can this be decided?

  Public function phone number ($ value) {if (preg_match "/ ^ \ (? [0- 9] {3} \)? * -? * [0-9] {3 } * -? * [0-9] {4} $ / ", $ value)) {back true; } return false; }   

Here is a test case which is currently being shown as a valid phone number, when it should not be:

35353535355535555555

If you are interested in numbers only, then you can filter everything And can check the result:

  Public function phone number ($ value) {$ filtered = preg_replace ("/ \ D /", "", $ value); Return Strangel (filtered $) == 10; }    

python - Is mapping features of strings helping parsing strings faster? -


I am developing a dictionary which will help me to see the words of English according to phonetics and keywords. This dictionary will help me find specific examples of English words to teach children.

For this, I have created a large Python dictionary with around 200k words, the value of which is their phonetic.

For example, to see the words, the words of the last -a * e , where there will be any part of Kashmir * consonant, I use all the keys with regular expressions Can i parse / P>

However, I thought that in order to map the words, it would be a bit more clever as written in the grid. That's why I can "bookmark" all those words whose last letters are -e and so on, so when I search for the word, I can just call those bookmarks and be sure to be a hit I can and I can reduce the parse to reduce the amount of words every time because I go through many criteria searches with the above example.

Is my strategy really making sense? Or is there a way to go about using regular expressions?

I have less time for the program, I need some expert advice before typing valuable time. Thank you.

It is true that they make it very fast and efficient to answer these questions. It is not very clear that you must always be searching from the end of the word or from the beginning, but if it is going to be a bit of both then you have to try both directions. And if you ever need to find matches in between, then no one can help triangular.

The reverse index (such as the power search engine) sometimes stores the word as words, and then stores the information of connectivity. For, 'overflow' can be broken into 'Ow', 'RFL', and 'ow', and some metadata exists somewhere that there is a word in the combination of these three ngms, each word is different, Violation in a different way Although I am unclear on the details: -

or consider the fact that unless the performance is performed In fact, is important for this application, that it is possible to use the expression regularly (and can possibly be optimized), for this type of dictionary size, and very simple is a 80k-word Use the dictionary A quick and dirty test:

  with the open ( 'dictionary.txt') as feathers: words = wing. Reid (). Strip () Import the import time ('\ N') expr = re.compile (r'a [^ aiouy] + e $ ', re.I) # Of course, to use a dictionary, too def bench () Easily spread: Start = -time.time () match = [word for word in word if expr.search (word)] come back + time.time (  

It is taking approximately 50ms on my computer, and for the simplicity and clarity of using regular expressions and your limited time, I think that's worth it.

return - Python: passing values from function to function -


I am fighting with it for three hours.

ETA- It should have been mentioned, but for the purposes of this class, global variables have not been allowed to be used.

In the main () function, I want to run a function first if only if the whole function is running for the first time. The first loop function starts some variables and prints some information which is not interesting if it is not the first time it is viewed.

I duly:

  # Before we can do any work here, start the necessary variable to run count = 0 def firstPass (): x = 5 y = 2 print "Count some things" count = count + 1 print "calculate in the first", count count on count, x, y df main (): print "calculate in main", count = count = 0 0: firstPass () else: # A complete set of other goods that are not going to run on # 1 #, because other stuff is user-modified X and Y.V. Using the Q, and resetting the start value to # must defeat itself Main pass ()   

This returns correctly on the first pass, but at the later time Returns:

  In the main calculation 1   

This is also a problem within my other user-modified x and y values ​​for other functions. Although I have not modified them here, I included them because I need to pass several values ​​between the functions in the code later, but who wants to read all, when I could put them here for example. .

I was under the assumption that

  back [variable]     

You have to:

  def firstPass (): global To get the variable to update   

count

You ask the keyword Global to load and store the interpreter in the global count variable instead of saving the interpreter in the local variable of that name. For example:

I global :

  & gt; & Gt; & Gt; I define two functions without using; A = 0> gt; & Gt; & Gt; Def foo (): ... a + = 1 ... back to a & gt; & Gt; & Gt; Def Bar (): ... Global A ... a + = 1 ... After separating both tasks by using a module, it becomes clear that What's the difference:  
  & gt; & Gt; & Gt; Import vs & gt; & Gt; & Gt; Dis.dis (foo) 2 0 LOAD_FAST 0 (A) 3 LOAD_CONST 1 (1) 6 INPLACE_ADD 7 STORE_FAST 0 (A) 3 10 LOAD_FAST 0 (A) 13 Returns_VALUE & gt; & Gt; & Gt; Dis.dis 3 0 LOAD_GLOBAL 0 (A) 3 LOAD_CONST 1 (1) 6 INPLACE_ADD 7 STORE_GLOBAL 0 (A) 4 10 LOAD_GLOBAL 0 (A) 13 return_ VALUE    

angularjs - Testacular Angular UI bootstrap 'directive' is required -


I'm trying to test a controller that uses the Kangaroo UI-Bootstrap communication command, but a < Strong> Error: Required argument 'instructions' error

This actually happens as I include the ui-bootstrap.min.js file in the Testicular Configuration.

The controller has been defined:

  Angular Modules ('xFormsEntries'). Controller ('xFormsEntryListCtrl', function ($ Radius, $ Dialog, Form, FormEntry, Form Field) {...   

The unit test is:

  Description ('Exformers Controllers', function) {first (each function ()} {this .addmatchers () (first) (formerly (module (' xFormsServices')); First (each module ('xFormsEntries')); Describe (' XFormsEntryListCtrl ', function () {var scope, ctrl, $ httpBackend, $ dialog; var formData = {formId: 1, name:' formname '}; apiURL =' '; // Override global API URL EforeEach (injection Function (_ $ httpBackend_, $ r OotScope, $ controller, _ $ dialog_) {// $ httpBackend = _ $ httpBackend_ Organize; $ HttpBackend.expectGET ('/ xFormsAPI / form') response (formData). $ Dialog = _ $ dialog_; scope = $ rootsecope. $ New (); Scope.formId = 1; Ctrl = $ Controller ('xFormsEntryListCtrl', {$ field: area});})); (This should get form from server ', function () (hopefully (Scope format format) .TB (undefined); $ httpBackend.flush (); Expect (scope format will be replaced). Twitter data (formadata);}); });   

All tests were passing before integrating UI-Bootstrap.

I previously (module ('ui.bootstrap'))

What magic is involved? I am missing it to do this work?

Have you included the dependency as well as the actual JS file?

Installation As soon as you have downloaded all the files and your page is included, you need to declare the dependency on the Ui.bootstrap module:

  Angular. Module ('myModule', ['ui.bootstrap']);    

c++ - How to pass a template function in a template argument list -


मान लें कि मेरे पास टेम्पलेट फ़ंक्शन है:

  template & lt; टिनामनाम टी एंड जीटी; टी उप-उत्पाद_कार्य () {वापसी टी (5); }   

मैं इस पूरे टेम्पलेट को किसी अन्य टेम्पलेट से कैसे पारित कर सकता / सकती हूं?

यदि produce_5_function < / कोड> एक मज़ेदार था, कोई समस्या नहीं होगी:

  टेम्पलेट & lt; typename T & gt; स्ट्रक्चर प्रोडक्शन__फंक्टर {टी ऑपरेटर () () कॉन्स्ट {रिटर्न टी (5); }}; टेम्पलेट & lt; टेम्पलेट & lt; typename T & gt; कक्षा F & gt; Struct client_template {int ऑपरेटर () () const {return F & lt; int & gt; () (); }}; Int five = client_template & lt; उप-उत्पादक & gt; () ();   

लेकिन मैं एक कच्चे फ़ंक्शन टेम्पलेट के साथ ऐसा करने में सक्षम होना चाहता हूं:

  टेम्पलेट & lt; ??? एफ & gt; Struct client_template {int ऑपरेटर () () const {return F & lt; int & gt; (); }}; Int five = client_template & lt; Produce_5_function & gt; () ();   

मुझे संदेह है कि "आप ऐसा नहीं कर सकते"।

< Blockquote>

मुझे संदेह है कि "आप ऐसा नहीं कर सकते"।

हां, यह मामला है, आप फ़ंक्शन टेम्पलेट को टेम्पलेट तर्क के रूप में नहीं दे सकते। 14.3.3 से:

टेम्पलेट-टेम्प्लेट-पैरामीटर के लिए एक टेम्पलेट-तर्क क्लास टेम्पलेट का नाम या उपनाम टेम्पलेट, आईडी-अभिव्यक्ति के रूप में व्यक्त किया जाएगा।

टेम्पलेट फ़ंक्शन को तत्काल से पहले करने की आवश्यकता है, आप इसे अन्य टेम्पलेट पर पास करते हैं। एक संभावित समाधान एक क्लास प्रकार को पास करना होता है जो एक स्थिर उपनिर्मित कार्यप्रणाली जैसा दिखता है:

  टेम्पलेट & lt; typename T & gt; स्ट्रक्चर वर्राअराउंड {स्थिर टी उपपादन_अभियान () {रिटर्न टी (5); }}; टेम्पलेट & lt; टेम्पलेट & lt; typename & gt; कक्षा F & gt; Struct client_template {int ऑपरेटर () () const {return F & lt; int & gt; :: produce_5_functor (); }}; Int five = client_template & lt; वर्राअराउंड & gt; () ();   

उपनाम टेम्पलेट्स का उपयोग करके, मैं थोड़ा करीब आ सकता है:

  टेम्पलेट & lt; typename T & gt; टी उप-उत्पादक_कार्यकर्ता () {वापसी टी (5); } टेम्पलेट & lt; typename R & gt; Prod_func = R () का उपयोग कर; टेम्पलेट & lt; टेम्पलेट & lt; typename & gt; कक्षा F & gt; Struct client_template {int ऑपरेटर () (एफ & lt; int & gt; f) const {return f (); }}; Int five = client_template & lt; prod_func & gt; () (produce_5_functor);    

html - issue with styling over a slide show -


Hey guys, I'm styling a content body built on a jquery slider. My issue is that for a few pictures I have a float: left , so they line with each other but the parent has a margin: -6 0 0; And if I float: left this parent gets out of the div ... HTML:

  & lt; Div id = "content" & gt; & Lt; Div class = "main_Body" & gt; & Lt; Div class = "top-half content" & gt; & Lt; Div class = "online_training" & gt; & Lt; Div class = "training_image" & gt; & Lt; Img src = "images / onlinetraining_home_03.png" width = "75" height = "75" /> & Lt; / Div & gt; & Lt ;! -. Training_image - & gt; & Lt; / Div & gt; & Lt ;! --online_training - & gt; & Lt; Div class = "background_check" & gt; & Lt; Div class = "background_image" & gt; & Lt; Img src = "picture / background_check_home_03.png" width = "75" height = "75" /> & Lt; / Div & gt; & Lt ;! -. Background_atage - & gt; & Lt; / Div & gt; & Lt ;! - background_check - & gt; & Lt; Div class = "unchanged_alit" & gt; & Lt; Div class = "uninsured_alert_image" & gt; & Lt; Img src = "picture / unisuredalst_system_03.png" width = "75" height = "75" /> & Lt; / Div & gt; & Lt ;! - Uninsured_Alit_itage - & gt; & Lt; / Div & gt; & Lt ;! - Uninspired_lert - & gt; & Lt; / Div & gt; & Lt ;! --top-halfCont - & gt; & Lt; / Div & gt; & Lt ;! - .main_Body - & gt; & Lt; / Div & gt; & Lt ;! - # content - & gt;   

Style: / * Main content # content * / # content {display: block; Max-width: 1200px; Margin: 0 auto; Background: white; Status: Relative; Box-Shadow: 5px 0px 13px # 888888; } .main_Body {Display: Block; Margin: -6 AM 0 0; Padding: 1am; } .online_training {Display: Block; Width: 200px; } .training_image {width: 75px; Height: 75px; Margin: 0 auto; }. Background_check {display: block; Width: 200px; }. Background_image {width: 75px; Height: 75px; Margin: 0 auto; }. Uninsured_alert {display: block; Width: 200px; }. Uninsured_alert_image {width: 75px; Height: 75px; Margin: 0 auto; }

include changes to the follwing

  .top -Half cost {margin: 6 AM 0 0; } .main_Body {Display: Block; Margin: -6 AM 0 0; Padding: 1am; Overflow: Auto; }    

paypal - Missing shipping address and note to seller in the create payment response -


I am using the REST API to create payments (in the sandbox environment) with payment_method = "PayPal". For some reasons I did not find the shipping address in the payer_info object in response. I'm also not sure how to get "notes to the seller" through the REST API. Any hints will be highly appreciated.

The shipping address data currently does not return to PayPal transactions in the REOP API we offer, Unless the shipping address was initially submitted with the request.

Our new Rest API is being prepared because we talk - I am looking at all your requests for this, so I am definitely passing that information.

In the interim, you might consider making another call on our classic GetExpressCheckoutDetails API, for this only Express Checkout Token (EC-XXXXX), Classic API Username, API Password And API signature will be required and you will have to return the shipping address data (among other things) to the response (address).

java - Why is there no StrongReference object? -


I am implementing some behavior that can benefit from using weak references of some time. I can give a signal to the classroom user at the time of construction, whether this is the case or not. Since weak reference expansion reference occurs at first glance, it seems that I can do something like this (this is a cap, I'm not really trying to do this I):

  Public Square Container & lt; T & gt; {Private Boolean use; WCF; Private References & lt; T & gt; Referee; Public container (boolean icac) {useWeakRef = isWaak; } Public Zero Store (T Wall) {if (useWaqRef) {ref = new WeakReference & lt; & Gt; (Val); } And {ref = new strong reference   

However, there is no StrongReference category, and accordingly:

Context items apply in close collaboration With the garbage collector, this class can not be sub-classified directly.

Therefore I can not create my own subclass of reference that holds a strong (general) reference of the object. This means that it is not possible to create a class that hides that it uses a weak (or soft) reference from the collar.

I do not really understand why this class does not exist, a strong reference object should always get the object () unless it is clear () Has not been called. Why is this missing? Is any StrongReference incompatible with the context ? This general reference holder will make things very easy.

You can not subclass the context because it is not a public / protected constructor but an alternative solution:

  class StrongReference & lt; T & gt; Leak spreads & lt; T & gt; {Private Final T Guidance; Strongreference (t RevenueCurrer) {super (empty); this. Clear = direction; } @ Override Public T () {Return Direction; } // Apply other methods}    

jquery - drawing rectangles on an image in javascript -


I am trying to write a simple JavaScript program to mark the rectangle on an image. When you click on a button to add a rectangle, you click the upper left and lower right corner and the program should rectangle in red. I am using jquery directly with jquery.

Everything works almost exclusively, except that when the upper left or lower right corner of a rectangle is in that case inside another rectangle, while the click event is processed, the x and y are wrong Are there.

I'm trying to troubleshoot it for hours and Google did not help. Specifically I tried:

  • Changing e.pageX for e.spaperX and e.screenY
  • Use full position (up and left) instead of offset

    It is clear that I am missing something that is not allowing me to correct it, but I do not know at all.

    I still have a JS Code if you do not want to click on it:

      var rects = [{x1: 708, y1: 246] , X2: 738, y2: 277}, {X1: 442, y1: 23 9, x2: 474, y2: 271}, {x1: 676, y1: 242, x 2: 703, y2: 270}]; Var $ Container = $ ("# Container"); Var click_count = 0; Var added_rects = 0; Var waiting_for_clicks = false; Var new_rects = []; Var current_rect = {}; Var add_rect = function (color, rect) {$ ('' div class = "child" /> ') .appendTo ($ container). Css ("left", rect.x1 + "px") .css "top", rect.y1 + "px"). CSS ("width", (rect.x2-rect.x1) + "px"). Css ("height", (rect.y2-rect.y1) + "px"). CSS ("border", "1px solid" + color); }; Var remove_last_rect = function () {if (new_rects.length & gt; 0) {$ container.children ('div: last-child') Remove (); New_rects.pop (); }} _.map (rites, _partial (ad_state, 'red')); Var listen_for_rect = function () {click_count = 0; Waiting_for_clicks = True; Current_rect = {x1: -1, y1: -1, x2: -1, y2: -1}; $ ('# Add-rect'). Attr ('disabled', 'disabled'); $ ('# Remove-rect') Et ('disabled', 'disabled'); }; Var stop_listening_for_rects = function () {waiting_for_clicks = false; $ ("#Add-Rect") removeAttr ('disabled'). $ ('# Remove-Rect') removeAttr ('Disabled'). Add_rect ('red', current_rect); New_rects.push (current_rect); } $ ('# Add-rect'). Click (function (e) {e.preventDefault (); listen_for_rect ();}); Click $ ('# remove-rect') (function (e) {remove_last_rect (); if (new_rects.length == 0) $ (this) .attr ('disabled', 'disabled');}); Var click_event = function (e) {e.preventDefault (); If (waiting_for_clicks) {click_count ++; Var Offset = $ (this) .offset (); Var x = e.pageX-offset.left; Var y = e.pageY-offset.top; Console.log (x); Console.log (y); If (click_count == 1) {current_rect.x1 = x; Current_rect.y1 = y; } And if (click_count == 2) {current_rect.x2 = x; Current_rect.y2 = y; Stop_listening_for_rects (); }}}; $ Container.one ('click', '.child', click_event); . Click on $ ('Img') (click_event); // console.log ($ ('. Child'));    

    If you click inside a reset, then the x and y coordinate image Instead of the top left corner, relative in the top left corner of the rectangle.

    This means that $ (this) .offet () gives the offset of the element that you are clicking, not offset the image, so when you click inside a reset, Returns offset

      var offset = $ ("img").  

    In this click_event = function (e) {: <();

Extract Xcode project file from an .ipa or executable file -


Does anyone Is there a way to remove an Xcode project file from an APA (executable file)?

I tried the following:

Copy the .ipa file and double click .ipa to .zip in the Payload folder and click on the Project folder Open Right-click on that folder and select Show Package Contents .

Everything looks fine, but I want to see the code, which is now showing as executable files, is there any device or any way to get it?

In the .pa file, as you have seen, if you have a compiled project, you can use the Xcode project file Can not get the source code. (Unless anyone knowingly copied those files).

FFMPEG fails to run using exec() or shell_exec() in PHP -


Then I'm working on trying to get the FFMPEG video that is uploaded to my site to encode . The upload script uses exec () to run a script called PHP binary to encode.fp, which looks like this:

  ("Include / config.inc.php "); $ VideoID = $ argv [1]; Executive ("ffmpeg I". $ _SERVER ['DOCUMENT_ROOT']. "/ Processing /". $ VIDEOID. ".mp4 -vodec libx264 -vpre Normal -s 1280x720 -r 30 -acodec libfaac". $ _SERVER ['DOCUMENT_ROOT' ]. "/ Video /". $ VideoID. ".mp4"); $ Connect = mysql_connect ($ dbhost, $ dbusername, $ db password); Mysql_select_db ($ dbname, $ connect); $ Query = mysql_query ("Update" video is `STT processing '= 0 where` id` =' $ video id 'range1 ");   

However, nothing on video I have tried to use the full path of FFMPEG, but it also does not work. I know that the script is being executed because the isprocessing in the database is set to 0.

Maybe I am just unknown, but I do not know this. Any help is quite

You can find this project useful: < / Html>

plsql - PL/SQL Statements ignored & Not enough values -


  - Below is only to test - take action after removing or retaking movie_rental_sp (movieIdCount out) In number, movie id in-out number) Nomovi is an exception; BEGIN SELECT MOVIE_ID, MM_MOVIE from movie idc in counts (movie_id) where MOVIE_ID = movieID; If movie idcount = 0 then Rise noemi; end if; Exceptions when there is no movie then DBMS_Autput PUT_LINE ('no movie was found'); End; /   

WARNING: The process created with compilation errors.

SQL & gt; Processes to show error MOVIE_RENTAL_SP:

line / cl error


7/1 PL / SQL: SQL statement 9/2 PL / SQL ignored: ORA -09 47: Not enough value

Your selection consists of 2 columns, but only in 1 variable is.

javascript - How is this minified JS the same as this uncompressed version? -


Then it looks like my uncompressed:

  function extract dropdown value () { Var all_selected = true; $ ('.Variant_options select'). Each (function () {if (this.selectedIndex == 0) {all_selected = false;}});   

This compressed version is:

  extractDropdownValues ​​() {var e =! 0; Select $ (".Variant_options"). Each (function) {this.selectedIndex == 0 & amp; & Amp; (D = 1)!});   

I E =! 0 is confused with the compressed version of all_selected = true and it.Blied Index == 0 if the statement is in the compressed version, this If is indicating this index == 0, then set it to false.

But in the compressed version, it seems that this is the value of selected index for 0 and & amp; Amp; Amp; Amp; Amp; Amp; all_selected = false (i.e. e =! 1 ) for . But I do not want the result as if condition, which should be the result after if condition is satisfied.

Am I reading this wrong?

PS compressed version is not working in production, but is working in uncompressed dev. I am not sure that both are correlated, but on the surface, they do not consider me equal.

Edit 1

As I suspect, I read the JS Run mini-js through prefifiers, and the result is:

  function extractdowndown value () {var e =! 0; $ (".variant_options select"). Each (function () {this.selectedIndex == 0 & amp; (e =! 1)});   

Soo ... Ah ... WTF is getting here?

0 is false in Boolean form, so the boolean prohibition of 0 (false) is true.

Similarly, 1 boolean form is correct, so the boolean reject of 1 is wrong.

& amp; Amp; Amp; & Amp; Amp; Amp;; is short circuiting and operator, which means that as soon as it knows that its results get a quick return - if its first operand is wrong, then it returns false if its first operation is correct, after that He evaluates the second operand and gives returns.

Then E =! 1 Only if this.selectedIndex == 0 is true (because if it is wrong, then it knows that it is returning incorrectly and is closing soon).

iphone - Which method will excute while dismissing the popover by tapping on the view -


Whenever I tap on the view, Hi in my application Launched popovers will be automatically rejected. I know which method will be executed to get this behavior. thank you in advanced.

Representative for your main view controller Popover controller and implementing a ???? PopoverControllerDidDismissPopover: Take a look at Apple's documentation for method help.



c++ - cin.Getline returns nothing -


I'm trying to learn C ++. I am now on the wire. I've written this simple method, to do string input Should ask for it and then return it. To do this, I am using the cin.getLine () method, but string print is not printed after using cin.getLine ()

  string getString (four string []) {Cout & lt; & Lt; "Please enter a string to process"; Cin & gt; & Gt; String; Cout & lt; & Lt; "String in the gatestring before the process:" & lt; & Lt; String & lt; & Lt; "\ N"; Cin.getline (string, STRINGSIZE); Cout & lt; & Lt; "After String Processing:" & lt; & Lt; String & lt; & Lt; "\ N"; // String Return String is not printed here; }   

Does anyone help me understand what I'm doing is wrong? Thank you

You are first reading the string with std :: string < Code> CIN> & Gt; Read something from cin.getline (string, STREAMSIZE) to and then cin ; This is not necessary, read it once and return it: P> gets the string (four strings []) {cout & lt; & Lt; "Please enter a string to process"; Cin & gt; & Gt; String; Cout & lt; & Lt; "String in the gatestring before the process:" & lt; & Lt; String & lt; & Lt; "\ N"; // Take action on this, whatever you describe it is COT and LT; & Lt; "After String Processing:" & lt; & Lt; String & lt; & Lt; "\ N"; // string return string is printed; }

Otherwise, if you want to use getline , then:

  std :: string name; Std :: cout & lt; & Lt; "Please enter your full name:"; Std :: getline (std :: cin, name); // or std :: getline (std :: cin, string, 'r'); To read / only the Seamankita character 'r' std :: cout & lt; & Lt; "Hello," & lt; & Lt; Name & lt; & Lt; "! \ N";   

Such a thing to remember is not to use the getline or cin , unless there really is any special No reason

api - Does this simple paypal solution allow credit card transactions and Negative Testing? -


I'm so confused about the services and the PayPal website is also serving 400 and 404.

This way webpage customers see on my site when they are ready to pay:

 Enter image details here

As far as I know, I do not have an express checkout, but I'm not sure I have a website payment pro (My company has made it account).

Now I have two questions:

1- This is just a sandbox but on the real site, is there a solution that users pay by credit card Gives an opportunity to do? I have actually done a credit card transaction successfully in the sandbox, I am just concerned because I have heard that customers can make direct credit card transactions in PayPal Website Payments Pro directly. PayPal's website is overloaded with information and I can not find my way around to answer such simple questions.

2- Is it possible to conduct a negative test for a transaction on this page? Simply follow such incidents as if there is not enough balance in the user's credit card or PayPal account? If this is possible, and I am using the Button Manager API, then what is the right technique to go about it?

I put an error code in the amount that the IPN is included in the form of an NVP API call, in this way (in the middle of the couple added valuable pairs irrelevant):

  $ nvpReq = "BUTTONCODE = HOSTED & ...... ........ AND L_BUTTONVAR1 = Zodiac =". $ Err_code   

Edit

It seems that I have paypal website payment standard, which means i can not be included directly on my website credit card Payment form can not be done, but customers must direct PayPal. I am fine with that, as long as the customer has the option to pay with a credit card

The screenshot looks like PayPal standard, which is an HTML-only (non-API) integration.

Any regular business account that can receive money can use Express Checkout APIs. Usually by authentication with API user / PWD / signature. For businesses with programming / development resources, EP is the preferred method of accepting paypal payments so far.

If you pass SOLUTIONTYPE = the only one in the initial setexpressout call, then it will accept credit card from "guest" customers. You do not have a PayPal account similar to standard screenshots shown above.

The main reason for choosing an election on the standard is that it is a very handy hand joining between your checkout software and Paypal server, with the HTML of the standard, the customer is sent away from your site and Can not be returned to your site successfully after transaction (they can stay at PayPal.com and do not click to return or their browser may crash before returning --- While EC With built before touching the back of the financial system back to your site)

developers with the latest beta. If Paypal.com, all new Sandbox business accounts are full Pro accounts by default, signing up for Live Pro Account will be useful, in addition to accepting PayPal payments, you can create a credit card entry form directly on your own site. Wish.

Here are some EC links for programmers:

  1. Button Manager API for you There is no possibility of being useful and there are several ways to test negative with the sandbox, but whenever you are deciding on a product / API, there is not really an important concern.

Android resizing based on device screen size -


I have the following code in my Android application when I run it on an old Samsung Dart (API <13) , Then I get a null-pointer exception as described below.

Is there any special reason that the code is working for the four rows above it, but is it not that it is getting the NullPointer? @SuppressLint ("NewApi") @Pressing Warnings ("Excluded") Public Zero Adjust Size () {Int width, height; Display display = getWindowManager () GetDefaultDisplay (); If (android.os.build.VERSION.SDK_INT> = 13) {point size = new point (); Display.getSize (size); Width = size.x; Height = size Y; } And {width = display.getWidth (); // Excluded Height = display.getHeight (); // Excluded} Image View Counties = (Image View) ViewById (R.id.btnCounties); ImageView subscriber = (ImageView) findViewById (R.id.btnMembers); ImageView webLink = (ImageView) findViewById (R.id.btnWebLink); ImageView logo = (ImageView) findViewById (R.id.logo); // Calculate the image size if (height & gt; width) {counties.getLayoutParams (). Height = (int) (width / 2.5); Counties.getLayoutParams (). Width = (int) (width / 2.5); Members.getLayoutParams () Height = (int) (width / 2.5); Members.getLayoutParams () Width = (int) (width / 2.5); WebLink.getLayoutParams (). Height = (int) ((width / 2.4) / 3.5); // Null Pointer Error webLink.getLayoutParams (). Width = (int) (width / 2.4); Logo.getLayoutParams () Height = (int) (height / 6); Logo.getLayoutParams () width = width; } And (counties.getLayoutParams). Height = (int) (height / 2.5); Counties.getLayoutParams (). Width = (int) (height / 2.5); Members.getLayoutParams () Height = (int) (height / 2.5); Members.getLayoutParams () Width = (int) (height / 2.5); }}

just,

  ImageView webLink = (See image) Find VVBID (RID BTN Web Links);   

webLink is null .

Check your layout XML: Are you sure the name ( BtnWebLink ) is correct? Are you really loading the correct layout xml file?

Potentially you have ImageView in a layout but Android is loading the layout of a specific screen size where there is no BTN web link

There is a breakpoint in that row and check whether the variable webLink is zero.

The blank pointer exception first time you try to use the variable.

c - How to implement my own system call without recompiling the Linux kernel? -


I want to apply my system call (see link below)

But adding new system calls requires kernel compilation.

How to implement your own system call without compiling the Linux kernel again?

You can not

Without recombining the kernel, you can do all and load kernel modules, and kernel modules can not add new system calls.

ms access - VBA Macro Code Stopped Executing -


Setup:

I have Access 2007 Front End (Forms, Queries and Reports) I

The main front end is on my desktop, which I develop and when big changes are made, I distribute it in many different places in front.

Until two weeks ago, my development copy worked just as it was supposed to be. Something changed and I could not understand what happened.

Problem:

I have several forms that have buttons that execute VBA code. The problem is on my development copy, the code is no longer executed. If I send an old copy of the front end on a machine, then I distribute it, when I press a single button, the same code is executed.

Additional information:

  1. Normal macros work
  2. In the trust center, I have seen the settings of my confidence center and the trust center on all machines Settings seem to be equal to, I have my front end
  3. If I copy one of my distributed machines to the development database (on my machine), the VBA code is not working , So I replaced the old on the machine Under Rati kept
  4. Access Options / current database, because my settings seem similar on development machines are old distributed machine.
  5. I have searched the net and I have seen many VBA coding topics because I am getting to make sure that I accidentally click on a button to keep my VBA code executable .
  6. I know that my VBA code has not changed. It's not like this. I have too many macros that have worked, which I have stopped changing.
  7. If I copy an old distributed copy to my machine and execute the same macro, as I do on the most current development copy on my machine, the old copy does not work on my machine , I have not changed the underlying code.

    My guess is that select one (or combination of selection) has disabled my VBA code in this development version of the database.

    Any help would be greatly appreciated.

    HM, when everything fails, compact / restore database.

jquery - How to prevent function in a loop -


मेरे पास एक jquery click फंक्शन है, जैसे लूप के लिए घोषित

  के लिए (i = 1; i! == 4; i + = 1) {आईडी = "सूचकांक" + आई + "आईडी"; अगर ($ (id) .length) {$ (id)। क्लिक करें (फ़ंक्शन () {var ischecked = this.checked; onclickHelper (isChecked, this.id);}); }}   

लूप के भीतर फ़ंक्शन बनाने के लिए मैं कैसे चेतावनी से छुटकारा पाती हूं? दूसरा, यह बुरा क्यों है (जेएस लिंट मुझे यह चेतावनी दे रहा है)

  var $ आईडी = $ (); ($ ("# इंडेक्स" + आई + "आईडी") लंबाई) $ आईडी = $ ids.add ("# इंडेक्स" + आई + "आईडी") के लिए (var i = 1; i & lt; 4; i ++) ); $ Id.click (फ़ंक्शन () {var है चेक है = यह.चिकित्सा; ऑनक्लिकहेल्पर (चेक किया गया है, this.id);});    

android - How to scale Movie graphic/animated GIF? -


Is there a movie graphic scale possible, which is an animated GIF?

  InputStream = Context.getResources (). OpenRawResource (R.drawable.myGif); MyMovie = Movie. Is decodeStream (); MyMovie.draw (canvas, ...);   

I am adding my GIF to the canvas. I have read that I can use it:

  canvas.scale ();   

But this scales the entire canvas, I want to scale the movie graphic?

Is this possible?

Try:

  canvas.save () canvas.scale (....) // Drag the canvas canvas. Restore ()    

c++ - QString::toInt() fails when converting a QString from another class -


I want to convert a toStCent to another class toInt , But it fails because the result is 0 while it should be 5 and the remaining code works. Because I'm new to C / QT and to confuse the classes a bit, I think I have done something wrong in my classes. Widget.cpp

widget.cpp

  #include "widget .h" #include "ui_widget.h" widget :: widget (QWidget * parent): QWidget (parent) UI (new Ui :: widget) {UI- & gt; SetupUi (this); } Widget :: ~ widget () {Delete UI; } Zero widget :: on_pushButton_clicked () {MyClass tmp; Int myNumber = tmp.m_replyStr.toInt (); UI- & gt; LcdNumber- & gt; Display (myNumber); } MyClass :: MyClass () {m_manager = New QNetworkAccessManager (this); Connect (M_Manager, Signal (Finished (QN NetworkCarP *)), This, Slot (Answer Finished (QN NetworkCar * *)); } Zero MyClass :: fetch () {m_manager- & gt; Get (QNetworkRequest (QUrl ("http: //example.tld/test.html"))); // html only numbers 5} zero MyClass :: replyFinished (QNetworkReply * pReply) {QByteArray data = pReply-> ReadAll (); Cue string straw (data); M_replyStr = str; }   

widget.h

  #ifndef WIDGET_H #define WIDGET_H #include & lt; QWidget & gt; # Include & lt; QObject & gt; # Include & lt; QNetworkAccessManager & gt; # Include & lt; QUrl & gt; # Include & lt; QNetworkRequest & gt; # Include & lt; QNetworkReply & gt; Namespace UI {class widget; } Category Widget: Public QWidget {Q_OBJECT Public: Clear Widget (QWidget * parent = 0); ~ Widget (); Private slot: zero on_pushButton_clicked (); Private: UI :: Widget * UI; }; Class MyClass: Public QObject {Q_OBJECT Public: MyClass (); Get zero (); QString m_replyStr; Public slots: zero answer expired (QNetworkReply *); Private: QNetworkAccessManager * m_manager; }; #endif // WIDGET_H    

You are reaching m_replyStr There is a new starting example TMP , which does not set anything in its m_replyStr , then it has the default-initial value of "empty string".

Edit

Based on your follow-up question, maybe you were looking for something like this?

  Class MyClass; Class widget: public QWidget {Q_OBJECT public: widget (MyClass & myClassInstance, QWidget * parent = 0); ~ Widget (); Private slot: zero on_pushButton_clicked (); Private: UI :: Widget * UI; MyClass * myClass; }; Widget :: Widgets (Myclass and MyClass Instance, QWidget * parent = 0): QWidget (UI), UI (new Ui :: widget), myClass (and myClassInstance) (UI-> setupUi (this);} zero Widget :: on_pushButton_clicked () {int myNumber = myClass-> m_replyStr.toInt (); UI-> LCDNumber-> Display (myNumber);}    < / Html>

uitextfield - UIKeyboard is not visible after reload a view -


We have a UIViewController for login on our application, the first load works perfectly, but after logout,

When we return to the login page, we find some unexpected problem for version 6.1.

Based on the notification, I configure the event keyboard, keyboard and keyboard handheld, because the keyboard appears outside the screen.

If I print the keyboard's CGRact based on UIKeyboardFrameEndUserInfoKey, the behavior is very strange:

The first field: {{inf, inf}, {0}} Second field: { {160, 487}, {0}}

Additionally the interface orientation is always unknown when the problem appears.

keyboard space after

Resolve

DidDonDigate onDefenseLoad: This code was us:

  self.window.rootViewController = self.viewController; [Self. Window Adsview: self.viewController.view];   

I replace it (removing the first line):

  // iForceViewController view [Add window] Add to view window: viewController .view];   

It is a crappy solution, because we include the first line to solve unexpected behavior on rotation.

Thanks

python - How to install new packages for pyramid without getting a pkg_resources.DistributionNotFound: once a project has been created -


I have installed the pyramid and have successfully created a project, but when I always setup.py requirements to add new packages Let me give a pkg_resources.DistributionNotFound error.

The packages are installed, and this only occurs when I try to install new packages after running .. /bin/python3.3 setup.py Development What is this package.

The only way I have solved (not really), setting up a new virtual environment and setting up packages and setup.py development before creating a project.

Obviously I am doing something wrong, besides installing the package, do I need to do anything? Is this any kind of pathing problem? I'm new to this so your help will be greatly appreciated!

* Adding my installation process, if anyone sees anything wrong with it. Also my wsgi file virtualAnv source env / bin / activate

VirtualAnv easy_install-3.3 env created

Installed pyramid cd env ./bin / easy_install-3.3 pyramid

A project has been created ./ Bin / pcreate -s Starter myprojectname

Run setup.py cd myprojectname ../bin / python3.3 setup.py development

At this point, I get the following error: pkg_resources.DistributionNotFound: Waitress

Installed Waitress .. / bin / easy_install-3.3 Waitress

to setup.py again (not sure if I should do this) ../bin/python3.3 setup.py development

See error even then

My .wsgi file contains the following (Not sure whether this is important for this question): activate_this = "/ Home / account / env / bin / activate_this.py " execfile (activate_this, dict (__ file __ = activate_this))

import os import sys

path = '/home/account/env/lib/python3.3/site-package' < P> If path is not in sys.path: sys.path.append (path)

Div>

PP and setup.py development should not be mixed. Later uses easy_install which is not compatible with PP in Namespace packages (these packages are installed as subpages of any other parent, such as zope.sqlalchemy to full zope * .sqlalchemy Installing part. * Package). Namespace packages will cause problems between will pip and easy_install. On the other hand, most other packages will work well with the system you choose, but it is better to be compatible with you.

One more thing to double check is that you are actually installing packages in your VirtualVen, you should be able to open the python clay and import the package in your virtualwave. If you can not, then maybe it is not installed.

ruby on rails - User does not respond to 'devise' method -


I am new to rail and when trying to run a migration or running this app locally The server is getting started with this error and the process has been canceled.

The user does not respond to the 'malformed' method, it usually means that you have not loaded your ORM file or it is being loaded too late. To fix this, make sure to 'devise / orm / yOUR_ORM' before app definition in 'config / application.rb' inside 'config / initializers / devise.rb' < P> What does this mean and how can I fix it?

The app is not mine, I have cloned it from a repository and I am working on it as a trainee. I saw that the name of the application is actually false in all the config files, they have used a different app that I have worked, but they have used it continuously, so I'm not sure there should be a problem.

check this question

first answer Probably will solve your problem.

haskell - Layout for separate 'App' and 'BackgroundJobs' packages -


I'm developing a Yesod app in which many app requests will cause data from third-party APIs. The data received will only be used during subsequent requests - that is, the API can terminate the callout turn on request without waiting to end the callout.

It is important that a certain part of the data can not be invoked by XIs twice, but the nature of the app is that many clients will often have xyz < / Code>. If I have every app thread to see if the xyz is already asked for the database, then I will start to see issues related to concurrency on a small scale too. Even if I want to write a bunch of code to handle the integrity issues related to concurrency - it's not fun, and it will be difficult to ensure that I include all the cases - in this way the expensive database queries This is bad behavior for misusing me.

I think that would be a good option to request all app threads in an AMQP queue ("Make sure XV Ease data has brought ") will be published in one or more" background worker "type processes subscriptions worldwide.

A double package layout is suggested in Greg Weber, which has 'my continuous layer' as a dependency on both the packages, he has mentioned that I make two copies of the 'permanent level' code. To avoid placing the simulink or hs-source-dir s, I can use it.

What Greg describes is a high level I understand right, but I'm relatively new to Haskell and I'm afraid that I will have to find out the information for some time. Can someone tell me in more detail for me?

  • How to keep the package directory? (Which files, in fact, constitute my continuous layer?)
  • .How do cabling files look?
  • Once they are kept in that way, do I need to change it? My (scaffolding site) source files are importing my constant models?

    The second part is: How would you write the backgroundworks process? I have never written a production haskell code in addition to the scaffold of the hood, I get it in a comprehensive framework - I will just write a main , within which I will subscribe to the message queue, and on every message, my own There will be callout / processing / storage - but I need to worry about the example while waiting for the callout to finish when the manual fork It does not block Ng process?

    Many thanks.

    I have an application that has a webapp and a different daemon process that collects data And incorporates it into that database that shares it with the webapp.

    I basically have all the code in the same source code tree and two files, which are main :: IO () , a webapp.hs and daemon.hs . I have a CAB file that is defined and two separate executables have been created.

    Unfortunately I can not share the code as an internal project in my day job.