Posts

Showing posts from May, 2012

c++ - google test EXPECT_EQ and boost::make_recursive_variant -

I have a recursive variation as the following when I compare it using two recurring version object, it works fine Does, but with EXPECT_EQ, this gives the compilation error. typedef boost :: make_recursive_variant & lt; Bool, boost :: uint8_t, boost :: uint32_t, boost :: int32_t, double, std :: string, boost :: uuids :: uuid & gt; :: type rvariant_type; Variant_type b1 = true; Rvariant_type b2 = true; Emphasis (B1 == B2); // work fine EXPECT_EQ (B1, B2); // Compiler error returns EXPECT_EQ (boost :: get & gt; ball & gt; (b1), boost :: get & lt; balls & gt; (b2)); // work fine boost / v1.46.1 / include / boost / variant / detail / variant_io.hpp: 64: error: any match for an operator Heavy use of streams for guest output but it seems that boost: Overloaded operator Version Support for Printing via Media & lt; & Lt; Very limited, if no one is non-existent. Take a look at this: #include & lt; Boost / variant.hpp & gt; # Include ...

internet explorer 8 - HTML5 and CSS3 for IE7 and IE8 -

I have been given a web application where the new HTML tags (header, ny, section tag) and new CSS3 The Style Properties (spherical boundaries) website looks amazing in Google Chrome and Safari. However, now the customers complain that the website has broken for IE7 and IE8. Everything is out of alignment and most styles do not render. What is the easiest way to work on this website in IE7 and IE8? What do I have to do: a) Apply some hawk so that the IE browser accepts new HTML5 and CSS3 features? B) A complete rewrite of the front end? :) and for rounded corners I use 1 of Use: & lt ;! - [If LT IE 9] & gt; & Lt; Script src = "http://html5shiv.googlecode.com/svn/trunk/html5.js" & gt; & Lt; / Script & gt; & Lt; [Endif] - & gt; Use as 2: - Mosquo-radius: 4px; -WebKit-boundary-radius: 4px; -khtml- boundary-radius: 4px; Boundary-radius: 4px; Transaction: URL (range - radius.htc);

Is there a replacement for nm on Windows? -

Image
I would like to check the object files on Windows similar to the Linux device nm . Is this possible? You should try 'Dumpin'. You can see the details of this device and reference. Additionally, a GUI is available.

Read Excel sheet using ADO on Visual C++ -

We have an old application using VC ++ which uses the ODBC driver to read Excel data. There is a problem with the current code with the mixed data types and boundaries of the ODBC driver. So I am planning to use the Jet Ole DB driver and the use of the ADO I open the ADO connection and read the Excel sheet. No issue .. The biggest problem is called every, open (), it brings excel sheet and shows the user (if it is not already open). I tried to check the parameters, but there was no suggestion to hide the main Excel window. Any suggestions? The connection string I am using Provider = 'Microsoft.JET.OLEDB.4.0'; Data source = temp.xls; Expanded Properties = "Excel 8.0; IMX = 1; HDR = No" Three options Spring: Use the automation to open the spreadsheet in the hidden window. To wit. You can make an example of Excel application, hide the main window, and open a spreadsheet in that window. Use the ISAM driver instead of the JAT driver. Although ...

iphone - Background of my view hides buttons -

I set an image as the background for my view, but when I add a button, It does not appear to hide the image button Can you help me :) So you have Is there a UIView in which a UIImageView (background image) and some UIButtons? When you add UIButtons to the code, do the following for each button: [self.view bringSubviewToFront: aButton];

php - From Two Dimensional Array To One Dimensional Array? -

Hey, I'm using fuel PHP and I am doing this ... $ query = \ DB :: Choose ('Username') - & gt; From ('Users') - & gt; Execute () - & gt; As_array (); I'm getting the array as shown below. Array ([0] => Array ([username] = & gt; daGrevis) [1] = & Gt; array ([username] => whatever) [2] = & gt; Array ([user name] => foobar)) It is definitely not what I want. Here is an example of "ideal array" for me: Array ([0] => Dagrevis [1] => whatever [2] => Fobar) How can I get an "ideal array"? Maybe I'm doing something wrong in the query ... if not ... how can I convert array # 1 to array # 2? Maybe using loops? Or does it have built-in function? I'm confused. You can do it originally with fuel: $ Query = \ DB :: Choose ('Username') - & gt; From ('Users') - & gt; Execute () - & gt; As_array (null, 'username'); This will do what you want. ...

windows - Read Lines from document and create new document accordingly -

I would like to ask you to help me with a script in Windows 7, Input: Like list files like this: file1.dll file2.txt file3.png ..... Output is: pre & lt; & Lt; FILE_NAME & gt; File1.dll & lt; / FILE_NAME & gt; & Lt; / A & gt; & Lt; A & gt; & Lt; FILE_NAME & gt; File2.txt & lt; / FILE_NAME & gt; & Lt; / A & gt; & Lt; A & gt; & Lt; FILE_NAME & gt; File3.png & lt; / FILE_NAME & gt; & Lt; / A & gt; @echo for off / f "delims =" %% x (Files.txt) do (echo. ^ ^ Lt; A ^> Echo. ^ ^ FILE_NAME ^ & gt; %% x ^ & lt; / FILE_NAME ^ & gt; echo ^ ^ & lt; / A ^ & Gt;)

iphone - Creating an Address Book UI Similar to iPad's 'Contacts' App -

I am writing an app for the iPad that the user has to select the contact from the address book and enter new contacts. Will allow - these new contacts can be saved back in the address book, some can live in my local database What I would like to do is create an interface that looks like Apple's Contacts app. When I look at the Address Book UI API, it seems that this UI was specifically designed for the iPhone. For me, it seems that I have three options: 1) Address book NAD controller is allowed to hijack on full screen (and I'm not sure how to get my locally stored contact list) 2) Address Book UI a popover 3) Access the address book directly and create your own UI from scratch. is this correct? Creating a list of contacts is easy, but "new contact" UI will be troublesome. Can I at least not use ABNepers View Controller in any subview? Apple you would like to use their abderracebook apple docs (address book programming) The most preferred way is to maintain...

javascript - Greybox + Flowplayer problems -

Everything here after every step of a tutorial here, having a big problem here is putting video on a popup here Greybox .. Now, the only change I made is that it has a folder in my folder that has a gray box called Graybox, which holds JS and CSS files. So my script code reads it like this .. There is a folder called a video in which the video is named Video. FLV Now I have linked a text as shown in the tutorial. The code is & lt; A title = "noodle demo" href = "player.html? File name = video / nodal.flv" & gt; Demo & lt; / A & gt; When I click on the link on the web page, the window opens right, but the window does not read the page read. I have the required player html and this is a copy paste tutorial, I have changed all required version numbers, flow-drivers etc. Please help me use Reliance Energy Tag God bless the tutorial. To better focus you can get the middle of the site by example jQuery. & lt; A rel ...

Will WCF use the same ParameterInspector instance to handle BeforeCall and AfterCall? -

If I create a square that implements the IParameterInspector, and put it in the WCF pipeline using a custom service beaver If so, then will it be the same when using the cloud when calling and after-call? In other words, can I establish a state about the current orientation during the first call that I can enter later and ensure that the response will come for the same example? Note _stateValue in the sample code below? Can I depend on a mechanism like this? Class Operation Parameter Inspector: IPAMTactor Inspector {Public Interest Value; Call before public object (string operation name, object [] input) {_stateValue = (int) input [0]; Return tap; } Postponed after public zero (string operation name, object [] output, object return value, object correlation state) {int originalInput = _stateValue; Return; }} The purpose of return value is to pass a state related to a particular call Code> Before and After and correlationState the argument AfterCall . WCF infrastr...

xhtml - HTML table spanning -

A bit of a simple one here. If I have a table, how do I add more than one employee cell? Will I apply more than rowspan to the appropriate location td , and / or I empty & lt; Td / & gt; empty 'cell (in this case the location room)? If I add another column between the two, will I add the appropriate rowspan in its cells, or will they be assumed in any way? I think a table is appropriate - you are creating a table of data in which the rows Columns, Headers etc. are ... I do not understand exactly what you are trying to do, but it seems that you have many employees in every place. Does not worry at all Simply create extra lines and leave the place if it is the same & lt; Td> Is Empty. There is no right and wrong way, but I think this is the least complex way, and it is usually a good thing. Edit: forgot to mention - if you add another column between the two, the empty for the & lt; Td> A & lt; Td> If the data field is empty as a data f...

xaml - Is there a simple way to set a large number of WPF Form objects? -

यह सिर्फ बुनियादी उदाहरण है: यदि (a == b) {textbox1। पाठ = "ए == बी"; Textbox1.IsEnabled = सच; Textbox2.Text = "EXAMPLE2"; Textbox2.IsEnabled = false; Textbox3.Text = "EXAMPLE3"; Textbox3.IsEnabled = false; TextBox4.Text = "EXAMPLE4"; TextBox4.IsEnabled = false; TextBox5.Text = "EXAMPLE5"; Textbox5.IsEnabled = false; } अन्य {textBox1.Text = "a! = B"; Textbox1.IsEnabled = false; Textbox2.Text = "EXAMPLE2"; Textbox2.IsEnabled = true; Textbox3.Text = "EXAMPLE3"; TextBox3.IsEnabled = सच; TextBox4.Text = "EXAMPLE4"; TextBox4.IsEnabled = सच; TextBox5.Text = "EXAMPLE5"; Textbox5.IsEnabled = true; } यह बहुत थकाऊ लगता है मैं सोच रहा था कि इस तरह की परिस्थितियों को संभालने का बेहतर तरीका क्या है? मुझे इस बात का अहसास हो रहा है कि सभी पेशेवरों ने 1x1x1x .... विधि का उपयोग करते हुए सभी चीज़ें नहीं की। इस प्रकार के कोड को रिएक्टर करने के लिए बहुत अधिक तरीके हैं, जो कुछ अधिक संक्षिप्त द...

Android XML defined dimension value yielding unexpected results -

I have defined a DP dimension in your XML file like: & lt; ? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Resources & gt; & Lt; Dimen name = "custom_button_Margin" & gt; 10dp & lt; / Dimen & gt; & Lt; / Resources & gt; The idea is that I use these values ​​to set padding between elements. It works fine when I use the value in my layout XML file snippet:. & lt; RelativeLayout android: id = "@ + id / mainButtons" Android: Layout_width = "Fill_parent" Android: Layout_height = "Fill_parent" Android: layout_weight = "0.4" Android: layout_margin = "5dp" android: gravity = "true | Down" & Gt; & Lt; Android: Layout = "@ + id / _7" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "@ string / seven" Android: background = "@ drawable / custom_but...

.net - C# performance question: typeof(MyClass) vs. this.GetType() -

In the first example of the author, using the type of "typeof (MyApp") The square is MyApp . Is there any reason for this? GetType () , display-wise? Because I think that this.GetType () is more secure than possible copy-paste errors when copying to another category. Typef (Foo) is a fixed type lookup; Essentially this happens at the collection time, so you only get clearly named type. GetType () is a dynamic type lookup; This is a virtual method that calls the runtime and gives you the exact type, even if you are using polymorphism. So this is "slow", theoretically, but it gives you something that you can not get from typef (t). If you need one or the other for your design, then speed is not to be a factor.

java - JPA: uni-directional OneToMany question -

मेरे पास निम्न कक्षाएं हैं: class A {@OneToOne (cascade = CascadeType सभी) निजी बी बी; } वर्ग सी {@ManyToOne निजी ए ए; } वर्ग बी {@OneToOne निजी ए एक; @ मैमके (नाम = "नाम") @ ओनेटामाइ (कैस्केड = कैस्केड टाइप.एल, ...) @जोइन कॉलम (...) निजी मानचित्र & lt; स्ट्रिंग सी & gt; सीएस; } मुझे बी.ए. == सीए में शामिल होने के लिए बीसीएस पर मैपिंग कैसे निर्दिष्ट करना है? क्या यह संभव है? या क्या मुझे सी.बी. को संपत्ति सी। ए बदलना है? (मैं इसे इसे रखने के लिए पसंद करता हूं, क्योंकि इकाई बी सिर्फ एक सहायक वर्ग है।) मैंने भी ऐडबैंड करने के लिए बी को बदलने की कोशिश की, लेकिन एम्बेड करने के लिए नक्शा समर्थित नहीं है। जेपीए के लिए सभी रिश्तों को आईडी द्वारा होना चाहिए (विदेशी कुंजी संदर्भ प्राथमिक कुंजी)। इसलिए, आपको या तो सी से बी के लिए एक @ManyToOne जोड़ना होगा या यह सुनिश्चित करना है कि बी की आईडी ए के लिए विदेशी कुंजी है (बी को ए से एक के लिए @ पर जोड़ें और ए की अन्य आईडी को हटा दें)। अगर बी एक के एक उप-कक्षा थी, वहीं वन-टोन होने के बजाय यह भी काम करेगा। यदि आप ई...

python - django: on pypy, psyco, unladen swallow or cpython, which one is the fastest? -

Has anyone tried to compare the implementation of Python? Cpython I am planning to squeeze something more from my server. Python 2 mod_wsgi And ... Windows Server I'm not a fanboy windows, but it should be: {Some legacy code is working on it. Links to some criteria that compare pipes and creptons using the smallest degeneracy framework ( So I think how long it takes to create a benchmark only) You might be able to use the same benchmark with other frameworks, although this is not a complete integrated speed test. I believe the unladen was swallowed off.

performance - Profiling Django webserver for high startup times -

I noticed that a lot of time to start development web server for manage.py runerver It looks like I'm working on a Django project I'm thinking that parts of startup need so much resources, one way to understand that ultimately be able to gather enough information to fix the problem. Does anyone have an idea of ​​what I can do? /p> I found an easy and effective solution: Python - i cProfile Manage.py Driver & gt; More information about Python profilers I will also post a link to another related device (PyCon 2009)

Naming jQuery Functions -

$ ("। गीत")। Live ('click', function songClick () {// do stuff }); क्या आप ऊपर की तरह फ़ंक्शन का नाम रख सकते हैं और फिर इसे बाद के बिंदु पर कहते हैं? मैंने कोशिश की, लेकिन यह काम नहीं किया। क्या मुझे किसी इवेंट को पास करना है? इसे एक स्टैंडअलोन फंक्शन के रूप में नाम दें और इसे कॉल करें live () : फ़ंक्शन गीतक्लिक () {// do stuff} $ ("। Song")। Live ('click', songClick); लाइव () पद्धति में पैरों की कमी का ध्यान रखें।

sudo access in android terminal emulator on android emulator (development) -

संभव डुप्लिकेट: नमस्ते, मैं एंड्युलड एक्लिप्स प्लग-इन के साथ एक्लिप्स में एक एंड्रॉइड ऐप पर काम कर रहा हूं। मैं आभासी योजनाओं पर फाइलों को सहेज रहा हूं और टर्मिनल एमुलेटर (देव उपकरण = & gt; टर्मिनल इम्यूलेटर) में उन पर एक नज़र रखना चाहता हूं। हालांकि मैं कुछ निर्देशिकाओं का उपयोग नहीं कर सकता हूँ और sudo पहुंच को अस्वीकार कर दिया है I मैं एक सुडो एक्सेस कैसे प्राप्त करूं? मैं एंड्रॉइड 2.3 एम्यूलेटर चला रहा हूं आपकी मदद / संकेत के लिए धन्यवाद! हो सकता है कि कोई प्रत्यक्ष जवाब न हो, लेकिन आपके पास एडीबी शेल के जरिए रूट तक पहुंच होती है। एमुलेटर में एसयू यूड को रूट , इसलिए केवल रूट इसे चलाया जा सकता है (जो आपको स्वचालित रूप से एडीबी शेल के जरिये मिलता है)

c# - Installer OnCommitted question -

I wrote an installer in a while that installs a service that I wanted to start when the installer was running I put the code to start the service in the OnCommited method of ServiceInstaller. I did this because I got lots of discovery on the subject, it happened like this, but I remember there were other ways to do this. However, I'm not sure that this is the right thing to do. Specifically, Docs says that on-cometed calls are made after the installation commission. Does it also count to uninstall? I do not want to try to start a service which I am uninstalling! Thoughts? Using Recommended Approach Actually, you create a service-control operation that installs the Windows Installer service After saying to start.

iphone - Create an image of part of the screen? -

I have a series of by-laws in my version of the screen and it wants to take it and Save it as an image, then hopefully show the image instead of running the app a little faster. How can I get a saved image of those layers (temporarily, the Photos is not accessible in the app)? If you want with a screenshot you can: / P> UIGraphicsBeginImageContext (myView.bounds.size); [MyView.layer renderInContext: UIGraphicsGetCurrentContext ()]; UIImage * image = UIGraphicsGetImageFromCurrentImageContext (); UIGraphicsEndImageContext ();

.net - Convert VB.NET To C# -

संभव डुप्लिकेट: हे, मैं एक शक्तिशाली उपकरण ढूंढ रहा हूं जो कन्वर्ट कर सकता है & amp; कोई भी विचार? धन्यवाद मैं कुछ वेबसाइटों की कोशिश की है, लेकिन वे बहुत अच्छे नहीं हैं। धन्यवाद दो सबसे लोकप्रिय वाले डेवलपर फ़्यूज़न और टेलरिक्स हैं: कभी-कभी आपको परिवर्तित कोड के कुछ हिस्सों को कन्वर्ट करना होगा, कन्वर्टर्स को समझने में परेशानी होती है, लेकिन पूरे पर वे आपके लिए भारी भार उठाने का एक बड़ा हिस्सा करते हैं । एक उदाहरण यह है कि vb.net सरणी अनुक्रमित का उपयोग करता है () जबकि सी # उपयोग करता है [] कुछ कारणों से मैंने डेवलपर फ्यूजन को भ्रमित किया है और इन्हें सी # कोड में छोड़ते हैं जो कम्पाइलर को भ्रमित करते हैं। जब मैं फ़ोरम के सवालों और ऑप्शन का जवाब देता हूं, विशेष रूप से vb.net उत्तर का अनुरोध किया है मैं इसे सी # में सीधा करने में आसान बनाता हूं और फिर उसे परिवर्तित कर देता हूं। यदि आपके पास बहुत बड़ी परियोजना है तो आपको प्रत्येक व्यक्तिगत पृष्ठों को परिवर्तित करने में कठोर लग सकता है। इस मामले में आप (मैंने वास्तव में इसका परीक्षण नहीं किया ह...

winapi - how to clear serial buffer? -

I get a message from the micro-controller on the serial port, I'm using the 9600's baud rate. I have a program that receives messages from the Win32 API that receives the message. Sometimes it happens that I am not able to receive messages and then suddenly when I press Ctrl + C, a burst emerges. How can I clear a serial buffer so that I can avoid data flooding? Thanks does this. When using Windows, using serial ports is quite useful.

asp.net mvc - How to set ViewBag properties for all Views without using a base class for Controllers? -

In the past I have seen common assets such as the current user being trapped, in a global fashion on view data / viewbacks It has allowed me to use the IOC on the base controller and has not been able to share this kind of data globally. I am wondering if there is an alternative way of incorporating such code into the MVC pipeline? Un-attempted by me, but you can see the view data during the activation process and then watch it You can. Because the views on the in-fly are registered, registration syntax does not help you connect to active events, so that you set it to module Up: class setViewBagItems module: module {attach without secure override computer registration (IComponentRegistration registration, IComponentRegistry registry) {if (typeof (WebViewPage) .IsAssignableFrom (registration.activator.lit type) ) {Registration. Active = = (S, E) => {(WebViewPage) e.Instance) .ViewBag.Global = "global"; }; }}} This may be one of "only a hammer o...

.net - System.AddIn vs System.ComponentModel.Composition -

संभव डुप्लिकेट: System.ComponentModel.CompositionModel.Composition नामस्थान के आयात और निर्यात कार्यक्षमता के बीच क्या अंतर हैं System.AddIn नामस्थान की ऐडइन कार्यक्षमता बनाम? ऐसा लगता है कि कुछ कार्यक्षमता ओवरलैप है, इसलिए मुझे दूसरे पर एक का चयन क्यों करना चाहिए? उम्मीद है कि ये लिंक्स आपकी मदद करता है

c++ template specialization - linker error multiple definitions -

Here my third question ;-), but I'm actually new to c ++ template programming and operator overloading. I am trying the following: terminallog.hh // snippet code class terminology {public: terminology (); Terminallog (int); Virtual ~ terminology (); Template & lt; Class T & gt; Terminology & amp; Operator & lt; & Lt; (Const T & V); Template & lt; Class T & gt; Terminology & amp; Operator & lt; & Lt; (Const std :: vector & lt; T & gt; & amp; v); Template & lt; Class T & gt; Terminology & amp; Operator & lt; & Lt; (Cost TV []); Terminology & amp; Operator & lt; & Lt; (Const char v []); // snap code}; // Snippid code template & lt; Class T & gt; Terminology and Terminology :: Operator & lt; & Lt; (Const T & V) {std :: cout & lt; & Lt; Std :: endl; This- & gt; letter of demand (); Std :: cout & lt; & Lt; V; Return * This; } Template & lt; Square...

c - Including a dynamic library in an Xcode 4 project -

I apologize for the original question; So I hope that it will help other beginner programmers. I have installed the MacPortes and after that I installed the external library: ImageMagick . From my research, I know that McPort has inserted the diligence in the / opt / local / lib / folder: I also know that header files / opt / local / include / imagemagick Are located in the / folder. I thought I wanted to see how it ran away I created a new project, a C command line tool, then copied the first example to main.c Now I want to add Image Magazine libraries for my project. Then how do I add files to my encoded project, so that #include & lt; Wand / magickWand.h & gt; work? I have similar difficulty with external libraries with iPad projects to make both simulators and tools However, in case of your test you can try the following: Choose your project in Project Navigator. The most thing should be. In the expanded pane at the very top, you shou...

coldfusion - CFchart shut down accidently my laptop -

In these days, I got a problem about CFFEH in my laptop because whenever I open (in open) my lock, Cfcart runs, which unfortunately stops and the memory like a blue screen gets leaked. PS: Oracle 10G and CF8 are also equally established in this disappearance. Now, I have found that once I run my code my laptop will be shut down. This is due to low coding and I have saved as "style.cfm" and added it to my chart file. & lt; Cfsavecontent variable = "theme" & gt; & Lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Piechart depth = "double" style = "solid" type = "small knot" angle = "0" & ​​gt; & Lt; DataLabels style = "pattern" placement = "out" autoControl = "false" font = "Arial-10" & gt; & Lt ;! [Cdata [$ (collateralized)]] & gt; & Lt; / DataLabels & gt; & Lt; Legend spacing = "0" placement...

Find and replace excel VBA trouble -

I currently have an Excel VBA project in which I created a button and change the basis Worksheet price Working on user input, where the user will provide a new hardware name, a quantity and the name of the sheet in which the new value should be updated. The name of the hardware is a unique value, so the quantity should be updated based on the hardware name. The problem I am facing is that, when I try to update the values, the name of the hardware is getting well updated but where the quantity is only the quantity of that particular hardware name Not updating, but updating all the amounts that match the old volume as updating. Here's how the code looks like. if Combo box 1 Value & lt; & Gt; VbNullString then sName = .ComboBox1.Text 'is the name of kickboxes if lane (.ldhw value) & gt; 0 and lane (.nwhw.value) & gt; = SOldText, replacement :: 0 then sOldText = .OldHW.Text 'OldHW and NewHW Name text box doing sNewText = .Cells.replace worksheet (SNAM...

c# - Synonyms Translation in .NET -

This is a slightly different scenario. I am doing a tool (C # .NET) which is HTML content for a specific product site Generates. Basically it contains products and details so that the user can order it. These details are taking us from the related manufacturer's site. (Under their approval) Then when we search for it in Google, they recognize the details that we have used as non-originals and the search results are not coming to the top. Either way, we can put something like a synonym translator in the tool so that when we copy the content from the manufacturer, the content will be replaced with the synonyms in our database. I am not very sure about this if you have any ideas, please save here. Thanks List of synonyms with synonyms related to synonyms database vendors You can buy inventory and search and display strings; Place of operation But the accuracy of the reference is not 100% guaranteed.

c# - Making list columns while looping through data? -

I always want to ask in C # me a IEnumerable & lt; Cars & gt; , which has 20 results in my SQL database with a LINQ query. I want to get it listed in 4 of the 4 columns, which I've typically finished using ul tags first ul Then start foreach through the numerator, place a counter in it when it closes % 5 == 0 i ul And after a new ... start foreach , add the ending ul . Is there a better way to do this? You GroupBy () the way to collect cars together You want to present them, in your case, 5 cars are grouped together (using the integer division, cars with 0 to 4 index, group 1, group 5 to 9, group 2 etc.): list & lt; Cars & gt; Cars = New list & lt; Cars & gt; (); // Various car groups of cars = cars. Choose (car, index) = & gt; New {index = index, car = car}) .GroupBy (x => x.Index / 5) Select (G = & gt; G.Select (x = & gt; x.Car) .Olist ()) .Olist (); Forchha (different groups in the car group) {// Amit & lt;...

Is there a way to redirect www.foo.com/* to foo.com/* using Ruby on Rails without mod_rewrite -

I want to redirect any request from www.foo.com to foo.com Generally, I use mod_rewrite to do this and just use a regular expression to match any subdomain However, I am using Heroes to host this application, which I I can tell, I do not give this capability. Is there an easy way to do this in Ruby on Rails? Thanks! You can add a before_filter to your ApplicationController class ApplicationController & Lt; ActionController :: Base before_filter: redirect_www def redirect_www if /www/.match (request.host) redirect_to request.protocol + request.host_with_port + request.request_uri End End

Rails 3: How to "redirect_to" in Ajax call? -

निम्न try_login पद्धति को एजीएक्स का उपयोग कर एक लॉगिन फ़ॉर्म सबमिट करने के बाद कहा जाता है। वर्ग AccessController & lt; ApplicationController [...] def try_login authorized_user = user.authenticate (params [: username], params [: पासवर्ड]) अगर अधिकृत_जर सत्र [: user_id] = authorized_user.id सत्र [: उपयोगकर्ता नाम] = authorized_user.username फ्लैश [: नोटिस ] = "हैलो # {authorized_user.name}।" Redirect_to (: नियंत्रक = & gt; 'नौकरियां',: एक्शन = & gt; 'इंडेक्स') और [...] एंड एंड एंड एंड समस्या यह है कि redirect_to काम नहीं करता है। आप इसे कैसे हल करेंगे? अंत में इसके साथ: redirect_to (: नियंत्रक = & gt; 'नौकरियां', एक्शन = & gt; 'इंडेक्स') रेंडर: जेएस = & gt; "Window.location = '/ jobs / index'" और यह ठीक काम करता है!

objective c - How do I set the contents of a CALayer to a CGImageRef? -

मैं एक छवि को CALayer की सामग्री सेट करना चाहता हूं सामग्री संपत्ति में एक सामग्री संपत्ति है उस संपत्ति के दस्तावेज का कहना है कि "एक परत इस सामग्री को सीजीआईमेज आरएफ में सेट कर सकता है ताकि छवि को उसकी सामग्री के रूप में प्रदर्शित किया जा सके।" लेकिन संपत्ति Xcode में एक id लेता है, तो मुझे निम्न समस्या मिलती है: सिमेंटिक इश्यू: असंगत सूचक प्रकार 'आईएनजी' को 'सीजीआईमेज आरफ' (उर्फ 'स्ट्रेट CGImage *') मैं CGImageRef को सामग्री संपत्ति को निर्दिष्ट कर सकता / सकती हूं जब इसे केवल एक आईडी ? मुझे यहाँ क्या याद आ रही है? स्पष्ट रूप से कास्टिंग सीजीआईमेज आरफ से id चेतावनी को ठीक करना चाहिए उदाहरण के लिए, सीजीआईमेजआरफेम छविरेफ; ... layer.contents = (आईडी) imageRef; को ठीक काम करना चाहिए।

Is there any way to emulate "macros" in c#? -

I am trying to create CodeContracts in C #, like I get statements, so I need a tool The one who allows me to choose some options looks at the code before the compiler, if there is no way to do that, then I think a visual studio plug will also help. Trying to fight the syntax of language like C # is just a bad idea to use Those with the tools will fight back with determination. Just go with the flow and stop trying to float against the current. You will soon be used for syntax and it will understand everyone who works with the code.

asp.net - File download from web farm -

I am working on a project where we want to provide a link to download the excel file We are using NLB for load balancing, there are 3 machines in the NLB cluster. The hindrance is that the excel file is available on a machine to download. To ensure that the following HTTP requests will serve the same month? I think you can not do the same. The best solution is to create a shared folder and save all the resources (files, images, etc.) in that folder, in that folder on the virtual directory point on each server, and the file Use that path when providing a link to download. Another solution is to use an IP-based load balancer but this solution is not recommended. I hope that you understand me, if you do not hesitate to ask.

How to create the build of PHP application -

I have developed a web application in ph I and I have to host it in server but before that I have to source code How can I get it? .. in asp.net We were using the "build" option. This means that the IDE will compile the code and it will ignore the .aspx.cs file and it will show only the .aspx file in that build folder ... is there any such option like php No, nothing like PHP is necessary. You just upload your folder full with .php files from the server and that's it.

iphone - Google Ranking of Website through i-phone -

I am trying to apply an i-phone application that allows users to search Google's website rankings. Any help is appreciated. I think it provides some service for itself, please be helpful to see it.

IIS and Apache (WAMP) running -

हम एक ही मशीन में IIS 6 और Apache (wamp) को एक ही समय में कैसे चला सकते हैं? IIS और अपाचे के पास अलग पोर्ट होना चाहिए। अपाचे (WAMP) का पोर्ट बदलने के लिए WAMP आइकन पर क्लिक करें जिसे आप अपनी ट्रे या अन्य शॉर्टकट आइकन पर देख सकते हैं wamp। अपाचे को ढूंढें और httpd.conf को खोलें या यदि आप जानते हैं कि यह कहां संग्रहीत है। / Li> फिर "80" को ढूंढें 8080 = 8080 को सुनने के लिए सर्वरनाम स्थानीयहोस्ट: 80 से सर्वरनाम लोकलहोस्ट: 8080 नोट: आप जिस पोर्ट को वांछित कर सकते हैं, उसे बदल सकते हैं, क्योंकि यह आपके अन्य पोर्ट के साथ संघर्ष नहीं करेगा। फिर सभी सेवाओं को पुनरारंभ करें पर क्लिक करें। अधिक जानकारी के लिए देखें। अगर आप अपना आईआईएस ऐपः बदलना पसंद करते हैं, तो इस पर जांच करें

mysql - Having problem with importing the magento database -

When I'm trying to import the magento database, do not make me " The table " . Below is an error; # 1005 - Can not create table 'db123712_paper.catalog_category_product' Can anyone help me on this, I posted several forums Have tried the solutions. Thanks in advance Enter the following content at the top of your import script, SET @OLD_CHARACTER_SET_CLIENT = @@ CHARACTER_SET_CLIENT; SET @OLD_CHARACTER_SET_RESULTS = @@ CHARACTER_SET_RESULTS; SET @OLD_COLLATION_CONNECTION = @@ COLLATION_CONNECTION; Set name utf8; SET @OLD_UNIQUE_CHECKS = @@ UNIQUE_CHECKS, UNIQUE_CHECKS = 0; SET @OLD_FOREIGN_KEY_CHECKS = @@ FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0; SET @old_SQL_MODE = @@ SQL_MODE, SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO'; SET @old_SQL_NOTES = @@ SQL_NOTES, SQL_NOTES = 0; The following is your script SET SQL_MODE = @ OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS = @ OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS = @ OLD_UNIQUE_CHECKS; SET CHARACTER_...

XML DTD Problem -

कोड: & lt;? Xml संस्करण = "1.0"? & Gt; & Lt;! DOCTYPE ईमेल [& lt;! ELEMENT ईमेल (टेक्स्ट) & gt; & Lt;! ElEMENT टेक्स्ट (#PCDATA) & gt; ] & Gt; & LT; ईमेल & gt; & Lt; text & gt; प्रिय जॉन ....; -)। & Lt; / text & gt; & Lt; / ईमेल & gt; पाठ "> यह पंक्ति गलत है: & lt;! एलीमेंट पाठ (# पीसीडीएटीए) & gt; एलईमेंट को सभी ऊपरी मामले की जरूरत है। जवाब आपके लिए सौंपे गए

Show if page URL matches string in classic ASP? -

I am trying to create a statement that shows a line of JavaScript, if the current page URL is given a given Matches the string you entered. Here are some fake codes: If the URL mail ("example.com/sitename/") then the response. Type ("& lt; script = 'file.js' & gt; & lt; / script & gt;") End if The problem is how do I check that the current page's URL matches string or not? Many thanks! Thanks for your reply I am trying to make it a bit more complicated with an array of possible URL matches. I made the following asap, but it does not work properly The script is being written on the page where the URL does not match. Is there something that seems wrong? I can not understand it! & lt;% lower page URL page URL = request Server ("SERVER_NAME") & amp; Request for each URLNPP in URLRRR. ("URL") URLRRE ​​= Array ("example.net/folder1/", "example.net / folders2 /") If the URLRRR (pa...

.net - Entity Framework Architecture for long running windows service -

I have a question about how best to architecture your solution using the ATI Framework in the Windows service. I want to provide an online (web) service that allows users to execute long-lasting tasks, view progress of work, cancel them, etc. So far, I'm actually using a window service to execute the tasks that bring WCF intervals to the new job and manage existing tasks. I am using the unit framework to store the history of all jobs. Although I am not completely convinced that the background process (with current progress) and WCF services should be exposed to this situation. The background process periodically records the database and WCF services from there to the current situation? Or does it come to understand that the WCF service directly identifies with a static member or background process reaching something similar? Can they share a datacentext? I have to turn on the information and it seems that the background process and WCF service are both running in the ...

sql server stored procedure -

Can I join a table with a stored procedure that gives a table? Thank you You need to use INSERT. To store EXEC from SP to data table or table-variable. Then you can join it. Declare the @temp table (An int, B vertebrae (10), C. Datam); Joined @temp exec myproc 1, 10, 'abcdef'; Please select from @tempt to other theater o ... etc. Without creating a temporary table, if you skip table-variable, then only the only option is - SP- Take any parameters, use OPENQUERY to run SP to return table. Pseudo: Select * from (local_services, 'spname_no_params') o on joining T o ... etc

I have a jquery problem when using $.noConflict -

Hi I have to use the noConflict method in my project but I have a problem about this. Do not use this method for one ° F, the project is working correctly but if I use this method, then I have an error. How do I solve this problem. & lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Head runat = "server" & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; Script type = 'text / javascript' src = "javascript / jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ .noConflict (); // Ä ° I do not use this method, the project is working correctly // But if I use this method then I have an error & lt; / Script & gt; & Lt; Script language = "javascript" type = "text / javascript" & gt; Function Göster () {Warning ($ ("# text box 1"). Val ()); } & Lt; / Script & gt; & Lt; / Head &...

Is it bad design practice to repeat fields in a database in order to save yourself some convoluted queries? -

If you have some tables in which you have all the information you need, but there are some complex involved in it. Thank you in advance Paul Yes and no . This is intentionally going against the principle of database generalization, and it is called "denormalisation". Its bad points are many reasons why we believe in general, most importantly, in the way that an error can make itself incompatible with the database, in general, this poor DB design is in practice, It updates the database and both of them are more complex and therefore more expensive (and they do not accept any mistake). Although this can give performance benefits to some questions which always vary in time to time, and due to being trivial, it is a proper and sometimes necessary, customizable. I want to do the following approach to do this: Its requirement repeats. Specifically, CTE has made some cases which I did not want to use this technique, because CTE could only see several tables ...

python - Trying to convert MSWord 2007 document to an XML format -

I hope I can leave history, but I trust the following: I have many people who have instant access to MSDD 2007. We are trying to present a generic word document which can go from person to person during several months and they Regardless of the answers given below for this "new content" - above mentioned There is no horrific idea, or a better idea than this can be ... I am already under this road: P My 'idea' setup (inside the word) was an XML schema so that we could specify specific content areas (such as item number, item description, item stem, item option, item response, etc.) I taught myself XML schema in less than 6 hours, and apparently I am a terrible teacher: I have an XML Schema file, I have imported it in words, according to all the online tutorials I have Flagging areas I was able to hoop to save an "XML" file (from Word) and it looks like this: & lt; Note & gt; & Lt; Gt; & gt; Toe & lt; / Gt; & Lt; To ...

mysql - Is there a data integrity test software? -

We have a large amount of data in many MySQL databases that are constantly updated with external sources. Is there some software (preferably PHP based) with which we can define the rules of testing against the database, for example regular expressions on the data, frequency of updates, disappearing data etc.) and regularly reporting the check Has something gone wrong or a tendency in the data has changed? how STFW? For a "MySQL Data Quality" googling (among others) a link Otherwise, I monitor the data warehousing tool - for example, Oracle Warehouse Builder has some mechanism for data auditing. Kind regards, Frank

jsf 2 - JQuery Conflicts with Primefaces? -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर मैंने JQuery1.5 को शामिल किया है एक JSF पृष्ठ के शीर्ष लेख में उस पृष्ठ में पहले से ही कोडित प्राइफाफेस घटकों का एक गुच्छा है। पृष्ठ के शीर्ष लेख में Jquery.js को शामिल करने के बाद, कुछ प्राइमफेस घटकों जैसे & lt; p: commandButton & gt; उनकी त्वचा खो देता है और & lt; p: फ़ाइल यूप्लोड & gt; सामान्य जेएसपी & lt; इनपुट प्रकार = "फ़ाइल" & gt; की तरह दिखती है और अपनी AJAX क्षमता को पूरी तरह से खो देता है। क्या JQuery को सुरक्षित रूप से उपयोग करने का कोई तरीका है प्राइमफ़ेस (बिना संघर्ष के) के साथ? मुझे सवाल में वर्णित के समान समस्या थी। यही कारण है कि मैं निम्नलिखित समाधान के साथ आया था: जीएमआई पुस्तकालय (वर्तमान में 1.4.1) में निर्मित प्राइमफ़ेस को शामिल करें जैसे कि एक jQuery की अपनी लाइब्रेरी सीएसएस स्वरूपण समस्याओं की ओर ले जाती है। target = "head" विशेषता को जोड़ना टैग को हर जगह निर्दिष्ट करने की अनुमति देता है - उदा। Templating का उपयोग करते समय आपको हमेशा & lt; ...

erlang - Notify and stop gen_event manager atomically -

जब मेरे gen_event प्रबंधक प्रक्रिया से कोई विशेष संदेश प्राप्त होता है, तो मैं चाहता हूं कि वह सब के बाद बंद हो हैंडलर ने इसे संभाला है और इससे पहले कि वे किसी भी अन्य ईवेंट प्राप्त करते हैं और संभालते हैं। एकमात्र तरीका मुझे मिल सकता है: -मॉड्यूल (मैनेजर)। ... रोक (कारण) - & gt; Gen_event: sync_notify (प्रबंधक, {स्टॉप, कारण}), gen_event: stop (manager)। लेकिन इसके लिए सभी नियंत्रक को remove_handler से handle_event ({stop, reason}, state) वापस करने की आवश्यकता है, अन्यथा वे एक घटना sync_notify और रोक से पहले एक अलग प्रक्रिया से भेजी गई। मैं एक ऐसे दृष्टिकोण का चुनाव करना पसंद करता हूं जो प्रबंधनकर्ताओं पर कोई आवश्यकता नहीं डालता। जहां तक ​​मुझे पता है, कोई भी ऐसा करने का कोई तरीका नहीं है जो आप उपयोग कर रहे हैं एक तरह से संभालने के लिए जो वास्तव में एक कॉल तक सीमित है, केवल स्पष्ट रूप से निकास (पीड, कारण) के साथ घटना प्रबंधक को मारने या इसे अपने पर्यवेक्षक द्वारा बंद करने का आदेश देने के बाहर।

c# - DateTime.ToString formatting -

मैं DateTime.ToString विधि को संस्कृति जानकारी प्रदान करके स्थानीयकृत लघु तिथियां प्रदर्शित कर रहा हूं। अब तक मैं x.ToString ("d", ci) का उपयोग कर रहा था; // 23.12.2000 जो छोटी तारीख को प्रदर्शित करता है लेकिन अब मैं संक्षिप्त नाम का नाम भी शामिल करना चाहूंगा मैंने कोशिश की x.ToString ("ddd d", ci); // pon 23 लेकिन अब d दिन के नाम और छोटी तारीख की बजाय दिन का नाम और दिन का नंबर प्राप्त करने के बजाय शॉर्ट डेट स्वरूप के बजाय दिन निर्दिष्टकर्ता बन जाता है। पूर्वनिर्धारित संस्कृति के शॉर्ट डेट प्रारूप के साथ दिन को प्रदर्शित करने के लिए मैं फॉर्मेट को कैसे समझूं? कैसे के बारे में: string.format (ci, "{0: ddd} {0: d}", x)

sql server - my goal is to send ,in side the connection string the "pc name" for Audit -

मेरे पास एक कनेक्शन स्ट्रिंग (SQL सर्वर) है: डेटा स्रोत = myServerAddress; Initial कैटलॉग = myDataBase; उपयोगकर्ता आईडी = myUsername; पासवर्ड = myPassword; मेरा लक्ष्य कनेक्शन स्ट्रिंग को "पीसी नाम" के अंदर भेजना है। यह इसलिए है कि मैं इसे बाद में ऑडिट कर सकता हूं या बाद में लॉग में जानकारी देख सकता / सकती हूं। फ़ाइल जिस कंप्यूटर से उपयोगकर्ता को SQL सर्वर से कनेक्ट किया गया है। आप वर्कस्टेशन आईडी कनेक्शन स्ट्रिंग में जो कुछ भी आप में डालते हैं, उसमें होस्टनाम । में SQL सर्वर प्रोफाइलर में दिखाया गया है। मेरे परीक्षण में मुझे पता चला कि यदि आप कार्यस्थान आईडी निर्दिष्ट नहीं करते हैं कनेक्शन स्ट्रिंग जो आपको क्लाइंट कंप्यूटर का नाम स्वचालित रूप से प्राप्त होगा।

java - JideSplitPane proportions -

I have a component (horizontal partition). The content changes in the bottom panel and I need to calculate the new ratio for the split panel (with the new size below). How to do this? I try: double defBottomProportion = 0.4; Double bottom PanelHeight = manFrame.getHeight () * defBottomProportion; Double newbotpanelhite = bottom panelehite + additional resourceHeight; Double prop = newBottomPanelHeight / PanelHeight below; DefBottomProportion + = Prop; SplitPane.setPropertion (defBottomProportion); But it does not work. JideSplitPane expects couple of categories, not a single value compared to pan, a lower element in the array should be there. Try it out (spelling is also correct) split page .captoration (new double [] {defBottomProportion});

html - How to mark POSTing URLs? -

Search engine and pre-address browser plugin & lt; A & gt; can cause considerable trouble with the elements where the destination page changes the status of the server. & lt; Form & gt; In , I mark it as modified with method = "POST" . Is there a similar way to mark regular links in a modified form? rel = "nofollow" does not solve the problem: By adding rel = "nofollow" to a hyperlink, pointing to a page That hyperlink destination should not be ranked by any additional weight or user agents that do link analysis on the web pages (such as search engines) A plain old link can only be received by requests Get a request, as you The Ngit, should not trigger any destructive changes. The solution, if you do not want to make a form in your page at that time, the link point on a page that is a form, for example, if you have a "remove" link, then It can point to the page "Are you sure you want to delete the x? [D...

plugins - Browser Helper Object (BHO) for Firefox, Chrome and Safari -

मेरे पास एक कामकाजी ब्राउज़र हेल्पर ऑब्जेक्ट (बीएचओ) है जो मूलतः एक ATL आधारित COM घटक है जब घटक रजिस्ट्री में बीएचओ के रूप में पंजीकृत होता है, तो इंटरनेट एक्सप्लोरर IWebBrowser के एक इंटरफ़ेस के साथ किसी ऑब्जेक्ट को पास करने वाला सेटसाइट () विधि कॉल करता है और यह भी एक सेट का खुलासा करता है ऐसी इवेंट जो सदस्यता लें - जैसे कि OnDocumentComplete, जो हमें InnerHTML तक पहुंच प्रदान करता है। मैं फ़ायरफ़ॉक्स, क्रोम और सफ़ारी के गैर IE ब्राउज़र के लिए एक ही पंक्ति में कुछ ढूंढ रहा हूं। मुझे पता है कि फ़ायरफ़ॉक्स एक्सटेंशन मुझे कहाँ शुरू करना चाहिए क्या एनपीएपीआई जैसे क्रॉस ब्राउज़र एसडीके का उपयोग करना संभव है? (क्योंकि प्रत्येक ब्राउज़र का अपना एसडीके और एक्सटेंशन डेवलपमेंट प्लेटफ़ॉर्म जैसे कोका, पेप्पर एपीआई आदि है और इसमें से अधिकतर एनपीएपीआई का समर्थन करते हैं।) मैं कैसे घटनाओं के लिए सदस्यता ले सकता हूँ कि एक SetSite () सॉर्ट फ़ंक्शन ब्राउजर द्वारा कह सकता है जब उपयोगकर्ता एक अलग साइट पर नेविगेट करता है? आपके पहले प्रश्न का उत्तर सरल है: नहीं, यह है एनपीपीआई के...

javascript - Update the selected value of a dropdown based on the selected value of others -

I have loads of dropdowns on the page (up to 1000), like this: & lt; Choose Name = "Select"> Php Print (Select $);? & Gt; " Id = "select So everyone gets a name and id selectX, where x is the number between 1 and 1000. There are values ​​in each - When the page loads, each Set on - Each time selects a value (except -) I need to make sure that it has not already been selected if it is so that all other dropdowns with that value Need to set back - For example, for example Dropdown is set to 1 - Dropdown is set to 2 - Dropdown is set to 3 - Drop Aun is set at 4 - Sets a user-selected drop down 2 to 4 ''. This means that we now have the value: dropdown set to 1 - Dropdown 2 is set to 4 - Dropdown is set to 3 - Dropdown is set to 4 - User then sets the value of '5' from dropdown 3 and 5 is not set anywhere so it works. This means that now we have the values: Dropdown is set to 1 - Dropdown 2 is set...

php - How to protect files from outside? -

I have made a very small CMS myself after the session is set up. CMS includes some images, PHP pages, etc. In these pages, forms may also be included to add data to the database. The problem now is that you can actually use an address to get the page that shows the form, that is to say; domain.com/mycms/includes/addpage.php How would you suggest to protect it? Note: When I'm logged in, everything should work, just can not show this form from outside. I can check that session is present but I wonder what better and better There are easy ways. First of all, if you are including PHP files, then You should not have them inside your public web root. If this is not possible, then an alternative approach would be to define an absolute in your index.php (assuming that you call it as a main entry point Use) and are checking that every single file is set to prevent direct access to these files. For example: // index.php: define ('INDEX_LOADED' is true...

c# - Exception when building Expression to call StringBuilder.Append(Object) with DateTime -

I created a ToStringBuilder (found) that shows the types and dynamically expression s creates fast toaster ways to compile. It works well, but I've discovered it for errors on DateTime . This stringbuilder The append (object) is pressed when trying to call to pass the date time . Do I need to create an expression for box value types? How is this best done? I have made the following test case to show failure. // Pass [TEST] Public Zero update time () {stringbilder sb = new stringbilder (); Sb.Append (new date time ()); } // throws [test] Public Zero expression AppendDateTime () {parameter expedition sbArgExpression = Expression.Parameter (typef (stringbilder), "SB"); Parameter expiration datetimeAgxpress = expression.pemeter (typef (datetime), "datetime"); Var Append Mode Method = Typefinder (stringbinder) .GetMethod ("Add", New [] {Typef (DateTime)}); Var call = expression Call (sbArgExpression, Append Mode, Datetime ERGation); // Th...

c# - Visual Basic "Module not Found" error -

My problem is occurring when I try to open the .xls document from C # by MS Excel, and this document I have a macro. I am using the Microsoft.Office.Interop.Excel library (v12). With this operation I am getting an error in Microsoft Excel - "Module is not found" in a message box of Visual Basic, and the Visual Studio debugger also stops with an exception, "Heresilt 0x800 A PEEC". How to solve this problem? I do not want to use macros saved from that file, but at least read the values ​​of cells ... The excel is worried about the macro, it has a setting in Excel that determines what happens when someone sees one in a .xls file. Use the Excel option, Trust Center, Trust Center Settings, Macro settings in 2007. Select the "Disable all macros without notification" radio button. IIRC, there is also an option in the open system to suppress messages.

c - Given a double, need to find how many digits in total -

I have one double, which is not necessarily positive but usually it is 0.xxxx000 or X.xxxx00000 or XX.00000 Or 0.xxx0xxx00000, where at the end of the last number there are all 0. I have to track how many points are I have trouble with this, any help? This is C Use it to convert it to string and do any calculation / test on digits

How to check if a service is running on Android? -

How do I check that the background service is running (on android)? I want an Android activity that toggles the state of the service - it gives me the power to turn it on if it is closed and closed. I had only one problem, which was not earlier since my service was local, / P> To toggle the state described (for the record), the service class has finished using a static field: Here the hacked The solution proposed by: If your client and server code are the same. Is a part of APK and you are bound to serve with a strong intention (a right service class specifying), you can simply set your service to a global variable when it is running that your client can check We do not intentionally examine an API to see if the service is running, because when you are almost unsuccessful, when you want to do something like you end up with race conditions in your code

javascript - Syntaxhighlighter autoloader -

I got syntax highlighting I can not get automatic loader to work Am I & lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; Link href = "genres / shCore.css" rel = "stylesheet" type = "text / css" /> & Lt; Link href = "styles / shCoreDefault.css" rel = "stylesheet" type = "text / css" /> & Lt; Script src = "script / shCore.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "script / whiteloader.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Syntax Highlighter.Autoloder ('js script / shabrzjscript.js'); SyntaxHighlighter.all (); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Pre-cla...

ruby - How can I make empty tags self-closing with Nokogiri? -

I have created an XML template in the ERB, I fill it with data from a database during an export process. In some cases, there is a zero value in which an element can be empty, such as: In that case, the customer seeking the export wants to change it to a self-closing tag: & lt; Someitem / & gt; I am trying to see how to get a job to do this, but I do not see it yet. Does anyone know how to make empty XML tags self-closing with Nokogiri? Update A regedge I specified above was enough, but the client still wants to tag the ones whose children are all empty to conclude themselves: / P> ... must also be I think it will require the use of the nokia. search and & lt; \ 1 / & gt; In Ruby: results = subject. Gsub (/ & lt; ([^ & gt;] +) & gt; \ s * & lt; \ / & lt; # Matching opening bracket (# matches and remembering ... [^> one or more characters except for ##] * # capturing group & gt; # mat...

javascript - Why doesn't qTip tooltip stay open so I can click link on it? -

This is in my JSField, hover over Minnesota to see the qtype popup. I'm using the jquery plugin and i'm stuck to qtip for long time to click around on the link given on the tooltip. I've tried all the way to keep it open. Reading seems easy to do, but I tried it and there was no luck. and to hide: {Fixed: true, delay: 1000} And many people will not put tooltips so that users can click on the link. The irritating thing is that if you click any of the example links on the page, then they are doing what they are doing and I went to the source and it looks like they To hide: 'Unfocus', and hide: {Fixed: true, delay: 240}, But I tried both and won the tooltip will not remain open, am I missing something? Since this is the status of your tip, something is right: $ (this) .qtip ({hide: {// hidden here, delay: 500, // give the user a little delay to allow the mouse to mouse over it.) Correct} Content: {name: 'dark', style: {border...

python - Create client/server with Twisted -

I am trying to create a client / server using Twisted I want to create a daemon, Will be linked to another server and will serve as the server for other clients. I wrote something that I think is describing my problem: server = sys.argv [1] control_port = 8001 class ControlClient (protocol): def makeConnection (auto, Transportation): [Some code here-snip-] self.firstOrder (order, transport) DEF First order (self, action, transport): self.t = transport self.t.write (action + "\ 0") send DEF Order (self, action): self. Received TRET (Action + "\ 0") DIF Data (self, data): [Some code here - snip-] [Here I want to send data to clients connected to my broken server, use control server] Class control Server (control client): DIF data received (self, data): printed "client said" + data DEF defConnection (self, transport): self.t = transport self.t.write ("make connection") print "connection Create "def sendData (self, data): self.t.wri ...

wpf - Help needed in drawing 3D scrollbars -

Image
मुझे निम्न घटक को WPF में लिखना होगा: यह छवि पर होना चाहिए, मुझे माउस के साथ लाइन खींचने में सक्षम होना चाहिए (ऊपर खींचें और ऊपर खींचें , वाई को छोड़ दिया और दायें खींचें, और क्षैतिज से ऊर्ध्वाधर तक जेड स्पिन) WPF में मेरे बैकवाउंड लगभग मौजूद नहीं हैं, क्या आप मुझे मार्गदर्शन कर सकते हैं? क्या आप जानते हैं कि ऐसा करने वाले घटक, या इसके जैसा कुछ है? क्या आपको पता है कि इस नियंत्रण का नाम क्या है? धन्यवाद। मैं में कोड को पुन: क्रियान्वित किया गया, मैं सिर्फ // कान्वस। सैट टोप (डिज़ाइनर इटैम, टॉप + ई। व्हर्टिकल चेंज) को बताना; और कैनवास रहो। सैट-लेफ्ट (डिजाइनर आईटम, बाएं + ई। हॉरिजिन्टल चेंज); लगभग हर चीज हटाएं, आयत के साथ प्रतिस्थापित छवि, और अब वास्तविक और क्षैतिज रेखा खींचें और ड्रॉप लाइनें काम करती हैं , अब मैं खोज रहा हूं कि विकर्ण रेखा खींचें और ड्रॉप कैसे करें (मैंने इसे पथ / रेखा नियंत्रण के साथ करने की कोशिश की, मुझे समस्या थी कि अगर मैं विकर्ण रेखा जोड़ता हूं, तो यह सभी माउस को कैप्चर करता है घटना, और मैं अन्य लाइनों को नहीं ले जा सकता) अभी भी आवश्य...

javascript - Drawing anonymous circles in Google Maps -

I'm trying to attract Google Maps with many circle overlays, though I do not want to reveal the correct center radius . For example, myLatlng is my latitude / center center of the radius, I do not want to make a circle around it, but a circle which is included at that point . In this way, I currently want to draw my circle: var myLatlng = new google.maps.LatLng (33.3333322.22222); Var circle = new google.maps.Circle ({map: radius: 3218, strokeColor: "#FFAA00", fillcolor: "# 00AAFF", fillOpacity: 0.3, center: myLatlng, zIndex: 99999,}); 33.3333322.22222 is a 'secret' place that I do not want to appear, though I want to point that point inside the circle. Is this possible? Thank you! In your example code. The cycle can grow anywhere, such as 33.3 and 22.2 can still be included. One way to do this is to just add a random offset. // random between -5 and 5 (just one example) var latOffset = Math.floor (Math.rendum) * 11) -5; ...

android - String Resource new line /n not possible? -

It is not possible to add a new line "/ n" in the XML resource string. Is there another way to do this? Thanks Do not use a blackslash forward slash. "\ N" & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Resources & gt; & Lt; String name = "title" & gt; Hello world! & Lt; / String & gt; & Lt; / Resources & gt; In addition, if you plan to use the string as HTML, then you will see a & amp; Lt; Br / & amp; Gt; to use> & lt; Br / & gt; ) & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Resources & gt; & Lt; String name = "title" & gt; Hello & amp; Lt; Br / & amp; Gt; world! & Lt; / String & gt; & Lt; / Resources & gt;