Posts

Showing posts from September, 2013

AngularJS ng-show directive not working on scope function like it should -

What's wrong with this simple ng-show directive? It should be simple because I have hidden buttons through the ng-show and when a third button is clicked, these two buttons will be displayed so long as they are not clicked, they hide. javascript $ scope.addQuestion = function () {$ ('button # addquestion'). Click (function () ($ scope.addQuestion = true; console.log ("clicked");})} HTML & lt ; Div class = "program-edit-btns well" & gt; & Lt ;! - These two buttons are hidden until the third button is clicked - & gt; & Lt; Div class = "btn-group pull-left" ng-show = "plus question ()" & gt; & Lt; Button type = "button" class = "BTN-remove BTN" & gt; & Lt; I class = "fa fa-plus" & gt; & Lt; / I & gt; Add & lt; / Button & gt; & Lt; Button type = "button" class = "BTN-remove BTN" & gt; & Lt; I class = "f...

osx - Why is my window:willPositionSheet:usingRect: delegate method not called? -

I need to change an NSAlert window. I already found out that to do this, send me the ( NSRact window is required to be implemented: (NSWNDO *) Window TransmissionShot: Using NSDWNDO * sheet: React: (NSRact) Reset in method. My code, where I trigger the warning window, is in the following method: - (zero) webview: (webview *) sender run javascriptlittlepanel always messages: ( NSString *) Message startedBraffic: (webframe *) frame {nsalert * jsarlert = [[nsalert alloc] init]; [JsAlert addButtonWithTitle: @ "OK"]; [JsAlert setMessageText: @ ""]; [JSALert set informative text: message]; [JsAlert setAlertStyle: NSWarningAlertStyle]; // [JSLert Set Deliget: Self]; [JSLT initiatesModelForvindo: sender.wondo ModuliAditate: self-indenturer: @Selector (AlertDid: return code: referenceInfo :) referenceInfo: Nouvelle]; } I have set modalDelegate to self , where self is AppDelegate . I have implemented the following code in AppDelegate : - (NSRact) windo...

html - JavaScript - Do nothing if an input field is empty and if it has a value check to see if it is numeric and display an alert if it is not -

I am trying to create a form that automatically put the input field on blurring and a passive "total:" Displays the sum in the field. I do not want to run anything if a user focuses in an input, focus focus without inputting anything else, and if a user inputs then I only want to restrict the field to the field. If there is a better way of doing this, please let me know here is an example of my current approach: html & Lt; Form method = "get" & gt; & Lt; Label = "january" & gt; January: & lt; / Label & gt; & Lt; Input type = "text" id = "jan" square = "zodiac" onblur = "isNum (); is calculated ();" & Gt; & Lt; Label = "February" & gt; For February: & lt; / Label & gt; & Lt; Input type = "text" id = "February" class = "zodiac" onblur = "isNum (); is calculated ();" & Gt; & Lt; Label = "total...

linux - How to parse HTTP headers using Bash? -

I need to get 2 values ​​from the web page header which is the personal form of values ​​I am using curls. I am able to use: response1 = $ (curl-i -s http://www.example.com | grep http / 1.1 | awk {'print $ 2'}) Response2 = $ (curl-i -s http://www.example.com | grep server: | awk {'print $ 2'}) But I can not figure out how to Griding different values ​​using single curl request: response = $ (c -ai-S http://www.example.com) http_status = $ response | Grep HTTP / 1.1 | Awk {'print $ 2'} server = $ response | Grep Server: | Awk {'print $ 2'} Every attempt leads to either an error message or empty value I'm sure it's just a syntax problem. complete bash solution awk : See below IFS = ':' read the key values; Whitpace # trim in the "Price" value = $ {value ## + ([[space:]]}}; Value = $ {value %% + ([[space:]]) Case "server key $ server" = "$ value" ;; Content type) whistle ...

c - How to fix selection Sort Swap access violation -

I am currently trying to get the assembly and I am trying to apply the basic sorting algorithm using the language I am I think I have found the logic below it, but it can also be on the error either in any case, whenever I try to run the swap part of the selection type, then with an access violation error Ends on the basis of some other questions about this subject which I have seen, the way I am implementing the swap is valid (but again, if I am wrong then correct me) In the meantime, thinking that swap is right, what is the reason for my access violation? Here is the code: int _tmain (int argc, _TCHAR * argv []) {four * arr; Arr = new four [5]; Arr [0] = '2'; Arr [1] = '5'; Arr [2] = '1'; Arr [3] = '3'; Arr [4] = '4'; Int len ​​= 5; __asm ​​{Push EX Push Ebayck Push ECX Push Edx Push ESI Push EDI MAPEx, 0; // i mov ebx, 0; // j mov ecx, arr // arrange mov edx, 0; // minutes mov esi, len; // array length mov edi, len; // array LAN - 1 s...

imagej status bar coordinate display -

Does anyone know that the number of digits displayed in the status bar of the image has increased? This is usually not a problem if pixel coordinates are displayed, although once only two digits are applied to the scale performance, now the scale is not enough on the basis of the factor. With the help of ImageJ, the cursor displays the coordinates of the position, which alternately formats the coordinates Uses for The problem can be solved if it was used instead. Feel free to write, where Wayne Rasband (Developer of ImageJ 1.x) will pick it up and add a feature if he thinks it's fair. As an alternative solution, you can press alt key while moving the mouse, in pixels instead of the calibrated coordinates Switch the coordinates bar (see).

java - Android LayoutInflater get EditText Data -

This is my GoogleMapAPI, I believe users can first type marker information, and then create markers You can use it for But log cat always has the "string marker Infoco = marker InfoGate text (.) ToString ();" Unsuccessful Sorry I'm a newbie for coding. Please help me public void onMapLongClick (last LatLng point) {AlertDialog.Builder builder1 = new AlertDialog.Builder (it). Builder1.setTitle (R.string.funtion); builder1.setItems (options, new DialogInterface.OnClickListener () {public void onClick (DialogInterface communicate, integer SelectedItem) {Toast.makeText (MainActivity.this, "[SelectedItem] you select the letter" + option, Toast.LENGTH_SHORT). show (); dialog.dismiss (); if (SelectedItem == 1) {AlertDialog.Builder builder2; context mContext = MainActivity.this; LayoutInflater inflater = getLayoutInflater (); builder2 = new AlertDialog.Builder (mContext); markerInfo = ( EditText) findViewById (R.id.markerInfo); builder2.setView (inflater.infla...

c# - Datagrid and Listview with same itemssource -

मेरे पास डॉकग्रीग और लिस्ट्यूव्यू वाला एक WPF अनुप्रयोग है जो एक ही ऑब्ज़र्वबल कलेक्शन आइटम्स सोर्स साझा करता है। जब डाटाग्रीड के CanUserAddRows संपत्ति सच है, तो यह अतिरिक्त ऑब्जेक्ट को प्रदर्शित करने के लिए ListView का कारण बनता है जो नई पंक्तियों को जोड़ने के लिए डेटाग्रिड का उपयोग करता है। मैं DataGrid से सूची पंक्ति में दिखाने के लिए अतिरिक्त पंक्ति कैसे प्राप्त करूं? मैंने सूचीईव्यू की डेटाटामप्लेट पर एक ट्रिगर का उपयोग करने की कोशिश की और जांच की कि आइटम आईडी खाली थी या 0 `& lt; ListView.ItemTemplate & gt; & LT; DataTemplate & gt; & Lt; लेबल मार्जिन = "- 2,0,0,0" नाम = "श्रेणी लेबल" & gt; & Lt; TextBlock TextWrapping = "wrap" text = "{बाध्यकारी श्रेणीनाम}" ऊंचाई = "46" & gt; & lt; / TextBlock & gt; & Lt; / लेबल & gt; & LT; DataTemplate.Triggers & gt; & Lt; डेटाट्रिगर बाइंडिंग = "{बाध्यकारी श्रेणी आईडी}" मान = "0" & ​​gt; & Lt;! - भी...

Unmarshalling JSON into Go interface{} -

I have an area of ​​this type like interface {} . In the process of caching it using memcached (), the straat is inserted in JSON, which opens back into the structure when it is received from the cache. As a result, the interface {} field essentially indicates for a type of map [string] interface {} (as interface {} field specified as map only The [string] interface {}), the type of information is not kept for the marshaling and the unsampling process. Is there any way to save this information in the martial process, in such a way that it can be unhappy? Or to use any other codec or something else? Type A struct {name string id string} func main () {a: = A {value: b} {name: "hi", id: "12345"}} Cache. Set ("A", A) // Marshall 'A' in cache and cache results in cache = cache. ("A") / / Cache and unmodular FMT print from "A" ("% s", Result.V. (B) .name) // Generates error saying that // map [ String] interface {} ...

javascript - Google Maps V3 Custom Overlay children stopped receiving mouse events -

Custom overlays (google.maps.OverlayView ()) Children had to respond to mouse events. I saw that they stop them from doing so. Here is an example ("Overlay, click" ing should click on its text "Work for Overlay", whenever clicked, but never happens): Here is the code (Cut / Paste for debugging), Overlay is highlighted in the child click listener USGSOverlay.prototype.onAdd () Div.addEventListener ("click", function () {this.innerHTML = "worked for overlay";}); // overlay-problem.js var overlay; USGSOverlay.prototype = New google.maps.OverlayView (); // Start the map and custom overlay function initialize () {var div = document.createElement ('div'); Div.style.borderStyle = 'none'; Div.style.borderthid = '0px'; Div.style.position = 'Done'; Div.className = "FindMe"; Div.style.width = "150px"; Div.style.height = "150px"; Div.style.backgroundColor = "red"; Div....

Test coverage with Karma, browserify and Coffeescript -

Image
I'm having trouble adding test code coverage, I am using Karma and files to be added in Karma Is already bundled with the browser, so it looks like in Karma.Conf.Coffee : files: [{Pattern: 'bin / public / Client / app.js', served: yes: included: yes} {pattern: 'src / lib / vendor / angular-mocks / angular-mocks.js', of service: yes: included: yes} {pattern From: 'bin / tests.js', WA: Yes: is included: no}] and he works to run the test but does not have coverage I Karma- coverage npm package, and this: Preprocessor: 'bin / public / client / app.js': [' Coverage '] Correspondents: [' Progress ',' Coverage '] Actually the Convention State files are made, but they are completely wrong because it changes the parts of the browser brought from node_modules (because my Catch them near I do not have a test for them). Ideally I have to gather those source maps that generate the browser, and co-runs against those...

php - Automatic add next page when row count is more than given value -

Is there a way to automatically create the next page on more than 20 pages? If you only want a frontend-side pagination (and do not control many data) , Then see this jQuery plugin: It is very easy to integrate and very useful! If you are talking about server-side endorsement, see. If you do not like that special, then there are lots of these tutorials. You need basic knowledge for SQL things here:

AngularJS Modal not showing up when templateUrl changes -

So far, I have an example UI example: Controller: var ModalDemoCtrl = function ($ scope, $ modal) {$ scope.open = function () {var modalInstance = $ modal.open ({templateUrl: 'myModalContent.html', Controller: ModalInstanceCtrl}); }; }; Var ModalInstance Ctrl = Function ($ scope, $ Modal Instance) {$ scope.close = function} {$ modalInstance.dississ ('Cancel'); }; }; And this section, which is just sitting in .html for the whole page, this modal is on. HTML: & lt; Script type = "text / ng-template" id = "myModalContent.html" & gt; & Lt; Div class = "modal-header" & gt; & Lt; H3 class = "modal-title" & gt; I'm a model! & Lt; / H3 & gt; & Lt; Button class = "btn btn-warning" ng-click = "off ()" & gt; X & lt; / Button & gt; & Lt; / Div & gt; & Lt; Div class = "modal-body" & gt; Stuff & lt; / Div & gt; & Lt; / Sc...

tomcat7 - Tomcat virtual host shows blank page -

I am trying to configure tomat for many domains and whatever I have tried was unsuccessful. I call it /etc/tomcat7/server.xml & lt; Hostname = "www.mysite.com" appbase = "webapps / mysite" unpackWARs = "true" Autodineer = "true" & gt; & Lt; Aka & gt; Mysite.com & lt; / Aka & gt; & Lt; / Host & gt; And I created the folder / var / lib / tomcat7 / webapps / mysite whenever I go to my domain, I have an empty page. What am I doing wrong here? I'm running Debian 7 , you only have to make a change to test www .mysite.com / mysite works. What can I do? & lt; Host name = "www.mydocs.com" appbase = "webapp" unpacked wars = "true" autodineer = "true" & gt; & Lt; Aka & gt; Mydocs.com & lt; / Aka & gt; here indicates the appbase webpage - but if I use the app as a webapps / mysite then empty Get the page In this case, you shou...

rest - express: add handler to route with any method -

I want to add a header to any endpoint, no matter what method is used (get, post To get , I do it like this: app.get ('/ *', function (rick, ridge, Next {res.setHeader ("Access-control-Alo-origin", "*"); Next (); // http://expressjs.com/guide.html#passing-route control}); I wonder if there is a better way to do this in which the app Post, app. There is no copy for input and app. Delete You are searching for app.all () Your example Then it will be created: app All ('/ *', function (rik, ridge, next) {res.setHeader ("access-control-permission-origin", "*"); next ();});

c# - WCF Service Does Not Send HTTP Response, even though method gets invoked -

When I do I get the following error message when I try to open my WCF method using WCO Test Client: Probable cause of failure to implement service: Service is offline or inaccessible; Client-side configuration does not match proxy; The current proxy is invalid View the stack trace for more details. You can try starting a new proxy, restoring the default configuration, or refreshing the service. The underlying connection was closed: The connection was stopped unexpectedly. Server Stack Trace: System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply on System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException (WebException WebException, HttpWebRequest Request, HttpAbortReason abortReason) (TimeSpan expired) on System .RequestChannel.Request (Send message ServiceModel.Channels, timed TimeSpan) (message message System.ServiceModel.Dispatcher.RequestChannelBinder.Request, timed TimeSpan) (string action System.ServiceM...

python - issues converting string to number (float or integer) -

I am trying to convert the string into numbers. This can be a float, integer, or empty string. Return value: Return value: str3 = "" str2 = "0.0" str3 = "if not s: Return" "Let's return:" ValueError Return Ent: Return Float (s) Print ("str3 =" + str (num (str3)) print ("str2 =" + str (num (str2)) print ("str3 =" + str (num (str3)) "1.1" str4 = "10" print ("Str4 =" + str (num (str4))) Therefore, output: str1 = & lt; == OK str2 = 0.0 & Lt; == I want this integer as 0 str3 = 1.1 & lt; == OK str4 = 10 " ex> is not a valid integer string if you want to round zero to round So if you do this after converting to float. def num (s): if not s: returns "" Ia: return etc. valueError: F = float (s) if F% 1.0 & lt; 0.0005: Return Int (F) Other: Returns FIFI: Returns 0

d3.js - Javascript d3: Is there a way to progammatically stop dragging an item? -

When I click and drag an item, is there a way to stop it from dragging it tightly without leaving the mouse button? For example, if I drag an item into a certain limit box, can I drop the item to drag it? I have suppressed a drag example from another user; Click to create a circle, then drag it to the blue box, look for it to work. Here the concept is called X & amp; When an object is being dragged, then it is synced in d3.event , then trigger one of the two ways shown in the bottom as 'stop' event. The drawback is that Until drag event gets a mouseup, it throws an error, while the mouse is still being paused // drag lewier var drag = D3. Beavier Define drag (.on) ("drag", drumvov); Function dragmove (d) {// if event.x exceeds one limit, trigger "dragend" (d3.event.x> 200) {// using D3 drag.dragend (); // or using jquery drag.trigger ("dragend"); } Var x = d3.event.x; Var y = d 3.event.y; D3.select (this) .attr ("conversi...

wpf - Sorting an ObservableCollection -

मेरे पास एक UserVM (बहुवचन) और एक UserVM है (एकवचन )। मैं एक अवलोकनिक संकलन & lt; UserVM & gt; में UserVM बनाएँ। मेरे पास अवलोकनकणीय चयन & lt; UserVM & gt; एक सूचीदृश्य से जुड़ा है। जब मैं सूची दृश्य में एक उपयोगकर्ता को संपादित करता हूं, तो मुझे उपयोगकर्ता कोड के आधार पर पुन: ऑर्डर करने के लिए ObservableCollection चाहता हूं। यहां कुछ कोड दिया गया है: UsersVM: सार्वजनिक पर्यवेक्षणसंपादित करें & lt; UserVM & gt; UserList {get; सेट; } सार्वजनिक यूज़र्सएमएम (IUserService userService) {this._userService = userService; Var उपयोगकर्ता = userService.GetUsers (); Var उपयोगकर्ताव्यूमोल्ड = उपयोगकर्ता। चयन (x = & gt; नया यूजरजीम (यूजरआईडी = एक्स। यूएसआईडी, स्टेटसआईडी = एक्स। स्टेटसआईडी, स्टेटस = एक्स.स्टैटस,}); यह। यूज़र लिस्ट = न्यू ऑब्झर्वबल कलेक्शन & lt; यूजरवाईम & gt; (यूजरव्यूमोडेल); This.UpdateUserStatus = new RelayCommand & lt; ऑब्जेक्ट [] & gt; ((एस) = & gt; अपडेटस्टैटस (एस)); } यूज़रम: सार्वजनिक वर्ग UserVM:...

java - Libgdx iOS - GC Capability Mismatch -

I am working with LibGDX on a cross platform game, but I went to a wall while panning on IOS looks like . I should keep in mind that Android and desktop make runs, but I have not yet tried to build web build. The error I get is: ios-sim [3399: f07] error in loading / application / xcode.app / content / shade framework / dwtfoundation.framework / dwtfoundation: dulppen (/ Application / Excode.app / Content / Shade Framework / DVTF Foundation / Framework / DVT Foundation, 265): No suitable image was found. What was found: [Error] / Applications / Exd.Ep / Continents / Sherfarmwork / DVT Foundation. Framework / DVT Foundation: GC capability inconsistent [error] Unable to dvtFoundationBundle Error: This is the IOS Along with my first encounter, I am not familiar with internal workings, but from similar topics I have seen solutions from downgrading the iOS simulator to enable garbage collection. From the area Unfortunately, I have to use one of them can not understand it. In add...

VBA Automation Error (System call failed) while running Excel 2013 macro from Access 2013 -

I have an Access (2013) database that I want to store / process all data obtained from the Quatttrix Online Survey To use. The raw data downloaded from Qualtrics is a csv file that is in the format to import poorly, so I have found a fairly complicated macro in Excel (2013) that I have to reach before importing Use pre-process data for In Access, I use the following code to open an Excel file in macro, run macro, save the workbook, and turn it off. It was working well for many months, but now when I run it, it stops near the macro with the runtime error of the end of Excel. -2147417856 Automation Error System Call Failed ActiveObject BookWbkName & amp; ".xlsm", strWbkPath appExcel.Run ProcName, ProcArg appExcel.Workbooks (WbkName) .save so appExcel.Workbooks.Count = 1 then appExcel.Quit Otherwise appExcel.Workbooks (WbkName) .Close really end up the active Krenoprvokbuk only a custom function to do so, meaning name, app Excel Excel application workbook is alwa...

linux - Are there different Encoding Conventions for Base64? -

Am I thinking that there are different coding conventions for Base64? In other words, is there any reason that two different base 64 encoders should create two different outputs for the same file? I am asking because I am scanning a JPEG and I am getting two different base 64 codes. The first encoder I The following command is executed in the second encoder Linux environment: openssl base64 -e - Alps.jpg & gt; In B64EncodedFile I have validated the validity of both encoders by decoding the base 64 code into a JPEG and found that it is similar to the original JPEG The base 64 simply states that the alphabet is made up of 64 unique characters to represent the data. Individual sources are only using different characters for more information.

java - How to run Junits locally using Google Cloud Storage service -

I am using Google Cloud Storage (GCS) in my GAE application for testing some junkies Which was written for GCS. How to configure junit for GCS? Earlier I had used the Google FileService API using the Bluetoothstore but the FileService API was deprecated, so that I was transferred to GCS and using the GcsService API. Blobstore Junits I have used - Private Final LocalStextHelger BlobStoreHelper = New LocalSewestSelfList (new localblobostorsearthtest conif ()); This works for me successfully What do I have to do to successfully run GCS Junitz? No special configuration is required for setup. For GUIT test cases, There are some logical problems in the code, so that I am unable to run JUnate using GUCs. After solving those logical issues, the cases of JUnat test are working fine with GCS.

jquery - JavaScript: How do I prevent browsers from blocking the pop-up window that I've created? -

Once loaded I have created a simple javascript function to display my pop-up window. But it stops being blocked by Firefox and Google Chrome and I somehow have to enable it on Firefox and Chrome to display pop-ups. Is there any alternative to this? I have a player on the pop-up window, so I have to use a pop-up so that the player should play it automatically. The problem is that if I put it on the page, once the user clicks on the second page the whole page is reloaded and the player automatically closes for a few seconds until the full page is reloaded. And I have to stop it from happening. Thanks The general rule is that if the popup blockers The window will be attached .open or the same JavaScript that is not enforced by the direct user action, this is the answer to a button click, without hit by the popup blocker, window.open , but if you put the same code in the timer event, it is blocked. Ega. The depth of the call series is also a factor - some older browsers on...

python - Learning to Make a Sandbox -

I am learning about sandbox, and I would like to create a sandbox, I know about sandbox this is a platform To run untrusted code, to provide limited access to that code, which is harmful due to the untrusted code, to protect our system I tried to do a Google search but I The satisfactory answer was not found, then I would like to know that for all you have to start learning for the sandbox, the language of the sandbox code will be my language python The browser provides a good sandbox that allows users to run the code in most javascript if you really want to use Python then you're a. . If you want to ensure users have access to computer resources while keeping them in a subsoldbox, then you have to see them.

R shiny plot layout UI -

Quick question on the formatting positions of plots in R. Shiney UI. So far I have created a series of histogram plot in the server. R and they all show up perfectly in the UI. The only problem is, that I want to line them up in 2 rows, past 4 of my current code, pasted below, gives me 3 rows! At the top of the 4th graph, the second with the second 3 graph, the second (with the room to be the fourth fit) and then the last row has 1 plot ... where I am wrong and one to carry 8 plots in bright Better way? fluidRow (column (12, "", fluidRow (column (3, plotOutput ("PlotHy"), #), column (width = 3, plotOutput ("PlotMe")), column (Width = 3, plotOutput ("PlotEthane"), column (width = 3, plotOutput ("PlotEthylene"), column (width = 3, plotOutput ("PlotCO")), column (width = 3, plotOutput (" PlotCO2 "), column (width = 3, plotOutput (" PlotO ")), column (width = 3, plotOutput (" PlotN ")))), t...

javascript - AngularJS Trigger $scope.broadcast from $resource -

INTRODUCTION I am trying to ensure that all parts of my angular application I am using correctly / all correct codes are in the right place I came to this article in which there is an example application with data stored in an array inside the service. I think the way The app is structured from, it makes sense (but may be completely wrong). Question Do I start the $ $ resource in the same way when I update the ARAR in this code, then I have a $ broadcast trigger. "mystery", "book", "book", "book", "book", function ($ rootScope) {var service = {books: [title: "magician", author: "Raymond E. Fest"}, {title: "The Hobbit", Author: "JRR Talkken"}, Adbook: Function (book) {service.books.push (book); / /console.log(service.books); $ RoutaseScope. $ Broadcast ('books. Update ');}} return service;}); Here is a planner of an example job bonus question if I can which I If I do, ...

multithreading - What is fast, wait notify or busy wait in Java? -

Image
I think the use of busy-waiting is not a good programming practice and preferably the use of synchronized object (wait-awakened) Should be done whenever possible. But I would like to know if someone is ready to sacrifice the CPU chakras, then what will be busy or wait-to inform? I think the waiting-informed synchronized object will include an internal lock and it can also come to wake the thread from the signal kernel, this approach is much more than a busy-wait Slow down, where one just checks a condition until it's satisfied. As soon as this situation is satisfied (eg Boolean value == true), the thread can come out of busy waiting. According to my understanding, I think busy-waiting should be fast. I appreciate if others can share their thoughts and correct me if my argument is wrong. Experiments show that if you wait and wait for your expenditures to notify , Then you will see the flag soon (on my hardware, anyway). (Description below.) The difference is very strong...

html - Light box displaying 2 images, thumbnail the issue? -

I have a lightbox setup on my site and well I found an anonymous list and shown in the list of pictures Are there. I have found an href to add full size image, then my lightbox code and then an IMGRCR with a thumbnail image. Why My Lightbox Displays 2 Images And Not One I Think It Is Displaying My Thumbnail And Full Size Image But I'm Not Sure When I click on the image, it says 1-2, it shows the same image if you press the next button. A glimpse at the code below. I hope this will be quite simple but I am learning .. & Lt; / A & gt; I'm sure this is because you have data-lightbox = " Recentwork " Be sure to check it carefully for more than one hyperlink.

knockout.js - knockout computed value of type number returning a concatenated string instead of sum -

Image
पूर्व 1: यह अंक = ko.computed & lt; संख्या & gt; (() = & Gt; {this.baseSave () * 1 + (this.ability.modifier () * 1) + this.magic () * 1 + this.miscellaneous () * 1 + this.temporary () * 1;} ); Ex 2: यह अंक = ko.computed & lt; संख्या & gt; (() = & gt; {return.baseSave () + यह Ability.modifier () + this.magic () + this.miscellaneous () + this.temporary ();}); मैं टाइपोग्राफी के साथ नॉकआउट का उपयोग कर रहा हूं दिया गया (0, 10, 0, 0, 10) पूर्व 1 कार्य करता है 20, पूर्व निर्यात वर्ग someClass {baseSave: KnockoutObservable & lt; number & gt ;; जैसे स्ट्रिंग के रूप में 0100010 विफल रहता है निर्माता () {baseSave = ko.observable & lt; संख्या & gt; (0); }} क्षमता के अपवाद के साथ जो एक वर्ग है जिसे कंप्यूट किए गए मान वाले वर्ग के निर्माता में दिया जाता है। जब आप UI से बाइंड करते हैं तो आपको वापस आधारित स्ट्रिंग्स मिलती हैं उपयोगकर्ता के प्रकारों पर 1 के साथ गुणा करना यह एक संख्या बनाता है (जो कि आपको लगता है कि ऐसा होना चाहिए...

javascript - Drawing a simple circle using Crafty.js and Box2d -

I'm trying to draw a simple circle by using box2d with crafty.js, but I get it to attract it Jsfiddle may not be able to: Look at this part of the code: var ball = crafty.e ("2D, canvas, color, box 2D , Ball ") .attr ({X: 10, y: 15, z: 5}). Color ("#FFF") .box2d ({bodyType: 'dynamic', density: 1.0, friction: 2, restoration: 0.2, shape: 'circle'}). OnContact ("Floor", Function (Data) {Warning ("Hi");}); The strange thing about this is that warning is executed but the ball is not showing up. Box2dWeb- 2.1.a.3.js box2d.js Try downloading this source to crafty.js , and try and see if it works for you. P> OK, I'm working on your code, it seems that reference library clever + box 2D is a modem created by a user who has created a pong game. You can add width to ball object in .attr w and height h attribute. var ball = crafty.e ("2D, canvas, color, box 2D," ball ") .attr (...

jquery accordion - close sections only on second click -

I use an acronym (jquery UI) and when I click on another, I do not want to close the section. What is the best way to do this class first opened? An ampodian does not allow more than one content panel to open at the same time. Read. Usually, whatever you want to achieve, it can be written with a jquery code under a few lines $ ('# accordion h3'). Click (function () {$ (This) .next (). Toggle ('Slow');})

css - Justify menu in Bootstrap 3 navbar -

इस सवाल का पहले से ही एक उत्तर है: 9 जवाब मैं मेनू का औचित्य नहीं कर सकता बूटस्ट्रैप के बिना साइट पर बूटस्ट्रैप 3 में नियमित text-align: justify और डिस्प्ले: इनलाइन-ब्लॉक , लेकिन सब कुछ ठीक है। बूटस्ट्रैप के बिना साइट () मेन्यू में यह संरचना है: .sd-menu â ???? उल एक ???? ए???? ली â ???? ए???? ली ... एक ???? ए???? ली â ???? ए???? उल: के बाद और यह शैली: .sd-menu {width: 100%; } .sd-menu ul {list-style: none; पाठ संरेखित करें: जस्टिफाय; } .sd-menu ul li {display: inline-block; } .sd-menu ul: after {content: ''; प्रदर्शन: इनलाइन-ब्लॉक; चौड़ाई: 100%; } और सब कुछ महान काम करता है! बूटस्ट्रैप के साथ साइट () मेनू में यह संरचना है: .navbar एक ???? Ul.navbar-nav â ???? ए???? ली â ???? ए???? ली ... एक ???? ए???? ली â ???? ए???? .navbar-nav: after और यह शैली (बूटस्ट्रैप शैलियों के लिए केवल गैर मानक दिखाया गया है): .navbar-nav {text-align: justify; & Gt; ली {प्रदर्शन: इनलाइन-ब्लॉक; }} .navbar-nav: {content: ''; चौड़ाई: 100%; प्र...

c# - Use a "null" switch statement to determine if a range of TextBoxes are null, instead of using if-else statements -

Right now, I am trying to write the method that has a switch statement that is used as a "trigger" The reason that the reserved word tap is because I want to test all the text boxes, for this pointless state of the switch statement, and if they are, then a message dialog (which I have coded for each box) You can say that you can not leave ' The name of the box here is "blank, you must enter text". In short, it is possible to use a switch statement to check if a bunch of text boxes is void (malfunctional) if-else Instead of using the whole sequence of statements, if so, how? (Please) I should say that I was doing this problem for the last hour, no success was found. / P> Any help accepted from the heart If you specifically switch : , then create them in the list or in an array , if it is not already so. list & lt; String & gt; Text box compilation = new list & lt; String & gt; (); TextBoxCollection.Add (yourTextBoxStringValue...

c - program to print all decimal numbers from 0 to a given number in binary format -

I'm new to C I was writing a program to print a decimal number from 0 to all decimal numbers (as provided by the user) but my output was not expected. I do not understand what is the mistake I have written in the program .... #include & lt; Stdio.h & gt; Int main () {int x, n; Printf ("Enter any number \ n"); Scanf ("% d", & amp; x); N = x; Printf ("Number in Binary Format \ n"); Whereas (n! = 0) {int num [8] = {0,0,0,0,0,0,0,0,0,0,0,0}}; Int y [8] = {0,0,0,0,0,0,0,0,0,0,0,0}; Int i = 7; While (x! = 0) {y [i] = x% 2; X = X / 2; I = i-1; } While (i! = 8) {printf ("% d", y [i]); I = I + 1; } Printf ("\ n"); N = n-1; The problem is with its first loop while (x! = 0) {y [i] = x% 2; X = X / 2; I = i-1; } When this loop is over, I will not not in your case, and your second loop is based on this assumption. Just put one i = 0; This should work after your first loop.

java - Change custom seekbar values to adjust the look -

Image
I'm building an app where you can design your own custom searchbar to help developers and Can preview in-app. Now I handle the Exchange Code Explorer: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & lt; Item android: id = "@ android: id / background" Android: drawable = "@ drawable / background_fill" /> & Lt; Android Android: id = "@Android: ID / Progress" & gt; & Lt; Clip Android: Dragon = "@ Drable / Progress_Fill" /> & Lt; / Item & gt; I am able to use a GradientDrawable in my java code to change the background of the seekbar, but when I do this, this background checker , But behind the finder, besides, when I change the progress, it fills the entire search bar with a new background and not only has progress made. I have tried to make a rendering and clips dravable, but now how do I change the design for these specific items in my layer-list? Picture: ​​...

java - Access-Control-Allow-Origin for ajax call and HttpURLConnection -

I was trying to access a web-url (which is not accessible to me) that would return a JSON formatted string. / P> I tried with AJAX calls and it shows that ' No access-control-permission-generating' header exists at the requested resource . Then I found an alternative solution to get JSON data using HttpURLConnection Can anyone tell me that both work , Because the requests have been made from the local host itself. Below is my code in both ways: AJAX: var request = $ .jg ({url} : "Url", type: "go", crossdaman: true, data: "content =" + component: list, data type: 'jason'}); HttpURL connection: URL obj = new URL (URL); HttpURLConnection con = (HttpURLConnection) obj.openConnection (); Con.setRequestMethod ("GET"); Int responsivecode = con.getResponseCode (); simply type data: ingredient list, Should have the format automatically

html - Bootstrap-based vertical tab: alignment issues -

Image
3.2.0 का उपयोग करके और बहुत अच्छा , मैंने कई विकल्पों के साथ एक मेनू बॉक्स बनाया है प्रत्येक मेनू आइटम के लिए एक लेबल और संक्षिप्त वर्णन है, जैसा कि नीचे दिए गए चित्र में दिखाया गया है: आपको पर कोड के साथ एक उदाहरण मिल सकता है। अब, मुझे यह करना चाहिए: संरेखित करें नीचे दाएं पर सबमिट करें बटन को संरेखित करें। P> कोई मुझे सुझाव दे सकता है कि यह कैसे करें? 1 बीच में मेनू-मद सामग्री को संरेखित करें (ऊर्ध्वाधर संरेखण के बारे में): मैंने हाल ही में @ BEAVER82minimit द्वारा इस उत्कृष्ट ट्यूटोरियल का उपयोग किया है जो बराबर ऊंचाई कॉलम बूटस्ट्रैप शैली बनाने की अनुमति देता है: आप इसे इस तरह से उपयोग कर सकते हैं: & lt; div class = "कंटेनर कंटेनर-एक्सएस-ऊंचाई" & gt; & Lt; div वर्ग = "पंक्ति पंक्ति-एक्स-ऊंचाई" & gt; & Lt; div वर्ग = "col-xs-6 col-xs-height" & gt; & lt; / div & gt; & Lt; div वर्ग = "कर्नल-एक्सएस-3 को-एक्सएस-ऊँचाई-कर्नल" & gt; & lt; / div & gt; & ...

r - Define variables in an implicit way -

I wanted to know how I can define a variable in R in an inherent way For example, suppose i have z Obviously, if I z , I have the following error: error in beta (x, y): object 'y' not found . I tried to find a solution in Google, but I did not find anything strange. Thank you in advance! For your example you can search for the value of y uniroot $ root [1] $ 1. F.Rote [1] -1.08689e-07 $ ITR [1] $ 13 estimated [1] 6.103516-05 beta (x, y $ root) == z [1] FALSE All.equal (beta (x, y $ root), z, tol = 1e-5) [1] TRUE beta (x , 1) == z [1] TRUE Although it depends on many assumptions such that only one value is being made to satisfy the equation and you make it a sensible interval Are able to deliver. Normally your functions can not accept solutions, and if you need to calculate a large number of Y values, then it may be slow to calculate. You should also consider that a numerical solution can not be accurate, so care will be required with comparison.

sql - ORDER by rating ASC not working in mysql -

कृपया इसे पर एक नज़र डालें I उत्पाद समीक्षा पृष्ठ जहां कई स्वीकृत समीक्षाओं को दिखाया जाएगा और उनमें से प्रत्येक के लिए स्वीकृत प्रतिक्रियाएं भी दिखाई देंगी। TYPE क्षेत्र में, 0 का अर्थ है कि यह एक समीक्षा है जहां 1 का अर्थ यह है कि समीक्षाओं में से एक का उत्तर है। रिपेलरों को उत्पाद को रेट करने की अनुमति नहीं है, इसलिए यह रेटिंग फ़ील्ड में नल है। ID_GROUP यह दर्शाता है कि उत्तरों की समीक्षा किसकी है। मुझे इस पर SELECT PR *।, IF में यूजर जॉन रूडेल से निम्नलिखित बयान मिला है IF (@ ए = टी.आईडी_ ग्रुप, IF (पीआर टाइप = 0, 1, आईएफ (@ बी = 5, @ बी: = 1, @ बी: = @ बी +1)), @ बी) एएस समूह_col, @ ए : = T.id_group FROM (चयन आईडीआईडी ​​आईडी, id_group FROM `product_review`) जहां प्रकार = '0' और स्वीकृत & lt; & gt; '0' समूह द्वारा id_group ORDER रेटिंग एएससी // & lt; - यह LIMIT काम नहीं करता है 0, 5) टी JOIN `product_review` पर पीआर पर pr.id_group = t.id_group क्रॉस जॉइन (SELECT @A: = '', @B: = 1) एएसटीपी जहां स्वीकृत & lt; & gt; ...

php - Which Clause to use instead of IN Clause in MYSQL -

मेरा प्रश्न है IN के बजाय खंड का उपयोग करें पूर्व> SELECT * से TblUserWhere स्थिति! = 'हटाए गए' और यूज़रआईडी इन (0,10,11,12,13,144,15,22,45,114,144,155,156,167,211,439,440,441,443,445,450,455,456,457,458,45 9,1111,1154,1156,1165,1451,1541, 11111,11112,11113,11114,11115,11116,11117,11118,11119,11656,15451,16561,17671,18781,33131,33311,33411,54511,111110,111111,111112,111113,111114,111115,111116, 111117,111118,111119,111120,111121,111122,111123,111124,111125,111126,111127,111128,111129,111130,111131,111132,111133,111134,111135,111136,111137,111138,111139,111140,111141, 111142,111143,111144,111145,111146,111147,111148,111149,111150,111151,111152,111153,111154,111155,111156,111157,111158,111159,111160,111161,111162,111163,111164,111165,111166, 111167.111 168,111169,111170,111171,111172,111173,111174,111175,111176,111177,111178,111179,111180,111181,111182,111183,111184,111185,111186,111187,111188,111189,111190,111191,111192, 111193,111194,111195,111196,111...

javascript - How to prevent colorbox on body click event? -

I am using colorbox which is working fine. I want to avoid getting it off by body click event. When I click on the Close button it should be closed. What will be the syntax for this. I am using this code $ (".frame") Colorbox ({iframe: true, innerWidth: 570, inner hight: 300, scrolling: true}); Use this: $ (" Iframe "). Colorbox ({iframe: true, innerWidth: 570, inner hight: 300, scrolling: true, overlaycloses: wrong});

oracle - Conversion of 01 to jan , 02 to feb including year in the field -

I have a field that has 201402, 201404, here I want to change from 02 to February and 04 April. Is it possible to do that? There are entries for all the months in this area Please help. Within the Oracle you can do a lot below (with its code TO_DATE (. ..) if it is a string or changes the entire TO_DATE with your field, if it already has a data type DATE): Again SELECT TO_CHAR (TO_DATE ('201402', 'YYYYMM'), 'YYYY-MONTH'); SELECT TO_CHAR (TO_DATE ('201404', 'YYYYMM'), 'YYYY-MONTH');

c# - Testing the Patch odata webapi method -

I need to test the following patch method in my audacity controller from my test project. [valid model] [accept works ("patch", "merge")] public ASICNC work & lt; IHttpActionResult & gt; Patch ([FromODataUri] int key, delta and lt; user & gt; patch) {var user = waiting db.Users.FindAsync (key); If (user == tap) {return NotFound (); } Patch. Patch (user); Verification of (user); If (ModelState.IsValid) {Change BadRequest (ModelState); } Try {Db.Entry (user). Property (P => P. User Type) .IsModified = false; Wait db.SaveChangesAsync (); } Hold (DbUpdateConcurrencyException) {if (! UserExists (key)) {return NotFound (); } throw; } Refund Update (User); } The code in the test project is as follows. Can anyone tell me how to give value to delta parameters? Currently I'm getting compilation errors on Line Controller. Patch (1, user) .; [TestMethod] Public Zero TestPatch () {// Organize = New User Controller (); Var user = new user (); User....

jpa - Container-managed EntityManger is null on Injection -

I'm almost new to JavaEE (JRE7 / JDK1.7.0) and start my first (Maven based) Project on Eclipse (Luna) The applicant Zebos EAP 6.2.0.GA (AS 7.3.0.final- 14) which is jsf-api-2.2.7.jar and Registering JSF2.2 to updated > and module.xml by adding jsf-impl-2.2.7.jar The problem / The question is, why can not I get the injection from the Container (AS) unit in my project with the following code: @Stateless Public Square SCATRep {@ Peristons Contact Entity Manager; Private ... * Only one stability is defined in persistence.xml so no further argument is necessary ... in my opinion !! On the other hand, when I try to get EntityManager from the container with Lookup , then EntityManager exists and everything works fine. Used for: @ stagnant environment (unit name = "scha", name = "firmness / m") public class SCatRep {EntityManager em; Public SCATRep (try {try} context = new initial concerts (); Em = (EntityManager) ic.lookup (...

javascript - jQuery interfering with other jQuery scripts -

I am working on a particularly heavy jQuery site that has many animations it The script controls which background clouds (6 of them): function conduction cloud (E, S, D) {$ (E). CSS ('left', '-20%'); Var wait = window.setTimeout (function () {$ (e) .animate ({right: '120%'}, 'linear', function () {moveclouds (e, s, d);});}, d ); } If (! ModernizeR.Cashation) {var clouds = [1,2,3,4,5,6]; $ .eE (cloud, function) (var e = $ ('. Cloud-' +); conduction cloud (e, e dita ('speed'), idata ('delay'));); } There is someone who moves the balloons and other elements (12 of them): function run it (element, hover emount) {element . Animate ({top: '+ =' + hovermount}, 1000); Element.animate ({top: '- =' + hoverAmount}, 1000, function () {runIt (element, hoverAmount);}); } $ ('Balloon'). Each (function () {var hovermount = 15+ Math.flur (Math.rendum () * 5); //console.log (candidate amount); run ($ (this), h...

github - failed to push some refs -tip of your current branch is behind its remote counterpart -

I tried pushing a file ("HelloWald.md") on my local repository in remote repository on Heathbob. I got the following error message: How do I remove this error? ERROR: Failed to push some referee for 'Eragitt' signal: Updates were rejected because the tip of your current branch is behind the signal: Remote remote before removing its remote counterpart Integrate changes (such as hint: 'git pull ...'): See 'note about fast-forward' in the 'git push --help' for details. before rebus those remote (online website) Will also apply your changes. This video really goes to your exact point and fixes it to pull the git - Rebase

c - Global variable does not take new value -

मैं एक साधारण सी प्रोग्राम बना रहा था # include & lt; stdio.h & gt; स्थिर इंट ए; ए = 5; Int main () {printf ("% d", ए); वापसी 0; } कम्पाइलर त्रुटि: 'ए' की स्थिरिक घोषणा घोषित करने के बाद स्थिर घोषणा करती है " इस त्रुटि का क्या अर्थ है? क्या इस त्रुटि लॉग का मतलब है? यह थोड़ा मुश्किल है: एक असाइनमेंट a = 5; के रूप में माना जाता है int a = 5; एक पुराना सी नियम के कारण जो आपको int वेरिएबल्स और इंट-रिटर्निंग फ़ंक्शंस घोषित करने के लिए अनुमति देता है, उनके प्रकार को स्पष्ट रूप से निर्दिष्ट किए बिना (यह निश्चित रूप से अच्छा नहीं है सी का आधुनिक संस्करण)। ध्यान दें कि यह केवल किसी फ़ंक्शन बॉडी के बाहर के दायरे में अंतर्निहित int के साथ एक घोषणा के रूप में माना जाता है। आप इसे आरंभ करने के साथ घोषणापत्र के संयोजन से ठीक कर सकते हैं, जैसे: स्थिर int a = 5;

javascript - When testing angularjs controller - Can't find variable: module / inject by chutzpah -

मेरे पास angularJs नियंत्रक है angular.module ('app.ctrl.guests', [])। नियंत्रक ('मेहमान नियंत्रक', ['$ scope', '$ http', '$ location', '$ टाइमआउट', 'मेहमान सेवा', फ़ंक्शन ($ दायरा, $ http, $ स्थान, $ टाइमआउट, अतिथि सेवा ) {$ Scope.tiles = [];}]) और चमेली परीक्षण /// & lt; संदर्भ पथ = "~ / लिपियों / Angular.js "/ & gt; /// & lt; संदर्भ पथ = "../../ ProjectWeb / लिपियों / ऐप / अतिथि / मेहमानों Ctrl + js" / & gt; /// & lt; संदर्भ पथ = "~ / स्क्रिप्ट / कोणीय- mocks.js" / & gt; /// & lt; संदर्भ पथ = "~ / स्क्रिप्ट / jasmine.js" / & gt; 'सख्त प्रयोग'; वर्णन करें ('app.ctrl.guests', फ़ंक्शन () {var गुंजाइश, नियंत्रक; पहले प्रत्येक (कार्य () (मॉड्यूल ('app.ctrl.guests')}) पहले (इंजेक्शन (फ़ंक्शन ($ रूटस्स्कोप, $ नियंत्रक) {स्कोप = $ रूट स्कोप। $ New (); नियंत्रक = $ नियंत्रक ('मेहमान नियंत्रक', {$ scope: scope})}})); (...

php - laravel redirection to splash page during testing -

I've spent hours with it I'm just starting with Larwell, a new project I I want to be able to create a system where a certain user can access the site during the development of the site. The rest of the public is sent to the Splash page. I plan to make a secret path which sets the toggle in session. If this toggle is set then the user can use the entire system. Otherwise, they are redirected to the Splash page. The problem is that I can not redirect it. I bootstrap-> The standard header ('Location: www.thesite.com') is adding code to the start.php file Starting strange things that I Do not understand. If I return to : to (htmlspecialchars_decode ($ url)) returns this error: BadMethodCallException method [run] does not exist on redirection. I do not know exactly what's going on or how to fix it. Why is redirection script returning an error? Do not start.php is the right place? If so, how can he achieve his purpose within the larahle? ...

javascript - Nodejs ssh2 run multiple command only one terminal -

I am having a problem while coding the ssh2 module in my project. I tried to run a remote Linux system to run several commands on one terminal. For example "BC" command gives you the original calculator and you can run it for basic tasks. But you need to be aware that when you are using that kind of processes (it will accept two or more inputs and respond as a result). I need to create a system like working with websocket ssh. When a websocket received an order, the SSID node needs to execute this message and the module needs to send it feedback via websocket.send () I node.js websocket , Using ssh2 client My code here: #! Requires / usr / bin / node var connection = ('ssh2'); Var conn = new connection (); Var command = ""; Var http = Required ('http'); Var requires WebSocketServer = ('websocket'). Server; Var firstcom = true; Conn.on ('ready', function () {console.log ('connection :: ready'); // conn.shell (onShe...