Posts

Showing posts from June, 2012

How to execute RemoveAliasMapping in ElasticSearch using JEST -

I am trying to remove nickname mapping for index in ESA. Here's what I've tried: // Create Zest Clients Zest Client Client = Factory .get Object (); // Remove RemoveAliasMapping Object Remove Remove Allegations MappingAlassemping = Remove NewAllisMapping Builder ("OldIndex", "Surname") Build (); After creating an removeAliasMapping object, I could not find any way to execute it. If I use the API: the client. Execute , it says: executed in method (action T>) is not applicable for JestClient arguments (RemoveAliasMapping) In addition, I could not locate any other API for executing AliasMapping . Can anyone help me with this here? If possible, please enter an example. Try it out: Modifies modified revisions = alias Modified Alize Manufacturer (New Remove Aliased Mapping. Builder ("OldIndex", "Alias"). Build ()). Build (); JestResult Results = client.execute (Modified Oles);

How to pass session value to java class -

इस सवाल का पहले से ही एक उत्तर है: 6 उत्तर मेरे पास एक सर्विसलेट है इन मूल्यों और मैं इन मानों को सत्र विशेषता में जावा क्लास में पास करना चाहता हूं। मैं इन सत्र विशेषताओं का उपयोग कैसे कर सकता हूं क्योंकि मैं JSF या Struts का उपयोग नहीं कर रहा हूँ यह सरल जावा वेब अनुप्रयोग है यूजर आईडी = map.get ("यूज़रआईड"); Log.debug ("सीसीएम लेखांकन के मामले में यूजरआईडी हैं:" + यूजरआईडी); Session.setAttribute ("UserID", userID); स्ट्रिंग रिफ्रेश = ""; RefSys = map.get ("रिफ सिस्टम"); Log.debug ("सीसीएम लेखांकन के मामले में रिफ़्सिस्टम है:" + रिफ्रेश); Session.setAttribute ("रिफ सिस्टम", रिफर्स); इस तरह मैं जावा वर्ग में प्राप्त करने की कोशिश कर रहा हूं और मैं जावा वर्ग में रिक्त हो रहा हूं। एचटीटीपी सत्र सत्र = शून्य; session.getAttribute ( "UserID"); आप अपने सत्र को रिक्त रूप से सेट कर रहे हैं। परिवर्तन यह करने के लिए उर कोड: एचटीपी सत्र सत्र = नल; Http सत्र सत्र = request.getSession ...

Ruby on Rails Mailer not sending email in development mode -

