Posts

Showing posts from August, 2012

php - SOAP encoding Problems -

O people, I just started learning soap and I got a problem when I expected to get an integer and when I I'm hoping to get a string or array or JSN, error is: SOAP-ERROR: encoding: violation of encoding rules I I have seen all the answers about this and it is not helping me My code is: & lt ;? Xml version = '1.0' encoding = 'UTF-8'? & Gt; & Lt; Definitions name = 'name' targetname = 'http: // localhost / soap' xmlns: tns = 'http: // localhost / soap' xmlns: soap = "http://schemas.xmlsoap.org/wsdl/soap/" xmlns: xsd = 'http: //www.w3.org/2001/XMLSchema' xmlns: सोপनेक = 'http: //schemas.xmlsoap.org/soap/encoding/' xmlns: wsdl = 'http: // schemas Xmlsoap.org/wsdl/ 'xmlns =' http: //schemas.xmlsoap.org/wsdl/'> & Lt; Message Name = "getNamesRequest" & gt; & Lt; part name = "num" type = "xsd: string" /> & Lt; / Messages & gt;

javascript - Test the context of a method call using sinonjs -

I have a class where I initially compose a method - < Code> function MyClass () {this.onHttpCallback = _.bind (onHttpCallback, this); } function onHttpCallback () {// ...} If call to onHttpCallback , then always with reference to MyClass's object Is called? I'm using sinon.js to counterfeit and the following code does not work - it should be "bind", function () { // ctrl MyClass var dummy_obj = {}; var spy = sinon.spy (ctrl.onHttpCallback) is a purpose; spy.call (dummy_obj); spy.always callon (ctrl). should.be.ok;}); According to the comments in the following reply, it appears that it is impossible to test the bond for any method. Update Go to my problem // Source.js function MyClass () {} MyClass.prototype.init = function () {this .onHttpCallback = _.bind (MyClass.onHttpCallback, this); } MyClass.onHttpCallback () {// ...} //Test.js (It should be bound to 'http callback', function) (sinon.spy (_, 'bind'); ctrl.init ();

PHP object property notation -

मैं अचानक यहाँ अटक गया: $ source = (object) array ('field_phone' = & Gt; सरणी ('und' = & gt; सरणी ('0' = & gt; सरणी ('मान' = & gt; '000-555-55-55',)),),))); डीएसएम ($ स्रोत); $ source_field = "field_phone ['und'] [0] ['मान']"; डीएसएम ($ स्रोत & gt; {$ source_field}); // यह नोटेशन डीएसएम ($ source- & gt; field_phone ['und'] [0] ['value']) काम नहीं करता है; डीएसएम () डीबग प्रिंटिंग चर, ऑब्जेक्ट्स और एरे के लिए ड्राप्ल डेवलपर फ़ंक्शन है। < P> क्यों $ source ऑब्जेक्ट $ obj- & gt; {$ variable} संकेतन समझ में नहीं आ रहा है? सूचना: अपरिभाषित संपत्ति: stdClass :: $ field_phone ['und'] ['0'] ['मूल्य'] क्योंकि आपके ऑब्जेक्ट में कोई ऐसा संपत्ति नहीं है जिसका नाम " field_phone ['und'] [0] ['मूल्य'] " है। इसकी एक ऐसी संपत्ति है जिसे " field_phone " नाम दिया गया है जो कि एक सरणी है जिसका नाम &q

css - Sublime Text 3 Emmet triggering conflict? -

Image
I just started using Sublime Text 3 Beta. And one thing that annoys me is that whenever I'm editing CSS for example, the code triggering key (my trigger key) indicates what the tab key is) will not work. (I have to hit the Enter key instead). Does anyone have to fix this problem? < "Command": "command_completion", "reference": p> p> worked for me I'm going to have time for this. I still need other suggestions. Thanax

sprite kit - How can I stop SKAction -

