Posts

Showing posts from May, 2012

objective c - How do create a global method in iOS? -

I use a POST request for a URL, parsing JSON and doing many useful things, I am trying to do Unfortunately I need to use it multiple times in multiple view controllers, what would be the best way to do this? I have found a working solution for variables (global variables used in each VC). Looks like .m file: #import "DataClass.h" @ Implementation DataClash synthesis string; @ Synthesis credit; @ Synthesis point; @ Synthesis global name; @Synthesis questionsCount; @ Synthesis wrong questions; @check the exact question; Fixed dataclass * instance = zero; + (DataClass *) getInstance {@synchronized (self) {if (example == zero) {example = [dataclass new]; }} Return example; } And every time I call the using a variable using the GetInstance method / modify the data class object. This method now receives some NSString parameters and also returns an NSString. So my question is .. Can I use the same class to make my call poststral method global and available for every VC...

VBA: Attach excel file as well PDF copy of same excle to an email on single button click in excel -

The VBA code to create a PDF file in Excel and attached to the button to me. I am thinking that it is possible to attach both PDFs and Excel files to an email with one click. Please find the below code which I am trying to modify .. bold section showing the two functions. Any suggestions or help greatly appreciated !! Thank you Sub Button1_Click () as dim EmailSubject string EmailSignature String Dim Email_Body string dim olMailItem object as dim 'form object as dim objMail CurrentMonth string, string, PDFFile as DestFolder as as as dim as string as the olFormatHTML dim Email_To string, as Email_CC string Email_BCC string dim OpenPDFAfterCreating Boolean, AlwaysOverwritePDF as Boolean, DisplayEmail Boolean dim OverwritePDF VbM sgBoxResult as dim OutlookApp object, as as as OutlookMail object 'CurrentMonth = "" dim fName string as string as as eCode1, eCode2 as string, fNameLong as string '**************************************** ***** *************** you ca...

javascript - Cordova - Capture video and retrieve base64 data -

I am using a phonegap to record a video and I want to save the base64 data-encoded string. So far I have tried to do this .. Capture function on function (media files) {var i, path, len; Path = media file [0]; Victory (path); } Function Win (file) {var reader = new FileReader (); Reader.onloadend = function (evt) {console.log ("Success Read"); Console.log (evt.target.result); }; Reader.readAsDataURL (file); }; Function Capture Error (error) {navigator.notification.alert ('Error code:' + ErrorRode, tap, 'capture error'); } Function capture video () {navigator.device.capture.captureVideo (capture source, capture error, {limit: 1}); } I have specified as the download data. Output of evt.target.result is not any encoded data after the "data: video / mp34base64," but file type. Do I want to add more to get the full base 64 data of the video? I am really struggling to find anything that can help me any help would be greatly appreciated. ...

angularjs - Angular ui router - Share views between states -

I'm trying to create a web app where I have an index.html page with three ideas: headers, Content and footer. I want to be consistent between the header and footer pages, but not the same as part of the index.html file. I would also like the content index.html app.js $ stateProvider .state ('my-app', {abstract: true, view: { 'Template': {templateUrl: 'partials / shared / footer.html'}}}) .state ('my- App.home ', {url: "/", View: {' Content ': {templateUrl:' partial / home_ ', Controller:' Home Controller '}}}) If I load the page "/" then it shows the header and footer loading properly, and I can see them on the page, but the main content is unavailable. Can anyone tell me what I am doing wrong? Thank you I managed to understand it. To see me in the state of your child was to get the viewpoint clearly in the original situation. To do this, I had to pay attention to t...

c# - Using HttpUtility.HtmlEncode and handling special characters/umlaut etc -

I use HttpUtility.HtmlEncode to sanitize user input to prevent XSS attacks. I am doing My problem is that it converts HtmlEncode special codes such as ü to their html equivalent code. I know what it does and does not encode. Then I need HtmlDecode to display it back to the user properly ü 2 question: How to HtmlEncode determines that it is not ü and other Unicode characters like standard Greek alphabet characters. Does HtmlEncode encode all non ascii characters? What is the best way to stop script tags but allow special characters such as umlauts without a special unknown list? Exposes a risk by using HtmlDecode This is potentially changing the malicious javascript HTMLEncode () is the main thing: it handles any such characters Which are not part of the default 127 ASCI characters. It encodes the character, which can be interpreted incorrectly by the browser as valid HTML, CSS or Javascript, to prevent both webpage crashed and deliberately. ...

css - How to change font family using adf -