I have a Rail application with a normal mailer that looks like this: class Event Myeler & lt; ActionMailer :: Base default: "example.com" def welcome_email (event, customer) @ event = event @ customer = customer mail: subject => "Test" ,:: from = & gt; @ Customer interval end My action_mailer settings look like this: config.action_mailer.smtp_settings = {: address = & gt; "Smtp.mandrillapp.com" ,: port = & gt; 587, # Ports 587 and 2525 are also supported with STARTTLS: enable_starttls_auto = & gt; True, # detects and uses STARTTLS: user_name = & gt; "My_email" ,: Password = & gt; "My_password", # SMTP Password is any valid API key: authentication = & gt; 'Login', # Mandrill support 'Plain' or 'Login': Domain = & gt; 'Yourdomain.com', # to identify your server while connecting your domain} I have a customer registration and it sends an email right away...

ruby on rails - delete last value of a splitted string -

I want to look at a hash but the last value should be: parameter controller Send to {"User" => {"Email" = & gt; "A@a.fr, lol@lol.fr"} Method def set_users @users = params [ : User] [: email] logger.debug "# {@ users.split (", "}". Each {| e | insert E}} "end log a@a.fr Eligible @ Lol.fr ["a@a.fr", "lol@lol.fr"] The issue is that the #Eech value (["a@a.fr", "Lol@lol.fr"]) which is not in the hash I will do this: P @ users.split (", ") [0 ..- 2] Meaning, take everything but ultimate. therefore: logger.debug @ users.split (",") [0 ..- 2] .join (',') You just need to: logger.debug @users

mysql - Best way to write in remote database -

I have a website on server 1 which is using the database on the same server (MySQL). I have a web application on Server 2 which is using other databases (MySQL) on the same server Both MySQL are confined to local access only I want my web - application to update some data in server 1's MySQL database (so that it appears on my website). What's the best way? Provide MySQL access to server 1 from a server other than a local server To send a PHP request to the HTTP server on server 1, it will then update the database Thanks The best way to do this is to do it on a different server Using the Web Service to Communicate Between Apps You Can Make a User SOAP or REST Web Service.

jboss7.x - how to minimize JBOSS AS 7 configuration to fit needs -

I must be able to configure JBOSS as 7.2 to start the necessary services in the project. ? What is the best aproach to configure JBoss as a 7.2 configuration and set for a user-defined configuration I'm interested to use: JAAS, EJB, JSF .. If I understand your request correctly, then it will remove the unnecessary subsystem. In standalone, you can configure many xmls according to your usage, and standalone config is to use on startup fixes, which will allow you to quickly adapt to different needs. In the domain, it can be as easy as you define different profiles, present or not each of them with a specific sub, and then assign the necessary profiles for your server group. The XML is being extracted through the modification or the CLI, adding to the simple CLI sometimes requires putting some of the "default" entries expected for the entertainment of the "default" sub, but once detected, it It is also easy. As a key element in your case, make sure...

openstack swift - Swiftstack web console is not comming up -

I created SwiftStack cluster using SwiftStack guidelines. Everything was perfect "After a successful finish of the job finishing config dip, I got a web console link." But, I'm not able to get the web console, receiving "this webpage is not available". Due to a firewall or a configuration problem? Please help! You should email directly to support@swiftstack.com for these issues, this forum is our support team Does not often go by. My garbage is that you should not change any load balancers using the SwiftStacks Load Balancer cluster configuration page, and redeploy please follow any inquiries on the above email.

javascript - Don't use Google-hosted CDN jQuery for Shopify - what's the alternative? -

Text after "div class =" itemprop = "text"> My Shopify theme (new standard) uses jQuery hosted by: { {'//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js' | Script_tag}} does not work in China - Research on stack overflow shows that content related to Google is often blocked by great firewalls, including stackoverflow.com itself Can I point the above line in another jQuery script file? Or is there a better way for my Shopify site to be qualified in China? Or can I simply download .js file and upload it to my Shopify account and look at it? I have very limited knowledge of JS, so it appreciates that someone can tell any possible risk in doing so. Thank you. You can refer it anywhere. If you can not host it, you can use Google instead, if you can host it by yourself, then this is the best option. When it comes to commercial applications, it is always safe to avoid dependency in this way. When we pay the CDN other rely on non, ...

rest - Is returning different output based on authentication credentials RESTful? -

I have a REST API which allows the developer to fetch a certain resource: / API / Project / API / Project / 4 ... The API requires authentication. Authentication token has been added to the HTTP header. Is a different output to be returned based on that user? Thank you! REST does not define anything in that regard Should keep independent authentication logic and authorization logic. There are really requirements, from which you want to change the changes returned based on various characteristics / standards such as: Authentication type Time User Location Device type ... You can get it by using a filter in front of your REST service Filters / Interceptors are explained. Then you can send an authorization request at a decision point which determines what can be returned based on the identity of the user (or other characteristics). For example, if you can argue to return a project to a user, if and if they are related to the same area, the endpoint of...

codeigniter - How to set wildcard option in CI's ->like() -

I need to format my SQL with CIL like this, SELECT * FROM (`` name '%' as '% spinner% 60%' order 'name' acc Here is my DB query $ Code-> $ search = str_replace ("", "%", $ search); $ this- & gt; db- & gt; ('item'); such as $ -This-> (db-> 'Name', $ search); $ -by-> db-> order-by ("name", "esk"); But I get it in this form Is, SELECT * FROM (`items`) where '% spinner \% 60%' order * like 'name' Ac slash (\) * Note: This black slash has been added by CI. thanks State: Note: All values ​​have this function automatically escaped. Actually , You have a raw "%" to -> gt; such () . He said, where you do not have complete control over the wildcard; It stops: $ this-> Db- & gt; Such as (['name' = & gt; spinner ',' name '=> 60']) Something will be generated: Where '% spinner%' ...

jQuery - if element text matches statement, change the matched text -

What are the ideas given below I am trying to achieve though I know that $ (this) is not working like this, I do not know what I'm trying to do: if ($ ('value') Text () || $ ('productcrease'). Text () == "£ 0.00") {$ (this) .text ('see product'); } HTML: & lt; P class = "value" & gt; One £ 0.00 & lt; / P & gt; or & lt; P class = "productprice" & gt; One £ 0.00 & lt; / P & gt; I like it if the text of the element matches £ 0.00, then "see the product". I hope this makes sense. You can do a function by: $ ('value, .productprice'). Text (work (index, text) {return! Text || text == "£ 0.00"? "See product": text;}); When you pass in a function, jQuery will call a function once for each element, and set the text of the element that you will return. (Note that the first argument is the index, which you will not use, the second is what...

javascript - Generate incremented random numbers between 0 to 100 every second where new number should be greater than the previous nymber -

I need a javascript, where in every second call I get a random number between 0-100, where the current number Must have more number than previous I wrote a code to get random numbers in every second but it was stuck on generating it with increments. & lt; Script & gt; Var span = document.getElementsByTagName ("span") [3]; Var I = 100; (FunctionRandanumber () {var a = Math.floor ((Math.Rendam) * i) +1); Span.innerHTML = "RandomNumber:" + a; Set timeout (rand number, 1000);}) (); Note: The number randomly arises. Examples might be: 2,5,7,8,22,23,30,78,88 ..... You should not create a new number between zero and your maximum ( i ), but only the last created number ( Last numberumber ) and max ( i ) You may also want to stop when the random number reaches the maximum. var span = document.getElementsByTagName ("span") [3], i = 100, lastNumber = 0; Function Randomumber () {Final number = Final number + Math.flur (Math.Random) * (...

Rails RSpec not seeing new model attributes -

I added a new feature to my booking model through migration. class AddPickupTimeEndAndPickupDetailsToBookings & lt; ActiveRecord :: Migration change change add_column: booking,: pickup_details,: string and end I am now adding verification code: class booking & lt ; ActiveRecord :: Base [...] Valid: pickup_details, Length: {Max: 150} And suddenly all my booking model specs are failing: Failure / Error: Create (: Booking) NoMethodError: Undefined Method # & lt; `Pickup_details' for booking: 0x0000006d043e28 & gt; Either I was making things very confusing, either I am not clear ... Have you run a migration for the testing environment? Railway_Niv = test rake dB: migrate

vba - how to create sequence -

I am exporting the file from my MS Access table to my locality, I am doing this VBA coding. I need to create a sequence for the file name like this, File1PN00001 File1PN00002 File1PN00003 ... ... I am doing this with the following As a code, private subcommand0_ Click () dim file name as string dim intChoice as integer dim strpath string slow LSProc as set QueryDef as dim db database set db = CurrentDb () Set LSProc = db.CreateQueryDef ("") 'file dialog to user strFilePath = BrowseFolder (please select "Neutrality Report Ph Select Il export path appears to ") if strfilepath & lt; & Gt; "" Then call MSBBC (StuffFilePath, VBInnation, "Save Path") or other message "Please provide a file path before export!", VbCritical + vbOKOnly End if FileName = strfilePath & amp; "File 1pn" & amp; Format (txtBal_Number, "000000") & amp; ".txt" DoCmd.TransferText acExportDelim, "T1...

php - Querying Class not showing results when called -

I am trying to create a square to create a function, anywhere by calling the function and $ Sql parameter in the method. Everything is in the tasting phase, so I do not pay attention to small issues like SQL injection, but this topic is not here. The class tested me, but I do not get any results because things look good for me, but I can lose some basic things. My PHP calss: & lt; ? Php class questions {protected host = 'localhost'; Protected $ user = 'root'; Protected $ pass = 'root'; Protected $ db = 'test'; Public Function Connect Action ($ {= con = mysqli_connect ($ this- & gt; host, $ this-> user, $ this-> pass, $ this- & gt; db) or die (from 'db Can not be connected); Return $ Conn.; } Public Function Query Action ($ sql) {mysqli_query ($ this-> Connect Action (), $ sql); // $ count = mysqli_num_rows ($ query); / * If ($ query == true & amp;; & amp;; count & gt; 0) {} else {} * /}} $ execute = new...

bash - Replace a string in the last 100 records on a file using awk -

So I got around the last 100 records of a file processing, which, using a wc -l Variable declares, but I have a hard one. The text below is just an example but it really helps me to get the point in the table 1 1986 United States American Eagle Gold 1 1908 Austria-Hungary Franz Josef 100 Corona Silver 10 1981 USA A Pint Gold 1 84 84 Switzerland Gold Gold 1 9 7 9 RSA Cigarrund Gold 0.5 1 9 81 RSA Cigarrund Gold 0.1 1 1986 PRC Panda Silver 1 1986 USA Liberty Dollar Gold 0.25 1986 USA Liberty Call of Calls to this file And assume that there are more than 400 records awk -v v1 = $ (wc -l & lt; coins) piece of 5-dollar 'NR & gt; V1-100 {gsub / gold / magic /; Print} 'coins This does not actually work for me, if I want to print the fields first, it will work but I have the number of records and then processing them. I want to know how to go about taking the place of the string and if necessary, after closing the processed text, except the processed text, cop...

How to execute python code by django html button? -

I want to execute my Pyro code by onclick. I'm getting the results after running the server. My button is not working here. My code is url - url (R 'index / $', index ), index.html - & lt; Html & gt; & Lt; Body & gt; & Lt; Form action = "/ index /" method = "GET" & gt; & Lt; Input type = "submit" value = "click" & gt; & Lt; / Form {{}} production & lt; / Body & gt; & Lt; / Html & gt; Importing from django.shortcuts import, pythoncode import mycode def index render_to_response: if request.method == "import" from views.py - GET ": py_obj = mycode.test_code (10) py_obj.code () submission of return (request, 'index.html', {" output ": py_obj.a}) I Another application to separate the created Python code - My name of the application name Python code and file name class test_code: def __init __ (self, a): self.a = a Self.b = 4def c...

Can I use Google's Polymer platform and legally make a profit? -

I have developed a webpage using Google's polymer platform. I have realized since then that I can make a profit using this webpage, but if I am lawful I am inexperienced. Is anyone allowed to use their platform for any purpose? Thanks a lot! The license of the polymer can be found here:. This is known as BSD license. Here's more information on this style of BSD license in Wikipedia:

array.each only returns the first value in Ruby -

I have the following command that gives a multiline string and I want to put it in an array and iterate it , Each line as a single element. DEP get_mnt_pts `grep VolGroup / proc / self / mounts | Awk '{Print $ 2, $ 4}' | Awk -F, '{print $ 1}' | Looks like before dividing raw input for DQ > / rw / home rw / usr rw / tmp rw / var rw / var / Log rw I have the following code that looks like it takes the data and divides it by Newline and it is in an array. I then call the array to confirm And I can pull N values, but when I array. It only grabs the first value. I think I have the entire string one element, but then. What did I have to think back to return? I have examined the ruby ​​doctor's array and also to see if I can understand it. I am doing a lot, I am making the array wrong, but it is not sure how. mount_info = Array.new mount_info = get_mnt_pts.split ("\ n") puts_info.length #thiss returns 6 mount_info .each do | Pt | / Pt> W...

c# - How to override a type already registered in LightInject using a new instance passed to the constructor? -

I place some examples in the repository that live throughout the lifetime of my application, but sometimes I would like to Instant replacement is required, even with passing new instances in the Light and Ink container. Gate Instance Constructor Override Here is a snippet that shows the problem: internal square class A {public string name {receives; Private set; } Public class (string name) {name = name; } Public override string toasting () {return name; }} Internal Classes ClassB {Public Class A {get; Private set; } Public Class B (Class A) {A = A; } Public override string toasting () {return string.format ("I {0}", A); }} Private Zero testcontainer () {var Container = New LightInject.ServiceContainer (); Var a1 = new square ("an example 1"); Container. Registration (x = & gt; a1); Container.Register & lt; ClassB & gt; (); Var a2 = new square ("an example 2"); Var bwitha1 = Container.Get instance & lt; Class B & gt; (); If (bv...

Android kiosk mode app - running status bar -

I have a problem with the status bar in the kiosk mode app I know that status How to hide and I know that 4.4.2 Is it possible to disable it permanently in KitKat? But I got a good app - KYWARE When I hold down the status bar, it's a quiet mode, it's running back to the top very quickly, in 0.05 seconds I click on anything I am not able to do it and this is what I see. I can not buy this app because it is expensive and I just need this magic need with the status bar. Anyone can help me ? This should be just a few lines of code I wrote an article that covers this question, but specifically Lollipop. I'm not sure that Android 5 will also apply to immersive mode 4.4.2, but it will probably try to do something? @ Override Protected Zero (Regenerate) {super.onResume (); HideSystemUI (); } // This snippet hides the system bar Private Zero Hide SystemUI () // Set // Set the content to be displayed under the IMMERSIVE flag // System Bar, so that the content ...

activerecord - Rails Chartkick Gem Error Loading Chart No Adapter Found -

I have a Rail 3.2.14 app where I use the chartkick and When I load my view, I get an error: error loading chart: no adapter was found here How my view code looks like: index.html.erb & lt;% = line_chart call.group_by_week (: created_at) Count% & gt; Charts and yielding chart_js application.html.erb (layout) & lt;% = javascript_include_tag "application "," Charticon "% & gt; & Lt;% = yield: charts_which% & gt; Can anyone tell me why I am getting this error and how it should be decided? I really want to start using ChartCike to generate some simple charts. this line is and javascript_include_tag "// Www.google.com/jsapi"% & gt; before & lt; % = Javascript_include_tag "applications", "chartsick"%> Also check the installation section in Mani's home page (scroll down :)).

Rally Rest API Query Project not returning all Projects -

I have been using this function for some time, but it has recently broken. When I ask for all the projects, I do not get all this. Some are parents and there are some child projects and all projects are open in the workspace. When I use the example of the rally, but I do not get it with Netscape, then I get it all. I do not see any difference between the projects, which will not be visible in my query. I am using Ver 1.43 but it is similar in Ver 2.0. Request Requests = New Request ("Project"); // Stackor Reich Fetch = Fetch: Get a list of fetch items from ListFrostrest (typef (Strict_proffectField)); // Query query query protected qr = restAPI.Query (req); thanks If you request? You can eventually exceed the maximum page size and therefore all projects may not return. req.Limit = 1000;

vsto - How can I block row and column insertion on Excel? -

Is there a way for me not to include rows / columns on my spreadsheet? I have an Excel 2013 workbook project and I have to block the use of users to insert / delete rows and columns. Yes. You unlock all the cells on the worksheet and then keep it safe Uncheck all the options except Insert Rows, Insert Columns, Delete Rows, and Delete Columns

standards - SCSI sense data formats and MODE SENSE control page -

SCSI Reference Manual defines two types of meaning data formats - fixed and variable descriptor-based ones (Chapter 2.4). "control mode page (0h)" (4.3.8), as the answer to the MODE SENSE SCSI command Return is considered to be a D-SNSE bit, which is defined as follows: DCSEX (DCRIPTOR format sensing data) bit 0 sets a descriptor format data data (D_SENSE) beat zero that the device will return the server fixed format meaning back to the data At the same time I_T_L_Q data as a check condition status in Nexus transaction. A D_SENSE bit set for 1 specifies that the device will return the server descriptor format meaning data when in the same way I_T_L_Q returns the return data to Nexus transaction as the status of the check, Except as defined in 2.4.1. My question is about this bit interpretation on the SCSI target side - if this is a bit 1 then what is the purpose of the server to return the meaning data in the descriptor format Is liability ? Or is it only ...

objective c - OS X application that can run shell commands -

I tried to ask this question, but they sent me back here. I have created a custom file association with TextEdit and it is working. Now I have to create an application that is custom to my custom Uses the file association and runs shell command to open non-proprietary applications (such as text edit, VLC, act). This app will be downloaded from the web. How can I get all this? It can be in any language, but better objective-c It seems like there is a better way to do this [[NSWorkspace sharedWorkspace] openFile: @ "& lt; FULL_PATH_TO_YOUR_ASSOSIATED_FILE & gt;"]; openFile for opens the specified file using the default app related to its type. The less elegant way to do this is as follows: Check the status of the open command on your system such as whereis open and the executable to change the code NSTask * task = [[NSTask alloc] init]; [Work Set Lockpath: @ "& lt; FULL_PATH_TO_OPEN_COMMAND & gt;"]; [Work s...

c - Getting the address of a statically allocated array into a pointer inside a struct -

मेरे कोड का सरलीकृत संस्करण निम्न है: struct args {int p; Int * A; }; टाइपिप्फ़फ़ स्टार्ट सॉर्ट_args sort_args; शून्य func (int A [], int p) {args new_struct = {& amp; A, p}; Args * args_ptr = और amp; new_struct; } मैं एक स्थिर रूप से परिवर्तित करने की कोशिश कर रहा हूं (मुझे लगता है कि शब्द है) एक सूचक में आवंटित सरणी है, लेकिन संकलक इन चेतावनियों को फेंक रहा है: चेतावनी: आरम्भिकरण एक कलाकार के बिना पॉइंटर से पूर्णांक बनाता है [डिफ़ॉल्ट रूप से सक्षम] आरग new_struct = {& amp; A, p; r}; चेतावनी: (एक नया ??? ????) [डिफ़ॉल्ट रूप से सक्षम] चेतावनी: आरंभीकरण एक कलाकार के बिना पूर्णांक से संकेतक बनाता है [डिफ़ॉल्ट रूप से सक्षम] चेतावनी: (एक नया नवीनीकरण के लिए आरंभीकरण के करीब) एईएफ़ [डिफ़ॉल्ट रूप से सक्षम है] मैं क्या कर रहा हूँ गलत? । आर्ग्स new_struct = {& amp; A, p}; = & gt; args new_struct = {p, A}; आपको स्ट्रैक्ट्स घोषणापत्र में दिखने के लिए किसी स्ट्रेट के सदस्यों को इनिशियलाइज़ करने की आवश्यकता है, या आपको इस तरह नामित सिंटैक्स का उपय...

java - How to use apispark from CLI -

How can I assemble the existing restart server for my resources? I was starting it like this and always went into errors: java-cp lib / org.restlet.ext.apispark.jar: lib / Org.restlet jar: dist / myrestapi.jar org.restlet.ext.apispark.Introspector -l swagger -v com.example.service.MyRestService -u xxx -p yyy Do I Need to annotate my server resources and how can I get to list my resources and their tasks? I also tried to expand and at least see my resources to get partial results but I would also like to see the methods and my code I want to annotate with relevant documents. How can this be achieved ? How do I use swinger annotations as I restart the resources? introspection You have correct dependencies (some missing ) And should go to get syntax. In your case, I will try something like this: java-cp lib / *: dist / myrestapi.jar org.restlet.ext.apispark.introspector -v -u xxx -p Yyy com.example.service.MyRestService Note: Introspector is currently und...

Closing a file powershell -

I am trying to write a script that opens all PDF files in a folder, prints them, and then File closes I have been working in the first 2 parts, although I can not find any way to close the files later. I did some Google searches but could not find anything. I am new to PowerShell, so if you have a better way of doing this then please let me know: go-hair item-filter * .pdf | Foreach object {# file item variable $ _ write host is "print: $ ($ _. Name)" Open file with # print command Itemprop = "text"> I do not have experience with it, but was curious about the start-process CMDlet with print operation. I went and came with this which proves to be a good solution to your problem: Start-up-filepath $ .FullName -Verb Print -PassThru | % {Sleep 10; $ _} | Kill source:

java - How to create a image button menu programmatically? -

Image
मैं इस तरह एक मेनू बनाना चाहता हूं: चित्र और टेक्स्ट इंटरनेट से लोड किए जाएंगे। किस दृष्टिकोण से आप मुझे उपयोग करने का सुझाव देते हैं? क्या मुझे ग्रिड लेआउट का उपयोग करना चाहिए? या एक एडाप्टर? क्या आपको पता है कि इस तरह के लेआउट को क्या कहा जाता है? और क्या आपके पास इसके किसी भी उदाहरण हैं? अग्रिम धन्यवाद। आप कार्यक्षमता प्रदान करने के लिए एक कस्टम एडेप्टर के साथ एक सूची दृश्य का उपयोग कर सकते हैं, और छवि-डाउनलोड करने के लिए, मैं पिकासो पुस्तकालय का उपयोग करने का सुझाव दे सकता हूँ यह छवियों को डाउनलोड करने के लिए एसिंक को संभालता है और त्रुटियों को बहुत अच्छी तरह से संभालता है, मैंने कभी इसके साथ और इसके बेहद सरल मुद्दों का सामना नहीं किया है। पिकासो लिंक: square.github.io/picasso /

typo3 - Is it possible to write a specific query in typoscript -

My question may look insignificant, sorry if it is! I'm currently learning typo3 and typoscript. I want to create a template with a dynamic background image. This image is stored in a directory. I would like to get the image name from the table tt_content However, the way it works makes me a little confused And I do not know that it's okay to take mine. The code looks like this: 20 = content 20.table = tt_content 20.select {where = pid = 79} 20. header image path = COA 20. header imagepath {10 = Text 10.stdWrap.field = image 10.stdWrap.wrap = & lt; Div class = "background-media" style = "background-image: url ('|'); background-repeat: repeat any; background-shape: cover; background-attachment: fixed; background-position: 50%;" Data-start = "background-position: 50% 50%" data -70-up-down = "background-condition: 50% 70%" & gt; & Lt; / Div & gt; } I would like to store information about the image in a var...

java - Executor service to run every x seconds -

What is the correct way to get an executable service to submit seconds of every x number? Public Zero Start () {executorService.submit (new Runnabal) (Public Zero Run) {Scheduled Future & lt; Integer> Results = Executable Service Searchules (Value, X, Time) Unit SECONDS);}); } Wrap the content of the method of running in some time (Thread.currentThread (.) Integrated ()) should be a valid approach - if not, how should it be done? Thanks Use: Scheduled ExeterService ses = Executors.newScheduledThreadPool (10); Ses.scheduleAtFixedRate (New Runnabal) {@Override Public Zero () {// some work}}, 0, X, time unit SECONDS); // execute every x seconds

php - Combine array form set of values and keys -

Hello everyone using php! I am looking for an answer I have two arrays - the other array of indexes from individuals and person array. person (array) selected index (array) [0] = & gt; 'Mark' [0] = & gt; 0 [1] = & gt; 'Jane' [1] = & gt; 2 [2] = & gt; 'Bob' [2] = & gt; 1 [3] = & gt; 'Jack' I want to create a third array which contains elements from the person array which is set in the selected indexes array Are there. As in SELECT * FROM, WHERE is the 'selected indexx' in the 'Person ID' but in PHP if you know what I am saying? I later use "forward" elements for the new array, but there is a small php solution eg inline? Edit: Oh, and output should be: selected person (array) [0] = & gt; 'Mark' [1] = & gt; 'Jane' [2] = & gt; 'Bob' (0, 2 and 1 only) $ result = Array_intersect_key ($ people, array_flip ($ selected));

Migrating existing Flex 4.x projects to Apache Flex 4.x -

I have been working to maintain some existing Flex 4.6 projects and I want future proofs for the latest browsers . Should I take the projects to Apache Flex? If so, what should I do to make these existing projects compatible with Apache Flex? no , you do not need to migrate these projects to Apache Flex is . Flex 4.6 projects can still be built and deployed; They do not have the latest SDK changes, your projects will be compatible with future Flash Player versions. The only reason for updating Apache Flex at this point is that you need the features to be offered in the later version of Flex SDK.

r - Weighting the inverse of the variance in linear mixed model -

I have a linear composite model that runs 50 different times in a loop. Every time the model is run, I want to get the reaction variable b weighted with variation. So if the deviation of B is small then I want to make weighting bigger and vice versa. This is a simplified version of the model: models & lt; - lme (b ~ type, random = ~ 1 | repeat, weight = ~ i (1 / b)) Repeat: I have weight options in RLME Trying to do this. Now I have this: weight = ~ i (1 / b) But I do not think it's right ... maybe weight = ~ 1 (1 / var (b)) ?? I also want to adjust it a bit because there are two types of data specified in the type of variable variables (2 levels) in B. I want to weight the variance of each of these two levels separately. How can I do this? I'm not sure that it is understandable to talk about loads feedback variables in this manner The description I have found in the mailing list of R-SIG-Mixed-Models refers to the use of inverse weight from t...

diagnostics - How to suppress warning (converted from error) in IAR EWARM 5.4 -

Image
I had a macro for logging that accepts a variable number of arguments. This macro will be processed by GCC in non-embedded context, and will spread to valid C code. Regardless of this, IAR EWARM "[Pe054] returns error:" Macro invites many arguments in the invitation "Wherever the macro (thousands of places) calls EWARM provides diagnostic configuration to convert these errors into warnings The code is compiled (i.e. "error" is not a compilation error, the compiler is just dumb)) The problem is That's when I try to change the 054 to the first time in a warning, then try to suppress it, I can not do it later. The solution is to control the order in which the operation is applied, such as: Convert to the first warning, then press.

haskell - Compiling a type class, Queue, with an instance for lists, don't work due to incomplete inference in GHC 7.8 -

Trying to compile the following Haskell program: {- # LANGUAGE multimartet class # -} Remove C: - C -> (E, C) Blank :: C - & gt; Bull example queue [E] e where new = [] insert = () extract (x: x) = (x, xs) empty = ll list :: qi ci => C -> [E] toList queue | | Empty queue = [] list queue = first (before, rest) = remove from first queue: toList rest main = print (new ([[:: :: :: int])) The following error: [1 to 1] Compilation Main (afff.hs, afff.o) afff.hs: 19: 16: arising from the use (QiCi1) Could not remove an empty ??? For reference (line CE) type bound by type sign: queue CE = & gt; C -> [E] at afff.hs: 18: 11-31 type variable â ???? E1â ???? It is unclear in the relevant binding line: C (bound at afff.hs: 19: 8) toList :: c -> [E] (binding on afff.hs: 19: 1) Note: A possible example is available: Example queue [e] defined on e-afff.hs: 12: 10 in Expression: An empty queue for an SMTM From a Pattern Protector list for the equation: ????: Empty Que...

ios - Duplicate Symbols for Architecture arm64 -

Image
When I try to start my encoded project, it fails with an error that I have duplicate symbols I have seen online where they get duplicates but no luck is found: How to fix any thoughts? thank you in advanced! By the errors, it will appear that FacebookSDK.framework already contains bolts I Framework Try removing extra bolt. Framework from.

php - how can you sort this folders contents alphabeticaly -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मुझे आश्चर्य है कि कोई मुझे मदद कर सकता है , मैं इस स्क्रिप्ट को टिनिमेस के भाग के रूप में उपयोग करता हूं, और यह चित्र फ़ोल्डर में ग्राफिक्स के नाम प्रदर्शित करता है, लेकिन मैं उन्हें वर्णमाला दिखाना चाहता हूं। क्या यह संभव है? अग्रिम धन्यवाद एरिक स्क्रिप्ट: & lt ;? प्रतिध्वनि 'var tinyMCEImageList = नए अर्रे ('; $ निर्देशिका = "../pics"; यदि (is_dir ($ निर्देशिका)) {$ direc = opendir ($ निर्देशिका); $ trenn = ""; जबकि (गलत! == ($ File = readdir ($ direc))) {if ($ file! = "।" & Amp; $ file! = "..") {if (is_file ($ निर्देशिका। "/" $ फ़ाइल)) {Echo $ trenn; $ trenn = ", nt"; गूंज '["'। $ File। '", "../pics/'.file।' ']';}}} बंद ($ direc); } गूंज ');'; ? & Gt; आप तब उपयोग कर सकते हैं। $ ArrFiles = ग्लोब ("*"); // सभी फाइलों को प्राप्त करें Natsort (array_values ​​($ arrFiles)); // ...

ios - Trying to launch Twitter in Safari if app redirect fails -

I am trying to add a follow-up button inside my app so that users can follow me on Twitter for support and updates. Able to . What I would like, if available, the Twitter app is to be launched and if not, then Safari will launch and redirect to my app's Twitter page. At the moment my app is the code to launch your Twitter page via work, though it is not working, if the user has not installed Twitter. Here is the tutorial which I was following: Here is my code: @IBAction function followOnTwitter (this: AnyObject) {if UIApplication.sharedApplication () openURL (NSURL.URLWithString ("Twitter: // user? SCREEN_NAME = AffordIt_App")) {if UIApplication.sharedApplication (). OpenURL (NSURL.URLWithString ("https://twitter.com/AffordIt_App")} {}}} you are missing operator in if UIApplication.sharedApplication () openURL (NSURL.URLWithString ("Twitter: // user SCREEN_NAME = AffordIt_App")) The reason why this browser does open, so can...

mysql - select statement in case statement sql -

How do I execute a SQL statement in the statement statement? I am trying to execute the following query and get the error: , select the case when 'trans_type' & lt; & Gt; Select 'stock' then lname else (select item_name from trans_i, where the range of id = a.id 0,1) as 'transaction' in the form of 'transaction' as the end Database MySQL Error: Error code: 1064 You have an error in your SQL syntax; Please check your manual manual related to the SQL Server version for correct syntax to use the select item_name from the transa limit 0,1 ps: I only for the demo purpose table I am using the transaction as the name, this is not a 'transaction' in my real database. I think this should be the correct statement. Choose , (when trans_type 'stock' then select item_name from a.lname else (trans_i ti where ti.id = a.id boundaries 0, 1) As 'A' from the 'Lname' transaction as the end)

pyopencl - Is the device address of a buffer the same for different kernels/programs in OpenCL -

When passing buffers as the argument of OpenCL kernel, buffer is detected by the kernel code buffer? I used to check the code below and it seems that the address is actually the same. However, I can not get anything in the standard to guarantee this. Import np def main (as moist imports as pyopencl): ctx = cl.create_some_context () queue = cl.CommandQueue (Ctx) mf = cl.mem_flags buf = cl in .Buffer (ctx, mf.READ_ONLY, 1000) buf2 = cl.Buffer (ctx, mf.READ_WRITE, 8) PRG = cl.Program (ctx, "" "__krnl zero get_addr (__global const int *, __global long out) {* out = (long);} "" ") .build () knl = prg.get_addr knl.set_args (buf, buf2) cl.enqueue_task (Qi, knl) B = np.empty ([1] , Dtype = np.int64) cl.enqueue_copy (qi, b, buff 2). Watts () Print (B [0]) PRG = CL. Program (Sitiaks, "" "__krnl zero get_addr (__ global const int * in, __global out long) {* out = (long);}" "") .build () knl = prg.get_addr knl.set_args (buf, buf2...

php - SQL field value of 0 returns empty -

I have variable types of data in the SQL database, and I am populating the table with PHP. Sometimes I have 3 columns, sometimes I have more depending on the type of data I use if: $ fourth column = $ Row ['fourth']; If (empty ($ fourth column)) {// nothing} other {resonant " Then it works as expected with a single exception: some columns are quantities when the quantity is '0', then it is returning empty and with the value of '0' TD does not make. In my composition, if there is no information, the cell is completely empty, and that is what I hope to return to empty form What '0' Is there any way to return? What am i doing wrong blank (0) evaluates correctly Php so that you can clearly check if (empty (fourth column) & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; fourth column! == 0 & amp; amp;; fourth column! == "0") {// nothing} other {...

python - Negative numbers don't display correctly in matplotlib xkcd style -

Image
I'm playing with the xkcd style feature in matlotlib. I have Matplotlib 1.4, and without the humor the font is properly installed, or at least works in msword. When I run the following example code, do I "?" At any time on the label there should be a negative number instead of "-" with any idea what is this? with plt.xkcd (): plt.figure () plt.plot (np.sin (np.linspace (0, 10))) plt.title ('wow ho !!! ') Besides, reputation is now enough to post an image as you can see that everything is expected only, which is expected beyond those tragedy question marks. Ericsson comments are correct. Thus, you have to add the MINUS SIGN (U + 2212) character for the xkcd font (without the predator) To do this, use the font editor (I used): Font forward menu From, open the humor Sans ttf file. Copy the copy HYPHEN-MINUS (U + 002D) glouf in the MINUS SIGN (U + 2212) character box (ordering them to increase the Unicode number). Go to File - &...

html - How to change image background position in CSS? -

I have given a background position: fixed but the image is not displaying properly, where I want to show them to the visitor I am What is the key to change the position, I am using Blogger, here is the code for body tags body {background: url ("http://i.imgur.com/8x7qciX .jpg ") Any repeating center top #ffffff; Color: # 666666; Font: 14px Arimo; Padding: 0; } I want the car to be slightly upwards, so I can cover the cover and keep track of it properly. Please type in In CSS, you can do something like this: body (Background-Position: 10px 20px;} Instead of using center top.

error handling - swift, optional unwrapping, reversing if condition -

Assume that I have a function that gives alternate if error and value if success: func foo () - & gt; times? {...} I can use the following code to work with this function: let fooResultOpt = foo () FooResult = fooResultOpt {/ Although there are some problems with this approach for any non-trivial code: Finally displaying the display Error in and something is easy to remember This is much better when the error handling code occurs after the call. The correct operating code is indented from a level if we have another task to call, we have to indent once. Typically, something like this can write with: bar * fooResult = foo (); If (fooResult == null) {// handle error and return} // Continue right here I found two ways to get the same code style with Swift, but I like Not so either Let fooResultOpt = foo () if fooResult == blue {// handle error and return} // use fooResultOpt! FooResult = fooResultOpt from here! // or other variables if I "!...

Output to New Window in PowerShell -

How can I get the output of a command (i.e., the processions) to display in the new PowerHail window - Nologo And -Inactive Options I have tried everything that does not work: Process & gt; Beginning-process powershell.exe -nolozo -inveritative gate-process | Write-output powers powershell.exe -nologo -noninteractive I can not get my output in a new power window, regardless of how many ways I google it I need to be able to do this when choosing a certain function through my mutli-level powershell menu script. Start - Filepath PowerShell.AxA -Agarmantist "-Nolo -Nonteractive -Candy {Gate -prosures} " Whatever you would like it will do, but I feel like what you probably do not really want in what you want.

iterator - java.util.NoSuchElementException - on iterating over sorted treemap -

I'm looping on my program, and I did not get any errors EloRating Java.util.TreeMap $ .setNewSeason at $ KeyIterator.next (unknown source) java.util.TreeMap $ PrivateEntryIterator.nextEntry (unknown source) (Exception in thread "main" java.util.NoSuchElementException on EloRating. Java: 242) This error indicates the Iterator loop. Treemark & ​​lt; String, double & gt; Treemark = New Treemark & ​​lt; String, double & gt; (); (; String, Double & gt; Sign in & lt Team: teamsIntersection.entrySet ()) {treeMap.put (. Team.getKey (), listTeams.get (team.getKey ()) getRating ()); } Sorted & lt; Entry & lt; String, double & gt; & Gt; List list = entries entered (tree map); Iterator & lt; Entry & lt; String, double & gt; & Gt; Iter = listSorted.iterator (); Int stop = (Zodiac intuction times + 1) / 2; For (Int i = 0; I If I execute the program once, nothing is special. But for some benchmark reasons, I have be...

php - Can I preload belongsTo parent models in Laravel 4? -

I'm getting a big batch of 1000 scenes that I need to loop in my scene, I get them doing something like this I: $ children = child :: all (); And in my opinion, I do something like this: @forach (children as $ $ children) {$ $ child- & Gt; Mother- & Gt; Name}} @ adverback The problem is, it executes 1000 queries. Do I have any way of using the relationship with related technique methods without this big loss of skill? Yes, you have with : $ Children = child :: with ('parent') - & gt; all (); To get a original relationship, only one additional query should be started.

data.table - How can I specify columns in R to be used in matches (without listing each individually)? -

Assume that there are three columns of data to me ( Sample 1 , Sample 2 , and Sample 3 ). I want all the rows in which the letter appears in any of the b or h columns. It works fine: data & lt; - Sample 1 = Representative ("A", 5), Sample 2 = C (Rep. ("S1_100", "s1_200", "s2_300", "s1_400", "s1_500"), B ", 2), representative (" A ", 3)), sample 3 = C (representative (" A ", 4)," H ")) data # Pankti_nam sample 1 sample 2 sample 3 # Sl_l00 Aba # Sl_200 Aba # S1_300 aaa # s1_400 aaa # s1_500 aah bh & lt; - c ('b', 'h') bh_data & lt; - subsets (data, (sample1% in% bh | sample2% Bh | in sample3 %% bh)) bh_data # row_name sample1 sample2 sample3 # s1_100 aba # s1_200 aba # s1_500 aah However, since I am asking the same question about each column, there is no less redundant way to do this? But in reality, we have more than 800 columns and more than 70,0...

java - Spring 4 vs Jersey for REST web services -

We are planning to create a new app with version 4.0.6. We use the controller who can return "XML" or "JSON" In the previous project, we have successfully implemented SEST support for Justice to support GAS-RS API, but some articles from senior writers After reading the suggestions, he said that spring is providing very good support. Some points that really complicate me using Spring Breast support without using JX-RS and jerseys: How in the spring Being marshaling and unmarshaling MVC? Is it necessary to use jack-rs for marshaling or unwillingness If marshaling and unloading If the pitch is automatically controlled by the spring, then it shows how to know about XML Root Elements. I am still confused if you prove to be a great support from the Spring Rest, then why do people still go with jersey for the rest? In fact, there is a desire to know more in details. If I said something wrong, please ignore it. Explanation with the example is real...

excel - how can I search for cells which display E+ scientific notation? -

मुझे लगता है कि ई + क्या VBA के साथ संभव है? यह एक कोशिश दो: उप FindSci () Dim r प्रत्येक के लिए रेंज आर में ActiveSheet.UsedRange v = r.Value t = r.Text यदि IsNumeric (v) और InStr (1, t, "E") & gt; 0 तब msg = msg & amp; VbCrLf & amp; R.Address (0, 0) अंत अगर अगला आर संदेशकॉम msg End उप

python - Extract the list of unique numbers out of a string of numbers -

डीईफ़ अनूठा (ए): i के लिए: सेट (ए) सेट ([1,2,3 ]) प्रिंट अद्वितीय ([1,1,2,3,2]) एक समारोह को परिभाषित अद्वितीय (ए) जो नंबरों की एक सूची लेता है और एक नई सूची देता है जहां का प्रत्येक तत्व केवल एक बार होता है नई सूची में इसके तत्वों को उसी क्रम में होना चाहिए क्योंकि वे एक में दिखाई देते हैं। आपके फ़ंक्शन को एक सेट का उपयोग करना चाहिए। वह है जिसे आप चाहते हैं: & gt; & gt; & gt; A = [1,1,2,2,3,3] & gt; & gt; & gt; सेट (ए) सेट ([1, 2, 3])

Problems parsing XML in Java with XMLStreamReader -

I have a value here that is responsible for getting the value of the attribute: CurrPost.Body = ReaderGetAttiveView ("", "body"); Therefore, body is the basis of my specialty. My XML file represents the SQL Server dump and is in this form as follows: And #xA; and #xA; amp; lt; Blockquote & amp; amp; amp; amp; amp; l & gt; P & gt; Many German Fairy Tales & Amp; #xA ; & Amp; quot; A war opened with & amp; nbsp; quot ;, but some launches & amp; amp;; & quot; Zoo der Jait, Els Das winson nach & # xa; gehfen cap ... & Amp; quot;. & Amp; lt; / p & gt; & amp; #xA; & #xA; & amp; lt; p & gt; Is there any other normal & amp; #xA; introduction ? If so, then there is a connection between their use and the geographical origin of the story? & Amp; Amp; Amp; Lt; / P & amp; Gt; & Amp; #xA; & Amp; Lt; / Blockquote & amp; Gt; & Amp; #xA, "OwnerUserId =" 4 "Last...

wordpress - JSON API to HTML -

I try to use different instructions to use the JSON API from Wordpress-System in an HTML-teamplate Unfortunately I'm not successful Do anyone have any idea how can I read the "Content" section? blog: function () {$ .ajax ({url: 'http://www.earnyour21.de/api/get_page/?id=1588', type: 'GET' , Data type: 'jason', success: function (data) {console.log (data);}, error: function (data) {console.log (data);}}); } If the data structure of JSON is always the same, then you just type the object name in JS Access the object directly by using. blog: function () {$ .ajax ({url: 'http://www.earnyour21.de/api/get_page/?id=1588', type: 'GET' , Data type: 'Jason', success: work (data) {$ ('# content_test'). Append (data ['page'] ['content']);}, error: work (data) {$ (' # Content_test ') .Append (data [' page '] [' content ']);}}); } Basically you need to use jquery to capture the d...

css - Transparent Menu Bar with Revolution Slider -

Theme by X Theme, and Revolution Slider I'm trying to make the menu bar transparent with the slider so that the slider below has the background of the menu bar. If I remove the background color of the menu bar, then I will use it with the background color of the site I leave it with being transparent which is white, so I'm guessing that I want to know how to increase it so that with the slider Could be transparent. Here is the link to the site below Thanks for the time ahead! You must update this CSS ... .x -navbar {background color: transparent; } .x-navbar-wrap {margin-top: -40px; } .tp-bullets.hidebullets {down: 60px; } .tp-bullets.hidebullets The square slider moves the bullet from behind the menu.

cql - Find upserted keys in Cassandra columnfamily within time interval -

Is it possible to get a list of the affected keys within the Casandra column family within a time interval? Sisandra maintains column level timestamps. Can it be leveraged in some way? I have a simple column (key, value) and I want to know which key was updated / inserted in the last one day. Unfortunately, I can not modify the column family to include timestamp columns and indexes, as is usually recommended. Does anyone have any other ideas / hacks that can solve this problem? If you want to modify the table that you have to scan the cluster across the table. CQL 3 and later you can write SELECT key, value, WRITETIME (value) from kvtable; This is the only way and it is very hard for the cluster. HTH, Carlo

elasticsearch - Unassigned Shards in Cluster -

I have an ES cluster that is playing at one point I had all the primary and replica shards that were right in my 5 4 out of the nodes were handed over, but in an attempt to go to 5 nodes in some, I once again lost my replica shards. Now my primary shards are present on only 3 nodes. I am trying to get under the issue: On trying to force allocation: {"commands": [ "Allocated": {"Index": "Group 7to 11poc", "shard": 7, "node": "SPOCNODE1"}}]} I get the following response: Having trouble finding the problem! Explanation: [1] 0: {Command: "Allocated" parameter: {index: "group7to11poc" shard: 7 node: "SPOCNODE5" allow_primary: true} - decision: [11] 0 : {Decider: "same_shard"} Judgment: "yes" explanation: "Shard has not been allocated for the same node or host"} - 1: {decider: "filter" decision: "no" explanation: "Mail from n...

c# - Format a string using binding to format currency with no decimal places -

$ 1200 Em However, I could not find any way to do this. I got the answer that gives me 1,200 using {0: 0,0} But there is no dollar sign in front of it. What should I do to accomplish this by using a stringing firm member of the binding. If I understand your requirement correctly, you can use it only It is the second in the examples which links. decimal a = 1200; Return a.ToString ("C"); // or string.Format ("{0: c}", a); You can also use "C0" if you do not really want to represent any decimal place. The main advantage above any custom format string is that it automatically adjusts culture variations in client-side.

python - Output manipulation from subprocess -

I want to manipulate the output with a subprocess call and only print specific details. I was originally going down from the PIPE route and sent the output to the second subprocess of grep but it looks very limited , Which means that I could only print some lines using the -A or -b grep arguments (some of which I Did not want). So now I'm taking the stdout.readline route. My question is, is there a better way of what I am trying to do? Does regular expression and again match the best option? Pipes in any sub-publication: Code> def nmap_ips (ip_list) ): In ip_list for ip: cmd1 = subprocess.Popen (["nmap", "-sC", "--open", "-Pn", "-p80,443", ip], stderr = subprocess.STDOUT , Stdout = subprocess.PIPE) cmd2 = subprocess.Popen (["grep", "title", "-a", "1"], stdin = cmd1.stdout) cmd1.stdout.close () Output = cmd2.communicate () [0] stdout Reading lines: # IM is...