Posts

Showing posts from June, 2012

change webView Font size with Setting Bundle ! [iPhone SDK] -

I want to replace my UIWebView with setting the bundle. What is the property for webview font? I know my code is wrong! if ([default boolForKey: @ "big_font"]) {myWeb.font = [UIFont fontWithName: myGhazal Size: 32.0f]; } Else {myWeb.font = [UIFont fontWithName: myGhazal Size: 18.0F]; } Refer to a CSS style sheet in your HTML document or style information Regards.

Python: Find identical items in multiple lists -

I have a list of arbitrary list, for example: [[1] , 2,3], [3,4,5], [5,6,7], [7, 8, 9]] Now I have a list that includes everyone Elements that are present in more than one list: [3,5,7] How do I do this? Thank you! Just like you would do it by hand: For the seen = set () repeated = set (): I (L) in the set: if I saw: repeated. Add (i) other: seen.add (i) By the way, there is a liner (without the count of imports) that some people were demanding (should be less efficient than other approaches) reduce itertools by import (* Set. Inion, (strmp (set.intsection), combination (map (set, L), 2)))

Does flash always post a "Filename" parameter when doing a file upload? -

I have tried two flash upload components, swfupload and uploadify, and generate posts with both "filename" parameters My problem is that the service I am posting is a strictly set of permitted parameters, and the file name is not one of them. So, is it possible to remove this parameter from this post? Reveals that you can change uploadDataFieldName by default < By setting the second parameter of code> "fileedata" , upload () method. Do not say anything about the file name parameter in the docs, so I think this number is not.

c# - Is implementing a singleton using an auto-property a good idea? -

I have recently found out about auto-property and they like a lot. At this time I am trying to use all the places where I can. Actually, not just able to use them everywhere, but to see how well they work in most situations. Now I'm making a singleton and thought: "Hey, try here's auto-properties." Public Class Mistlington {Receive public status maslingington mieslington; Private set; } Private Missington () {} Static MyStington () {MyScillton = New MyStyling (); }} So my question is: "Is it good to implement a singleton?" I'm not asking if a singleton is normal good idea. I will not do this personally. I do not like to use automatically implemented properties with a private setter, which you do not ever call, where you want a readworthy property supported by only a readable variable to read. To be more clear about what you mean, there is only one more line of code: Public sealed class MySstonington {Personal Static Readable Maisin

excel - Axapta V3 - how to access worksheet.pagesetup properties from x++ -

Does anyone know how to use PageSetup appellants of an Excel worksheet via COM from the X + code I can do all the formatting necessary for a custom report but can not use the PageSetup object. Any suggestions / suggestions would be appreciated. # define.xlDialogPageSetup (7) static zero job212 ( Args _args) {COM doc =; // Here is the Excel document COM object com app; Com worksheet; COM page setup; Com temp; Int FituposeWide = 5; Int Fitptigetol = 0; COMVariant cvZoom = COMVariant :: createFromBoolean (wrong); COMVariant cvWide = FitViewWide? COMVariant :: createFromInt (FitupsWide): COMVariant :: createFromBoolean (wrong); Comviriet CVTil = FitTapGetol? COMVariant :: createFromInt (Fitopsplates): COMVariant :: createFromBoolean (wrong); ; App = doc.Application (); Worksheet = app. ActiveSite (); PageSetup = Worksheet.Page set up (); PageSetup.Zoom (cvZoom); PageSetup.FitToPagesWide (cvWide); PageSetup.FitToPagesTall (cvTall); // это для демонстрации того, что получается

asp.net mvc - Redirect problem -

मुझे क्लाइंट साइड में यह कोड है: $। Post ('& lt; % = Url.Action ("Action_Name", "Controller_Name")% & gt; ', {serverParam: clientParam}, रिक्त, रिक्त); और सर्वर साइड में यह कोड: [एचटीटीपी पोस्ट] सार्वजनिक कार्यवाही कार्रवाई_नाम (स्ट्रिंग सर्वरपरम) {वापसी दृश्य (); } मैं वर्तमान में एक दृश्य में हूं और जब मैं एक बटन पर क्लिक करता हूं तो मुझे Controller_Name / Action_Name / serverParam । पोस्ट के बाद मुझे एक्शन मेथड में भेजा जाता है लेकिन मैं अभी भी पुराना दृश्य देखता हूं, Action_Name ( Action_Name.aspx मौजूद नहीं है) (मैं mvc 2 का उपयोग कर रहा हूं) सबसे पहले, आपको "पोस्ट / रीडायरेक्ट / गेट" पैटर्न का अनुसरण करना चाहिए जिसके बदले एक दृश्य के बदले एक रीडायरेक्ट परिणाम लौटाया जाए। एक सफल पोस्ट लेकिन यह वास्तव में आपके द्वारा पूछे जाने वाले समस्या को हल नहीं करेगा। यह एक AJAX पोस्ट कर रहा है, एक "नियमित" पोस्ट नहीं। इसलिए ब्राउज़र रीडायरेक्ट द्वारा एक रीडायरेक्ट प्रतिक्रिया का सम्मान करने वाला नहीं ह

multithreading - Interview Question on .NET Threading -

Can you describe two methods of synchronizing multi-threaded write access on a class member? Please anybody can help me what that means and what is the correct answer. When you change the data in C #, some instructions like some of the same operations seem to have many instructions You can compile in the following categories: Public category number {Private int A = 0; Add Public Zero (int b) {a + = b; }} When you create it, you get the following IL code: IL_0000: nop IL_0001: ldarg.0 IL_0002: dup // Value of private variable 'a' on stack IL_0003: ldfld int32 Simple.Number :: a // Push the value of argument 'b' on stack IL_0008: ldarg.1 // Adds the top two values ​​of the stack together il / 20009: Add / / Set the value to 'A' at the top of the stack IL_000a: stfld int32 Simple.Number :: One IL_000f: ret Now, say you have a number object and two threads its add method is called this way : Nanbrkaed (2); // thread 1 number.Add (3); //

c# - Deploying an Excel UDF -