_pipeTexture1 = [स्केलेक्शंस टेक्स्टचर विथ इमेज नामांकित: @ "पी 2"]; _पाइपटाईटेशन 1.फ़िल्टरिंगमोड = स्केलेक्शनफ़िल्टरिंग नायरेस्ट; _पाइपटैक्टस् 2 = [स्केलेक्शंस टेक्स्टचर विथ आईमेज नामांकित: @ "पी 1"]; _पाइपटीक्लक्शन 2.फ़िल्टरिंगमोड = स्केलेक्शनफ़िल्टरिंग नायरेस्ट; CGFloat दूरीटोममॉव = self.frame.size.width + 2 * _pipeTtexture1.size.width; SKAction * movePipes = [SKAction moveByX: -DistanceToMove y: 0 अवधि: 0.01 * दूरीटेओमेव]; SKAction * removePipes = [SKAction removeFromParent]; _movePipesAndRemove = [SKAction अनुक्रम: @ [movePipes, removePipes]]; SKAction * spawn = [SKAction performSelector: @selector (spawnPipes) onTarget: self]; SKAction * delay = [SKAction waitForDuration: 2.0]; SKAction * spawnThenDelay = [SKAction अनुक्रम: @ [स्पॉन, विलंब]]; SKAction * spawnThenDelayForever = [SKAction repeatActionForever: spawnThenDelay]; [स्पी रन एक्शन: स्पॉन टेंन डेलायवेवर]; एनीमेशन कार्रवाई कैसे रोक सकता हूँ कुछ निश्चित दृश्यों के लिए? < p> आप प्रति - (

c# - button color doesnt change once clicked -

मेरे पास button1 बटन है, और मेरे पास निम्न कोड-पीछे है: स्ट्रिंग सीएस = कॉन्फ़िगरेशन प्रबंधक.कनेक्शन स्ट्रिंग्स ["EasyRozMoney_ConnectionString"]। ConnectionString; (SqlConnection con = नया SqlConnection (CS)) का उपयोग करना {con.Open (); SqlCommand cmd = नया SqlCommand ("spTaskPerformed", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue ("@ TaskId", lblTaskId.Text); cmd.Parameters.AddWithValue ("@ ईमेल", सत्र ["ईमेल"]। ToString ()); cmd.ExecuteNonQuery (); बटन 1। बैक रंग = रंग। बटन 1। सक्षम = मान्य; lblTaskPerformed.Text = "कार्य सफलतापूर्वक पूर्ण हुआ।"; } बाकी सबकुछ ठीक काम करता है। बटन को अक्षम भी हो जाता है लेकिन यह इसके पृष्ठभूमि का रंग नहीं बदलता है। किसी भी सुझाव? अपडेट: आपके बटन पर इनलाइन शैली को रोकना पृष्ठभूमि रंग दिखाने से निम्नलिखित क्यों ASPX कोड पर विचार करें: और शैली = "पृष्ठभूमि-रंग: पीला;" / & gt; यह निम्न HTML प्रदान करेगा: & lt;

c++ - Why is this pointer needed when calling std::call_once()? -

"C ++ concurrency in action" in book "§3.3.1, when starting a thread-safe lazy launch of a class member From std :: call_once () , it gives the following example: #include , the third parameter is the parameter passing through the function X :: open_connection () . is given to std :: call_once () when there is no input parameter for X :: open_connection () this Need Pointer? std :: call_once (connection_init_flag, and x :: :: open_connection, this); PS: Removing indicator will cause C 2064 error: Error C2064: term Do not evaluate 0 logic in action UPDATED: The problem is more explicitly in the book "C + + Concurrency "" When to start the same work, then std :: async : If the first argument ( std :: call_once ) Is an indicator for a member function, the second argument ( std :: call_once to be third) provides the object on which the member functions (either directly or, an indicator, or std :: ref ) is wrapped,

Adding a column into pandas dataframe but on row by row basis -

I think there is no question as much as I need. I repeat the row by a panda dataframe line, then on the basis of each item in the row, I do some complex operations and regress on some other set of data Nd files. I would like to include that regression as a column in this original dataframe. Tried some things, but it is not working. What I'm trying here import pandas as pd ... dfd = & lt; my dataframe & gt; Starting with DFD ['New Column'] = 0 # 0 This was not working for me, DFD Rows in atorro (): & lt; Take some complex operations & gt; RES = Result of complex operation line ['new column'] = res print dfd.to_string () At this point I still have everyone put it in new column 0 To change the value of a column during the recurring row, try this df ['' DEF Complex_action (line): This may be a cleaner to re-apply your work. ... Return Race dfd ['new column'] = dfd.apply (complex_operation, axis = 1)

android - Can't return an Array list from AsyncTask into Main Activity? -

I can not understand how the object is returned from the AsyncTask which is ArrayList . Right now if I try to add tours.add (tour); Return to the list inside AsyncTask return code; How can I break from AsyncTask and successfully return these objects to my main activity? Category with ArrayList: Public class Jason Parser {list & lt; Travel & gt; Tourism = new arreelist & lt; Travel & gt; (); Tourism data source datasource; Private string LOGTAG; // reference CTX; // Public JasonPerser (reference reference) {// ctx = context; //} Public listing & lt; Travel & gt; StartJson (Reference Reference) {AsyncHttpClient Client = New AsyncHttpClient (); Client.get ("http://edmondvarga.com/android_dev/party_alarm/test_j.php", New AsyncHttpResponseHandler () {@Success Public Overhead (string response) {try {JSONObject jsonObj = new JSONObject (response); JSONArray Contact = JsonObj.getJSONArray ("user"); for (int i = 0; i & lt; contac

ios - AVCaptureSession MaximumDuration -

In my app I'm recording the video for 30 seconds. I used the following line to do this. [imagePicker Set Video Maximum Duration: 30]; Everything was working fine then I decided to go from UIImagePickerController to AVCaptureSession , it successfully changed everything Got it, but could not set MaximumDuration . Is there a parameter / workaround that can set it? A Wikipedia mofi file output * aMovieFileOutput = [[AVCaptureMovieFileOutput alloc] init]; CMTime maxDuration = & lt; # Create CMTime to represent maximum duration # & gt;; AMovieFileOutput.maxRecordedDuration = maximum speed; aMovieFileOutput.minFreeDiskSpaceLimit = & lt; # Quality and duration of the appropriate minimum film format # & gt ;;

Combine multiple array into one array using php -

I am trying to create an array with multiple arrays, individual arrays have the key name not the array of the new array The key will be for example: $ product_name = array ('0' => 'product1', '2' = & gt; 'product2 '); $ Product_id = array ('0' => 1 ',' 2 '= & gt;' 2 '); I want to show the two arrays as below $ newarray = array ("0" => array ('product_id' =) & gt; 1, 'product_name' = & gt; 'product1'), "1" => array ('product_id' => 2, 'product_name' = & gt; 'product2'),) ; Code: $ product_name = array ('0' => 'product1', '2' => 'product2'); $ Product_id = array ('0' => 1 ',' 2 '=> 2'); $ New_array = array (); $ {$ new_array [] = array ('product_id' = & gt; $ product_id [$ s], 'product_name' = & gt; $ product_name

Allow access to MySQL server installed on Amazon EC2 through C# -

I installed a MySQL server 5.5 on the Amazon EC2 machine. But it can not be connected using mysql-connecter-for.net using C # I: Host name = EC2 machine's IP address port = 3306 username = Password = However, it closes the error: "The connection should be open and valid." I can not find any tutorials internet. Please guide. You will need to edit the security group of your EC2 example. Add a MySQL entry with specified IP address (0.0.0.0/32 will accept connections from any IP address).

php - Manually define db connection in laravel -

I grab the guide explains am Follow the guide and it is all set up how subdomain and correct database Use it to connect. Each tenant will have his own DB and there will also be Master Edin DB. This _admin DB will have a tenant table with subdomain columns. A filter which is not set at all times runs which checks subdomain against tenants table problem is that the database config file master _admin db, which the tenants of the table, but mysql_tenant, where the tenant on the fly Has been set. I think I have the code to manually connect to the specified DB filter manually, here I have the code for the filter. Route: filter ('verify', function ($ route, $ request) {$ host = $ request-> getHost (); $ parts = explosion ('.' , $ host), $ subdomain = $ parts [0]; # ping dB tenant for the match. note that my tenant model Larvel tenant directs the ping table Master dB tenant $ tenant = tenant :: where ( 'Subdomain', '=', $ subdomain) -> First (); #

animation - Trying to get a css3 hover off transition working with my code -

When I close the cursor of the images, what should I do to roll back icons? Currently they roll when they move, but when I leave them, I wanted to roll them back to their initial position. Any thoughts? & lt; Head & gt; & Lt; Style & gt; UL # Roller & gt; Lee (float: left; Padding: 20px; Border-radius: 60px; Width: 80px; Height: 80px; Margin-left: 10px; Margin-top: 90px; } Ul # roller & gt; li: nth-child (1) {background: url ('http://praxis.cit.ie/~josephwinfield/wordpress/wp-content/themes/jaywin/img/1.png') No repetition in the center center ; } Ul # roller & gt; li: nth-child (2) {background: url ('http://praxis.cit.ie/~josephwinfield/wordpress/wp-content/themes/jaywin/img/2.png') No repetition in the center center ; } Ul # roller & gt; li: nth-child (3) {background: url ('http://praxis.cit.ie/~josephwinfield/wordpress/wp-content/themes/jaywin/img/3.png') No repetition in the center center ; } Ul # roller & gt; li:

c - Why does the cstdlib strncpy crash whilst copying a char array to a character pointer -

यह मेरा कोड है: char * toc (char src [STRING_SIZE], char * Dest) {if (src [0] == 0) dest = NULL; अन्य strncpy (dest, & src [0], आकार_टी (strlen (src))); } इसे कैसे बुलाया जाता है: typedef struct sdata {char * point_one; } tsdata tsdata sdata; चार नाम [STRING_SIZE] = "point_data"; TOC (नाम, sdata.point_one); strncpy हमेशा क्रैश करता है मैं क्या कर रहा हूँ गलत? यह कोड: typedef struct sdata {char * point_one; } tsdata tsdata sdata; चार नाम [STRING_SIZE] = "point_data"; TOC (नाम, sdata.point_one); कॉल Toc दूसरे तर्क के साथ एक अनिर्धारित संकेतक, जो कि मूल्य से पारित होता है। उस अनिश्चित मूल्य सामान्य टिप्पणियां। इस फ़ंक्शन घोषणा में , शून्य TOC (char src [STRING_SIZE], char * dest) STRING_SIZE द्वारा उपेक्षित है संकलक और निम्न कोड के लिए उपलब्ध नहीं है। और इस कोड स्निपेट में: if (src [0] == 0) dest = NULL; असाइनमेंट एक स्थानीय चर (एक फ़ंक्शन तर्क) का मान बदलता है, जिसका उपयोग फ़ंक्शन में नहीं किया जाता है।

php - Codeigniter & Datamapper: Retrive all the ID's from ID column and attach to array -

I'm having trouble collecting all the IDs in the column. The code above is only getting an ID, At least this goes on the array but I want to take them all. $ getArticlesId = new Article_model (); $ GetArticlesId-> Select ('id'); $ GetArticlesId-> (Get); $ Anarray = $ getArticlesId-> to_array ('id'); That returns: SELECT article . id FROM ( article ) and array ([ID] => 43), but 10 others Am I wrong Am doing to_array () generates an array with your specified fields < Code> all_to_array () generates several arrays with your assigned ID field. $ anarray [0] ['id'] Your first ID should be hopefully you want it.

jssor gallery - a couple of questions -

I have a few questions about jssor gallery. First of all, there will be available elsewhere code for every infection is available? I have set my slide show as "random" and I want to make as much as possible changes as possible, since then the probability of appearing at the same time is quite small. I'm here: and have copied something, but it is quite long and tedious and I was hoping that there would be an easy way? Secondly, I tell it from a different PHP file from where it appears on my homepage, and for this reason when I add it to my homepage, the style and script tag in that head They are not related where they are related. If this is possible, can it separate the CSS into different style sheets and it is included on my homepage and also for Zakya? I have tried this but it does not work, it seems like there is no CSS. Thirdly, I run it through the W3 validator and it is bringing 200 errors to my homepage - IE. "t2 =" "d = -1800 du = 3800 s

vb.net - Comparing Generic List? -

I am working in vb.net. I have two general lists of a user defined class - lets students of this class call. I am issuing a call to a database which gives me a dataset that I organize in the generic list of students. Student has properties: first name, last name, phone, address, etc. Then I issue a foreign web API to arrange the data again in another generic list of students - the same class. Now I am trying to compare one for one if there is any difference between the difference in the database API call. Do I list the generic list of the class for such other object An easy way to compare? I can not be sure of the sequence of items so that the direct comparison is not possible - but it is a clear way that I am missing other than the search for a match through the generic list and the second generic list. We call them ... Database List and APIist These possibilities are: exists not present in the API but the database is both are present but do not match between

sql - Select from table under circumstances -

There is a table with manufacturer, model and type. I should select all those manufacturers who have more than 1 model, but All are the same type of my attempt Select the manufacturer, type from the product ((Select the product number (model)) = (select the product from the model where type = 'Printer')) or (Selection count by product) = (Select the type of product from the count (model) where = 'PC')) or (from the selection count) = (Select the type of product from (model) where type = 'laptop')) but this is the correct answer Does not anyone help me? P.S. Type can be only printer, PC or laptop The following questions will probably get the desired result: Choose from product productive product. Maker, product. Manufacturer Manufacturer Manufacturer on Type Manufacturer by Type (Product Type), Product Inner (Selection Maker, Counting Model (different model), count_count (different type), type_count product group by manufacturer Hover calculat

How do I customize what is shown for the value inside the stacked bar on a Dojo Chart -

Actually I have a dojo stacked bar chart where I have set these values ​​to show the label on the bar: "label": true, "label style": "inside" is showing the value, but I need to customize it by adding additional text is. / p> I thought I could do something like the one below, but it is not working, I do not get my method _labelfank: p.labelFunc = lang hitch ({auto: this, option: x.options}, this._labelFunc); Anyone have any ideas? I think you use Lang.hitch to do a little wrongly, I believe that The first argument should be just the radius (eg, this) and the second argument is the name of the function or string if it is already in the radius described in argument 1.

asp.net - Can't access .mdf on IIS, only on IIS local -

I am able to use a .mdf file on local IIS. However, when I move it to the server under ap_data, I can not. Am I losing a step? Additional information .mdf is under api.data on the server. It seems like trying to connect, but maybe. The connection string is as follows: democracy SQL_PRO string = "data source = (localDB) \ v11.0; AttachDbFilename = | data directory | \ MyDB.mdf; Integrated Security = true " Update 2 Here is an error message that is installed on SQL Express 2008 IIS < / P> A network-related or instance-specific error has occurred when setting up a connection to SQL Server. The server was not found or was not accessible. Verify that the example name is correct and SQL Server is configured to allow remote connection. (Provider: SQL Network Interfaces, Error: 52) Unable to detect local database runtime installation. Verify that SQL Server Express is properly installed and the local database runtime feature is enabled.) Thanks,

How to get vector of options from server.R to ui.R for selectInput in Shiny R App -

> > < > > < > < > , "विकल्प चुनें:", शिविर) जहां शिविर विकल्प के वेक्टर होने चाहिए। यह वेक्टर एसक्यूएल क्वेरी पर निर्भर करता है जो सर्वर स्क्रिप्ट पर चलता है और कैंप की आईडी लौटाता है: server.R df1 & lt; - getCamps ("तारीख" ) शिविर & lt; - अद्वितीय (df1 $ idCamps) जब मैं ऐप चलाता हूं ui.R नहीं जानता कि "कैंप" क्या है क्योंकि यह केवल सर्वर में बनाया गया है। r फ़ाइल । मैं सर्वर में बनाए गए शिविरों के वेक्टर को कैसे पार करूं? Ui.R फ़ाइल में फाइल कर सकते हैं ताकि वे अब selectInput चयनकर्ता में से चुनने के विकल्प हो? आपको सर्वर में इनपुट ऑब्जेक्ट बनाने की आवश्यकता है। आर, और आउटपुट सूची के भाग के रूप में इसे यूरी पर वापस लौटें: सर्वर में। आर: df1 & lt; - getCamps ("तारीख") शिविर & lt; - अद्वितीय (df1 $ idCamps) आउटपुट $ शिविर चयनकर्ता & lt; - renderUI ({selectInput ("चर 1", "विकल्प चुनें:", as.list (शिविर))}) में ui.R: uiOutput ("campSelector "

c - i cant get this program to work correctly. -

I have been asked to modify the program to read the letters instead of numbers. I modified the array in a four array. Two "% d" to "% c" has been changed to the bottom zero principal (zero) { four [100]; Int counter; Int b; Counter = 0; Printf ("Please enter the length of the array:"); Scanf ("% d", & amp; b); While (counter! = B) {printf ("Please enter characters:"); Scanf ("% c", and [counter]); Counter ++; } A [counter] = '\ 0'; Counter = 0; While (a [counter]! = '\ 0') {printf ("\ n"); Printf ("% c", a [counter]); Counter ++; }} When I run it, it programmatically: Please enter the length of the array: (4) Please enter the character: Please enter the character : (A) Please enter characters: Please enter characters: (A) a a () User input is used to indicate Really good if i can get some help You have to remember that input leaves the new line in the buffe

c++ - Array "breaks" when resizing -

itemprop = "text"> OK, I have a class which is supposed to have a container for quadratic multi-dimensional post (which is a template and I use I'm swimming there, but nothing should be more than that). I used it on a dynamic array, and I was considered overload + and - operator ... there is no problem, right? Okay, it seemed all good and dandy until I really did not let it run. listf listf :: operator + (listf rhs) {listf newlist; For (int i = 0; i & lt; elementcount; ++ i) newlist.add (array [i]); For (int j = 0; j & lt; rhs.elementcount; ++ j) newlist.add (rhs.array [j]); Std :: Court & lt; & Lt; newlist; Return new list; } Nothing more should be done properly, should not it? That coat is only to check whether it works. But this is not something that should be done, is not it? One of which is the list: X ^ 2 + 5x + 52.4 2x ^ 2 + 7x-12 and the second one is just X ^ 2 + 2 X + 1, it should display a list and: X ^ 2 + 5x + 52.4 2x ^ 2

Delphi - merge images to new single file and read data -

I'm looking for some sort of solution to be able to merge multiple images into a single file, and Read this again. An example of this idea can be: Images (JPEG, but it would be nice to support other formats. This principle basically allows any file Type can be used to merge) at the beginning (or both, beginning and again And end) are converted to hex or binary data, there will be some headers (header / footer) information, such as we file type, extension, name, and even date (although these infos already file , But I think that along with -> some anchors), so when reading a new merged file I can identify file start / end, and so should know which part is a temporary To remove the location (or preferred-memory) or to directly show it as the only original type of file type. / P> There is no special encryption required for each file, because it is not something extra super-safe, it's just about being in one file - to read / write the file. Q. Is it worth getting in

c# - Unable to delete a polygon on a bing Map Wpf control, cast exception -

I am using WP map control WPF I add some polygons like this. polygon Place = DrySacerral (OLOC, DRDS); Polygon Tag = "circle"; MyMapUserControl.MyMap.Children.Add (polygon); Also my polygon is displaying correctly Now, I can (i be severals polygon, that is why I use a tag I want to delete this polygon: "circle"), I tried this: on polygonToDelete = MyMapUserControl.MyMap .Children .OfType & LT; MapPolygon & gt; (). Where (P => (MapPolygon) p. .ag = "Circle"); MyMapUserControl.MyMap.Children.Remove ((UIElement) polygonToDelete); I have an exception with a cast error. Anyone please help me coud? Regards, look at a break point using the check For what value the polygonToDelete object is, it first invokes the system to remove it. Is it a collection of a size or shape? I suspect that this is a collection of shapes and you have to first catch one, or have to convert your object through list and loop through each item and r

c# - How do I prevent users from running applications using invalid shortcuts? -

I work in an environment where my department has various computer skills levels with different inputs used by our company users -House maintains applications. / P> We have had many problems in the past where users copy the shortcuts from one machine to another, or worse, use shortcuts for those applications that have emailed them to other users. For the most part, this is not really the cause of any problem. However, we occasionally receive support tickets because someone is trying to run a shortcut where the path is wrong, or indicates another machine on the network and loads the wrong file. We are working on some new applications, and would love to find a method to stop me from doing this. There is a way to read my initial thoughts in some way, how the program was executed and somehow went back to the place of the shortcut and find out where it was going, Or could restrict the shortcut. That means that in any way the program should be launched directly by the exe or des

ember.js - External views are slowing down rendering in emberjs -

I am using a couple of scenes to format my data in each loop. Take a closer look at my code: Template: {{# each controller. Positions}} & lt; Tr & gt; & Lt; TD & gt; {{Status}} & lt; / TD & gt; & Lt; td class = "url" & gt; {{Url}} & lt; / Td> {{#each days}} {{#view Ape. Day view changes = data. Change}} & lt; td {{Bind-Entry Class = "View."}} & gt; {{data.position}} & lt; / TD & gt; {{/ view}} {{/ each}} & lt; / Tr & gt; View {{/ Every}} : App.DaysView = Ember.View.extend ({changed: 0, change: function () { If (this. ('Changed')> gt; {return 'down';} if (this. ('Converged') <0) {return 'up';}} .property ()}); I am trying to add a class. Data Status upper zero and "up." Class when data.position is below zero. This works fine but it is very slow The reason for being slow is using external ideas How can I improve my code? Should I take the a

Simplify Monadic Type Signature in Haskell -

I'm still new in Haskell and having trouble finding the right type signature for the function. I have this work, using a simple code like http: // -conuit and authenticate-oauth which is a side effect, so I There is not much care about the return value: manager $ \ manager with executeOAuthRequest oAuth credit request = - - & gt; Signed & lt; - signOAuth oauth credit request http signed manager I would like to specify the correct type of signature, but output from GHCi looks terrible to me: executeOAuthRequest: : (Monad-control-0.3.2.3: Control.Monad.Trans.Control.MonadBaseControl IO m, control. MONAD.Trans.Resource.Internal.MonadThrowM, ControlMonad. Trans.Resource.Internal .MonadUnsafeIO m, Control Monad.IO.Class.MonadIO m) => OAuth - & gt; Credential - & gt; Request - & gt; M (ResumableSource (Resourceable M ByteString)) The first three arguments ( OAuth , credentials , requests < / Code>) I understand, but I do not understand

android - Adding an overlay to the camera view rather than the map view -

I am trying to add a 'target' which will be represented as a circle that is always made in the center of the present lives. map view. Looking for API I look a lot about adding markers, shapes, ground overlays and tile overlays, but no one seems friendly to my needs. Actually they are used to attract all elements on the 'map'. Specified location I need some type of overlay for the actual camera view would be a good example when the camera lens See where a circle represents the center of the frame. You can use a relative layout, which includes mappings and additional custom views: & lt; Relative layout xmlns: android = "http://schemas.android.com/apk/res/Android" Android: layout_width = "match_perrent" Android: layout_heat = "match_perrent" & gt; & Lt; Fragment android: id = "@ + id / map" class = "com.google.android.gms.maps.SupportMapFragment" Android: layout_width = "match_parent" And

php - Drop down list to select a table and an additional drop down list to filter -

I want to use 2 drop down lists on the same page, selecting one of them from the DB and the table from the other I want to filter the selected table, I think this is very basic but I am new to PHP and SQL. I have no problem submitting the table for the table to be filtered, but I do not know that the $ table variable is $ _ POST ['tables'] Specify the value. Here is the relevant part of my code: $ table = table_name; If (isset ($ _ POST ['tables'])) {$ table = $ _ POST ['Table']; } // must be filtering by group (true === isset ($ _ POST ['value'])) {if ($ _ POST ['value'] == 'all') {// to get all records query $ query = "SELECT * FROM $ TABLE"; } Other {// filter group $ value = $ _ POST ['value']; $ query = "SELECT * FROM $ table WHERE group = '$ value'"; }} And {// the page is loaded for the first time $ query = "SELECT * FROM $ table ORDER Group Group ASC"; } $ Sql ​​= mysqli_q

call - Running php script from another php script in different folder -

I have a web application that is running in the root directory. I have some apps in any other directory that I have to run and get results. Therefore, from /root/myscript.php I want to call script /app/index.php which gives some value. The problem is that there are some scripts in index.php that are in the / app folder. And because my work directory is in the / root directory, this script is not included. Is there any other way by which I can run index.php script from myscript.php and enable all required files to index.php? You can include a file from the root directory: included Do ('../somefilein_parent.php');

c++ - What Function can I use to get the handle of a button? -

The situation is as follows: I have the handle for the window (which I findWindowEx (function) ) And there are 3 buttons in that window. I would like to know how I can manage for 1 of 3 buttons. I mean, I know that PPL can use SPI ++, but I am sure that this work is my So, my question is: Question: What can I do or work in a window? Handle of a button (previously known to handle the window)? Question2 :: How do I get the button ID You can loop through the children of that window. This lets you define the callback function called for every child in the window. In the callback, you can see that the current child has the button you need. For example, if you press an OK button, you can check whether the window text is equal to OK . You can get the window text with you. If you can use the position in the original window that you can use. To work for this, you probably have to show the status of windows first (max or current width-hect) to make sure that the button i

java - Spring Data REST Override findBy* Method -

मैं वसंत-डेटा-आराम-वेबएमवीसी 2.0.0.RELEASE w / spring-data-jpa 1.5.0 का उपयोग कर रहा हूं। रिलीज। मेरे पास रूम रिपोजिटरी, रूमरिपॉजिटरी कस्टम, और रूम रिपोजिटरी इम्पल क्लास है। मैं एक findBy * विधि को ओवरराइड करने की कोशिश कर रहा हूं ताकि मैं @PostFilter के काम करने के लिए कस्टम लॉजिक प्रदान कर सकूं मैं मूल रूप से इसे RoomRespository में था: @PostFilter ("हैप्रमिशन (फिल्टर ऑब्जेक्ट, '" + + FIND + "')") @RestResource (rel = "byName", path = "byName") सार्वजनिक सूची & lt; कक्ष & gt; findByName (@Param ("name") स्ट्रिंग का नाम); यह अच्छी तरह से काम करता है, लेकिन @पोस्टफ़िल्टर पर सीमाओं के कारण मुझे एक सूची वापस करनी होगी और कोई पृष्ठ नहीं लौटा सकता। मुझे पसंद है @PostFilter यह: @RestResource (rel = "byName", path = "byName") सार्वजनिक पृष्ठ & lt; कक्ष & gt; findByName (@Param ("नाम") स्ट्रिंग का नाम, पेज योग्य पी); लेकिन मुझे अभी भी प्रमाणीकृत उपयोगकर्ता के प्रिंसि

mysql - PHP function to securely encode characters for multiple purposes -

इस सवाल का पहले से ही एक उत्तर है: < / p> 3 जवाब मैं एक फ़ंक्शन (जब तक कि पहले से ही कोई नहीं है, मुझे कोई नहीं मिल पा रहा था) जो संतुष्ट करता है: एक MySQL डाटाबेस में सहेजा जा रहा है ??? एक MySQL डाटाबेस में सीरिजलाइज्ड सरणी में सहेजा जा रहा है (मुझे असफल होने पर समस्याएं थीं) आउटपुट के लिए: HTML के साथ हस्तक्षेप नहीं करता है ??? utf8_encode (html तत्वों ($ स्रोत, ENT_QUOTES | ENT_HTML401, 'UTF-8')); यह किसी यूआरएल में एक क्वेरी होने के साथ हस्तक्षेप नहीं करता है, इस प्रकार एन्कोडिंग ' & amp; ','% ' अगर सुरक्षित एन्कोडिंग को बेहतर बनाने के बारे में कोई विचार है तो कृपया मुझे कोई सलाह दें। और मुझे यह सुनिश्चित नहीं है कि फ़ंक्शन क्या दे, चाहे वे उपयोग करने के लिए सबसे अच्छा है। मुझे बिना प्रिंट करने योग्य वर्णों के भी समस्याएं थीं और कोशिश की थी $ s = preg_replace ('/ [\ x00- \ x08 \ x0B \ x0C \ x0E इस प्रश्न की विविधता के कारण, संपादित करें मैं इस प्रश्न को पुष्ट करना चाहता हूं कि स्ट्रिंग को कैसे साफ़ कर

javascript - firefox gives XMLHttpRequest "null" error accessing Vimeo API but no error from Youtube or other browsers -

I tried to see it on Google, and here are other similar questions, but I still can not understand it . I moved away from a proxy request model (pulling video data from YouTube and Vimeo API to an AJAX request on a script on your server which then requests an external server) to take it to a completely browser-based solution. Works right with youtube, but seems to trigger an exception in vimeo firefox (but works fine in konqueror-webkit) Firefox 17.0.1 Here's the relevant code snippet Is: function getAsync (url2) {console.log ('async url:' + url2); If (window.XMLHttpRequest) {req = new XMLHttpRequest (); } And if (window.ActiveXObject) {req = new ActiveXObject ("Microsoft.XMLHTTP"); } If (req! = Undefined) {req.onreadystatechange = function () {console.log ("statechanged");}; console.log ('3a'); try {console.log ("try ..."); Req.open ("GET", url2, incorrect); // 3rd param is whether the "async"} hold (error) {c

css - Grails bootstrap hidden-print not working as expected -

Therefore, in our Gels project we are using the twitter-bootstrap: 3.1.1 plugin Are there. No major problem has been noticed so far. In our layout / main.gsp we have added a good NAV bar everywhere everywhere. The only problem is that we do not want to print it when our pages are printed. In more than one case, in 2.3.2 we will simply add the class to hide the element. As you can add the following element to hidden-print below can see the hidden objects are still included while printing the page. As a test, I decided that I will place it on other random elements within the application and at all points it seems that there will be no print request left. & lt; Div class = "navbar navbar-default hidden print" role = "navigation" & gt; & Lt; div class = "navbar-header" & gt; & Lt; G: link class = "navbar-brand" yur = "/" & gt; Eight states & lt; / G: link & gt; & Lt; / Div & gt; &am

php - How to get rid of extra zeros at the end with datetime? -

I have a local level running MySQL 5.6.16 and a table with fields that are timestamp Time is tried) But every time I enter any data with now () , it happens in the following format: 2014-04-14 23:23: 39.000000 . Is it 2014-04-14 23:23:39 ? Even if I enter Manually value 2014-04-14 23:23:39 in the field it is still partial Adds seconds. I do not know if I can get rid of extra zeros in some way? Edit: When I get the value from the database with my script, there are no fixed seconds if you are there. Could it be that the version of the mafapadmin is going on? The reason Your MySQL field type should be if you do not want to store partial seconds, the timestamp (0) Ho.

c - Updating/Refreshing text displayed on the terminal -

I am trying to create a life program game in C, but I am not very familiar with the process of updating The output displayed on the terminal. So, for example, I have a 2d char array, where each element would have '#' or '-'. I'll print this array on the screen, but whenever a new change happens, instead of printing the new 2D array every time I want to overwrite the old array in the terminal with the new state. I have seen the ways to do this, but have not been fortunate enough. I have found that there is a cart return in the printf function (\ r), but hopefully someone has the most to do this Can say good way Specifically, how can I print a 2D array, change the elements of the array, and print the new array at the top of the old one, that is, overwrite it. (some of these links, code snippets are Linux, and others are windows) Given your specific questions , (and assuming you know how to write an array in the console): 1) Write the first ar

true type fonts - a negative unsigned int? -

I'm trying to wrap my head around the truetype specification. On the 'cmap' format 4 , the parameter idDelta is listed as an unsigned 16-bit integer (UInt16) in the section. Nevertheless, below are some examples, and here are the values ​​of idDelta-9, -18, -27 and 1. How is this possible? The definition and usage of idDelta on that page is not compatible. It is defined as the int16 in the Stret subheader , while the first one subtitle is listed as UInt16 * 4 is done. This is probably a bug in fiction. If you look at the actual implementation, you will see that idDelta is usually signed: typedef struct SUBHEADER {USHORT firstCode; / * The first valid low byte * for subheaders / USAArt entry quotes; / * Valid low bytes for sub header * / short idDelta; / * To get the base glyph index to the original adder * / USARR IDRR offset; / * Offset for byte off from right * glyphIndexArray * SUBHEADER; Or view implementation with: Strobe subheader {USHOR

c# - Web service WHERE / ORDER BY (?) -

I have a web service that lists all customers. Receive all such data in Gridview by calling the method I can get the list. test.RH_WebServiceService ligar = new test.RH_WebService (); Test.baseList [] data = ligar.getAllData (); I want to filter it by name (for example) I'm reading online and people have told me that I can do this: test.baseList [] data = ligar.getAllData (). Where (condition); Although I can not get it to work, do you have any ideas? Assume that you are using Linq, you can simply: test.baseList [] data = ligar.getAllData () Where (d = & gt; d.name == "john"); D is a random letter given to an object. The name that I am assuming is that your property is called. Although I recommend making a method in your service, in which you enter the name and get the filtered data back. This way you can only return the data you expected, which will improve performance. Something like this: test.baseList [] data = ligar.getDataByName (

php - Isset expression error -

I originally coded a code that populates a list of categories from my database, then you You can choose to remove it. / p> I have a problem with a deleted code that does not work due to error: Fatal error: can not use isset () on the results of the expression (You can use "zero! == expression" instead) F: \ xamppnew \ htdocs \ 650032 \ admin \ delete.php in the line its Because of the line is: if (isset ($ _ POST ['delete_id'] & amp; amp; amp; amp; nbsp; ($ _ POST ['delete_id'])) { deletecategory.php & lt; h3 & gt; remove category & lt; / h3 & gt; & lt ;? ph P $ result = mysql_query ("Select * FROM range");? & Gt; & lt; table & gt; & lt ;? php while ($ row = mysql_fetch_array ($ result)):? & Gt; & lt; tr Id = "& lt ;? php echo $ row ['category_id'];? & Gt;" gt; & gt; & lt; td & gt; & lt ;? php echo $ row ['category_Name'];? & G

currying - Can I apply argument defaults when using partial functions in Scala -

I have defined two partial functions (hash), which I expect to get an optional second boolean parameter: ex> def SHA1 = hasd (MessageDigest.getInstance ("SHA-1") _DrD MD5 = hash (MessageDigest.getInstance ("MD5") _ Personal DHHash (Algorithm: hash algorithm) ( S: string, urlencode: boolean = false) = {val form = if (urlencode) "% 2005 2005 02x" other "% 02X" (algorithm.s.b.tes map) (form format _)). MkString} When I call the function with both parameters, it is compiled, but with only one parameter I get a compilation error: // First 3 test OK Val test1 = hash ("Foo", true) Val test2 = hash (Message Dictate.Get instance ("SHA-1")) ("FU") Val test3 = SHA1 (" Fu ", true) // Not enough arguments apply to the method: String Function2 in the attribute (v1: string, v2: boolean) Unspecified value parameter v2 val test4 = SHA1 ("foo") I have re-applied it to use partial functions, and I

javascript - Dropdown menu on mobile not working -

Image
I have a toggle dropdown menu button that appears on small resolutions / devices, but for some reason it does not work When click is done, nothing appears / appears. Most likely something is missing (JS function that makes it open). Copying the whole code does not make much sense to me, so I am using some of it: UPDATE The correct design is about right now I have seen it (but have you said it in your question about it? ). When I tried to resize windows firebug, this error was found: This error appears in the 9th line in the js_func.js file. Do you definitely link libraries properly? JS can not get the uniform () function. Perhaps this error is appearing, because try adding all your instructions in the simplest function to the onload handler, possibly because of the browser Uniform The library tries to load these instructions before loading. I mean: $ (document) .ready (function If you want users with gadgets to use your site, you will have to

c++ - Template function in base class using this-pointer -

निम्न कोड पर विचार करें: struct आधार {~ बेस () {} आभासी डबल ऑपरेटर () (डबल एक्स) const = 0; }; टेम्पलेट & lt; typename F, typename G & gt; रचना लिखें; // लिखित अभिव्यक्ति की घोषित घोषणा Derived1: सार्वजनिक बेस // अधिक कई व्युत्पन्न कक्षाएं {आभासी डबल ऑपरेटर () (डबल एक्स) const {return x;} टेम्पलेट & lt; typename F & gt; लिखें और & lt; Derived1, एफ & gt; ऑपरेटर () (कॉन्स्ट एफ एंड एफ) कॉन्स्ट {रिटर्न कलेक्स & लेफ्टिनेंट 1, एफ & gt; (* यह, च);}}; टेम्पलेट & lt; typename F, typename G & gt; संरचना लिखें: सार्वजनिक बेस {लिखें (कॉन्स्ट एफ एंड amp; _ एफ, कॉन्स्ट जी एंड डी जी): एफ (_ एफ), जी (_ जी) {} एफ एफ; जी जी; आभासी डबल ऑपरेटर () (डबल एक्स) const {रिटर्न एफ (जी (x));}}; शून्य परीक्षण () {Derived1 f, g; ऑटो h = f (g); } यहां पर लिखें वर्ग दो व्युत्पन्न कक्षाओं को एफ, जी लेता है और ऑपरेटर () के माध्यम से कंपोज़ीटम F (g (x)) देता है। क्या यह किसी भी तरह संभव है कई व्युत्पन्न वर्गों में स्पष्ट परिभाषा से बचने के लिए, और बेस क्लास में कोई फ़ं

AngularJS displaying different number of td elems in each tr using ng-repeat and ng-if -

Image
I am trying to create a table in angles where the number of TD elements in the table per line varies. Sometimes there will be a TD element in two columns and sometimes two TD elements. The example code given below is giving me the following table: ID Item 1 This item is 2! ID ID 2 This item is 2! This item is 2! id item 4 this item is 2! However, I want to see the table like this: id item 1 this item is 2! id items 3 id items 4 Angelor Code: & lt ;! DOCTYPE html & gt; & Lt; Html ng-app = "myApp" & gt; & Lt; Top & gt; & Lt; link href = "bootstrap.css" rel = "stylesheet" /> & Lt; Script src = "angular.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Var myApp = angular.module ('myApp', []); MyApp.controller ("TabCtrl", function ($ scope) {$ scope.items = ["item 1", "item 2", "item 3", "item 4"]}); & Lt; / Scri

How to automate sync between a Github repository and Openshift? -

What is the best way to automate the coordination between the Gemth repository and opense? I openhift this document: Manually doing a synchronization. I think the first question is why do you want to automate it? What do you want to achieve? In many cases, a manual push may be better for OpenSite and GitHub However, find some possibilities: Configure a git remote with multiple URLs And then just press git all . See also Use a Geetheb Hubheck - GutHub will then send an HTTP request to each given URL on a given URL. After this, you can set something on your relation gear that listens to the request and if it is pulled from GitHub then you can use the ctl_app (see) You will need to start again, but at least not, you can use .openshift / action_hooks / post_deploy Deploy hooks in openshift triggered after redistributing your application. You should also be able to do githahb in repo. From which point of view, most sense depends on the case of your use

multithreading - Check if current thread is main thread, in Python -

The first answer is given for this, but apparently not for Python. How do I reliably determine that the current thread is the main thread? Thinking as simple as comparison of threading.MainThread , thinking that I can think of some methods, nobody really does not satisfy me. See the name of thread The main thread has been started in threading.py in this way: Thread .__ init __ (self, name = "menu") Any one can do this if threading. Current_thread (). Name == 'MainThread' But is this name fixed? Other code I have seen whether the MainThread is included anywhere in the name of thread. Store the Initial Thread I can store the reference of the initial thread. At this time the program starts, i.e. there are no other threads yet. It would be absolutely reliable, but it is very difficult for such a simple query? Is there a more concise way to do this? problem with threading.current_thread () Name == 'MainThread' It can always do

javamail - Java Mail won't work remotely -

I have clearly created a Java Mail Surlet to send emails, it works perfectly well on the production server, But when I try and run it on my home server, I get this error message javax.mail.SendFailedException: Invalid address; javax .servlet.ServletException: javax.mail.SendFailedException: Invalid addresses; The nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 & LT; * @ googlemail.com>: Refused to relay access evo.net.Mail.service (Mail.java: 60) javax.servlet.http.HttpServlet.service (HttpServlet.java:727) org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter Java: 52 In the servlet The host name variable changed from the local host to the server's IP and it was not a difference my code:. package evo.net; import java.util . * Import javax.mail * import javax.mail.Session; import javax.mail.internet. * Import javax.activation. *; Import Java io.IOException; import java.io.printWriter; import javax.servlet.ServletEx