Posts

Showing posts from March, 2015

oop - Not using "self." to access class properties in Matlab -

I have a class whose properties are often accessed by many nested indexes, it works fine, but the code is ugly And unreadable: self Beta (self indx) = self Beta (self india) + self Self * self. Stage (self index (self.sv)); In order to "experiment" with "in" or other languages ​​in Python, there is a command to avoid "yourself."? Thanks You can try to use the module for something similar: This does not look like a very practical solution for me, but I think if in the sentences given above, in reality your eyes are bleeding, then considering that path You can. You will be able to help this link specifically to determine what MATLAB can do and not in context of OOP: Ever Do not try code too languages ​​like they are other languages ​​:)

javascript - Is there a way I can fadeIn custom content of a InfoWindow? -

I do not have a listener set for markers on click , I did not create a Google map (V3 API). When it is clicked, first I load infowindow with "loading" GIF with "simple" HTML. Then I call a method that grabs the contents through ezax and infowindow.setContent (call) data) with loaded data . But transition between animated GIF and new stuff is ugly. Is there any way I can fidin / fade it out? is the code for the function that loads the content: function load_infowindow_content (infowindow, user_id) {$ .ajax ({url: site_root + 'usuario / Map_infowindow / '+ user_id, success: function (data) {infowindow.setContent (data);}}); } looked around and found nothing. thank you in advanced. You can attach your data to a single container with a specified ID and then give it Fade by using jQuery formulas . FadeIn () method Since the object was not invisible first, you may have to hide it first, so that jQuery does not show the transition from the c...

parse.com - Unable to connect iOS application in Swift to Objective C files using bridging header -

I am trying to add pars to my iOS application. I have #import & lt; bridging headers and bridging headers. Parse / Parse.h & gt; When I try to call any parsing function in my app Adeliet swift, Glissi Xcode 8-Beta 3 can not auto fill or even pars, Even below the bridging header file! It throws an unknown parse error I have imported all the frameworks to give important instructions to pars any thoughts or should I completely avoid Xcode8 completely and go back to Android coding like the rest of the world? Clean, clean build folder, rebuild and you should be able to use your imported framework.

node.js - Error on website deployment to Azure keystone.js -

I was trying to make a plain keystone.js starter application built in Ned.Jes in the sharing tier of the Ezoor website I am I am getting an error after deployment The page can not be displayed because an internal server error has occurred. I could have thought, because the main server file was called keystone.js so I named it index.js . Did not fix it Next, I thought this could be an issue because the mainstone defaults for port 3000, so I added the port information to my index.js file. Here's how: // Configure your project's environment by customizing the .env file in the root folder of your project. Requires ('dotenv') load (). // Required keystone var keystone = ('keystone'); // See the beginner Keystone // with the configuration of your project http://keystonejs.com/guide/config // for the available options and documentation Keystone.init ({'name': 'Magic site', 'brand': 'Magic site', 'less':'...

sql - Nested cursors, multiple result sets -