I have an excellent UDF that makes a web service call The UDF code is an automation addin code which is a C # class library And for this I have created an installer. When I run the set up, any description of the specific adin code toos -> addins -> automation addins list appears in Excel and does not function in the formula bar. I am using VS 2008 and Excel 2003. Am I missing something here? Should I define the path that Excel has to choose from some DLL so that it points to the DLL generated from the UDF code? Or are there any security issues that should be taken care of? The level of security in the client machine is set to full trust, yet addin does not appear in the list. Am I missing something here? This is because the custom "CLSID {GUID"} is required to install the automation add-in } \ Programmable "entries are created in the registry, which is controlled by creating an automation add-in, usually by including the marked methods along with your

api - Learning Direct2D -

I have some experience in creating window controls in GDI and now I am looking for good resources (APIs, samples and good practices Am)) to start learning about Direct 2D. try it

What is the full syntax of Groovy's GPath expressions? -

While attempting to parse RSS feeds in Groovy, I found a GPath example to use wildcards: deft text = "& table> table name =" person "/> gt; special-tables & gt; other tables & gt; table name =" business "/> And & lt; / other-tables & gt; & lt; / data & gt; "def xml = new XMLPers () .pars (new bytereinterstream (text.getbits ())) def table = EX SML. '**'. Table.find all {this peeper () .name () == "special-table" || it. () .name (to) < / P> This looks like a strange use of 'spread-dot' operator. I can not find any reference to Groovy site, books etc. How it works More importantly, how do you find it? Is there any XPath for GPath 'Rosetta Stone'? OK, as always, the best place to know Groovy is only in the source to get. The result of a parsing is a groove.tele slurpersupport.GPathResult object. If you look at the source (plain Java file), you will see that the g

version control - Would Mercurial help me work from 2 PCs? -

I currently use Perforce for source control, but at the same time (2 different PCs on the desktop Want to start working on code and laptop). Laptop will not be able to reach the server frequently, which makes bad choices in this setup. Distributed source control tools like Mercurial seem to work, but I am still unclear if this will work or do not anyone have to use the mercurial to work once on 2 machines There is no experience (such as laptop in the desktop, evening and weekend in the week). Does it help, or is it still a pain, which keeps everything in sync and to know what is going on. Yes, I have been working on this computer for the last 2 years between my computer and the domestic computer. You can either use a mercure or ghetto, they are both good enough. I like Mercurial because it only depends on Python, which is easy to install on Windows, Linux and Mac OS X. Besides, because it is only you working on this project, you are not having too many problems with conflict.

c# - how to invoke user's (non-outlook) email application from .NET program -

itemprop = "text"> My C # application needs to report a problem technology to the user's machine, no normal SMTP server is available, So I do not think I can use System.Net.Mail; Instead the message should be sent using the user's email program and account. I can use office automation and launch a message to launch the office. But what if the user is not using the approach? Is there any other common mechanism that is supported by multiple email clients? Or is there a library that detects various clients and how they present them? EDIT: To submit a problem report, I need to include an attachment or (worst) long message body ... process. Start ("mailto: hurr@durr.com"); The operating system is responsible for implementing a specific instruction. Windows will recognize the scheme and bring the appropriate mail client. It's configured using.

chars - PHP is there a built-in function to render ' as &rsquo; etc -

Is there an underlying function to present characters as identifiers (& rsquo;)? Also, is it unsafe to output raw characters (like ') to HTML? Thank you. Try htmlentities () : < Code> HTMLentities ("'", ENT_QUOTES,' UTF-8 ', true); Regarding your second question, yes (as a general rule). To output user input / raw input you should always htmlspecialchars () at least.

ruby on rails - 'sudo gem install' or 'gem install' and gem locations -

चल रहा है ' sudo gem list --local ' और ' मणि सूची - स्थानीय 'मुझे अलग-अलग परिणाम दें मेरा मणि पथ मेरे घर फ़ोल्डर में सेट है और केवल ' मणि सूची - स्थानीय ' से रत्न शामिल हैं। यह मेरे लिए अलग-अलग निर्देशिकाओं में जवाहरात स्थापित करना अच्छा नहीं है कंप्यूटर, तो क्या मुझे मणि पथ को अलग तरह से सेट करना चाहिए, और क्या मुझे कभी भी sudo का उपयोग करना चाहिए? my ~ / .profile निर्यात PATH = / opt / स्थानीय / bin: / opt / local / sbin: $ PATH निर्यात PATH = "/ usr / local / bin: / usr / local / sbin: / usr / local / mysql / bin: $ path" ~ / .bash_profile खाली है। अन्य सभी पदों के विपरीत सुडो रत्न स्थापित करते समय। इसके बजाय मैं आपको स्थापित करने और पोर्टेबल मणि घरों और रुबी के अलग-अलग संस्करण के साथ एक छत के नीचे रहने वाले जीवन को सुशोभित करने की सलाह देता हूं। । uninitiated के लिए, से: RVM एक कमांड लाइन उपकरण है जो हमें आसानी से स्थापित, प्रबंधन और कई रबड़ वातावरणों के साथ काम करने की अनुमति देता है रत्नों के एट्स। कारण sudo

python - virtual serial port on Arch linux -

I am using arc linux and I need to create a virtual serial port on it. I tried everything, but it seems that it does not work. I want to connect the virtual port to the other virtual port with TCP and then use it in my Python application to communicate it with another application with Python application. Is it true? Please help me Thanax socket command is the solution. You must first install the socket: pacman -s socat Just put it in the console, but first you must be logged in as root: / P> socket pti, link = / dev / ttyVirtualS0, echo = 0 PTY, link = / dev / ttyVirtualS1, echo = 0 And now we have two virtual serial ports that are virtual Connected: / dev / ttyVirtualS0 & lt; -------> / dev / ttyVirtualS1

java - How can I deploy war in Tomcat 6 -

I have used jebos and deploying a folder to deploy a war. But when I claim the Tomcat server eclipse that it is deploying war, I can not see my war in the webpage folder for the war. And what is the URL for my war? In Jboss I can add jboss-web.xml app url, so when I set jboss-web.xml to an app path, I can get my app from it. I deploy the YAR every time without any problem on the webpage, probably 25 times in 25 days . You should not have any problems with it. If you want more control than all methods, then deploy the directory itself, but it will need to be restarted.

c# - How can I get the href attribute value out of an <?xml-stylesheet> node? -

We are getting an XML document from a vendor, which requires transforming the XSL when we use their stylesheet So that we can convert the result HTML to the PDF into the XML document in ? Xml-stylesheet is defined in the definition of a href attribute. Is there any way that I can get that URL using C #? I do not trust the vendor to change the URL and obviously it does not have to hardcode. In the beginning of the XML file ? The Xml-stylesheet looks like this from the element: linux to xml code: XDocument xDoc = ...; Var cssUrlQuery = node to xDoc.Nodes () where node.NodeType == XmlNodeType.ProcessingInstruction Select Regex.Match (((Expression Instruction) node. Data, "href = \" (? & Lt; url & gt; .groups ["uRL"] value. or linq for the object var cssUrls = (XmlNode childNode In doc.ChildNodes where childNode.NodeType == XmlNodeType.ProcessingInstruction & amp; ChildNode .Name == Select "XML-Stylesheet" (XML ProcessSig

How do I pass common powershell command line parameters between cmdlets on the pipeline? -

Say I have two CMDlets, 'New-Foo' and 'Do-Bar' for both CMDlets to take action A service is required to be certified, and 'do-bar' takes a fue. Today, I can: new-foo -host localhost -username user-password password - whatever other and I can : Two-time public localhost - User-password password -Foo Myfu And I can also credit them to pass the foo on the pipeline I like: new-foo & lt; Blah blah & gt; | Do-bar -host localhost -username user-password password But I can not understand how to pass the credentials between normal parameters, such as service space and pipeline elements. If I have found a group of my own CMDlets, then I only want to pass the credential for the first time, and then want to reuse them for the rest of the pipeline. What am I missing, it seems that it should be clear ... You can exit New-Foo from the object in which both the original object which has two-time side-by-side service space and credentials such

spring - eclipse web project dependency -

Image
Text after "itemprop =" text "> I have a web app using an eclipse project (A) and GWT (B) with a small spring application With one another is one. The project creates the path of A / Importing your ressources through order and export; Imports the ressources through Project Path of B / Projects / Paths. Eclipse builds the path to the path and the system of the targets adds files to the square path, but it results in strange spring-errors because the files are not being loaded with the web classloader. WebServer-Target Export Ressources (.class, META-INF / Spring / *) is for copying project one in Project B but for correct behavior / war / web-nf / classes. How can I use this work eclipse? A lot for your help! "itemprop =" text "> Your previous claims are incorrect, your export resources (and should) / war / web-INF / Can be copied in lib as a jar file. You can obtain ProjectB by adding ProjectB as a J2EE module dependency. Is it a ja

Regex of this <a href=\"-----------------\"> iPhone NSString -

I want to use regex for the following expression. Here the mail id can be anything but I just want to cut this wire. I was trying the following code. NSString * Email = @ "& lt; a href = \" Mail: jimbosek@aol.com \ "& gt;"; NSString * strEmailMatchstring = @ "\\ b ([a-zA-Z0- 9% _. + \\ -] +) @ ([a-zA-Z0-9. \\ -] +? \\. [One -zA-Z] {2,6}) \\ b "; If (! [Email Hammerbazaarj: Streemel Matchstring]] {av = [[UILArtView Alok] Init Vitalical: @ "Message" Message: @ "Invalid Email-Id." Representative: self cancel buttonTitle: @ "OK" other button button: zero] autorelage]; [Avi show]; no return; } I know that this is wrong I have put the regex to check the mail ID. I just want to, but I do not know about ragex. What should be done correctly? Thank you in advance for sharing your knowledge. Here is an RFC 2822 compatible reggae [a-z0 -9! # $% & Amp; '? * + / = ^ _ `{|} ~ -] (:!! \ [One-Z0-9 #

Why is the JVM not platform independent, given that Java (the language) is platform independent? -

Only curious to know how to make Java platform independent, so there is no specific reason that JVM is dependent on platform Unless you have a CPU that can execute a Java bytecode directly (There are some things) you should be able to interact with the OS (reading files, connecting to the network No, for display on the screen etc.) You can write a JVM in other languages ​​(such as), but eventually something that can communicate with the underlying OS

cocoa - NSURL's parameterString confusion with use of ';' vs '&' -

I want to use to pass the parameters of the URL passed, it says that the URL should be consistent, But now wondering what we do?!? We use something like this: http: // server / path / query? Property1 = value1 and property2 = value2 But RFC 1808 does not mention any of the ampersands ( & amp; ) as a valid parameter separator (less Less than the way I read it). This suggests a semicolon ( ; ) probably because it was made in 1995? Whether & amp; has ; ? If so, then anyone can verify that the parameter string of NSURL is also & amp; As the delimiter? What is "right" before we dig a big hole? The correct syntax is as follows: RFC 1808 (2.1. URL syntactic component): & lt; Scheme & gt;: // & lt; Net_loc & gt; / & Lt; Path & gt; & Lt; Parameters & gt; & Lt; Query & gt; # & Lt; Piece & gt; It states that according to Section 3.3 of RFC 1738, query information has been formatted, which tells us: &q

excel - removing the nulls from an array and copying to new array -

I am dividing a line of text into an array, then entering a new array without zero spaces I try For some reasons this is not copying from the old array into a new one. BTW If anyone has a more efficient way of doing this then I am open for this too. In the form of a dim x, I as integer, M as string, wire in the form of straight, k (0 to 50) as variant, j intrig rdate = thisWorkbook .Sheets ("sheet1") Range ("a58") Value = Jammu = 0 x = Split (rdate, "") i = 0 for Ubound (x) if x (I) & lt; & Gt; "" Then Kashmir (J) = X (I) J = J + 1m = M & amp; J & amp; K (J) & amp; Termination of VbCrLf If the next script script is adding k Code> ... Your messagebox is empty.

multithreading - QMutex stuck in locked state -

I have a function that is part of a square and in this function there is a mute x at the beginning of the function. And a mute x just before its return. Unlock Now I had to face a situation where the mutex has been trapped in the looted state. What can this do if this function is the only place where I use to lock and unlock that Mute X The function is called from the main thread and 1 or 2 other qtthread. Update: There was a problem due to not sleeping thread between function calls. Could the lack of sleep really add to Mutex fast? If you have been thrown into a function, then unlock () Can not be executed at the end to ensure that in such cases QMutex unlocks, you can lock with the object. This object will automatically unlock the mute when it will be lost, even if it occurs during stack online after an exception.

Event handling issues (Javascript) -

OK, so I have a couple, which ended up overwhelming questions about conflicting event handling for this forum Can do. / P> As I understand, a proper set-up document will look something like this: & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Title & lt; / Title & gt; & Lt; / Body & gt; & Lt; Script src = "jsfile.js" type = "text / javascript" gt; & gt; & lt; / head & gt; body & gt; // body content, like something in my case Form element & lt; / html> gt; Jsfile.js will look something like this: function A () {// code;} function Document.myForm.typeSel.addEventListener ('change'); add.EventListener ('click', b, wrong); get.ElementById ("id"); Window.addEventListener ('load', one, false) , C, false); // or to use better browser-compatible code ... function addEvent (obj, evt, fn) {if (obj.addEventListener) obj.addEventListener (evt, fn, false); If

class - Why am I getting this PHP session_start() error? -

I did not know why I was getting this session error ... Warning: Session_start () [function.session-start]: Sessions can not send cache limiter - Headers have already been sent (output C: \ webserver \ htdocs \ project2 \ labs \ form-submits \ index.php: 2 ) In C: \ webserver \ htdocs \ project2 \ labs \ form-submits \ index.php on line 2 As far as I knew that this occurs when in the first browser of the session There are some types of output called the session_start () function Power, appeared on the screen before the call in this case is nothing, not even any white space. Any ideas why I still get errors? I have posted the full source code of this demo so that you can see what I used to create the error. & lt ;? Php session_start (); Required ('formkey.class.php'); $ FormKey = new form (); $ Error = 'no error'; // request? If ($ _ server ['REQUEST_METHOD'] == 'post') {// Validate the form key (!! Isset ($ _ POST ['form_key'])

windows - Programmatically discovering "guest only" sharing/security model -

On modern Windows, the default configuration is done in such a way that if I log in as a local user, I actually only authenticate as a guest (explained in more detail about this behavior) When my program tries to access WMI on such a server through DCOM, I just get a "login denied" error, possible Schools not because the hotel allows the user to connect to WMI. I want to separate this error from other types of access denied errors, such as incorrect passwords or non-existent usernames, so that I explain to the user what they need to fix the problem. So my question is, what can I do to find such a server? I am thinking that if there is a com component that can be activated by a guest, it would be so - I can try to activate such a component, and if it works then I know That's my login authentication was correct. But I can not think of such a solid component. Does anyone know such a component? Or what are the other ways to diagnose this condition? No, I do n

Is there any cross-browser css-only sticky footer with W3C valid css and semantic X/HTML? -

Is any cross-browser CSS sticky footer with W3C valid CSS and Semantic X / HTML? Firefox: All Versions Safari: Windows, Mac and iPhone Opera: Windows, I have used this one and it works well in FF, IE, Safari, Opera, and Chrome. Blackberry does not know about:

php - Determine if 10 digit string is valid Amazon ASIN -

I have a 10 digit string that is passing me, and I want to verify that it does more processing There is a valid ASIN before and / or redirection. I know that a non-ISBN ASIN should always be non-numeric and has 10 characters in length I just want to be able to tell that the item is being passed Is a legitimate ASIN or is it a search string only after it has already become an ISBN. For example, "soundbard" is a search term, whereas "B000J5XS3C" is an ASIN and "1412775884" is an ISBN. Is there a lighter way to check ASIN? Did you know that Amazon Amazon Associates provides an API with a web service, that you can use Amazon Allows to be practically interactive. I suspect that your problem will be resolved (in some fashion) for more information see Home Page

c# - How to configure asp.net MVC project in IIS? -

When I run a project in IIS, after displaying the home page it will not allow redirects to any other page. This page did not find the error. On IIS 6 you may need to associate ASP with extension. You can take a look at the NET ISAPI module or if you want to see the extensionless URL.

jquery - I want to load different images to a div, from links -

There is a very new jQuery and alive on your amazing tutorial. I am working on my portfolio website, and there is a list of projects that use jQuery's load functions, when each project is loaded to load in a separate division. There is a set of numerical links within each statement, say 1-5, which I want to display the relevant images in one more division when I click. My problem is so far away that I can not reuse the load function because it overwrites the internal use, and it does not seem that it resonates in php file which holds all my project details. Is there any way to it? I'm just guessing because I have not seen your code, but when you dynamically Loads using Ajax, no javascript will be executed inside the new content. The best way around this will be to use the new loaded content to link the link, which replaces the image source when clicked - there is no need to catch an image Here's some example code to use for load: Main page JavaScript (I did

rails in heroku: one domain, several applications -

How can I run an application in www.domain.com/folder1 and others in www.domain / folder2 Hi Heroku? You can not really do this with Heroko - the system considers a single app per domain as your Have some options - merge your app into a single app, set the routing accordingly, or host the app using a subdomain: app1.domain.com, app2.domain.com.

dynamic linking - How to profile a shared object without profiling the host app? -

I have a host application and I wrote a plug-in I compiled my plug-in with a shared object (I say foo.so), and the host application will load it via Dluppen. In this case, my host application is an opt-in tool from LLVM (though I do not think it is important for the question). I want to enable my plug-in with profiling (i.e. G ++ -PG , gprof ). However, when I do this, the profile output file gmon.out has never been created. Maybe GPRF expects someone to make a setup routine, or something like this. For various reasons, I would like to avoid re-combating the host app with -gpg. I'm curious if it is possible to profile a shared object foo.so without choosing the host application. I have also seen in other profiling tools; Qprof should be able to handle this situation from HP, but it is unable to resolve the function names in the shared object (it returns back to the addr2line in a very intuitive way). Thanks, Nick I think you want to do this To find ways to optimi

How can I determine if a Perl hash contains a key mapping to an undefined value? -

I need to determine if any key is given to a pearl hash, but that key is of an ADFF value Will be mapped with. In particular, there is the motivation to see if a hash referencing has been given using the getopt () in the bullion flag. I have already searched both this site and Google, and is present () and define () do not apply to the position, they only see the value of someone Undefined for the given key, they do not check whether a hash is really the key if I am an RTFM here, then tell me what the manual says in the manual. exists () and do not seem to be defined for position (), they Just see that the value is undefined for a given key, they do not see whether the key is actually the key in the hash wrong. This is exactly what defines () , but is present () does what you want: my % Hash = (key1 = & gt; 'value', key2 = & amp; undefined); Moving my $ key (Qi key 1 key 2 key 3) {print "\ $ hash $ $} exists:" ($ hash {$ key} exists?

Retrieving and parsing iCal data over HTTP on Android -

I am making an application that asks the user for the user, to regain the user's daily schedule Utidad adds a static HTTP link to the information file in which one. (Calendar) extension. I need to read data from data, format in new UI and represent some useful data on Android device. Can my query use a static HTTP link behind the curtain? And when I use the same link on the desktop browser, it tells the user to save the file & mdash; How can I do this on mobile? Do I need to read the data and save it from somewhere or can I save the .ic file and read it? Android devices generally can not control iCalendar-formatted files (.ics) & mdash; There is no way to open such a file and display information. Depending on your questions and comments, you need to break it in some parts: You must write some code (or use a library like that) in the calendar file to parse. P> UI String UserID = (Get the user ID entered in findById (R.id.user_id) (edit text) GetText

c++ - get heap corruption when changing member variables order -

I have a strange problem with my class between others- the following memers: Gibbone has_alpha; Glutton width; Glutton height; Glutton length; Glumeant millis perframe; GL Float UV [2]; Glutton Texas [2]; GLint compsize; // place 2 long preload_interval_next; Long before load_invers; If I put the has_alpha in (position 2) I a) Different object sizes, sizeof report 248 instead of 258 bytes And b) Heavy Stack Corruption GBBoyan is defined as an unsigned four, but since I do not use any customization at all (it double checked ) Then it should be pad in 4 bytes too. And finally, if it is a pad, then it should be done at both places. Compiler Test: CLANG (c ++), GCC 4.2 com.apple.compilers.llvmgcc42 How can anyone track down this idea? The problem here is listed almost not in the members you have, but another, possibly a Int , indicator or bool does not start properly in the manufacturer . Please post a great example that fails, and make sure that you start a

css - How do I set the size of an HTML text box? -

मैं एक HTML पाठ बॉक्स का आकार कैसे तय कर सकता हूं? बस उपयोग करें: टेक्स्टरेआ {चौड़ाई: 200px; } या इनपुट [प्रकार = "टेक्स्ट"] {width: 200px; } आप 'टेक्स्टबॉक्स' से क्या मतलब है इसके आधार पर।

linux - How to play sound in Python WITHOUT interrupting music/other sounds from playing -

I am working on a timer in Python, which chimes when the waiting period expires. I use the following code: pseudo_play_play (): "" "Play sound file at once." Try "Sound_file = wave_open ('(n / a / dsp', 'w'): Except AFMT_S16_NE from ossaudiodev import (APMAS, NIC, SEP, FM, NF, Complex, Coommomm) imported irrows: if bitrate ==" small ": AFMT_S16_NE = ossaudiodev.AFMT_S16_LE Other: AFMT_S16_NE = ossaudiodev.AFMT_S16_BE dsp.setparameters (AFMT_S16_NE, NC, FR) data = sound_file.readframes (NF) sound_file.close () dsp.write (data) Dsp.close () This works very well, as long as no other device is already output sound. How do I basically do (under Linux) Could Or is there any sound being played? If you think the API will need to ensure the software mix in this process, please suggest a method :) Support For Thx :) Easy answer "Switch from OS to PulseAudio" (or to use DMIX Set up ALSA, or get soundcard with better L

type conversion - Convert float to std::string in C++ -

I have float value that should be inserted into std :: string . How do I convert from float to string? float val = 2.5; Std :: string my_val = val; // error here Unless you are concerned about performance, its Use: std :: ostringstream ss; SS & lt; & Lt; MyFloat; Std :: string s (ss.str ()); If you are OK with Boost, then there is a convenient option: std :: string s = boost :: lexical_cast & lt; Std :: string & gt; (MyFloat); Efficient options eg Or just the C-style function.

wix and iis - unable to update metabase error -

I have a wix project that installs a web site (MVC2) for an existing web site that the user chooses is. It works fine on my machine (of course), but the following error is happening on the client, that is the test vm: Action 16:08:03: Configure IIsExec Action 16:08 : 03: Listsmateabase change Installing Metabase Keys and ValuesMetabase Change: Error 0x80070003: Failed to create metabase key: / W3SVC / 1 / Root / Error 26103. Failed to create metabase key. (-2147024893 / W3SVC / 1 / root /) MSI (S) (5C! 64) [16: 08: 06: 747]: Product: Blah Blah web site - Error 26103. Failed to create metabase key. (-2147024893 / W3SVC / 1 / root //) Has anyone got any ideas? They tried to turn on and off IIS metabase editing and run the installer as an administrator. Your query is here: 7]: Product: Bla Blah web site - Error 26103. Failed to create metabase key (-2147024893 / W3SVC / 1 / root / /) Error -2147024893 stands for ERROR_PATH_NOT_FOUND.

Implementing refined search - ASP.NET MVC -

In my ASP.NET MVC application, I have a view that displays a list of products in the system. I want to implement an option to filter the list of products by selecting the parameters to consumers, the way it has been done. I would like to know how are you going to do it in the most efficient and simple way? Any link for tutorial or guide is appreciated. Actually, this kind of search (server-side), you need it: Click & lt; Form & gt; field. One method in the recountory that accepts the parameters you capture, and the results of the query to display for display Get back. If you need dynamic capabilities (i.e., the user can leave one or more parameters, and you need flexibility to specify those parameters in the linux query at the runtime) , Then take a look at .

gfortran - how I can find out, which compiler I have used -

I have installed NetCDF "binary-netcdf-4.0.1_gfortran_gfortran_c ++ .ar". But I'm sure I have not told about the used groparan compiler. Which compiler can I use? run gfortran -v to tell you which The version is.

nhibernate mapping: A collection with cascade="all-delete-orphan" was no longer referenced -

I am getting some inquiry with my fluent mapping. I have a child collection of institutions, for example events and Events for example. If I set all the cascade mappings in the collection to AllDeleteOrphan, then I get the following error when saving a new unit to DB: NHibernate .HibernateException: with cascade = "all-delete-orphan" The owner of a collection was not referred to the example instance: Core.Event.EventItems If I set cascade to all, does this work properly? Below are my classes and mapping files: Public class EventMap: ClassMap & lt; Event & gt; {Public eventmap () {id (x => x.Id, "id"). Inappropriate value ("00000000-0000-0000-0000-000000000000") GeneratedBy.GuidComb (); Map (x = & x; x.Name); HasMany (x = & gt; x.EventItems). Inverted (.) Column ("EventID") .AsBag () .Cascade.AllDeleteOrphan (); }} Public Segment EventItemap: Subclass Map & lt; Event item & gt; {Public event itemmap () {id (x

flash - Actionscript strange coords after removeChild is called -

Can someone help me to understand the meaning of the following? (x = 0, y = 0, w = 208, h = 40) 0 208 (x = 42, y = 0, w = 166, h = 40) 0 166 The X coordinate is still 0, although the width has changed, getBounds correct value I hope I have to change X also. The wrong values ​​of X, globalToLocal and localToGlobal work incorrectly. If you click anywhere on the left side of the rectangle of another (still visible) you should: 2 28 (x = 2, y = 28) Whatever is good for nothing, values ​​in brackets should be in phase and they are not. code: public function test (): zero {var s: Sprite; Var i: int; Var arr: array = new array (); For (i = 0; i <5; ++ i) {s = new sprite ()); S.graphics.beginFill (0x999); S.graphics.drawRect (0, 0, 40, 40); S.graphics.endFill (); S.x = i * 42; Arr.push (s); AddChild (s); } Trace (this.getBounds (phase), x, width); RemoveChild (Advent [0]); Advent [0] = Faucet; Trace (this.getBounds (stage), x, width); AddEventListener (MouseEvent.CLI

c# - Winform customize listbox item -

I have a list box that should contain 2 field data: time and message to display the 1 line of text Instead, I want each item to be displayed as 2 lines - the first line is one time and the second is the line message, where each line has a different style. How can I do this? I can tie the object array in the list, but how do I style it? Thanks for your reply. I have left a reply in a formal form. You will have to use the Drood property, in which there is a good example of a document event handler. You can draw text in any way, including drawing two lines of text, use large font or set to give the itemHeight property enough space for two lines with DrawMode = OwnerDrawVariable.

php - MySQL updating records, but page display not showing new data -

I am writing an application for CRUD user details. I extract the page with a query in the user table - and use the data to populate different form elements in the page (and to check duplicates). All form submissions get deposited on the same page. Works as expected to add, delete, and modify records - but the kicker is that the displayed data on the page is not updated once the change has been submitted - To see relevant changes, I have to see the page again. Try {$ user_sql = "select user_id, user_firstname, user_surname, user_email, user type of user"; $ User_stmt = $ db- & gt; Ready ($ user_sql); $ User_stmt- & gt; Executed (); $ User_data = $ user_stmt- & gt; Get All (PDO :: FETCH_NAMED); $ I ++; } Hold (PDOException $ e) {resonant "error: user data can not be retrieved from data base"; } / * * DELETE USER * / if (isset ($ _ POST ['deleteUser'])) {$ _SESSION ['deleteUser'] = true; } {$ DeleteRange = implode (',', $

django-ajax-selects app: How do I create a new object when there isn't already one in the database? -

I am using, which is an independently available designer app that provides jquery autocomplete functionality . It has worked - that is, this form is automatically completing the fields, which I want. But I have a problem ... I am using it in a model form which adds a partnership object to the database: class skater (models.model): name = models.CharField (max_length = 64) nickname = models.CharField (MAX_LENGTH = 64) gender = models.CharField (MAX_LENGTH = 1, option = GENDER_CHOICES) class participation (models.Model): female_partner = models.ForeignKey (skater, limit_choices_to = {'gender': Female}, related_name = 'female_partner_set') male_partner = models.ForeignKey (skeeter, limit_choices_to = {'gender': male}, related_name = 'male_partner_set') I want to be able Use for A name and surname should be placed in the female-partner and male-partner area, even if a skater object is not present and I want to make that object. How do I go about

iphone - UIView Autoresizing Resources -

I am working on autoresizing a custom UIView and Apple is too little to say on it, there is more to it, some feedback Based on this, Apple's documentation is actually wrong in some areas. Finally, even if the interface builder has six recycling components and setAutoresizingMask for six: They do not seem to correlate at all. For example, by setting the width of the spring in the IB, there is a different effect from setting autoresizingmask to UIViewAutoresizingFlexibleWidth while rotating the device. Edit: I have a good resource for how Resizing works on the iPhone. Understand that Apple reads basic concepts like content mode, and I have read UIView document I'm looking for something that is available in the SDK program, in terms of what the IB setting does. Setting autoresizingmask to UIViewAutoresizingFlexibleWidth , width is equal to setting the spring, as well as in both the left and right struts in the interface builder (struts means that the edge < E

sql - Relational Algebra -

I was wondering if I could get some feedback on relational algebra and if you are looking, Any advice on anything with my SQL may be wrong, you can get it out. Select course course where course no.6 =; ΠCourseName (σCourseNo = 6 (Course)) CU Choose. C. There is no unit with sys, cu course WHERE C.CourseName = CU.CourseNo and C.CourseName = 'research'; ΠUnitNo (Course Unit (σCourseName = 'Research' (Course)) Select from U.UnitName Student SU StudioUinet, U unit where S. student no .: SU.StudentNo and SU.UnitNo = U.UnitNo and S.StudentName = 'John Perry'; ΠUnitName (Student Unit (Student Unit (σStudentName = 'John Perry' (student))) SELECT count (S. student no) association student from C course Course New = S. Course and N. ΠResearchStudents ((C) Count (not Student) (Student (ΣCourseName = 'research' (course)) There is a problem with the section, I removed a dot between C. Course SELECT CU from the syllab

c# - apply CSS list style buttons to server created button controls -

I have some CSS that uses lists to create a 3D button style similar to the one given below: < / P> http://articles.techrepublic.com.com/5100-10878_11-5323375.html My problem is that I have buttons that are server Controls and thus present the HTML buttons. The question is how will I use lists and hyperlinks to my button code so that I can apply the CSS which is already written? I think that I am in my button code, setting a string value within the onclick event and calling a method that this string value is passing. After some onclick event is equal to m, I can hook up my code for hyperlink control. Many thanks, You and and instead of the button ? Also, behind your code, you can add many CssClasses by doing something like button 1. Attributes.Add ("class", "style1 style2 style3")

c++ - Why doesn't sizeof parse struct members? -

I know that sizeof is a compile time calculation, but it seems strange to me: The compiler can either take a type of name, or an expression (on which it reduces the type). But how do you identify one type within a class? This is the only way to pass an expression, which seems very clunky. struct x {int x; }; Int main () {// Return size (X :: X); // Return size does not work (x ::) :: x); // works, and X needs to be default-able) An alternative method works without the need for a default constructor: return size ((x *) 0) -> gt; x); You can wrap it in a macro, so that it can be read better: #define member_sizeof (T, F) sizeof (( * T *) 0) - & gt; F)

objective c - Core Data: An Inverse Relationship to multiple entities? -

Assume that I have 4 entities in my data model: person, car, pet and photo. I want a relationship with the car and the car in the photographic unit of the person, in which I like all those things to keep a picture of that thing. So far, there is no problem, however, where it becomes difficult, it is an inverse relationship, where the photo unit wants to tell the attached item back. I would not want to have any inverse relationship either, so only one attribute in the photo will be UIImage, or maybe an attached engagement will be inverted relationship if I do this, then I select one of those items to attach my relationship. I can do Would it be better to leave it as a unidirectional relationship? Maybe I can make an intangible unit called "etabble itam" and the person can make the car and the stomach as children of it, then tell my inverse relationship to the AttachableItem I'm not sure how best it will be . I will make an intangible entity photo and the personPho

Check if a string is all-caps in Emacs lisp? -

all. I was wondering if Imax Lispi has a function that checks whether a string is completely out of capitalized characters or not. Here's what I'm using now: (set-capitalist-letter-string-to-list "ABCDEFGJKLMOPCRSTWVX")) (DUUPP-R-Capitol (return) If there is a capital letter in the list of characters, each letter is a capital letter. In the form of a special case, the empty list returns are correct. "(Bracket ((same list-letter zero) T ((no member (car list (characters) Letter-of-ak () "(Defun string-capitalized (string)" really gives if a string is a capital letter in each character, an empty string return is correct. "(Letter-by-capital (string-to-list) It works fine (though it depends on the assumption that I will only use ASCII characters), but I was wondering if I remember some explicit function I am coming to know In the context of other answers: Use of your is not is a good idea: it will allocate a new string, it will not

Sort through all attributes in XML tree with PHP XMLReader -

I have some PHP code to convert an XML file to a CSV file During testing, I did not create a CSV file I am just resonating results in CSV format. Whenever the XMLReader reaches an empty element, it outputs all the properties of the element. 1) Is there a way to produce a property name with its values ​​(is there any $ xml-> attribute name that goes with $ xml-> value)? 2) What is a way to sort all the properties in the whole tree and not only in the empty element? & lt ;? Php ini_set ('memory_limit', '50M'); $ X = file_get_contents ('H8_data.xml'); $ Xml = New XMLReader (); $ Xml- & gt; Open ('H8_data.xml', tap, 1 & lt; <19); $ Num = 1; While ($ xml- & gt; read () & amp; amp; $ num & lt; = 2000) {if ($ xml-> EmptyElement) {if ($ xml- & gt; heatluals) {while ( $ Xml- & gt; MoveToNextAttribute ()) {echo $ xml- & gt; Values, ','; }} Echo '& lt; Br / & gt; '; $ Number ++; }}

Questions about two's complement and IEEE 754 representations -

How do I find the value of the value of 2-byte supplement value 0xFF72 "? Should I start 0xFF72 by binary convert? Bits backwards. Add binary notation to 1 // Here is lost. I still do not know .. In addition, What is the value of an 8 byte double which is: 0x7FF8000000000000 Its value as a floating point? f Meaning of 3 is only to add 1 value. Example with 0xFF72 (here 16 bits have been taken): First of all, reverse it: 0x008D (each digit just 0xF decreased original value Is then add 1: 0x008E

properties - Publishing a property in a Lazarus component raises an 'Access violation' -

In Laser on Linux, I have registered a component as a component, so that I leave it on a form. Works like a charm, except that the qualities which I can publish are limited to simple forms like strings and integers. Whenever I try to publish a property like a TStringList or TImage, it is an 'Access violation' when I click on it in Object Inspector. I compared my code to standard components, but I do not know what they are doing differently. So what is the extra step necessary to use such properties in the item inspector? : 1. Create that asset inside your component controller - it will never be 2. In your property setter, you have to allocate your component to the new value for your value. Therefore, you must apply assignment method or assign in your component. Like TMyComponent = Class Private FString: TStrings; Published property strings: TString FStrings writes SetStrings; End; Manufacturer TMyComponent.Create (AOwner: TComponent); Start inheriting (AoONar);

java - Creating a web-service client directly from the source -

I am trying to generate the WS client jar directly from @Webservice class (es). We take this example: package com.example.maven.jaxws.helloservice; Import javax.jws.WebService; @webservices public class hello {public string says halo (string supreme) {; Return "Hello" + Ultimate; }} I can create a web file and use glassfish for this webservice service, and from there I use the Glassfish WSDL URL to generate customer resources. Can i What I'm trying to do is drop the glassfish part. From my Maven project that defines the web service, I want to use jaxws-maven-plugin to create a client class but I can not find any way to specify the actual URL of the webservice. Is it possible to be correct? @see also you & lt; WsdlLocation & gt; Using the -wsdlLocation switch < P> Another easy way to do this - just run with the-wsimport-swdlLocation switch and provide the WSDL location value that is relative to the generated service class an

query performance - MySQL Embedded SELECTs vs. JOINs -

क्या इसमें कोई अंतर है: का चयन करें userid, username, userdept, (SELECT Deptname fROM DEFETS WHERE DEPTID = userdept) उपयोगकर्ता नाम से उपयोगकर्ता नाम और का चयन करें userid, प्रयोक्ता नाम से उपयोगकर्ता INNER depts.deptid = उपयोगकर्ताओं पर शामिल हो जाता है। यूजरडिप कौन सा बेहतर है? आपकी दूसरी क्वेरी है बेहतर प्रदर्शन। आप यह उदाहरण देख सकते हैं:

Redirect from ASP to ASP.Net Session -

I am redirecting from a classic ASP page to a different webserver on the ASP.NET page. After landing ASPX page, postback, a new session begins, i.e. My session variables are set when the page is hit for the first time after a redirect, after resetting the click on a button on the page. How do I work on it? thank you in advanced. You may want to read. But you should know from beginning, ASP and ASPA. There is no way to use session-object in both sessions. Read the above article and you will know everything about it! >

Android memory allocation -

I get a "bitmap size greater than VM budget" error I have read that there is a 16 MB memory limit Romain Gui says that "You can allocate 16 MB of memory for your entire application only." However, my app should run out of memory before reaching that limit. So my question is: how can I allocate memory in my application ... how can I increase the allocation of my app (maximum of 16MB)? With any Java VM, heap memory will automatically increase to maximum size. But, bitmaps are allocated outside the VM, so you can easily see them "no" in the statistics. The best part is that you do not use large bitmaps, or you can use it by using With Eclipse you can generate heap dump on Android 1.6 or above android 1.6 or above Are there. Elypus can analyze the dump with Mate. Normally, you can not control the maximum size of the size on the actual device, unless you are working with custom hardware or firmware. An article on developer.android.com on pile d

c# - Collection with two keys -

In the solution I have worked in this question => (see editing in the bottom of the question), I need it Therefore, I need to get a method like type 1 and type 2. Answer this question => It is recommended to use one dictionary of dictionaries like it is what I am doing. But I do not like it. It shows what is meant to represent the collection, does not flow logically. I should also do something to get the value: if (! _Types.ContainsKey (s.GetType ())) {type1Cache = new dictionary & lt; Type, conversion cache & gt; (); _Types.Add (s.GetType (), type1Cache); } And {type1Cache = _Types [s.GetType ()]; } If (! Type1Cache.ContainsKey (value.GetType ())) {// We have changed this type earlier, then create a new conversion type - cachecache = new conversion cache (s.GetType (), value.GetType ()); // Add to the cache type 1 cache. Add (value.GetType (), type2Cache); } And {type2Cache = type1Cache [value.GetType ()]; } Which is slightly curved. I just want to do s

php - Using hashing to safely store user passwords -

Please try StackOverflow before asking a question. Many questions have already been answered. For example: Hi I want you to not see your password even in a database .. So I used the hash function like this $ passowrd_hash = hash ('shawl', $ _ post ['password']); Now easily I can store this password_hash value in the database. It will be something in encrypted form. Now the user knows his original password that he does not know this encrypted password. Now if he tries to login with this original password, he is not able to login. There is no way it can be decrypted and the user can log in. Therefore, he can get both password protection and login again. How to do this? You have been the user input password hash and is being compared.

asp.net - Inline (Single File) vs. CodeBehind -

If ASP.NET code and asp.net markup are in an ASC file, for example, Does the file display poorly with user control by using a designer.cs file? There is a difference in the initial compilation time; When your app starts for the first time With a code-behind file, you can pre-compile things and distribute a del on the server, which are ready to go. With inline code, the framework will need to be compiled into an assembly when the app starts. But this time the code has been compiled after the compiled code, and it just does not matter.

c# - 32bit binaries on sharepoint 64bit, An attempt was made to load a program with an incorrect format -

I have lots of SharePoint Web Parts, which are compiled for all CPUs, they work fine on 32 bit sharepages. But 64-bit servers cause the following error for 2008: An attempt was made to load a program with a wrong format. (Exception with HRESULT: 0x8007000B) Do all of these work properly by reading me? The 64-bit process can not load 32-bit DLLs and vice versa. IIS is a 64-bit process on 64-bit hardware It is possible to configure a personal application pool to run 32-bit, but ... SharePoint is likely to run 64-bit. Therefore, and all their dependent assemblies and DLLs will be run 64-bit. Note that the .NET connections that are marked as "no CPU" will be run on 64-bit hardware as 64-bit. Any native DLL, however, will need to be compiled as a relatively 64-bit.

LoadLibrary of unmanaged dll returns IntPtr.Zero in ASP.NET application -

I am trying to call LoadLibrary and load Delphi DLL in ASP.NET applications. Everything works fine on my production machine (using VS integrated server), but when I put it on the destination server, LoadLibrary gives IntPtr.Zero. file.exist (library name) returns right What could be the problem? Most likely the external dependency of Delphi DLL is if it were mine, then I completed the library To load the way, I will write a small Delphi app when you run that assistive application on the destination machine, you should get an error message on the screen that gives you the name of the missing external library.

qt - I want to implement right click menus on QTWidgetItems -

I am working on a Uni project and our goal is to create a program that scans all IMG / video / movie files. Does the selected directory, stores them in a database and then shozs them in an organized manner (using QTreeWidgetItem). The program allows you to do some things like files are read, open them and so on. Now, the problem is that I want to right-click on one file and pop up a menu with many options such as Open Directory ... I just do not know how this is correct. Click menu, I'm new in QT, I tried to create it: connect (tree widget, signal (item encrypted (QTreeWidgetItem *, int)), slot (open menu ( QTreeWidgetItem *, * integer))); I have tried to reset the item, but can not figure out how this is the right click and I think I am trying it wrongly. I got inspired by: connect (tree widget, signal (itemWhite (Curie widgettum *, int)), this slot (OpenName Music (Curie widget) *, Int))); which executes a music file with a double click. If you need more cod

html - Centering an image within a div -

I already set the limit of an image to no div Now I want to focus the image in its compact device. I have tried to use the margin: 0 auto, but that does not work. I am sure that I am looking for some idiots, but I want to take help from the Staxahovarflu community, so this does not take me an hour to stare at the screen. Thanks a lot. & lt; Body & gt; & Lt; Div id = "wrapper" & gt; & Lt; Div id = "banner" & gt; & Lt; Img src = "logo3.png" / & gt; & Lt ;! - & lt; Img src = "kslf_logo.png" / & gt; & Lt; Img src = "logo2.png" title = "Katie Samson Lacrosse Festival Logo" /> - & gt; & Lt; Div id = "social_network" & gt; & Lt; A href = "#" target = "_ blank" title = "see Facebook page!" & Gt; Facebook & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt