Posts

Showing posts from June, 2010

javascript - unable to remove canvas and change src by their id : fabric js -

I want to remove canvas from my ID, I tried to specify the ID, calling the method of deletion But it does not work: JS code var canvas = new fabric.Canvas ('c'); Function getObjectById (id) {canvas.forEachObject (function) (if (o.id === id) {return o;}}}; return tap;} var img = "http://edudemic.com/wp -content / uploads / 2012/09 / jail_photo.jpg "; Fabric.Image.fromURL (img, function (source) {img = source.set ({left: 0, top: 0, angle: 0, id: 'Hollat '};); Canvas.ed (IMG); canvas.reader all ();}); Document.getElementById (' download '). Onclick = function () {warning (' is '); var removeit = getObjectById (' move '); Canvas.remove (removeit);}; Document.getElementById (' changeimage '). Onclick = function () {Warning (' is'); GetObjectById ('moveit') src = "http: // www. Meandmylaptop.com/uploads/5/8/1/2/5812329/7801574.png "; canvas.renderAll ();}; Document.getElementById ('changeimage...

Problems w/ Structures 'C' -

I need to write a program for the following .. I have tried, but I do not know where I'm going To define the money in dollars, quarters and dimes, define the structure with the dollar quarterfimes with three simple variables, int dollars, int quarters and int dimes. Add two dollars quarter dimes and submit the result to the third dollar quartersdams money. Remember to make the necessary conversion to the dollar from the dimes and quarters Note: 10 dimes = 1 dollar and 4 quarters = 1 dollar #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; Typedef Structure {int dollar; Int Quarter; Int Dimes; } DollarsQuartersDimes; Zero Main () {dollarsQuartersDimes Input 1, Input 2, Total; Printf ("Please put money into dollars: quarter: dimes!"); Scanf ("% d% d% d", & amp; input 1 dollars, & amp; input1.quarters, & amp; input1.dimes); Printf ("Order again in Order Dollar: Quarter: Dimes!"); Scanf ("% d% d% d...

java - BCEL code example to put "new Class[]{String.class}" on the stack -

How do I create an array of size 1 with examples of java.lang.Class and looking for example BCEL code In other words, start its only element with reference to java.lang.String.class , I want to insert the "new class [] {String.class}" on the stack to write the BCEL code Looking for a sample. Thank you. Assuming that you want to create a class file version 49 (Java 5) or more, the necessary instruction The sequence is: java / lang / class java.lang .tring.class Now the only question is how should it be generated in BCEEL what I saw, according to which, the generator code can look like this: il.append (InstructionConstants.ICONST_1); Il.append (factory.createNewArray (Type.getType (class class), 1)); Il.append (InstructionConstants.DUP); Il.append (InstructionConstants.ICONST_0); IL.Append (new LDC (continuously Paul Jane.AddClass (type.tatotype (string class))); Il.append (InstructionConstants.AASTORE); However I have not tested it.

javascript - Mongodb dot field update -

मेरे पास Mongo में निम्नलिखित स्कीमा है: var OrderSchema = new schema ({postcode : स्ट्रिंग, ... स्थिति: {last_check: {type: date}, तिथि: दिनांक, कोड: स्ट्रिंग, पोस्टम: स्ट्रिंग, टेक्स्ट: स्ट्रिंग, वर्ग: स्ट्रिंग},}); मेरे पास डेटा सहेजने के लिए फ़ंक्शन है (पुराना तरीका टिप्पणी है): फ़ंक्शन save_order (डेटा) {// var क्रम = नया ऑर्डर ( जानकारी); // var उतारडेटा = ऑर्डर। टू ऑब्जेक्ट (); // अपस्टर्टडेटा._id; // order.findOneAndUpdate ({postcode: order.postcode}, upsertData, {upert: true}, फ़ंक्शन (गलती) {ऑर्डर .update ({postcode: data.postcode}, {$ set: data}, फ़ंक्शन (गलती) {If (err)) console.log ('err');})}} फ़ंक्शन में दिए गए डेटा का उदाहरण: {postcode: 'बीवी 123456789 बीवाई', स्थिति: {अंतिम चेक: 1413539153572, कोड: '06', पदनाम: '247431', दिनांक: गुरु Oct 16 2014 09:52:00 GMT + 0300 (विस्टोइयेन युरोको (एलेटो)), पाठ: '06 Status.class सेट करने के लिए फ़ंक्शन ठीक काम करता है - यह स्थिति अधिलेखित नहीं करता है: फ़ंक्शन सेटबॉऑर्डर आई...

java - android RadioButton text is not updated when RadioButton is selected in RadioGroup, and Fragment is recreated from backstack -

I have a radiogram where I programmatically add the radioboots. All this is done in the onCreateView () method, so each time the piece should be rebuilt from backstack. The problem I have is when I program RadioGroup.check (ID) , RadioButton is no longer in the form of updates about the upcoming call onCreateView () using the method By initially in the radiobutton preselect This code is: public fixed string x; // (X changes every time) @Override Public View onCreateView (LayoutInflater inflater, ViewGroup container, savedInstanceState bundle) {see rootView = nflater.inflate (R.layout.right, container, false); Radio group RG = (radio group) Routview.findvbiid (RID.Ready Group 1); Rg.removeAllViews (); Log.d ("Cild count", Integer.toString (rg.getChildCount ()); // always works with RadioButton.rb = New RadioButton (getActivity ()); // always works first time with 1 and 2 Rb.setText (x); rb.setId (99099); // for the id rg.addView (RB); 1 atbitrary integer; rg.chec...

sql - Use interval to add on timestamp value from other table, in Oracle -

I'm actually starting SQL and I'm working on the Oracle engine. Timestamp Column - To add to integer value, I have a problem in manipulating arithmetic using the interval, which is present in another table and changes it in minutes. I used the data generator to test my schema. As a result, some of the produced data is not reliable and I need to check overlapping between two appointments, when the same patient invited to overlap two therapies. treatments_appointments (APP_ID number (38) is not NULL, [FK] care_id number (38) is not NULL, [FK] doctor_id number (38) not NULL: I've included treatments_appointments table that features , [FK] room_id number (38) is not NULL, [FK] branch_id number (38) is not NULL, [FK] patient_id number (38) is not NULL, appointment_time timestamp not NULL) the code I wrote below and get an error message: treatment_appointment APP1 select join insider app1.app_id treatment_appointment APP2 on app1.patient_id = app2.patient_id where ap...

inheritance - Different behaviour of method overloading in C# -

I was going through #Brainteasers () and came across a question: What should be the output of this code? Class Base {Public Virtual Zero Foo (int x) {Console.WriteLine ("Base.Foo (int)"); }} Category derived: base {public override zero foo (int x) {Console.WriteLine ("derived.Foo (int)"); } Public Zero Foo (Object O) {Console.WriteLine ("Derived.Foo (Object)"); }} Class Test {Static Wide Men ()} {Delivered D = New Deferred (); Int i = 10; D.Foo (i); // It prints ("derived .foo (object)"}} But if I change the code for class {public Zero} int x) {Console.WriteLine ("Derived.Foo (int)"}}} Public Zero Foo (Object O) {Console.WriteLine ("Derived.Foo (object)")}}} Class Program {static void Main (string [] args) {derived d = new derived (); Int i = 10; D.Foo (i); // has been printed. Fu (int) "; console; redkey ();}} Why do I want to know why the output is changing when we do not make inherent, in these two case...

What situations is MongoDB perfect for? -

The scenario looks like an original auto-completion for a search bar and Mongo both autocomplete and search results. In the past, I will use spinal cord for auto complete and the list of search results will be from Linq-sql I am looking for speed and Mongo seems prominent here, although Mongo DB Near allocate more opposition than pro support At this point R: Is there any situation where MongoDB looks like it was created to solve this problem? Is sacrificing the features of motion? (How fast?) And cost? (HOSTING) Mangaodbi is very good, I think the sick picture of a no-sql at NDM is to see a good scenario I will try to mention strong and weak documents (in case of SQL case), any collection (schema) can be in a collection (table In). Weak Not so you can manipulate data from different collections in one request. Not but manipulative atom with a single document. Size of a document ( not in GridFS)

.net - How to load data in Handsontable using Ajax JQuery? -

I am using the code below to load data from asp.net using jquery and ajax. But when this handset loads the load with only the array loaded with array data. I have tried different ways with no luck. Please help me load data from server. function showGetResult () {$ .ajax ({type: "POST", url: "Input.aspx / LoadTable", contentType: "app / json; charset = utf-8" Data type: "json", success: function (res) {alert (res); $ ("# exampleGrid"). (Handheld data: res, rowHeaders: false, stretch H: all ', minspirio: 0, context Menu: True});}, Error: Function (Excerpt, Status) {Warning ("An error occurred:" + Status);}}); } & Lt; WebMethod () & gt; & Lt; ScriptMethod () & gt; _ Public Shared Function LoadTable () as String Dims dsCosts New DataSet as dsCosts = DataAccess.LoadTables Slim serializer (New) JavaScriptSerializer () New DataTable () 'As Dim DT' .... Forms of Data Get Data Data in String = GetJs...

php - Amazon ElasticBeanstalk configuration not working -

मैं लोचदार बीनस्टॉक में जीआईटी का उपयोग करके सफलतापूर्वक एक php अनुप्रयोग को तैनात करने में सक्षम हूं, लेकिन कॉन्फ़िगरेशन फाइलें काम नहीं करती हैं। मैंने अपने जड़ अनुप्रयोग फ़ोल्डर पर एक .exextensions फ़ोल्डर बनाया है और एक कमांड फाइल बनाई है: container_commands: 00_make_assets: कमांड: "sudo mkdir / var / app / current / assets" मुझे डैशबोर्ड पर निम्न त्रुटि संदेश मिलता है उदाहरण पर विफल रहता है। वापसी कोड: 1 आउटपुट: [सीएमडी-ऐपडिपोर्ट / ऐपडिपोर्टस्टेज0 / ईबीई एक्सटेंशनपोस्टबिल्ड] कमांड त्रुटि कोड 1 के साथ विफल: बिल्ड के दौरान त्रुटि हुई: कमांड 00_मैके_एसेट विफल। मैं जो करना चाहता हूं, वह एक फ़ोल्डर बना रहा है और इसे 777 की अनुमति देता है। लॉग फ़ाइल में आउटपुट (/ var / log / eb-commandprocessor लॉग) दिखाता है: [2014-10-17T11: 01: 43.487Z] त्रुटि [2341]: कमांड सीएमडी-ऐप नियोजित विफल! [2014-10-17T11: 01: 43.488] कमांड प्रोसेसर लौटने के नतीजे: {"स्थिति": "असफलता", "एपीआई_वर्जन": "1.0", "तुटित": "गलत"...

javascript - BackBoneJs donot Delete/Update Model to the server -

I have an application that makes reading / making / updating models and saving it to server but currently I I can read and save models from more databases. But I'm unable to delete / update servers and servers. Ideas are currently removed from the model, but the model itself is not here JSFiddle path Model Code> var model dialog = backbone.modeell extension ({default: function () {return {id: 0, name: "", address: ""}}}, / / ​​if I add this idAttribute = "Id" It removes the value from the server / but I am unable to create a new model / new entry to the database: function () {// deletes the model but there are no changes or The server has a right-to-use contact with the var contactCollection ();}}}; Archive Extension ({Model: modelContact, url: 'API / Contacts'}); var contact = new contactCollection; ModelView view var contactView = backbone.exe extension ({tagname: "tr", events: {// run fine "click ...

javascript - Efficiently replace all accented characters in a string? -

क्लाइंट साइड पर पास -संकलन-सही सॉर्टिंग के एक गरीब आदमी के कार्यान्वयन के लिए मुझे जावास्क्रिप्ट फ़ंक्शन जो स्ट्रिंग में कुशल एकल वर्ण प्रतिस्थापन करता है। यहां मेरा क्या मतलब है (ध्यान दें कि यह जर्मन पाठ पर लागू होता है, अन्य भाषा अलग तरह से सॉर्ट करता है): मूल रूप से, मुझे किसी दिए गए स्ट्रिंग के "ä" की सभी घटनाओं की आवश्यकता होती है, जिसमें "पूर्व" मूल सॉर्टिंग गलत हो जाती है: abcouz a ö ü collation-correct होगा: a ä bco ö u ü z एक "(और इतने पर) इस प्रकार मूल सॉर्टिंग का नतीजा एक यूजर की उम्मीद के मुकाबले काफी करीब होगा (या फिर एक डाटाबेस किस प्रकार लौट जाएगा)। अन्य भाषाओं में ऐसा करने की सुविधा है:, में,,। लेकिन जावास्क्रिप्ट के बारे में क्या? यहाँ मेरे पास अभी क्या है। // s एक छोटी शॉर्ट स्ट्रिंग होगी (अधिकतम 200/200 वर्णों की तरह, अधिकतम समय के बहुत कम) समारोह makeSortString (ओं) {var अनुवाद: {"ए": "ए", "ओ": "ओ", "यू": "यू", "ए": "ए", "ओ ":"...

ios - Likes and comments in Parse -

Image
I am creating an app where I am following classes during the time of user, items and comments. User: displayName: string Item: Like: Relation Comments: Text: String Items: Pointer What do I need All of which show the collection view, like items and counting (and check whether the current user likes the image or not) with the count of comments. I am thinking that this is the best solution for this, because I have read that what is the best class architecture to create such a scene is? I suggested that with the structure you can go you find the application very simple, just reuse what was parsed, They did it smart Re-use their code implementation and smart solutions Models User - Original user information (name, email, id, etc.) Items - Your item has been displayed in the archive. (Photos, ownership, name, etc.) Activity - (from, type, content) - likes, comments On the other hand, "make different models for comment" and "2 comments"...

html - What should be the minimum width to make footer responsive? -

I am trying to make the footer of my site responsive. I'm using 400 pixels minimum width for the website to increase the height of the footer but it does not work. Please tell me how I can increase the footer height for smaller screens. Here is the code, @ media screen and (minimum-width: 400px;) {# copyright (height: 50px;}} Edit: Here is my code, @ media screen and (max-width: 400px) {# copyright (height: 50px;}} This should be maximum-width so that you can target the screen to 400px width. If you are asking to apply the minimum width is 400px :) #copyright {height: 20px; background: # 000; color: #fff;} @media in hand, only screen and (max-width: 400px) Only screen and (max-device-width: 400px) {# copyright [height: 50px; background: # f00;}} & lt; Div id = "copyright" & gt; Copyright & lt; Div & gt;

mysql - PHP query class not returing values -

I am writing a query class for my php project, but I have a problem that query any value from my db Does not return. PHP Code: & lt ;? Php class database connect {secure $ host = 'localhost'; Protected $ user = 'root'; Protected $ pass = 'root'; Protected $ db = 'test'; Public function __ composition () {$ con = mysqli_connect ($ this-> host, $ this- & gt; user, $ this-> pass, $ this- & gt; db) or die ('from db Can not be connected); Return $ Conn.; }} Class ExecuteQuery {public $ connection; Public $ results; Public function __construct () {$ this- & gt; Connection = new DatabaseConnect (); } Public function getQueryAction ($ sql) {$ this- & gt; Result = mysqli_query ($ this-> connection, $ sql); } Public Function SetString Action ($ string) {$ file = file_get_contents ('queryFile.json'); $ Json = json_decode ($ file, true); Forex Currency ($ json ['query'] $ this-> as a result) {return $ -...

debugging - How to debug a BIRT report integrated with Spring -

I already have this integrated using Spring and BitT. But now, I want to debug my report using BITT Designer, but this is not possible because the designer is not running in the same VM / Classloader. After some research, I found a possible solution (), to make an RMI for this auction to resume The problem is that the domain DTO BITT designer ( Again !!!) is not visible to Is there a solution to my problem? How can I debug a report of BIRT Designer with Sprint?

android layout - Listview header formatting does not format buttons -

Image
A header with two buttons has been added in a listview. You can see "None" and "All" buttons below the action, then follow the first item of the list. The button must be centrally located and take the position of the equivalent. I have a footer There is a similar solution (snapshot from different list view) where it works, you can see below the list, and then two buttons are distributed horizontally. is the code from the header : & lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/Android" xmlns: tools = "http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = "Wrap_content" Android: divider = "? Android: dividersual" Android: weightSum = "1" Android: Show Divider = "Medium" Android: Orientation = "Horizontal" & gt; & Lt; Button Android "Android: attr / buttonBarButtonStyle" id = "@ ...

javascript - jQuery image preview on change -

I am using the function below to display an image preview after selecting the file. If the file extension eq file type should display it image preview, but it is not. What am I doing wrong? var previewImage = function (input, block) {var fileTypes = ['jpg', 'JPEG', 'PNG']; Var extension = input.files [0] .name.split ('.'). Pop (). ToLowerCase (); / * Before extensia * / var hasiivet = filetap.indexoff (extension) & gt; -1; / * Verification extensia * / if (hashut) {var reader = new FileReader (); Reader.loads = function (e) {block.attr ('src', e.target.result); }; } And {warnings ('accepting this fisheries!'); }}; $ S (document) .on ('change', '#image', function () {previewImage (this, $ s ('. ImagePreview'));}; And here's my input. & lt; Div class = "control-group form-group" & gt; & Lt; Label = "picture" & gt; Imigini & lt; / Label & gt; & Lt; ...

gcc - C tail call optimization for boolean AND -

Does GCC perform tail call optimization on the following function? bool isEqual (node ​​* Head1, node * head 2) {if (head1 == weaken = head 2 == faucet) return head 1 == tap & amp; Head2 == faucet; Return Head 1- & gt; Data == Head 2- & gt; Data & amp; Amp; IsEqual (head1-> Next, head2-> Next); } Yes, at least this is the way I compiled it. RDI, RDI Sete DL Test RSI, RSI Set CL mov eax, ECX or AL, DL jne .L2 MOV: assembly code for that function isEqual (node ​​*, node *) was EDX , DWORD PTR [RSI + 8] CMP DWORD PTR [RDI + 8], EDX JE .L5 Representative retired .L2: mov eax, ECX and eax retired EDX .5: mov RDI, QWORD PTR [RDI] mov RSI, QWORD PTR [RSI] testing RDI, RDI Sette DL test RSI, RSI Sette CL mov eax, ECX or AL, DL jne .L2 mov ECX, DWORD PTR [RSI + 8] CMP DW ORD PTR [RDI + 8], ECX JE L5 representative retired This is the reason that there is clearly a loop, and no nested calls appear. You should verify whether this is your compilation opti...

css - real-time updating screen by media query -

I was hoping that when my screen changes like the screen resizes, my web will change @ media (minimum-width: 1200 px) {container {max-width: 1170px; }} @ Media (minimum-width: 900px) {container {max-width: 870px; }} @ Media (minimum-width: 600px) {. Container {max-width: 570px; }} But it does not work. I reduced the size of the browser, looking closely at the screen size changes with the developer tool. I thought the screen will be updated according to the media queries, when the screen size will reach the break point. This works only once when loading the document. What should I do to do a real time? Should I use some script? The problem is when the browser reaches 1200px, it passes all 3 rules & lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; Untitled document & lt; / Title & gt; & Lt; Style & gt; .container {background-color: black;} @ ...

javascript - Using jQuery's setTimout() Function For Anchor Scrolling -

I am still learning how to use jQuery and I have this script which gives anchors smooth scroll to my page Does. Before I start scrolling, I should wait that there is a menu that needs to be closed. I think I need to use the setTimeout () function, but do not understand it Finding how to implement it correctly in my code. and lieutenant; Script & gt; $ (Document) .ready (function () {$ ('a [href ^ = "#"]'). ('Click', function (e) {e.preventDefault (); var target = this.hash, $ Target = $ (target); $ ('html, body'). Stop (). ({'ScrollTop': $ target.offset (.) Top-2}, 900, 'easeinOutExpo', function () { Window.location.hash = Target;});});}); & Lt; / Script & gt; Animate in timeout: setTimeout (function () {$ ('html, body'). Stop (). Chetan ({'scrollTop': $ target.offset () Top-2, 900, 'Kamiren AutoExpo ', Function () {window.location.hash = target;});}, 1000);

delphi - Color VirtualStringTree rows with hidden nodes -

I am currently using this code in my code's OnBeforeCellPaint event: If node. Index mod 2 = 0 then start TargetCanvas.Brush.Color: = clBlack; TargetCanvas.FillRect (CellRect); End and Start TargetCanvas.Brush.Color: = clPurple; TargetCanvas.FillRect (CellRect); End; To paint my nodes but it does not work with hidden nodes because the index remains the same. Is there a visible index or an easy solution? Thanks in advance. There is no such method to obtain the visibility node index at this time But you can make your own, where you repeat through visual nodes and calculate each iteration. Something like that (how do you apply it to the actual code on you): function GetVisibleIndex (tree: TBVVertualTree; node: Piviular Node): Integer; Var P: P Virtual Node; Start (start the assigned (node), 'node should not be zero!'); Claim (tree. Asi [node], 'node should be visible!'); Results: = 0; P: = Tree. GetfirstSwibel; While assigned (P) and (P & lt; ...

php - How to ignore lines based on specific statement in this function which reads the data from a text file? -

About the function information: Currently it takes the last 20 lines and based on the requested column Displays information from lines on What do I have to do? I want to ignore those rows whose columns consist of 5 and 13. Example: (Both lines should be ignored below, because the first row in column 5 corresponds to column 13 and the second row is the same as before because the first name of column 5 corresponds to the name of column 13). 1, 42.16, 201, Satkovrflo_ugr, 1, 6762160, 39799, 9817242, 6762160, 39884, 10010545, Satkovrflo_ugr, 2, 1351147, 1165, 483259, 1351147, 1115, 241 630, 0 L,46 , 27, 201, [stackoverflow_user | stackoverflow_userother], 1, 4,078,465, 286,991, 1,594,830, 4,078,465, 287,036, 1,643,156, stackoverflow_user, 2, 1,357,147, 1115, 241,630, 1,357,147, 1065, 120,815, 0 So, should additional script Grab the line and ignore the line that can display up to 20 valid lines until the column matches. down my actual work: function DMMRankings () {...

scalability - Time to scale-up workerrole's number of azure instances -

How much time does it take for the application to allocate more examples to the viral when the average CPU is set automatically according to the usage is? In other words, how often does blue detect that the average CPU usage is above the threshold and my worker allocates new examples for the role? I need that the scalling process takes less than 1 minute to meet the requirements, is it possible? Normally the scaling process is 15 minutes or more, the first scaling event has to be determined . And if I do not see the scaling conditions for at least 5-10 minutes then I do not trigger a level event. Then, when I trigger (or system) scale, the time of normal package deployment is necessary (minimum) - and it runs from 5-6 to 15-20 minutes Time Datacenter's current load, package size and startup work Depends on execution. Dynamic scaling response less than 1 minute is not possible in a traditional cloud model (regardless of the seller). The only way to get "1-minute sc...

c# - Stackoverflow exception under IIS: Can I give a better error message? -

We have a service running under IIS that may crash due to a stack overflow. However, it was not clear from the incident incident that happened. All I'm seeing Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2 Faulting module name: clr.dll, version: 4.0.30319.18444, time Stamp: 0x52717f9a and A process serving the application pool 'x' encountered a fatal communication error with the Windows processing activation service. The data field contains the error number. We have the proper idea how to fix stackoverflow (repetition people to switch some of our recursive methods). However, is there some way to log stackoverflow to eventlog? I understand that you can not hold the stackoverflows within the net, but maybe the IIS could handle this. Like if I run the console app with a deliberately engineered stack overflow, then I the process is terminated due to the stack overflow exception. Which is obvious In addition, it doe...

factory - How to assign a back end data value to a string variable in AngularJS? -

I was trying to define a global variable that values ​​2/3 different templates (instructions) Will show in For this, I have used the Coiner factory as follows: app.factory ('MyService', function ($ http) {return {firstNumber: function () {// return selectedNumber = "200 "; Var selectedNumber =" "; var selectNumber = $ http.get (" / count.do "). Success (function (data) {console.log ('first number:', data [0]. Count)}) ; Return selected number;}};}); As you can see 'Selected numbers' it is a normal variable. The problem occurs when I codify the value as "200" and the controller calls the following as follows: // init number $ scope.selectedNumber = MyService.firstNumber (); This entire process is working fine. But as soon as I'm trying to get back the value (which you can see above) {} you can get the object. I did some research on this and understand that my concept on angular object and string manipu...

MS Access excluding specific criteria -

I tried "no", "do not like", and & lt;> and to filter some numbers in MS Access Am I trying to help anyone? You can use & lt;> if you leave only one number, such as Select yourFieldName1, yourFieldName2 from yourTableName where yourNumberField & lt; & Gt; 500; If you want a category of numbers, you can use it, SELECT yourFieldName1, yourFieldName2 from yourTableNameWHERE ((yourNumberField & lt) ;> 1) or (YourNumberField & lt;> 2) or (yourNumberField & lt;> 3) or (yourNumberField & lt;> 4) or (yourNumberField & lt;> 500) ); I will also use, select yourFieldName1, yourTableName from yourFieldName2 where not in yourNumberField (1, 2, 3, 4, 500);

How to escape blade instructions in a blade template? -

I am writing a tutorial on Sass in a blade template and want to include Sass' @ syntax. But the '@included' blade has a reserved command, how can I survive? Sample html in my blade template: & lt; P & gt; Use & lt; Code & gt; @ & Lt; / Code & gt; A SAS & lt; Code & gt; @ Mixin & lt; / Code & gt; ... & lt; / P & gt; Edit: I type in HTML & amp; # 64; , but there is a way to avoid blade instruction, so is still interested. You can try to resolve this situation, in your blade template, @include instead of {{'' '.' Insert}} then your whole thing will appear: & lt; P & gt; Use & lt; Code & gt; {{'@'. 'Include'}} & lt; / Code & gt; A SAS & lt; Code & gt; @ Mixin & lt; / Code & gt; ... & lt; / P & gt;

Why do speechmarks around an array declaration in bash cause it to have zero length? -

I recently found an irregular error in a Bash script. The code failed to divide by zero error. The script was divided by the length of a declared array, and the array was definitely populated by strings. For some reasons, despite the population, the length of the array was zero. An example script re-presenting the problem is given below. #! / Bin / bash aCoolFunction () {declared - a message split = "('a' b '' c ')"; Declared - a message not simple Mark = ('A' 'B' 'C'); "$ {MessageSpeechMarks: $ {# messageSpeechMarks [@}}" Length of echo "message length: $ {# message not speechchmark [@]}"} $ {message split mark [@]} "for item" ACoolFunction Using the GNU Bash 4.3.11 (1) on the Linux Mint, this output returns: Length of ABC message length of speakers: 0 Length MessageNetwork Mark: 3 As you can see, before the declaration of the array, the speech points out and in the right length array C...

assembly - Can someone tell me what the purpose of load immediate is in this MIPS program? -

I am working on the introduction of MIOS tutorial from my university, and we are trying to see the code and each row To understand. I think the load works immediately, that is, it loads the second value / value from the register in the first register. The purpose of this program, which I do not understand, is to remove it, though removing it causes the program to be unsuccessful. This loads for the first time in $ 4 $ v0, then after prompting the user for an item, then from $ v0 to $ zero and $ V0 back to 4 It is stored in $ s0 before returning etc. e.t.c. But I can not see any purpose in doing this. It appears that only $ v0 is used, but they keep changing it to the full value. Secondly, instead of changing from $ v0 to 5, why not write "li $ s0, 5" and then "$ S0, $ zero, $ v0 "by adding the command? Any help appreciated appreciated. syscall is a common interface you specifically tell it Before making a call, what to do by ...

Python - Print horizontally two strings, with | -

I'm having a small formatting problem that I can not solve. I have some long strings, in the form of DNA sequences, I have added each to a separate list, in which each person gets separate letters in each list. They are of uneven length, so I added "N" to the smallest of two. ex: Seek 1 = ['A', 'T', 'G', 'G', 'A', 'C', 'G', 'C 'A'] seq2 = ['A', 'T', 'G', 'G', 'C', 'T', 'G'] became seq2: ['A Currently, the number of letters in each list is comparable to that of the letter, 't', 'g', 'g', 'c', 't', 'g', 'n', 'n'] After getting I: ATGG - G - Where there is a mismatch in '-' characters (included "N"). Ideally what I would like to print: seq1 atggcaa ||||||||||| Seq2 ATGG - G-- I'm playing around with the new line letters at the end of the pri...

.htaccess - 2 domain name (EN/FR) 1 FTP redirection -

I have a problem with my .htaccess file. I have to associate two domain name names. The same FTP server is a domain name in English and the second is in French. For now, If the user types - english-hostname.com -> it links to index.html (classic) If the user type french-hostname.com -> this is linked to the same index.html Here's what I would like to do: If the user type-- hostname.com -> this links to index.html If the user type french-hostname.com -> this should be a link to the index-frame. Html I really do not want "index-fr.htm L "appears in the URL, I have created a subfolder named" FR "and I have put a French index in it. Here is my .htaccess file RewriteCond% RewriteEngine turned on {HTTP_HOST} french-hostname.com $ [nc] RewriteRule ^ (*.) $ Http: / / Www.french-hostanme.com/fr/$1 [L, R = 301] RewriteCond% {HTTP_HOST} english-hostanme.com $ [nc] RewriteRule ^ (*.) $ Http: //www.english-hostname .com / $ 1 [L, R = ...

c# - ASP.NET Identity Provider SignInManager Keeps Returning Failure -

Image
I have an issue with standard ASP identity provider for MVC5. As soon as I log in to the method: / P> Wait for SignInManager. Password Sign InSync (Model Email, Model Password, Model. Remember, Should, Lockout: Wrong); There is a failure coming back so I started debugging, using: UserManager.FindByEmail (model.Email); This gives a valid UserID to try to log in to my user. Then I used it: SignInManager.UserManager.CheckPassword (UserIDObtainedFromFind, model.Password); And it gives the correct, which means that the password I provide is valid .... How to find any ideas about debugging the SignInManager.PasswordSignInAsync method Where can it fail? Close the SignInManager.PasswordSignIn username, you should check that the username is the same as the email You are passing.

swift - How to size CollectionViewCell dynamically using iOS 8 methods -

I'm trying to implement self-size cells on iOS 8 for a collectionView. However, the estimated item's system properties setting is not enough. I have also applied preferred layout attendants fitting properties but the cells should be closed. Do I miss in my ViewController: override function viewDidLayoutSubviews () {super.viewDidLayoutSubviews () on flowLayout = collectionView.collectionViewLayout Where does this value come from UICollectionViewFlowLayout var width = collectionView.frame.width //? It's not supposed to be dynamic anymore ??? FlowLayout.estimatedItemSize = CGSizeMake (width, 100.0); } Cell class: @IBOptlet title title: UILabel! @IBOutlet var See the stars: HCview! @IBOOTletVar starsSubtitle: UILBL! @IBootlet Ward Body Labels: UILBL! @IBOutlet var footer label: UILBL! @IBOutlet var line: UIView! // I thought we do not need to implement any other thing ???? Why are we basically calculating the size for everything // if the auto line is using ??...

javascript - Dynamic variable name of scope -

I tried to define foreach Koniyriyj a dynamic variable names do, such as: Angular.for each ($ scope.posts, function (item) {// counter increment counter ++; var idPage = 'feed' + counter; Feedsewa. Piarafaf (URL). then (function (res) {$ Scope.window [idPage] = Res.data.responseData.feed.entries;});}); So, it does not work and I have this error: can not set property is undefined to feed 1 ' What is the correct syntax? What is the window property in your $ Scope object? If so, go with Maxim's answer. If not, try: Angular. ForEach ($ scope.posts, function (item) {// counter increment counter ++; var idPage = 'feed' + counter; FeedService.parseFeed (url). Then (function (res) {$ scope [Aideepej] = Res.data.responseData.feed.entries;});}); Editing: Performance:

three.js animation: Skeleton/Skinning vs Morph -

Then after experimenting with some morph and skeletal animation (exported from Blender), I see that skeletal files are almost Compared to files of 10 times smaller, it appears that the skeleton is clearly a better option, but I was thinking that it is bad to use. Especially I suspect that it takes a lot of processing to animate the skeleton rather than the outline. When is one better than the other? Will it be a question that Im 100 models vs just one? If the skeleton makes more processing, and I host an online application, will the bandwidth reduction (due to small file size) be eligible for additional processing, which will be required at run time? Thanks for any input. In fact, skeletal animation takes a bit more processing, because the matrix of bones should be calculated (JS In) in each frame and uploaded GPU. While in the animation form, all interpolation can be done GPU-side. So this is actually a memory-display business. When you play many animations at the same time,...

c# - Entity Framework: Query is slow -

Image
I have some problems with the entity framework. I have made it easy to explain to simplify. These are my mssql tables I use my MSSQL In the database, use the following code to get all the cities for each country new country () {cities = obj.Counties SelectMany (E => E. Citys). Select (city = & gt; new dccity {name = city name, population = city.publication}}}; it has been returned as json There are more than 40,000 records in the city table It takes about 8 seconds to recover a list with all countries and their respective cities, I am trying to reduce it. To know all the data, you should first ask the table of cities: / P> var city = _context.Cities.Select (x = & gt; new {ContryId = x country.name Country ID, ContryName = x.County.Country.Name, CityId = x ID , Citizen = x.Name}); Var DesertType = New Dictionary & lt; int, Dansdt & gt; (almost countOfCountries); foreign city (different cities in the city) [country country; if (! CountryLook...

Algorithm on n-bit matrix -

दो फ़ंक्शन P1, P2 दिए गए हैं जो इनपुट n-bit x , और y1 = A1 * x, y2 = A2 * x की गणना करें। ए 1 और ए 2 है n * n बिट मैट्रिक्स ये दो फ़ंक्शन n-bit सरणी y1, y2 देता है। हम इन मैट्रिक्स के बारे में कोई जानकारी नहीं जानते हैं लेकिन ए 1 और A2 एक स्लॉट (i, j) को छोड़कर ही पता है । ( i और j हमारे लिए अज्ञात हैं)। हम x के विभिन्न मान के लिए P1 और P2 को कॉल कर सकते हैं और फिर इन दो फ़ंक्शन के आउटपुट की तुलना कर सकते हैं। मुझे यह पता लगाना है कि हम कितने कॉलों के साथ i, j पा सकते हैं? संक्षिप्त उत्तर में हमारी पुस्तक ने लिखा: लॉग n कॉल कोई संकेत या विचार? सभी के लिए धन्यवाद। संपादित करें: कोई कहता है, पहले x पर "1 के" का एक स्तंभ मैट्रिक्स होना चाहिए। और y1 और y2 की गणना करें और उस पंक्ति को खोजें जो अलग है फिर x एक मैट्रिक्स बनें जो n / 2 ऊपर तत्व "1" और n / 2 तल तत्व "0 के" हो। अगर y1 और y2 बराबर अंतर n / 2 + 1 से n और हो 1 हो से n / 2 ... आप कर सकते हैं यदि आप A1 और A2 : को स्थानांतरित कर सकते ...

c# - Is this the correct way to use the MVVM Light Messenger class -

I started with a way to implement navigation in an MVVM environment. Then started reading about messenger class and how useful it would be to communicate between ViewModels. I had to apply the same navigation concept set out using messenger class and came up with this: MainViewModel: public sealed class MainViewModel: ViewModelBase {public MainViewModel () {PageViewModels.Add (new page 1ViewModel ()); PageViewModels.Add (new page2ViewModel ()); Messenger.Default.Register & lt; PageNavigationMessage & gt; (This, (pageViewModel) = & gt; {switch (pageViewModel.CurrentViewModel.Name) {case "Page 1": CurrentPageViewModel = PageViewModels [0]; break; case "Page 2": CurrentPageViewModel = PageViewModels [1]; break; }}); } Private listing & lt; IPageViewModel & gt; _pageViewModels; Public listing & lt; IPageViewModel & gt; PageViewModels {Get (_pageViewModels == empty) _pageViewModels = New list & lt; IPageViewModel & gt; (); Ret...

python - Plot linear model in 3d with Matplotlib -

Image
I am trying to create a 3D plot of a linear model fit for a data set. I was able to do this relatively easily in R, but I'm really having difficulty in doing this in Python. Here I have done R: : p> here What I have been doing in Python = pd.read_csv ('http://www-bcf.usc.edu/~gareth/ISL/Advertising.csv', index_col = 0) model = sm.ols (formula = 'sales ~ Ft = model.fit () fit.summary () fig = plt.figure () ax = fig.add_subplot (111, projection = '3d') ax.scatter (csv [ ' Xvi, csv ['radio'], csv ['sale'], c = 'r', marker = 'o' xx, yy = np.meshgrid (csv ['tv'], csv ['radio' ]) # Not what I expected: (# ax.plot_surface (xx, yy, fit.fittedvalues) ax.set_xlabel ('TV') ax.set_ylabel ('radio') ax.set_zlabel ('sale') plt.show ( ) What am I doing and what should I do instead? Thank you. You were right in handling that conspiracy _Serfes wants coordinates to work with a mashg...

javascript - How to apply bitwise right shift operator on binary? -

How do I change bits correctly on binary? & gt; & Gt; applies to integers in JS, then, 6> gt; & Gt; 1 (bitwise shift correct, step 1) results 3 ( 110> 1 = 011 - true) as it shows, but it is good. Is it possible to work with the correct operator with the change in binary? I need it: 110> & gt; 1 Working correctly, it will show 55 as the result and it is correct. 110 is 01101110. 01101110 & gt; & Gt; 1 = 00110111 . 00110111 is 55. right. But I want the result as 011 ! How can I do this in JS? This looks like how string manipers for me: function shr (x, s) {new string ('0', math .min (s, x.length)) + x.substr (0, Math. (0, x long - s)); } & Gt; & Gt; & Gt; Alternatively, you can use the normal bitwire operator and convert it to string (one time) before rendering and can change back to string presentation. Later (once).

perl - Change the character length of single line strings using regex -

after "text" itemprop = "text"> I have a GenBank file with a \ N (at least one that contains single lines of wire with 60 bases The scene is extracted) How to modify the sequence using Perl, it uses 120 lines using regescs for each line and does not bioparlate. Original format: 1 agatggcggc gctgaggggt cttgggggct ctaggccggc cacctactgg tttgcagcgg 61 agacgacgca tggggcctgc gcaataggag tacgctgcct gggaggcgtg actagaagcg 121 gaagtagttg tgggcgcctt tgcaaccgcc tgggacgccg ccgagtggtc tgtgcaggtt 181 cgcgggtcgc tggcgggggt cgtgagggag tgcgccggga gcggagatat ggagggagat 241 ggttcagacc cagagcctcc agatgccggg gaggacagca agtccgagaa tggggagaat 301 gcgcccatct actgcatctg ccgcaaaccg gacatcaact gcttcatgat cgggtgtgac 361 aactgcaatg agtggttcca tggggactgc atccggatca ctgagaagat ggccaaggcc 421 atccgggagt ggtactgtcg ggagtgcaga gagaaagacc ccaagctaga gattcgctat 481 cggcacaaga agtcacggga gcgggatggc aatgagcggg acagcagtga gccccgggat I only managed to make them In the wire with a length of 60...

c# - Microsoft Test Manager Test Case not using latest associated test method code -

My server is set up correctly, as far as I can tell. When I select "run" for a test case in MTM then the test reaches the controller and executes the associated automation (testing method) on the server. So ... I have updated my test method in my coded UI solution, but when I run Test Case with Microsoft Test Manager, it runs Test Method Code before my update. Here's what I have tried: I checked the changes in the source control in my test method. I have dislodged the testing method from the test case I saved. Then the test case and test method were added again. Restart Agent and Controller Services Restart the server The test is running. What kind of deal? Why are not my exams selected in my associated test methods ??? You need to update that test to select the latest changes in your test code, which The test is linked to the scheme.

unit testing - Python patch decorator spilling into other methods -

My understanding is that when you use a patch decorator on a unit test (I am using the nose frame) So, the scope of the patch decorator test case is the scope. Here's the problem: @ patch ('a') @ patch ('b') @ patch ('b') def test_add_stuff (auto, head_a, mock_b, mock c): url = '/ Path / blah / blah' assert_true (content) # Now those three patch decorators should be done "def" test_delete_stuff (self): url = '/ another_path / not_important' assert_true (some) In the case of my second test, test_delete_stuff, I have added a print statement to the actual code which was thrown in an attempt to debug an error. Exits, the function call within a controller action hit through a URL is returning a MagicMock object! This is the mock_b from the last test case. If I reverse the order of only two test cases, then there is no change if I comment with the patch decorator then my second test passes the case. Additional information: T...

How can I parse a JSON string that would cause illegal C# identifiers? -

I am using the library to convert and convert the JSN string to the C # object. But now I have actually come in strangely JSON string and I am unable to convert it into C # object because I can not create a C # class from this JSON string. There is a JSON string {"1": {"fajr": "04:15", "sunrise": "05:42", "zohar" : "12:30", "asr": "15:53", "Maghrib": "1 9:18", "Isha": "20:40"}, "2": {"Fajr": "04 : 15 "," Sunrise ":" 05:42 "," Zuhr "" 12:30 "," ASR ":" 15:53 ​​"," Meghrich ":" 19:18 "," Isha ": "20:41"}} To parse this JSON string, there must be a required C # class: public class 1 {public string fuzz } Set; } Public string sunrise {get; Set; } Get public string zuhr {get; Set; } Public string asr {get; Set; } Public ...

javascript - Showing milliseconds in a timer html -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं एक उलटी गिनती कैसे दिखाऊँ HTML में टाइमर? वर्तमान कोड: var संख्या = 6000; Var काउंटर = सेट इन्टरवाल (टाइमर, 1) ;; // 1000 इसे प्रत्येक 1 सेकंड फ़ंक्शन टाइमर चलाएगा () {count = count-1; यदि (गिनती & lt; = 0) {स्पष्ट अंतराल (काउंटर); वापसी; } Document.getElementById ("टाइमर")। InnerHTML = गणना + "मिलीसेकंड्स"; // वर्तनी के लिए घड़ी} एमएस फ़ंक्शन msToTime (s) के लिए सेकंड परिवर्तित {var ms = s% 1000; S = (s - ms) / 1000; Var सेकेंड = s% 60; S = (s - secs) / 60; Var mins = s% 60; Var घंटे = (एस - मिनट) / 60; रिटर्न एचर्स + ':' + mins + ':' + सेकंड + '।' + एमएस; } मैं टाइमर को कैसे कॉल करूंगा? अभी भी एमएस के रूप में टाइमर दिखाता है। मैं इसे 9900 मिलीसेकेंड के बजाए 99:00 सेकंड के रूप में दिखाना चाहता हूं। धन्यवाद आप ऐसा कुछ कर सकते हैं: var expires = new date (); Expires.setSeconds (expires.getSeconds () + 60); // सेट टाइमर को 60 सेकंड var counter = setInterval (ट...

angularjs - page progress bar in Yeoman/angular signup page -

Hi, I am just learning angular, and I was thinking that someone could tell me what I was doing in the setting. In this simple load bar in the Yemen signup page signup. In controller.js, I have the following code: 'Strict use'; Angular.module ('lolBetApp'). Controller ('SignupCtrl', function ($ radius, $ http, orth, $ location) {$ scope.user = {}; $ scope.errors = {}; $ scope.register = function (form) {$ scope.submitted = True; if (form. $ Valid) {auth.createUser ({summonerName: $ scope.user.summonerName, email: $ scope.user.email, password: $ scope.user password}). Then (function () { // Account created, redirect to home $ location.path ('/')}} .Cache (function (err) {err = err.data; $ scope.errors = {}; // Update values ​​for form fields Which corresponds to Mongolian errors angular.forEach (err.errors, function (error, field) {form [field]. $ SetValidity ('mongoose', fals E); $ scope.errors [field] = error. Message]})}}}}; $ radius. $ Emi...

objective c - I'm stumped. NSLog verifies the object is what it's supposed to be, but adding the object to array isn't working -

Joodata is a singleton ... the table shows fine, NSLG verifies the correct line, however, jeoData.crewList Returns the zero after adding the object to the NSMutableArray object ... In Joodata Singleton, the employee list is started equally for the cruiser. - (zero) tableview: (UITableView *) tableView was done SelectionRowAtIndexPath: (NSIndexPath *) index text {employee * employee = [jeoData.employeeList objectNet: indexPath.row]; [JeoData.crewList addObject: employee]; NSLog (@ "Select Crowview: Added:% @% @", Employee First Name, Employee, Anonymous); NSLog (@ "Total Selected:% lu", (unsigned long) jeoData.crewList.count); } NSLog: 2014-10-17 15: 09: 41.590 Save Endload [98371: 414247] Select Crewview: Added: Jacob Johnson 2014-10-17 15: 09: 41.591 Save Endless [98371: 414247] Total Selected: 0 ... even didDeselectRow selects the right object to display, but I can not understand why I can not get the object in the crawllist array. Any help would be ...

Android Lollipop, AppCompat ActionBar custom view doesn't take up whole screen width -

Image
So, I just updated my codebase to Lollipop, and I'm having problems with the action bar. I AppCompat and ActionBarActivity , And a custom view is growing. It seems that the custom view no longer takes the full width of the screen, leaving a thin strip on the left the way it is used to see It now appears This is the code that I am using to set the action bar. Anyone have any ideas? Last ActionBeer Actionbars = getSupportActionBar (); Aug R (actionbar! = Null) {actionBar.setDisplayHomeAsUpEnabled (wrong); actionBar.setDisplayShowHomeEnabled (wrong); actionBar.setDisplayShowTitleEnabled (wrong); actionBar.setDisplayShowCustomEnabled (correct); actionBar.setNavigationMode (ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setCustomView (R) .layout.action_bar_content_search_custom_view); actionBar.setBackgroundDrawable (zero); // Actionbar System.Stextbackgrounddable (empty); TextView title = (TextView) verb Bar.getCustomView (.) FindViewById (R.id.action_bar_title); Title.s...