I use this to call news fonts on my page, but not the result. Why? This font is not present for the default. I downloaded and inserted my font into the font folder in my skin. @ font-face {font-family: 'akzidenzgrotescregular'; Src: url ('font / axidase-grotech (r) extended regular' ttf 'format (' true type '); Font style: normal; } @ Font-face {font-family: 'kalvik regular'; Src: url ('font / caltic-regular-webfonts.tff') format ('true type'); Font style: normal; } @ Font-face {font-family: 'KlavikaBold'; Src: url ('font / caltic-bold- webfonts.tff') format ('true type'); Font style: normal; } I used it in some projects: .AFDefaultFont: alias, body {font-family: comic sans, Tahoma, without-serif! Important; Font-size: 14px! Important; }

issues with get path method in java lucene program -

I am using Lucene in Java to find rank documents against a query, but in the Getpath method code Error found: string directory name = "doc 50"; File folder = new file (DirectoryName); File [] listOfFiles = folder.listFiles (); To read files from the doc50 folder (int i = 0; iOffiles.length; i ++) // loop ... {if (listOfFiles [i] .isFile ()) // condition if the current file file type (Path path = file system .get default (). GetPath (directory name, listofffiles [i] .getName ()); String content = new string (files .readlibets (path), standard charsets.utf_8); / Read the entire document in the / single string addDoc (DocumentIndexer, content, listofffile [i] .getName ()); // indexed documents Add document} In the error, I get an exception in thread "main" java.lang.Error: missing compile problem: Type method in getPath (string, string []) file system logic (String, string) Please help me.

dictionary - Creating a NSDictionary as Int:String out of an plist-file -

Image
I have created a plist-file containing ints as in keys and string values As . Now I want to make a dictionary out of it: path = NSBundle.mainBundle (). PathForResource ("myPlist", ofType: "plist") as dict = NSDictionary (contentoff file: path!) [Int: string] ... but the app crashes though , If I declare it as [string: string] it works but i need the key as an int. I can not find any fault within the plist string to int swift in a built-in cast or There is no conversion, so you must manually declare and insert a new dictionary element through for loop: var plist = [int: string] () For (key, value) dict {if do index = (key as? String)? ToInt () {If value is value = value? String {plist [index] = value}}} first if ensures that the key can be converted to int , While the second examines that the value is actually a string .

How to retrieve the DOM data from chrome extension? -

I have code to develop the Chrome extension. manifest.json background.js debugger; Chrome.browserAction.setBadgeText ({text: "maskkkk"}; function doStuffWithDOM (domContent) {Console.log ("I received the following DOM content: \ n" + domContent);} Chrome.browserAction.onClicked.addListener (function (tab) {console.log ('this run will be bg creit jerk'); chrome Tabs.sendMessage (tab.id, {text: "report_back"}, Dustfood Dom);}); script.js debugger; / * Listen for messages * / console.log ('content script'); Chrome.runtime.onMessage. AddListener (function (msg, sender, transmitted remittance) {/ * if the expected format is in the received message ... * / if (msg.text and (msg.text == "report_back")) {/ * specified callback Call on, web page / content to send / send as spam in the form of arguments (documents all [0] .outerHTML);}}); I clicked on the icon, so I did not see any kind of activity. What is the right p...

how to check if xml file has more than one child values using php -

मेरे पास XML फ़ाइल है $ file.xml जिसमें निम्न शामिल हैं & lt;? Xml संस्करण = "1.0"? & Gt; & LT; नाम & gt; & lt; नाम & gt; name1 & lt; / नाम & gt; & lt; नाम & gt; NAME2 & lt; / नाम & gt; & lt; नाम & gt; NAME3 & lt; / नाम & gt; & lt; / नाम & gt; मुझे यह जांचने के लिए एक तरीका है कि अगर & lt; नाम & gt; एक से अधिक बच्चे है, & lt; name & gt; नाम 1 & lt; / name & gt; whick से अधिक है इसका मतलब है कि यदि & lt; name & gt; name2 & lt; / name & gt; या फ़ंक्शन कॉल करने के लिए मौजूद है। मैंने निम्नलिखित की कोशिश की है $ file = "file.xml"; $ Result = file_get_contents ($ file); file_get_contents ने मुझे पहले से ही मान दिया है Name1 name2 और name3 लेकिन यदि (@count (फ़ाइल ($ परिणाम)) 1) { कुछ भी नहीं पहले से धन्यवाद जी हाँ, यह संभव है, आप इस मामले के साथ संयोजन के रूप में xpath का उपयोग कर सकते हैं: $ file = "file.x...

java - how to encrypt a 3-tier architecture communication -

I have a zinc app protected in a 2-level architecture. There is a Tommy in 1 thier that handles https requests and At the second level, relying on an Oracle database completes the content. Since DB connections can be set to be safe and since I am using https, it is very secure (at least for these two aspects). Now, I have to monetize it in the application in a 3-level architecture and all channels must be safe. My first idea was to transfer Tommy to the central part and add some Apache httpd to the first level as a reverse proxy. The problem is communication between first and second class. If I understand well, then https is designed by a protocol that does not ensure MITM attacks, so httpd can not just push https OTOH, if both httpd Have your own SSL certificate, so I can encrypt the communication, but this certificate management will not be trivial. I could only open an SSL tunnel from 1 and 2 level, so Tommy could just walk on plain HTTP and could deal with the HTPD wi...

c# - Create SCOM alert with SDK -

I am writing a SCOM inbound connector and want to make the program alerts. I have worked on how to ask and solve alerts from using SDK, but in reality I have not been able to make it far enough to make them. Certainly one way to do this needed? Edit: The document clearly states that such a thing is possible: You perform an operation in the Operations Manager from an external management system You can use inbound connectors to insert events, and alert data. I have now found a solution to this problem. I do this for those who are interested. Use SDK in the normal way. This amount to call InsertCustomMonitoringEvent as shown in the example. Write a rule in the management pack that uses Microsoft.SystemCenter.SdkEventProvider and the author System.Health data source .GenerateAlert. Rules should target the objects that you generate for events. Add a condition identification module for the rule that filters on the EventLevel property. This means that you must h...

Excel formula if any cell in a range has a value get the value of another cell -

मेरे पास निम्न तालिका है AB 1 3 Val1 2 2 Val2 3 2 Val3 4 1 Val1 5 5 Val3 क्या कोई बी कॉलम के मानों के आधार पर वर्गीकृत ए कॉलम से कक्ष मूल्यों को योग करने के लिए एक सूत्र के साथ मेरी मदद कर सकता है = 4 वैल = 2 के लिए वैल = 2 के लिए दूसरा सूत्र = 7 मेरे पास निम्न है लेकिन यह बहुत बदसूरत है: = IF (बी 1 = "वाल 1"; ए 1 ) + IF (B2 = "Val1"; A2) + IF (B3 = "Val1"; A3) + IF (बी 4 = "वाल 1"; ए 4) + IF (B5 = "Val1"; A5) = SUMIF (बी 1)

caching - Android UIL use only chached Images -

How to show only preload Android Universal Image Loder images (no new download). Last Imejloder configuration ILC = new Imejloder configuration. Builder (Theme). Build (); Last DisplayImageOptions.Builder dioBuilder = new DisplayImageOptions.Builder () // .resetViewBeforeLoading (right) // .delayBeforeLoading (0) // .cacheInMemory (right) // .cacheOnDisk (right) // .imageScaleType (ImageScaleType.EXACTLY) / / .bitmapConfig (Bitmap.Config.ARGB_8888) // .displayer (new SimpleBitmapDisplayer ()) // .showImageOnLoading (R.drawable.loading) // .showImageForEmptyUri (R.drawable.error) // .showImageOnFail (R.drawable .error) //. Handler (new handler ()); Last Display Image Option dio = diobuilder.build (); Final DisplayImageOptions dioLocal = diobuilder // maybe something here * / .build (); ImageLoader.getInstance (). DenyNetworkDownloads (right) When the call you again to allow loading images from network denyNetworkDownloads (false)

vb6 - Getting Trojan Warning on use of FileSystemObject -

I wrote a small program that checks whether the drive is available between other things. When I installed it on another computer, Avira antivirus is raising a trojan warning, I narrow down the problem lines of code: 20 set fso = CreateObject ("scripting .file system object ") 30 fd = fso.driveexists (" f ") Why would I be getting a warning for that? I am pretty sure that I have used it in the past and I have not received warnings though, I have only used it in DLLs already, and it is an EXE file. Thanks You get a warning that the antivirus program thinks that your script is virus It goes back to that time when capturing computer viruses was being sent to VBScript in an email (such as your Bibid.pdf.vbs) and then clicking on it was easy. That will cause the loss of VBSPf filesystemback methods and general mayhem. Of course ... you can still use FSO: set the dim string A = "ting .fileSystem" set fso = CreateObject ("Scrip" + A +...

haskell - Properly import module with some definitions only visible with qualified names -

मान लें कि मेरे पास एक मॉड्यूल ए नामों के साथ b , सी परिभाषित। अब मैं किसी तरह से एक आयात करना चाहता हूं और निम्नलिखित नाम सुलभ होना चाहिए: ab एसी c जहां अयोग्य नाम b छिपा हुआ है। मैंने जिस पद्धति की कोशिश की है, उसे दो तरह से दो बार आयात करना है: आयात ए छुप (बी) आयात योग्य ए (बी) लेकिन यह ऊपर वर्णित प्रभाव को प्राप्त करने के लिए नहीं लगता है। तो ऐसा करने का सही तरीका क्या है? आपको करने में सक्षम होना चाहिए आयात ए (सी) आयात योग्य ए या आयात ए छुप (बी) आयात योग्य ए को केवल आपको c तक पहुंच प्रदान करनी चाहिए, फिर सब कुछ अंदर A योग्य वाक्यविन्यास का उपयोग करना यदि आप इसका परीक्षण जीएचसीआई में कर रहे हैं, तो याद रखें कि जीएचसीआई के पास कुछ अतिरिक्त विशेष सामान हैं जो इसे एक मॉड्यूल के अंदर पहुंच प्रदान करने के लिए अनुमति देता है जो इसे स्रोत से लोड किया गया है क्योंकि इसका प्राथमिक उपयोग अन्वेषण और डीबगिंग है।

sparql - Mapping DBpedia types to Wikipedia Categories -

I am trying to map dibepedia types in Wikipedia categories, one simple example is the following SPARQL query different? Where's the cat? DBPDA-OWL: Lacrosse Player; DCTRM: Subject? Cat Filter (regex (? Cat, 'players', 'i'))} Limit 100 But it is highly inefficient because it has previously named the names of DBipedia as DBipedia Identify organizations (resources) and then remove their respective Wikipedia categories. I am trying to do this mapping for many other Dibepedia types. Is there a direct or more efficient way to do this? can help improve the filter; & Hellip; As an initial note, if you remove or improve your filter, then you can get some speed. You can of course remove it, but you can make it even more effective, Because you are not actually using any special regular expressions. To check the URI (cat ('str (? Cat)', 'player') for the cat in the filter ( ?) string player may also be (I'm not sure) ? of rdf...

Google Maps API and ASP.Net -

I'm new to the Google Maps API and I need to integrate the Google Maps API with an ASP.Net application. is. Is there a Google service, where I can input UK postcode and radius as input parameters and without maps, I can only get results. For example, if I look for solicitors like Z1 1XY (like the actual post code) with a radius of 5 miles, can I get results of all solicitors with a scope of 5 secs? Is there any service that can only return the result set? I know that geocoding is something similar, but I can provide radius as an input parameter and get results. Any help would be appreciated. thank you in advanced. CTON The Geocoding API can only be used on a Google map Used in conjunction with; GeoCode result is prohibited without displaying them on a map. For full details on the use of permission, please consult. Source:

node.js - JWT (JSON Web Token) automatic prolongation of expiration -

I want to implement JWT-based authentication for our new Release API. But since the end date is set in the token, can it be automatically prolonged? I do not want users to sign in after every x minute, if they were actively using the application during that period. This will be a huge UX failure. But for a long time to finish, a new token (and the old one is still valid until it does not end) makes And after every request I feel silly to create a new token seems like a security problem when more than one token is valid at the same time. Of course I can invalidate the old used one using a blacklist but I have to store the tokens. And there is no one of the benefits of JWT. I found out how Auth0 solved it not only using the JWT token but also a fresh token: But again, to implement it (Auth0 Without me) I will need to store refresh tokens and retain their expiry So what is the real benefit? Why not not just a token (JWT) and end up on the server? What are the other options? Is...

Azure: Cannot Configure a VM Size beyond A0-A4 -

Trying to increase the size of the virtual machine on the A2 (2 core, 3.5 GB) machine from my Azer membership. I The only option available for this particular VM on the Configuration tab for the D3 (4 core, 14 GB) machine is> Virtual Machine Sizes: - A0 - A1 - A2 - A3 - A4 me The A5 or D3 virtual machine sizes are not available - although they are available for other virtual machines within my subscription. We have another one- Ray had some other VM with the same preference - our membership machines make VM (as well as the gallery) can be extended to all the memory and CPU intensive versions (A5 or D 3, D 4). Is there any way that will allow me to upgrade this old VM to the new specification of the virtual machine? According to the Azure MSDN article " For the virtual machine and cloud service size blue "Here: You can not raise the size of" basic "category VM in size larger than A4. Therefore, it seems that you will need to use "Standard ca...

php - Classic ASP equivalent curl_setopt($ch, CURLOPT_SSLVERSION, 0); -

I have an old ASP page that uses the https web service. I was told that the web service is a more secure SSL The version is going on and I wanted to go to the web service using a different parameter for SSL. As you can see below, send me a php sample code; curl_set ($ ch, CURLOPT_SSLVERSION, 0); How can I set this parameter using classical ASP? Thanks I do not know how to do at the ASP page level, But you can configure your IIS host to accept a certain list of ciphers.

networkx - How to add a simple "colorbar" to a network-graph plot in python? -

I was thinking how I can easily add a colorbar to my plot, I have to follow the code, which Reads the GML file and graphs the file. I have a set of numbers to designate the edges as their colors and I just want to see a colorbar next to the plot so that I can analyze the colors. When I add plt.colorbar (g) then gives me an error How can I actually add a color palette without going through all the processes of creating a color palette? H = nx.read_gml ('./ network1.gml') EAM = EigenVectorCentrality (EAMatrix); X = []; [0]: X.Append (im [0]) for EM in EAM; Degs = H.degree (). Values ​​(); Plt.clf () g = nx.draw (h, with_labels = 0, edge_color = x, node_size = 70, font_size = 9, width = 1) plt.axis ('equals') plt.colorbar (g); Plt.show () And here is the Nerwork1.gml file: Article [node [id1] node [id2] node [id 3 ] Node [ID4] node [ID5] node [ID6] node [ID7] node [ID8] node [ID 9] node [ID10] node [ID11] edge [Source 1 goal 2] edge [ Source 1 Goal 2] Side [...

cxf - could resolve binding for http://schemas.xmlsoap.org/wsdl/soap/ NO SPRING -

I wrote a small Maven project with cxf dependencies that can be run with eclipse (as a Java application Play). I am using maven-shade-plugin to create an executable jar. When I run a jar from the command line, I get a follow-up: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: do not resolve It is a compulsory for Http://schemas.xmlsoap.org/wsdl/soap/ I must say that I am using Spring I have come to some suggestions from Spring Which suggests putting some CXF XML files into the MTA-INF directory. The CXF dependencies that I'am are using are stupid: cxf-rt-frontend-jaxws cxf-rt-transports-http cxf-rt-transports-http-jetty in all versions 3.0.1 I really appreciate any clue. Thank you. Edmond

seo - can google detect structured data if using multiple sitemaps? -

I have tested my webpages using the Google Structured Data Testing Tool. It's been for months now and Google has not yet detected structured data on its site. I have 2 sitemaps sitemap.xml and us-sitemap.xml . Google is detecting structured data from a link sitemap.xml but it is structured in any link submitted in us-sitemap.xml Data is not detected. Is to call Sitemap to work properly or do I have to do something else? This is the site in question: If you have different names If there are multiple Sitemaps, they should be declared in your file in the following form: Sitemap: http://yoursite.com/sitemap.xml Sitemap: http://yoursite.com/ Us-sitemap.xml Alternatively, you can submit both search engines, but this is extra work ...

midi - How to link Note Velocity to Volume in Live or FL Studio? -

I have raw MIDI data through a script (note, note, velocity etc). I am sending this data to a DAW (Florida studio and Ableton Live) through Loop MIDI. How can I control the amount of sound using the amount of sound using the amount of sound in Florida or Ableton Live?

android - GooglePlayServicesUtil cannot be found after update -

I've been using Google Play Services as part of my project for a few months. I am using eclipse. I updated all my SDK etc. through the SDK manager on 1st November. Now the eclipse GooglePlayServicesUtilize the class can not be imported here I was describing it here: Example: If (GooglePlayServicesUtil.isGooglePlayServicesAvailable (Context) == ConnectionResult.SUCCESS). ..} Although I have updated Google Play services and all my SDX through SDK Manager, my workspace has a local copy of Google Play services, such as Google Dev Page). So I'm not sure if my SDK Manager has an effect on the copy of the updated GPS. Has anyone else experienced this? The search around it looks like the documentation page (above), it is still the same as it has been for the past few months. Thanks Are you testing on your emulator? If so, then You need to use an emulator that matches your Google Play services library. If this time is in compile, right-click the project name -...

Android wear notification on top -

Safety I want Android version see my notification at the top of all notifications stack on the device. I have read a document, Google says that we need to use the method for this notification to change the notification status within the notification notification. I have implemented such notification: notification compat. Builder Builder = New Notification Compat. Builder (it) Kuttm (wearable Extender) KsetContentTitle (GetSpannableTitle (FlightDtokgetFlightName ())) KsetContentText (GetSpannableContentText (flight, color, position)). PrePRP (Notification Compt.PRIORITY_MAX); But this code is not necessary, if the calendar notification is at the top, then my information appears below the calendar notification. How can this notification be shown above all the notifications? to show all notifications from your notification Set Proprtiti you Must add the set bitrate method Code sample working here: Notification comet. Builder Builder = New Notification Compat. Build...

no syntax highlighting for Ruby Gemfile in Notepad++ -

I created a new app in Ruby on Ruby and opened Notepad ++ It seems that most of the files are for easy development Syntax has been highlighted for making Ruby for Rail. There is a problem, even though there is a Gemfile, which is not given the Ruby File Extension: jifffile not Gemfile.rb . P> Menu Languages -> R -> Ruby and this will apply to color in the document. Unfortunately, you will need to repeat it every time you open the file.

performance - Android app - Perfomance vs Size -

I am in a dilemma that anyone knows the best answer I'm developing an app that uses a geographical database to get points and current user status. The database I am using is a postgear and its size is 75MB. What do you think is the best thing: Develop a webservice and get the status of every 5 meters user Do an HTTP request for? Use the database inside Android and get information with the Geo queries? Thanks; - It depends on the purpose of your app If your app needs offline and still requires function, then the database is essential. If your app is not required to lose offline capability and data, then a service is a good option if the data is large, then you are back to the database option. We have faced some real challenges with situation data and relative accuracy within our app. Another idea is battery consumption. If you add a message to GPS polling, then it can suck a lot of battery good luck.

security - User authentication and verification for android app -

I think this may not be the right question for this forum, but I did not think it was posted and to be done. However, here I am creating a dating app in Android. The main obstacles I am facing are user authentication and verification. Just keep, how can I make sure that a user is what he really says is he? How can I stop or reduce people who create fake profiles on the app? One way of doing so would be to force the user to connect to their Facebook account, but again, can become fake Facebook profiles. Is there any other good practice to ensure user verification? The best way I can think about this, though not stupid proof, when the user creates an account , He sends them an email where they need to click on the link, clicking on the link can confirm something, such as their chosen username and or first name and last name etc. If they fill this information with email, they are probably legal and you can mark the account actively. Database. If any account not verified aft...

r - Collapse a dataframe -

I have a dataID with a sampleID, chromosome, start and stop, and minol score. I want to break the dataframe so that for each possible combination of start.pos and stop.pos, Chrome adds a minol score to all the samnains. Input: sampleID chrom start.pos end.pos meancol 1.1 0012102_A01 1 0 11,194,349 1 1.4 0012102_A01 1 11,194,349 11,492,125 1.5 1.51212102_A01 1 11,492,125 71,442,329 1 1.9 0012102_A01 1 71,442,329 249250621 1 1.13 0012102_A02 1 0 65493011 1 1,92 0012102_A02 1 65493011 66164733 1 1,102 0012102_A02 1 66164733 121347754 1 1,52 0012102_A02 1 121347754 249250621 0 1,14 0012102_A03 1 56384956 1 1,83 0012102_A03 1 56384956 106266297 1 1,73 0012102_A03 1 106266297 249250621 0 1,15 0012102_A04 1 0 51,484,139 1 1.27 0012102_A04 1 51484139 249250621 0 2.1 0012102_A01 2 50000001 1 2.2 0012102_A01 2 50000001 250000001 1 2.3 0012102_A02 2 50000001 0 2.7 0012102_A02 2 50000020 270000001 0 2.18 0012102_A03 2 50000004 2.19 0012102_A03 2 50000004004 250000001 0 1.15 0012102_A04 2 ...

testing - Authentication test running strange -

I just tried to write a simple test for Auth : as fun as m; ... public function testHomeWhenUserIsNotAuthenticatedThenRedirectToWelcome () {$ auth = m :: fake ( "illuminate \ Authentication \ AuthManager '); $ Auth-> ShouldReceive ('Guest') - & gt; Once () - & gt; AndReturn (right); $ This- & gt; Call ('GET', '/'); $ This- & gt; AssertRedirectedToRoute ('general.welcome'); } Public function testHomeWhenUserIsAuthenticatedThenRedirectToDashboard () {$ auth = m :: fake ('Roshan / Auth / AuthManager'); $ Auth-> ShouldReceive ('Guest') - & gt; Once () - & gt; AndReturn (wrong); $ This- & gt; Call ('GET', '/'); $ This- & gt; AssertRedirectedToRoute ('dashboard.overview'); } This code is: public function getHome () {if (Auth :: guest ()) {back direct :: route ('general .welcome '); } Return redirects: route ('dashboard overview'); } When I ru...

ios - How to properly combine ARC code with NON ARC code? -

I know there are questions about it and I have read them. I need XML parser in iOS . I need to use the GDataXML parser. I disable the ARC for this, but in the example also, maintain and release like non-ARC There are commands. I will remove them, but can it lead some leaks to leak? I do not think so, but I'm not sure. No, it can not lead to memory leaks. For non-ARC files, just use -fno-objc-arc . "Automated reference counting implements automated memory management for purpose-C objects and blocks, programmers are explicitly inserted and released for free. This does not provide a cycle collector Users should explicitly manage the lifetime of their object manually or to break weak or insecure references. A Clearly the compiler flag -fobjc-arc. This can also be clearly disabled with the compiler flag -fno-objc-arc, the last of these two flags visible on the skeleton line "win". " See for more information.

c# - getting information about which push pin was clicked -

I am creating a Windows Phone 8.1 app that reads a file (which has GPS points, in each point Latitude and longitude fields) for every point, it is because it is displayed with a little push pin icon on map control depending on the coordinated file of the above file. I want to click the pushpins and the final goal is to get the latitude and longitude of the point on which the user clicked and took the appropriate action on which one click has been made. How can I get this information? This is what I tried to do but it does not work: Private async void Image_Tapped (Object Sender, Tapped Event ARG E) {var point = Sender Geopoint; MessageDialog msgbox = New MessageDialog ("Point Tape:" + point.Position.Latitude); Msgbox.ShowAsync (); } This is my template: & lt; Maps: Map Controller x: Name = "myMap" & gt; & Lt; Map: MapItem Control Item Surce = "{Binding}" & gt; & Lt; Map: MapItemsControl.ItemTemplate & gt; & Lt; Data...

windows - How to uninstall arcanist? -

I am using Windows 7 Professional and I want to uninstall archanist, however, I have not found the uninstall file and I did not find the Fabricator page useful. The archanist is a set of PHP files from a GIT repository, just remove them where you installed them.

xamarin.ios - Modify the Frame of UIButton -

I am trying to resize a UIButton referenced from the xib file. This is what I have tried without success: RectangleF frames = actionBtn.Frame; Frame With = 140; Action btn.fr = frames; What am I doing? You can not modify an existing RectangleF instead try it RectangleF frame = actionBtn.Frame; Action BTN.frame = new rectangle (frame.x, frameY, 140, frame.height);

c# - Visual Studio add reference automatically -

I use some basic namespaces on each project, so when I always Project -> Add Reference . Is there an easier way? The way to go to project templates - see in detail for MSDN. / P>

annotations - Add ShallowEtagHeaderFilter in Spring Boot MVC -

I am trying to adjust my application configuration to set up ETag support. Let me tell you that my code is different than this: I do not use any XML configuration files. I'm using different configurations classes for each aspect of the system like my WebConfig @Configuration @EnableAutoConfiguration @ComponentScan (basePackages = { "xxx", "yyy"}) public class WebConfig extends WebMvcConfigurerAdapter {@Bean public filter shallowETagHeaderFilter () {new ShallowEtagHeaderFilter (); } ... And my security looks like this: @configuration @ EnableWebSecurity public class security Confif Vebsaktik Configrar Adapter {... protect configured zero override @ (last Actiteepiakteepiti http) exception {http.sessionManagement ()) session policy (session policy. STATELESS). And (). Exception handling (). Pramanikrnantrypoint (Pramanikrnanntrypoint ()); and () .authorizeRequests () .antMatchers (HttpMethod.GET, "/ **"). Authenticated () .antMat...

ocaml - opam fails trying to install lwt looking for pthreads -

On Ubuntu dependable VM, I recommended OPAM (version 1.2.0) from PAP to Real World Open Set. I Docs. opam install lwt is running, and check the .out file show: Test for pthread: ........................... unavailable for glib unavailable following Recovery C library are missing: pthread I have the Ubuntu package libpthread-stubs0-dev installed. What do I need to install to install? According to: 14.04 [Trustee] Okkal and Opam Comes with recent editions. otherwise Opam often chooses the wrong versions of the package, and I have seen this error once in that situation.

Subscriptions in Paymill -

Customers subscribed to "Big" (recurring payment) I have a payment and offer Make the object, and it works. Now I want to update the "short" (a different name and amount) to that membership, but without an update credit card. Pemilal flow is very ambiguous to do this, and it is uncertain what the process is. You have done something like this with Pemille, I will be happy to hear what you are doing. I am using .NET wrapper one of the ongoing subscriptions There are 3 types you can use to change the proposal (scheme) These are the documentation: In .NET they are aware of three ways, which are documents:

java - Subclasses as arguments to abstract method -

I have intangible class animals and flowers in my program animals eat flowers, but each animal only eat a certain type of flowers (Like Rhino eat only rose, turtle eat tulips). Now my code looks like this: Public intangible class animal (abstract boolean eating flower (flower f);} Public class Rhino provides animal {Boolean food Flower (flower f) {if ((for example (rose!) False return; return (f.eaten = true);}} Public squares provide turtle animals {Boolean eating flower (flower f) {if ( (For example, Tulip!) False return; return (f.eaten = true);}} I apply this distinction to ins Tanceof where every animal eats only one type of flowers, I eat it turtle and Rhino's method signature for flavor (tulip t) and eaters (Rose R) respectively, but I do not think it is possible in Java. Is using the example to implement it Is there a better way to do it? The generic can use something like: public abstract class Animal & lt; T flower extension & gt; {In...

Java: How can I get the size of Integer(object) array? -

I'm talking about the integer object data type, not primitive int Suppose: integer [] arr = new integer [5]; Arr [0] = 2; Arr [1] = 2; Advent [2] = 3; Then the array will look like this {2,2,3, tap, blank} how can I get the shape of Array? In this case, size is 5 Similar to any other array - you type length field: int length = arr.length; // 5 to: The members of an array type are all of the following: Public Last Region Length , which contains the number of components of the array, length may be positive or zero. ... Blockquote> If you want to count non-zero values, then you will use something like this: integer number = 0; For (integer value: arr) {if (value! = Null) {count ++; }} (I'm sure there is a clever way to do this in lower lines using the Streams API in Java 8, but we keep it simple so far ...)

Quesition on C++ polymorphism usage -

# शामिल है & lt; iostream & gt; वर्ग आधार {सार्वजनिक: आभासी शून्य रन () {}; संरक्षित: ~ बेस () {std :: cout & lt; & lt; "बेस के लिए डिस्ट्रिक्टर" & lt; & lt; std :: endl;}; }; वर्ग व्युत्पन्न: सार्वजनिक आधार {सार्वजनिक: शून्य चला () {}; ~ व्युत्पन्न () {std :: cout & lt; & lt; "व्युत्पन्न के लिए विध्वंसक" & lt; & lt; std :: endl;}; }; शून्य get_type (std :: shared_ptr & lt; बेस & gt; बी) {b.reset (नया व्युत्पन्न); Std :: cout & lt; & lt; "get_type के अंत" & lt; & lt; std :: endl; } Int main () {std :: shared_ptr & lt; base & gt; ख; Get_type (b); Std :: cout & lt; & lt; "get_type से बाहर" & lt; & lt; std :: endl; बी & gt; रन (); } यह ठीक संकलित करता है लेकिन मुझे विभाजन त्रुटि मिली। मैं देख रहा हूँ कि क्या हो रहा है और आउटपुट है get_type सेगमेंटेशन गलती से बाहर के आधार के लिए व्युत्पन्न डिस्ट्रक्टर के लिए get_type डिस्ट्रक्टर का अंत: 11 यह get_t...

postgresql - PostGIS bounding box query returned strange results -

Image
I tried the following SQL commands: Create tablespace (lat_lng geography Point, 4326), location_name varchar (50)); Make indexes place_lat_lng_idx (lat_lng) at places to be used; Include in the values ​​of places ('digits (-126.4 45.32)', 'food bar 1'); INSERT values ​​at places ('POINT (-126.4 47.32)', 'Food Bar 2'); The value of places in INSERT ('digits (-125.4 47.42)', 'food bar 3'); Select the place place_name, ST_AsText (lat_lng) as the location from the place where places.lat_lng & amp; ST_MakeEnvelope (-130.0, 44.0, -100.0, 46.7, 4326); The result is: place_name | Point ------------ + --------------------- Food times 1 | Points (-126.4 45.32) Food Bar 2 | Points (-126.4 47.32) Food Bar 3 | This is not right for me, as is ymax 46.7, but "Food Bar 2" and "Food Bar 3" have ymax values ​​of 47.32 and 47.42. , Where is the problem strongly? : With your query points here, this envelope has b...

ruby on rails - How to merge multiple simplecov directories inside CircleCI when running parallel_test? -

Image
I have a rail application that runs parallel_stest with RSPC inside the circle All around the Internet I'm looking forward to starting my spec_helper.rb file: If ENV ['coverage'] requires 'simple' Change the output DIR to artifacts on the circle if ENV ['CIRCLE_ARTIFACTS'] dir = file Include ("..", "..", "..", ENV ['CIRCLE_ARTIFACTS'], "coverage") SimpleCov.coverage_dir (dir) SimpleCov.merge_timeout 3600 SimpleCov .command_name "rspec _ # {Process.pid .to_s} # {ENV ['TEST_ENV_NUMBER']} "Android Simple Cove The problem is that as a result I get a separate folder for each circle example: What am I doing wrong? I work in Circle CI Unfortunately this is not working - we have all the constructions then Do not prepare until all the constructions are finished, so the devices that try to merge together during the build will not work. We talked about adding capabilities to do this...

sql - Check SSIS Connection Manager's access to Server and DB -

I have a table like three fields, server-name ---- - DB-Name ------- Flag ABC ------------------ ABC 123 XYZ ---------------- - 123XYZ EFG ------------------ ABCXY5 YUI ------------------- TER 675 I save the details of that table in one variable and for each loop container, the connection manager of the data flow job for each loop container will be dynamically called the server and the DB name Is attached to Irdisht. And if the above two conditions fail, then update the flag to "0" and send the related details to users. How can I update the "Flag" field in the table based on the above two conditions? why not Can perform simple tests that try to make a connection ... string connection string = "from your object var"; SqlConnection con = new SqlConnection (connectionString); ... Wrap up to catch / update and update the flag on the basis of whether an exception occurs or not. See how to use object variables in you...

json - Loading module from Template Toolkit fails -

पर्ल 5.10, उत्प्रेरक, JSON 2.90 का उपयोग करना। जब मैं [% USON JSON%] में एक टेम्पलेट टूलकिट में, मुझे यह कहने में एक त्रुटि मिलती है कि मॉड्यूल नहीं मिला (मुझे पता है कि यह स्थापित है)। / P> क्या यह संभवतः एक कॉन्फ़िगरेशन समस्या है? हमारे कार्यालय में अन्य बक्से पर, बिना टेम्पलेट लोड लोड। टेम्पलेट टूलकिट (टीटी) कोड में [% USON JSON%] पर्ल मॉड्यूल JSON को लोड नहीं करता है। टीटी कमांड एक टीटी प्लगइन लोड करता है एचटीएमएल>

php - Update records once a year, spread evenly throughout year -

Not the best way to make sure what I'm trying to do, bear with me I Working with PHP with MySQL database I have a database of 10,000 records, suppose I want to update 10000/365 per day throughout the year. Each record gets updated 1x per year, and spreads well throughout the year. An easy way to do this is to choose all the records, for each, if ID% 365 = $ day_of_year, then update that record. I'm not worried about leap year. Is there any way that I can select records from the database rather than selecting all databases and looping through each (approximately 27)? This is a cron job that I will run in the middle of the night, so perhaps this is an important issue. Even then, it bugs me that I have to force my power through 10,000 rupees, it would be nice to find a more beautiful solution by dragging only a small fraction. add a column then add that event once a year Moves and reset the values ​​of that column and it is counted in new form - 10000 records of th...

android - How to integrate multiple service providers into Paypal app? -

I want to make an app in the future that uses the PayPal API. The app will allow different service providers to offer their services and pay customers through my app. I have seen SDK and I do not see anywhere to dynamically insert service provider email or merchant ID. Is this possible? If so, can you direct me to an example? You can do it with express checkout, and you do not have to mess with absolutely permissions That's why I would recommend. Within the SetExpressCheckout request you can include a value for SELLERPAYPALACCOUNTID. This will be the merchant ID of the email address or user you want to take money on. If you have that value in the user's data, then you only need to include it as the value of the payment parameter, when you request payment and the money goes into that account.

javascript - jquery hide div loaded previously with jquery click function -

I am trying to create a menu that will show a div when an item will be clicked by adding "visible" . When a second item is clicked on the menu, then it seems that to hide the previous div by changing the "div's" square to "hidden" I have not been able to hide this last div and I have tried if using conditions I think I am doing something wrong. I'm using this menu: & lt; ul class = "product_dynamic list_male"> gt; & lt; Li & gt; & lt; a href = "class =" prod_switch_1 "& gt; & lt; span class =" title "> option 1 & lt; a href = "" class = "prod_switch_2" & gt; & lt; span class = "title" & gt; option 2 & lt; / span & Gt; & lt; / a & gt; & lt; / li & gt; & lt; / ul & gt; Jquery For (var i = 1; I & lt; = 3; ++ i) {(function (n) {$ (.produ_switch_ '+ n) .bind (' click ', functi...

flyway - flywaydb: How to stop accidently clean -

itemprop = "text"> There is a command called 'command' inside the flyway db, if we use it, it will skip all the objects in the schema . Leaves all objects (tables, views, processes, triggers, ...) in the configured schema, the schema is cleared in the order specified by the schema property. How can we disable it so that nobody accidentally uses it as necessary? Your best option is to command the flywheel, wrap the script of the flywheel on its own. Then you can stop the clean command and no-op.

Define a class as a CSS property? -

In CSS, is there a way to use a class in the form of assets? As the first line of the following: h1 {class = big} .big {font-size: 25px; } .small {font-size: 10px; } The goal is to easily change the H1 style by changing "big" with "big" in the first row of the code, "big". You can use less, mother-in-law, stylus or something similar. With those people you can do this easily.

How to unmap a project in TFS using eclipse plugin? -

Image
I am attempting to unmute a project that I previously downloaded while using eclipse plugin for TFS TFS server before Needless to say, I can not do it When I click on the mapped place, then it takes me to the mapped folder and the mapped folder on your local hard drive Opens When I right-click on a mapped project, then I can not find an option to shrink. Here are the options I see: (Team Explorer -> Source Control Explorer -> Right Click on Project) I tried to remove the directory from my local machine, but I was not able to do this. Is there an easy way to unplug a project using the Eclipse plugin in TFS? I am using Windows 7 as my operating system. Eclipse version: Kepler Service Release 1 Build ID: 20130919-0819. In Package Explorer, right click on Project, go to Team menu and choose Manage Workspaces. Select, click Edit, and manage the Workspace dialog, remove the appropriate workspace mapping.

sql - random slowness in a simple SQLite query -

I have a code to update the SQLite database table (~ 40 million lines) (part of the code that we get regularly on a data file based on Perl using DBL on Linux, if this is the case) Frequently queries a very simple selection on the database. Some of them run under a transaction like a loop below. The selected query is usually & lt; 0.01 seconds, but a percentage of time will take 2 seconds or more Why any thoughts? This overrides "slow" runtime from time to time and therefore there is a big problem for me. while (& lt; UPDATE_FILE & gt;)) {my ($ val4, $ val5) = get_values_from_line ($ _); My $ CMD = "SELECT col1, col2, col3 ... coln by table" "WHERE col4 = $ val4 and col5 = $ val5" "order calls by 2 days, call 3" "; execute $ cmd; On the basis, do not insert or modify the table, or do anything} So whatever is different for each walk, where is the description of where the section I do not understand What's going on to k...

Preload activity in Android? -

I'm trying to create an Android app that will be paired with an iPhone app - both of which 90% of them Creating a new webview on both platforms of content takes a non-zero sum - I have had some success for the iPhone, which before the webview user taps anything, then add it to the navigation stack The time when they do. I am trying to do this with Android but the concept of 'activity' is holding me back. It appears that my webviv should be part of any activity, and I can not present the scene without this view, which is currently the one shown on the screen. Is this the case? If so, there is no qualification to load a webview and then insert it into an activity? Try to see more service concept than activity to run background tasks, run in webview service And that service can be loaded on creatives () A little background / similar question (negative comments on top answer your questions Should not be affected)

Using a loop in SQL to populate the table (SQL Server) -

I'm particularly new with SQL and loops and need some help with the following problem. I have a table like this: SpotID eventID maximap 123 1 45 236 1 109 69 1 18 123 2 216 236 2 29 69 2 84 123 3 91 236 3 457 69 3 280 I would like to generate a new table with the following output: SpotID Over30 Over70 Over100 123 3 2 1 236 2 2 2 69 So what I am doing next is to count how many times the temperatures exceed 30, 70 and 100 per spotID limit for separate eventide. Is there any way to do this with a loop? My data set is obviously bigger and I'm curious if I can use some skillful. Thank you very much. Mike You need conditional aggregation: As maximal amount of 70 (when maxtemp> 100 again 1 more) (code maxtemp> 30 then 1 and 0 end), sum as over_30 (case maxtemp> 70 then 1 and 0 in the end); 0 end) as the plus_100 by likethis group by spottif;

Ruby if regex help needed -

I'm trying to modify someone's script. I have managed to modify all but have left a problem I am unable to solve: disp_status ("\ tSample: # {convert_err (Results ["condition"])} ") This creates different outputs, however, when the output is" error ", then I get it to work Want to do I'm not sure how to limit it to "error", because it always seems to run the method, it does not matter. What I tried was: {Convert_err (result ["condition"])} = ~ / error / And can anybody help a lot of iterations without any luck? Ruby does not work in interpolation without double quotes. But using the interpolation here is killing more, just change the line in question like this: If # {convert_err (result ["condition"])} = ~ / error If and it should work! : -)

vba - simple loop used to be fast, now it's slow -

I have a simple piece that was burnt through the data of 45,000 rows in the eyes of the eye and now it takes a Very long (~ 15 minutes). I have read through some similar problems, but I want to post the code because it is very basic, this code is the individual weight of each item (one line per line) of an order, and then a cell for each item with the total amount Allocates to. It goes from top to bottom to get the total and then goes from bottom to bottom to fill the empty space. What am I missing? Sub-fill Bhartakya () 'File Completely according to the process order' 'This macro tells the weight of children of all processes' and then in that column E total' Long Dim Nrow As long as the dim nLastRow long dim wtTot dim Nstop, 'every line of the process' order' last line 'nLastRow = ActiveSheet.UsedRange.Rows.Count' process order 'by ActiveWorkbook.Worksheets' type Scheduling (. "Zpr2013b") Sort.SortFields.Clear ActiveWork...

xslt - remove child node namespace and copy another node into a variable -

I am trying to copy all the children of soap elements: the header element in one variable and the pricing vacancy is empty Also trying to remove the name space (Xmlns = "http://www.ama.net") and the output of XML is only the pricing irrigator part I am able to remove the PricingRequest blank space and get the appropriate output, but soap Not able to store: header child element Not in a variable, is it possible to copy the basic elements of soap: Herr in a variable? INPUT XML: & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Soaps: Envelope xmlns: Soap = "http://schemas.xmlsoap.org/soaf/envelope/" & gt; & Lt; Soap: header xmlns = "http://www.ama.net/1axml-msg/schema/msg-header-1_0.xsd" & gt; & Lt; MessageHeader ResponseRequested = "true" version = "1.0" terminnect = "true" reverse = "true" id = "09B5581A" soap: samsa = "1" & gt...

javascript - How to get the highest key and value from object -

I am trying to get the highest key and value from an object, how can I return the desired result ? Here my object is: categories = {'personal': 4, 'swag': 3, 'mingle': 2, 'meditation': 1}; desired functionality: returnMax (categories) // {personal: 4} Here's how I do it: categories = {'personal': 4, 'swag': 3, Mingal ': 2,' Meditation ': 1}; Console.log (MaxCat (categories)); Function MaxCat (obj) {var highest = 0; Var arr = []; (Different types of OBJ) (if (obj.hasOwnProperty (prop)) {if (obj [prop]> supreme) {arr = []; highest = obz [prop]; arr [prop] = highest;} }} Return arr;}

salt stack - Monitoring SaltStack -

Is there anything to monitor sultext installation except for the light? I have installed it but in reality what we are looking for is not really. It would be good if we have a web site or a daily email that showed the status of all the miners. I am very easy with the script, but I do not know what the script is? Anyone have any ideas? In case of monitoring you This GUI lets you do this Instead of knowing, whether the Minions are alive or not, they can allow you to work on them in the same way with the salt client. And in the case of surveillance, you mean Just salt master and salt minions are up and running , monitoring solutions for general purpose such as In fact, these devices can monitor various services on Host Host any machine Which has an ip address and service can be any resource which can be queried for queries Example of Host via interest OS can be server, router, printer ... and example of service Memory, disk, process, ... m...

How to send a POST request using JSON format in PHP -

For Chrome, I was able to send post queries to a specific URL and use the following Restricted Client Extensions I have entered this as the header: Accept: Application / JSN Version: 1.0.2 Authorization: Code sadkj4-sadj-as22-asdk2 As the body: {"email": "$ email", & lt; ==== The PHP variable is given as a "password" argument: "$ password", & lt; ==== PHP variable passed as "user verified" argument: true, "notification opus": [{"notification type": "NOTIFICATION1", "enabled": true}, {"notice type": "NOTIFICATION2", "Notification type": "notification type": "notification type": "notification 3", "enabled": true}, {"notification type": "NOTIFICATION4", "enabled": true}, {"notification type": "notification 5 "," enabled ": {" notification type ...

ruby - Sencha Touch - Undefined mixin 'experimental' on compass compile -

जब मैं कंपास संकलन के साथ अपने sass कोड को संकलित करने का प्रयास करता हूं मुझे निम्न त्रुटि मिलती है: त्रुटि app.scss (पंक्ति 42 का / माइक्रोसॉफ्ट / टाच / संसाधन / थीम / स्टाइलशीट / शेंचा-टाच / बेस / एसआरसी / पो्र्रग्रेसिइंडिकेटर.scss: अपरिभाषित मिश्रण 'प्रयोगात्मक'।) मेरा सास कोड बहुत सामान्य है, मेरे पास है: @import 'sencha-touch / default'; @import 'sencha-touch / default / all'; / * * / नीचे मेरे सीएसएस के बाकी * मैं उपयोग कर रहा हूं: सेनेचा टच 2.4 कम्पास 1.0.1 (पोलारिस) रूबी 2.2.0dev मैक ओएसएक्स योसमाइट जोड़ना @import "compass / css3 / shared"; परियोजना का app.scss को त्रुटि को हल करता है यह आयात सेन्चा आयात के पहले जोड़ा जाना चाहिए अगली त्रुटियों के लिए मुझे भी जोड़ना पड़ा: @import "compass / css3 / box"; $ प्रयोगात्मक-समर्थन के लिए पाई: false; संस्करण: सेचा टच: 2.4.1, कम्पास 1.0.1, सैस 3.4.9, रूबी 1.9.3 संदर्भ:,, त्रुटि को हल करने के लिए पूर्ण आयात करें: @import "कम्पास / css3 / स...

bash - command to print all the lines until the first match -

I am trying to print all the lines from the file before the first match. I have only one entry in the file, but I do not need that line, weird "{print} / $ {pattern} / {exit}" and tried the "/ $ pattern / q" (my search on a variable is based). But both the commands are printing all the lines before the last match: My file is like ABC BCD Def Ex A Def LMN Def XVD When my pattern is 'def', I need ABC and BCD But the above orders are printing, all the lines before the last 'DF' can you please provide some ideas. This should work: awk '!' / $ {Pattern} / {print} / $ {pattern} / {exit} "input_file.txt

visualforce - In Salesforce Whats the difference between Page Layouts and Visual force Pages? -

I have created a custom object in Salesforce to save prices now that I use the page layout or the visual page and the supreme controller should do? In other ways - when should we use the page layout and when the visible pages should be used? page layout An underlying standard mechanism for displaying information for the user is. You can use the Page Layout Editor without any development experience, just drag and drop it. If you need a simple form that only shows field values ​​and related records, then you have to use a page layout. But sometimes you will have to use JavaScript, custom HTML tags, CSS on this page, in this case you have to use the VisulaForce pages which are similar to JSF or similar technologies. Also keep in mind that you can include VisualForce within the standard page layout.

python - How to test datetime conversion with pytz and tzlocal? -

So I have datetime objects that I want to show to users in my local time. Using the questions answered here, I have come up with a zinc filter to complete it: to tzlocal import get_localzone import pytz def local_datetime ( Utc_dt): local_tz = Get_localzone () local_dt = utc_dt.replace (tzinfo = pytz.utc) .Stimazon (local_ties) local_dt.strftime ('% m /% d /% y @% I:% M% p') app. Ginja_nv.filter ['local_dt'] = local_detetime {{user.last_login_at | Local_dt}} # in my template I thought that every time someone sees the page (hence the filter) so that it will always be shown in the user's original time zone This shows the correct on my development machine, but I want to ensure that get_localzone () is actually grabbing the user's local timezone and not always the server My question is that I How to test it Can I have it working properly? get_localzone () always back to your server's local timezone Used to be. There is nothing in the HTT...