Posts

Showing posts from May, 2013

ios - Load UIViewController -

I have a UIViewController with a black background and I do this: CredenciaisViewController * Obj = [self.storyboard instantiateViewControllerWithIdentifier: @ "Creditian"]; [_viewContainer addSubview: obj.view]; _viewContainer.alpha = 1; The CredenciaisViewController has a red background color, but when it is light on my half And when Ubuton does not work even in white part. > Why does this happen? And how can I fix it? I got it now! I have kept and I did my action button: - (IBAction) Most credentials: (ID) sender {credentials weave controller * credenciaisview = [ Self Storyboard Institution Visualistrologist identifier: @ "Credencial"]; [Add Child VUI Controller: credenciaisiew]; [CredenciaisView didoveParentViewController: self]; CredenciaisView.view.frame = self.containerView.bounds; [See Self.container Ad-view: credenciaisview view]; } And then worked well!

asp.net mvc - MVC Controller test using MOq -

I want to test the method given using Muke. How can I use my controller's moq objects? New objects are being created inside the controller method. There is a class datacontext and the second one is a concrete class. There is a problem in making a duplicate for these classes. // My Controller class action method get public functionsTooled course (if cookie ["RememberUsername"] = null) {if (System.Web.HttpContext .Current.Cache.Get (userName) == faucet) {CacheUtil.UpdateCache (userName); } Dictionary & lt; String, int & gt; Classes of classes = (dictionary & lt; string, int & gt;) system. Web. Hpptex Present. Cache (User name); If (square platform. Value value (studio)) {var reference = new data syntax (datacontext); Var CoserPository = New course repository (reference); Bull student_exists = students axiom (stud); If (student_exists) {INMerelabel & lt; Course & gt; Course = Course Repository. GetRelated Courses (stuId); var userprofile = refe

c# - How to prevent ODataConventionModelBuilder to automatically expose all derived types' metadata? -

I am using Odetta Confrensmodelbilder to ADM model for Web API Odata service like this: Odata ModelBuilder Builder = New Odata ConferenceModelBuilder (); Builder. Namespace = "x"; Builder. ContainerName = "Y"; Builder.EntitySet & LT; Z & gt; ("Z"); IEdmModel edmModel = Builder. GetEdmModel (); class Z is located in an assembly, and public class Q Z is located in separate assembly. Odataconvenshnmodelbiilder ADM model will generate Q >) among other derived classes (and it will come with the service metadata It is undesirable in our case. When there is such a problem in the inaccessible class (such as internally defined), it certainly does not exist. What ODataConventionModelBuilder the This should work: ODataConventionModelBuilder Builder = New ODataConventionModelBuilder (); Builder. Namespace = "x"; Builder. ContainerName = "Y"; builder.EntitySet ("Z"); builder.Ignore & LT; Q

javascript - Request dispatching from one JSP to another JSP -

I am currently working on a payment gateway type project. If there is a verification error in the back end, first I want to show an error message on my JSP page (payment gateway) and after 10seconds, I send the object (error code) to my JSP merchant (webpage of the merchant) Want page Currently, when I try to send and forward in my JSP page, my error message / content is not shown in jsp. Instead of showing my error messages, it is just waiting for 10 seconds and the object moves the merchant forward. Because I hope that I am not allowing permission / response to my JSP in sending a dispatch. Correct me if I'm wrong. Please suggest me a good way to handle this situation? I am trying to do this in my JSP page .. & lt; / Head & gt; & Lt; Body & gt; & Lt; form: form method = "post" commandName = "item" & gt; & Lt; Form: Errors Path = "*" cssClass = "errorblock" element = "div" /> & Lt

javascript - Regular expression to remove first part of string leading to keyword -

I think I'm about a palm-to-the-forehead moment, but I do not think this work get to do. I have a way that I want to start it up to a certain folder (this is a separate folder, but the name of the folder will always be the same). Therefore, for /path/to/templates/sometemplate.html , I want the string just templates / sometemplate.html . ('/' Route to go '/' deleted). I am not just split on '/' and can remove the first two, because the second path is /yet/another/path/to/templates/sometemplate.html .... Could. BTW, I'm doing it in a gruntscript, so I'm looking at the Javascript string. Replace (). How do anyone know this? You do not really need regex here, just the string of the methods Use: var s = '/yet/another/path/to/templates/sometemplate.html'; Var r = s.substr (s.indexOf ('/ templates /') + 1) // = & gt; Template / sometemplate.html

java - Split command line to arguments -

I need to launch an external Java process. Logic becomes somewhere else and as a string I get it I really need to find a certain "-D" key and update its value before running a process. Example: java -dosgi.framework.extensions = "foo bar" "FDF-dog.framework.extension = bam bom" should be: java-dosgi.framework.extensions = "bar" "fdf - doggie framework.extension = bam bom" How do I correctly identify the arguments? Obviously there is no alternative to sharing space, if possible, I want to use a plug-in from eclipse infrastructure. Take a look and have an API to help with command line options.

sbt - How to make properties file available to FileInputStream in Scala script? -

I have a scala script that I want to call with SBT. This scala script shows some reliance, one of which uses dependency property file. This property file is provided as the time to run because this dependency is run as a separate application. Just to run that property is likely to use dependency as a dependency, I wrote this scala script which I want to call from Sbt. val fis = new FileInputStream ("my.properties") // here fails val props = new property () When I click the code above I run it, it fails in my dependence with an exception where the properties file is loaded. How is this property file made available in Scripts under SBT? file my.properties in src / main / resources < / Code> and Source.fromURL (getClass.getResource ("/ my.properties")) instead (because it gives you more flexibility where you can keep the file on file system Until it's at CLASSPATH). In the form of an assistant, use the following code to find out abou

ruby - Jekyll missing post, page, and default -

My goal is to create a website using jacile + jithb pages. I have already participated in the burden of trouble, where Mavericks had to upgrade his Mac from Mount Sher, so I could install ExCode and Redcloth. I am trying to use, but it has been a non-stop problem as mentioned above. I am at that point where I am trying to run Bundle Enz Jaikil But I have received errors saying that there was no such date: error : Your site can not be created: ------------------------------------ Invalid date ' 0000-00-00 ': post' /vendor/bundle/ruby/2.0.0/gems/jekyll- 2.4.0 / lib / site_template/_posts/0000-00-00- welcome-to-jacquel.markdown.arb ' Does not have a valid date in the file name so I went and in today's date Put the next error was Error: Your site can not be created: ---------------------- ----- --------- Invalid date '& lt;% = time.noustraftime ('% Y-% m-% d% H:% M:% S ')% & gt ; ': Post' / Seller / Bandal / RUB / 2.0.0 / gem

ios - How to display price format ( small cents) -

Image
This question is already an answer here 1 answer I display a value Trying to do with small cents: St should be smaller than other images, such as the veneer of the image. I searched in NSNumberFormatter but did not find the answer. do you have an idea? thanks Text after " Once you have your string formatted, you can create a NSMutableAttributedString . Ours '.' Find the string for it and then get the NSRange of the substrings. Once you have this series, do something like: [attributedString setAttributes: @ {NSFontAttributeName: [UIFont fontWithName: @ "Helvetica" size: 10], NSBaselineOffsetAttributeName: @ 10 } Range: centsRange]; You want to make sure that you choose smaller font sizes than the rest of your text.

python - Read multiple files with fileinput at a certain line -

I have many files that I need to open and read (I thought it was with fileinput.input () Can be easy). Those files are started on very relevant non-relevant information, this specific line id [tab] NAME [tab] geo [tab] feature (some time line 32, but unfortunately any other Line some time), then I want to store them in the list ("entries") id [tab] NAME [Tab] Geo [Tab] Feature 1 AM A1 2 BB B1 3 cc Way C1 . Now, before reading line 32 (see the code below), I would like to read from the above line. Is it possible to do this with fileinput? Or am I going wrong, is there another easy way to do this? So far my code is: entries = list for line in fileinput.input (): if fileinput.filelineno ()> 32: Entries .append (line.strip (). Split ("\ t")) I am trying to apply this idea with Python 3.2 UPDATE: My code now looks, but still is out of range I need to add some entries to a dictionary Do I miss something? filelist = fileinput.input () entries =

c# - Running WCF Windows Service as InstanceContextMode.PerCall -

I have a WCF service that is configured to run as a window service but only if it works only If I select from InstanceContextMode to single . When I change it to be PerCall and restore the service, it can not be accessed. Can anyone explain to me if I have the the context set as a window service to run the WCF service and why is it so? Public class catering sss service: iCTing sSTS service Update: Hosting code [Service Provider (Instance ContactMode = Instant ContaxModePierCall) Strong> private icing SSTS service _cateringSSTService; Private service_serviceHost; Personal Work _ Execution Task; Public Catering SSTServer () {} Public Zero Start () {_executionTask = New Work (Manager Startup); _executionTask.Start (); } Private Zero Manager Startup () {try {_cateringSSTService = New Catering SSTService ()); _serviceHost = New service host (_cateringSSTService); _serviceHost.Open (); } Catch (Exception) {}} Pause Public Null () {if (_serviceHost! = Null & amp;

git show --name-status letters: when can more than one letter appear? -

Quick questions about git, especially letters, as they appear when using < P> git show & lt; Revenue & gt; --name-status --online . I think in some files, I get results: AM contrib / platform / src / com / sun / jna / platform / win32 / winUser.java How is it possible that both of these files were added and modified? I also get results such as: MM Change. MD Could this be due to a humiliating commitment? Are there any other possible reasons? Thanks with GIT show command merge Only non-merge commits can show that you are showing a merge. When you ask git show to show a merge commitment, it uses "joint difference" by default, for example, here (part of) git One is committed to the source. I have used the HEAD ^ because due to this special merge low, there are correct types of changes to generate an interesting result. I will give the example first, and then explain what is happening. $ Git show HEAD ^ Committed 4109c28e055dba2

ddl - How long should it take to build a single column index in MySQL for a 100K row table? -

I am trying to create an index with 100K rows at a varchar (20) column, and this is 30 minutes Running for so far On an 8-core i7 processor with 16 GB memory and an SSD drive, I do not understand why it is taking so long. Any thoughts? I'm a bit new in MySQL, but it's just a basic vanilla index on a relatively small table. On the same table only takes a few seconds to generate another index. How does a debug such thing in a MySQL? What is the total size in the table's memory? If it's large enough that you're getting a lot of hard drive calls, it can still take some time. Also, is this your site when you are doing this? As far as debugging goes, you can check your SQL process on the system, how many resources it is using. Finally, do you have to create a multi-column index rather than two single-column indexes?

javascript - jQuery fade in content while using Ajax .append() -

Trying to use some jQuery on the 'Load more' button to drag JSON FadeIn () .append (response) html markup from server. Syntaxs such as .append (response). FadeIn ('slow'); does not seem to work, I believe this is a DOM issue because the data has been added to the page before .fadeIn (). is a chance to work Any suggestions for how to accomplish this kind of effect? My JavaScript is $ (function () {var offset = 10; $ (". Load-more-cell"). (Function () {$ .post ("load -more-notifications ", {Offset: offset, limit: 30}, function (response) {$ (" notification-table-body "). Attachment (response); offset + = 30;});});}) ; Attachments gives current archive, i.e. "Insert-table-body" element, if you want to call fadeIn on the attached element, you should first create that archive, In which call them and then the method: $ (feedback) .hide () AppendTo ('Notification-Table-Body'). FadeIn ();

c# - Identify If Access database having ReadOnly Permission -

Messages that are open for the Axas database "This database has been selected to read only ". When we connect to OleDbconnectio using the C # .net application, it gives the error for the DB .. Updating the "Operation Update Useful query must be used. " I just want to prompt the user with the read-only permission to access DB in the Access database. We can add code in C # .net to read the ODB database only to read permission. Thanks You can use FileInfo fileinfoF = new fileinfo (@ "C: \ MyDB.ACADB"); If (f.IsReadOnly) {Console.WriteLine ("File is read-only"); } Else {Console.WriteLine ("File is not read-only"); }

c - casting signed to double different result than casting to float then double -

Then, as part of an assignment, I am working on an expression: (double) (float) x == (Double) x 1 or not. (X is a signed integer) It works for every value except INT_MAX. I was wondering why this is so? If I print the values, then they both show the same value for INT_MAX. x = INT_MAX; Printf ("signed X:% d \ n", x); Float fx1 = (float) x; Double dx 1 = (double) x; Double dfx = (double) (float) x; Printf ("(double) x:% g \ n", dx1); Printf ("(float) x:% f \ n", fx1); Printf ("(double) (float) x:% g \ n", dfx); If ((double) (float) x == (double) x) {printf ("RESULT:% d \ n", ((double) (float x == (double) x)); } Edit: The entire program: contains # lt; Stdio.h & gt; #to & lt include, stdlib.h & gt; #to & lt include, limits.h & gt; Int main (int argc, char * argv []) {// create random values ​​int x = INT_MAX; Printf ("signed X:% d \ n", x); Float fx1 = (float) x; Double dx 1 = (double) x; Doub

node.js - Debug is not a recognized command (express) -

मैं विंडोज 8 पर एक्सप्रेस चल रहा हूँ। I & gt; एक्सप्रेस एप < / Code> निर्भरता स्थापित करने के लिए कमांड चलाने के बाद & gt; सीडी ऐप & amp; amp; & gt; DEBUG = my-application ./bin/www लेकिन मुझे त्रुटि संदेश मिला 'डीबग' को आंतरिक या बाहरी कमांड, ऑपरेटिव प्रोग्राम या बैच फ़ाइल के रूप में पहचाना नहीं गया है। इसे ठीक करने के बारे में कोई भी विचार? कुछ पृष्ठभूमि जानकारी, मैंने सफलतापूर्वक अपनी वेबसाइट से node.js स्थापित किया है। मैंने इस वेबसाइट पर instuctions का पालन किया जब मैं काम नहीं कर रहा था & gt; एनपीएम स्थापित जब मैंने काम नहीं किया तो मैंने निम्नलिखित कमांड का इस्तेमाल किया और यह काम किया npm install -g express-generator @ 3 मैंने भी अपना पैकेज बनाया। json और ऐप.जे.एस. एक्सप्रेस वेबसाइट पर आधारित है और अब मैं फंस गया हूं। सबसे पहले, आपको डेब्यू सेट करना होगा एक पर्यावरण चर के रूप में: सेट DEBUG = my-application तब, आप ऐप चला सकते हैं: नोड बिन / www

list - Python, Grabbing information from a class object not working -

I do not know what the reason for this error is, I do not know how to describe it without informing you Here is the relevant part of my code: class node (object): def __init __ (self, content, children): self. Content = content itself Children = Children Deaf Head Node (District, Origin): new_contents = parent.contents new_contents.append (district) new = node (new_contents, []) parent.children.append (new) returns new root = node ([], [] Data = [[[1,1, 'R'], [1,2, 'D'], [1,2, 'R'], [1,4, 'D']] Download (data, Root) Here's the problem: new.contents have been modified as planned, but this is also parent.contents. what happened? As you have stated in your comment, you should content pf 'new_contents In 'parent.contents' Otherwise, you are reaching the list from the context, which is not obvious what its purpose is. In this way, your 'MacNode' function may start as follows: def makeNode (District, Guardian): new

sql - SQLite not finding field in trigger -

I have two tables, one cut and other deduction is the main area in the deduction of the idDeductions, and it is a foreign key in deductTrans is. I have a few things that I want to deduct myself when deduction is done in the deduction. I have this trigger, which is compiled create TRIGGER trig_DeductTrans start after putting on DeductTrans Update cut set restCt = remainderCT - 1 Where idDeductions = New.idDeductions End; When I insert a record, I receive the following error: "Such a column as idDeductions" I am at a loss. I have tried to convert WHERE to cut. IDDeDios = NewEidDecution but it does not help. Any ideas? After the SQLite claims that the deducted named a column in the table ' IdDeductions' You have not given us any means to check, but most likely it is correct. I can see that your trigger is on a separate table ( DeductTrans ), which apparently you also expect. Most likely, the cut name in the column is different for this one column

html - Jquery elements follow each other -

I am working on it. Obviously, it uses key binding to animate and shoot pills. Unfortunately, if you go up or down and are in the way of a tablet goal, and you go up or down, then the bullet goes with you. Equal position with the goal, so I looked at the CSS position, and I think The problem may be that some kind of bullet player is added. I have tried to change the situation on both of them, and to change the body, the bullet manufacturer has to change the code. no point. Here's my link: And here's the constructor code that I think is the problem: var shoot = function () {if (Canshoot === true) {canshoot = false; Bullet = 0; var div = $ ('& lt; div class =' ​​+ 'bullet' + 'style =' + 'margin top: -25;' + '& gt; yt ;); Div.appendTo ('html'); Div.animate ({margin lift: 500+ 'px'}, 1500); Canshoot = false; SetTimeout (function () {$ ("bullet"). Hide (); canshoot = true;}, 1500); }}; Setting the

javascript - How do I set dropdown option selected by looking at MVC URL -

Thank you for creating such a great resource for learning Hello and Stakeoverflow programmers like me. I am reading a lot of answers here to help with my first MVC project, this is my first time asking. Here's my dropdown HTML & lt; Div class = "dropdown" & gt; & Lt; Id = "select asset" onchange = "location = this.options [this selected index] .value;" & Gt; & Lt; Option value = "/ history / index / all" & gt; All assets & lt; / Options & gt; @ Warak (Various items in model .node info) {& lt; Option value = "/ history / index / @item.node.name" & gt; @ item.node.name & lt; / Options & gt; } & Lt; / Select & gt; & Lt; / Div & gt; Once an item is selected from the dropdown, the URL will look like this Now I try to capture that last part Setting URLs to be selected (G0000106 in this case and selected dropdown option) Here is a javascript that I have done to

javascript - Ajax Issue (possibly due to encodeURIComponent characters) -

I have a form in which the users enter the data and then submit the form through Ajax on the same page Then it is processed. Each time a user will enter some data that will throw an Ajax error. I snatched all other farm areas and compressed it down to textarea which is causing the problem, but I can not know why. I have created a sample page that I am running to debug the problem, but I can not understand why I am having trouble. I tried to make a bella and it was having problems: ( Here is a link to the test page: Here is the test code page (Broken.fp): & lt ;? php if (! $ _ POST) {? & Gt; script = type = "text / javascript" src = "https: / / AJAX Googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> & lt; script type = "text / javascript" & gt; submit the function encode uri () Including / other form data that I strip away var datastrring Taken = 'formid = completeActivity & amp; submit = submi

c# - How to get the ObjectContext container Class name? -

How to get the ObjectContext container class name? Without starting it like this Object Contactct Reference = ((IObjectContextAdapter) DB). Objectcontext; .. (4 purpose of learning) I know that this is the way to do this, but I want to know how to get the name, name. Thank you. I think this is correct. Model.Context.cs in App_Code if you are generating T4. If you are not then it should be in the model Designer.cs line 47

c# - Detecting concurrency issues in Entity Framework using transactions -

I've saved the code that is used to help reduce compatibility issues. Is: // HasConcurrencyIssues opens a new EntityContext and returns the actual current // details and then compares it with that which was loaded for the form (HesConcurrencyIssues ()) {// can not save, quit avoiding code returns; } (Using EntityContext reference = New EntityContext ()) to avoid reading // dirty dirty - should I use it? Isolation Level Level = Differential Level Read; (Using DbContextTransaction trans == context.Database.BeginTransaction (level)) (try {// here where I save items using references by adding items to dbSATs.SaveSthaf (reference); // Generate encrypted command Execute before check because // it can refer to some time.Service Changes (); // Check Changes () // After the execution, something happened, check again ** ** blocked here * * If (this is HesConcurrencyIssues ()) {// Do not save Exit rollback and code trans. Rollback (); Return;} trans.Commit ();} Hold (Exception pre) {//

r - Delete one aes from legend generated from two layes sharing common aes name -

Image
My question is that I want to overlay a scatter plot at the top of a line plot and change the color of these two plots. With a variable I want to keep the legend for only one color, if I use scale_colour_discrete (guide = "none") then will both have gone. An example of a copy is: Library (reshape2) IRIS2 and LT; - Melt (iris, id.over = "species") GG Plot (Iris 2, AES (X = Variable, Y = Value, Group = Species)) + GOM_point (AES (Color = IFLSE (Value <3, "Type I want to show the legend for 'species' rather than just type. setting show_guide = FALSE in the geom_point layer, GEGPlot (IIS2, AES (X = variable, Y = value, group = species)) + GOM_point (AES (color = FLSE (value <3, "type1", "type2")), Show_guide = False) + Geom_line (AES (color = species)) + scale_colour_discrete ("species", breaks = level (iris 2 $ species))

jquery - Javascript multiply 3 inputs -

I know that this topic has been touched many times over here but I can not get it properly. I am pulling a value for #starback which is based on the selected dropdown. Then I want to multiply it by 2 input fields. Any help is greatly appreciated! thank you in advanced! & lt; Input type = "text" id = "resultbox" name = "resultbox" readonly = "true" /> & Lt; Id = "off" onchange = "calc ()" & gt; & Lt; Option value = "1" data-one = "0" & ​​gt; Choose option & lt; / Option & gt; & Lt; Option value = "14" data-one = "14" & gt; Off of & lt; / Options & gt; & Lt; Option value = "8" data-one = "8" & gt; On & lt; / Options & gt; & Lt; / Select & gt; & Lt; Br> & Lt; Br> & Lt ;! - FTE - & gt; FTE & lt; Div id = "f1" & gt; & Lt; Form & gt; & Lt; Inpu

java - Tree from tree paths -

I have a lot of data in my project, which can be structured in some way. To make it simpler, we show that the data path is a bunch of paths: / user /homefolder/folder1/file1.jpg /user/homefolder/folder1/file2.jpg / user / Homefolder / folder2 / file3.jpg / user / hover folder / folder2 / file4 JPG / User / Hoffler / Folter 3 / File 5 JPG So, I really have tree paths and I can group these paths if there are paths by the first three folders or more. I have this value in array I and I do not want to create a duplicate tree model. I use the SWT.VIRTUAL style and ILazyTreeContentProvider in JFAC tree weaver / P> You can apply your own node Example Example Tree & lt; String & gt; Root = new tree & lt; String & gt; (); From tree to & lt; String & gt; folder1 = root.add ("Folder1"); Folder1.add ("file1.jpg"); folder1.add ("file2.jpg"); From tree to & lt; String & gt; Folder2 = root.add

c# - Invoking Commands from ListView in MVVM -

I am using the prism for the Windows Runtime so that the events in my scene with the Delayed Commands in my visual models Able to do I'm wondering what would be the best way to run commands (like items, select items) from a list-view with a button (or custom controls generated button button square). I want to keep the effects provided by the button control (such as background change, tilt effect). But the button unfortunately absorbs click events, as a result, I can not use my list in the ListView to hook up, like the following XAML (and Behaviours SDK): & lt ; ListView ItemsSource = "{Compulsive Available ItemsList}" SelectionMode = "Single" & gt; & Lt; ListView.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; Custom Control: NavMenuButton style = "{StaticResource SelectionListMenuButton}" content = "{binding alias}" descriptiontext = "{binding name}" /> & Lt; / DataTemplate & gt; &

ios - Constraints are not honoring size classes -

Image
I am trying to convert iPhone and iPad storyboard into single which is known about size organs. For this, I need to change a particular image width between the iPhone and the iPad and enable / disable an obstacle on the iPad. Here's my image width screenshots obstacle: As I think that 230 should be used while running on iPhones and 400 otherwise, right? Do not let the iPad I screenshots barrier to disabled: Running on the iPhone 5/6/6 + simulator, I'm unable to complete the constraints for a few reasons. Warning: ("NSLayoutConstraint: 0x7f99f17704e0H: [UIImageView: 0x7f99f1770370 (400)]>", "NSLayoutConstraint: 0x7f99f17718d0 Uiviewiew: 0x7f99f1771710 Width == IATextFieldEx: 0x7f99f1768be0.width + 160 & gt; "," & lt; NSLayoutConstraint: 0x7f99f1773210 UIImageView: 0x7f99f1770370.width == IATextFieldEx: 0x7f99f17639e0.width & gt; "," & lt; NSLayoutConstraint: 0x7f99f17734e0H: [UIView : 0x7f99f1771710] - (0

html - Stop auto-detect phone numbers in Phonegap app for iOS (Bug) -

मैं फोनगैप बिल्ड और JQM के साथ एक iOS ऐप विकसित कर रहा हूं । क्या कोई ऐप गणित की समस्याओं को उत्पन्न करता है और कुछ समय तक मैं बड़ी संख्या में उपयोग कर रहा हूं जो आईओएस "फोन नंबर" की तरह व्याख्या करता है और स्वचालित रूप से लिंक में बदल जाता है। अगर & lt; वरीयता नाम = "पता-डेटा-प्रकार" मान = "गलत" / & gt; में config.xml इस स्टॉप को जोड़ते हैं तो इसके अनुसार वरीयता को config.xml में जोड़ा जाता है जब तक कि मैं एक बटन पर क्लिक नहीं करता, और संख्या स्वचालित रूप से लिंक में परिवर्तित हो जाती है, जैसे कि प्राथमिकता को अनदेखा कर दिया गया था। बटन की क्रियाएं क्लिपबोर्ड और प्रिंट की प्रतिलिपि के लिए है, इसका उपयोग करके और यह यह संख्या को प्रभावित नहीं करना चाहिए (कम से कम यह है कि मुझे क्या लगता है)। मैंने आईओएस 6, 7 और 8 में परीक्षण किया है, सभी में ऐसा ही किया जाता है। किसी भी विचार कैसे इस को रोकने के लिए? धन्यवाद! जोड़ने का प्रयास करें & lt; meta name = "format -डिटेक्शन "content =" टेलीफोन = नहीं "

html - Make link submit identically to default button behavior -

Sorry if it seems redundant, I have read through a few posts and can not figure out how to be done. I need an element that behaves like a button, but I thought instead to use a CSS class object. I find out how to do this by creating href = "#" and adding Javascript commands I & lt; P & gt; & Lt; Input name = "test" type = "button" value = "click" /> & Lt; / P & gt; However, due to server side software I am using I need to submit my form to duplicate the behavior of the button exactly. I have been guessed: & lt; P & gt; & Lt; One square = "button" href = "#" onclick = "submit ()" & gt; Click & lt; / A & gt; & Lt; / P & gt; Thank you for your help! You have the form in the context of the element, and then submit: & lt; P & gt; & Lt; A class = "button" href = "#" onclick = "document.getElementById (&

c# - Validating single object in the model -

I have a visual model in which I have a series of models because I want to display and get many models on the same page is required. For example, view classmode {public registrarmod rm {receive}; Set;} Public LoginModel LM {get; For example public registration model {{required] public string user name {received; When I try to validate an object by using tryValidate (viewModel.Rm) in my ViewModel (ModelState.isValid) { } ModelState is always invalid and I think this is because other objects are also undergoing verification. How do I make an object in my model Can i validate This is not validing a single property properly, behind the scenes, Validate, however, it is returning the property that you specify by the name of the properties, and if there are problems with any other properties, they will not be added to the modelstate. Model Metadata Metadata = Model Matadata Provider. Present. GetMetateDataFireType ((= => Model, Model. Gettype ()); String proper

Ruby - Beginner - Dividing using 2D Array -

I do not know how to call on the second part of the 2D array. array = [[['dog', 5], ['cat', 10]] num = 10 points / array [0,1] array = [[dog ', 5], [' cat ', 10]] num = 10 puts num / array [0] [1] puts # 10/5 = 2 points / array [1] [1] # 10/10 = 1

javascript - How to create a Backbone Collection with data that is not flat -

I'm not sure how to create a backbone collection using the following data, and how surprising it should be. In JSON the item property makes sense for me to use as a collection because it already has an array but what other information for the collection is available Is there a good way, or in case of maintaining it, it needs to be referenced in a scene? How should I manage the following data format for archiving? Here are some examples of data and code: {"page": 1, "total": 1000, "item": [{"title": "item 1 "title", "color": "green", "type": [{"standard": "yes", "size": "big"}, {"isStandard", "size": "medium" } "," "{Title}", "title": "title of item 2", "color": "blue", "type": [{"IsStandard": "", "size": " "&

ios - Are Today Extension Ivars Reset Constantly? -

Why is ExtJS 5 Container click event no longer fired? -

In our 4.2.2 app we have registered a click event on a container, but it does not work in ExtJS 5 . Any ideas? 'afterrender': function (comp) {comp.getEl (). ({'Click': {fn: function (el) {this.fireEvent ('click', comp);}, scope: comp}, 'mouseover': {fn: function (L) {el.target.style .cursor = "pointer";}, scope: comp}}, comp); } Removing the scope of "Computer" from the end of the "Ongoing" call I Before: 'afterrender': function (vamp) {comp.getEl (). ({'Click': {fn: function (el) {this .fireEvent ('click', comp);}, scope: comp}, 'mouseover': {fn: function (el) {el.target.style .cursor = "pointer";}, scope: comp}}, comp); } after: 'afterrender': function (comp) {comp.getEl (). On ({'click': {fn: function (AL) {Effer event ('click', comp);}, scope: comp}, 'mouseover': {fn: function (L) {el.target.style. Cursor = "pointer&qu

php - Yii2 Auth Client Extension for Tumblr -

I'm trying to use the OH client extension in Yii2 (). I have copied the Twitter Oath Client class that came with YiiFramework and made its own Tumbler version. Twitter works fine, but when I use my Tumblr version, I get an error on the screen "Is it OK to access all your data and post it in your account? Are you *** * Are logged in as *****. "(Tumblr oauth page) There is an error: Failed with the request code: 401, Message: oauth_signature does not match expected value Here's my Tumblr authentication client code: Names Place yii \ authclient \ clients; Use yii \ authclient \ OAuth1; / ** * * Example Application Configuration: * * ~~~ * 'component' = & gt; [* 'AuthClientCollection' = & gt; [* 'Class' = & gt; 'Yii \ authclient \ Archiving', * 'Customer' = & gt; [* 'Tumbler' = & gt; [* 'Class' = & gt; 'yii \ authclient \ clients \ Tumblr', * 'Consumerkey' = &am

c# - ASP.NET MVC 5 Merging ApplicationUser with DbContext -

Image
I am trying to integrate APP identification into my own DBTTENText, but I have no luck with it. The one I am trying to achieve is that every deal that has been posted will be assigned to a user. DBCTX: Public class ShareDealsContext: IdentityDbContext & lt; ApplicationUser & gt; {Public ShareDealsContext (): Base ("name = ShareDealsContext") {} // Other DBSets Public DBSet and LT; Deals & gt; Deals {get; Set; }} deal model: [foreign key ("user")] Public Virtual String UserId {get; Set; } Public Virtual Application User User {Received; Set; } Identity Model: Public class ApplicationUser: IdentityUser {public async function I have tried to change "DefaultContext" to "ShareDealsContext" inside ApplicationDbContext but still does not work. I want to completely remove DefaultContext and just want to use my own ShareDealsContext. Any thoughts on what I'm missing out on? Thanks Can you substitute defaultConte

visual studio 2012 - Why and how do uninitialized char start at -52 in C? -

As the title says, I was under the impression that one only has a short short unsigned int , Will allow any value from 0 to 255. According to the debugger on the visual studio, whenever I start with the four , it starts at -52 'one' ?? ' Why is this a matter, and how is this possible? It is unspecified whether the four are signed or signed, in your case it has been signed, this draft CMT is included in the standard section 6.2.5 type which says: Three types four, signed four, and four unsigned char to collective The form is called character type. Implementation will define four that are either signed four or unsigned char .3 in the same category, representation and behavior; Unintended automated variables have an uncertain value and therefore their initial value is unpredictable Since we are talking about Visual Studio, this will appear in accordance with Wikipedia article because it will mark the initial stack memory Uses CC for: Microsoft'

javascript - Global variables undefined after using jQuery.getScript() to assign -

I have many global variables; var1, var2 , etc ... I do not instantize these variables immediately, but when I later use jQuery I have a separate javascript file. However; After I get getScript () ; And I am trying to get properties of my new immediate items; I get the following error: Unkit type error: Undefined property 'x' can not be read Is there a reason? Or can not you instantiate global variable like this? Code getScript () ; OpenOffice.org function () $ $ .getScript ('Objects.js', function () {// objects game screen = new game object (0,0,750,1500,' Art_asset / Game_screen / colaborate layout copy page ', 0); menu = new game object (0,0750,750, Art_Assets / main_menu / bkg_start2.png', 0); startBtn = new game object (50,50,65,160, 'Art_Assets / main_menu / Credit button = new game object (50,150, 65,160, 'Art_Assets / main_menu / btn_help.png', 'Art_Assets / main_menu / btn_helph.png') credits = New game o

r install.packages to install downloaded packages -

I am trying to install and update the packages install.packages (ask = wrong) downloads packages but If there is an error, it stops, if I run it again, it downloads the package again. I am using Debian stable Linux with Backport repositories, as explained earlier: This answer is for a Linux system, though I think the windows should not be different. When you try to install a package, at the end of the process (whether successful or not), tells you where to download the package you should see something like this: # Downloaded source packages # â ???? / Tmp / rtmpSPFiKl / download_packagesâ ???? The path can change on a case basis. Store the source packages in a temporary folder; This means that the next time you reboot, the files will disappear. So, suppose I was trying to install a package for which some system requirements are necessary. I get an error then I proceed to install the required system packages. When I try to set R package back, I can: install.packages

What is the "m=" attribute in a html tag? (Plus tons of other attributes found in bing result source) -

So I was looking for a Bing image search result through some sources, and each hyperlink for each returned image For HTML looks like: & lt; &: A href = "#" ihk = "HN.607992005913609849" m = "{ns amp; quot; Picture & amp; quot ;, k: & amp; quot; 5064 & amp; quot ;, Middle: & amp; quot;; 3D11808868DB7B3BD88719756EECE65700723F87 & amp quot ;, simple: & amp; quot; http: //wwwkabsoluteknimekcom/naruto/kakshikhtm&mp; quot ;, Imgrl: & amp; quot; http: / /wwwkabsoluteknime. com / naruto / kakashi.jpg & amp; quot;, oh: & amp; quot; 225 & amp; quot;, tft: & amp; quot; 43 & amp; quot;, dls: & amp; quot; images, 5431 & amp; quot;, OI: & amp ; quot; http: //www.absoluteanime.com/naruto/kakashi.jpg& quot;} "mid =" 3D 11808868 DB7 B3 BD 8871 9756 Iiiiiiar 65700723 F 87 "onclick =" return false; "T. 1 = "Kakshi Hakeke" t 2 = "640 x 480 Â · 32 KB · JPEG&quo

Is there anything (any way) to concatenate java Strings faster than StringWriter? -

After I am pulling a group of simple data and a bigger construction (1KB - 2KB) string. I am new to this language, but after reading, this possibility seems to be the fastest (i.e. the least copied volume): string tmpTable = "& lt; table border = \ "1 \" & gt; "+ System.lineSeparator (); StringWrite String Water = New String Vitre (1024); String tr = ""; stringWriter.append (tmpTable); (Project p: projectSet) {TR = String.Format (trFmt, p.getId (), p.getTitle (), p.getPriority (), p.getStatus ()); StringWriter.append (tr); } StringWriter.append ("& lt; / table & gt;" + System.lineSeparator ()); stringWriter.flush (); stringWriter.close (); // Old habits Is there a "better" way? If it was 'C', then I might be inclined to use a "four * argv []" like the deal is the standard to use. It has the initial buffer size maker and append methods you are looking for. To get the outside price, call

powershell - Run "Invoke-Expression" statement as another user -

I have a PowerShell script / function, which takes some arguments and runs it. Invoke-Expression ". \ ScriptFile.ps1 $ ($ Node.Name) .xml C: \ TempFolder \ $ ($ Node.Name) Local" Another user now I want to run it Inoc-expression does not have a built-in parameter credentials which gives this facility on the other hand in ash-command There is a credentials ( Get-Credential ) parameter which provides the facility to run as another user; invite-expression Tried to replace come-command . How do I handle this given expression to run as a second user? Script processing structure script deployment {SetScript = @ "Set-Location D: \ Invoke-Expression Apply". \ ScriptFile.ps1 $ ($ Node.Name) .xml C: \ TempFolder \ $ ($ node Knam) local "" Testskript = {return $ false} GetScript = {return @ {GetScript = $ GetScript SetScript = $ SetScript Testskript = $ TestScript}} DependsOn = "[File] CopyMe"} PS: This is all within a set

javascript - Using AngularJS how to check a PDF file exist in a folder or not? -

I have a list of students for some students, I have to show a link, and click on this link, their progress card Should load (this is a .pdf file). For others, this link should not be shown. I did this by giving the same student ID to my student card and if this particular student shows this link; Otherwise, do not show links I can do it for only 5 or 6 students. I can not do it for 1000 students The following is my code: angular JS code & lt; Script & gt; If (response.student_id == 'SD0001') response.student_id == 'SD0002' || Response.student_id == 'SD0004') {$ scope.pdfData = true; $ Dungeon Student pdf file = response.stunt_id + '. PDF'; } And $ scope.pdfData = false; & Lt; / Script & gt; HTML code & lt; Body id = "ng-app" ng-app & gt; & Lt; Div = ng-switch = "pdf data" & gt; & Lt; div ng-switch-when = "false" & gt; & Lt; / Div & gt; & Lt; Div ng-switch

convert to base64 and send image using ajax in Javascript -

I need to send the selected image to the server, I have already tried it here here HTML is Part & lt; Div class = "row" & gt; & Lt; Input type = "file" name = "filUpload" id = "filUpload" onchange = "showimage preview (this)" & gt; & Lt; Br / & gt; & Lt; img id = "imgprvw" alt = "uploaded image preview" class = "img-thumbnail" /> & Lt; / Div & gt; I need to get an encoded image in javascript variable, but I do not know / p> P>

java - Is there any way to access child object's variable when the object is referred by its super class? -

There is another way to access the object object's variable when the object is the object to the child casting the caste class? class parent {int parentData; } Children of the class parents {int childData; } Original obj = new child (); Obj.childData = 10; // Error getting (obj) (child) .childData = 10; Varies with the class and I tried to refer to all class squared objects with parent class. At some point, what should I do with hair variables? Do I need to redesign? Only the behaviors that parents should have in the parent class are normal for all children. If you are trying to implement in the original class, then in reality it is normal behavior that you may want to look at. If you are applying, there are different behaviors on child organs, Shweta is in this original class, but apply it in child classes. If this implementation shares shared parts, then you mother it Can be removed from a normal method in a parent or auxiliary class.

Is it possible to change the display syntax"Console.WriteLine" in C#? -

I'm new to C # programming, can someone tell me how to change the display syntax in C #? Would I like to output: console. WriteLine ("hello"); // output is "hello" I will convert Console.WriteLine to other words, but still it will be used to display the output. Print ("Hello"); // output is "hello" I want to use it in the text box and want to display it in the label. How to do this? I hope you can help me thanks You can define the new process PrintIt () for this Public Zero Print (String Message) {Console.WriteLine (Message); } Public static zero main (string [] args) {print ("hello"); }

xcode - Swift- Set Visible menucontroller -

I'm trying to display UimenuController but I can not see it. How can i do Give to the menu controller: UIMenuController = UIMenuController.sharedMenuController () menu controller. Menu = Useful = True MenuController.arrowDirection = UIMenuControllerArrowDirection.Down MenuController.setTargetRect (CGRectMake (100, 80, 50, 50), keeping in mind: self.view) Know MenuItem_1: UIMenuItem = UIMenuItem (Title: "Menu", Action: " Delete: ") MenuItems do: NSArray = [Delete] MenuController.menuItems = MenuItems To actually display the menu, you need to do the following: Before calling getFirstResponder () you get your sharedMenuController call menu.setMenuVisible ( True, animated: true) finally c anBecomeFirstResponder override override function canPerformAction function Write the function for the selector here is an example someFunc () {beFirstResponder () Menu menu.menuItems = [deleteItem] menu.setTargetRect (CGRectMake (100, 80, 50, and so on)

ef code first - How can I avoid ASP.NET Identity from adding this extra field? -

I have a new MVC5 project with ASP.NET IDE 2.0 and EF 6.1.1. I added our own ApplicationUser (based on the built-in IdentityUser) thus my DBContact is created. Public class ApplicationDbContext: IdentityDbContext & lt; ApplicationUser & gt; {Public ApplicationDbContext (): Base ("DefaultConnection", throwIfV1Schema: Incorrect) {} Create Public Static ApplicationDbContext () {Return New ApplicationDbContext}; }} When the database has been created I have tables like AspNetUsers, AspNetUserRoles, AspNetUserClaims, and AspNetUserLogins. .. IdentityUserLogin & gt; () HasKey & LT; String & gt; (L = & gt; Then I OnModelCreating () with very basic statement Protected Override Zero OnModelCreating (DbModelBuilder modelBuilder) {modelBuilder.Entity added & lt; l.UserId); Modlbilder Anti & lt; IdentityUserRole & gt; (). HasKey (r = & gt; new {r.RoleId, r.UserId}); } As soon as I add OnModelCreating (), the Identity Tables are aut

Is each slower than while in Ruby? -

निम्न दो फ़ंक्शन, जो जांचते हैं कि कोई संख्या प्रधान है: def prime1? (Prime_candidate) सच है अगर [1, 2] शामिल हैं शामिल हैं? प्राइम_कंडिडेट श्रेणी = 2.पॉटो (मठ.sqrt (प्राइमकाण्डिडेट)। सीसिल) .to_a i = 0 जबकि i & lt; रेंज.count गलत लौटाता है यदि प्राइम_कंडिडेट% सीमा [आई] == 0 सीमा = श्रेणी.रेग {| जे | जम्मू% श्रेणी [i] == 0} सही अंत डीईएफ़ प्राइम 2? (प्राइमाकैन्डिडेट) सही है अगर [1, 2]। शामिल करें? प्राइमकाण्डिडेट रेंज = 2.उत्त (मठ.sqrt (प्राइमकाण्डिडेट)। सीसिल) .to_a range.each do | i | वापसी गलत अगर प्राइम_कंडिडेट% i == 0 श्रेणी = श्रेणी.रेग {| जे | जम्मू% i == 0} अंत में सही अंत निम्न बड़े पैमाने पर परिणाम प्राप्त करते हुए बहुत बड़े प्रधान (5 915587277) के साथ परीक्षण करते हैं: उपयोगकर्ता सिस्टम कुल असली प्राइम 1: 2.500000 0.010000 2.510000 (2.499585) प्राइम 2: 20.700000 0.030000 20.730000 (20.717267) ऐसा क्यों है? ऐसा इसलिए क्योंकि दूसरे फ़ंक्शन श्रेणी में अस्वीकार द्वारा संशोधित नहीं होता है, इसलिए प्रत्येक मूल लम्बी रेंज पर चल रहा है ? जब आप सीमा =

sapui5 - Registration through kapsel on smp -

I am using Kapell to register because I know that the user is already registered. But I can not get the Init << P> var defaultContext = {"serverHost": "192.168.254.159", "I added all the plugins according to the documents provided by Cisco https ":" wrong "," server port ":" 8080 ",}; Sap.Logon.init (logon suite, logon array, api, default concert); Error: uncaught typeerror can not call 'init' method 'undefined' It looks like < p> Your Couplel plugin is not being loaded properly. Here is the command to add it as a Cordova plugin: Add the Cordova Plugin & lt; The complete path to the directory containing Kapsel plugins & gt; \ logon

c# - What methods are there to identify brace/ curly bracket pairs in the Visual Studio IDE? -

Image
VB is coming from the background I wonder why I have more difficulty in doing this as my C #. I realized yesterday what is the main difference between the two languages? Take this example If true, then I am going to end as the integer = 0 to 10c = a + b next end this is obvious Where the end of each block ends because Mailing Indentation Inside the IDE, clicking on an opening or closed brace is highlighted on the other. for the same code C # if (true) {while (true) {for (for) int i = 0; I & lt; = 10; I ++) {c = a + b; 2} 2 is still applicable, but we have lost 3. Matching indent Inside IDE, click It seems that the braces should have features like automatic color coding . What other strategies are available to track the pair of brakes? I use "code block and tagger" (note: despite not being mentioned on the website , It is also): Options: < / Html>

LibGDX 3D collision detection -

I am using LibGDX game engine to create 2D games and box 2D for physics. How can I check for conflicts? Is the box like 2D for the 3D Games? Is there sth like box2d for 3D games? Yes Libgdx has a 3D physics engine called it. Written in C ++, it uses it to be able to communicate with Java. Core Dependency: P> compilation "com.badlogicgames.gdx: gdx-bullet: $ gdx warson" desktop dependence: < Pre> compilation "com.badlogicgames.gdx: gdx-bullet-platform: $ gdx warsen: original-desktop" Android dependency: compilation "com.badlogicgames.gdx: gdx-bullet: $ gdx version" resident "com.badlogicgames.gdx: gdx-bullet-platform: $ gdx Carson: Resident-Armbi "Native resident" com.badlogicgames.gdx: Gdx-bullet-platform: $ gdx version: Original-Arabic-v7a "resident" com.badlogicgames.gdx: gdx- bullet-platform: $ gdx warson: original Resident-x86 " iOS dependency: compilation" com.ba

c++ - g++ -O2 incorrectly optimize out SIMD variable assignment -

I am writing a program using Intel AVX 2 instructions. I found a bug in my program that appears with the optimization level-O2 or higher (plus-O1 is good). After detailed debugging, I reduce the buggy area. Now the bug seems to be compiler because it is wrong to customize a simple copy assignment of the variable __ m256i . Consider the following code snippet. Fu is a templated function I test with CMP = kLess, OPT = kSet . I know the optimizer might optimize the switch. This variable can also be optimized for y buggy line y = m_lt; . When compiled with -O2, this line is being ignored . Then y does not get the right value and the program generates false results. However, the program is correct -O1 To verify my decision, I y = m_lt; with two options: y = avx_or (m_lt, avx_zero ()); BitWord or m_lt and all-0s vector y = _mm256_load_si256 (& amp; m_lt); Use the CID Load Instructions to load data from m_lt address. Both, i.e. y = m_lt; is intended to