Posts

Showing posts from August, 2011

c# - Access Ext.net page through hyperlink url -

I am creating an interface for a database, a form has a button that updates the database and the relevant people Sends an email informing them about the update I want to include hyperlinks to the web app and especially the updated records in the email. http: // localhost: 51863 / Using ExtNet / Client? ID = 1 I get a JSON presentation of a client field with an ID of 1 but there is no web application with these details Can anyone help? ***** Edit ***** Currently the user will need to open the web app (index.cshtml) Web There is a Client tab inside the app that opens a partial view using the file clients.cshtml, Then select a client by clicking on the grid panel (former area), the user client line within the Customers tab , After which url action 'getClientDetails' has an additional ID, 1 (where 1 of the client ID selected on the grid panel) ), This URL action will be displayed in the West Zone panel in the client details Instead, I can create a URL which ...

hide legend for some series in flot -

Hello, I have a float chart with such a series: foo F / sec Bar / sec Relative values ​​are displayed as rows (per second), whereas the entire value is displayed in columns Are displayed in the form. Within the same chart is the same color of the absolute and relative of the same unit. To empty the relative series label, however, I use labels while hovering at a point in the chain. Now the zero value is useless. So there is a way to hide a chain in a clear story, but still set its label? Thank you. Instead of blanking the data series label, instead of blanking the label of the data series, a labelFormatter for your legend function (see): labelFormatter: function (label, series) {// series is the series object for the label / label is the original label if (showInLegend) {return label ; } And {return tap; }}

windows runtime - MapControl differentiate between user or programmatic center change -

In WinRt / WP 8.1 MapControl, how can I differentiate between users when a user changes a programmatic change in the middle of the screen ? WinRt / WP 8.1 is a center-playful event in MapControl (), but it does not provide any information about what causes the center change. Is there any other way to know if a user has changed Map Center? / * To give more context, my typical scenario is as follows: App which shows a map, I track a user's GPS position Want to do If a GPS position is detected, then I want to put a point on the map and focus on the map at that point. If a GPS position is changed, then I want to focus the map at that point. If the user changes map status by contact / swipe, then I no longer want to focus the map when changing GPS position. I can hack it by comparing GPS position, but it's a different type of latLng GPS position; Accurate as map. Center latLng I wanted to like a simple, low solution * / I call it a bool UnselectedJustVi...

php - Last insert id issue--How to fetch it -

I enter $ id = mysqli_insert_id ($ connection) to enter the previous code; I'm using , but if it updates any record in the table, it returns 0 as the last inserted id. Is there any way to handle this? I have to get the ID every time to insert or update the weather. Thanks Edit I need this ID to use in the data table2 insert data from tab2 to ID to enter data from ID1 tab 1 is FK And most importantly, I am not using with update , where section This is my code that I am using $ val = utf8_encode ($ val); Mysqli_set_charset ($ connection, 'utf8'); MySqli_query ($ connection, "SET NAMES 'utf8'); Mysqli_query ($ connection," SET FOREIGN_KEY_CHECKS = 0; "); $ Sql ​​=" Enter in the leak ($ ​​inserted) value ($ val) "; $ Sql = "Key Update of Duplicate 'URL` ='" .mysqli_real_escape_string ($ connection, $ data ['url']). ''; '; Mysqli_query ($ connection, ($ sql)) or d...

angularjs - How to call parent method from model controller -

मेरे पास एक "नियंत्रक नियंत्रक" नामक नियंत्रक है अनुबंध नियंत्रक में एक विधि है save () अनुबंध नियंत्रक से एक मॉडल खिड़की खोलता है जिसमें " पॉपअपकंट्रोलर " नामक नियंत्रक शामिल हैं पॉपअप कंट्रोलर मैं अनुबंध नियंत्रक पर विधि सहेजने की कोशिश करनी चाहती हूं, जैसे $ parent को सहेजने की कोशिश की, लेकिन कुछ भी काम नहीं करता। कृपया सलाह। यदि आप कोणीय UI बूटस्ट्रैप () का उपयोग कर रहे हैं, तो, जब आप $ modal.open () कॉल करते हैं, तो "हल" विशेषता का उपयोग करें। आप जो भी समाधान करने के लिए जोड़ते हैं, उपलब्ध होंगे यदि आप इसे निर्भरता इंजेक्शन के रूप में दबा देते हैं। उनके पृष्ठ पर दिए गए उदाहरण में, "आइटम" नीचे के रूप में उपलब्ध है क्योंकि इसे "हल" में जोड़ा गया है। समाधान: var modalInstance = $ modal .open ({templateUrl: 'मेरीम OdalContent.html ', नियंत्रक:' ModalInstanceCtrl ', आकार: आकार, हल: {आइटम: फ़ंक्शन () {वापसी $ scope.items; }}}); नियंत्रक ('ModalInstanceCtrl', फ़ंक्शन ($ गु...

javascript - WeChat share button -

I am trying to figure out whether it is possible to create share buttons on a website that shares WeChat. As soon as you want to link Twitter or Facebook back to the social network to share a message. Is anyone able to do this? Or has anyone confirmed that this is not possible? Thank you! An APK for Android and iOS that allows you to do it from any other other original app. As far as I know, WeChat, like Whatsapp, does not support any web browser access, so I do not think it's possible. Maybe somewhere in the API, you can create a share button on a website that opens Android or iOS apps, but I do not think that any Visa letter from the desktop Usage is possible.

jquery - How to append Authorization in an URL? -

I might have a very old question, but ask if I have URL like $ http: //www.test Com $ and I would like to, in jQuery, the url to add authorization (username: password), URL to $ http: // username: password @ Www.test.com should be $ How do I complete it? You can do it like this: $ Ajax ({type: 'GET', url: ..., Username: 'Username', Password: 'Password', Preceded: Function (Excerpt) {var base64 = $ .base64.encode ('Username' ": '+' Password '); xhr.setRequestHeader (" authorization "," basic "+ base 64);}, error: function ..., success: function ... }); This

inheritance - C++ How to use stand-alone base object from derived object -

I have 3 classes that have a basis, a parent and a child. Parents, at some point, instant and assigned data, in some cases it is used directly, but others require the functionality to be implemented in their child class. What I would like to do, to put the original object in a child object, its virtual function will be used with the parent data: Undo: Public Quando Commands {Public: UndoBase () {} Virtual Zero Undo () = 0; Virtual zero redo () = 0; }; Class CommandPaint: Public Undocumented {Public: CommandPracture ()}} Virtual Zero Undo () Virtual Wardo Redo () Protected: Some Type Data}; Class CommandChild: Public CommandPaint {Public: Command Chald () {} Virtual Zero Undo () // Override Parent Virtual Zero Redo () // Override Parent}; I have tried to do this: Command practice * Parents = new command practice; // Assign data to * command = stabilized & lt; Command chain * & gt; (Guardian); Command & gt; to redo (); And it worked (command child implementa...

Integerate Google Apps for Education with asp.net MVC -

I have a GAFE account, but I have to login as a social network using my website's login page . How can I integrate Google Apps for Education login into the ASP.NET MVC project? source code here sample here step here Here are step instructions from

xamarin.ios - How to draw a linear gradient along an arc in Xamarin iOS -

Image
I am trying to create a color picker device, similar to a color wheel, but in the shape of horse shoe I have to draw a linear gradient that follows an arc. The problem a) How to make a gradient to follow the curve, instead of just going in one direction, and b) How to fill the stroke stroke and not surrounded by the area Arc I have managed it on Android, but so far it has failed to work in iOS, so any advice is highly appreciated.

WxPython StaticLine after Image in BoxSizer -

After a static line I am trying to insert a StaticLine (vertical) after an image, I have some buttons I have kept them all in the boxciss (horizontal). But when I walk I do not see a constant line What's wrong with me? .. Please help me thanks Here are some code class frame1 (wx.Frame) :. Def __init __ (self, * args, ** kwds): wx.Frame .__ init __ (self, * args, ** kwds) self.panel1 = wx.Panel (self, wx.ID_ANY) img = wx.EmptyImage (MaxImageSize, MaxImageSize) self.imgctrl = wx .StaticBitmap (self.panel1, wx.ID_ANY, wx.BitmapFromImage (img)) self.st = wx.StaticLine (self.panel1, wx.ID_ANY, style = wx.LI_VERTICAL) self.but = wx.Button (self. Panel1, wx.ID_ANY, 'OK') self.hbox = wx.BoxSizer (wx.HORIZONTAL) self.hbox.Add (self.imgctrl, 0, wx.ALL, 5 ) Self.hbox.Add (self.st, 0, wx.ALL, 5) self.hbox.Add (self.but, 1, wx.ALL, 5) self.panel1.SetSizer (self.hbox) self.hbox After the text "itemprop =" text "> Adding staticline to the need for it sp...

apache - URL rewrite using htaccess in PHP -

I am trying to use the STO friendly URL to use the htaccess rewrite rules. Please search them below option + rewrite engine on follow-up links ^ ReadRet Rule ^ Brand Brands.FPP [NC, L] Rev. ^ Facebook ([0- 9] +) facebook.php? Fb_page_id = $ 1 [NC, L] RewriteRule ^ twitter / ([0- 9a-zA-Z] +) twitter.php? Twitter_screen_name = $ 1 [nc, l] I have verified all the links in my localhost that they are working in Xampp environment, but when I have them in the remote server, Hosted with virtualhost configuration for subdomain and My original url will look like below. base_url / facebook.php / fb_page_name = 7up + India based_burbal / twitter. Php / twitter_screen_name = 7up + India The rules are not working and are providing an internal server error as below. In the internal server error server encountered an internal error or misconfiguration and unable to complete your request, please contact the server administrator, route @ localhost and about the error You can tell, a...

netlogo - Calculation of angle between turtle and patch -

Image
How do I calculate the above angles mentioned in the figure? The patch is already known By adding four corners of the patch to 0.5, the div class = "post-text" itemprop = "text"> Search by subtraction; Search for the nearest two corners; Use these two points to find the title of each; Using both of these headings.

How to set conditional breakpoin based on parameter value using windbg -

I want to set a conditional breakpoint on a member of a parameter, the command I now check this parameter I can use dt, my code looks like this: zero test (const myClassB and inst, int value) {} now I I can use the dt command to see the first parameter, the result: 0: 000: x86> DT MyClassB @ esp 4 dbgee MyClassB + 0x000 ID: (null) + 0x004 meters: 0n2130567168 + 0x008 myClassA: MyClassA Now I want to set a conditional breakpoint based on the pattern Inst The value of .m, can anyone show me how to do this? Thanks a bunch! And how to use an offset (like +0x004 for M), thanks, someone can give it information! After the snippet cl / gi / nologo / w4 / analysis% 1% / link / release MSVC ++ 2010exp #include Stdio.h & gt; Class MyClass {int width, length; Public: zero set_val (int, int); Int area (); }; Zero MyClass :: set_val (int x, int y) {width = x; Length = y; } Int MyClass :: Area () {Return width * Length; } Zero main (zero) {MyClass foo; For (int i =...

c# - Restful post throws 400 invalid url when reaching 295 chars -

I have created a cool webservice with the web API. I have a post on this URL ../ API / AAEAAAD _____ AQAAAAAAAAAMAgAAAEVPYmplY3RUb0Jhc2U2NCwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABlPYmplY3RUb0Jhc2U2NC5DcmVkZW50aWFsAgAAABk8VXNlcm5hbWU-a19fQmFja2luZ0ZpZWxkGTxQYXNRmllbGQBAQIAAAAGAwAAAA5hd2NhQGF0ZWEtYW5jdAYEAAAAC0czcnRtNG5zMGZ0CwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2 / say base 64 is encoded HttpServerUtility.UrlTokenEncode (); I get a "HTTP Error 400. The request URL is invalid." When someone is trying to post I tried to set up maxUrlLength , as I have seen some other people with the same problem, sorry, it does not help. I have tried so far Changing maxUrlLength in web.config Setting UrlSegmentMaxLength in Registry Something is not working yet. I have got the magic number 294 in full url - that is, if I bite with a long strings from some stars, unless I can not find 294 characters, everything works...

dependency properties - How WPF DependencyProperty pickup the key to distinguish each instance of an object and seek the values of the DependencyProperty? -

Many articles from Google have said that the dependency property is stable because it contains a key to maintain the value of each instance. Value is the object But the problem is that, if we call GetValue / SetValue against deprecated property, then how it recognizes each instance and generates the key so that the values ​​are read / saved from the hashtable for different instances What is the active object? For example: If we create 2 examples of TestDP and then set the value for TestDProperty for both instances, then SetValue recognizes each instance and saves the dependency portion value accordingly to the hash table. is? I getValue & amp; Code is examined for; Set up the dependency object, but I still can not understand how it separates each example. Code is it.LockUpEntire (DP Global Index) will pick up the Entry Index but I'm not sure how the Global Index has been prepared to distinguish each instance of the object. Public class TestDp: DependencyObject {protect...

Difference between normal pointer and const pointer in c -

Actually I do not know the difference between a normal pointer and a point pointer if I use the code below works fine . But when i int * ptr = & amp; Num; to int * const ptr = & amp; Var1; Change it will not work. What is the difference between a normal pointer and a constant pointer, can it tell? int main (zero) {int num = 20; Int * ptr = & amp; Num; // if i`ll int * const ptr = & amp; Var1; ', Then this is some error * ptr = 20; // valid PTR ++; // valid return 0; } int * const ptr = & amp; Num; will make a constant indicator for an int. This indicates that data can be changed, but Pointer can not do it himself. You can not change the pointer: ptr ++; But you can change the data: * ptr = 1234;

grails - Injecting a SpringSecurityService into a Java class -

When we modify it, we note that one service should implement the interface, then, Java class this interface Will depend on. But, what about Grails-service that is a built-in service or is there a ready plugin available? How to let go implements an interface and then implementing in the settings resources. Groovy i.e.: The following is not the IoC pattern because the person.java class depends on the class not on the interface: import Do the grails.plugin.springsecurity.SpringSecurityService; Class person {spring security ss; } The following IoC pattern is: If we apply the class SpringSecurityService IGService for example {/*...*/} import grails.facade.IGService class person {IGService sss; } Then, in resources.groovy , we have: person (slm.abdennour.Person) {sss} = SpringSecurityService} I am getting the solution, and I want to share it: Import grails.plugin.springsecurity.SpringSecurityService; Import grails.facade.IGService; Class Customer SS...