I am using SQL Server stored procedure to generate Excel reports. Basically, each "entry" in the report has three parts: objects, observations and points. The comments are in reference to the primary key of an object, and there is a reference to an overview of the number. It is a connection between parts (sorry if my terminology is closed, then I am being used to write in C # or Java, but still I am learning SQL.) I want to The output should be like this: - Object - All objects associated with that object - Under each observation, all points associated with that observation should be And repeat for each object. I am using a cursor to create all the comments with each object, but I can not get points to come under every observation I have read all on the internet that the cursor Bad, and I think nested cursors are very bad but I still have it. If you know a better way to do this, please let me know. I am open to completely reconstructing this if necessary. ann...

javascript - Meteor - Cancelling a Server Method from the Client -

I am counting the database through a server method, the user can choose how the count should be counted and then the method Use My problem is that counting can take some time and a user can change his mind, while the method is running and counting a different request. Is there any way that I can cancel the application process and make a new count? I have thought that. Blocked () may work; This will allow a new method to run, but it will not cancel the old method. I also considered pre-counting and then using only one lookup, but there are too many selectors combinations. Here's my code, it's quite easy: // server Meteor.methods ({getFilterCount: function selector} {return clMaBldgs.find (oFilterSelector, {}). Count ();}}); // client meteorite ('getFilterCount', opilator selector, function (error, result) {// some things}}; It is not possible to cancel the call method made from the client. But if your method is called multiple times in a short interv...

Install PHP cURL on Amazon EC2 Micro Instance -

Image
I need to install PHP curl on my Amazon EC2 micro installation. I need a terminal Code found, which should be able to install PHP curl through cyst. install sudo apt-get php5-curl but I get many 403 prohibited errors I'm not good with Linux so I did not really understand what these errors meant. This is a screenshot of all errors 403 The source is from the repository, Try sudo-apt-get update before installing If it still does not fix it, then add these lines to /etc/apt/sources.list deb http://us.archive.ubuntu.com/ubuntu Clear major multi-level Universe Deb http://us.archive.ubuntu.com/ubuntu Lucid-Security Multi Broadband Burger Debit http://us.archive.ubuntu.com/ubuntu lucid-updates Main Universe Universe

Finding the USB VID/PID associated with a CoreAudio device on OSX -

I need to determine which physical USB device (via VID / PID / SerialNumber) is an arbitrary CoreAduio AudioDevice CorodeAudio allows various types of device proprietary such as transport types (USB in my case), a UID (unique in sessions and machines), and some configuration strings. Both audio parts of IOKit and CoreAudio represent a representation for audio devices but it is not clear how to bridge the gap between the two (looks like I was able to query AudioDevice for IOAudioDevice Should be ...) I found the following from IOUSBDeviceInterface Code> AudioDeviceID : There is no direct mapping between the two, but most of the time The best way would be to: Get the UID string for the device from HAL Create a matching dictionary that searches for IOAudioEngine objects when Until you meet with the UID property you meet with HAL, repeat through the matching services To find the USB object running on IorGDI from here

facebook api php news feed get large picture -

Need help connecting news feed pictures to my members site and getting bigger photos from news feed. This is my code to get news feed images $ json_object = @file_get_contents ('. $ Fb_access_token); $ News_feeds = json_decode ($ json_object, true); foreach ($ news_feeds ['data'] as $ news_feed) {echo '& lt; Img src = "'. $ News_feed [' Image ']." "/" . ' ' This fixes news feed images, but all different sizes. No Help will be good! I've looked around a long time and still can not get the answer? This is an example of a Facebook news feed array. I am trying to take. [id] = & gt; 1423830694520861_1508536172716979 [from] = & gt; Array ([class] = & gt; public figure [name] = & gt; Dan Blezerian [ID] => 1423830694520861) [to] = & gt; Array ([ If] = & gt; array ([0] = & gt; array ([category] = & gt; public shape [name] = & gt; Jen celter [id] = 244183679061369)) [mess...

asp.net mvc - reuse kendo grid but change action -

I try to reuse a condo grid on MVC by calling it another view as a partial view I am here. Read the property properties of the grid's Ajax attribute as set as follows: @ (Html.Kendo (.) Grid & lt; MyModel & gt; () Ajax (.) Read ( Read = & gt; read.Action ("MyMethod", "MyController") .data ("getData"))) However, I want this grid from any other view If it is said, then 'some other' method and 'some other controller' changes from 'microcontroller' to 'mammothi'. how can I do this? Thanks! I have an alternative solution for what you are trying to achieve, please below See: In all the ideas you are trying to use all the grids, set the TempData value below: @ {TempData [ Next, you need a normal master reading controller operation, which is based on the above tempdata value to another controller. By calling Ga. In your case, in a scenario, it will be called 'Maemanthi' of 'Miantra...

python 3.x - Django ImageField link to wrong directory -

मेरा Django व्यवस्थापक पेज सही निर्देशिका (... / परियोजना / मीडिया / आलेख /) में छवियों को सहेज रहा है, लेकिन जब मैं संदर्भ के लिए Article.image.url का उपयोग करता हूं कि एक टेम्पलेट में यूआरएल तब http: // स्थानीयहोस्ट /article/image.jpg को इंगित करता है लोकलहोस्ट / मीडिया / कार्ट / सीटी। जेपीजी मैंने संभवतः 4 घंटों में कोई लाभ नहीं उठाया है। मैं क्या गलत कर रहा हूं? पहले से धन्यवाद यह मेरी चिली url फ़ाइल है: P> urlpatterns = पैटर्न ('', url (r '^ admin /', शामिल करें (admin.site.urls)), ... (r '^ site_media / (? पी & lt; पथ & gt; *) $ ',' Django.views.static.serve ', {' document_root ': MEDIA_ROOT}),) और यहां प्रासंगिक सेटिंग्स जानकारी है: STATIC_ROOT = os.path.join (os.path.dirname (os.path.dirname (__ फ़ाइल __)), 'ऐप', 'स्थिर') STATIC_URL = '/ app / static /' MEDIA_ROOT = os.path .join (os.path.dirname (os.path.dirname (__ फ़ाइल __)), 'मीडिया') MEDIA_URL = '/' और ...

android - Best way to manage fragments back stack and back button -

I need to pile back the piece and handle a slightly different button from the normal button, which is a circle, in every back stack Throw the entry of the piece. Please assume that you have a sliding menu with three items; Profile, Network, and Workplace Each list displays a list with the list listed and when you press the item that you see. then the heap behind [list] & lt; - [View] The problem is that the way back stack works (or my understanding or misuse of it), because the user is pressing the app on different items, they are behind the heap Will add an entry on it, it gets longer and more and if the user wants to go back to the home screen on the back button, then there is a need for every single entry by index 0; Like [list] & lt; - [View] & lt; - [List] & lt; - [view], etc. My question is the best way to handle this requirement? When users choose one of those items from the sliding menu, should I remove every single piece from the back? Should I have...

html - Simple example of Zurb Foundation source ordering classes (w/fiddle) -

After I'm missing something about the use of source order sections in Foundation 5 ( * - push- * and * - drag - * ) I have a JSfiddle as it describes my understanding and the gap between the world The case is very simple: I have a row with two columns on a large viewport, I want them in width to every 6 columns. At the small viewport, I want them to be stacked, in every 12 column width, with the second column already before it. [A] [B] --sresize -> [B] [A] What do I get [A] [B] --resceaj -> ____ [A] [B] ____ Here the code is again & lt; Body & gt; & Lt; Div class = "row" & gt; & Lt; Div square = "big -6 small -12 small-push-6 column large reset-order" & gt; & Lt; P & gt; A: On the big screen, I should be the first element in the line, taking half the grid, i.e. 6 columns & lt; / P & gt; & Lt; P & gt; Again, on the small screen I should have another element. & Lt; / P & gt; ...

php - Compare column to an array of data -

I have tried to achieve something in Laravel, but it is not possible so far. If this is possible, please let someone - & gt; Where ("Note_ id", "! =", Array ('1', '2', '3')) should help - & gt; first (); Thank you in advance Use whereNotIn , as explained in the document. Model :: whereNotIn ('note_id', array (1, 2, 3)) - & gt; first ();

tomcat - Docker container inaccessible from host -

I am trying to run the Tomcat application server on a Docker Container. The server is working, but I can not access it from the host machine. Command which I'm going to start the container Docker Run-D-P9080: 9080 Example / Server I can type curl localhost: 9080 on a shell inside the container so that the server should yield. This works correctly though, if I try this from the host machine then I get the following error message: curl: (56) failure while retrieving data from colleagues If I repeat the process with a normal Apache server, then everything works the same way as

javascript - Single Page Web-App Menu Selection -

I am developing a single page web app frontend using bootstrap. I have a menu on the side of the page and I want to select any item highlighted. HTML: & lt; Div class = "col-sm-3 col-md-2 sidebar" & gt; & Lt; Ul class = "nav nav sidebar" & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Get Snippet & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "active" & gt; & Lt; A href = "#" & gt; Tag & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Rules & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Macros & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; History & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Displa...

javascript - The input field is not displaying it set value -

I have this button next to it and behind it this is the next button: $ (document) .on ('click', '#next_form', function () {emailAdress = $ ("# email"). Val (); $ (". Column_1"). Flip ({direction : 'RL',}); $ (". Column_2"). Flip ({direction: 'LR',});}); Back button: Then I can return the flip and enter the value again: $ (document) .on ('click', ' $ $ (". Column_1"). $ (". Column_2"). $ RevertFlip (); $ ("# Email"). Val (email address); console.log (email address);}); But the input field is not displaying the value when I do the logon console which is running correctly but it displays ... any thoughts? You should enter var Fname, emailAdress, phoneNumber; must be excluded from documents .

R table function -

If I have a vector numbers & lt; - c (1,1,2,4,2,2, 2,2,5,4,4,4) , and I use 'table', me Name 1 2 4 5 points 2 5 4 1 What would happen if I want to include it 3 or normally, then 1: All the numbers from max (number) have not even been represented in numbers. Thus, how do I generate an output such as: name 1 2 3 4 5 digits 2 5 0 4 1 If you want to add those numbers If you are not there, then you should make a factor and clearly set the level. The table will return a calculation for each level. table (factor (number, level = 1: maximum (number))) # 1 2 3 4 5 # 2 5 0 4 1

javascript - node.js automatic logging with metadata -

I have a node. I want to create JS log decorator that works like this (pseudocode warning): log = function (f) {return function () {log (f.file, f) .line, F.Class, FNN, Arguments) Return Fiscal (this, Arguments)}} Is there any way to access the information given above? I'm going to heavy logging, so throwing a fake exception and reading trace is probably not viable (or is it?). Note: By f.class I mean the name of the function in which prototype is. In addition, I am using the coffee-script , if this is the case You throw is not an exception, var stack = new error (). Stack is enough to parse file, line number and class name from there. But The problem is, that this function tracks calls, so to get the proper information for the decoration function now start functioning error or something in the class needed . To do this in the decorator, you can only get information about the file / linum where the function was decorated, and where the function was not...

Docker images across multiple disks -

I am going with the docker, and I have found that I can put the main image repository on a separate disk (Symlink / Var / lib / docker in another location) However, now I want to see that there is no way to divide into several disks. Specifically, I have an old SSD that is at a faster pace than reading, but it is not left until it is written too much unless it is bracket. It would be awful if I can store temporary images here, then keep my writable images in a different place that they write. Is such a thing possible? How do you split the repository? Perhaps you can do this by using the AUFS driver to start the initial layers in the SSDA, Making and pointing to Simunx - I'm not sure, I had no proper view of the work of this storage driver. DKKMP is not feasible with thin, BTFF and overlaws AFAICT: Both the Docker DM-thin and BTRFS drivers use a block device snapshot system, one layer over the other Make them. Here your best bet is to include SSD in the storage p...

php - Listing entire folder->subfolder structure of Dropbox Account (Dropbox API) -

The fastest way to recover the drapebox folders of authorized users starting at "/" (read best performance) The path I'm trying to find I'm open to using PHP or Python. Here is my code (PHP): function db_recursive ($ dbxClient, $ path, $ folders = array (), $ call = array ()) {$ FolderMetadata = $ DbxClient-> GetMetadataWithChildren ($ path); $ Is called $] = $ path; ($ Contents ['contents'] $ content Content ['path']] = $ content ['path']; }}} Foreach ($ c => $ folder as folder $) {if (in_array ($ k, $ call)) {continue; } And {db_recursive ($ dbxClient, $ k, $ folders, $); Problems going on in: 1. GetMetadat with tried using the delta method instead of children, but give about 5 minutes of approximately 80,000 entries (as a result of using PHP or Python in the same way). 2. With GetMetadat with children, I am running in 'Maximum Function Level Errors (it has increased to 300) Does anyone have a job to get quick access to a...

jms - Distributed Transaction management in Core Java application -

Text after "div class =" itemprop = "text"> Is it possible to use the core distributed in Java application to the transaction manager that does not run inside any container? I have an application that reads messages from JMS queue and writes it in the database if the database is written then the full transaction should roll back. I think of using JOTM But I'm not sure how to configure it, it is also not certain that such a configuration is possible at all because the application does not run on any server. Any suggestion would be really helpful. Thanks in advance. After text "itemprop =" text "> How to configure JTA outside of the container. JOTM is one of the options described. For your case, it will be easy to use Junk to JTA just use ChainedTransactionManager. You have almost the same effect with minimum spring configuration as configured below, and then @transactional (value = "chainedTransactionManager") on your l...

javascript - Get the exact child Table using Jquery -

I have a condition here ... I have content1 and content2 of the two div, each div has a table too. .. so I can get every table like this $ ("# content1 table") or $ ("# content2 table") , But I like it var x = "# content1" or "# content2" then something like that $ (x "table") Pass the ID in a variable and get the table ... any solution? The answer is in the example given by you. Just have to modify it a bit. var x = "# content1"; // Parent's name can be $ $ $ _ (x + "table") Hope that helps.

How to read json POST value in php -

Image
When adding grid line data to me, there are an exclamation grid with the line editing plugin $ json = file_get_contents ('php: // input'); $ Input_data = json_decode ($ json, TRUE);

install - patch uninstall not working properly developed using InstallShield -

I've created a patch for my product using Installshield when successfully updating product files when the patches apply However, while trying to uninstall the patch, it is successfully removed from the unveiling or new messaging del, but by some means some DLS or XE that is modified due to patches, do not return to the uninstallation of the patch Return Hey. When I look at the version, date and time of some DLL on which the patches were applied and even after the installation of the patch, the version is new. This means that DLS is not returning back. Does anyone help to understand why some of my DLS patches are not returning after uninstall. I have followed the rules for uninstalling the patch correctly. Open a command prompt (in the form of an administrator), and command Sfc / scannow It may be

ruby - Package app in Shoes4 -

I used Shoes 4 to create a GUI for my Ruby app. Now I'm packing this app, but something is wrong. I followed this for the package. 'Rack Mani' gave me: Rak aborted! No Rakfail found (search: rakefile, rakefile, rakefile.rb, rakefile.rb) org / jruby / rubykernel.java: 1081: `load 'org / jruby / in rubyKernel.java: 1101:` eval' / users / 'install gem' Pkg / shoes-4.0.0.pre1.gem: I was: error: a valid gem 'pkg / shoes -4.0.0.pre1.gem '(& gt; = 0) any repository ' bin / shoes -p swt: app path / to / directory-of / your- shoes-app.rb 'is still packed my app (I though a Mac), the app will not run on Mac and he said' unexpectedly closed "the funny thing is that the app well in Windows 7 Sector walks. Am I doing something wrong? How should an app work on Max? Thanks in advance packaging is still a child and sad time Breaks up. We fixed some packaging bugs in previous months (especially a Mac) If the problem ...

qpython not able to download requests module -

"postprint" itemprop = "text"> I am importing my script android. In the request module and so I have installed the tp request module on the programming Python I'm using qpython for pip.When I request to run the PIP command, I get the following error: error creation / lib.linux-armv71-2.7 / request / auth.py: action I do not allow qpython I have this problem twice when installing requests And so I'm not able to run my script. Manually remove, and move it to your lib / site-package / request / folder It may be necessary, from there the dragon should be able to import it. I think the package is not available for qpython, it can work out of the box or it may still need to migrate. After installing qpython on my current device I was able to open the app, go to my QPython - & gt; Use pip_console.py for scripts and to use it, but as you said it fails I'm going up my recommendation later. My installed directory is /sdcard/com.iphipal.qpyp...

firefox 31 the javascript submit not working -

Do not submit JavaScript as a problem in Firefox 31. This product arises on the product page, after selecting that product, it is not navigating on the cart page or the wishlist page. I also tested it on other browsers and Firefox 30 and it works fine on them. I also tried to disable other plugins but it did not work I debug the code snippet below and its variable is getting the desired value according to logic, for example it is just entering the location When the user has checked the field. I would be grateful for any quick solution. echo " Do you have the input field in your form called 'Action' any chance? I have a bug with some old code in Firefox today. 31. In previous versions of Firefox, the 'action' attribute of type was resolved, but version 31 has changed its Instead, solve an input field called 'Action' on the page. I had to work again using jQuery: $ ("# defForm"). Attr ("Action", SRL); Alternatively, I c...

Android.bat file is missing in sdk\tools folder also i do not having AVD & SDK manager in tools so i can replace them -

I android.bat your backup SDK also copy, but it's still not working. thank you in advanced. Maybe missing all content sdk / tools folder? The best way to solve this problem is to go to the SDK / temporary folder. There you will find a zip file named "tools_r24.0.1-windows" (version number will be different) Copy it to a location and remove it. Inside the extracted folder you will have a folder named 'Device' Copy that folder to sdk / sdk / and switch to the current device folder! SDK and AVD will work again and all your virtual devices will be restored!

javascript - Convert async.waterfall to Bacon -

I am trying to integrate backange in my existing node project, in this project, I used Async to handle callback. One of the methods is async.waterfall that I want to close it now, but it does not. Using Nod CallBack (...). My code NodeJS: async.waterfall ([function findCondition (callback) {conditionBoundary.findById (condition.id, callback);} function updateCondition (loadedCondition, callback) {if (loadedCondition ) {condition.created = loadedCondition.created; conditionBoundary.updateCondition (position, function (error, NumberOfDocs) {if (error) {return callback (error);} if (loadedCondition.prettyUrl & amp; & amp ;! loadedCondition.prettyUrl == condition.prettyUrl) {return callback (no, really, LoadedCondition);} callback (zero, false, null);});}} function updateLinkInConditionDescription (isUpdated, loadedCondition, callback) {if (isUpdated) {conditionBoundary. FindByPrettyUrlInDescription (LoadedCondition.prettyUr L, function (error, docs) {if (error) {return callback...

ios - midway x and y coordinates of an iPhone -

I am trying to figure out where a tap is located on the App view. Some people have said I say 160 for X, but they do not know about Y. For now I just need X, but y is not aware of knowing. - (Zero) touches: (NSSET *) touches the event: (UIEVENT *) event {UITT * METCH = [touches an object]; CGPoint aPoint = [myTouch locationInView: self.view]; // Touch the X Codes of Touch if (aPoint.x> = 160) {// right side Player2.image = [UIImage imageNamed: @ "Person1.png"] touches; [Nstimer scheduled timer with time interval: 0.25 target: self selector: @sillector (change imageRight) userInfo: zero repeats: no]; }} I have to do this to differentiate between left and right edge of the scene. You should not hardcode the dimensions of the tools in your code, some more android developers have a lot of conflict have to do. Width is the same for iPhone 4 and iPhone 5, but the height is different Also, what happens when the orientation changes? You should request dimension...

Eclipse HTML5 Project - JavaScript Code Assist Only Works In Certain Cases -

Image
I am using Eclipse Juno for the development of a stable web project. My project uses several different javascript files One of the files is a function in: function IconData (size, url) {this.size = size; This.url = url; } I have another task which gives an IconData type of object: functionPageInfo () {this.iconData = function () { Var iconData = new IconData (); IconData.size = 10; IconData.url = "http://somepage.com/image.png"; Return icon data; }} In another JavaScript file, I can create an example of PageInfo and call the function icon: var page = new PageInfo ( ); // popup stuff var = page.secondata (); If I type the icon then to start the code help CTRL + SPACE I get the following message popups in eclipse: No default proposal no template proposal However, if I make a new example of icon data I like: var iconData = new IconData (); Then I type iconData. Then the CTRL-space code is assisted and shows me all the possibilities: M...

javascript - Placeholder text is returned when using value property of input text box in form -

I am using webshim to provide html5 placeholder functionality in my text box in IE8. This works fine when I submit the form - the field is empty, if the user has not entered anything. But when I tried to make an aggressive request by requesting an AJAX request, the following line of code document.getElementById ('idOfTextBox') value How can I avoid this behavior? You can set it as optional if (Document.getElementById ('idOfTextBox') .value == 'Placeholder') {document.getElementById ('idOfTextBox'). Value = ''; } Basically, if textbox value = placeholder, this value will be set to '' (empty string)

javascript - How to calculate and place circles on an rect area? -

Image
I am trying to draw some charts on the canvas area. Following my problem ... I have to draw 1-4 (or more) circles, the canvas size is like 500 x 400 px. How can I calculate the maximum radius of each circle to keep all the space on this canvas now and how can I get the position of each circle (center X / Y)? So can each circle be optimal in some margin area for each other? Here are some example screens that show you what I mean ... very much Thanks! Maximum radius you can use var numberOfSections = 4 Are; Var width = 500; Var Height = 400; Var R = Math.sqrt ((width * height) / numberoffEXaction) / 2 var MX = MathRed (width / (R * 2)); // Maximum amount of squares, which can fit on width MY = Math field (height / (R * 2)); // The maximum amount of squares that can fit at height is skipLlast = 0; Var numOfCalculatedCircles = MX * MY; If (numOfCalculatedCircles! = NumberOfSections) {if (numOfCalculatedCircles & lt; numberOfSections) {console.log ('numOfCalcul...

vba - Replace a word in text file with another word using macro -

The code below is a word for me ("this") in the second file ("he"). Likewise, I need to change another word in the same text file. My requirement replaces the word "this" with "that" and replaces "to" with "to". Can you modify according to the code given below? Sub-ReplaceStringInFile () dim objFSO object dim as objFil object as obsolete object dim strfileName string dim strfolder string dims SstrAll string set form as objFSO = CreateObject In the form of ("script .filesystemobject") strfolder = "c: \ macro \" strfileName = Dir (strfolder & "* .txt") strfileName & lt; & Gt; VbNullString objFil = objFSO.opentextfile (StrFller and StrFileName) strAll = objFil.readall objFil.Close obzipil 2 = objFSO.createtextfile (strfolder and strfileName) Change objFil2.Write (strahll, "THIS", "THAT") set objFil2. This string changes "Line" itemprop = "text...

grand central dispatch - iOS: UIActivityIndicator in navigation bar not stopping -

I wrote a small test app that does not work. This is my storyboard: This is my code: - (void) viewDidLoad {[super viewDidLoad]; UIActivityIndicatorView * AI = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: UIActivityIndicatorViewStyleGray]; UIBarButtonItem * rightButton = [[UIBarButtonItem alloc] initWithCustomView: O]; Self.navigationItem.rightBarButtonItem = rightButton; [AI initialization]; dispatch_async (dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^ {[NSThread sleepForTimeInterval: 5]; NSLog (@ "! Stop"); [stopAnimating AI];}); } This work result is:? What is wrong It went solved a similar problem: [spinner start allowance]; dispatch_async (kBgQueue, ^ {// ... (dispatch_get_main_queue (), ^ {[spinner stopAnimating] other things in the background dispatch_async;});});

html - Social links opening in same window -

I am setting up my new website, I am using free portra theme. STD This is a widget free template. I managed to add a widget, but now my social links are always open in the same window. I would like to open them in a new tab or window, I & lt; A target = "_ blank" href ...... & gt; & Lt; / A & gt; Trying with but no luck The only thing to do half of the work which opened my link in a new window, but also opened the same window in the background in that background. I could not find this. Please help me find that it has expired somewhere through a preloader, but by accepting my information, it can not reach far. And Google has not given any solution The site is link (so I hope to get this code) The site has not yet been published, so the content Please do not see, T is not defintive; -) Thank you in advance I tried all these, no luck, otherwise I am not posting my question here ... duh & lt; One goal = '_ blank' href ...... &...

c# - Is there any option to make get encoding return the required number of bytes matching the target byte array -

I have a byte array defined as byte [] goal has gone; Now when I call target = encoding.Ascii.GetBytes (input); Returned bytes are only 3. But I need a 4-byte array. Is there any way to back 3 bites padded with 0 bytes so that I get a byte array of length 4 The simple way to copy the temporary byte array is: byte [] target = new byte [4]; Byte [] bytes = encoding ASCII.GetBytes ("abc"); Array.Copy (Byte, 0, Goal, 1, Bytes Lang.);

xml - xslt transformation and limiting -

& Gt; मानक एसटीडी & lt; / फ़ीचर & gt; & लेफ्टिनेंट; विशेषता नाम = & quot; समूह & quot; & gt; एडमिन & lt; / सुविधा & gt; & लेफ्टिनेंट; विशेषता नाम = & quot; अमैक & quot; & gt; प्रायोगिक & lt; / फ़ीचर & gt; & लेफ्टिनेंट; विशिष्टता नाम = & quot; ब्लैबा & quot; & gt; BLABLA & lt; / फ़ीचर & gt; गुण 1 नाम = "रंग-आकार" & gt; मानक एसटीडी & lt; / property1 & gt; & lt; & लेफ्टिनेंट; प्रॉपर्टी 2 नाम = & quot; समूह & quot; & gt; एडमिन & lt; / property2 & gt; & लेफ्टिनेंट; प्रॉपर्टी 3 नाम = & quot; अमैक & quot; & gt; डेनईम & lt; / property3 & gt; मैंने कई एक्सएसएलटी कोडों की कोशिश की लेकिन इसे वांछित आउटपुट में बदल नहीं सके। आपकी मदद के लिए धन्यवाद मेरा आखिरी प्रयास सफल रहा: & लेफ्टिनेंट; xsl: परम नाम = & quot; pCount & quot; / & gt; & लेफ्टिनेंट; xsl: परम नाम = & quot; पी वेल & quot; / & gt; ...

jquery - How to store like objects in javascript -

I am trying to create a collection of objects in my JS code, and there are two ways that both are logical. I'm wondering if there is a 'best practice', and why I did not find much about it, though it seems a fundamental question. Let's assume that they are the objects of color, the value of color is imaginary There are $ jQuery Option 1: Identifier as property I call 'database methods'; Each object looks like a table row and contains all fields related to that line color = [{name: "red", hex: "ff0000", hue: 34} Add color: colors.push ({name: "name:" blue ", hex:" 0000ff ", hue: 100}] Purple ", hex:" ff00ff ", hue: 100}); Get color by specifying: redObjs = $ .grep (color, function (c) {return (c.name ==) = "Red");}); // array // simple way with 1 element? Hexofrex = red oz [0]. Hacks; Specify the color: hueObjs = $ .grep (color, function (c) {return (c.hue = == 10...

java - using maven pom while creating jar:test-jar some times it says JAR will be empty - no content was marked for inclusion -

With test classes jar: celebration: testing-jar sometimes during jar It says: There is no test class in test-jar, but sometimes the correct test jar is made with all test classes. To test the test module without exam classes, I need to mention in my pom (compiled only) "post- Text "itemprop =" text "> This can happen when classes are not compiled in their output directory. For example, if you select mvn install (whichever compile triggers the phase) and then mvn jar: test-jar / code> you will get a jar with test classes, but if you type Run mvn clean and then mvn jar: test-jar will get a message about empty jar and the generated jar will be empty.

wordpress - Isotope No Results Message for Combination Filters -

I'm finally reaching out for help. I am trying to get results message to show in my isotope image gallery for one week, only with a small part of the fate. Working with me at one point was an example, but the message is not hidden until the animation is complete, so it does not look good at all. Surely someone has a solution. I appreciate it if someone can help me I have a test site which I will link here in just one second. For now, the first half of my isotope configuration file is '.message-div' with my '#sotopeGallery div' CSS with 'Display: None.' jQuery (window) .load (function () {var $ container = $ ('# isotope gallery'). Picture loaded (function () {$ container.otope ({items selected) : '.photo', masonry: {columnWidth: 161, gutter: 10}, duration of infection: '0.6s'}); // filter // var filter = {}; $ (' # isotopefilters'). (' Click on ',' menu item ', function () {var $ this = $ (this); //...

jquery mobile - How to find the height of the virtual keyboard in PhoneGap? -

Image
मुझे वर्चुअल कीबोर्ड के ठीक ऊपर textarea और बटन को ले जाना है, जैसे: इसके लिए, मुझे कुंजीपटल की ऊंचाई जानने की आवश्यकता है I मैंने $ (खिड़की) का उपयोग करने की कोशिश की है। हाइट () विधि, लेकिन अजीब तरह से, यह तब भी बदलता नहीं है जब कीबोर्ड खोला जाता है। कोई सुझाव? आईफोन के लिए आईफोन 4 एस (और पहले) लैंडस्केप कीबोर्ड (अंग्रेजी) 480 x 162 अंक आईफोन 5 पोर्ट्रेट कीबोर्ड (अंग्रेजी) 320 x 216 पीटी आईफोन 5 लैंडस्केप कीबोर्ड (अंग्रेज़ी) 568 x 162 अंक

asp.net mvc - Jquery popup window and persisting data on ActionLink click -

I have firmly questioned data on ActionLink click. I have a page and the user enters certain information in the input field. One of the fields uses jquery autocomplete and if the values ​​they are looking for do not exist, they can click on the action link to create it. A jquery popup window opens. On submission, the user is returned to the main view. The problem is that the previously entered data does not exist. My question is how can I achieve it, as well as to display the popup window. I tried to use Ajax.ActionLink but partial view does not appear as a popup window. Thank you in advance. After opening the popup window, you can send collected data from popups through javascript controller for. After saving the database controller, you can return the created unit or related fields as JasonResult and you can use those data to set the full field value. > After that you can close the popup using Javascript and you will not be able to lose data that was previously entere...

jquery - Code is not working for Scroll as i want it -

I'm using jquery to get an event scroll that will put some value in my div when window scrolls The code must tell me that this is wrong and how can I run it $ (window) .scroll (function () {var scrps = $ (this) .scrollTop (); $ ('Feedback') .html ('your scroll position is' + scrPos);}); Thank you in advance missing If the response is id then use # or use its class or # . To make the selector work in your code. $ ('response'). Html ('your scroll position is' + scrpos);

Why don't python interpreter use the file coding format for decoding? -

कोड बीले के कारण यूनिकोडडेकोड एरर होगा: # - * - कोडिंग: यूटीएफ -8 - * - s = "ä¸æ ????" यू = यू "123" यू = एस + यू मुझे पता है क्योंकि अजगर दुभाषिया ascii को डिकोड करने के लिए s उपयोग कर रहा है। "post-text" itemprop = "text" > इम्प्लिकेट डिकोडिंग नहीं कर सकता पता है कि स्रोत एन्कोडिंग क्या इस्तेमाल किया गया था। यह जानकारी स्ट्रिंग्स के साथ संग्रहीत नहीं है। आयात करने के बाद सभी पायथन को बाइट स्ट्रिंग के साथ 0-255 रेंज में बाइट का प्रतिनिधित्व कर रहा है। आप उस स्ट्रिंग को दूसरे मॉड्यूल से आयात कर सकते हैं या इसे किसी फ़ाइल ऑब्जेक्ट से पढ़ सकते हैं। तथ्य यह है कि पार्सर जानता था कि इन बाइट्स के लिए एन्कोडिंग किस प्रकार उपयोग किया गया था, सादे बाइट स्ट्रिंग्स के लिए भी कोई फर्क नहीं पड़ता। इस तरह, अंतर्निहित डीकोड पर भरोसा करने के बजाय, बाइट्स को स्पष्ट करना स्पष्ट रूप से को डीकोड करना हमेशा बेहतर होता है। या तो s के लिए एक यूनिकोड शाब्दिक का उपयोग करें, या str.decode () u = s.decode (का उपयोग करके स्पष्ट र...

java - Android Emulator Response:Unfortunately HelloWorld has stopped -

I'm following the following: I've created the default Hello World app, but when I try to run it load it Will not done! I decided to go to the next video and created a simple project called "Hello, world!" When a button is pressed, but when I run the project, I get this message on the emulator: Unfortunately hello world is closed. I've been trying several hours to find many threads, but no one lets me solve it, I'm using the latest ADT bundle (API 20) version 23. Here are two files: Menactivity.java package com ebook.helloworld; Import android App Import android.view.MenuItem; Import android.view.View; Import android.widget.TextView; Public classroom enhances main activity activity {@ Override Protected Zero (Bundled Saved Instance) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_main); } Public void onBtnTouch (see v) {TextView TV = (TextView) findViewById (R.id.textView1); Tv.setText ("Hello, World!"); } @ Ov...

AngularJS - dynamic naming using $index in expression -

I have a command in which I am creating many ng-form and I Based on the name $ index ( ng-repeat ) My problem is that I want to show an error container (which contains an error message) when the form is invalid, but I do not know how to properly reference the form. My code: & lt; Ng-form name = "innerform {{index index}}" & gt; & Lt; Label ... & gt; & Lt; Input name = "input" ... /> & Lt; Div class = "error-container" ng-show = "'innerform' + $ index.input. $ Invalid" & gt; // Show error message & lt; / Div & gt; & Lt; / Ng form & gt; me 'innerForm' + $ index.input. $ Invalid to asinForm5.input. $ Should be evaluated as invalid . I have made many efforts but I can not get it to work. What is the correct way to reference my dynamically designated form? please see here:

shell - Create elevated console/cmdline app windows - suggestions? -

Image
Looking for suggestions about the following, i.e. it will be the best language in etc. Etc. I have been entrusted with the task of creating some type of Windows shell / command line interface that will allow standard users to install specific applications (configurations by administrators) (installation requires admin / UAC upgrade) Safety protection Due to the user, the user can not get high privileges in order to be able to run Shell as a standard user and it has been created to hide hidden / encrypted credentials such as installs. P> The credentials used to install The end user will have to be encrypted. Ideally this is done by us It can be used to provide the customer with some configuration before installing it and to install it on a particular .exe or .msi (so we know about the need to set up an app, We are advised to name the installation and can log on and enter it in only one form so that app can be installed, then handover the server to the customer ...

sql - select table using complicated query -

Image
मेरे ऊपर के क्षेत्रों के साथ 2 तालिकाओं हैं। मैंने नीचे प्रश्न बना दिया है का चयन करें अंतर एच। होलीइड, एच। हालिदडेट , एच। डिस्क्रिप्शन, सीएच। क्लाइंट इड, मामला जब सीएच। होलीइडीआईडी ​​रिक्त नहीं है, तो 1 और 0 अंत तक इस्लाम के रूप में हॉलीडे एच छोड़ने वाले क्लाइंट हॉलीव्स सीएच पर एच। होलीइडआईड = सीएच। होलीइड आईडी लेकिन अगर क्लाइंट के पास है तो मुझे सभी छुट्टियों को IsHoliday फ़ील्ड के साथ सूचीबद्ध करना होगा छुट्टी के रूप में जोड़ा गया है, जब IsHoliday फ़ील्ड को 1 और 0 के रूप में आना चाहिए और ग्राहक आईडी से पूछताछ करते समय। "यहां छवि विवरण डालें"> क्लाइंट आईडी के पास होने पर मुझे सभी छुट्टियों को IsHoliday फ़ील्ड के साथ 0 या 1 के रूप में आना चाहिए प्रश्न नीचे की कोशिश करें, यह आवश्यकता के अनुसार काम करेगा:) SELECT h.HolidayId, HolidayDate, CASE जब क्लाइंटआईड शून्य है तो 0 1 एडी के रूप में छुट्टियों से छुट्टियां दूर करने के लिए एचआईएलआईडीईएच एचआईटीआईडीएच = एच। होलीइडाइड जहां क्लाइंटआईडी = 1 या क्लाइंटआईडी रिक्त है

urlencode - Python encode url with special characters -

I want to encode url with special characters. In my case it is: Å¡, ä, Ãμ, Ã, ø (this is not a limited list). urllib2.quote (symbol) gives very strange results, which is not correct. How can these symbols be encoded? urllib2.quote ("Grou Nlandsleiret, Oslo, Norway") a % 27Gr% B8nlandsleiret% 2C% 20OSslo% 2C% 20 Norway% 27 Use UTF-8 explicitly then: urllib2.quote (u "Gromondelierre, Oslo, Norway" .xod ('utf-8')) And always look at the encoding in the status of your file. A non-UTF-8 string needs to be decoded first, then encoded: # You got a string. S = s.decode ('latin-1') # (Or what could be the encoding ?? |) # Now "s" is a unicode object S = s.encode ('utf-8') #UNT-8 string As encoded. # Now "s" is again a string S = urllib2.quote (s) # URL encoded # Now the "s" is encoded the way you need it.

ruby on rails - Capybara string-array type fill_in fails with factory-created data -

I have a table table where a person has an array of emails in my schema rbb this looks like this : create_table "people", force: make true. T | T.string "email", array: true My person-model confirms the presence of email: valid: email, presence: true My People-Controller creates a person like this: def = person = person.new (person_params) @ person.email & lt; & Lt; Person_param ["email"] # 4 strong parameter to answer. Format | If @ person.save! Format.html {redirect_to people_url, notice: T ('app.people.successful_save')} format.json {Render: index, status :: created} and format.html {render: index} format.json {render json: @ my form.html. Email asking for email: = f.label: person, T ('app.people.email') = f.text_field: email Factory-piece that creates emails (among other things): FactoryGirl Factory: Factory: person does not do # other stuff here ... email ["mail1@example.com" "] # ......

vim plugin for node.js programming and syntax highlighting? (and how) -

In the case of highlighting Javascript syntax, I just downloaded the javascript.vim file and put the file in the related folder, and when I will highlight open .js files automatically syntax but how does node.vim work ?? I am working on node applications and where to put node.vim file for vim to implement node syntax highlighting ?? Thanks in advance .... Is it listed in its README Did you have trouble with them? I personally suggest meeting with Git. In the case of node.weem, it must be installed: git clone https://github.com/moll/vim-node.git ~ / .vim / bundle / node The node on the next startup to the germ. Will get vitamin and it will be initialized.

How to use Markdown in Elm: is it [markdown| or [markdown |? -

यहां मेरा कोड स्निपेट है: एल्म- lang.org के द्वारा प्रेरित। मुख्य: तत्व मुख्य = नीचे प्रवाह [[मार्कडाउन | # हाल्लो वर्ल्ड |], [मार्कडाउन | आलसी कुत्तों पर त्वरित ** भूरा ** बॉक्स * कूदता * |]] मैं खुद ही मार्कटाउन से परिचित हूं, जैसा कि खुद या खुद के रूप में। हालांकि, मेरे बारे में कई प्रश्न हैं कि कैसे मार्कडाउन एल्म के भीतर से उपयोग किया जाता है मुझे एल्म के लिए दस्तावेज नहीं मिल सका [markdown | क्या मतलब है? क्यों [markdown | - स्थान नोटिस - स्वीकार्य नहीं है? क्यों # हेलो वर्ल्ड बड़ा दिखाई नहीं देता? हैलो वर्ल्ड यह एक सही उदाहरण है, लेकिन मुझे नहीं पता कि मैंने सही क्या किया है। मुख्य: तत्व मुख्य = नीचे प्रवाह [[markdown | # हैलो वर्ल्ड |], [मार्कडाउन | आलसी कुत्तों पर त्वरित ** भूरा ** बॉक्स * कूदता * |]] स्ट्रिंग का इस्तेमाल करना भी गलत है, जैसा कि [markdown | "# हेलो वर्ल्ड" |] यह गलत क्यों है? मैंने सोचा कि एल्म को याद दिलाना मेरा सुरक्षा एक स्ट्रिंग होगा, लेकिन ऐसा लगता है कि मुझे ऐसा नहीं करना पड़ता। जैसा कि टिप्पणियों में ...

pdf generation - Make a standard PDF fillable -

I would like to convert a standard PDF into one to fill in the form and text field in my original PDF. Also, is it possible to add a "send-by-mail" button to a PDF boat? I like Ubuntu-compatible openers tools, but if I need I have to go for windows. Thank you very much, Using the free / open source template editor you used Define a separate file (in JSON format) in the fields (range and relative properties), where you want to write / fill dynamic data at any point with additional data on an existing PDF. Examples of JSON template format: (view) {"pages": [{* / mapping to first page, index 0 * / "Areas": [[/ / first field of first page * / "type": "text" / * or "checkbox" * / "height": 10.23 / * pt * /, "width": 23.456, X ": 0.1234 / * pt * /," y ": 2.45," name ":" field name "} / *, other regions ... * /} / *, other pages ... * /]} You can make it av...

performance - Perform a collection of commands as fast as possible in Java -

In my project I want to load a large amount of functions from the script into the archive and want to execute them later ( Maybe many times) without reading the script again. I need access to the works as soon as possible and thought of two ways to do this: Command pattern: My first idea is to store script commands as objects (Command pattern) inside the archive and all of them in each-loop when I need to execute the script. Although the code would be easy to read, I think that using all the different commands through the objects will cost a lot of performance and memory. (Command command: command list) {command.execute (); Collection of letters and switch episodes: My second idea was to store primitive variables in the archive such as four or one collection and one switch-case -Each loop. I will use primitives because I think its intensity, that is, string objects, so I will use a library like TRAV. I think that in this way it can be faster than the command pattern because the...

Offline Registration Form -

I need to create an offline registration form. I want to use these forms in different computers without any internet support . The form needs to be stored on the data. I was thinking of installing XMPP (localhost) on all the computers but if there is a problem, then this problem would be a problem. help please. What information is required after

javascript - after a maxim number - wrap all remaining li items into a ul -

I think it's a lot easier to understand what I'm trying to achieve by simply posting the code. But the idea is that I have around 8l items, but after 3, I would like to create a new thing called "more" and the remaining 5 items should be moved to a new ul which is a Submenu will act as HTML here & lt; Ul & gt; & Lt; Li & gt; ITEM1 and lt; / Li & gt; & Lt; Li & gt; ITEM2 & lt; / Li & gt; & Lt; Li & gt; ITEM3 & lt; / Li & gt; & Lt; Li & gt; Item4 & lt; / Li & gt; & Lt; Li & gt; Item5 & lt; / Li & gt; & Lt; / Ul & gt; Here's javascript $ ('.wm_main_menu'). Each (function () {var max = 3 if ($ (this). ('Li'). Length (maximum) {$ (this) .fund ('li: gt (' + max + ')'). (). End () .andend (' How should that happen ITEM1 Lt; / li & gt; & lt; li & gt; ITEM2 & lt; / li & gt; & lt; li & gt; ITEM3 ...