Posts

Showing posts from August, 2012

apache - Local host for all devices with router -

I'm trying to fix the link below whenever I restart the system every time I made changes, but It also does not help me get still while trying to connect with other local devices I believe the cause of the router is the problem Here my PC settings I have Windows 8 Pro Easy PHP 14.1 and D-Link Router Firmware Version 7.17 This can be a router but first you have to edit "conf_files \ httpd.conf", find listen 127.0.0.1:80 and enter the appropriate IP address. Then restart your server.

asp.net - Access one web api controller from another -

मेरे पास दो वेब एपीआई नियंत्रक हैं: PageController और BlogController । वे पृष्ठों और ब्लॉग बनाने के लिए सरल क्रूड होते हैं। हर बार जब मैं एक ब्लॉग तैयार करता हूं, मुझे एक पृष्ठ बनाना पड़ता है, लेकिन इसके विपरीत नहीं। यह करने का सबसे अच्छा तरीका क्या है? मुझे लगता है कि यदि मैं PageController से BlogController से उत्तराधिकार में हूं तो मेरे रूटिंग के साथ कुछ अजीब होना चाहिए। क्या CreatePage विधि को PageController से BlogController 's CreateBlog विधि कॉल करने का कोई तरीका है? क्या मुझे ब्लॉग बनाने के लिए हर बार दो अलग-अलग अजाक्स कॉल्स बनाने के लिए खुद को इस्तीफा देना चाहिए? आपको कुछ सामान्य तर्कों की आवश्यकता होती है, जिसे कई नियंत्रकों द्वारा एक्सेस करने की आवश्यकता होती है, आपको एक सामान्य क्लास बनाने के लिए एक अलग वर्ग बनाना चाहिए। यह क्लास आपके वेब प्रोजेक्ट का हिस्सा हो सकता है या एक अलग परियोजना / विधानसभा में। असल में आप जो करने की कोशिश कर रहे हैं वह यह है: सार्वजनिक वर्ग ब्लॉगकंट्रोलर {सार्वजनिक शून्य बनाएँब्लॉग () {var pc = new PageController

regex - Python Regular Expression returning nothing to repeat? -

So, what I'm trying to do is parse the text file line by row in a list. I have done this successfully. Now, I need to draw all links coming out of .html . So I thought I would parse each line and if it were * html . So I believe that the best way to do this is regular expression. Below is my code and there is no return error about the error being repeated in the question. I have bolded the line that refers to it. code: compiled = re.compile ("*. Html") // here error [m.group (0) For [compiled.search (l)] if M] I just try to remove the links that appear for this record: Nws_NewsDetails.aspx@Site_Id=2& lang = 1 & amp; NewsID = 148513 & CATED = 1 9 & amp; Type = Home and gtype = 1.html but they Actually, random, therefore * .html In regular expressions, * one is meta And this is a special meaning because this gives you an error. You can use the following RegEx, re.compile (". * .HTML") Here, . * This means that

javascript - Chrome.Storage.Local Persistence -

All I have started developing small extensions using Chrome's various APIs, and although things are doing a great job I am still curious about some things. Two questions, if all of you will not mind helping me: 1 Can anyone tell me how limitations are to Chrome? Storage. Strongness of the locals? I have tried various tests on my own, like storing some things with chrome.storage.local.set (), clearing all my browser history, cookies etc. and then everything is still there. Often it will still happen, but sometimes I'll check it later and it will run. Overall, I'm definitely unable to label what I'm doing, which is sometimes clearing away the .local data. 2. I'm mostly working with Chrome. Storage chrome is not all the time being synchronized by using the "Sign in Chrome" feature. In the case that I have read on the API page. SCNC is used, whereas Chrome is offline (even not logged in, I believe, which is my case), the data is stored locally

javascript - How do I redirect to different port on same host in Meteor? -

I run in my meteor application on port 2368 which runs on port 3000. Ghost is a different example. In the template file below, a hyperlink in the meteor app is pointing to a different example Ghost blog. & lt; Template Name = "Header" & gt; & Lt; Header class = "navbar" & gt; & Lt; Div class = "navbar-inner" & gt; & Lt; Div class = "top-nav" & gt; & Lt; Div & gt; & Lt; A href = "{{pathFor 'home'}}" & gt; Home & lt; / A & gt; - & lt; A href = "http: // localhost: 2368" & gt; Blogs & lt; / A & gt; - & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Header & gt; & Lt; / Template & gt; This works on my local machine, which means that it redirects the blogging system properly. However, even when I posted in the production, this does not work, as it still points to the local host. What is

java - can't find out how to use thread pools? -

Then, I need to modify a bank server Java class for the project, Uses I have to replace it with the thread pool but tutorials for thread pools are extremely confusing and no one can tell how to create just one thread pool. For reference I am amending the thing which I am amending public static zero main (string [] args) IOException {ArrayList accountList; Final difference ACCOUNTS_LENGTH = 10; Bank Bank = new bank (ACCOUNTS_LENGTH); Last full SBAP_PORT = 8888; ServerSocket Server = New Server Socket (SBAP_PORT); System.out.println ("The client is waiting to connect ..."); While (true) {socket s = server.accept (); System.out.println ("Client Connected."); Bank Service Services = New Bank Service (S, Bank); Thread t = new thread (service); T.start (); } I do not need any fancy stuff, just change the thread t to thread pool , but if it's a Simple class is said that I can not find it. What you are looking for is the executable service Here'

javascript - JSP to return value to ajax call -

I think the JSP page that I called on the AJAX call which is based on my JSP code part, Or returns 1. So to get that value I did something like this in Ajax Call: And I did the same in the JSP part: How to get this value in my JavaScript Ajax call. I want to store this value because I need to make decisions based on this value. Currently the message that is being displayed on Ajax success: Return a Jason from the JSP page. Set as Jason. Feedback. Stuttgart Type ("App / Jason"); Response.setHeader ("content-displacement", "inline"); In the success of AJX, Boolean value is obtained from Julon and its use ... Update: Return the flag to div and use that div to get the code value id . .println ("div "); In this way JavaScript is used ... $ ("#moded"). Find ("# flag"). Html ();

ios - Core Data Table Relationship and Fetchrequest -

I am developing an iPad application using storyboard and core data. I have no good idea about core data. I have 2 table names, A and B table have 2 fields with 2 data names and value. In Table B, there are two field names with name codes and text. The limit of AA is set. Table A Datacode value p1 10 M1 17 p028 < M3 20 w4 12 Table B Item Code P0 Car P1 bus M2 penn M1 ball P restriction R1 book M3 pencil N1 TV w4 radio Item code in table B is the data code in Table A + some other value.i Based on table code, it is necessary to bring the text value from the table B. The item code, which corresponds to the datacode in the table, How at the door I get text b. First you need to make a connection between tables A and B. After that you have to get the record based on your relationships ... you will get your records like this .... NSMutableArray * arrObj = [[NSMutableArray alloc] init]; For (TableBob relationWithTblB in TableB * tblObj) {[arr

What's wrong with my robots.txt and .htaccess so google fetch failing -

यह मेरा robots.txt है उपयोगकर्ता एजेंट: AhrefsBot अस्वीकार: / उपयोगकर्ता- एजेंट: AhrefsBot / 3.1 अस्वीकार: / उपयोगकर्ता-एजेंट: याहू- slurp अस्वीकार: / उपयोगकर्ता-एजेंट: एमएसएनबीट अस्वीकार: / उपयोगकर्ता-एजेंट: एमएसएनबीटी / 2.0b अस्वीकार करें: / उपयोगकर्ता-एजेंट: Googlebot अनुमति दें: / अस्वीकार करें: / फ़ीड / अस्वीकार करें: / ट्रैकबैक / अस्वीकार करें: / wp-admin / disallow: / wp-content / disallow: / wp-include / disallow: /xmlrpc.php अस्वीकार करें: / wp- अनुमति दें: / wp-content / uploads / user-agent: * अस्वीकार: / और मेरी एचटीएसीएसी फ़ाइल # वर्डप्रेस और लेफ्टिनेंट; ifModule mod_rewrite.c & gt; RewriteEngine On RewriteBase / RewriteRule ^ index \ .php $ - [L] रीव्रैटकॉन्ड% {REQUEST_FILENAME}! -f पुनर्लेखनकॉन्ड% {REQUEST_FILENAME}! -डी रीराइटरेबल /index.php [एल] & lt; / ifModule & gt; # END वर्डप्रेस सेट एन्व IFNoCase उपयोगकर्ता-एजेंट "^ बैंडिट" bad_bot SetEnvIfNoCase उपयोगकर्ता-एजेंट "^ Baiduspider" bad_bot SetEnvIfNoCase उपयोगकर्ता-एजेंट &

how to populate java object values in jsp -

I have a scenario like this. The JSP page is submitted after submitting the request to the sublet. I need to send an object to the JSP page to fill the form text field, as I need in the servlet. User will enter id value in the form and we need to get data from the database and fill the rest of the fields in the same page Is used in this process // servlet // 1 request.setAttribute ("student", student); // 2 request.getRequestDispatcher ("/ Student.jsp"). Forwarded (request, response); // getAtttibut used here in JSP input type = "text" name = "name" value = & lt;% = name% & gt; I have done coding and it is working fine, but it looks very useless! Please mention any other way to do this task efficiently. Just tell me how to proceed and I can work for it :) While your approach type is correct, you should therefore, obtain data from your request attributes: & Lt; Input type = "text" name = "

TypeScript interceptor in AngularJS -

I use typescript having trouble setting up a request interceptor in AngularJS Following The snippet works, the working version is commented out. Anything that I do not inject into the constructor is undefined in the local variable request method. module service {export category AuthInterceptor {public static factory (Token Service: Services. ITokenService) {return new AuthInterceptor (Toknsrvisej); } Constructor (Private token service: Services. Information service) {this.request = (config: ng.IRequestConfig) = & gt; {Config.headers = config.headers || {}; If (this .tokenService.IsAuthorised ()) config.headers.Authorization = 'beerer' + this.TokenService.Token; Return configuration; }; } Public Request: (config: ng.IRequestConfig) = & gt; NG: Irvevest Confief; / * This public request (config) {// it is not working. TokenService is undefined here, as well as $$ or $ q, which I tried to inject config.headers = config.headers || {}; If (this. TokenService.Token!

knockout.js - First knockout js drop down list -

I'm starting working on knocking JS out today !! Please give any example, to share the JS drop down list I mentioned the example in exiting JS, but I could not force it to drop! & lt; div id = "state_container" & gt; & Lt; Table border = "0" cellpadding = "0" cellspacing = "0" class = "form" data-bind = "with:" width = "300px"> & Lt; TR & gt; & Lt; TD & gt; & Lt; Period & gt; StateName & amp; Nbsp; & Lt; / Span & gt; & Amp; Nbsp; & Lt; Input type = "text" name = "statename" data-bind = "value: countryname" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Span & gt; Small name & lt; / Span & gt; & Lt; Input type = "text" name = "shortname" data-bind = "value: shortname" /> & Lt; / TD & gt; & Lt;

c# - Listpicker tap event in fullscreen mode not working correctly -

Image
I am developing the Windows Phone 8 application. I am using the ListPicker option. My Listpikr code & lt; Toolkit: List Picture X: Name = "lpfilter" foreground = "white" bordertyxize = "0" margin = "300, 0,0,0" height = "80" width = "50" visibility = "visible" & gt; & Lt; Toolkit: ListPicker.Background & gt; & Lt; ImageBrush ImageSource = "/ Property / Images / Filter Pages" /> & Lt; / Toolkit: ListPicker.Background & gt; & Lt; Toolkit: ListPicker.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; Text block text = "{binding name}" visibility = "collapsed" foreground = "red" /> & Lt; / DataTemplate & gt; & Lt; / Toolkit: ListPicker.ItemTemplate & gt; & Lt; Toolkit: ListPicker.FullModeItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; TextBlock Tap = "TextBlock_Tap" &am

Extact Data from ODT to PDF in java -

Hi, I want to get the data of the ODT file in Java. I have two approaches for that purpose. 1). I get data to remove from the ODT file and create a new document 2). Get a print preview of the ODT document and add it as an image in a PDF document Can you please tell which approach is better and how should I do it? Finally I used the third approach, while looking for my answer, I used the Java Library for my purpose. Stuck on XdocReport . I used to convert ODT and DOCX converters to PDT format of ODT / DOCX.

java - Cant understand the working of File object.delete() -

I am trying to delete a jar file using jar5 (hence the path API that was introduced in Java 7 Is not an option). My code: string command = file. Separator; Testing file = new file ("." + + + Sep + "server" + sep + "lib" + sep + "testjar.jar"); If (test.delete ()) {logger.log (Level.INFO, test.getName () + "has been deleted".); } Else {logger.log (Level.INFO, "Delete operation" + test.getName () failed); } The jar file is deleted when my code is executed but the delete operation has failed for testJar.jar is printed in the log. Why Cant understand .. Any help is appreciated. Update: I tried to redo the same code and this time it says that testJar.jar has been removed now I I am confused about what is going on I think this problem has magically disappeared , But some common troubleshooting tips: First of all; Try to create and delete any other file and check file permissions / ownership. Check that

android - How to send ArrayList of class object type from one activity to another activity? -

मैं कक्षा वस्तु प्रकार के अर्रे लिस्ट को एक गतिविधि से दूसरे गतिविधि में भेजना चाहता हूं लेकिन, यह मुझे एक त्रुटि देता है कृपया मेरी मदद करें मैंने कई लिंक्स की कोशिश की है, लेकिन मेरी समस्या का समाधान नहीं हुआ। Fatal aviation main: Java.Lang.RuntimeException मैं इन लिंकों की कोशिश की है: // साइड कोड भेजा जा रहा है: if (result.size ()> gt; {ArrayList & lt; LogSetGet & gt; lst = नया ArrayList & lt; LogSetGet & gt; (); lst = परिणाम; आशय मैं = नया आशय (लॉग इन। होम, क्लास); i.putExtra ( "सूची", परिणाम); startActivity (i); } // पक्ष कोड प्राप्त करना: आशय I = this.getIntent (); ArrayList & LT; LogSetGet & gt; ls = ArrayList & LT; LogSetGet & gt;) i.getSerializableExtra ( "सूची"); ArrayAdapter & LT; LogSetGet & gt; Adptr = नया अर्रे एडाप्टर & lt; लॉगसैटगेट & gt; (होम। इस, एंड्रॉइड। आर। लेट। Syimple_list_item_1, ls); lv.setAdapter (adptr); आप पहले से धन्यवाद। आप इसे लिखते हैं class लॉगसैटगेट सीरियलज़ेबल {}

ios - MPMoviePlayerController can't play local file with error _itemFailedToPlayToEnd -

I have a local iPhone compatible MP4 video (I have changed the video for the iPhone, and I have uploaded Tested for a web server and putting its URL in Mobile Safari, it plays perfectly) that I want to use the MPMoviePlayerController Here's my code: NSString * filePath = [[NSBundle mainBundle] pathForResource: @ "Welcome" type: @ "MP4"]; NSURL * fileURL = [NSURL URLWithString: filePath]; PlayerController = [[MP3 MPV Player Controller Alok] initWithContentURL: fileURL]; PlayerController.movieSourceType = MPMovieSourceTypeFile; PlayerController.backgroundView.backgroundColor = [UIColor whiteColor]; PlayerController.view.translatesAutoresizingMaskIntoConstraints = Yes; PlayerController.scalingMode = MPVsklingModSpeechFile; //[playerController.view setFrame: moviePlayerContainerView.frame]; [PlayerController.viewSet Frame: CGRactMake (0, 0, 200, 200)]; [See MoviePlayer ContributorAubview: Player Controller.View]; PlayerController.contentURL = fileURL; Pla

log4j2 - Why can't create newly log file including daily date by using DailyRollingFileAppender? -

I appender, "DailyRollingFileAppender'm trying to configure log4j framework using" and as usual date new log file I want to make {log.txt.2014-04-22 ", but it failed. this is my log4j.properties. Logpath = c: \ \ logFilename = log Txt log4j.rootlogger = DEBUG, FILE log4j.appender.FILE = org.apache.log4j.DailyRollingFileAppender log4j.appender.FILE.File = $ {Logpath} $ {Logfailnam} log4j.appender.FILE.ImmediateFlush = true Log4j.appender.FILE.Append = true log4j.appender.FILE.DatePattern = '.' Yyyy-MM-dd log4j.appender.FILE.layout = org.apache.log4j.PatternLayout log 4j.appender.FILE.layout.ConversionPattern =% d {yyyy -mm-DD HH: MM: SS} |% p |% Although I am successful in making an examination through Junit, the log file is "log.txt.2014-04- 22 was not made right. "it's coming" log.txt "was created as Remember me? Please give me advice. Thank you very much. The file date was not attached today Will not. If you change th

angularjs - angular ui-router best practice inheritance vs metadata -

I am converting my application from ngRoute to uiRouter. I have read and seen a lot of tutorials, but I still lack the experience in making decisions about best practices. At first I made a big change that breaks the state declaration to each module / controller. It seems more natural and cleaner to me, but many states want to introduce a global rule, while introducing some complexity. For example, half of my routes require authentication and the other half are not. With NgRoute I had a data attribute of the required atte level in each route, with the ureairer I think this is the way to do this and the state is the succession route. That's why a route may be public. My path is an abstract route declared at the public application level. This creates the issue, although the module is not working with any one person, if a person does not define a public position. On the contrary if I add the metadata attribute to the data object, such as "auth_level: user" it will not

sql - Merging Row_Number column with other column -

मेरे पास लोग नामक तालिका है, जिसमें दो कॉलम हैं, नाम & amp; उम्र । मैं एक क्वेरी लिखना चाहूंगा जो नाम पंक्ति को row_number के साथ प्रत्येक पंक्ति में मिला दिया जाएगा। ऐसा कुछ: - नाम ------------------- [ROW_NUMBER] स्टेन [ROW_NUMBER] एलेक्स [ROW_NUMBER] स्टीवन यह संख्या जो मैंने कोशिश की चुनें ('[ '+ row_number () ओवर (नाम से क्रम) +'] '+ नाम से लोग varchar (100)) + ']' + लोगों से नाम

java - Spring mongo adding criteria to and operator dynamicaly -

I am trying to create dynamic queries with user input and with operation, my code is created. : list & lt; Criteria & gt; Criterias = new ArrayList & lt; Criteria & gt; (); And add criteria to this list. And successfully adding it successfully now I want to create and operator between each criterion. Criteria = new criteria (). And operators (criterias.get (0), criterias.get (1)); This works fine but my input is not correct so I should add it dynamically, I tried for (int I = 0; i & lt; Criterias.size (); i ++) Criteria Criteria = new criteria (). And operator (criterias.get (i)); Where am I missing? A list of benchmarks by "$ and" operator to unite all the standards: Criteria = new criteria (). And Operator (Criterion Toura (New Criterion [Criterion (. ()))); here

Python basic math -

Now, before you explain something before I cancel the question, I am too young and try to learn dragon I am doing I do not have any resources in school to know such maths. I am doing a practice which says: Write a function named myPi will return an approximation of PI (3.14159 ...). Use Leibniz approximation located at: So, they show how to calculate it like this: I do not know that in Python How to calculate I mean, I do not even know how to calculate normally, because how can I calculate something which is infinite? Besides, there is another question. Do I really need such advanced mathematics so that the programs can be written later? Many of my friends had gone through the 12/13 program and they had no problem. So what is advanced mathematics important? Because I suspect that my friends also knew how to calculate the area of ​​a circle while they were learning. Address your first question, " How do you calculate an infinite series " , the answer i

javascript - Jquery-UI diagloge scrolls to top of the page -

I am using jquery-ui and I'm trying to do this when "click me". However, since this link is directed to "#", it also scrolls at the top of the page, how can I do it? I think that this is e.preventdefault $ ("#dialog") .dialog ({autoOpen: false, show: {effect: "blind", period : 1000}, hide: {effect: "explosion", duration: 1000}}); $ ("#BTN_SC2"). Click (function () {$ ("#dialog") .dialog ("open");}); and the button to open it: & lt; A href = "#" class = "btn" id = "btn_sec2" & gt; Click me! & Lt; / A & gt; Try to use : $ ("# btn_sec2"). Click (function (e) {e.preventDefault (); $ ("#dialog") .dialog ("open");});

machine learning - problems using GLM -

I have some difficulties to understand how to use GLM model with Possins. Import SP Datacats = N.P. Import Skikits as DDFRAFM.State MODEL = ('A': N.P.Rem.Rend (100) * 1000, 'B': NP. Ramand.rand (100) * 100, 'c': np random.rand (100) * 10, 'target': np.random.rand (100)}) x = dataset.x [:, ['a' , 'B', 'C']]. Value y = dataset .x [:, ['target']]. Value size = 1e5 nb eta = 3 fam = sm.families.Poisson () glm = sm.GLM (y, X, family = fam) res = glm.fit () Use the "target" column as the target form I am doing, should I label the goal for O or 1? Can someone tell me what information I get about predictions? Price is another function as Poisson Sources are down right now when it is back up, then you should read through more. There are lots of usage notes for prediction and GLM. How to label your goal is up to you and maybe there is a question for cross-validation. Poisson count is counted but it can be

php - preg_match_all email 'To' value empty -

मेरे पास एक फ़ाइल में एक ईमेल बचा है दिनांक: बुध, 9 अप्रैल 2014 14 : 33: 11 + 0000 रिटर्न-पथ: x.com प्रति: व्यक्तिऐमिलएड्रेस@मेला.कॉम से: x विषय: नमस्ते विश्व संदेश-आईडी: & lt; x & gt; एक्स-प्राथमिकता: 3 एक्स-मेलर: PHPMailer 5.1 (phpmailer.sourceforge.net) प्रेषक: senderEmail@mail.com MIME-Version: 1.0 सामग्री-प्रकार: टेक्स्ट / html; वर्णसेट = "आईएसओ -885 9-1" एक्स-एसईएस-आउटगोइंग: 2014.04.09-54.240.8.56 सामग्री-ट्रांसफर एन्कोडिंग: उद्धृत-प्रिंट करने योग्य मैं काम करने की कोशिश कर रहा हूँ ईमेल को भेजा गया था? यानी personsEamilAddress@email.com मैंने कोशिश की है preg_match_all ('/ to: (। *?) /', $ विषय , $ परिणाम, PREG_SET_ORDER); print_r ($ परिणाम); लेकिन सरणी जो छपाई गई है उसमें ईमेल पते का मान नहीं है। सरणी ([0] = & gt; सरणी ([ 0] = & gt; प्रति: [1] = & gt;) [1] = & gt; ऐरे ([0] = & gt; प्रति: [1] = & gt;)) आपकी समस्या आपके खोज समूह में ? है इसके अलावा, अंत में s संशोधक आपको । के साथ सब कुछ चुनने दें।

javascript - AngularJS: Bind multiple elements with ngModel -

I would like to validate several elements with the NG-model. When each one of them is correct, do one thing. Is this possible? You can use AngularJS built-in validation. It is a good resource to describe how to use it:

Why does git call me "clever" when I reword the last commit message? -

मैं नियमित रूप से चलाता है git commit --only --amend < / प्री> मैं किए गए नवीनतम प्रतिबद्धता के प्रतिबद्ध संदेश को दोहराया। यह मेरी कामकाजी डायरेक्टरी साफ है या नहीं, इसके बावजूद काम करेगा। आज मैंने देखा कि ऐसा करते समय, मेरे core.editor में दिखाए गए संदेश लिखने के लिए डिफॉल्ट निर्देश शामिल हैं निम्नलिखित टिप्पणी: # चालाक ... गंदी सूचकांक के साथ अंतिम एक में संशोधन। एक ईस्टर अंडे आकर्षण के एक बिट होने के अलावा, यह संदेश मुझे बताने वाला है? क्या यह कहने का एक विडंबना वाला तरीका है कि मुझे चाहिए पिछले कमानों के साथ गड़बड़ करते समय सावधान रहें (विशेष रूप से अगर कोई अवस्था / अस्थिर परिवर्तन मौजूद हैं)? और यह काम क्यों करता है भले ही मेरी कार्यशील निर्देशिका साफ है? मुझे लगता है कि यह मूल प्रतिबद्ध संदेश हो सकता है: git-commit --मेंडः दो फ़िक्स किसी भी सामग्री परिवर्तन के बिना प्रतिबद्ध लॉग संदेश को ठीक करने के लिए "git commit --mend" चलते समय, हमने गिट-स्टेटस आउटपुट को गलती से दिखाया है जो कि "कमिट करने के लिए" यदि आपने पहले से ही अप

Is there any benefit to storing user information in AspNetUserClaims with Asp.Net Identity 2? -

I'd like to store some additional user information, what I think the following is a general option: < Code> Public class ApplicationUser: IdentityUser {public async works & lt; Identity of the claim & gt; GenerateUserIdentityAsync (UserManager & lt; ApplicationUser & gt; manager) Note: The authentication type should be defined in the cookie outption option. AuthenticationType var userIdentity = Wait Manager. // Add custom user claims here, return user identities; } Public string first name {receives; Set; } Public String LastName {get; Set; }} The first name and last name have been added here and they will appear as additional fields in the aspNetUsers table. Although it seems that there is now an option to store such information in the aspNetUserClaims table with ASP.Net identification. Can someone explain to me that going forward is such information that can be stored in españenSquime? If so, then someone has an example of this At the end o

c++ - Buggy call to WSACleanup() kills WSAStartup() -

I have an application that is running TCP server to start TCP I WSAStartup () run Then I have to load the third party DLL. DLL also does some TCP jobs and there is some bug in it - it runs WSAStartup () without running WSACleanup () . This bug breaks down my TCP server because DLL's WSACleanup () kills it. I can not decide dll. How to avoid this situation use the DLL and my TCP server in various threads. That you can see in, calculating the internal reference, WSAStartup / WSACleanup . So you only have to call WSAStartup twice. In this way, when your library calls WSACleanup , it will reduce only one internal counting and not release all the resources.

objective c - How to develop/create a GUI for a QuickLook plugin? -

I saw a lot of QuickLook plugins (like) coming up with their nice and clean interface ... I try to design a GUI One of my own using HTML and JQ, but I do not think it's a good solution (and above it, Xcode 5.1 allows you to include or open files from other directories with & lt I open my mind, Jale Vandeb I would never give thanks to A, but unfortunately there is nothing on the internet about this topic (I think there may be something) So, I was thinking that none of you : The option knows the title of one - a guide which can explain / develop a GUI for a quick look plugin in a "directional" way (like text book, step -ar-step); Option B - Answer I can type in some code lines to insert a button and text field with the usual "H" and Ello World! ". I have a sub-question related to the main one: whether semi-transparent white / It is possible to have a gray background color which is a quick lock window (such as when you select an audio file f

ios - Why does Xcode skip for loop code? -

is simply to ask is whether this method initWithNibName end, it logInIDArray < / code> and passwordArray assets have become zero? - initWithNibName (ID): (NSString *) nibNameOrNil Bundle: (NSBundle *) nibBundleOrNil gives {// shared lag Indetabes Akltn self = [super initWithNibName: nibNameOrNil Bundle: nibBundleOrNil]; If (self) {BNRLogInDataBase * logInDatabase = [BNRLogInDataBase shared log database]; logInDatabase.logInIDArray = [[NSMutableArray alloc] init]; logInDatabase.passwordArray = [[NSMutableArray alloc] init]; } Healthy return; } Here Akltn method + (instancetype) shared log Indetabes {static BNRLogInDataBase * database = null; If (! Zero) {database = [[BNRLogInDataBase alloc] initPrivate]; } Return database; } - (instancetype) init {@throw [NSException exception Sathanam: @ "singleton" because: Do @ "using shared log Indetabes" userInfo: nil]; } - (instancetype) initPrivate {self = [super init]; Self return; } should be yo

gsm - Getting an error while trying to send SS command using USAT application -

text after "itemprop =" text "> I'm trying to perform a USIM call forwarding (say aka redirection) Send active command SS (ts 31.111 sections Using: 6.4.11, 8.14, etc.). Unfortunately I'm getting an error from the network I can not understand I'm trying the following sequence: ME-> USIM: 8012000018 (FETCH 12 (process byte) USIM-> UICC towards MEIM MEIM- & gt; D01681030411008202818305000909FFAA120A25556777B49000D0 (active order) 16 (length) 81 (Order Details) 03 (length) 04 ( Order Number 11 (Send SS) 00 (RFU) 82 (Device Identification) 02 (Length) 81 (UICC) 83 (Network) 05 (Alpha Identifier) ​​00 (Length) 90 9 FFA1 20A 25556777 B4 (SS string = ** 21 * 0525576774 #) 9000 (OK) ME- & Gt; USIM: 801400000D (Terminal Rejection of Size 0x0 D) USIM- & gt; ME: 14 (process byte) ME- & gt; USIM: 81030411000202828103023424 81 (Command) 03 (Length) 04 (Command Number) 11 (Send SMS) 00 (RFU) 02 (Device Identification) 02 (Length) 82 (m) 81

c# - Decompilation Issues -

I am new here, so please be more patient :) Functions: I have unconnected mouse To use it to click and touch, the old app has used .NET Reflector 8 for the decompilation process. After opening the solution in VS 2013 and after trying to debug the application, I made the following error Has been settled: "Error 1 unassigned local variable ' Use 'Form 1cc' Here is the code: 1 Error: foreach (software.dsBDD.list_table21 line in data.Table.Rows) { PictureBox Box; Memory Stream Stream; Panel Panel; Label Label; bool; Pass it; if (this.pass.HasValue & this.end) {Pass = this.pass;} If ((*** Pass ***. GetValueOrDefault () & amp; amp; & amp; amp; amp; amp; amp; & amp; amp; amp; amp; amp; amp; amp; amp; amp; Pass; row.view_only)} Other Error: Panel Panel = Sender In the form of a panel; if (panel control. Calculation & gt; 0) {pass bool; if (this.pass.HasValue & amp; This.end) {pass = this.pass; } If ((*** Pass *** GetValueOrDefault ()

c# - send GZIP stream over WCF -

Below is my code. I have set the content-encoding header and then use gzip encoding by typing the file stream into the memory stream. Then finally return the memory stream. However, Android, iOS, and Web browser receive corrupt copies of all streams. None of them are able to read completely through the disintegrated stream on the other side. What important part am I missing? Public Stream GetFileStream (string path, string basepath) {FileInfo fi = new FileInfo (basepath + path); //WebOperationContext.Current.OutgoingResponse.ContentType = "App / X-gzip"; WebOperationContext.Current.OutgoingResponse.Headers.Add ("content-encoding", "gzip"); Memorystream ms = new memorystream (); Gzipstream compressstream = new gzipstream (ms, compression mod. Compress); // Receive stream of source file FileStream inFile = fi.OpenRead (); // Hide and compress compressed files already compressed If ((File.GetAttributes (fi.FullName) and FileAttributes.Hidden)! = Pr

r - Unprecise p-values in Stargazer -

I want the same sitar for importance in regression output in stargazer as "normal output". I produce data Library ("Sturgers"); Library ("lmtest"); Library ("sandwich") set.seed (1234) df & lt; - data.frame (y = 1001: 1100) df $ x & lt; - c (1: 70, -100: -71) + rnorm (100, 0, 74.8) model and lieutenant; - LM (log (y) ~ x, data = df) Get some model estimates where the coefficient at x is P-value of 0.1023 <> Coeftest (model, vcov = vcovHC (model, type = "HC3")) Based on the same function I want to make these results in latex, I have standard projections corresponding to heterosacicistic stability I calculate and use Sturgers to do them. stderr_HC3_model & lt; - Stringer is a star on the coefficient of output, which means alpha - (sqrt) = 10%. I want sturgers to be treated as co-feet. (Due to comparisons with Stata, where LD LE X, VCA (HC3) gives absolutely accurate results.) I have a stargazer opti

java - How do you Specify a target directory for a txt file to be passed in -

Enter the code here I'm trying to specify a directory for a txt.file That which is being made when the jar file is played, is there any way to specify in the console as an argument where I want to make that TXT file: The main Argument is: public static zero main (string [] args) {// TODO automatically generated method Stub C: \ Users \ 802591720 \ document \ mystuff \ Programs \ JavaCode \ xmlSchema \ ManageBillingCreditAndDebit.20130219.xsd // string filename = "ManageBillingCreditAndDebit.20130219.xsd"; // string source = "c: \ user \ 607817544 \ as1 \"; String path 1 = args [0]; String filename = args [1]; TagDef tag def; String [] operation; {Operation = listOperationsUnique ("C: \\ User \\ 607817544 \\ as1 \\ ManageBillingCreditAndDebit.20130219.wsdl"); System.out.println ("Operation:" + operations.length); For (Int i = 0; I & lt; Operation. Lamper; I ++) {System.out.println ("Operation:" + Operation [i]); }} Hol

laravel - Mcrypt PHP extension installation doesn't work -

I am trying to install the larval through the composer () and I got trapped at that point where he Extension is required requires a Mcrypt PHP extension I installed the script using the brou but still it throws the same requirement error I have also suggested that try to change the path, but my php / usr / bin / Php is not showing anything other than ~ / .bash_profile is incorrect in assigning path? Why "which php" output is still the same and why the mcrypt installation is not working on the laravel workout? Which command did you use to install mcrypt? It is possible that you try to install the mcrypt extension for the wrong PHP version. Try debugging status php -v and ls -al / usr / bin / php There is a separate installation recipe for PHP version 5.5 and 5.4. Install Fluffy php54-mcrypt brew install php55-mcrypt

Django view variables based on url -

I am starting with a dragon, so bear with me We say that My model is: class event (model.model): name = model.carfild (max_length = 100, verbose_name = _ ('name')) location = model.carfield (max_length = 200 , verbose_name = _ ('location')) start_time = models.DateTimeField (verbose_name = _ ('start time')) end_time = models.DateTimeField (verbose_name = _ ('end time')) sales_start = models.DateField (verbose_name = _ ('Start sale')) sales_end = models.DateField (verbose_name = _ ('sale end')) event_active = models.BooleanField (verbose_name = _ (' Event active ')) Price = models.IntegerField (verbose_name = _ (' price ')) max = models.IntegerField (verbose_name = _ (' max ')) = information model =. Kharefild (max_length = 500, verbose_name = _ ('information')) Logo = model. ImageField (verbos_name = _ ('logo'), empty = true, upload_to = 'img /% y /% m /% d') What I would like to

python - Codecademy Student Becomes the Teacher -

I have problems with a lesson in codecady, can someone help me? "Loyd", "Homework": [90.0, 97.0, 75.0, 92.0], "Quiz": [88.0, 40.0, 94.0] "Exam": lloyd = {"name" [89.0, 83.0, 91.0], "Test": [89.0, 90.0]} Alice = {"Alice", "Homework": [100.0, 92.0, 98.0, 100.0], "Quiz" 97.0]} Tyler = {"Name": "Tyler", "Homework": [0.0, 87.0, 75.0, 22.0], "Quiz": [0.0, 75.0, 78.0], "Test": [100.0, 100.0] Def Average (number): Total = 0 total = sum (number) result = float (total) / lane (number) Return results DEF get_Average (student): homework = 0.1 * average (student ["homework"]] quiz = 0.3 * Average (student ["quiz"]) Returning homework + quizzes + exams student = [Lloyd, Alice, Tyler] students = [Lloyd, Alice, Tyler] def get_class_average (students): results = [] in students For each: results.append (get_average) return average (results

java - exact copy of a string to array string! DPLL algorithm -

I think the solution is very close but I can not find it. I am implementing one type of DPLL algorithm in two ways. The first one that takes input from a file automatically and wants to manually input the other (the same) from the console. The second works well, but first of all there are some problems both of my input are in this form: [-8,6,1] [4, 10, -1] [7, -5,3] [10, -8, 3] [10, -8, -6] [5, -3,6] This class needs to manage the acquisition of files. package ausiliare; Import java.io.file; Import java.io.IOException; Import org.apache.commons.io *; // import org.apache.commons.lang3.StringUtils; Public class Letuura {public static entity (iiException throws) {string content = null; File folder = new file ("C: \\ Solution.txt"); Content = FileUtils.readFileToString (folder) + "\ n"; Int = out of integer Parasent (content.substring (0, content.indexOf ("[")). Trim ()); Returning out; } Public static string getString () throws IOException {String co

java - How to check if the computer is connected to the internet? -

I have seen that this question was asked earlier in the SO. There are some threads: . All these threads are very old. The methods that are defined are: openConnection () by a HTTPRPL connection . Open InetAddress.isReachable . Implementing the ping command through the process and processing the output. I have noticed that if I use the second approach to check connectivity with www.google.com then it is returning incorrectly, The result of which should not be. But the first method works, I can not use it in the final way because the defendant himself said it. I have also seen the following methods: is related to the private boolean (socket socket, string address) {if (socket == empty) {new null pointer exception (" Socket can not be empty "); } {InetSocketAddress inetSocketAddress = try New InetSocketAddress (address, 80); socket.connect (inetSocketAddress); Back true; } Catch (Iron cause) {LOGGER.error (cause.getMessage (), Reason); retur

c# - I can't apply auto increment for mysql -

"Fn_Registration VALUES में सम्मिलित करें ('+ + txtFirstName.Text +' ','" + txtLastName.Text + "," + "'" + + txtEmailId.Text + "'," + "'+ + + txtPassword.Text +"', '+' '+ + txtPanNumber.Text + "', '+' '+ + txtAddress1 टेक्स्ट + "'," + "' + + txtAddress2.Text +" ',' + '' + + txtFaxNo.Text + "',' +" '+ + txtFirmName.Text + "', '+"' + + + TxtPhoneNumber.Text + "'," + "' + + txtTinNumber.Text +" ',' "+ txtAccountsStart.Text +" ',' "+ txtAccountsEnd.Text +" ',' "+ cbbVat.Text +" ', "+" '' + सीबीबीस्टेट। टेक्स्ट + "', + +' '+ + टीटीटीटीटीटीटीईटी + +' ',' '+ + टीएसटीबीकैंक। टेक्स्ट +"', '+ + टीटीएक्सएकाउंट नंबर। टेक्स्ट + "', '+

java - Access arraylist which way is better -

As I have 4 ways to access an arraylist. 1) Java 5 Forward Loop 2) Looping array list for loop and shape () method. 3) Errating Arrielast using the operator. 4) array list using list arriter in Java. My question is ... is everyone the same? everyone is fine? any difference? (Especially for Iterator I ask for it) 1) If you want to track the index If there is no need / item status, you will not delete items in the middle of the walk. This strategy explicitly removes the burden of getting the next item to process. 2) When you want to track the index / status of the object that you process, you can still modify the list, but you can get to process the item yourself. . 3) It is better if you want to remove items from the list, 4) If you need to forward the list and go to the backward place, replace items etc. Will be allowed. Each of them has their own use cases.

java.sql.SQLException: Exhausted Resultset error -

मुझे इस अपवाद java.sql.SQLException: थका हुआ परिणाम वाला में समस्या का सामना करना पड़ रहा है कोड। मुझे यकीन है कि मेरी क्वेरी केवल एक मान देता है यहां तक ​​कि अगर मैं rsnext (); का उपयोग नहीं करता हूं तो यह त्रुटि java.sql.SQLException: ResultSet.next को नहीं बुलाया गया था । क्या आप कृपया मदद कर सकते हैं? एफवाईआई, मैं एक अन्य परिणाम का उपयोग मुख्य में सेट कर रहा हूं जहां दूसरे वर्ग से यह menthod कहा जाता है। यह प्रभावित करेगा? धन्यवाद सार्वजनिक स्टेटिक स्ट्रिंग getdispname (कनेक्शन conn, String resname) SQLException, अपवाद {// स्ट्रिंग resname = ""; स्ट्रिंग रिटर्न वैल्यू = ""; स्ट्रिंग क्वेरीस्ट्रिंग = ""; // resid querystring से displayname का चयन करने के लिए क्वेरी + = "अलग display_name चुनें"; क्विकस्ट्रिंग + = "से cust_rally_team_member"; Querystring + = "जहां display_name '%" + resid + "%'" जैसे; // चुनें कथन स्टेटमेंट स्टेटमेंट stmt = conn.createStatement (); Try {// Execute statement R

How can I display a warning information "missed call" in notification bar when I hang up a call programmatically in android? -

Image
Now I can call a call program in android using the document Generally , A warning notice "missed call ..." and when a call misses a system icon will be displayed in the notification bar. But alert information "missed call ..." and a system icon will not be displayed when I kill killCall (reference reference) killCall (reference reference) ? And more, I hope that after using the records of Miss Call, how can I do this to display alert information and programmatically display system icons? When I click on the system icon can be displayed Add this code only after the call is canceled: Notification Manager nManager = (NotificationManager) getSystemService (context.NOTIFICATION_SERVICE); Intention = Intentional Intent (this, TheClassYouWantToOpenOnNotificationClick.class); Pending print-pIntent = pending content. Gate activity (this, 0, intent, pending provider. FLAG_UPDATE_CURRENT); Notification Notification = New Notification. Builder (idleServic

animation - Animate android Gridview Items -

Image
मैं सजीव करना चाहता हूं एक ग्रिडव्यू के आइटम, इस तरह से कि प्रत्येक आइटम को केंद्र के केंद्र में केंद्रित किया जाता है और एक आइटम दिखाई देता है, और फिर ग्रिड आइटम उसकी मूल स्थिति में वापस आ जाते हैं मैंने स्पष्टता के लिए चित्र जोड़ दिए हैं I एनीमेशन का प्रवाह अंजीर 1- अंजीर 2- अंजीर 3 - अंजीर 4 - अंजीर 1. यह कैसे किया जा सकता है? मैंने इस तरह से इस समस्या का समाधान किया: ए ग्रिडव्यू के कुल चौड़ाई (डब्लू) और ऊंचाई (एच) खोजें। डब्लू = (चौड़ाई ओफ़ईआईटीआईएम * कुल आईटैम) + (स्पेसिंग बैटिविंगइटीम्स * (कुल आईटीएम -1)) एच = (ऊंचाईओफ़ीआईटीम * कुल आईटम) + (spacingBetweenItems * (totalItem-1)) बी। ग्रिडव्यू के केंद्र (सीएक्स, सीआई) का पता लगाएं; सीएक्स = चौड़ाई / 2, साइ = ऊंचाई / 2 एक्स समीकरण (सीएक्स) प्रत्येक आइटम के लिए एक पंक्ति में बदल जाएगा Y समीकरण (Cy) प्रत्येक आइटम के लिए एक स्तंभ में बदल जाएगा। सी। स्थिति (0,0) पर ग्रिड आईटीएम के लिए मैट्रिक्स। अनुवाद के लिए प्रतिशत का पता लगाएं x% = (सीएक्स / डब्ल्यू) * 100, y% = (साइ / डब्ल्यू) * 100 मैट्रिक्स

activeadmin - how does devise works with multiple models? -

My project uses planning for the active admin as well as the user admin I have an independent plan for both the user and the active admin I want to implement the behavior. Please suggest suitable answer. Thanks in advance. As you have planned for more than one resource, you can identify it again by processing Can redirect to different locations like def after_sign_in_path_for (resource) case processing when user then {redirect_path} when admin then {redirect_path} end up

javascript - Update the layout on change in the height of a div -

I have a page where several divisions are arranged one by one and they are under a masonry effect. Masonry is doing good work but only one problem is that divs have a place to make a comment and whenever we increase the height of a commented div, but masary dosent divs rearranges. reloading via div ajax & lt; Script & gt; $ (Document) .ready (function () {var $ container = $ ('# REATINIDEpoASttt78'); $ container.images loaded (function () ($ container.masonry ({item selector: '.realFLOAtingPOSTSA', column width: This is for masonry and now div to reload < Code> function formsmubitionbyajax (obj) {var id = $ (obj) .attr ("id"); current form = $ (obje); $ ('# COMMlo' + id) .show (); $ .ajax ( {Type: 'post', url: 'home_formhandler1.php', data: current format. Serialize (), success: function () {$ ("# mainDIV" + id) .load ('home.php # main id' Id);}}); false statement My html looks like

java - How to improve the algorithm sum? -

सोर्स कोड पर विचार करें: सार्वजनिक वर्ग subSetSumR {// Solution का उपयोग करते हुए सबसेट राशि recursion // फ्यून्तेस, 9 फ़रवरी, 200 9 द्वारा प्रोग्रामेट किया गया। सबसेट राशि में मेरे एससेट का एक सबसेट ढूंढना होता है जिनके तत्व लक्ष्य तक जोड़ते हैं / यह एक अच्छी तरह से ज्ञात एनपी-पूर्ण समस्या है, सार्वजनिक स्थैतिक बूलियन सबसेटसेटर (Int [] mySet, Int n, int लक्ष्य) {if (लक्ष्य == 0) सत्य वापस; अगर ((लक्ष्य और लेफ्टिनेंट; 0) | (n & gt; = mySet.length)) गलत लौटा; यदि (सबसेटसेटिक (मेरीसेट, एन + 1, लक्ष्य - मेरीसेट [एन])) {System.out.print (mySet [n] + ""); वापस सच; } अगर (सबसेटसेटक्रूर (माइसेट, एन + 1, लक्ष्य)) सत्य रिटर्न; विवरण झूठा है; }} महत्वपूर्ण तथ्य: इनपुट की संख्या 1 से अधिक है। मैं ऊपर दिए गए समाधान को गति देने के लिए इस तथ्य का उपयोग कैसे करूं? < Div class = "post-text" itemprop = "text"> आप बार-बार गणनाओं से बचने के लिए उपयोग कर सकते हैं। आप चीजों को बेहतर बनाने के लिए उपयोग कर सकते हैं (एक खाली हैश सेट के साथ शुरू करें और

javascript - Problems formatting dates with Dygraphs -

Image
I am planning data from CSV files with Graph. Date are unix timestamps I am currently parsing and formatted dates like this. ... axes: {x: {valueFormatter: Dygraph.dateString_, ticker: Dygraph.dateTicker}} ... Here's a typical CSV The first lines of the file are: X, ATLAS.HLTSV.AvailableCores. DF.HLTSV.Events 1392052678784,0.0 1392052703784,0.0 1392052708784,30.0 1392052713784,845.0 1392052718784,1313.0 1392052723784,1313.0 1392052728784,1431.0 ... This is my pursuit results: provided went dates are correct, but I Has 2 problems The dates of the second description are first too long, and obviously it is sure to break the graph layout. I would like to change it to zoom level, as in this example: How to fix it? I originally scenario you describe is not found side clients how to create date format, a solution well seems to work that dated to the server-side format first time with the timetable instead of feeding directly Daygraf, the "Y

php - How to get the form elements in zend which contains the objct inside -

ऑब्जेक्ट जिसमें zend में फ़ॉर्म डेटा प्राप्त करते हैं। अगर मैं $ Form- & gt; getElements () मुझे निम्न आउटपुट मिलता है: array (38) {["0_0_1"] = & gt; ऑब्जेक्ट (फील्ड्स_फॉर्म_एलेमेंट_ProfileType) # 1153 (36) {["सहायक"] = & gt; स्ट्रिंग (10) "फ़ॉर्म चयन"}} अब मैं ["सहायक"] मूल्य कैसे प्राप्त कर सकता हूं? धन्यवाद अग्रिम। आप यह कोशिश कर सकते हैं: foreach ($ form - & gt; getElements () $ तत्व के रूप में) {var_dump ($ element- & gt; सहायक); }

Some cocos2d-x libraries not being found by the android compilier -

I have included coco-ext.h in one of my header files and added extension namespace. However, when I go to the terminal and try to compile for Android, Visual Studio does not have any problems with the code, however, it searches successfully and says that the file can not be included in the file. Do I need to keep a file somewhere? Or add it to Android.mk? I'm running cocos2d-x 3.0r2 with code in C ++ Thank you. If someone else has to face this problem, check this page: Its meat is to include the header at the top of your file: #include "extensions / cocos-ext.h" Then Android in the jni folder. Add extension to the MIC file: LOCAL_WHOLE_STATIC_LIBRARIES: = cocos2dx_static LOCAL_WHOLE_STATIC_LIBRARIES + = cocosdenshion_static LOCAL_WHOLE_STATIC_LIBRARIES + = box2d_static LOCAL_WHOLE_STATIC_LIBRARIES + = cocos_extension_static // Add to $ (BUILD_SHARED_LIBRARY) $ (Import-module, 2D call ) $ (Call Import-Module, Audio / Android) $ (Call Import-Module,

firefox - Google Event Tracking Not Working in Safari inside jQuery -

For some reasons the code below will be fine in Chrome, but not in Safari or Firefox. Google Analytics code loads in the footer of the site This site is running on jQuery Mobile I'm not sure this is a real-time reporting report in Analytics where it will work only for Chrome, or all will not work together . I also did the console.log inside the if statement and removed it properly in safari, so I know that is happening at that point. The tabbed menu $ (document) .on ('click', 'single-footer-menu a', (('Send', 'Event', ' Tab, 'tab', label below), function () {var label = $ (this) .text (); if (type off label! == 'undefined');}}); We are on Google Analytics Universal to clarify further. I used it as a reference. As one more update, I used the tracking code and the event with Google Analytics Classic Has changed, and this is in Firefox / Safari It works better than a Google Analytics Universal problem. Problem Solving:

jquery - RequireJS loading ansynchronously... how to guarantee ondomready event? -

Well wait what if the script is large and in fact the events loaded in the browser Do not load till after? Waiting for a homlogged event will wait forever or am I feeling anything wrong? I'm actually using jquery for an orthmid event instead of my module. Do I need to worry about a slow connection? Both the domReady plugin and JQuery will be detected that the page is already loaded Has been done (i.e. if DOMContentLoaded event has already been ). In this case, they will immediately execute their callback. I have used them and sometimes there was no case where my code was always waiting for so you do not have to worry that a slow connection will cause them to wait forever. If you think that you is a case where they will wait forever, please provide the details to reproduce it.

c# - how to unit test a delete method using JustMock lite and MSTest? -

I am just starting with unit testing and are now stuck in writing a test method for deletion. I'm using MStest and JuckMock follow my test method to use real store and do not use JustMock to duplicate one, but in code, I'm getting value for updated customer And the test method has failed. Hope someone can tell me the right direction. [TestMethod] Public invalid ShouldDeleteCustomerWithIdParam () {var repo = Mock.Create & lt; ICustomerRepository & gt; (); Var Customer Service = New Customer Service (Repo); Var customer = mock.com & lt; Customers & gt; (); CustomerService.Delete (customer.Id); Var updatedCustomer = _customerService.Get (customer.Id); Confirm. IsNull (Updated customer, "Customer has not been removed"); } a short answer and a long time :) As told by @Lilisseste, you are working with two different repository objects, your customer object is removed from one of them and then tries to get it from the second place, possibly at t