Posts

Showing posts from March, 2015

Ruby Reading file contents and pushing selected criteria into an array within an array -

I want to create a simple Ruby program that can read the contents of an html page and output two pieces of information Could Array For example, this webpage is: I want to be my output: output = [[Mid-Cambridge, $ 642,126] [East Cambridge, $ 611,436] [neighborhood nine, 1,068,284 dollars] [West Cambridge, $ 1,577,444]] I was thinking of doing this: And from there, pass each neighbor together in the HTML file in the array, rinse together and then repeat. But I think this may not be the most effective way, and I'm not sure how to get it. I have also heard that the 'search_in_file' function may be useful but it may not be necessary. You want to take a look, which is a great gem when you want to work with webpages. Need and want to remove the information from.

node.js - Module not found in node-webkit -

I recently started playing with node-webkit and tried to make a simple helowld + loaded a module Let me know that the module was 'getmac' (). This is my code: & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Var gram = requirement ('getmac'); & Lt; / Script & gt; & Lt; Title & gt; Hello World! & Lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1>! Hi & lt; / H1> We provide node.js & lt; Script & gt; Document.write (process.version) & lt; / Script & gt; Are using. & Lt; / Body & gt; & Lt; / Html & gt; I have installed the module with npm installed and have a node_module folder inside my app folder. All of my resources are inside the folder (there are no other folders...

c# - Can't expand nodes in TreeView (WinForms) -

I am filling programmatically TreeView (if this is the case in separate thread) . When I load TreeView on the window, then I want the first level of nodes for the extension. I almost everywhere (in the worker thread, in the main thread, Form handouts, etc.), but TreeView Object tree) = & gt; {Tree View. Nodes [0] .Nodes.Add (text);}); Public Static Zero UpdateTree (this control ctrl, action & lt; object & gt; code) {if (ctrl.InvokeRequired) {ctrl.BeginInvoke (code, (TreeView) ctrl); } Other {code.Invoke ((TreeView) ctrl); }} UPDATE 2 Private zeros btnFillTree_Click (Object Sender, EventArgs e) {...... treeDirectoryContents .Nodes.Add ("GeneralFolder"); ...... / I create threads () which fills the tree directory contents ...... tree directory content Expand all (); } As far as I know (.NET 3.5) you can separate the GUI Can not retrieve elements thread (you can prepare some data but use TreeView.Nodes from the main thread - Use Contro...

How can I spawn an Android crouton from the bottom? -

I am using the keyboardsperfter library as a replacement for toastes. I'm curious if any easy way to create a crouton from action bar instead of action bar is the easiest way I saw the configuration but I have some Not even saw what helped me. See: Where to go: ( In short: Available yet But you will only need to get the proposed bridge request and format it in the new Android studio source tree structure.

.htaccess - CDN Image Redirects (avoiding redirect loop w/ htaccess) -

I have everything and the ADS CloudFront is running on the CDN, the only issue I've done in relation to my image files They display all of them in the desired form, but do not have to redirect older versions. For example: An image @ http://domain.com/images/image .jpg directed and http: // Cdn.domain.com/images/image.jpg , but without the subdomain, the previous version is also accessible. I know that it looks a bit tedious, but all the "juice" going on the last image is not going to the new image because it is not compelling that redirect, ideally I have ever I put http://domain.com/images/image.jpg in the browser, I want to redirect it to http://cdn.domain.com/images/ image .jpg . I will make every single loop found online, because it can not read domain.com before. I know that this is a solid way to redirect to HTCS, which is for JPEGS in the images folder which already has the cdn are not redirected to subdomains, but I 'll find it anywhere o...

KDB How to cause infinite loop without recursion -

Is there any expression that causes an infinite loop in KDB? It loops or recursion. A statement, including a scan or execution, can trap you in an infinite loop. Something like this: {sqrt x} \ [[x> gt; 0]; 100] This will take the square root of the previous output continuously (with initial input of 100) until the answer will no longer remain> x> 0 then the first argument is effectively slightly longer, even if we Do not use that key word. What were you looking for?

php - Simple query for Wordpress posts & excerpts -

I am trying to create a small "latest news" section on my custom homepage in Wordpress, which outputs I try to get standard loop from codecs To see what I would get first, but I could not find anything. I am a bit confused because I can not work out because it is not output any post, only there is no content using the original loop: & lt ;; Php // the query $ The_query = New WP_Query ('post_count = 2'); // Loop if ($ the_query-> is_pause ()) {echo ' is_post ()) {$ the_query-> The_post (); Echo & lt; Li & gt; '. Get_the_title () '& lt; / Li & gt; '; } Echo '& lt; / Ul & gt; '; } Else {// There is no post 'echo' There is no news good news! '; } / * Restore original post data * / wp_reset_postdata (); ? & Gt; This code currently has two published posts that show "No news is not good news" message. Your code presents output in my favor, so it is working. You have a...

ios - Best method for troubleshooting "hiccups" in xCode? -

I am working on a small iPhone game using SprintKit. From time to time the game will "hiccup" and freeze for half a second before it starts again (CPU usage drop by activity monitor shows up to 0%). I do not really know where things can be cold, and I am unfamiliar with the tools of xCode to solve these issues. I have experimented with the installation of breakpoints and where things are being frozen, but I do not think this is the right way to solve the problem. What is the method of solving short and seemingly random order issues that are not easily re-presented?

PHP cURL starts giving error 100 -

I have created a common method in php to handle all my requests against an API. I have a problem that I can not understand. I have made some requests against the API and have started giving error code 100 to wait for about 3 minutes. And as long as I do not restart the API service (Grizzly, build on Java) it continues. Is there any curl configuration in my method that can be wrong? Thanksgiving method for any help looks like this: / ** * This function will handle all server requests * @PRAM $ requestpath string fixed this variable That's the string session of $ @ POST, POST, POST, PUT, DELETE, OPTIONS * @ PRAM $ DATAERA ARA data which will be sent to Android * @ The ultimate $ session on End if the user is logged in session. * @Return Array will return the array based on the JSN response from the server / public static function SendRequest ($ requestpath, $ method, $ dataArray, $ session = zero) {/ * import configuration * / $ configRest_Security = Config :: security ( )...

ruby - How to populate an array using gets.chomp -

Here's what I've done so far: # using an array heading Table of Contents = "Consent Letter" # Chapter Chapter Chapter Chapter = Array.new "Please input chapter names". While gets.chomp! = "" Chapter = gets.chomp chapters. The chapter breaks if it gets broken. Chomp.empty? End # borders puts the pengement = array.Nue in related page numbers "Please input related page numbers" while getting.chomp! = "" Pagenum = gets.chomp pagenumbers.push pagenum becomes broke if it gets. Chomp.empty? Lastly, the chapter puts the page number I am trying to get gets.chomp to continue adding to each array. When I suppress chapters or pagenum , I get only the final string / integer input I chapter or PageName Array The problem here is that every time you enter If you type , then you're calling the becomes method, which brings a line of input from them. You need to store that line somewhere, so it can be used later to try...

osx - Android.mk error: cannot find -landroid when building GStreamer -

Using Android Ndk I am trying to integrate GSTimer into an Android application using Android NDK, but I have some problems with my Android Mac file. error: error: can not be found - Android This is my Android makeup file: LOCAL_PATH: $ (CLEAR_VARS) SYSROOT contains $ $ (call-dials): = / user / {myusername} / android-ndk-r10 / platform / Android-19 / arch-arm / LOCAL_MODULE : = Video-Streaming LOCAL_SRC_FILES: = video_streaming.c LOCAL_SHARED_LIBRARIES: = gstreamer_android LOCAL_LDLIBS: = -log -landroid APP_PLATFORM: = Android-19 includes $ (BUILD_SHARED_LIBRARY) GSTREAMER_SDK_ROOT: = $ // user / {myusername} / gst Reamer-sdk-android-arm-debug-20133.6 GSTREAMER_NDK_BUILD_PATH: $$ (GSTREAMER_SDK_ROOT) / Share / GST-Android / GSTREAMER_PLUGINS NDK-Creation: = coreelements ogg Theora Vorbis ffmpegcolorspace playback eglglessink soup opensles G_IO_MODULES: = GNUTLS GSTREAMER_EXTRA_DEPS: = gstreamer- Interface -0.10 gstreamer-video -0.10 included $ (GSTREAMER_NDK_BUILD_PATH) /gstre...

java - Learning Swing and Jframe and stuff - also would like some tips and tricks on organization -

I'm learning swings for my Java program. I am very new on this and I'm slowly hanging it up. My code is very basic here; I am using an action listener who is reading a text recorded in a JTextField, but my code is giving me an error which is "Credit Graphics. Java 32: Error: Non-static Variable Can not be referred to by a static reference text .addActionListener (this) ", I can not find a lot of useful solution on the forum, at least there is no solution which fixes my style of coding. It would error Why am, so I can save it for future reference? In addition to this, I like any organizational suggestions that you want people to give me. Trying to create a graphic application that can take the credit card application through JETextfield and then runs through my pre-built program that checks the validity of the card. Thank you! Here's my code: import java.awt. *; Import java.awt.event. *; Import javax.swing *; Import java.awt.event.ActionEvent; Impo...

ios - lineWidth for UIBezierPath has maximum -

I'm trying to make an arc, like half a circle, I can live with different colors I thought I would start an arduous path for arc and set the line width to something bigger. Here's what I've done so far: Caspelier * layer = (Caspayer *) itself. Layer; UIBezierPath * bezierPath = [UIBezierPath bezierPath]; CGPoint StartPoint = CP pointmake (self bands.origin.exe, self.bounds.organ.a + self.boundsskies.high / 2); [Bezierpath Movito point: startpoint]; Layer. Fill collar = [UIColor clearColor] .CGColor; Layer. Stroke color = [UIColor redColor] .CGColor; CGFloat Strokes Sections = 10; CGPoint endpoint = CP pointmake (self bands.org.org.x + self.boundsizeWith, self.bounds.origin.a + self.boundsskies.hit/2); [Bezier Path Set Linewidth: 100]; [Bezierpath Edkwadkurutoutoin: And point control point: CG pointmack (self bands.org.x + self.boundsskies.Withth / 2, self.bounds.edge.i)]; BezierPath.lineCapStyle = KCG LanguageAphere; Layer path.besierpath CGP; When I see my arc, it...

android - Phone doesn't install app from eclipse -

I have an advance advance phone, in the past I was able to get my app in the phone, but now I can I'm not even a simple hello world program ... it's what happens that sometimes I click on eclipse and my phone vibrates twice and the installation ends, and sometimes the installation is a Get clever and then say the installation is unsuccessful. The phone that I have is And works fine, I believe that my Ace is a problem in advance, I restart it with clothes and everything but still the result .. What can be the problem? Please help me please try to do everything beforehand. Phone is debugging mode

Unable to check if jQuery var is undefined -

Here is my code that I tried: var moduleloaded = jQuery.data ( "#module", "load"); If (module loaded type === undefined) {moduleLoaded = true; JQuery data ("#module", "load", module loaded); Console.log (jQuery.data ("# module", "load", module loaded)); } If the statement does not get hit. I tried the if (module loaded!) and then I got the error 'can not read' the data of the "undefined 'property" if (module loaded == '') will also not work This code gets hit twice, so I should be correct on the second loop. The operator returns a string, you can get it as 'undefined' string The value should be compared.

jquery - page count in jqgrid with server side paging -

I am implementing server side paging (with MVC4) for JQGrid. I'm able to put it out I'm not using the Jukeide Pager option. I am using custom pager implementation instead. For this, I need to get the total pages returned by the server. I have tried the following: grid.getGridParam ('lastpage') - always returns 1, which makes sense because I only have one in the grid grid I am returning the contents of the page. Getrigrad ('Total') - I tried to do this because I was setting this value in the controller, but it is retrieving the zero grid. Gridperm ('Records') - always gives 10, the size of my page. I think you have the option of loadonce: true Use the Customer Support paging, sorting and filtering / searching option in the wrong case using the loadonce: true option in the server all the rows . In the case of use loadonce: true option value total , record and page will be ignored and the same value The total number of items ret...

ruby - Running task before deploy:symlink:shared capistrano 3 -

With Capistranos (v 3.2.1) I am an absolute nozzle, so please forgive me, mistake, useless. I am deploying a PHP app and want to set up a composer before deployment: Simlink: Release work (only when rollback is not running) I have a problem reaching the newly created release directory I'm currently in the CD (and also run some other items) to be able to run in the CD and run the composer; Namespace: Delegate the namespace: Simulink 'Run composer' Functions: Runcomper performs on roles: "CD '# {current_release}' & amp; Composer" Execute "cd" # {Current_release} '& amp; amp; amp; amp; ln -s /sites/shared/index.php index.php "End end: Release, runcomposer ending {Current_release} variable is not present at this point (which is strange as the directory where the GIT bridge is run / sure / release / directory (Uchi Timestamp) but 'undefined local variable or method' current_release "' Can I set a new release...

angularjs - Can't bind scope variable to array key? -

यह क्यों हो रहा है? & lt; input type = "text" ng- मॉडल = "पता" / & gt; App.controller ("MainCtrl", ['$ scope', फ़ंक्शन ($ गुंजाइश) {$ scope.location = {पता: $ scope.address}; $ scope.getFood = function () {console.log ($ scope। स्थान); console.log ($ scope.address)} लॉगिंग $ scope.location देता है वस्तु {पता: अपरिभाषित} जब मैं $ scope.address पर लॉग इन करता हूं, तो यह मुझे मूल्य देता है। आप $ scope.location = {address: null}; सेट कर सकते हैं और फिर अपने मार्कअप में & lt; input type = "text" ng-model = "location.address "/ & Gt;

ActionScript 3.0 web scraper works in flash, but not browser -

So I have a problem I recently created a Flash WebCraft to capture a video source link. It works in Flash Does, however, when I do a test in the browser, I only get a blank canvas ... it does not work, I do not know what the problem is ... today I have now started learning activities, That's why I am the greatest. import flash.net Import flash. Arrangement.*; Import flash.display. *; Var theUrl = "http://www.sockshare.com/file/384F14398D224634"; First step (); Function first step () {var urlReq: URLRequest = new URLRequest (theUrl); UrlReq.method = URLRequestMethod.POST; Var loader: URL loader = new URL loader (urlReq); Loader.addEventListener (event.complete, onsite); Loader.dataFormat = URLLoaderDataFormat.TEXT; Loader.load (urlReq); Success on function (e: Event): zero {var theContents1: string = string (loader.data); Var pattern1: RegExp = / & lt; Input type = "hidden" value = "(? P & lt; internal text & gt;.)" Name = "hash...

jquery - SharePoint 2010 List -

I have the following code that uses SharePoint SP to do the right thing to complete jQuery from a list that works correctly However: How can I include more columns in the code? This will not accept some column names such as [User ID] or [user email / name] I I am thinking of the name of / or in the name of space. How can I eliminate the code instead of changing the name of the column in the SharePoint list? & lt; Asp: content content placeholder id = "placeholderman" runat = "server" & gt; & Lt; Script type = "text / javascript" src = "/ sitename / jquery / jquery-1.6.2.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "/ sitename / jquery / jquery.SPServices-0.7.2.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; . $ (Document) .ready (function () {$ () SPServices.SPAutocomplete ({Source...

importerror - How do I convert a Python script to an executable *.exe file? -

मैं इस तरह से एक ही समस्या का सामना कर रहा हूं: बस निकालकर setup.py से "import sys" इस समस्या को हल कर सकता है, लेकिन मेरे मामले में त्रुटि अभी भी वहां है। मुझे लगता है कि पायथन को cx_freeze मॉड्यूल ठीक से। मुझे पता है अगर आपके पास कोई विचार है। मेरे ओएस विंडोज 7 64 बिट है और मैं पायथन संस्करण 3.4.1 का उपयोग कर रहा हूँ। setup.py फ़ाइल है: से cx_Freeze आयात सेटअप, निष्पादन योग्य सेटअप (नाम = "मैक्रो जनरेटर", संस्करण = "1.1", विवरण = "आपके लिए मैक्रो लिखता है", निष्पादन योग्य मुझे मिल गया त्रुटि संदेश है: & Lt; pyshell # 12 & gt; ", पंक्ति 1, & lt; मॉड्यूल & gt; आयात निष्पादनयोग्य आयात ईर्रर: 'एक्जिक्यूटेशंस' नामक कोई मॉड्यूल नहीं है

mysql - SQL - sum (column 1 + column2 + column3 ) and select max value of sum in each group -

नमूना डेटा के साथ मेरी मेज है: आईडी | group_id | स्तम्भ 1 | कॉलम 2 | स्तम्भ 3 | -------------------------------------- 1 1 | 1 1 0 2 1 | 1 1 1 3 2 | 0 0 4 4 2 | 1 1 1 5 1 | 1 0 6 6 3 | 0 0 0 अपेक्षित परिणाम सेट: (परिणामस्वरूप प्रत्येक समूह में अधिकतम राशि (कॉल 1 + कोला 2 + 3 का) दिखाई देनी चाहिए) > आईडी | समूह_आईड | कॉलम 1 | कॉलम 2 | स्तंभ 3 | -------------------------------------- 2 1 | 1 1 1 4 2 | 1 1 1 6 3 | 0 0 0 वास्तविक परिणाम सेट: (द्वारा My_table मीटर समूह से कुल के रूप में * का चयन करें, अधिकतम (m.column1 + m.column2 + m.column3) M.group_id) जो गलत है id | group_id | column1 | column2 | column3 | total | ------------------------------------------ 1 1 | 1 1 3 3 2 | 0 0 3 3 6 3 | 0 0 0 0 मैं एसक्यूएल के लिए काफी नया हूँ, ऐसा लगता है कि क्वेरी प्रत्येक समूह में पहले आईडी का चयन कर रहा है। अपेक्षित परिणाम प्राप्त करने का सबसे अच्छा तरीका क्या है? आप प्राप्त कर सकते हैं एक subselect के साथ अपने वांछित परिणाम यानी: पहले चरण: का चयन करें म...

Unable to understand the output for the C code -

# शामिल हैं & lt; stdio.h & gt; Int main () {int a = 5; Printf ("% d \ n" + 1, ए); // आउटपुट: d प्रिंटफ़ ("%% डी \ n" + 1, ए); // आउटपुट: 5 प्रिंटफ़ ("% q \ n" + 1, ए); // आउटपुट: q प्रिंटफ़ ("%% q \ n" + 1, ए); // आउटपुट: q प्रिंटफ़ ("% k \ n" + 1, a); // आउटपुट: k printf ("%% k \ n" + 1, a); // आउटपुट: k प्रिंटफ़ ("एबीसीडी \ n"); // आउटपुट: एबीसीडी प्रिंटफ़ ("एबीसीडी \ n" +1); // आउटपुट: बीसीडी प्रिंटफ़ ("एबीसीडी \ n" +3); // आउटपुट: डी} मैं उपरोक्त कार्यक्रम द्वारा दिए गए आउटपुट को समझने में असमर्थ हूं। मैं एक नौसिखिया हूँ हो सकता है कि मुझे पॉइंटर्स में उन्नत विषयों को जानना पड़ा ?? "% d \ n "+1 को " d \ n " वाले स्थान पर इंगित करने वाला एक सूचक देता है। इसी प्रकार, "%% d \ n" +1 "% d \ n" पर एक पॉइंटिंग इंगित करता है। इसलिए, कथन printf ("%% d \ n" + 1, ए); // आउटपुट: 5 के बराबर है printf ("% d \ n...

c# - Microsoft advertising SDK for windows phone 8 (XAML) -

I want to add an ad to my app. This is my XML This is my code public manpage () {InitializeComponent (); Thread.Sleep (1000); AdUnit.ErrorOccurred + = AdUnit_ErrorOccurred; // ApplicationBar // BuildLocalizedApplicationBar () sample code for localization; } Void AdUnit_ErrorOccurred (object sender, Microsoft.Advertising.AdErrorEventArgs e) {System.Diagnostics.Debug.WriteLine ( "Ad error" + e.Error.Message.ToString ()); } When I have null reference for this device deployed AdUnit.ErrorOccurred + AdUnit_ErrorOccurred; I followed everything from MSDN. I am using VS2013. Make sure that you make all capabilities in its WMAppManifest: ID_CAP_IDENTITY_USER ID_CAP_MEDIA_LIB ID_CAP_NETWORKING ID_CAP_PHONEDIALER ID_CAP_WEBBROWSERCOMPONENT a sample xaml: & lt; my: AdControl visibility = "visible" ErrorOccurred = "OnAdError_ErrorOccurred" AdUnitId = "10020750" ApplicationId = "e1e3c23b-3a59-4119-852e-8ad0...

android - Appearance of 'play' button -

I am playing an audio file using the MediaPlayer class. At the moment I start playback by pressing a normal button (which displays 'Play') which I created in the layout file. I want to know that if it is possible to show the button in the default Android playback / pause / stop button without using imagebutton , then I want only one button, so I MediaController Do not even want to use the default play / pause / stop button for Android? Cheers You can find a list of Android's default designs: And I think, what you need ic_media_play, ic_media_pause. You can use them resource ID: android.ic_media_play Here you can follow another old link which you can do:

How to put type constraint on data type in idris -

In IDRI, how can I disrupt the type of parameters in the algebraic data type? In Haskell, I could do this: data foo = bar {x :: integer, str :: string} Can I do it in Idris? There are two options: data type data Foo = Bar Int String or Record Record Fu: Type where bar: (x: int) -> (Str: string) - & gt; FU There are some limitations in both: You do not have records in the case of data types, in case of records, you can have only one constructor. You can make datasets and records in 3.2 data types and 3.11 dependent records sections Get a little more information about

android - Hardware board recives extra null character before receiving the actual data -

. When I send the command to WiFi using the ordinary socket when I receive the favor, then i.e. before the actual character. & Lt; 0> I am getting an empty letter. So my question is that TCP / IP protocol adds extra null character before sending data.

go - Is there library similar to urllib2 of Python? -

We have urllib2 and bookplayable in Python but I am searching on Go! Page and I have only found one PHP, I do not know that this Lib is the same. I do not know exactly what you want in urllib2, because it has many features but, This code has been found with the main requirement: I hope you want this. I found this thread in conversation in Google Groups:

jquery - Safari input='file' doesn't work -

I have a div that is on click trigger input-file in other browsers (Chrome, Firefox, IE) But in Safari (5.1.7) it is not so. Any ideas why? Click (function () {$ ("# mask-load-file") trigger ('click') ($ (function () {$ ("# mask-button-file"). ');});}); & Lt; Div id = "mask-button-file" class = "hover active" & gt; . . . & Lt; / Div & gt; & Lt; Input type = "file" id = "mask load file" name = "file1" & gt; # Mask load file {display: none; Opacity: 0; } #mask-button-file {width: 81px; Height: 40px; Background color: # f70808; Swim left; Text align: center; Vertical-row: middle; Line-height: 40px; Margin-left: 1px; Cursor: indicator; } #mask-button-file: active {background color: # DF0005; } This is because the input is being set to the display : None and there is a problem in its Safari, instead of hiding it, set it to height , width to zero. & lt; Div & gt...

javascript - Push input to array and clear input not working as expected -

I have an administrator that brings data from the factory, as follows: .controller ('ChatDetailCtrl', function ($ scope, $ state page, message) {$ scope.messages = Messages.get ($ stateParams.partnerId); $ scope.send = function {input} {input.id = Math .random (); Input.sent = true; input.time = new date (); $ scope.messages.data.push (input); console.log ($ scope.messages);}}) I use an NG-Encore to display messages on the template. I have an input that uses ng-click to run the sending problem The problem is, when you send it, then it is added to its array, however if you do this, it will send you a new message Updates the sent message instead of allowing it. How do I input the array, the way I can be repeated it several times? Try doing this so that you are not pushing the same reference forward, but similar to the input Get a completely new object .controller ('ChatDetailCtrl', function ($ diameter, $ state page, message) {$ scope.messages = Messag...

c# - Programming multiple custom Clipboard, using windows Clipboard - few complications -

I am trying to create a C # background app that supports keyboard keystrokes (like CAPS + (A / B / C / ...)) to act as a copy of many different clipboards. First of all, I searched for a Windows method that would work as CTRL + V: Paste the full string directly. I tried SendInputs to "paste" besides, executing the wrong idea Took a lot of time to do. As I did not find any stuff, I decided to use the Windows clipboard. Scenario (when I do CAPS + A) Retrieve the contents of the clipboard to restore it later CTL + C Get the contents of the clipboard and set it to a variable corresponding to 'a' key Set the clipboard to default Cached values This works fine when I'm on Notepad, but I get an exception at step 3 when CTRL + C is executed on another app (for exactly 5 seconds, clipboard on my app My questions: - Is there a way to send a signal to Windows to "paste" some text that works like CTRL + V without using the Windows clipboard? - Is th...

jquery - Remove entry from the view after delete from the DB -

Im using the following code to show the table data in the index page, I have currently created inline delete, which The user clicks the popup to confirm the delete button and clicking on the delete takes place after the deletion of the DB entry. It is that I have removed it from DB, even after the model is closed I still see it in the UI, just after I delete the page entry is refreshing, how do I remove the entry from the UI after ajax call Should get success @model IEnumerable & lt ;? TestropDownCreate.Models.TestModel & gt; @ {ViewBag.Title = "Index"; } & Lt; H2 & gt; Index & lt; / H2 & gt; & Lt; Script src = "~ / scripts / jquery-1.10.2.min.js" & gt; & Lt; / Script & gt; & Lt ;! - Modal - & gt; & Lt; Div class = "modal fade" id = "deleteModal" tabindex = "- 1" role = "dialog" aria-labelbedby = "deleteModalLabel" aria-hidden = "true" & gt; ...

sbt - Why does the default run task not pick settings in custom configuration? -

I have been created from the latest sources in the form of sbt 0.13.6-SNAPSHOT . This is build.sbt : lazy wall mock = config "fake") expand lazy wall mock = Input [Unit] ("Run in fake mode") Lazy Val Mock Settings = Incognito (mock) {classpaths.configSettings ++ Seq (unmanagedClasspath + = baseDirectory.value / "Fake-Resource", Fake & Lieutenant; custom copy configuration of custom Run required function Why? Configuration (duplicate) .settings (mask settings: _ *) ? Why not unmanagedClasspath for configuration duplicate configuration See the following session: & Gt; Counterfeit [info] Hello processing running: File: / User / Jacek / Sandbox / Make-Config / SRC / Mock-Resource / A. Properties [Success] Total Time: 0s, full 27 July 2014 2:26:07 PM> P / Mock: Run [info] Hello processing running: File: / User / Jacek / Sandbox / Make-Config / SRC / Mock-Resource / A Properties [Success] Total Time: 0S, Full 27 July, 2...

java - Wicket StackOverflowError in Serializing or Seserializing Session -

I am using wicket 6.15 and I got an exception in my program Lang.StackOverflowError at java java.lang.Exception & Lt; Init>. (Exception.java:102) at java.lang.ReflectiveOperationException & lt; Init & gt; (ReflectiveOperationException.java:89) at java.lang.reflect.InvocationTargetException. & Lt; Init & gt; At (InvocationTargetException.java:72) sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) sun.reflect.GeneratedMethodAccessor11.invoke (unknown source on java.lang.reflect.Method.invoke) (Method.java: 606 ) at org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream.internalCheck (object Outputstrymkjawa 398) org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream.check (CheckingObjectOutputStream.java): 361) at org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream.checkFields (checkingObjectOptput tream.java:645) org.apache.wicket.core.util.objects.checker.CheckingObjectO...

set.seed() function influence into random in R -

Today I got the first one in an set.seed function. It's useful at the same time, and I think how to use it, but I have a small problem - how to choose a real good number as the first parameter of this function? Get one more from that question - how to set.seed () effect in random R in R? Maybe if I think the last one, then I'll answer first. Thanks a lot. In short: set.seed () You specify the starting point for all the "pseudo random number generators" that make random numbers in R . As the computer is very deterministic, there is nothing like a real "random number", like ? Set.seed See the computer is always using an algorithm so that the so-called "pseudo random number" can be generated. These generators / algorithms work (often) iterative, so the next number is affected by its predecessor set.seed () defines the initial predecessor and thus presents the pseudo random number copy . (See here :) Which number do you cho...

php 64bit integer overflow differs from Java implmention -

I am trying to implement the random class of Java in PHP and after several hours I came to know that PHP is a Different values ​​give Java 2 times the 64-bit multiplication time. PHP echo (160577175182 * 25214903917); returns 9101091335015235584 in a Java applet Drawerring ("Java:" + (160577175182 L * 25214903917 L), 10, 10); returns java: 9101091335015183990 Interestingly, if you put it in the programmer mode, So it also produces 91010 9 1335015183990. 25214903917 Java Random Magic Number 0x5DEECE66D 160577175182 is a test seed value I know the resultant number is greater than the 64 bit number and therefore the result of both Are wrong I need to be able to replicate the result of Java in php. I tested some classes in extended arithmetic java, and reached the following conclusion: The result of PHP is consistent with multiplying on ineffective input as integer, but then converting the result into a 64-bit floating point. In the fo...

javascript - Show random numbers on html sent from Node.js -

I'm trying to show a random number for a file named display.html in node.js and show it on port 3000 . When I run the node code in server.js, I get the confirmation that the data is transmitting, but I do not see anything on the local host: 3000. I am using node.js Express version 4.7.1 and socket.io version 1.0.6. Thanks in advance! requires the app = ('Express') (); Var http = Required ('http'). Server (app); Var io = Requirement ('socket.io') (HT); App.get ('/', function (rik, ridge) {res.sendfile ('display.html');}); Io.on ('connection', function (socket) {console.log ('user connect');}); SetInterval (function () {console.log ('emitting'); io.emit ('coordinate', {x: Math.random (), y: Math.random (), z: Math.random ()}); }, 3000); Http.listen (3000, function () {console.log ('listen to *: 3000');}); Here is html where I get the data: & lt; Html & gt; & Lt; Body & gt; ...

multithreading - Is spawning a new thread risky in ASP.Net app -

In an ASP.NET app, it is OK to create a new thread in the form of the code below, or something Are hidden risks? In this code, I am executing some code which takes a long time to execute this new spam thread as 2 to 5 minutes. A thread is not a background thread created. I am thinking that there are many users who click on the button 'BTNLOnRunGuirst', it means that many new threads will arise, which is not a good thing but is not sure. Secure void btnLongRequest_Click (Object Sender, EventArgs e) {LongOps lo = New LongOps (); Thread T = New Thread (New Thread Start (Low Language)); T.Priority = ThreadPriority.Lowest; T.Start (); } Can you lose this task without any notice? If you start eliminating thread-pool boundaries, many threads become a problem (not because you are using your own thread). Or, you are overloading the machine and some resources like CPU, memory (1MB stack size in each thread by default), discs or networks are tiring. If you avoid those...

mysql - which database technology to use for many user searchable columns -

We currently have a system, where the user summarizes the data on a large scale (20+) dimensions What they can see is that the MySQL is currently struggling on this effort, that there are not enough indexes to handle all the major combinations used primarily. Users have a date-based field, which is included with each query, but all other fields connect the user base in a random way. Is a database product more optimized for this type of search? I am looking at products like MongodiBi or Kesandra to reconstruct the data, but I am not sure they will be able to handle the search requirement efficiently.

Ordering x-axis in ggplot in R -

Image
इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मैं निम्नलिखित डेटा & amp का उपयोग कर रहा हूँ; ; कोड: ddf = संरचना (सूची (संख्या = 1:20, शब्द = संरचना (सी (10 एल, 20 एल, 17 एल, 6 एल, 5 एल, 13 एल, 11 एल, 1 एल, 8 एल, 15 एल, 3 एल, 18 एल, 16 एल, 7 एल, 4 एल, 14 एल, 12 एल, 2 एल, 9 एल, 1 9 एल), .लैबल = सी ("आठ", "अठारह", "ग्यारह", "पंद्रह", "पाँच", "चार" "चौदह", "नौ", "उन्नीस", "एक", "सात", "सत्रह", "छः", "सोलह", "दस", "तेरह", "तीन", "बारह", "बीस "," दो "), वर्ग =" कारक "), मान = ग (.34420683956705, .612443619407713, .७०४२२२४४९८, .832921771565452, .351153316209093, .622333734529093, .932609781855717, .584015318658203, .968014082405716, .141673753270879, .787956288317218, .852732613682747, .411922389175743, .781018695561215, .474310273537412, .701303839450702, 0.3390948860...

drupal - How to activate/find the Open Atrium Wiki in D7 OA 2.19 -

I am trying to activate the wiki in Open Extrem 7.x-2.1 9. I have the module enabled and a group and spaces and sections are set up but they can not be found till the wiki. All OA modules are active and all blocks are enabled. Where is it, how can you get it? Thank you.

mysql - SQL query to join four tables -

उपयोगकर्ता तालिका - उपयोगकर्ता आईडी, प्रथम नाम, अंतिम नाम निवेश तालिका - निवेश आईडी, निवेश नाम एनडीए तालिका - निवेश आईडी, उपयोगकर्ता आईडी, एनडीए पर हस्ताक्षर किए (बूलियन) अनुमति तालिका - निवेश आईडी, यूजर आईडी, दृश्य अनुमति (बूलियन) परिणाम की आवश्यकता है - एनडीए पर हस्ताक्षर किए जाने वाले उपयोगकर्ताओं का पहला नाम और अंतिम नाम एक विशेष निवेश आईडी। इनपुट - निवेश आईडी आउटपुट - प्रथम नाम, अंतिम नाम, एनडीए (सही / गलत) पर हस्ताक्षर किए, दृश्य अनुमति (सही / गलत) मुझे क्वेरी मिली जहां आउटपुट पहला नाम है, आखिरी नाम, एनडीए हस्ताक्षरित SELECT u.First_Name, u.Last_Name, n.Nda_Signed यूजर यू जॉइन एनडीए ON u.User_Id = N.User_Id निवेश i पर निवेश करें I पर। निवेश = आईडी = एन। इन्वेस्टमेंट_आईडी जहां i। इन्वेस्टमेंट_आईडी = 347 लेकिन दोनों एनडीए और अनुमति तालिका में शामिल होने में समस्या है। मैं ऐसा निम्नानुसार करता हूं: selec टी यू.युसर_आईडी, यू.फ़ीस्ट_नाम, यू। ओस्ट_नाम, राशि (जब टाइप = 'एनएनडीए' और हाँनो = 1 तब 1 और 0 एण्ड) के रूप में एनडीए_साइन किया गया, योग (मामले में...

python regex word repeat time -

मुझे निम्न परिदृश्य मिली: 1) कार की टक्कर प्रभाव 3 सही लेन 2) 3 कार टक्कर प्रभाव दायें लेन मुझे टक्कर की संख्या के बजाय लेन की संख्या समझनी है विशिष्ट होने के लिए मैं चाहता हूं कि संख्या और "सही लेन" से कम से कम दो \ bwords \ b के बीच में। \ b (\ d) & lt; मैं 2 शब्दों को यहाँ सीमित करना चाहता हूं & gt; S * (लेन [एस]?) OR \ b (\ d) & lt; मैं यहां 10 वर्णों को सीमित करना चाहता हूं & gt; \ s * (लेन [एस]?) itemprop = "text"> लेटरहाइड का उपयोग करना: आयात करें s1 = "1) कार की टकराव 3 सही लेन" s2 = "2 ) 3 कार टक्कर प्रभाव सही लेन "प्रिंट रिफंडल (" (\ d +) (? = (?: \ S + \ w +) {, 2} \ s + सही लेन) ", s1) प्रिंट पुनः। (" (" \ D +) (? = (?: \ S + \ w +) {, 2} \ s + सही लेन) ", s2) देता है: ['3'] []

php - preg_match_all show me diff in loca server -

/ (\ w | ^) कुछ (\ डब्ल्यू | $) / ui - 2 ढूंढें जब मैं स्थानीय शब्द में 3 शब्द खोजता हूं तो "कुछ शब्द के लिए कुछ शब्द" मेरे स्थानीय सर्वर में मेरे पास क्या समस्या है? ऐसा कुछ करने की कोशिश करें: $ विषय = 'somes में कुछ शब्द के लिए कुछ पाठ'; गूंज (preg_match_all ('~ \ bsome \ b ~', $ विषय));

c# - How to handle type “Object {System.Collections.Generic.List<object>}” -

This is my first time coming up with such an object. How can I use the value for cardano or item id, which is 296 and 130, respectively, to write it in a very simple way, when only methods The 'test' is like a normal thing and I do not know where to place it, I can not even test it [0]. This is where 'test' comes from: Private Zero ListBoxIssue_OnDragEnter (Object Sender, DragEventArgs E) {Var test = DragDropPayloadManager.GetDataFromObject (AD Data , CommsItem); } Use var item = (CommsItem) ((List of & lt; Object & gt;) Test) .FirstOrDefault (); If test is list before casting & lt; Object & gt; An example of , and if the test is [0], then be sure to check in advance an example of CommsItem.

php - PDO Prepare Query - SQL Error Failed to run query: SQLSTATE[42000] -

I'm having trouble running this query // enter the power stats { $ STH = $ db - & gt; Ready (insert "statsRounds (version, timeFormat, mapNumber, mapName, duration, startTic, endTic, avgEfficiencyPts, redPowerPercent, bluePowerPercent) value ($ wdlround-> VERSIONNUMBER, $ wdlround-> timeFormat, $ wdlround-> gt; ; MapNumber, $ wdlround-> MapName, $ wdlround-> durationTics, $ wdlround-> startTic, $ wdlround-> endTic, $ wdlround-> averageEfficiencyPoints, $ wdlround-> RedPowerPercent , $ Wdlround- & gt; bluePowerPercent) "); // execute the query $ STH - & gt; Executed (); } // attempt cache (PDOException $ ex) {die ("Failed to run the query:" $ Ex-> getMessage ()); } I get an error on the execution Failed to run the query: SQLSTATE [42000]: Syntax error or access violation: 1064 You have a Error is your SQL syntax; Line 17 I - the manual is that to use to correct syntax 'SMARTCTF01, 18,193, 0, .22.20.55....

java - How would I read the following text into a 2D Array -

The 2D object once written in the text file looks like this: null Null-5 160 2 empty redundant 75 80 1 75 160 Faucet 75 320 1 Faucet faucet 155 160 2 Faucet 235 0 1 235 80 2 235 160 1 In the empty null The object is in the form element (x, y, i) So each object uses 3 digits. The problem occurs in reading intriggers from a text file because it is mixed with "zero values" with the string. This is what I have done so far, but it only reads the text file partially. Public Zero Read Elements () throws IOException {file file = new file ("elements.txt"); Scanner inp = new scanner (file); (Ifp.hasNextLine ()) {inp.nextLine (); (for int col = 0; col & lt; rectArr.length; col ++); } (Int line = 0; line & lt; rectArr [0]; length; line ++) {if (inp.hasNext ()) {try {string s = inp.next ()} Integer.parseInt ); Println (s); Int x = integer. Press (s); Int y = integer .presscent (inp.next ()); IntI = Integr .Presscent (inp.next ()); Elementarre [cola] ...

javascript - jQuery .select() not working and how to get the node at caret? -

मुझे एक कोड में contentedable div । फ़ंक्शन पाठ शैली (सीएसएस) {var sel, el, range, selectedText sel = window.getSelection () श्रेणी = sel.getRangeAt (0) selectedText = range.toString () श्रेणी .deleteContents () एल = document.createElement ('span') $ (एल)। सीएसएस (सीएसएस) el.innerHTML = चयनित पाठ सीमा.इंसर्टनोड (एल) श्रेणी = श्रेणी.क्लोनरेन्ज़ () श्रेणी.सेटस्टार्ट पहले (एल.फस्टबिल) श्रेणी .setEndAfter (el.firstChild) sel.removeAllRanges () sel.addRange (श्रेणी)} $ ('.bold') .on ('पर क्लिक करें', फ़ंक्शन () {textStyle ({'font-weight': 'bold'} ) () '$' ('.italic') .on ('click', function () {textStyle ({'font-style': 'italic'})}) $ ('.edit')। चयन (कार्य () {Console.log ($ (this))}) शैली जोड़ना काम कर रहा है लेकिन अब मुझे Google ड्राइव के समान व्यवहार करना है और बटन को उपयोगकर्ता को एक प्रतिक्रिया दें। इसलिए जब मैं एक bold पाठ भाग में कैरेट डालता हूं, तो मैं बोल्ड बटन को हल्का करना चाहता ...

nfc - How to run android program without open the app? -

My app can be opened by NFC, and then use the information in the tag to do some processing, processing is approximately 5 Is seconds. If my app has been opened by NFC, then I do not want it to be shown on screen. So it's on crate. @OrrideCreative on Public Zero (Bundle Saved InstantState) {super.onCreate (SavedInstanceState); SetContentView (com.ab.R.layout.test); Intent = getIntent (); If (NfcAdapter.ACTION_NDEF_DISCOVERED.equals (getIntent). GetAction ()) {Log.v ("nfc", "Start processing"); SystemClock.sleep (5000); // Processing Log.v Simulation ("NFC", "End Processing"); This.finish (); System.exit (0); }} But this is not work, the app will display about 5 seconds on the screen. Even I do not process anything if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals (getIntent). GetAction ()) {this.finish ( ); System.exit (0); } I can still see the app screen in very short time. How do I stop the app to show the screen if I use N...

ruby on rails - RSpec - Password can't be blank error after installing Devise gem -

Image
मैं उपयोगकर्ता मॉडल का परीक्षण करता हूं: वर्ग उपयोगकर्ता & lt; ActiveRecord :: बेस # डिफ़ॉल्ट रूप से मॉड्यूल को विकसित करना शामिल करें उपलब्ध अन्य हैं: #: पुष्टि करने योग्य,: lockable,: समय-सीमा योग्य और: omniauthable devise: database_authenticatable,: registerable, वसूली योग्य,: यादगार,: trackable,: मान्य मान्य: पासवर्ड,: उपस्थिति = & gt; सच्चे है _माइं: विज्ञापन, आश्रित: नष्ट हो चुके हैं: डॉक्स, के माध्यम से:: विज्ञापन, स्रोत:: सामग्री, स्रोत_प्रकार: "डॉक्टर" के पास_माएं: पालतू जानवर, माध्यम से:: विज्ञापन, स्रोत:: सामग्री, स्रोत_प्रकार: "पेट" है_माया: लाइसेंस_प्लेट प्रयोक्ता स्कीमा निम्नलिखित हैं: create_table "उपयोगकर्ता", बल: "विज्ञापन", "स्रोत": "सामग्री" स्रोत:: सामग्री, स्रोत_प्रकार: "लाइसेंस प्लैट" अंत सच है | टी | T.string "first_name" t.string "last_name" t.string "phone" t.datetime "created_at" t.datetime "updated_at" t.string "ईमे...

php - Codeigniter get_filename ordering by name -

I found directory in codeigniter to publish a document, but can not order it Can I sort it by alphabet anyway? This is the code given below and I went through the documentation but could not find anything. $ this-> Load-> Assistant ('directory'); $ List_movs = get_filenames ('. / Spots'); Foreign exchange ($ list_move $ mov): $ movs [$ mov] = $ mov; Endforeach; Thank you $ list_movs just a regular array you just can sort it by using Sort ($ list_mov) If you want to sort the natural order if case insensitive: sort ($ List_movs, SORT_NATURAL | SORT_FLAG_CASE); The natcasesort () note is similar to using , the key values ​​are not kept Association, but I do not think you can use

how to send return address backwards (through socket)- python -

I'm here to demand a remote buffer overflow tip. I am currently resolving a wargame and it is my For the first time trying some new types of coding. Currently I'm trying to create a code like this: I have an address excuse variable in which there is a limit of 0xbfffff00 and 0xbfffffff I want this brutal force in return I'm the one I'll socket. The problem through some socket programming is that, I am using OS to learn, very few are in the Aadian format, so I want to send my return address backwards (byte). example) addr = 0xb1234567 # I would like to send 674523b1. I have searched for a function like this and I found that print ('some' [:: - 1]). Transliteration ("hex") works, but it works on string, not when it is a number, is there a way to send the address back in the dragon? Thank you. will convert a numeric value into a sequence of bytes, which is suitable for sending on the network. [7]: addr = 0x30313233 in [8]: struct.pack ...

how to hide a page from being seen in wordpress backend and frontend -

In my plugin I have created a custom template that prints a requested sidebar. And to run this template's code, I updated it to a custom page (by calling update_metadata). Is there a good idea to get content of a specific sidebar in Ajax call? Now my problem is that the WordPress show is in this dashboard and front page, and after searching, I do not find it easy to understand the solution to completely hide a page so that it is accessed only by its ID Can go Will someone tell me how to do this? You are going wrong about this, you can create a function that does anything Can be created on any WordPress page that you can create. But if you can actually create a page outside the database, then: add_action ('init', 'add_rewrite_rule'); Function add_rewrite_rule () {// add_rewrite_rule (REEGEX URL, location, priority (i.e. top is before other rewrite rules) / I created a custom post type for this plugin which is called market - which you want To add pos...

Sort a python dictionary by order of items on list -

मेरे पास एक शब्दकोश है जैसे {'james': 32, 'jacob': 43, 'marie': 3 } । । मैं कैसे मानता हूँ कि मुझे ['मैरी', 'जैकब', 'जेम्स'] की तरह एक सूची है, ताकि नए शब्दकोश सूची में आइटम के क्रम से हल किया जाएगा? यानी, परिणाम: {'मैरी': 3, 'जैकब': 43, 'जेम्स आप एक शब्दकोश को सॉर्ट नहीं कर सकते हैं, लेकिन आप यहां इसका उपयोग कर सकते हैं: & gt; & gt; & gt; संग्रह आयात से आयातित डिक्ट & gt; & gt; & gt; ऑपरेटर आयात आइटम से लेकर; & gt; & gt; & gt; Lst = ['मैरी', 'जैकब', 'जेम्स']> gt; & gt; & gt; D = {'james': 32, 'jacob': 43, 'मैरी': 3}> gt; & gt; आदेश दिया गया (क्रम (लिस्ट, मदस्टेटर (* लिस्ट) (डी))) आदेशित ([('मैरी', 3), ('जैकब', 43), ('जेम्स', 32)])

How do you write an elisp lambda to provide an argument to save-some-buffers? -

I'm trying to accomplish this: (global-set-key [F7] (lambda (save -f-buffers t)) It is [F7] that all file buffers are left without asking any questions. The problem is that I do not have to express lambda, so that I can provide the option to save some buffer. Save-Some buffers have an interactive compiled LISP function. It is bound to the C-X (save-some buffers and optional ARG PRED) Save some modified file-visit buffers About each one the user asks you to reply to save 'y' to `n ' Not to save, 'buffer-file' to see buffer with 'visual-buffer' or 'D' before deciding to 'CR' to see the difference. This command saves any buffers, where 'buffer-to-without-without-query' is non-zero without asking without asking. Alternative argument (prefix) means non-zero to save all without any questions. Optional second argument PRED determines which buffers are considered: If PRED is zero, then all file-visit buffers are considered. I...

xml - Basex XQL merging content with same tag name, regardless of location in document -

उदाहरण के लिए, दी XML: & lt; root & gt; & LT; आइटम & gt; & LT; आईडी & gt; 111 & lt; / आईडी & gt; & Lt; विवरण & gt; गलियारा 12, शेल्फ 3 & lt; / description & gt; & Lt; विवरण & gt; बॉक्स के अंदर & lt; / description & gt; & Lt; / मद & gt; & Lt; / जड़ & gt; मुझे परिणाम चाहिए: & lt; root & gt; & LT; आइटम & gt; & LT; आईडी & gt; 111 & lt; / आईडी & gt; & Lt; विवरण & gt; गलियारा 12, बॉक्स के अंदर शेल्फ 3 & lt; / description & gt; & Lt; / मद & gt; & Lt; / जड़ & gt; लेकिन नोड में कोई भी नाम हो सकता है, और किसी भी स्तर पर हो सकता है। मैं एक ही क्वेरी को विभिन्न एक्सएमएल के साथ काम करने के लिए चाहूंगा, जब तक टैग को दोहराया जाता है: & lt; root & gt; & LT; आइटम & gt; & LT; आईडी & gt; 112 & lt; / आईडी & gt; & LT; जिम्मेदार बताते हैं & gt; & Lt; लेखक & gt; जो स्मिथ & lt; / author & gt; ...

casting - Cast value of type AnyObject contained in Dictionary -

I have a dictionary with a string key, which contains different types of values. It is full of a plist file. I want to assign a value to a variable by value. For some reason, I need two rows to put a value for a concrete type. For example, this code works: var stock idadata: [string: any object ] Type var: AnyObject? However, this does not work: var stock idadata: [string: any object] type var [string: AnyObject] var type = typeTemp as string = Static in the form of the stock data [["type"]] here gives the compiler error message (string, obozage) not variable for string. However, , Because the above code does the same thing in two lines of code code. Can anyone explain to me why this is the matter? Besides, what is another great way to do this? The reason is that the string AnyObject does, but NSString does when you do it in two steps Quickly able to put any unknown object in NSString and then pulling it into a fast string There are two ways you can fin...

javascript - how to add row dynamically in angular .js on button click? -

I am creating a list view in angular.js when I get static data, I am able to create a list. . I need to speed up in other words when I need to make a row on the user click button. I need to create a list of the same text examples ("list"), but separate ID ("0", "1", "2"). ..ETC). Is it possible to prepare a list? .. here I am trying to do .. & Lt; Script src = "// netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; JS bin & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Button type = "button" class = "btn btn-primary" & gt; Primary & lt; / Button & gt; & Lt; Ul ng-controller = "list controller" & gt; & Lt; Li & gt; & Lt; One ng-click = & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul ...

java - Android How change the value of an element of ArrayList<Integer>()? -

I want to change the value of an element in the list. I have tried this code: from the list & lt; Integer & gt; Numbers = New Arreelist & lt; Integer & gt; (); Numeros.get (2) 12 =; But this gives an error. Can someone please help me? Thank you. You can use the method defined in the ArrayList class. Answer Your question needs to be done simply by: numbers.set (2, 12); But , be careful with this. Index value must be index or you can app your app to any IndexOutOfBoundsException . Will crash with.