Logo Bootstrap navbar -

I have created my own header and bootstrap navbar, this is my code: and you see that the logo is on the NABAR, what is the use of CSS property? Thank you: D I do not know if you want you to do the logo or what to do Want to & lt ;! - Fixed navbar - & gt; & Lt; Nav class = "navbar navbar-default navbar-fixed-top" role = "navigation" & gt; & Lt; Div class = "container" & gt; & Lt; Div class = "navbar-header" & gt; & Lt; Button type = "button" class = "navbar-toggle collapsed" data-toggle = "collapse" data-target = "# navbar" area-expanded = "wrong" area-control = "navbar" & gt; & Lt; Span class = "sr-only" & gt; Toggle Navigation & lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; ...

multithreading - Camel parallel processing options -

I am working on Camel Root in RedHat Fuse Service Works, which is a camel 2.10. I would like to know the difference between the following implementation: 1 / SEDA routes using ("A") .split ("CDA: B? Concurrent compiler = 4") ("body") .to ("seda: b"); root iid ("mycedate route"). ("C") .end (); 2 / Use of parallel processing from ("A") .split (body ()) .parallelProcessing () .to ("c"); 3 / Use of thread from ("A") .plit (body ()). Thread () .to ("c") ; What I have seen method 3 (thread) Which is similar to the "Concurrent Consumer" of Solution 1 (SEDA). If I do not pass a parameter in the method thread, then what would be the behavior of methods 2 and 3 Regards You can set in Thread Number 1), 3), but 1) still can get the message from another path that is .to ("seda: B") from bus (xxx). 2) You need to set up the executable service (or...

Spring Java config exception -

I am trying to switch from XML configuration to Java config and try to get the following exception when starting the application. I am doing : java.lang.ClassCastException: $ Proxy188 can not be placed on org.springframework.format.support.FormattingConversionService This exception is given on the first line of the following method : @ Override Public Request MappingHandlerAdapter RequestMappingHandlerAdapter () {RequestMappingHandlerAdapter Adapter = Super.requestampingHandlerAdapter (); Adapter.setIgnoreDefaultModelOnRedirect (true); Return adapter; } Why any idea is failing?

Automatically installing Python dependencies using CMake -

I have been seen around in a quick way, but because of dependencies in different types and definitions like packages, It's quite difficult to pin down an answer. I am creating a mixed-language source (Fortran, some ce and Python) and FORTRAN calls a Python script which depends on the network x Python package In PEPI generally, I have just installed the Network X , so there is no problem for me at the time of rebuilding. However, for distribution, I want the best method: Install pip or its equivalent, if it is not installed. Possibly install virtualenv and create a virtual environment if appropriate. Download and install Network X by using the - user option with PP . Is there any standard way? Or should I just use the SIMKEY dependencies with custom commands that install pip etc. itemprop = "text"> It depends on the "manual" install, you must be certain that all the necessary Tools are installed (to install), and if they do ...

c++ - How to uncompress a COMPRESSED BLOB in m MYSQL_RES using zlib.h without using UNCOMPRESS in mysql query -

Image
I store data using the compound {hex data} to be inserted into an inbox table blob column. I need to use mysql c api as a programmed compressed data and it must be unprinted at the application level. Can I do this using zlib.h and uncompress press function or flicket / deflate method? I can not use uncompression in mysql query because it has a large resuult set and a different server is traveling on the data network. For example: MYSQL_RES * results = null; MYSQL_ROW line; Results = exec_query (); While (line = mysql_fetch_row (result)) {// line [0] = uncompressed size // line [1] = compressed size // line [2] = compressed blob / / MYSQL "INSERT COMPRESS ({data}) In ... "Use LZ77? // it will work? // uncompress (Bytef * Dest, ULong * Distillan, Constant Bytef * Source, ULong SourceLen)} I do not know that you are doing it right and I do not understand what you want. In fact, Blob is used for binary data such as images, video etc. So you store them by byte...

How to validate date must be come after today’s date with datefield in blackberry -

इसलिए मैं एक DateField : DateField date = नई तिथिफ़ील्ड ("दिनांक:", सिस्टम। कंटेंटटाइम मिलिसे (), डेटफिल्ड। DATE_TIME); आज की तिथि के बाद तिथि के इनपुट को कैसे मान्य करना चाहिए? मुझे नहीं पता कि तिथिफील्ड से मूल्य कैसे प्राप्त करें। पहले से धन्यवाद शायद ऐसा कुछ: यदि (date.getDate () & lt; calendar.getInstance ()। GetTimeInMillis ()) {// जो भी हो}

vpn - Can I use pptp on a vmware virtual machine in the nat mode? -

I have installed a Ubuntu 14.10 virtual machine on Windows 8.1 using Vmware. Ubuntu has access to NAT mode on the Internet. But I can not establish a PPTP connection to the remote server with Ubuntu, is it supported? change to pull (instead of NAT)

git - Is it possible to fast forward another branch without checking it out? -

In GIT, I have a branch a . I make another branch B where I make some commit, then I to fasten the branch from branch a . I know that I can checkout A and fast forward the latest commitment of B two amendments to copy this operation to work Required: To return to A first and then return the copy of the work to B . If you make a lot of changes on the new b , the operation may be slow. Is it possible to move any other branch faster without changing the copy of work? (In other words, to move the pointer to A only) GIT provides commands for this purpose git update-ref AB Note: This command is less than one of the GIT commands And no one does not provide protection measures to protect yourself from screwing yourself If the BA does not have a fast forward then it will still update A, potentially earning Eligible and subject to garbage collection.

excel - Weights and Measures + 3 Significant Digits -

Image
I am looking to create a spreadsheet that will act as a tool similar to that of a conversion website. I is trying to change units of measure (inches, feet, yards distance, millimeters and meters). When I input 36 inches, I need to display the following: 36 in. 3 feet 1 yard 914 mm (technically it will be 914.4) 914 meters (technically it will be 0.9144). I am trying to create a formula that converts numbers, but break it down to show 3 important digits (without spherical). I have come up with this formula to change feet by inch: = ROUNDDOWN ((CONVERT (A7, "in", "foot") ) / 10 ^ (INT (LOV10 (CONVERT (A7, "in", "foot"))) + 1), 3) * 10 ^ (INT (LOG10 (CONVERT (A7, "in", "ft") )) + 1) Unless I hit a large number, for example 40 inches will appear as 1010 mm and I need it to be displayed as 1016 mm To do I have a conversion piece below, so I think what I I am grateful, how can I get it to display 3 impo...

count - Python- Write a function that opens a .txt file and returns the total number of words in it -

Was trying to do this for a while but for some reason I did not get my head around this simple code There is no need to worry about the punctuation marks, its just plain text. At the moment I have everything: def wc (filename): f = open (filename, 'r ') Read the word # f.readlines () f.close () print int (Filename.split ()) p = 1 for words in words: p + = word return An answer for a while Is looking for, but only they can count specific words where examples. f = open (file name) read # word = f.read () f. Close () word = words. Split () print LAN (word)

c++ - In RHEL linux, using std::string variable assigned with ""(empty string value) is giving junk values -

RHEL लिनक्स में, "" (रिक्त स्ट्रिंग मान) के साथ निर्दिष्ट std :: string चर का उपयोग करके जंक मान दे रहा है उदाहरण के लिए नीचे दिए गए कोड में std :: string str = ""; printf ( "% s", str.c_str ()); मेरे पास एक और कोड नमूना है int main () {string str = ""; Printf ("Str =% s \ n", str.c_str ()); स्ट्रिंग स्ट्रेटम्प; Char * pcTRMP = नया चार् [10]; // स्प्रिंटफ़ (पीसीटीएमपीपी, "% d", 7); Sprintf ((चार *) strTemp.c_str (), "% d", 7); Printf ("Str =% s \ n", str.c_str ()); Sprintf ((चार *) strTemp.c_str (), "% d", 8); Printf ("Str =% s \ n", str.c_str ()); वापसी 0; } परिणाम str = 7 str = 8 जहां str चर के लिए कोई असाइनमेंट नहीं है। हमने इतने सारे स्थानों में जांच की इन्टरनेट में। मैं उम्मीद कर रहा हूं कि कोई इस समस्या को सुलझाने में मेरी मदद कर सकता है। यह कोड RHEL Linux के पुराने संस्करणों में काम कर रहा है। std :: string :: c_str () द्वारा लौटा संकेतक में लिखना बे...

c# - Program Terminates when Background Event Fire -

I have created a background text demo, it is 95 %% of a solution in question: The full example of the solution can be downloaded here: The problem occurs when my program schedule ends. The "My" solution can be downloaded here: Here is the "My" code: Applying the first class IBackgroundTask System Use; Using System.Collections.Generic; Using System.Diagnostics; Using System.Linq; Using System.Text; System usage threading. Task; Using windows.ApplicationModel Background; Using Windows.Data.Xml.Dom; Using Windows.UI; information; Namespace class (public sealed class upload: iBkOfFounstsk {Public Zero Run (IBQFoundThask Intestate Task Intense) {debug.prakashline ("Hello IKkFormatsk"); // Return; Var toastXml = ToastNotificationManager.GetTemplateContent (ToastTemplateType.ToastText02); var textElements = toastXml Var.GetElementsByTagName ("text"); Var NetworkSetChangeEvents Detail = (Extend Descriptions as Trigger Windows.Networking Co...

tablelayout - Implement Android layout TableView -

I have to represent the data like this: How do I apply it? Can I give some advice to start with the implementation? Do you know any examples that already exist? Thanks The problem is that I have There is more than one list and I can only send one list to custom list view. If you create an adapter constructor, you can pass more than 1 list which accepts more lists in the form of parameters. Something like this: The public class extends the MyAdapter BaseAdapter {reference reference; & Lt; String & gt; Data1999; & Lt; String & gt; Data2005; & Lt; String & gt; Data2008; Public STHAdapter (reference references, list & lt; string & gt; data9999, list & lt; string & gt; data 2005, list & lt; string & gt; data 2008) {this.context = context; This.data1999 = data1999; This.data2005 = data2005; This.data2008 = data2008; } View GetView (Last integer status, seeviewview, ViewGroup Parent) {... TextView txt1999 = Convertview....

c++ - Qt : how to automate looped slider movement in the background? -

A button is pressed, so what is the easiest approach to move the slider to a slider at a speed? I am feeling that a thread has been included in the frame, which periodically sends the appropriate signals to the slider. Is there an example of a canonical approach to do this? i QPropertyAnimation to start the job simply start value, end value and curve Set which you want to change the value QPropertyAnimation * animation = new QPropertyAnimation (slider, "sliderpages"); // Defined duration (how long should the animation run - when value will decrease, then less) Animation-> Set period (1000); // Set the Start Price - In this case, check that the slider will have values ​​in the range of animation-> Setstart Value (slider-> minimal;);); // Start value similar to animation-> Set and value (slider-> maximum ()); // easingCurve defines whether it goes directly or N-content animation jumping-> Set ESSCV (QEasingCurve :: Outcubic); // like coyote has b...

JQuery UI Selectable - delay the lasso (selection rectangle) -

When you click on a selected element that only holds on the ctrl, it will be unselected. Elements are "caught" with "light" (selection rectangle), however, while adding ctrl, it is added to selection. (Instead of expecting an XOR mode) Now if you like 1. To do this, but accidentally the mouse will run a bit, a lasso will be made and 2. - Pure Impact: Nothing. This is troubling, especially when selectable elements are very large and Guinea is not fully responsive. I can imagine two ways to avoid it, that is, mention XOR mode the minimum distance before the start of the lasers I am open to any approach (even new), as long as it comes with implementation. / P> You can use the selection and options to avoid triggering with unwanted small mouse movements. Delay : Time in milliseconds to define selection on startup. This helps prevent unwanted selection when clicking on an element. Distance : Tolerance, in pixels, if specified, will n...

reporting services - Trying to get the Sum Max when using hidden rows in SSRS -

I have seen everything and I have not found my exact status, so I am posting my first question. I have a report that I have grouped at several levels. Therefore, my report has a customer / header / statement / release grouping. I wrote a custom expression so that only one value, which is the maximum value in the group, is shown in detail, in which all the values ​​shown in the release are. I then set my visibility toggle to toggle the header, then expanded, then released and I have to add those maximum values ​​to a field on the report. The custom presentation you write works correctly when you are looking at the detail level. This gives the correct value, which is the maximum value in each release. I need to report again, only adding that maximum value and rolling in the header group, so that I can get the maximum value of I used to have Max in my exchange I tried to get the correct maximum value to use the function, but I can not get the SSRS 2008 R2 for that amount, and I ha...

java - How do i find the highest digit in a multi-digit number? -

OK, so I have an exercise, I need to find the highest and lowest digits in any number and add them together . So I have a number n which is 5368 and the code is to find the highest (8) and the lowest (3) number and add them together (11). How do I do this? I have tried to do something like this: public class class {public static void main (string [] args) {// TODO Auto-generated method stub int n1 = 5; Int n2 = 3; Int N3 = 6; Int n4 = 8; Int max = Math.max (n2, n4); Int min = Math.min (n2, n4); Int zodiac = max + min; Println (zodiac); }} Which works, but I have a 4 digit number and with Math.max / min, I can only use 2 arguments. How do i do this thank you in advanced. I think that intent is to do this with n = 5368 so that you It will require a person to draw a loop and compare it with the current minimum / maximum int n = 5368; Int results = 0; If (n> gt; 0) {int min = Integer.MAX_VALUE; Int max = integer MIN_VALUE; While (n> gt; 0) {int number = n% 10; Max...

vb.net - Problems creating folders in vb -

I can not create a folder in drive C: Using VB.NET it says, "Access is denied" I Tried a lot of ways but it does not work. I have tried to use this code: If my.Computer.FileSystem.DirectoryExists ("C: \ log.txt") then the system to use as author. IO.TextWriter = System.IO file. CreateText ("C: \ Log. TTTT") author. Viryline (m and amp; vbCrLf & "top") author. Virline (M. Left and VBCRF & "LRFT") "SA Writer Writer. WrightLine (Me.Width & amp; vbCrLf & amp; "Width") Authors. Use other directory to finish WriteLine (Me.High & amp; vbCrLf & amp; "Height"). CreateDirectory ("C: \ log.txt") Use the system as the author. IoActochrower = System. IOFILE Crete Text ("C: \ Log. TT TT") Writer. Whiteline (100 and VBCRLF) Authors Viraline (100 and VBCRLF) "An author writer (100 & amp; vbCrLf) writer.WriteLine (100 & amp; vbCrLf) ends use if should I do? Th...

Speed Up Containstable Query SQL Server 2008 with Paging -

There is a way to speed up the following containerable queries in SQL Server 2008. The database has 600,000 records and query 2 takes seconds. I need to use the query with paging. Other queries that do not include the Contestable are fast It seems that a relevant search is expensive to improve SQL Server 2008 by any means? with as RowsTable (select (ROW_NUMBER () by whistle. [Rank] DESC), as the Roam, E. * Containball ([Web.ProductDB] The title, as CT in the form of 'Dell' [WebCMS.Product] [CT] as the whistle on E = where EDI (whistle. [Rank]> 0)) Selection Title, Producer, Despop Top Rosesable WHERE (RONAM) Ideally I want less than 1 second display, thanks.

parent child - Elasticsearch has_child query/filter in Kibana 4 -

I'm unable to get a has_child query (or filter) to work in Kibana 4 My code works as a curl script directly in flexible shades, but not in Kibana 4, yet I understood that this was a major feature of the upgrade. Can anybody shed light? In the form of curl script works in elastic search as follows, all parents return, where they have hair: curl -XPOST localhost: Port / indexname / _search? Pretty -d '{"query": {"has_child": {"type": "object", "query": {"match_all": {}}}}}' Run up fine After that, to convert to JSON query to submit to Kibana, I have followed the normal formatting rules: I have left the curl line and added the index name (and sometimes empty filter [], but not so Make much difference); No error has been thrown, but the entire dataset returns " index ":" index "," query ": {" has_child ": {" type ":" object "," query ":...

algorithm - Incremental Linear Programming -

I'm trying to implement 1D linear programming, but I think I remember something in connecting dots. Has been there. I want to calculate the convex hull of a point set, so my obligations are line created by the row pair. I am trying to create a incremental algorithm that combines the numbers / lines one by one. min x_m * a + y_m * b s.t. X_i * a + y_i * b + z_i & gt; = 0a ', b' - & gt; Optimize with respect to 1 ... i (x_i * a '+ y_i * b' + z_i & gt; = 0) Do nothing else x_i * a '+ y_i * b' + z_i = 0b '= (- Z_i - X_i * a ') / y_i one' =? I think I might have messed up in my signature, and this is misleading me, but how do I calculate 'and B'? I have tried giving my problem again: I got an online vector drawer, so I hope that these pictures should be understood. (This is a strange rotation) In 2D, the vertical line is defined only as x-coordinate x_m because it There is just an infinite line, I need to find t...

python - How to iterate over the dictionary keys to calculate cosine similarity using the values? -

I have a dictionary like this: dict = {in: [0.01, - 0.07, 0.09, -0.02], and: For [0.2, 0.3, 0.5, 0.6]: [0.87, 0.98, 0.54, 0.4]} I calculate cosine parity I want to write for each word for which I have written a function which takes two vectors First of all, it will take the price for 'in' and 'and', then it should be accepted for 'in' and 'to'. I want to store it in the second dictionary, where the 'key' should be, and the values ​​should be returned after computation of cosine equality. Similarly, I want dictionaries for other words too. This is my job to calculate cosine parity: import math def cosine_similarity (vec1, vec2): sum11, sum12, sum22 = 0, 0, In the 0 range I (lane (vec1)): x = vec1 [i]; Y = vec2 [i] sum11 + = x * x sum22 + y = y sum12 + = x * y return sum12 / math.sqrt (sum11 * sum22) make vec1 and vec2 There can be two lists like [0.01, -0.07, 0.09, -0.02] and [0.2, 0.3, 0.5, 0.6] , and it gives a result Like...

symfony - Error links css using Assetic -

I have a layout that is used by many bundles, so I use web / dashboard / css / . When I use Simple Method: The style is implemented and I get this HTML code in the source code & lt; Link rel = "stylesheet" href = "/ boutique / web / dashboard / css / bootstrap.min.css" /> But when I use acetic {% stylesheets dashboard / CSS / * 'filter' = cssrewrite '%} Do & lt; Link rel = "stylesheet" href = "{{asset_url}}" /> {% Endstylesheets%} I have many errors in the style and I have this code in HTML in the source code & lt; Link rel = "stylesheet" Href = "/ boutique / web / app_dev.php / css / ac0081b_part_1_ace-fonts_1.css" /> And the style in modern prod does not work and I have the HTML code & lt; Link rel = "stylesheet" Href = "/ boutique / web / css / ac0081b.css" /> As I said, css files web / dashboard / css / And working in ...

sql - First and Last name tables to increase performance? -

मान लें कि मेरे पास एक ग्राहक तालिका है: CustomerID | पहला नाम | अंतिमनाम 1 | जॉन | स्मिथ 2 | जॉन | एडम्स 3 | केविन | स्मिथ 4 | केविन | एडम्स अब कल्पना कीजिए कि इस तालिका में 200k + पंक्तियाँ हैं। क्या नीचे दिखाए गए अनुसार एक अलग प्रथम नाम और अंतिम नाम तालिका बनाने के लिए प्रदर्शन में वृद्धि होगी और इसके बाद उपरोक्त दृश्य प्राप्त करने के लिए उपयोग में शामिल हो? उदाहरण: FirstNameID | प्रथम नाम 1 | जॉन 2 | केविन अंतिमनाम आईआईडी | अंतिमनाम 1 | एडम 2 | स्मिथ ग्राहक आईडी | प्रथम नाम आईडी | LastNameID 1 | 1 | 2 2 | 1 | 1 3 | 2 | 2 4 | 2 | 1 यह आपकी क्वेरी वर्कलोड पर निर्भर करता है। यह डेटा संपीड़न का एक सरल रूप है दिए गए प्रश्न का उत्तर देने के लिए आवश्यक डेटा सेट को कम करने से प्रदर्शन में सुधार हो सकता है। दूसरी ओर, आप कई स्थानों पर ओवरहेड परिचय करते हैं। यह एक व्यापार-बंद है यदि आप उन कॉलमों के मूल्यों को पुनः प्राप्त करना चाहते हैं जो आपको अब शामिल होने की आवश्यकता है। DATA_COMPRESSION > और बैकअप संपीड़न विकल्प हो सकते हैं वे बहुत अलग व्यापार-ना...

Creating a POSIXct date in R from date and time parts -

How do I create a POSIXct date from the date and time part below? Date & lt; -A.S.Det ("2014-01-01") Hour and Lieutenant; -5 minutes & lieutenant; -15 seconds & lt; -59 milliseconds & lt; -695 date hour minutes seconds millisecond The output should be a pot object 2014-01-01 05: 15: 59.695

android - ScrollView not scrolling when used for two lists and dynamic space -

I have a dynamic place between the ListView and ExpandListView . The first idea is to extend the list view in space, and when consumed in space to show part of the screen using scrollView The problem is scrollview is not scrollable at all: & lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: device = "http://schemas.android.com/tools" Android: layout_width = "250dp" Android: layout_height = "Match_parent" android: id = "@ + id / menu_navigation" android: background = "@ drawable / shield" tool reference = ". navigation Drovrfragment" & gt; & Lt; ScrollView Android: layout_width = "wrap_content" android: layout_height = "match_parent" android: fillViewport = "true" & gt; & Lt; LinearLayout Android: layout_width = "match_parent" android: layout_height = "wrap_content" Android: orientation = "verti...

r - problems with lapply and function -

I am trying to negligently with a function that applies to the list of data frames. However, I get a warning message that this name partially matches the data frame. That is, I'm unable to get the function to apply to the list of data frames. I have tested the code for a personal data frame, which works correctly. Can anyone give me some advice on this matter? For example, dflist = list ("Species 1", "Species 2", "Species 3", "Species 4" "Species 5") myFunc & Lt; - Function (df = dflist) {DF & lt; - Merge (df_main, DF, all.x = TRUE) DF $ count [is.na (DF $ count)] Thank you for your help.

c++ - Inherit from std::vector<T> and overload operator[] for custom indexing -

I want to be able to index a std :: vector such that when I use data through operator [] If I use, then the index is zero, the lower outstanding and the end of the vector is upper. This is what I am trying to do. It is not certain how to do it in C ++. using namespace std; Class Provider {Public: The name of the string; }; Template & lt; Class T & gt; Category VEC: Public Study :: Vector & lt; T & gt; {Private Vace () {} Public VAC (Int Upper, Int Comeout) {OO = Upper Bound; Lb = Lower balance; } Public: T & amp; Operator [] (int); Private: Int ub; Int lb; }; //how to do this? T & amp; VecDQ :: Operator [] (Int IDX) {Return (UB-LB) + IDX; } Int main () {int upper bound = 175642; Int lower bound = 175000; // I have a VAC deck and provider & gt; Index such as IDX [0] less outstanding VAC & lt; Std :: deque & lt; Provider & gt; & Gt; VecOfDeq (upper bound, lower bound); // here, VAC & lt; Std :: deque & lt; Provider & gt; ...

Updating the UI Using Dispatch_Async in Swift -

In my code I am simple to loop, which prepares loops for loops to loop 100 times with nested After the delay, I am updating the progress visual element in the UI via a dispatch_assink. However, I can not get the UI to update. Does anyone know that UI is not updated? Note: The print statement below is used to verify that the loop is being properly looping. i in 0 .. three comments, two basic, a little more advanced: Your loop Will not be able to update the UI in that main thread unless the loop itself is not running on another thread. Therefore, you can send it in some background queues. In Swift 3: Dispatch Quayu Global (QoS: Disability) for .async {i in 0 .. .. & lt; } : kNumberOfIterations {} // Here consuming DispatchQueue.main.async {sometime // Now the main thread self.progressView.setProgress (really float (i) / float (kNumberOfIterations), animated) UI update} In Swift 2: sending_security (sender_gate_global_que (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) ...

c++ - Unusual error when compiling with iostream? -

So if I add iostream (VS 2010 Express) I get these errors, Google can not get much information, no idea, not used to do this, I have this. . #include "stdafx.h" #include & lt; Iostream & gt; Int _tmain (int argc, _TCHAR * argv []) {return 0; } When I try to create, I get the following error message: ------ Rebuild all start: Project: Test, configuration: debug Win32 ------ stdafx.cpp test.cpp c: \ program files \ Microsoft Visual Studio 10.0 \ vc \ include \ utility (535): Error C2039: 'Receive': Not a member ' Error: C2873: 'get': Use symbol for declaration c: \ program files \ microsoft visual studio 10.0 \ Vc \ '% s \ ": tr1' c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ utility (535) Include \ utility (536): error C2039: 'tuple_element': 'std :: tr1' Not a member is c: \ program files \ microsoft Visual Studio 10.0 \ vc \ include \ utility (536): Error C2873: 'Tuple_element': An...

jquery - Loop through first 3 instances -

How can I loop through the first three instances of '.slide-item img' inside the document? var set = []; $ ('.clide-item img'). Each (function () {var img = $ (this). Data ('src'); var id = $ (this) .Parent (). Attr ('id'); $ (this) .remove (); set .push ([img, id]);}); Lose all of the above, but I'm not sure how to limit it. Limit your selection to start: $ ("Slide-item img: lt (3)"); Read more:

Add timestamp watermark to PhantomJS images -

Image
How can I add watermarks to pictures files? Somewhat like this: Can page.evaluate help me here? Should not affect the actual appearance of the webpage during any injection or rendering. This stamp should be an overlay only. Presentation is very high level in the Funtom S, the only way the page.evaluate Is to inject the watermark as an element (looks like position: absolute ) and delete it after the screenshot.

python - RuntimeError: main thread is not in main loop while using tkinter.simpledialog -

यहाँ मेरा कोड है: import थ्रेडिंग आयात tkinter.simpledialog def showDialog (evt) : Dlg = tkinter.simpledialog.SimpleDialog (रूट, टेक्स्ट = 'टेस्ट!', बटन = ['ओके']) dlg.go () डीईएफ़ टेस्ट (): थ्रेडिंग.थ्रेड (लक्ष्य = रूट.इवेंट_जानेरेट, आर्ग्स = (' & Lt; & lt; showDialog & gt; & gt; '))। प्रारंभ () रूट = tkinter.Tk () root.bind (' & lt; showDialog & gt; ', showDialog) tkinter.Button (text =' showDialog ' कमांड = टेस्ट) .पैक () root.mainloop () मैं इस कोड को पायथन 3.4 के साथ चलाता हूं पहली बार मैं showDialog बटन पर क्लिक करता हूं यह पूरी तरह से कार्य करता है लेकिन अगर मैं ठीक दबाता हूं और बटन को फिर से क्लिक करता हूं, तो वह एक रनटाइम त्रुटि बढ़ाता है: थ्रेड में अपवाद धागा -2: ट्रेसबैक (सबसे हाल का कॉल अंतिम): फ़ाइल "डी : \ Program Files \ Python34 \ lib \ threading.py ", पंक्ति 921, _bootstrap_inner में self.run () फ़ाइल" डी: \ प्रोग्राम फ़ाइलें \ Python34 \ lib \ threading.py ", पंक्ति 86...

json - MongoDB - db does not show any collection after mongoimport -

I'm actually searching for MongoDB and Maps, promote inside, but I have a problem. The establishment of Mongodb was successful. After that, I tried to import json file to type these 2 commands before calling a Mongo in Terminal (I am working on Ubuntu 12.04 LTS): $ wget http: /media.mongodb.org/zips.json $ mongoimport - db mapreduce --collection zips --file zips.json then I call I have received these alerts: Mongodabi shell version: 2.6.5 connects to: : The test server has startup warnings: 2014-11-04 04 20: 15: 12.280 + 0100 [initandlisten] 2014-11-04 T-20: 15: 12.280 + 0100 [initandlisten] ** Note: This is a 32-bit MongoDB binary 2014-11-04 T 20:15:15 12.280 + 0100 [Initandlisten] ** 32 bit builds are limited to 2 GB data (or at least -General). 2014-11-04 T20: 15: 12.280 + 0100 [initandlisten] ** Note that journaling is deferred for 32 bit and is currently closed 2014-11-04T20: 15: 12.280 + 0100 [initandlisten] ** See http://dochub.mongodb.org/core/32bit 2014-11...

javascript - Input text not selectable -

I have a problem with jQuery. I'm working on a table with every & lt; Td> inside & lt; Input & gt; I use it to focus through is tab key columns: var i = 0; $ ('# Pl_table tr') Each (function () {$ (this). Find ('td'). (Function (i) {$ (this). Find ('input'). Attr ('tabindex' , I + 1);});}); My problem If I use this code then it is not possible to select input values ​​from table input. Do not even use and Shift + arrows with the mouse. The table row looks like this: & lt; Tr class = 'tripRow nopair' id = '1' & gt; & Lt; Td square = 'drop' & gt; & Lt; / Td> & Lt; Td id = 'col1' class = 'check' & gt; & Lt; Input name = 'tripRow1 []' type = 'checkbox' name = 'monkey' value = 'marked' / & gt; & Lt; / TD & gt; & Lt; Td id = 'col2' class = 'center' & gt; & Lt; Input name =...

c# - Index a dynamic object using NEST -

I am creating an API application that essentially allows a user to create a document, which he Although they want to be stored in Flexible, basically, I am providing users with a simple interface to use our elastic search examples. I am trying to keep the implementation as simple as possible. This is what I am doing so far. Object for expected entity: Public class DocumentModel {public string index {get; Set; } Public string type {get; Set; } Public string id {get; Set; } [ElasticProperty (Type = FieldTip.Nosted)] Public Dynamic Document {get; Set; Simple implementation: [http post] [root ("")] public IHttpActionResult post (document model document) {Uri node location = New Uri ("http: // localhost: 9200"); IConnectionPool connectionpool = new sniffing connection bridge (new list & lt; URI & gt; {node location}); Connection settings settings = new connection settings (connectionpool); Elastic client esClient = new elastic client (settings); IInde...

flask - ValueError: too many values to unpack python with wtforms_extended_selectfield -

To include this code in my WTForm project, select optgroup my / Code> in forms, but I am getting the following error: for for internal_val, group_items in internal_label: valueError: too many values ​​to unpack I copied and paste the code directly into my project and even used the example given to it: (('fruit', (('apple', 'Apple'), ('peach', 'aad' ('Peach', 'peach'), ('peach', 'peach'), ('pears',' pear ')), (' vegetables', ('cucumber', ' But this brings a different, yet similar error: For pre> item1, item2 in field.choices: valueError: lots of values ​​to open By looking at SO, I have to add things such as .iteritems () See in the section after In , but since it is a Tupal, it was none thanks for the help.

python - How to create a dictionary of dictionary with these functions? -

I have a dictionary like this: dict = {in: [0.01, - 0.07, 0.09, -0.02], and: For [0.2, 0.3, 0.5, 0.6]: [0.87, 0.98, 0.54, 0.4]} I calculate cosine parity I want for each word for which I have the cosine similarity function which takes two vectors First of all, it will take the price for 'in' and 'and', then it's 'in' and 'to' and above Should be priced for. I want to accumulate the result of the second one, where there should be a 'key', and with that key each coin should be a dictionary of the cosine parity value as I want The output is like this: {in: {0.4: 321, to: 0.218}, and: {in: 0.1245, to: 0.9876}, in: {in: 0.8764, and: 0.123}} Below is the code that is doing this: def cosine_similarity (vec1, vec2): sum11, sum12, sum22 = 0, 0, 0 for the range i (lane (vec1 )): X = vec1 [i]; Y = vec2 [i] sum11 + = x * x sum22 + y = y sum12 + = x * y return sum12 / math.sqrt (sum11 * sum22) diff result indict (result, name, value, key...